diff --git a/.claude/memory/MEMORY.md b/.claude/memory/MEMORY.md index 7956d4d04..dbc0f3b8d 100644 --- a/.claude/memory/MEMORY.md +++ b/.claude/memory/MEMORY.md @@ -24,6 +24,7 @@ ### uBridge Permission - **[uBridge Permission Issue](./gns3-ubridge-permission.md)** - Docker containers fail to start due to missing CAP_NET_ADMIN/CAP_NET_RAW capabilities on uBridge +- **[Docker iptables FORWARD blocks bridge](./docker-iptables-forward-bridge.md)** - Docker sets FORWARD chain to DROP, blocking kernel bridge forwarding; `sudo iptables -P FORWARD ACCEPT` to fix ### Docker Container Stop Delay - **[Docker Container Stop Delay](./docker-container-stop-delay.md)** - Some containers take ~5s to stop because they don't handle SIGTERM (AlpiNet, OstinatoWireshark) diff --git a/.claude/memory/docker-iptables-forward-bridge.md b/.claude/memory/docker-iptables-forward-bridge.md new file mode 100644 index 000000000..2716fe7ab --- /dev/null +++ b/.claude/memory/docker-iptables-forward-bridge.md @@ -0,0 +1,38 @@ +--- +name: docker-iptables-forward-bridge +description: Docker iptables FORWARD DROP blocks kernel bridge forwarding, fix and symptoms +metadata: + type: reference +--- + +Docker sets the iptables `FORWARD` chain default policy to `DROP` when the +Docker daemon starts. This blocks **all** forwarded traffic through Linux +kernel bridges on the host — including `gns3br{N}` bridges created by the +builtin Ethernet Switch (ubridge `brctl`). + +## Symptoms + +- Nodes connected to the switch can send frames into the bridge (visible in + `tcpdump -i gns3br{N}`) but never receive forwarded unicast frames. +- `bridge fdb show` may fail to learn MAC addresses (frames dropped before + the bridge learning path). +- ARP and multicast/broadcast may appear to work because they flood, but + unicast replies never reach the destination. +- OSPF Hello / CDP visible on both sides but ICMP echo reply never returns. +- `ubridge bridge get_stats` shows symmetric IN/OUT counts (relay is fine), + `bridge fdb show` shows learned MACs, `bridge link show` shows `state forwarding` + on all ports — yet unicast still doesn't work. + +## Fix + +Run once per host boot, or make persistent via iptables-persistent / firewall config: + +```bash +sudo iptables -P FORWARD ACCEPT +``` + +## Related + +- [[ethernet-switch-ubridge-brctl-migration]] — the kernel bridge that hits this +- [[gns3-server-linux-only]] — datapath constraint +- [[gns3-ubridge-permission]] — another host-level prerequisite (CAP_NET_ADMIN) diff --git a/.claude/skills/gns3-api-testing/SKILL.md b/.claude/skills/gns3-api-testing/SKILL.md new file mode 100644 index 000000000..989e670f0 --- /dev/null +++ b/.claude/skills/gns3-api-testing/SKILL.md @@ -0,0 +1,172 @@ +--- +name: gns3-api-testing +description: Use this skill when testing GNS3 server REST API endpoints with curl — covers JWT auth, common patterns, and marker/link examples. +version: 1.0.0 +--- + +# GNS3 Server API Testing with curl + +## Core Principle + +Fixed routine for testing the GNS3 server API: **get a JWT token first, then send `Authorization: Bearer ` with every request.** +Default address `http://127.0.0.1:3080`, API prefix `/v3`. + +--- + +## Authentication (always first) + +```bash +TOKEN=$(curl -s -X POST http://127.0.0.1:3080/v3/access/users/authenticate \ + -H "Content-Type: application/json" \ + -d '{"username":"admin","password":"admin"}' \ + | python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])") +``` + +Persist to a file for reuse (avoids re-logging in each time): + +```bash +echo "$TOKEN" > /tmp/gns3_token.txt +TOKEN=$(cat /tmp/gns3_token.txt) +``` + +Then attach to every request: +```bash +AUTH="Authorization: Bearer $TOKEN" +curl -s -H "$AUTH" http://127.0.0.1:3080/v3/... +``` + +> **Endpoint note**: login is `/v3/access/users/authenticate`, **not** `/v3/auth/login`. +> OpenAPI spec is at `/openapi.json` (not `/v3/openapi.json`). + +--- + +## Common Variables + +```bash +BASE="http://127.0.0.1:3080/v3" +PID= +LID= +NID= +AUTH="Authorization: Bearer $TOKEN" +``` + +--- + +## Generic Request Patterns + +### GET (query) +```bash +curl -s -H "$AUTH" $BASE/projects/$PID/links | python3 -m json.tool +``` + +### POST (create) — with JSON body +```bash +curl -s -X POST -H "$AUTH" -H "Content-Type: application/json" \ + -d '{"name":"foo","bpf":"icmp"}' \ + $BASE/projects/$PID/links/$LID/markers +``` + +### HTTP status code only (body not needed) +```bash +curl -s -o /dev/null -w "HTTP %{http_code}\n" -X DELETE -H "$AUTH" \ + $BASE/projects/$PID/links/$LID/markers/global-icmp +``` + +### Extract a field from the response +```bash +LID=$(curl -s -H "$AUTH" -X POST ... | python3 -c "import sys,json; print(json.load(sys.stdin)['link_id'])") +``` + +--- + +## Status Code Reference + +| Code | Meaning | +|---|---| +| 200 | GET/PUT succeeded | +| 201 | POST created | +| 204 | DELETE succeeded (no body) | +| 401 | Not authenticated (token missing/expired) | +| 404 | Resource not found | +| 409 | Conflict (e.g. per-link edit of an inherited marker) | +| 422 | Schema validation failed (e.g. marker name starting with `global`) | + +--- + +## Marker Cheat Sheet + +### Project-level global marker definitions (inheritance) +```bash +# Create a def → fans out to every link automatically +curl -s -X POST -H "$AUTH" -H "Content-Type: application/json" \ + -d '{"name":"icmp","bpf":"icmp","tag":1,"color":"#ff5722"}' \ + $BASE/projects/$PID/marker-definitions + +# List all defs + the link_ids each is bound to +curl -s -H "$AUTH" $BASE/projects/$PID/marker-definitions + +# Update a def → syncs to every link +curl -s -X PUT -H "$AUTH" -H "Content-Type: application/json" \ + -d '{"bpf":"icmp","tag":99}' \ + $BASE/projects/$PID/marker-definitions/icmp + +# Delete a def → removes the inherited marker from every link +curl -s -X DELETE -H "$AUTH" $BASE/projects/$PID/marker-definitions/icmp +``` + +### Per-link markers +```bash +# List markers on a link +curl -s -H "$AUTH" $BASE/projects/$PID/links/$LID/markers + +# Create a private marker (name cannot start with "global") +curl -s -X POST -H "$AUTH" -H "Content-Type: application/json" \ + -d '{"bpf":"tcp port 80"}' \ + $BASE/projects/$PID/links/$LID/markers + +# Delete (inherited markers return 409) +curl -s -X DELETE -H "$AUTH" $BASE/projects/$PID/links/$LID/markers/ +``` + +### Project-level aggregation query +```bash +curl -s -H "$AUTH" $BASE/projects/$PID/markers # all markers across links, flattened +``` + +--- + +## Link / Node Cheat Sheet + +```bash +# List all links in a project (includes the markers field) +curl -s -H "$AUTH" $BASE/projects/$PID/links + +# List nodes (check ports[].link_id to find free ports) +curl -s -H "$AUTH" $BASE/projects/$PID/nodes + +# Create a VPCS +curl -s -X POST -H "$AUTH" -H "Content-Type: application/json" \ + -d '{"name":"t1","node_type":"vpcs","compute_id":"local"}' \ + $BASE/projects/$PID/nodes + +# Start a node +curl -s -o /dev/null -X POST -H "$AUTH" $BASE/projects/$PID/nodes/$NID/start + +# Create a link (both ends: node + adapter/port) +curl -s -X POST -H "$AUTH" -H "Content-Type: application/json" \ + -d "{\"nodes\":[{\"node_id\":\"$N1\",\"adapter_number\":0,\"port_number\":0},{\"node_id\":\"$N2\",\"adapter_number\":0,\"port_number\":0}]}" \ + $BASE/projects/$PID/links +``` + +> **Port occupancy**: VPCS has only one interface (port 0); once linked it cannot connect again. +> Confirm `ports[].link_id` is empty before creating a link; `"Port is already used"` means the port is taken. + +--- + +## Gotchas + +- **`POST /links` response may show `markers: []`** — the create response is serialized before the inheritance hook runs. + The inherited marker is actually applied; check `GET /links/{lid}/markers` or refresh `GET /links` to see it. +- **Restart gns3server after code changes** — the Python process does not hot-reload. +- **Wrap JSON bodies in single quotes** in the shell (double quotes inside); to interpolate a shell variable use `\"$VAR\"`. +- **Pipe long output through `python3 -m json.tool`** to pretty-print; extract fields with `python3 -c "import sys,json; ..."`. diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..9d1981d05 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,57 @@ +# Version control +.git +.gitignore +.gitattributes + +# CI / GitHub / Docker +.github +.whitesource +.dockerignore + +# Editor / IDE +.idea +.vscode +.settings +.project +.pydevproject +.mr.developer.cfg + +# Claude +.claude + +# Python build artifacts +__pycache__ +*.py[cod] +*.so +*.egg +*.egg-info +build/ +dist/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg +lib/ +lib64/ +.ropeproject + +# Test & coverage +tests/ +pytest.ini +.coveragerc +.coverage +.coverage* +.tox +.cache +.pytest_cache +nosetests.xml + +# Virtualenv +env/ +venv/ +.venv/ + +# Editor backup files +*~ diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000..21e1bf803 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,40 @@ +name: Bug report +description: Report a bug so we can fix it. +title: "[Bug]: " +labels: ["bug"] +body: + - type: textarea + id: what-happened + attributes: + label: What happened? + description: A clear description of the bug. + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: Steps to reproduce + description: How can we reproduce this? Numbered steps if possible. + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + description: What did you expect to happen instead? + - type: input + id: version + attributes: + label: Version / commit + description: Which version or commit hash are you on? + - type: textarea + id: environment + attributes: + label: Environment + description: OS, runtime version, anything else that might be relevant. + - type: textarea + id: logs + attributes: + label: Relevant logs + description: Paste any relevant log output. This is automatically rendered as code. + render: shell diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 8c17f15f4..3978699ee 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -10,12 +10,37 @@ on: jobs: build: runs-on: ubuntu-latest - + env: + DOCKERHUB_ORG: ${{ vars.DOCKERHUB_ORG || 'gns3' }} + steps: - name: Checkout code uses: actions/checkout@v7 + - name: Check for stable release + id: ver + run: | + TAG="${GITHUB_REF_NAME#v}" + echo "tag=$TAG" >> $GITHUB_OUTPUT + if echo "$TAG" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then + echo "stable=true" >> $GITHUB_OUTPUT + else + echo "stable=false" >> $GITHUB_OUTPUT + fi + + - name: Set lowercase image name vars + if: steps.ver.outputs.stable == 'true' + id: names + run: | + echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT" + echo "repo=$(echo '${{ github.event.repository.name }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT" + + - name: Set up Docker Buildx + if: steps.ver.outputs.stable == 'true' + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + if: steps.ver.outputs.stable == 'true' uses: docker/login-action@v4 with: registry: ghcr.io @@ -23,18 +48,21 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Login to Docker Hub + if: steps.ver.outputs.stable == 'true' uses: docker/login-action@v4 with: registry: docker.io username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push to GitHub Container Registry - run: | - docker build -t ghcr.io/$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]'):latest . - docker push ghcr.io/$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]'):latest - - - name: Build and push to Docker Hub - run: | - docker build -t gns3/${{ github.event.repository.name }}:latest . - docker push gns3/${{ github.event.repository.name }}:latest + - name: Build and push + if: steps.ver.outputs.stable == 'true' + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + ${{ env.DOCKERHUB_ORG }}/${{ github.event.repository.name }}:${{ steps.ver.outputs.tag }} + ${{ env.DOCKERHUB_ORG }}/${{ github.event.repository.name }}:latest + ghcr.io/${{ steps.names.outputs.owner }}/${{ steps.names.outputs.repo }}:${{ steps.ver.outputs.tag }} + ghcr.io/${{ steps.names.outputs.owner }}/${{ steps.names.outputs.repo }}:latest diff --git a/CHANGELOG b/CHANGELOG index 305263c5e..0f152d278 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,165 @@ # Change Log +## 2.2.61 30/07/2026 + +* Sync appliances +* fix(import): unvalidated symlink creation in import_project +* fix(qemu): fix addition of QEMU RNG device causes interface names to change +* fix(qemu): remove trailing space from RNG object argument +* fix: do not start nodes when deleting a project +* fix: correct always-true state check in DockerVM.stop() + +## 2.2.60 15/07/2026 + +* Sync appliances +* Only set IOU images to be executable when importing images +* fix(import): project import does not move images symlinks into place +* Search for system UEFI that is compatible with Python < 3.12 +* Add OVMF firmware directory configuration +* Automatically add a Random Number Generator (RNG) device when using uefi option is enabled +* fix(docker): handle container name conflict automatically +* fix: gns3-server crashes on startup if "Open this project in the background" is active but there is a problem with that project +* Handle HTTPNotFound exception when retrieving compute status +* Fix: Check compute connectivity before open() during project deletion +* API endpoints to manage base configuration files for templates + +## 3.1.0a4 09/07/2026 + +* Bundle web-ui v3.1.0a4 +* Add jwt_refresh_token_expire_minutes to sample configuration +* Remove deleted web-ui files from git +* .dockerignore ignore .dockerignore +* typo made me reconsider and move out to env +* defaulted DOCKERHUB_ORG repository variable +* Remove API docs from 2.2 after merging +* Update GitHub Actions workflows +* Fix web-wireshark docker build broken by xpra 6.5 release +* Update CI to install [ai-features,dev] instead of [ai-copilot,dev] +* Make AI features (AI Copilot + MCP) optional via [ai-features] extra +* Add refresh token mechanism documentation under docs/features/ +* Add /refresh to allowed public endpoints list in route auth test +* Add stateless JWT refresh token mechanism +* Add project/node/link handler tests: 39 total, covering list/get/create/delete/start/stop/suspend/reload/console/update/fields +* Add MCP tool parameter consistency tests +* Fix appliance_install: add version parameter +* Add coordinate system note to docs +* Document canvas coordinate system in node_create x/y params +* Update docstring: batch concurrency from 10 to 100 +* Remove unused import time +* Add list type check before nodes[0] access in _normalize_link_nodes +* Add fields type validation in create handlers +* Use pop() instead of pop(0) for O(1) port removal +* Fix review issues: key_prefix length, count validation, WAL log, timeout comment, pointless temp var +* Fix: pass name from TemplateUsage to add_node_from_template +* Remove unused imports (logging, log, select) +* Add warning for unconsumed pre-allocated UDP ports after link creation +* Remove FIXME comment about middleware in server.py +* Rename device_command_run_handler → device_show_run_handler to match tool name +* Rename device_command_run → device_show_run for clarity +* Fix device_command_run KeyError('commands'): tool desc said show_commands but backend expects commands +* Fix template_list return type annotation to match _run_handler_sync envelope +* Add performance optimization documentation +* Update MCP service docs: API key format, auth flow, tool parameters, concurrency +* Increase HTTP connection pool to 500/1000 +* Increase BATCH_MAX_WORKERS and Pool concurrency from 20 to 100 +* Remove final timing artifact in projects.py +* Remove remaining dead timing variables and imports +* Remove database warmup (proven ineffective - real bottleneck was bcrypt blocking event loop) +* Clean up all timing/debug logs +* Add memory: import validation best practice +* Fix: add missing UUID imports +* Generate fresh JWT on API key auth instead of returning raw key +* Optimize API key auth: O(1) lookup via UUID-embedded key format +* Fix: offload bcrypt.checkpw to thread pool to prevent blocking event loop +* Add timing to API key auth path and log api_keys count +* Replace SELECT 1 warmup with full database file read to warm OS page cache +* Add timing logs to auth dependency chain to identify 6s pre-handler delay +* Add granular timing to get_template: separate execute vs fetch time +* Warm up database connection pool on startup to avoid 8s cold-start penalty on first API request +* Fix: register WAL PRAGMA on sync_engine instead of Engine class for async compat +* Add timing logs to get_template to identify DB query bottleneck +* Add timing middleware to log slow requests (>1s) with [CTRL-TIMING] prefix +* Fix: _time → time in compute.py timing log +* Add [CTRL-TIMING] logs to controller create_node flow +* Fix: pass template_id to batch mode handler so top-level template_id works as default +* Add detailed timing logs to MCP node creation and HTTP client +* Add fields filter to template_list tool with description for AI +* Fix: add missing _filter_link_response function +* Pass name parameter through to controller API when creating node from template +* Add validation to compact link format with clear error messages +* Add compact array format for link node entries to reduce token usage +* Add fields filter to link_create tool +* Reduce md5sum cache write failure log level from error to warning +* Add fields filter to node_create tool description for AI +* Optimize MCP create_node: support inherited template_id and default fields filter +* Increase MCP HTTP client timeout from 10s to 30s +* Enable SQLite WAL mode to fix 'database is locked' errors under concurrent API requests +* Cache IOU image default values per image path to avoid redundant subprocess calls +* Increase node and link creation concurrency from 5 to 20 +* Fix: revert IOU lock optimization, serialize IOU node creation for correct application_id assignment +* Performance: accelerate project opening with parallel link creation and batch UDP port allocation +* feat: Add batch link_ids to link_delete/link_reset, fields filter to link_list +* feat: Add fields filter to link_list +* feat: Add batch node_ids to node_delete +* fix: Convert http to ws scheme in node_console WebSocket URL +* feat: Add batch link_ids to link_capture_download +* feat: Add batch link_ids to link_capture_start/stop +* fix: Store username in gns3_ctx during auth, use for short-lived download JWTs +* fix: Generate independent short-lived JWT for pcap download +* revert: Remove _configs_map changes in tools_v2 (handled by template renderer now) +* fix: Merge commands for duplicate device_names in _configs_map +* fix: Actually pass template param to device_config/command handlers +* fix: Correct Jinja2 template commands_field per tool type +* feat: Jinja2 template support in device_command_run +* feat: Jinja2 template support in device_config_send +* feat: Add batch node_ids support to node_start/stop/reload/suspend +* feat: Add fields filter to appliance_list +* feat: Add fields filter to node_list +* feat: node_get fields filter — match controller Node schema fields +* fix: Set auto_close=False on project_create so projects stay open when clients disconnect +* feat: Add batch mode to node_create and link_create (parallel, max 10 workers) +* fix: Pass API key directly instead of generating short-lived JWT +* feat: API key lifecycle — revoke/restore/delete +* fix: Rename revoke_api_key → delete_api_key +* fix: Hard-delete API keys instead of soft delete (revoked flag) +* feat: Support API keys in REST API authentication (reuse gns3_ prefix keys) +* fix: Lazily access db engine for API key validation +* fix: Add missing updated_at column to api_keys table +* fix: Export ApiKeyCreate from schemas package +* feat: Add API Key support for MCP authentication +* fix: Validate JWT token exp claim — was silently ignored after migration to joserfc +* fix: Add image field to template_create, document type-specific params in description +* fix: Remove .json() calls on 204 responses for prune/install images +* fix: Skip always-running nodes in start_all/stop_all +* fix: Add missing rotation parameter to drawing_update MCP tool +* fix: Map MCP device_command_run parameter to tool's expected field name +* fix: Update link_reset description to match actual behavior (delete + recreate) +* fix: Remove unsupported description param from project_create +* fix: Fix symbol_get/upload/delete handlers for correct API paths +* feat: Log registered MCP tools at startup +* fix: Type compute_id as uuid.UUID to reject non-UUID values at MCP input layer +* fix: Require UUID for compute_get/images, remove 'local' string default +* feat: Add device configuration MCP tools (config_send, command_run, vpcs_config_set) +* refactor: unify MCP tool naming to _ convention +* feat: Add symbol upload/delete, project load, and locked check MCP tools +* feat: Add image management MCP tools +* feat: Add symbol and appliance MCP tools +* feat: Add node bulk ops, project lock, and server info MCP tools +* feat: Add snapshot and drawing MCP tools +* refactor: unify MCP handlers to use http_call directly, relocate node file ops to Node class +* feat: Add node file operations as MCP tools (list, get, write, delete) +* Add comment about rootful Docker permissions at container start +* Fix _fix_permissions test: set process.returncode=0 and update assertion +* Fix list_node_files PermissionError on os.scandir +* Fix _fix_permissions error handling and list_node_files PermissionError +* Add async_iterable_to_stream utility to avoid aiohttp compatibility issues +* Add descriptive detail to 403 errors in compute file endpoints +* Fix silent file write failure in write_compute_project_file +* feat: Node file streaming, recursive listing, file type detection, and file delete +* Update README tool descriptions: .txt → .md +* Update README tool descriptions to mention Markdown format +* Add MCP project tools: update, duplicate, and README operations + ## 3.1.0a3 06/06/2026 * Bundle web-ui v3.1.0a3 diff --git a/docs/README.md b/docs/README.md index 7b40b951c..bc2d414aa 100644 --- a/docs/README.md +++ b/docs/README.md @@ -72,6 +72,9 @@ Unified error response format across all GNS3 API endpoints. Documents HTTP stat ### Web Wireshark (`features/web-wireshark-business-process.md`) Web-based packet capture analysis using Docker + xpra HTML5 client. Zero-install Wireshark experience directly in the browser, integrated with GNS3 topologies. +### Marker (Traffic Insight) (`features/marker-traffic-insight.md`) +Real-time traffic insight via per-link BPF markers and project-level inherited definitions. A marker taps a link in uBridge, emitting match notifications and pcap capture on BPF hit; definitions fan out to every capable link automatically. + --- ## GNS3 AI Copilot (`gns3-copilot/`) diff --git a/docs/features/builtin-ethernet-switch-ubridge.md b/docs/features/builtin-ethernet-switch-ubridge.md new file mode 100644 index 000000000..14e8e46b2 --- /dev/null +++ b/docs/features/builtin-ethernet-switch-ubridge.md @@ -0,0 +1,262 @@ + + +> This documentation is AI-generated with reference to actual code and verified +> against real-kernel testing (Linux 7.1.2-1-default). AI can make mistakes — +> please verify against the source code when in doubt. + +# Builtin Ethernet Switch — uBridge brctl Backend + +## Overview + +The historical GNS3 Ethernet Switch was an emulated L2 device inside Dynamips +(`ethsw`). This implementation replaces it with a **real Linux kernel bridge** +driven through uBridge's `brctl` module — one bridge per switch node. The +migration makes the switch a first-class builtin node (no Dynamips dependency) +and enables native-kernel-speed L2 switching with VLAN filtering and QinQ. + +| | Old (Dynamips ethsw) | New (uBridge brctl) | +|---|---|---| +| Switching engine | Dynamips user-space emulation | Linux kernel bridge (netlink) | +| VLAN model | ethsw ACL per port | Kernel VLAN filtering + PVID/untagged | +| QinQ | 0x8100/0x88A8/0x9100/0x9200 | 0x8100 (802.1Q) / 0x88A8 (802.1ad) | +| Data path | Node NIO ↔ ethsw NIO (Dynamips) | Node NIO ↔ uBridge relay ↔ TAP ↔ kernel bridge | +| Console | Inactive (reserved TCP port) | None (console_type=none) | +| Node type | `dynamips`-routed | `builtin` (always-on) | + +## Architecture + +``` + ┌───────────┐ ┌──────────────┐ ┌───────────────┐ ┌───────────┐ + │ Peer A │ │ uBridge │ │ Kernel │ │ Peer B │ + │ (Dynamips │◄───►│ per-port │◄───►│ Bridge │◄───►│ (IOU / │ + │ / IOU / │ UDP │ relay │ TAP │ gns3{id[:6]}│ TAP │ QEMU / …) │ + │ QEMU) │ │ nio_tap↔udp │ │ vlan_filter │ │ │ + └───────────┘ └──────────────┘ └──────┬────────┘ └───────────┘ + │ + ┌─────┴─────┐ + │ ... more │ + │ ports │ + └───────────┘ +``` + +Each switch port is a **dual-role TAP** — uBridge holds the file descriptor as a +`nio_tap` relay endpoint, and the same TAP is enslaved to the kernel bridge via +`brctl addif`. This is the same pattern the Cloud node already uses for host +bridges (`cloud.py:_add_linux_ethernet`). uBridge is **only** the per-port UDP +transport; the kernel bridge performs the actual MAC learning, forwarding, and +VLAN filtering. + +### Component map + +| File | Role | +|------|------| +| `compute/builtin/nodes/ethernet_switch.py` | Node implementation | +| `api/routes/compute/ethernet_switch_nodes.py` | REST endpoints (repointed to Builtin) | +| `schemas/compute/ethernet_switch_nodes.py` | Request/response models (unchanged) | +| `controller/udp_link.py` | Link creation — pushes NIO to switch via standard adapter endpoint | + +## Lifecycle + +### `create()` → `start()` + +1. `_start_ubridge(require_privileged_access=True)` — launch uBridge instance +2. `_ensure_bridge()`: + - Derive deterministic bridge name: `gns3` + first 6 hex chars of `self.id` + - `brctl delete` (best-effort — crash recovery, cleans stale interfaces) + - `brctl create` + - `link set … up` (bridge is DOWN after create) + - `brctl vlanfiltering … on` + +### `add_nio(nio, port_number)` + +Per port, one uBridge relay bridge `{node_id}-{port}` is wired: + +``` +bridge create {node_id}-{port} +bridge add_nio_tap {node_id}-{port} "{tap}" ← uBridge holds TAP fd +brctl addif "{bridge}" "{tap}" ← enslave to kernel bridge +brctl vlan_del/vlan_add … ← apply port VLAN mode +bridge add_nio_udp {node_id}-{port} lport rhost rport +bridge reset_packet_filters {node_id}-{port} ← from _ubridge_apply_filters +bridge start {node_id}-{port} +``` + +Captures and marker signals are applied via the existing `_ubridge_apply_filters` +and `_ubridge_apply_markers` helpers from `BaseNode`. + +### `remove_nio(port_number)` + +``` +brctl delif "{bridge}" "{tap}" +bridge delete {node_id}-{port} +release_udp_port(nio.lport) +``` + +### `close()` + +``` +for each port: release UDP port +brctl delete "{self._bridge_name}" ← kernel bridge teardown +_stop_ubridge() ← destroys remaining TAPs +``` + +**Cleanup paths:** + +| Scenario | Bridge cleanup | TAP cleanup | +|----------|---------------|-------------| +| Normal project close | `close()` → `brctl delete` | uBridge stops → TAP fd closed → kernel destroys | +| gns3server crash / kill | Next `_ensure_bridge()` → `brctl delete` before `create` | uBridge dies → TAP fd closed by kernel | +| Manual project-file deletion after crash | Leaked (no GNS3 record of `gns3{id[:6]}`) | Leaked (same — but uBridge probably dead, TAPs gone with it) | + +## Port mode → VLAN translation + +All VLAN operations ride on the `brctl` hypervisor module (`../ubridge/doc/brctl.md`). +The kernel bridge must have `vlan_filtering on` before any `vlan_*` call. + +### access VLAN N + +``` +brctl vlan_del {br} {tap} 1 ← remove default PVID 1 +brctl vlan_add {br} {tap} N pvid untagged +``` + +### dot1q trunk (native VLAN V) + +A dot1q trunk in ESW is "admit all VLANs tagged, native VLAN PVID + untagged": +``` +brctl vlan_del {br} {tap} 1 +brctl vlan_add {br} {tap} 1 vid 4094 ← admit all VIDs tagged +brctl vlan_add {br} {tap} V pvid untagged ← override native +``` + +### qinq (outer VLAN O, ethertype 0x88A8) + +Bridge-level (once): +``` +brctl setvlanproto {br} 0x88a8 ← switch to 802.1ad (outer S-tag) +``` + +Port-level: +``` +brctl vlan_del {br} {tap} 1 +brctl vlan_add {br} {tap} O pvid untagged ← S-tag push for untagged ingress +``` + +Ethertype 0x8100 qinq ports are treated as plain access ports (the bridge +defaults to 0x8100; no `setvlanproto` needed). Ethertype 0x9100/0x9200 are +not supported by the kernel bridge — see § Limitations. + +### Runtime reconfiguration (`update_port_settings`) + +On `ports_mapping` update, existing port VLANs are reset before re-apply: +``` +brctl delif {br} {tap} ← release from bridge (clears VLAN state) +brctl addif {br} {tap} ← re-enslave (resets to default PVID 1) +brctl vlan_del/vlan_add … ← apply new mode +``` + +This prevents stale VLAN membership from a previous mode leaking into the new +configuration (e.g., access→trunk transition leaving old access VLAN behind). + +## Bridge naming + +Deterministic from the switch's UUID: `gns3` + first 6 hex chars (no dashes). + +``` +gns3a1b2c3 ← bridge (10 chars, ≤ 15 IFNAMSIZ limit) +gns3a1b2c3-0 ← tap for port 0 (12 chars) +gns3a1b2c3-1 ← tap for port 1 (12 chars) +``` + +- 6 hex = 48 bits of entropy — collision risk is astronomically low even with + thousands of switches on the same host. +- **Crash recovery**: `brctl delete` (best-effort, ignore if not found) then + `brctl create` — stale interfaces from a previous abnormal shutdown are + reclaimed automatically when the switch is re-created. + +## Controller integration + +No controller or API contract changes are required. The migration is entirely +compute-internal: + +- `node_types.BUILTIN_NODE_TYPES` already classified `ethernet_switch` as a + builtin, always-running node. +- `udp_link.create()` pushes the NIO to the switch via the standard + `POST /adapters/0/ports/{p}/nio` endpoint (same as Dynamips). +- The REST API paths, request/response schemas, and port model + (`EthernetSwitchPort`: type/vlan/ethertype) are unchanged. +- `/start`, `/stop`, `/suspend`, `/reload` return 405 (switch is always-on). + +The sole observable difference: the `console` field in the response is now +`null` (the switch has no console; `console_type="none"` makes `BaseNode` +skip TCP port reservation). The old Dynamips ethsw returned an unused TCP +port number. Both are valid under `Optional[int]`. + +## Known limitations + +### Default PVID 1 must be deleted explicitly + +A port freshly enslaved to a `vlan_filtering` bridge inherits default PVID 1 +(PVID + Egress Untagged). Access/trunk mode application must issue +`vlan_del … 1` first — `vlan_add … pvid` moves the PVID but does not remove +the old PVID's membership. This matches iproute2 semantics and is documented +in `../ubridge/doc/brctl.md#limitations`. + +### QinQ is outer-tag (S-VLAN) only + +With `setvlanproto 0x88a8` the bridge filters on the outer S-tag; the inner +C-tag passes through transparently. Selective QinQ (inner-VLAN classification +or remapping) requires `IFLA_BRIDGE_VLAN_TUNNEL_INFO` which is not implemented. +Documented in `../ubridge/doc/brctl.md#limitations`. + +### Ethertype 0x9100 / 0x9200 + +The GNS3 schema allows legacy QinQ ethertypes `0x9100` and `0x9200`, but the +Linux kernel bridge only supports `0x8100` (802.1Q) and `0x88a8` (802.1ad). +Configuring these on a qinq port produces a `NodeError` at creation/update +time. Handling policy (map to 0x88A8 + warn vs. reject with error) is +pending per design discussion. + +### No FDB read/write + +The `brctl` module exposes no `fdb_show`/`fdb_flush`. The kernel bridge +learns and ages MAC entries autonomously; uBridge has never exposed MAC-table +access and gns3-server does not consume it. Consumers that need the FDB +(e.g., a WebUI switch view) should read `/sys/class/net/
/brforward` or +`bridge fdb show dev
` directly, without uBridge involvement. + +## Troubleshooting + +### Docker iptables: FORWARD chain DROP + +Docker sets the iptables `FORWARD` chain default policy to `DROP` when the +Docker daemon starts. This blocks **all** forwarded traffic through kernel +bridges on the host, including `gns3*` bridges. + +**Symptoms**: nodes can send frames into the bridge (visible in `tcpdump -i +gns3*`) but never receive unicast replies. ARP and multicast may work +because they flood, but unicast forwarding silently fails. + +**Fix**: +```bash +sudo iptables -P FORWARD ACCEPT +``` + +### Bridge left DOWN after creation + +`brctl create` creates the bridge but leaves it administratively DOWN. +The node now sends `link set … up` after `brctl create`. If forwarding +is not working, verify: +```bash +ip -d link show gns3* | grep -E "state|vlan_filtering" +``` + +### Kernel version differences + +This implementation has been tested on Linux 7.1.2-1-default (x86_64) with +uBridge installed via `make install` (cap_net_admin,cap_net_raw=ep). The +ubridge `brctl` module has a 168-test suite covering kernel-side VLAN +behaviour on this kernel. diff --git a/docs/features/marker-traffic-insight.md b/docs/features/marker-traffic-insight.md new file mode 100644 index 000000000..b275c02b7 --- /dev/null +++ b/docs/features/marker-traffic-insight.md @@ -0,0 +1,378 @@ + + +> This documentation is organized by AI with reference to actual code. AI can make mistakes — please verify against the source code when in doubt. + +# Marker (Traffic Insight) + +## Overview + +A **marker** is a passive traffic-insight tap attached to a link. It runs a libpcap BPF +expression inside uBridge; on every match uBridge emits a real-time `MARK` signal and +appends the matching packet to a per-marker pcap file. Markers exist at two layers that +coexist on the same link: **per-link private markers** and **project-level definitions** +that are inherited by every capable link. + +## Architecture + +```mermaid +graph TB + UI["Web UI"] + + subgraph Controller["Controller"] + DEF["Project definitions
(inheritance templates)"] + LNK["Per-link markers"] + end + + Compute["Compute Node"] + UB["uBridge
mark filter"] + PCAP[("pcap file")] + LSTN["Marker listener
(UDP, per compute)"] + + UI -->|"REST + notifications ws"| Controller + DEF -.->|"fan-out: global-{name}"| LNK + LNK -->|"node.post /markers"| Compute + Compute --> UB + UB -->|"BPF match"| PCAP + UB -->|"UDP MARK signal"| LSTN + LSTN -->|"marker.match"| UI +``` + +Inheritance is a controller-only fan-out: a definition CRUD loops over links and reuses the +existing per-link marker operations, so the compute side sees an ordinary marker and is +unchanged. Each compute process runs one UDP listener serving every uBridge on that host; the +`node` and `link` fields in each signal together identify the source link (see +[Per-link attribution](#per-link-attribution)). + +## Business Process + +```mermaid +sequenceDiagram + participant UI as Web UI + participant C as Controller + participant L as Capable Link + participant N as Compute / uBridge + + UI->>C: POST /marker-definitions {name, bpf, ...} + C->>C: store definition + loop every capable link + C->>L: start_marker("global-{name}") + L->>N: install mark filter (BPF + pcap) + end + C-->>UI: 201 + link_ids + + Note over N: later: a packet matches the BPF + N->>N: emit MARK signal + append pcap + N-->>UI: marker.match notification (per-project ws) +``` + +Updating a definition syncs `bpf / tag / color / highlight_duration` to every inherited +copy; deleting a definition removes every inherited copy. A newly created link inherits all +existing definitions automatically. + +## Per-link attribution + +A uBridge `MARK` signal carries `node`, `filter`, `link`, `tag`, and `len` — but no bridge +name. When one node is the capture side for several links — the common case for a project-level +`global-{name}` marker on a multi-interface router — `node` + `filter` alone are identical +across those links, so they cannot tell the signals (or pcap files) apart. The `link` field +resolves this: + +1. At install time the controller stamps each filter with its link id + (`mark [tag ] link [pcap ]`). +2. uBridge treats `link` as opaque and echoes it verbatim in the signal (`link=`). +3. The listener takes the signal's `link=` as the **authoritative** `link_id` of the + `marker.match` event, falling back to its registry only for legacy signals that carry no + `link=`. + +This is also why the pcap path is keyed on link — +`/markers/__.pcap`, not on `bridge`+`filter`: a single +uBridge bridge can serve several links, and only the link id keeps their captures distinct. + +### IOU: one bridge, many interfaces + +IOU runs a single `IOL-BRIDGE` per node shared by every interface, so `bridge`+`filter` are +identical across that node's links. uBridge keeps a separate filter list **per port +(bay/unit)** within the bridge, so each interface gets its own `global-{name}` filter, its own +pcap file, and its own `link=`. The shared bridge name is irrelevant to attribution. Other +capable node types (`qemu`, `docker`, `vpcs`, `cloud`) already use one bridge per link; `link` +applies uniformly to all of them. + +## Direction + +A `MARK` signal optionally carries `dir=` — the matched packet's travel direction +**relative to the capture node** (the `node=` in the same signal, i.e. the node whose +uBridge hosts the marker): + +| `dir` | Ingress NIO | Meaning | +|-------|-------------|---------| +| `tx` | device side (`source_nio` on a generic bridge; the IOL instance on an IOU `IOL-BRIDGE`) | capture node is **sending** | +| `rx` | link side (`destination_nio` on a generic bridge; the NIO side on an IOU `IOL-BRIDGE`) | capture node is **receiving** | + +A marker is single-sided: only the chosen capture node's uBridge installs the `mark` filter, +yet both directions of the link transit that one bridge (it carries exactly two NIOs — the +device side and the link side), so that single uBridge observes and classifies both +directions. The `marker.match` event forwards `dir` through unchanged; the Web UI combines it +with the link's two endpoints and the capture `node_id` to draw an arrow: + +- `dir=tx` → `capture_node → far_node` +- `dir=rx` → `far_node → capture_node` +- `dir` absent (older uBridge) → undirected highlight (current behaviour) + +Because the listener ignores unknown keys, `dir` is **additive**: an older server silently +drops it and an older uBridge simply omits it — either way the system falls back to +undirected rendering with no error. + +### Choosing the capture node + +Since `dir` is relative to the capture node, *which* endpoint is the observer decides what +`tx`/`rx` mean. By default the server auto-picks (first started marker-capable endpoint, in +link-endpoint order). To pin it — e.g. so `dir=tx` unambiguously means "vpcs1 is sending" — +pass `capture_node_id` on marker **create**: + +```json +{ "bpf": "icmp", "direction": "tx", "capture_node_id": "" } +``` + +The value must be one of the link's two endpoints and a marker-capable type (`vpcs`, `qemu`, +`docker`, `iou`, `dynamips`, `cloud`); any other id is rejected with `409`. Omit it to keep +the auto-pick. The chosen id is echoed back as `capture_node_id` in the marker entry and in +each `MARK` signal's `node=`, so the Web UI always knows the observer regardless of who +picked it. + +`capture_node_id` is **create-only**: it is fixed once the marker exists (changing the +observer would silently flip the meaning of stored `direction`, so recreate the marker +instead). It is not accepted on project-level definitions — a definition is link-agnostic and +has no endpoints to choose from, so inherited markers always auto-pick per link. + +For the same reason, a definition **rejects `direction: tx|rx`** (HTTP 409): each inherited +copy auto-picks its capture node, so a fixed tx/rx would denote different session directions +on different links. A definition is `both` only; encode the direction you want in the BPF +instead — e.g. `icmp and icmp[icmptype]==8` for echo requests, a packet-intrinsic property +that is consistent on every link regardless of capture node. tx/rx remains available on +per-link markers, where the capture node is fixed. + +## Pause & resume + +Two levels of silencing, both instant (no NIO rebuild, no pcap flush): + +- **Per-marker (private)** — `PUT /v3/projects/{pid}/links/{lid}/markers/{name}` + with `{"enabled": false}` flips that one filter off in place (uBridge + `enable_packet_filter … off`): no signal, no pcap, but traffic still relays — + a paused `mark` is a no-op tap, not a drop. `{"enabled": true}` flips it back. + A change to `enabled` alone is a single command (the pcap identity and emitted + counter are preserved). Changing `bpf`, `tag`, or `direction` rebuilds just that + one filter (`delete_packet_filter` + add) — only that marker's own pcap reopens + (a new capture session for the new BPF); changing `color`/`highlight_duration` + is UI-only, nothing is pushed to uBridge. +- **Per-definition (inherited)** — `POST /v3/projects/{pid}/marker-definitions/{name}/pause` + and `/resume` toggle **every** inherited `global-{name}` copy across all links + at once (same `enable_packet_filter on|off`, fanned out per copy). Use to + pause or resume a whole rule independently of the others. The definition's + `paused` flag is persisted to the `.gns3` and echoed on the definition object, + so links created later inherit it already paused, and the Web UI renders the + per-rule button from server truth. + +| Action | signal | pcap | sink | +|--------|--------|------|------| +| per-marker `enabled: false` | stop | stop | n/a | +| per-def `pause` (all `global-{name}` copies) | stop | stop | n/a | +| per-def `resume` | resume | resume | n/a | + +## Capture files + +Each marker appends matches to `/project-files/markers/__.pcap`. +Removing a marker — per-link `DELETE .../markers/{name}` or deleting a definition (which +removes every inherited copy) — deletes that marker's pcap too, even with the capture node +stopped (the filter is removed with `delete_packet_filter`, the file is unlinked). uBridge's +`reset_packet_filters` (run on NIO/filter changes) preserves mark filters, so unrelated +changes no longer close/reopen any marker's pcap. + +## API Endpoints + +All endpoints require a JWT bearer token (`POST /v3/access/users/authenticate`). The +`Auth` column lists the required privilege. + +### Per-link markers + +| Method | Path | Description | Auth | +|--------|------|-------------|------| +| GET | `/v3/projects/{pid}/links/{lid}/markers` | List markers on a link | Link.Audit | +| POST | `/v3/projects/{pid}/links/{lid}/markers` | Attach a marker | Link.Modify | +| PUT | `/v3/projects/{pid}/links/{lid}/markers/{name}` | Update a marker | Link.Modify | +| DELETE | `/v3/projects/{pid}/links/{lid}/markers/{name}` | Remove a marker | Link.Modify | + +### Project-level definitions + +| Method | Path | Description | Auth | +|--------|------|-------------|------| +| GET | `/v3/projects/{pid}/marker-definitions` | List definitions + bound `link_ids` | Project.Audit | +| POST | `/v3/projects/{pid}/marker-definitions` | Create definition (fans out to every link) | Project.Modify | +| PUT | `/v3/projects/{pid}/marker-definitions/{name}` | Update definition (syncs all copies) | Project.Modify | +| DELETE | `/v3/projects/{pid}/marker-definitions/{name}` | Delete definition (clears all copies) | Project.Modify | +| POST | `/v3/projects/{pid}/marker-definitions/{name}/pause` | Pause every inherited copy (instant, persisted) | Project.Modify | +| POST | `/v3/projects/{pid}/marker-definitions/{name}/resume` | Resume every inherited copy | Project.Modify | + +### Aggregation + +| Method | Path | Description | Auth | +|--------|------|-------------|------| +| GET | `/v3/projects/{pid}/markers` | All markers across links, flat | Project.Audit | + +The link object returned by `GET /v3/projects/{pid}/links[/{lid}]` also carries a `markers` +field (including inherited markers), so the Web UI can render a link's markers without an +extra request. + +## Request / Response + +**Marker create body** (`MarkerCreate`, shared by per-link POST and PUT): + +```json +{ + "name": "icmp", + "bpf": "icmp", + "tag": 1, + "direction": "tx", + "capture_node_id": "a37e2235-e21f-46c9-a2ab-ba0f8c5465e6", + "color": "#ff5722", + "highlight_duration": 800, + "enabled": true +} +``` + +`direction` and `capture_node_id` are both optional and create-only (see +[Direction](#direction)). + +**Definition create body** (`MarkerDefinitionCreate`, shared by POST and PUT): + +```json +{ + "name": "arp", + "bpf": "arp", + "tag": 5, + "color": "#ff5722", + "highlight_duration": 1200 +} +``` + +**Marker entry** (returned by GET/POST/PUT, and the value of each link's `markers[name]`): + +```json +{ + "bpf": "icmp", + "tag": 1, + "enabled": true, + "color": "#ff5722", + "highlight_duration": 800, + "capture_node_id": "a37e2235-e21f-46c9-a2ab-ba0f8c5465e6", + "inherited_from": null +} +``` + +**Definition GET response** (adds `link_ids`): + +```json +{ + "arp": { + "bpf": "arp", + "tag": 5, + "color": null, + "highlight_duration": 1200, + "direction": null, + "paused": false, + "link_ids": ["656ed826-...", "6bd9d156-..."] + } +} +``` + +## Field Reference + +### Marker entry + +| Field | Type | Description | +|-------|------|-------------| +| `bpf` | string | libpcap BPF expression (required) | +| `tag` | int \| null | Correlation id echoed in `MARK` signals | +| `enabled` | bool | Whether the marker is active. Toggle is instant: `false` flips the uBridge filter off in place (no signal/pcap), `true` back on — no NIO rebuild (see [Pause & resume](#pause--resume)) | +| `color` | string \| null | Hex color render hint, e.g. `#ff5722` | +| `highlight_duration` | int \| null | UI highlight duration in ms after a match; `null` = UI default | +| `direction` | string \| null | `tx` / `rx` filter relative to the capture node; `null` = both | +| `capture_node_id` | string | Node whose uBridge hosts the marker — caller-set on create, else auto-picked | +| `inherited_from` | string | Source definition name — present on inherited markers only | + +### Definition + +| Field | Type | Description | +|-------|------|-------------| +| `bpf` | string | libpcap BPF expression (required) | +| `tag` | int \| null | Correlation id | +| `color` | string \| null | Hex color render hint | +| `highlight_duration` | int \| null | UI highlight duration in ms; `null` = UI default | +| `direction` | string \| null | `tx` / `rx` filter relative to the capture node; `null` = both | +| `paused` | bool | Per-definition mute flag — `true` mutes every inherited copy (persisted) | +| `link_ids` | string[] | Links currently carrying an inherited copy (GET only) | + +### Notifications + +| Event | Payload | Delivered to | +|-------|---------|--------------| +| `link.updated` | Link object (its `markers` field is the source of truth) | Project notification ws | +| `marker.match` | `project_id`, `node_id`, `link_id`, `filter`, `tag`, `ts`, `len`, `dir` | Project notification ws only | + +The `marker.match` `link_id` is taken from the signal's `link=` field (authoritative); see +[Per-link attribution](#per-link-attribution). The `dir` field is the matched packet's travel +direction relative to the capture node; see [Direction](#direction). + +## Error Responses + +| Status | Description | +|--------|-------------| +| 401 | Not authenticated | +| 404 | Link / marker / definition not found | +| 409 | Per-link edit or delete of an inherited marker; reserved (`global`) name or duplicate name on create | +| 422 | Validation failure (name format, `highlight_duration < 1`, missing `bpf`) | + +## Notes + +- **Marker name is immutable.** It is the identifier across the controller, the uBridge + filter, the pcap filename, and `MARK` signal routing — so rename is a delete + recreate, + not a field update. PUT ignores the body `name`; the `{name}` path parameter identifies + the target, and only `bpf / tag / color / enabled / highlight_duration` are changeable. + Names are 1–32 chars (`[A-Za-z0-9][A-Za-z0-9_.-]*`); inherited copies carry a `global-` + prefix, so their filter names reach ~39. +- **`global` prefix reserved.** User-chosen names may not start with `global`; inherited + markers are stored as `global-{definition_name}` so the two namespaces cannot collide. + Omitting `name` on create yields an auto-generated, prefix-free name. +- **Inherited markers are read-only per-link.** PUT/DELETE on an inherited marker returns + 409 — edit them through the definitions API. +- **Render hints are not enforced.** `color` and `highlight_duration` (milliseconds, `>= 1`) + are stored on the link and never sent to uBridge; `null` lets the UI apply its own + default. A partial PUT (e.g. changing only `bpf`) leaves them untouched. +- **BPF is validated once per source.** A private per-link marker validates its BPF inline + on create/update. A definition validates its BPF once at create/update (and once per + definition on project load, dropping any whose BPF has gone invalid); the inherited + fan-out to every link then skips re-validation, so creating a definition over *N* links + runs one `tcpdump -d` rather than *N*. (uBridge still runs `pcap_compile` itself at + install time, so an invalid expression can never slip through.) +- **Supported node types.** A marker needs a uBridge bridge: `vpcs`, `qemu`, `docker`, + `iou`, `dynamips`, `cloud` (one capable endpoint suffices). Types without a uBridge are + silently skipped by the inheritance fan-out. IOU uses one shared `IOL-BRIDGE` per node but + keeps filters, pcap files, and `link=` ids per port, so multi-interface nodes are handled + (see [Per-link attribution](#per-link-attribution)). +- **Shared capture-side node.** When one node hosts markers for several links (typical for + `global-*` definitions on a router), each filter is stamped with its `link_id` so signals + and pcap files stay link-distinct; the controller never collapses them to a single link. +- **Persistence.** Definitions and private markers persist in the topology; inherited + markers are re-created from definitions on project load, so reopening a project restores + the same configuration and stale inherited copies cannot survive on disk. +- **Log interpretation across node types.** Each node type logs its startup and link + operations differently — do not mistake sparse logs from one type for inactivity. + QEMU prints `set_link gns3- on` via its QEMU monitor, which is the most visible + startup log among all types. VPCS, Docker, IOU, Dynamips, and Cloud each have their own + startup paths (fork + ubridge, container veth, iouyap, Dynamips hypervisor, and TAP + device respectively) and none of them emit QEMU-monitor-style logs. To verify marker + operations (toggle, pause, resume) on non-QEMU types, either inspect uBridge's + own log for `enable_packet_filter` / `marker pause` / `marker resume` commands, or + watch the gns3server log for the corresponding compute-route calls at INFO level. diff --git a/docs/features/mcp-service.md b/docs/features/mcp-service.md index ccd02b61c..422b9ca42 100644 --- a/docs/features/mcp-service.md +++ b/docs/features/mcp-service.md @@ -127,7 +127,6 @@ All subsequent tool handler REST API calls use this JWT → zero extra bcrypt | `node_update` | Update node properties | | `node_start` | Start node(s) — `node_id` or `node_ids` array | | `node_stop` | Stop node(s) — `node_id` or `node_ids` array | -| `node_reload` | Reload node(s) — `node_id` or `node_ids` array | | `node_suspend` | Suspend node(s) — `node_id` or `node_ids` array | | `node_console` | Get WebSocket console URL | | `node_file_list` | List files in node directory | @@ -137,7 +136,6 @@ All subsequent tool handler REST API calls use this JWT → zero extra bcrypt | `node_start_all` | Start all nodes | | `node_stop_all` | Stop all nodes | | `node_suspend_all` | Suspend all nodes | -| `node_reload_all` | Reload all nodes | | `node_duplicate` | Duplicate a node | | `node_isolate` | Isolate a node (suspend links) | | `node_unisolate` | Un-isolate a node (resume links) | @@ -288,7 +286,8 @@ device_show_run(project_id, device_configs=[ config = node_file_get(project_id, node_id, "startup-config.cfg") # Restore if config breaks node_file_write(project_id, node_id, "startup-config.cfg", config) -node_reload(project_id, node_id) +node_stop(project_id, node_id) +node_start(project_id, node_id) ``` ### Device Config Workflow diff --git a/gns3server/api/routes/compute/cloud_nodes.py b/gns3server/api/routes/compute/cloud_nodes.py index 8453ba0d8..a5f2bb6a9 100644 --- a/gns3server/api/routes/compute/cloud_nodes.py +++ b/gns3server/api/routes/compute/cloud_nodes.py @@ -184,6 +184,8 @@ async def update_cloud_nio( nio.filters.clear() if nio_data.filters: nio.filters = nio_data.filters + # NIO type is a Union (Ethernet/TAP/UDP); only UDPNIO carries markers. + nio.markers = getattr(nio_data, "markers", None) or {} await node.update_nio(port_number, nio) return nio.asdict() @@ -253,3 +255,83 @@ async def stream_pcap_file( nio = node.get_nio(port_number) stream = Builtin.instance().stream_pcap_file(nio, node.project.id) return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap") + + +@router.put( + "/{node_id}/markers/{marker_name}" +) +async def toggle_cloud_marker( + marker_name: str, + toggle_data: schemas.MarkerToggle, + node: Cloud = Depends(dep_node) +) -> dict: + """ + Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2). + """ + + if not any(n == marker_name for (n, lid) in node._marker_filter_bridges): + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail=f"Marker '{marker_name}' is not installed on this node", + ) + await node._ubridge_set_marker_filter_state(marker_name, toggle_data.enabled) + return {"marker_name": marker_name, "enabled": toggle_data.enabled} + + +@router.post( + "/{node_id}/markers/pause", + status_code=status.HTTP_204_NO_CONTENT +) +async def pause_cloud_markers(node: Cloud = Depends(dep_node)) -> None: + + await node._ubridge_marker_pause() + + +@router.post( + "/{node_id}/markers/resume", + status_code=status.HTTP_204_NO_CONTENT +) +async def resume_cloud_markers(node: Cloud = Depends(dep_node)) -> None: + + await node._ubridge_marker_resume() + + +@router.delete( + "/{node_id}/adapters/{adapter_number}/ports/{port_number}/markers/{marker_name}", + status_code=status.HTTP_204_NO_CONTENT +) +async def delete_cloud_marker_capture( + *, + marker_name: str, + adapter_number: int = Path(..., ge=0, le=0), + port_number: int, + link_id: str = "", + node: Cloud = Depends(dep_node) +) -> None: + """ + Delete a marker's capture pcap (called by the controller when the marker is + removed) so the file is cleaned up even with the node stopped. Also drops + the marker from the port NIO's cached spec so a node restart won't reinstall + it (and recreate an empty pcap). + """ + + nio = node.get_nio(port_number) + await node.delete_marker_capture(marker_name, link_id, nio) + + +@router.put("/{node_id}/markers/{marker_name}/rebuild") +async def rebuild_cloud_marker( + marker_name: str, + rebuild_data: schemas.MarkerRebuild, + node: Cloud = Depends(dep_node) +) -> dict: + """ + Re-install a single marker filter with new BPF/tag/direction (delete + add, + no bridge reset) so sibling markers' pcaps stay open. + """ + + await node.rebuild_marker_filter( + marker_name, rebuild_data.link_id, rebuild_data.bpf, + rebuild_data.tag, rebuild_data.direction, rebuild_data.enabled, + ) + return {"marker_name": marker_name} diff --git a/gns3server/api/routes/compute/docker_nodes.py b/gns3server/api/routes/compute/docker_nodes.py index 3e30628a2..86ff4d84d 100644 --- a/gns3server/api/routes/compute/docker_nodes.py +++ b/gns3server/api/routes/compute/docker_nodes.py @@ -20,7 +20,7 @@ API routes for Docker nodes. import os -from fastapi import APIRouter, WebSocket, Depends, Body, status +from fastapi import APIRouter, WebSocket, Depends, Body, status, HTTPException from fastapi.encoders import jsonable_encoder from fastapi.responses import StreamingResponse from uuid import UUID @@ -29,7 +29,6 @@ from typing import Union from gns3server import schemas from gns3server.compute.docker import Docker from gns3server.compute.docker.docker_vm import DockerVM - from .dependencies.authentication import compute_authentication, ws_compute_authentication responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or Docker node"}} @@ -293,6 +292,7 @@ async def update_docker_node_nio( nio.filters.clear() if nio_data.filters: nio.filters = nio_data.filters + nio.markers = nio_data.markers or {} await node.adapter_update_nio_binding(adapter_number, nio) return nio.asdict() @@ -408,3 +408,89 @@ async def vnc_console_ws( async def reset_console(node: DockerVM = Depends(dep_node)) -> None: await node.reset_console() + + +@router.put( + "/{node_id}/markers/{marker_name}", + dependencies=[Depends(compute_authentication)] +) +async def toggle_docker_marker( + marker_name: str, + toggle_data: schemas.MarkerToggle, + node: DockerVM = Depends(dep_node) +) -> dict: + """ + Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2). + """ + + if not any(n == marker_name for (n, lid) in node._marker_filter_bridges): + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail=f"Marker '{marker_name}' is not installed on this node", + ) + await node._ubridge_set_marker_filter_state(marker_name, toggle_data.enabled) + return {"marker_name": marker_name, "enabled": toggle_data.enabled} + + +@router.post( + "/{node_id}/markers/pause", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def pause_docker_markers(node: DockerVM = Depends(dep_node)) -> None: + + await node._ubridge_marker_pause() + + +@router.post( + "/{node_id}/markers/resume", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def resume_docker_markers(node: DockerVM = Depends(dep_node)) -> None: + + await node._ubridge_marker_resume() + + +@router.delete( + "/{node_id}/adapters/{adapter_number}/ports/{port_number}/markers/{marker_name}", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def delete_docker_marker_capture( + marker_name: str, + adapter_number: int, + port_number: int, + link_id: str = "", + node: DockerVM = Depends(dep_node) +) -> None: + """ + Delete a marker's capture pcap (called by the controller when the marker is + removed) so the file is cleaned up even with the node stopped. Also drops + the marker from the port NIO's cached spec so a node restart won't reinstall + it (and recreate an empty pcap). + """ + + nio = node.get_nio(adapter_number) + await node.delete_marker_capture(marker_name, link_id, nio) + + +@router.put( + "/{node_id}/markers/{marker_name}/rebuild", + dependencies=[Depends(compute_authentication)] +) +async def rebuild_docker_marker( + marker_name: str, + rebuild_data: schemas.MarkerRebuild, + node: DockerVM = Depends(dep_node) +) -> dict: + """ + Re-install a single marker filter with new BPF/tag/direction (delete + add, + no bridge reset) so sibling markers' pcaps stay open. + """ + + await node.rebuild_marker_filter( + marker_name, rebuild_data.link_id, rebuild_data.bpf, + rebuild_data.tag, rebuild_data.direction, rebuild_data.enabled, + ) + return {"marker_name": marker_name} diff --git a/gns3server/api/routes/compute/dynamips_nodes.py b/gns3server/api/routes/compute/dynamips_nodes.py index 08eebb0d7..744dfa3ba 100644 --- a/gns3server/api/routes/compute/dynamips_nodes.py +++ b/gns3server/api/routes/compute/dynamips_nodes.py @@ -20,7 +20,7 @@ API routes for Dynamips nodes. import os -from fastapi import APIRouter, WebSocket, Body, Depends, status +from fastapi import APIRouter, WebSocket, Body, Depends, status, HTTPException from fastapi.encoders import jsonable_encoder from fastapi.responses import StreamingResponse from typing import List, Union @@ -235,6 +235,7 @@ async def update_nio( nio.filters.clear() if nio_data.filters: nio.filters = nio_data.filters + nio.markers = nio_data.markers or {} await node.slot_update_nio_binding(adapter_number, port_number, nio) return nio.asdict() @@ -366,3 +367,89 @@ async def console_ws( async def reset_console(node: Router = Depends(dep_node)) -> None: await node.reset_console() + + +@router.put( + "/{node_id}/markers/{marker_name}", + dependencies=[Depends(compute_authentication)] +) +async def toggle_dynamips_marker( + marker_name: str, + toggle_data: schemas.MarkerToggle, + node: Router = Depends(dep_node) +) -> dict: + """ + Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2). + """ + + if not any(n == marker_name for (n, lid) in node._marker_filter_bridges): + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail=f"Marker '{marker_name}' is not installed on this node", + ) + await node._ubridge_set_marker_filter_state(marker_name, toggle_data.enabled) + return {"marker_name": marker_name, "enabled": toggle_data.enabled} + + +@router.post( + "/{node_id}/markers/pause", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def pause_dynamips_markers(node: Router = Depends(dep_node)) -> None: + + await node._ubridge_marker_pause() + + +@router.post( + "/{node_id}/markers/resume", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def resume_dynamips_markers(node: Router = Depends(dep_node)) -> None: + + await node._ubridge_marker_resume() + + +@router.delete( + "/{node_id}/adapters/{adapter_number}/ports/{port_number}/markers/{marker_name}", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def delete_dynamips_marker_capture( + marker_name: str, + adapter_number: int, + port_number: int, + link_id: str = "", + node: Router = Depends(dep_node) +) -> None: + """ + Delete a marker's capture pcap (called by the controller when the marker is + removed) so the file is cleaned up even with the node stopped. Also drops + the marker from the port NIO's cached spec so a node restart won't reinstall + it (and recreate an empty pcap). + """ + + nio = node.get_nio(adapter_number, port_number) + await node.delete_marker_capture(marker_name, link_id, nio) + + +@router.put( + "/{node_id}/markers/{marker_name}/rebuild", + dependencies=[Depends(compute_authentication)] +) +async def rebuild_dynamips_marker( + marker_name: str, + rebuild_data: schemas.MarkerRebuild, + node: Router = Depends(dep_node) +) -> dict: + """ + Re-install a single marker filter with new BPF/tag/direction (delete + add, + no bridge reset) so sibling markers' pcaps stay open. + """ + + await node.rebuild_marker_filter( + marker_name, rebuild_data.link_id, rebuild_data.bpf, + rebuild_data.tag, rebuild_data.direction, rebuild_data.enabled, + ) + return {"marker_name": marker_name} diff --git a/gns3server/api/routes/compute/ethernet_switch_nodes.py b/gns3server/api/routes/compute/ethernet_switch_nodes.py index a8f755047..eaff681cb 100644 --- a/gns3server/api/routes/compute/ethernet_switch_nodes.py +++ b/gns3server/api/routes/compute/ethernet_switch_nodes.py @@ -16,6 +16,10 @@ """ API routes for Ethernet switch nodes. + +The Ethernet switch is a builtin node backed by a Linux kernel bridge driven +through uBridge's ``brctl`` module (see +``gns3server.compute.builtin.nodes.ethernet_switch``). """ import os @@ -25,8 +29,8 @@ from fastapi.encoders import jsonable_encoder from fastapi.responses import StreamingResponse from uuid import UUID -from gns3server.compute.dynamips import Dynamips -from gns3server.compute.dynamips.nodes.ethernet_switch import EthernetSwitch +from gns3server.compute.builtin import Builtin +from gns3server.compute.builtin.nodes.ethernet_switch import EthernetSwitch from gns3server import schemas responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or Ethernet switch node"}} @@ -39,8 +43,8 @@ def dep_node(project_id: UUID, node_id: UUID) -> EthernetSwitch: Dependency to retrieve a node. """ - dynamips_manager = Dynamips.instance() - node = dynamips_manager.get_node(str(node_id), project_id=str(project_id)) + builtin_manager = Builtin.instance() + node = builtin_manager.get_node(str(node_id), project_id=str(project_id)) return node @@ -55,10 +59,9 @@ async def create_ethernet_switch(project_id: UUID, node_data: schemas.EthernetSw Create a new Ethernet switch. """ - # Use the Dynamips Ethernet switch to simulate this node - dynamips_manager = Dynamips.instance() + builtin_manager = Builtin.instance() node_data = jsonable_encoder(node_data, exclude_unset=True) - node = await dynamips_manager.create_node( + node = await builtin_manager.create_node( node_data.pop("name"), str(project_id), node_data.get("node_id"), @@ -67,7 +70,7 @@ async def create_ethernet_switch(project_id: UUID, node_data: schemas.EthernetSw node_type="ethernet_switch", ports=node_data.get("ports_mapping"), ) - + node.usage = node_data.get("usage", "") return node.asdict() @@ -86,7 +89,7 @@ async def duplicate_ethernet_switch( Duplicate an Ethernet switch. """ - new_node = await Dynamips.instance().duplicate_node(node.id, str(destination_node_id)) + new_node = await Builtin.instance().duplicate_node(node.id, str(destination_node_id)) return new_node.asdict() @@ -101,7 +104,9 @@ async def update_ethernet_switch( node_data = jsonable_encoder(node_data, exclude_unset=True) if "name" in node_data and node.name != node_data["name"]: - await node.set_name(node_data["name"]) + node.name = node_data["name"] + if "usage" in node_data: + node.usage = node_data["usage"] if "ports_mapping" in node_data: node.ports_mapping = node_data["ports_mapping"] await node.update_port_settings() @@ -117,7 +122,7 @@ async def delete_ethernet_switch(node: EthernetSwitch = Depends(dep_node)) -> No Delete an Ethernet switch. """ - await Dynamips.instance().delete_node(node.id) + await Builtin.instance().delete_node(node.id) @router.post("/{node_id}/start", status_code=status.HTTP_204_NO_CONTENT) @@ -182,7 +187,7 @@ async def create_ethernet_switch_nio( node: EthernetSwitch = Depends(dep_node) ) -> schemas.UDPNIO: - nio = await Dynamips.instance().create_nio(node, jsonable_encoder(nio_data, exclude_unset=True)) + nio = Builtin.instance().create_nio(jsonable_encoder(nio_data, exclude_unset=True)) await node.add_nio(nio, port_number) return nio.asdict() @@ -199,8 +204,7 @@ async def delete_ethernet_switch_nio( The adapter number on the switch is always 0. """ - nio = await node.remove_nio(port_number) - await nio.delete() + await node.remove_nio(port_number) @router.post("/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/start") @@ -251,5 +255,5 @@ async def stream_pcap_file( """ nio = node.get_nio(port_number) - stream = Dynamips.instance().stream_pcap_file(nio, node.project.id) + stream = Builtin.instance().stream_pcap_file(nio, node.project.id) return StreamingResponse(stream, media_type="application/vnd.tcpdump.pcap") diff --git a/gns3server/api/routes/compute/images.py b/gns3server/api/routes/compute/images.py index 3c3293934..2bde73906 100644 --- a/gns3server/api/routes/compute/images.py +++ b/gns3server/api/routes/compute/images.py @@ -21,7 +21,7 @@ API routes for images. import os import urllib.parse -from fastapi import APIRouter, Request, status, Response, HTTPException +from fastapi import APIRouter, Body, Request, status, Response, HTTPException from fastapi.responses import FileResponse from typing import List @@ -43,6 +43,16 @@ async def get_docker_images() -> List[dict]: return await docker_manager.list_images() +@router.post("/docker/images/pull", status_code=status.HTTP_204_NO_CONTENT) +async def pull_docker_image(image: str = Body(..., embed=True, min_length=1, pattern=r"^\S+$")) -> None: + """ + Pull or update a Docker image. + """ + + docker_manager = Docker.instance() + await docker_manager.pull_image(image, force=True) + + @router.get("/dynamips/images") async def get_dynamips_images() -> List[dict]: """ diff --git a/gns3server/api/routes/compute/iou_nodes.py b/gns3server/api/routes/compute/iou_nodes.py index 5be4fdd23..b826b21d9 100644 --- a/gns3server/api/routes/compute/iou_nodes.py +++ b/gns3server/api/routes/compute/iou_nodes.py @@ -254,6 +254,8 @@ async def update_iou_node_nio( nio.filters.clear() if nio_data.filters: nio.filters = nio_data.filters + # NIO type is a Union (Ethernet/TAP/UDP); only UDPNIO carries markers. + nio.markers = getattr(nio_data, "markers", None) or {} await node.adapter_update_nio_binding(adapter_number, port_number, nio) return nio.asdict() @@ -286,7 +288,7 @@ async def start_iou_node_capture( """ pcap_file_path = os.path.join(node.project.capture_working_directory(), node_capture_data.capture_file_name) - await node.start_capture(adapter_number, port_number, pcap_file_path) + await node.start_capture(adapter_number, port_number, pcap_file_path, node_capture_data.data_link_type) return {"pcap_file_path": str(pcap_file_path)} @@ -344,3 +346,89 @@ async def console_ws( async def reset_console(node: IOUVM = Depends(dep_node)) -> None: await node.reset_console() + + +@router.put( + "/{node_id}/markers/{marker_name}", + dependencies=[Depends(compute_authentication)] +) +async def toggle_iou_marker( + marker_name: str, + toggle_data: schemas.MarkerToggle, + node: IOUVM = Depends(dep_node) +) -> dict: + """ + Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2). + """ + + if not any(n == marker_name for (n, lid) in node._marker_filter_bridges): + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail=f"Marker '{marker_name}' is not installed on this node", + ) + await node._ubridge_set_marker_filter_state(marker_name, toggle_data.enabled) + return {"marker_name": marker_name, "enabled": toggle_data.enabled} + + +@router.post( + "/{node_id}/markers/pause", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def pause_iou_markers(node: IOUVM = Depends(dep_node)) -> None: + + await node._ubridge_marker_pause() + + +@router.post( + "/{node_id}/markers/resume", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def resume_iou_markers(node: IOUVM = Depends(dep_node)) -> None: + + await node._ubridge_marker_resume() + + +@router.delete( + "/{node_id}/adapters/{adapter_number}/ports/{port_number}/markers/{marker_name}", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def delete_iou_marker_capture( + marker_name: str, + adapter_number: int, + port_number: int, + link_id: str = "", + node: IOUVM = Depends(dep_node) +) -> None: + """ + Delete a marker's capture pcap (called by the controller when the marker is + removed) so the file is cleaned up even with the node stopped. Also drops + the marker from the port NIO's cached spec so a node restart won't reinstall + it (and recreate an empty pcap). + """ + + nio = node.get_nio(adapter_number, port_number) + await node.delete_marker_capture(marker_name, link_id, nio) + + +@router.put( + "/{node_id}/markers/{marker_name}/rebuild", + dependencies=[Depends(compute_authentication)] +) +async def rebuild_iou_marker( + marker_name: str, + rebuild_data: schemas.MarkerRebuild, + node: IOUVM = Depends(dep_node) +) -> dict: + """ + Re-install a single marker filter with new BPF/tag/direction (delete + add, + no bridge reset) so sibling markers' pcaps stay open. + """ + + await node.rebuild_marker_filter( + marker_name, rebuild_data.link_id, rebuild_data.bpf, + rebuild_data.tag, rebuild_data.direction, rebuild_data.enabled, + ) + return {"marker_name": marker_name} diff --git a/gns3server/api/routes/compute/qemu_nodes.py b/gns3server/api/routes/compute/qemu_nodes.py index 623ae8dae..51f8f60d8 100644 --- a/gns3server/api/routes/compute/qemu_nodes.py +++ b/gns3server/api/routes/compute/qemu_nodes.py @@ -20,7 +20,7 @@ API routes for Qemu nodes. import os -from fastapi import APIRouter, WebSocket, Depends, Body, Path, status +from fastapi import APIRouter, WebSocket, Depends, Body, Path, status, HTTPException from fastapi.encoders import jsonable_encoder from fastapi.responses import StreamingResponse from typing import Union @@ -30,7 +30,6 @@ from gns3server import schemas from gns3server.compute import qemu from gns3server.compute.qemu import Qemu from gns3server.compute.qemu.qemu_vm import QemuVM - from .dependencies.authentication import compute_authentication, ws_compute_authentication import logging @@ -321,6 +320,7 @@ async def update_qemu_node_nio( if nio_data.filters: nio.filters = nio_data.filters nio.suspend = nio_data.suspend + nio.markers = nio_data.markers or {} await node.adapter_update_nio_binding(adapter_number, nio) return nio.asdict() @@ -438,3 +438,89 @@ async def vnc_console_ws( async def reset_console(node: QemuVM = Depends(dep_node)) -> None: await node.reset_console() + + +@router.put( + "/{node_id}/markers/{marker_name}", + dependencies=[Depends(compute_authentication)] +) +async def toggle_qemu_marker( + marker_name: str, + toggle_data: schemas.MarkerToggle, + node: QemuVM = Depends(dep_node) +) -> dict: + """ + Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2). + """ + + if not any(n == marker_name for (n, lid) in node._marker_filter_bridges): + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail=f"Marker '{marker_name}' is not installed on this node", + ) + await node._ubridge_set_marker_filter_state(marker_name, toggle_data.enabled) + return {"marker_name": marker_name, "enabled": toggle_data.enabled} + + +@router.post( + "/{node_id}/markers/pause", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def pause_qemu_markers(node: QemuVM = Depends(dep_node)) -> None: + + await node._ubridge_marker_pause() + + +@router.post( + "/{node_id}/markers/resume", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def resume_qemu_markers(node: QemuVM = Depends(dep_node)) -> None: + + await node._ubridge_marker_resume() + + +@router.delete( + "/{node_id}/adapters/{adapter_number}/ports/{port_number}/markers/{marker_name}", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def delete_qemu_marker_capture( + marker_name: str, + adapter_number: int, + port_number: int = Path(..., ge=0, le=0), + link_id: str = "", + node: QemuVM = Depends(dep_node) +) -> None: + """ + Delete a marker's capture pcap (called by the controller when the marker is + removed) so the file is cleaned up even with the node stopped. Also drops + the marker from the port NIO's cached spec so a node restart won't reinstall + it (and recreate an empty pcap). + """ + + nio = node.get_nio(adapter_number) + await node.delete_marker_capture(marker_name, link_id, nio) + + +@router.put( + "/{node_id}/markers/{marker_name}/rebuild", + dependencies=[Depends(compute_authentication)] +) +async def rebuild_qemu_marker( + marker_name: str, + rebuild_data: schemas.MarkerRebuild, + node: QemuVM = Depends(dep_node) +) -> dict: + """ + Re-install a single marker filter with new BPF/tag/direction (delete + add, + no bridge reset) so sibling markers' pcaps stay open. + """ + + await node.rebuild_marker_filter( + marker_name, rebuild_data.link_id, rebuild_data.bpf, + rebuild_data.tag, rebuild_data.direction, rebuild_data.enabled, + ) + return {"marker_name": marker_name} diff --git a/gns3server/api/routes/compute/vpcs_nodes.py b/gns3server/api/routes/compute/vpcs_nodes.py index c51f0254d..546fabdb0 100644 --- a/gns3server/api/routes/compute/vpcs_nodes.py +++ b/gns3server/api/routes/compute/vpcs_nodes.py @@ -29,7 +29,6 @@ from uuid import UUID from gns3server import schemas from gns3server.compute.vpcs import VPCS from gns3server.compute.vpcs.vpcs_vm import VPCSVM - from .dependencies.authentication import compute_authentication, ws_compute_authentication responses = {404: {"model": schemas.ErrorMessage, "description": "Could not find project or VMware node"}} @@ -240,6 +239,7 @@ async def update_vpcs_node_nio( nio.filters.clear() if nio_data.filters: nio.filters = nio_data.filters + nio.markers = nio_data.markers or {} await node.port_update_nio_binding(port_number, nio) return nio.asdict() @@ -303,6 +303,7 @@ async def stop_vpcs_node_capture( await node.stop_capture(port_number) + @router.get( "/{node_id}/adapters/{adapter_number}/ports/{port_number}/capture/stream", dependencies=[Depends(compute_authentication)] @@ -344,3 +345,90 @@ async def console_ws( async def reset_console(node: VPCSVM = Depends(dep_node)) -> None: await node.reset_console() + + +@router.put( + "/{node_id}/markers/{marker_name}", + dependencies=[Depends(compute_authentication)] +) +async def toggle_vpcs_marker( + marker_name: str, + toggle_data: schemas.MarkerToggle, + node: VPCSVM = Depends(dep_node) +) -> dict: + """ + Toggle a marker filter on/off without an NIO rebuild (ubridge contract §3.2). + """ + + if not any(n == marker_name for (n, lid) in node._marker_filter_bridges): + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail=f"Marker '{marker_name}' is not installed on this node", + ) + await node._ubridge_set_marker_filter_state(marker_name, toggle_data.enabled) + return {"marker_name": marker_name, "enabled": toggle_data.enabled} + + +@router.post( + "/{node_id}/markers/pause", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def pause_vpcs_markers(node: VPCSVM = Depends(dep_node)) -> None: + + await node._ubridge_marker_pause() + + +@router.post( + "/{node_id}/markers/resume", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def resume_vpcs_markers(node: VPCSVM = Depends(dep_node)) -> None: + + await node._ubridge_marker_resume() + + +@router.delete( + "/{node_id}/adapters/{adapter_number}/ports/{port_number}/markers/{marker_name}", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(compute_authentication)] +) +async def delete_vpcs_marker_capture( + *, + marker_name: str, + adapter_number: int = Path(..., ge=0, le=0), + port_number: int, + link_id: str = "", + node: VPCSVM = Depends(dep_node) +) -> None: + """ + Delete a marker's capture pcap (called by the controller when the marker is + removed) so the file is cleaned up even with the node stopped. Also drops + the marker from the port NIO's cached spec so a node restart won't reinstall + it (and recreate an empty pcap). + """ + + nio = node.get_nio(port_number) + await node.delete_marker_capture(marker_name, link_id, nio) + + +@router.put( + "/{node_id}/markers/{marker_name}/rebuild", + dependencies=[Depends(compute_authentication)] +) +async def rebuild_vpcs_marker( + marker_name: str, + rebuild_data: schemas.MarkerRebuild, + node: VPCSVM = Depends(dep_node) +) -> dict: + """ + Re-install a single marker filter with new BPF/tag/direction (delete + add, + no bridge reset) so sibling markers' pcaps stay open. + """ + + await node.rebuild_marker_filter( + marker_name, rebuild_data.link_id, rebuild_data.bpf, + rebuild_data.tag, rebuild_data.direction, rebuild_data.enabled, + ) + return {"marker_name": marker_name} diff --git a/gns3server/api/routes/controller/computes.py b/gns3server/api/routes/controller/computes.py index 7385026bf..59c347ef7 100644 --- a/gns3server/api/routes/controller/computes.py +++ b/gns3server/api/routes/controller/computes.py @@ -18,7 +18,7 @@ API routes for computes. """ -from fastapi import APIRouter, Depends, status +from fastapi import APIRouter, Body, Depends, status from typing import Any, List, Union, Optional from uuid import UUID @@ -165,6 +165,25 @@ async def docker_get_images(compute_id: Union[str, UUID]) -> List[schemas.Comput return result +@router.post( + "/{compute_id}/docker/images/pull", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(has_privilege("Compute.Modify"))] +) +async def docker_pull_image( + compute_id: Union[str, UUID], + image: str = Body(..., embed=True, min_length=1, pattern=r"^\S+$") +) -> None: + """ + Pull or update a Docker image on a compute. + + Required privilege: Compute.Modify + """ + + compute = Controller.instance().get_compute(str(compute_id)) + await compute.forward("POST", "docker", "images/pull", data={"image": image}) + + @router.get("/{compute_id}/virtualbox/vms", response_model=List[schemas.ComputeVirtualBoxVM]) async def virtualbox_vms(compute_id: Union[str, UUID]) -> List[schemas.ComputeVirtualBoxVM]: """ diff --git a/gns3server/api/routes/controller/dependencies/rbac.py b/gns3server/api/routes/controller/dependencies/rbac.py index e67953486..41f4cbd0d 100644 --- a/gns3server/api/routes/controller/dependencies/rbac.py +++ b/gns3server/api/routes/controller/dependencies/rbac.py @@ -52,6 +52,10 @@ def has_privilege_on_websocket( current_user: schemas.User = Depends(get_current_active_user_from_websocket), rbac_repo: RbacRepository = Depends(get_repository(RbacRepository)) ): + # Authentication may have failed and closed the socket inside the auth + # dependency, returning None — bail out before touching the user object. + if current_user is None: + return None if not current_user.is_superadmin: path = re.sub(r"^/v[0-9]", "", websocket.url.path) # remove the prefix (e.g. "/v3") from URL path log.debug(f"Checking user {current_user.username} has privilege {privilege_name} on '{path}'") diff --git a/gns3server/api/routes/controller/links.py b/gns3server/api/routes/controller/links.py index ce9caf450..bf6c5467f 100644 --- a/gns3server/api/routes/controller/links.py +++ b/gns3server/api/routes/controller/links.py @@ -27,12 +27,12 @@ from fastapi import APIRouter, Depends, Request, status, WebSocket from fastapi.responses import FileResponse, StreamingResponse from fastapi.encoders import jsonable_encoder from typing import List, Union -from uuid import UUID +from uuid import UUID, uuid4 from gns3server.controller import Controller from gns3server.controller.controller_error import ControllerError from gns3server.db.repositories.rbac import RbacRepository -from gns3server.controller.link import Link +from gns3server.controller.link import Link, _UNSET from gns3server.utils.http_client import HTTPClient from gns3server.utils.port_allocator import link_id_to_port from gns3server.utils.websocket_to_websocket import websocket_proxy @@ -424,6 +424,101 @@ async def web_wireshark_websocket( pass +@router.get( + "/{link_id}/markers", + dependencies=[Depends(has_privilege("Link.Audit"))] +) +async def get_markers(link: Link = Depends(dep_link)) -> dict: + """ + Return all traffic-insight markers configured on this link. + + Required privilege: Link.Audit + """ + + return link.markers + + +@router.post( + "/{link_id}/markers", + status_code=status.HTTP_201_CREATED, + dependencies=[Depends(has_privilege("Link.Modify"))] +) +async def create_marker( + marker_data: schemas.MarkerCreate, + link: Link = Depends(dep_link) +) -> dict: + """ + Attach a traffic-insight marker to the link. + On BPF match uBridge emits MARK signals and appends packets to a pcap. + + Required privilege: Link.Modify + """ + + # Auto-generate a link-unique name when the caller omits one. The short + # uuid suffix avoids the collision that `marker-{link.id[:8]}` alone would + # cause on the second anonymous marker on the same link (start_marker + # rejects duplicate names). + if marker_data.name and marker_data.name.lower().startswith("global"): + raise ControllerError('Names starting with "global" are reserved for inherited markers') + name = marker_data.name or f"marker-{link.id[:8]}-{uuid4().hex[:4]}" + await link.start_marker( + name=name, + bpf=marker_data.bpf, + tag=marker_data.tag, + direction=marker_data.direction, + capture_node_id=marker_data.capture_node_id, + color=marker_data.color, + highlight_duration=marker_data.highlight_duration, + data_link_type=marker_data.data_link_type, + ) + return link.markers.get(name, {}) + + +@router.delete( + "/{link_id}/markers/{marker_name}", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(has_privilege("Link.Modify"))] +) +async def delete_marker( + marker_name: str, + link: Link = Depends(dep_link) +) -> None: + """ + Remove a traffic-insight marker from the link. + + Required privilege: Link.Modify + """ + + await link.stop_marker(marker_name) + + +@router.put( + "/{link_id}/markers/{marker_name}", + dependencies=[Depends(has_privilege("Link.Modify"))] +) +async def update_marker( + marker_name: str, + marker_data: schemas.MarkerUpdate, + link: Link = Depends(dep_link) +) -> dict: + """ + Update a traffic-insight marker (change BPF, tag, or enabled). + + Required privilege: Link.Modify + """ + + await link.update_marker( + name=marker_name, + bpf=marker_data.bpf if marker_data.bpf else None, + tag=marker_data.tag, + direction=marker_data.direction if "direction" in marker_data.model_fields_set else _UNSET, + color=marker_data.color, + enabled=marker_data.enabled, + highlight_duration=marker_data.highlight_duration, + ) + return link.markers.get(marker_name, {}) + + @router.get( "/{link_id}/iface", response_model=Union[schemas.UDPPortInfo, schemas.EthernetPortInfo], diff --git a/gns3server/api/routes/controller/nodes.py b/gns3server/api/routes/controller/nodes.py index 413839459..d0b27f81f 100644 --- a/gns3server/api/routes/controller/nodes.py +++ b/gns3server/api/routes/controller/nodes.py @@ -243,14 +243,25 @@ async def reload_all_nodes(project: Project = Depends(dep_project)) -> None: raise +# Node types that need live host interface data from compute +_HOST_INTERFACE_NODE_TYPES = {"cloud", "nat"} + + @router.get("/{node_id}", response_model=schemas.Node, dependencies=[Depends(has_privilege("Node.Audit"))]) -def get_node(node: Node = Depends(dep_node)) -> schemas.Node: +async def get_node(node: Node = Depends(dep_node)) -> schemas.Node: """ Return a node from a given project. Required privilege: Node.Audit """ + if node.node_type in _HOST_INTERFACE_NODE_TYPES: + try: + response = await node.get() + await node.parse_node_response(response.json) + except Exception: + # If compute is unreachable, still return cached data + log.warning(f"Could not refresh node {node.id} from compute, returning cached data") return node.asdict() diff --git a/gns3server/api/routes/controller/projects.py b/gns3server/api/routes/controller/projects.py index 333053e3b..f9c838a34 100644 --- a/gns3server/api/routes/controller/projects.py +++ b/gns3server/api/routes/controller/projects.py @@ -40,6 +40,7 @@ from uuid import UUID from gns3server import schemas from gns3server.controller import Controller from gns3server.controller.project import Project +from gns3server.controller.link import _UNSET from gns3server.controller.controller_error import ControllerError, ControllerBadRequestError from gns3server.controller.import_project import import_project as import_controller_project from gns3server.controller.export_project import export_project as export_controller_project @@ -203,6 +204,161 @@ def get_project_stats(project: Project = Depends(dep_project)) -> dict: return project.stats() +@router.get("/{project_id}/markers", dependencies=[Depends(has_privilege("Project.Audit"))]) +def get_project_markers(project: Project = Depends(dep_project)) -> dict: + """ + Return all traffic-insight markers across every link in the project. + + Each entry is keyed ``"{link_id}/{marker_name}"`` and carries the + marker's BPF, tag, color, enabled flag, plus its parent ``link_id`` + and capture-side ``node_id`` for frontend filtering / grouping. + + Required privilege: Project.Audit + """ + + return project.markers + + +# --------------------------------------------------------------------------- +# Project-level marker definitions (global rules inherited by every link) +# --------------------------------------------------------------------------- + +@router.get( + "/{project_id}/marker-definitions", + dependencies=[Depends(has_privilege("Project.Audit"))] +) +def get_marker_definitions(project: Project = Depends(dep_project)) -> dict: + """ + Return all project-level marker definitions with their bound link IDs. + + Required privilege: Project.Audit + """ + + result = {} + for name, d in project.marker_definitions.items(): + # Collect which links currently carry an inherited copy. + bound = [ + lid for lid, link in project.links.items() + if f"global-{name}" in link.markers + and link.markers[f"global-{name}"].get("inherited_from") == name + ] + result[name] = {**d, "link_ids": bound} + return result + + +@router.post( + "/{project_id}/marker-definitions", + status_code=status.HTTP_201_CREATED, + dependencies=[Depends(has_privilege("Project.Modify"))] +) +async def create_marker_definition( + def_data: schemas.MarkerDefinitionCreate, + project: Project = Depends(dep_project) +) -> dict: + """ + Create a project-level marker definition and fan out to every link. + + Required privilege: Project.Modify + """ + + if def_data.name and def_data.name.lower().startswith("global"): + raise ControllerError('Names starting with "global" are reserved for inherited markers') + name = def_data.name or f"def-{project.id[:8]}" + await project.create_marker_definition( + name=name, + bpf=def_data.bpf, + tag=def_data.tag, + direction=def_data.direction, + color=def_data.color, + highlight_duration=def_data.highlight_duration, + data_link_type=def_data.data_link_type, + ) + return project.marker_definitions.get(name, {}) + + +@router.put( + "/{project_id}/marker-definitions/{def_name}", + dependencies=[Depends(has_privilege("Project.Modify"))] +) +async def update_marker_definition( + def_name: str, + def_data: schemas.MarkerDefinitionCreate, + project: Project = Depends(dep_project) +) -> dict: + """ + Update a marker definition and sync all inherited copies on every link. + + Required privilege: Project.Modify + """ + + await project.update_marker_definition( + name=def_name, + bpf=def_data.bpf if def_data.bpf else None, + tag=def_data.tag, + direction=def_data.direction if "direction" in def_data.model_fields_set else _UNSET, + color=def_data.color, + highlight_duration=def_data.highlight_duration, + data_link_type=def_data.data_link_type if "data_link_type" in def_data.model_fields_set else _UNSET, + ) + return project.marker_definitions.get(def_name, {}) + + +@router.post( + "/{project_id}/marker-definitions/{def_name}/pause", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(has_privilege("Project.Modify"))] +) +async def pause_marker_definition( + def_name: str, + project: Project = Depends(dep_project) +) -> None: + """ + Pause a definition: toggle off every inherited ``global-{def_name}`` copy + on every link (uBridge ``enable_packet_filter off``, instant — no NIO + rebuild). The definition's ``paused`` flag is persisted, so links created + later inherit it already paused. + + Required privilege: Project.Modify + """ + + await project.pause_marker_definition(def_name) + + +@router.post( + "/{project_id}/marker-definitions/{def_name}/resume", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(has_privilege("Project.Modify"))] +) +async def resume_marker_definition( + def_name: str, + project: Project = Depends(dep_project) +) -> None: + """Resume a paused definition (toggle on every inherited copy). + + Required privilege: Project.Modify + """ + + await project.resume_marker_definition(def_name) + + +@router.delete( + "/{project_id}/marker-definitions/{def_name}", + status_code=status.HTTP_204_NO_CONTENT, + dependencies=[Depends(has_privilege("Project.Modify"))] +) +async def delete_marker_definition( + def_name: str, + project: Project = Depends(dep_project) +) -> None: + """ + Delete a marker definition and remove all inherited copies from every link. + + Required privilege: Project.Modify + """ + + await project.delete_marker_definition(def_name) + + @router.post( "/{project_id}/close", status_code=status.HTTP_204_NO_CONTENT, diff --git a/gns3server/api/routes/controller/templates.py b/gns3server/api/routes/controller/templates.py index a8d0be8a3..05fa6482c 100644 --- a/gns3server/api/routes/controller/templates.py +++ b/gns3server/api/routes/controller/templates.py @@ -35,7 +35,7 @@ from gns3server.db.repositories.templates import TemplatesRepository from gns3server.services.templates import TemplatesService from gns3server.db.repositories.rbac import RbacRepository from gns3server.db.repositories.images import ImagesRepository -from gns3server.controller.controller_error import ControllerError +from gns3server.controller.controller_error import ControllerError, ControllerBadRequestError from gns3server.utils.images import get_builtin_disks from .dependencies.authentication import get_current_active_user @@ -230,3 +230,60 @@ async def duplicate_template( template = await TemplatesService(templates_repo).duplicate_template(template_id) return template + +@router.get( + "/{template_id}/base-config/{filename}", + dependencies=[Depends(has_privilege("Template.Audit"))] +) +async def get_base_config( + template_id: UUID, + filename: str, + templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)), +): + + service = TemplatesService(templates_repo) + await service.get_template(template_id) + content = service.get_file(str(template_id), filename) + + return { + "template_id": str(template_id), + "filename": os.path.basename(filename), + "content": content + } + + +@router.put( + "/{template_id}/base-config/{filename}", + dependencies=[Depends(has_privilege("Template.Modify"))] +) +async def update_base_config( + template_id: UUID, + filename: str, + body: dict, + templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)), +): + if not body or "content" not in body: + raise ControllerBadRequestError("Missing 'content' field") + + service = TemplatesService(templates_repo) + await service.get_template(template_id) + service.update_file(str(template_id), filename, body["content"]) + + return { + "template_id": str(template_id), + "filename": os.path.basename(filename), + "content": body["content"] + } + + +@router.get( + "/{template_id}/base-configs", + dependencies=[Depends(has_privilege("Template.Audit"))] +) +async def list_base_configs( + template_id: UUID, + templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)), +): + service = TemplatesService(templates_repo) + await service.get_template(template_id) + return service.list_files(str(template_id)) diff --git a/gns3server/api/routes/mcp/__init__.py b/gns3server/api/routes/mcp/__init__.py index 07c3e060f..021f66b99 100644 --- a/gns3server/api/routes/mcp/__init__.py +++ b/gns3server/api/routes/mcp/__init__.py @@ -86,13 +86,13 @@ from .device_config import ( ) from .nodes import ( get_nodes_handler, get_node_handler, start_node_handler, - stop_node_handler, reload_node_handler, suspend_node_handler, + stop_node_handler, suspend_node_handler, create_node_handler, delete_node_handler, update_node_handler, get_node_console_info_handler, list_node_files_handler, get_node_file_handler, write_node_file_handler, delete_node_file_handler, start_all_nodes_handler, stop_all_nodes_handler, - suspend_all_nodes_handler, reload_all_nodes_handler, + suspend_all_nodes_handler, duplicate_node_handler, isolate_node_handler, unisolate_node_handler, get_node_links_handler, ) @@ -101,6 +101,7 @@ from .links import ( delete_link_handler, update_link_handler, reset_link_handler, start_capture_handler, stop_capture_handler, download_capture_file_handler, + link_marker_handler, marker_definition_handler, ) from .templates import ( list_templates_handler, get_template_handler, create_template_handler, @@ -194,6 +195,12 @@ _jwt_token_var: contextvars.ContextVar[str | None] = contextvars.ContextVar( _jwt_username_var: contextvars.ContextVar[str | None] = contextvars.ContextVar( "mcp_jwt_username", default=None ) +# token_version extracted during token validation — short-lived JWTs minted for +# download/console URLs must carry the same version, or the revocation check +# (token_data.token_version != user.token_version) rejects them as "revoked". +_jwt_token_version_var: contextvars.ContextVar[int] = contextvars.ContextVar( + "mcp_jwt_token_version", default=0 +) # ── Token validation ────────────────────────────────────────────────── @@ -208,8 +215,9 @@ async def _resolve_token(token: str) -> str | None: """ # Try JWT first try: - username = auth_service.get_username_from_token(token) - _jwt_username_var.set(username) + token_data = auth_service.get_token_data(token) + _jwt_username_var.set(token_data.username) + _jwt_token_version_var.set(token_data.token_version) return token except Exception: pass @@ -233,7 +241,8 @@ async def _resolve_token(token: str) -> str | None: user = await user_repo.get_user(db_key.user_id) if user: _jwt_username_var.set(user.username) - fresh_token = auth_service.create_access_token(user.username) + _jwt_token_version_var.set(user.token_version) + fresh_token = auth_service.create_access_token(user.username, token_version=user.token_version) return fresh_token except Exception: pass @@ -292,6 +301,7 @@ def _run_handler_sync(handler, params: dict[str, Any]) -> list[dict[str, Any]]: "server_url": _server_url(), "jwt_token": _jwt_token_var.get(), "jwt_username": _jwt_username_var.get(), + "jwt_token_version": _jwt_token_version_var.get(), } result = handler(params, ctx) return [{"type": "text", "text": json.dumps(result, ensure_ascii=False, default=str)}] @@ -461,20 +471,6 @@ async def node_stop( params["node_id"] = node_id return await asyncio.to_thread(_run_handler_sync, stop_node_handler, params) -@mcp.tool() -async def node_reload( - project_id: Annotated[str, Field(description="UUID of the project")], - node_id: Annotated[str | None, Field(description="Node UUID (single mode)")] = None, - node_ids: Annotated[list[str] | None, Field(description="Batch mode: [\"uuid1\",\"uuid2\"] — reload multiple nodes in parallel")] = None, -) -> list[dict[str, Any]]: - """Reload (restart) one or more nodes. Provide node_id for single, or node_ids for batch.""" - params = {"project_id": project_id} - if node_ids: - params["node_ids"] = node_ids - else: - params["node_id"] = node_id - return await asyncio.to_thread(_run_handler_sync, reload_node_handler, params) - @mcp.tool() async def node_suspend( project_id: Annotated[str, Field(description="UUID of the project")], @@ -562,16 +558,18 @@ async def node_console( Complete workflow: 1. Call this tool with project_id and node_id to get the WebSocket URL 2. Connect to the returned URL using websocat in text mode (-t): - > websocat -t "ws://:3080/v3/projects/{project_id}/nodes/{node_id}/console/ws?token={jwt_token}" + > websocat -t --no-close "ws://:3080/v3/projects/{project_id}/nodes/{node_id}/console/ws?token={jwt_token}" 3. Send device commands with \\r\\n line endings via heredoc: - > websocat -t "ws://..." <<< $'\\r\\nenable\\r\\nshow version\\r\\nexit\\r\\n' + > websocat -t --no-close "ws://..." <<< $'\\r\\nenable\\r\\nshow version\\r\\nexit\\r\\n' 4. Receive response: websocat receives and displays device output Use 'timeout' to avoid connection hanging: - > timeout 10 websocat -t "ws://..." <<< $'commands\\r\\n' + > timeout 10 websocat -t --no-close "ws://..." <<< $'commands\\r\\n' Key points: - Use \\r\\n (not \\n) to match console protocol line endings - Use $'...' format for escape sequences in bash + - --no-close keeps the WebSocket open after stdin (heredoc) hits EOF, so + device output is not cut off before it arrives - Set a timeout to prevent hanging connections """ return await asyncio.to_thread(_run_handler_sync, get_node_console_info_handler, { @@ -663,6 +661,14 @@ async def link_update( {"filters": {"delay": [100, 10]}} {"filters": {"packet_loss": [5]}} {"filters": {"delay": [50, 5], "packet_loss": [2]}} + + To clear all filters: {"filters": {}} + + Filters are applied **bidirectionally** — a packet crossing the link twice + (e.g. ping round-trip) is filtered in both directions independently. + For example, packet_loss: [50] gives ~75% observed loss (1 - 0.5²), not 50%. + ARP frames also pass through filters; at high loss/corrupt rates, pre-set + static ARP entries to avoid false "Destination Host Unreachable" errors. """ params = {"project_id": project_id, "link_id": link_id, **kwargs} return await asyncio.to_thread(_run_handler_sync, update_link_handler, params) @@ -873,16 +879,6 @@ async def node_suspend_all( }) -@mcp.tool() -async def node_reload_all( - project_id: Annotated[str, Field(description="UUID of the project")], -) -> list[dict[str, Any]]: - """Reload (restart) all nodes in a project.""" - return await asyncio.to_thread(_run_handler_sync, reload_all_nodes_handler, { - "project_id": project_id, - }) - - @mcp.tool() async def node_duplicate( project_id: Annotated[str, Field(description="UUID of the project")], @@ -946,7 +942,9 @@ async def link_reset( - Force filter state (delay, packet loss, etc.) to restart fresh - Recover a stuck or abnormal link state - Filters are preserved but their internal application state resets. + This restarts the filter state machines (e.g. frequency_drop counters) + while keeping the filter configuration intact. Filters are preserved but + their internal application state resets. """ params = {"project_id": project_id} if link_ids: @@ -1004,6 +1002,85 @@ async def link_capture_download( return await asyncio.to_thread(_run_handler_sync, download_capture_file_handler, params) +# ── Marker (traffic-insight) tools ───────────────────────────────────── + + +@mcp.tool() +async def link_marker( + project_id: Annotated[str, Field(description="UUID of the project")], + link_id: Annotated[str, Field(description="UUID of the link")], + action: Annotated[str, Field(description="Action: create, update, or delete")], + bpf: Annotated[str | None, Field(description="BPF expression, e.g. 'arp', 'icmp', 'tcp port 80' (required for create)")] = None, + marker_name: Annotated[str | None, Field(description="Marker name (required for update/delete actions)")] = None, + name: Annotated[str | None, Field(description="Custom marker name for create action (auto-generated if omitted)")] = None, + tag: Annotated[int | None, Field(description="Numeric tag for packet correlation")] = None, + enabled: Annotated[bool | None, Field(description="Enable or disable the marker (for update action)")] = None, + direction: Annotated[str | None, Field(description="Direction filter: 'tx' (capture node sending only), 'rx' (receiving only), or 'both' (no filter — on update this clears a previously set direction). Omit to leave unchanged on update.")] = None, + capture_node_id: Annotated[str | None, Field(description="UUID of the endpoint whose uBridge hosts the marker (the observer; tx/rx are from its perspective). Must be a link endpoint and marker-capable. Omit to auto-pick.")] = None, + color: Annotated[str | None, Field(description="Hex color for UI highlight, e.g. '#ff5722'")] = None, + highlight_duration: Annotated[int | None, Field(description="UI highlight duration in milliseconds")] = None, +) -> list[dict[str, Any]]: + """Manage traffic-insight markers on a link. + + A marker highlights packets matching a BPF expression as they cross the link. + Set action='create' to add a marker, 'update' to modify it, 'delete' to remove. + + Create requires: project_id, link_id, action='create', bpf + Update requires: project_id, link_id, action='update', marker_name, and at least one of (bpf, tag, enabled, direction, color, highlight_duration) + Delete requires: project_id, link_id, action='delete', marker_name + + To read current markers, use link_get — the response includes a 'markers' dict. + + NOTE: Markers named 'global-*' are inherited from project-level marker definitions + and cannot be modified or deleted via this tool. + """ + params = {"project_id": project_id, "link_id": link_id, "action": action} + for opt in ("bpf", "marker_name", "name", "tag", "enabled", "direction", "capture_node_id", "color", "highlight_duration"): + val = locals().get(opt) + if val is not None: + params[opt] = val + return await asyncio.to_thread(_run_handler_sync, link_marker_handler, params) + + +@mcp.tool() +async def marker_definition( + project_id: Annotated[str, Field(description="UUID of the project")], + action: Annotated[str, Field(description="Action: create, update, delete, or list")], + bpf: Annotated[str | None, Field(description="BPF expression, e.g. 'arp', 'ospf', 'tcp port 22' (required for create)")] = None, + def_name: Annotated[str | None, Field(description="Definition name (required for update/delete actions)")] = None, + name: Annotated[str | None, Field(description="Custom definition name for create action (auto-generated if omitted)")] = None, + tag: Annotated[int | None, Field(description="Numeric tag for packet correlation")] = None, + color: Annotated[str | None, Field(description="Hex color for UI highlight, e.g. '#ff5722'")] = None, + highlight_duration: Annotated[int | None, Field(description="UI highlight duration in milliseconds")] = None, + data_link_type: Annotated[str | None, Field(description="pcap link-layer type for serial links (DLT_C_HDLC / DLT_PPP_SERIAL / DLT_FRELAY / DLT_ATM_RFC1483). Omit = Ethernet-only (serial links skipped); setting it also covers serial links with that encapsulation")] = None, +) -> list[dict[str, Any]]: + """Manage project-level marker definitions — traffic-insight rules that apply to ALL links. + + A marker definition is a global BPF rule. On create, it auto-fans out to every + link in the project as 'global-{name}'. Updates sync to all inherited copies. + On delete, 'global-{name}' is removed from every link. + + Create requires: project_id, action='create', bpf + Update requires: project_id, action='update', def_name, and at least one of (bpf, tag, color, highlight_duration, data_link_type) + Delete requires: project_id, action='delete', def_name + List requires: project_id, action='list' + + A definition has NO direction (tx/rx): it fans out to every link and auto-selects + its capture node on each, so a fixed direction has no consistent meaning. Encode + the direction you want in the BPF instead (e.g. 'icmp and icmp[icmptype]==8' for + echo requests only). For a capture-node-relative direction on a single link, use + the per-link `link_marker` tool. + + Common BPF examples: 'arp', 'icmp', 'ospf', 'tcp port 22', 'udp port 53' + """ + params = {"project_id": project_id, "action": action} + for opt in ("bpf", "def_name", "name", "tag", "color", "highlight_duration", "data_link_type"): + val = locals().get(opt) + if val is not None: + params[opt] = val + return await asyncio.to_thread(_run_handler_sync, marker_definition_handler, params) + + # ── Snapshot tools ───────────────────────────────────────────────────── @@ -1402,7 +1479,13 @@ async def device_show_run( Use this to inspect device status, view configurations, or verify changes. For configuration changes use device_config_send instead. - Devices must be started first. + + Prerequisites: + - Devices must be started first (use node_start or node_start_all). + - Each node must have a device_type: tag set in GNS3 + (e.g. device_type:cisco_ios_telnet, device_type:gns3_huawei_telnet_ce). + Nodes without this tag will fail with "device_type tag not found". + Docker/Linux nodes are not supported (use node_console instead). """ params = {"project_id": project_id, "device_configs": device_configs} if template is not None: diff --git a/gns3server/api/routes/mcp/links.py b/gns3server/api/routes/mcp/links.py index 543cb39e1..314f8b8c9 100644 --- a/gns3server/api/routes/mcp/links.py +++ b/gns3server/api/routes/mcp/links.py @@ -336,7 +336,7 @@ def download_capture_file_handler(params: dict[str, Any], gns3_ctx: dict[str, An if not project_id: return {"error": "project_id is required"} username = gns3_ctx.get("jwt_username") - download_token = auth_service.create_access_token(username, expires_in=10) if username else None + download_token = auth_service.create_access_token(username, token_version=gns3_ctx.get("jwt_token_version", 0), expires_in=10) if username else None link_ids = params.get("link_ids") if link_ids: @@ -367,6 +367,124 @@ def download_capture_file_handler(params: dict[str, Any], gns3_ctx: dict[str, An return result +# ── Marker (traffic-insight) handlers ────────────────────────────────── + + +def link_marker_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) -> dict[str, Any]: + """ + Manage traffic-insight markers on a specific link. + + Actions: + - create: POST /projects/{pid}/links/{lid}/markers + - update: PUT /projects/{pid}/links/{lid}/markers/{name} + - delete: DELETE /projects/{pid}/links/{lid}/markers/{name} + """ + project_id = params.get("project_id") + link_id = params.get("link_id") + action = params.get("action") + if not all([project_id, link_id, action]): + return {"error": "project_id, link_id and action are required"} + if action not in ("create", "update", "delete"): + return {"error": f"Unknown action: {action}. Supported: create, update, delete"} + + conn = _get_connector(gns3_ctx) + base = f"{conn.base_url}/projects/{project_id}/links/{link_id}/markers" + + if action == "create": + bpf = params.get("bpf") + if not bpf: + return {"error": "bpf is required for create action"} + body: dict[str, Any] = {"bpf": bpf} + for opt in ("name", "tag", "capture_node_id", "color", "highlight_duration"): + if params.get(opt) is not None: + body[opt] = params[opt] + # direction: "tx"/"rx" set a one-way filter; "both"/omitted = no filter. + if params.get("direction") in ("tx", "rx"): + body["direction"] = params["direction"] + return conn.http_call("post", base, json_data=body).json() + + marker_name = params.get("marker_name") + if not marker_name: + return {"error": "marker_name is required for update/delete actions"} + + url = f"{base}/{marker_name}" + + if action == "update": + body = {} + for opt in ("bpf", "tag", "enabled", "color", "highlight_duration"): + if params.get(opt) is not None: + body[opt] = params[opt] + # direction tri-state: omitted=preserve, "tx"/"rx"=set, "both"=clear (→ null). + direction = params.get("direction") + if direction == "both": + body["direction"] = None + elif direction in ("tx", "rx"): + body["direction"] = direction + if not body: + return {"error": "At least one update field is required (bpf, tag, enabled, direction, color, highlight_duration)"} + return conn.http_call("put", url, json_data=body).json() + + # action == "delete" + conn.http_call("delete", url) + return {"message": f"Marker '{marker_name}' deleted from link {link_id}", "link_id": link_id, "marker_name": marker_name} + + +def marker_definition_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) -> dict[str, Any]: + """ + Manage project-level marker definitions (auto-fanout to all links). + + Actions: + - create: POST /projects/{pid}/marker-definitions → fans out global-{name} to every link + - update: PUT /projects/{pid}/marker-definitions/{name} + - delete: DELETE /projects/{pid}/marker-definitions/{name} + - list: GET /projects/{pid}/marker-definitions + """ + project_id = params.get("project_id") + action = params.get("action") + if not all([project_id, action]): + return {"error": "project_id and action are required"} + if action not in ("create", "update", "delete", "list"): + return {"error": f"Unknown action: {action}. Supported: create, update, delete, list"} + + conn = _get_connector(gns3_ctx) + base = f"{conn.base_url}/projects/{project_id}/marker-definitions" + + if action == "list": + return conn.http_call("get", base).json() + + if action == "create": + bpf = params.get("bpf") + if not bpf: + return {"error": "bpf is required for create action"} + body: dict[str, Any] = {"bpf": bpf} + for opt in ("name", "tag", "color", "highlight_duration", "data_link_type"): + if params.get(opt) is not None: + body[opt] = params[opt] + # No direction: a definition fans out to every link and auto-selects its + # capture node on each, so tx/rx (which is relative to that node) has no + # consistent meaning. Encode direction in the BPF instead. + return conn.http_call("post", base, json_data=body).json() + + def_name = params.get("def_name") + if not def_name: + return {"error": "def_name is required for update/delete actions"} + + url = f"{base}/{def_name}" + + if action == "update": + body = {} + for opt in ("bpf", "tag", "color", "highlight_duration", "data_link_type"): + if params.get(opt) is not None: + body[opt] = params[opt] + if not body: + return {"error": "At least one update field is required (bpf, tag, color, highlight_duration, data_link_type)"} + return conn.http_call("put", url, json_data=body).json() + + # action == "delete" + conn.http_call("delete", url) + return {"message": f"Marker definition '{def_name}' deleted", "project_id": project_id, "def_name": def_name} + + # ── Tool definitions ─────────────────────────────────────────────────────── LINK_TOOLS = [ diff --git a/gns3server/api/routes/mcp/nodes.py b/gns3server/api/routes/mcp/nodes.py index 135872d3b..0a7c1320c 100644 --- a/gns3server/api/routes/mcp/nodes.py +++ b/gns3server/api/routes/mcp/nodes.py @@ -159,24 +159,6 @@ def stop_node_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) -> dict[ return {"message": f"Node {node_id} stopped", "node_id": node_id} -def reload_node_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) -> dict[str, Any]: - project_id = params.get("project_id") - if not project_id: - return {"error": "project_id is required"} - node_ids = params.get("node_ids") - if node_ids: - if not isinstance(node_ids, list): - return {"error": "node_ids must be a list"} - conn = _get_connector(gns3_ctx) - return _batch_lifecycle(project_id, node_ids, "reload", conn, "reloaded") - node_id = params.get("node_id") - if not node_id: - return {"error": "node_id or node_ids is required"} - conn = _get_connector(gns3_ctx) - conn.http_call("post", f"{conn.base_url}/projects/{project_id}/nodes/{node_id}/reload") - return {"message": f"Node {node_id} reloaded", "node_id": node_id} - - def suspend_node_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) -> dict[str, Any]: project_id = params.get("project_id") if not project_id: @@ -316,7 +298,7 @@ def get_node_console_info_handler(params: dict[str, Any], gns3_ctx: dict[str, An console_type = node.get("console_type", "unknown") # Short-lived JWT for the WebSocket URL (10 min) username = gns3_ctx.get("jwt_username") - ws_token = auth_service.create_access_token(username, expires_in=10) if username else None + ws_token = auth_service.create_access_token(username, token_version=gns3_ctx.get("jwt_token_version", 0), expires_in=10) if username else None raw_url = f"{gns3_ctx['server_url']}/v3/projects/{project_id}/nodes/{node_id}/console/ws" if ws_token: raw_url += f"?token={ws_token}" @@ -328,7 +310,7 @@ def get_node_console_info_handler(params: dict[str, Any], gns3_ctx: dict[str, An "node_name": node.get("name"), "console_type": console_type, "ws_url": ws_url, - "command": f"websocat {ws_url}", + "command": f"websocat -t --no-close {ws_url}", } if console_type in ("vnc",): result["vnc_url"] = f"/v3/projects/{project_id}/nodes/{node_id}/console/vnc?token={gns3_ctx['jwt_token']}" @@ -452,15 +434,6 @@ def suspend_all_nodes_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) return {"message": "All nodes suspended", "project_id": project_id} -def reload_all_nodes_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) -> dict[str, Any]: - project_id = params.get("project_id") - if not project_id: - return {"error": "project_id is required"} - conn = _get_connector(gns3_ctx) - conn.http_call("post", f"{conn.base_url}/projects/{project_id}/nodes/reload") - return {"message": "All nodes reloaded", "project_id": project_id} - - def duplicate_node_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) -> dict[str, Any]: project_id = params.get("project_id") node_id = params.get("node_id") @@ -556,19 +529,6 @@ NODE_TOOLS = [ }, "handler": stop_node_handler, }, - { - "name": "reload_node", - "description": "Reload (restart) a node in a project", - "parameters": { - "type": "object", - "properties": { - "project_id": {"type": "string", "description": "Project UUID"}, - "node_id": {"type": "string", "description": "Node UUID"}, - }, - "required": ["project_id", "node_id"], - }, - "handler": reload_node_handler, - }, { "name": "suspend_node", "description": "Suspend a node in a project", diff --git a/gns3server/api/routes/mcp/symbols.py b/gns3server/api/routes/mcp/symbols.py index d404e651b..6026ee51f 100644 --- a/gns3server/api/routes/mcp/symbols.py +++ b/gns3server/api/routes/mcp/symbols.py @@ -54,7 +54,7 @@ def get_symbol_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) -> dict return {"error": "symbol_id is required"} download_url = f"{gns3_ctx['server_url']}/v3/symbols/{symbol_id}/raw" username = gns3_ctx.get("jwt_username") - download_token = auth_service.create_access_token(username, expires_in=10) if username else None + download_token = auth_service.create_access_token(username, token_version=gns3_ctx.get("jwt_token_version", 0), expires_in=10) if username else None result = { "symbol_id": symbol_id, "download_url": download_url, diff --git a/gns3server/appliances/armbian.gns3a b/gns3server/appliances/armbian.gns3a new file mode 100644 index 000000000..094f2bd35 --- /dev/null +++ b/gns3server/appliances/armbian.gns3a @@ -0,0 +1,59 @@ +{ + "appliance_id": "b3b90fde-143a-4129-8031-ccbba73c5e02", + "name": "armbian", + "category": "guest", + "description": "A highly optimized base operating system specialized for single board computers (SBCs) and its extensive build framework.", + "vendor_name": "The Armbian team", + "vendor_url": "https://armbian.com/", + "documentation_url": "https://docs.armbian.com/", + "product_name": "Armbian UEFI x86", + "product_url": "https://armbian.com/boards/uefi-x86", + "registry_version": 4, + "status": "stable", + "maintainer": "GNS3 Team", + "maintainer_email": "developers@gns3.net", + "usage": "By first login you create root password and new sudo user.\n\nBoot disk from UEFI shell, type: FS0:EFI\\BOOT\\BOOTX64 and press ", + "port_name_format": "Ethernet{0}", + "qemu": { + "adapter_type": "virtio-net-pci", + "adapters": 2, + "ram": 256, + "hda_disk_interface": "virtio", + "arch": "x86_64", + "console_type": "spice+agent", + "uefi": false, + "boot_priority": "c", + "kvm": "require", + "options": "-nographic" + }, + "images": [ + { + "filename": "OVMF-edk2-stable202305.fd", + "version": "stable202305", + "md5sum": "6c4cf1519fec4a4b95525d9ae562963a", + "filesize": 4194304, + "download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/", + "direct_download_url": "https://sourceforge.net/projects/gns-3/files/Qemu%20Appliances/OVMF-edk2-stable202305.fd.zip/download", + "compression": "zip" + }, + { + "filename": "Armbian_26.5.1_Uefi-x86_trixie_cloud_6.18.32_minimal.img.qcow2", + "version": "Armbian 26.5.1 Minimal (CLI)", + "md5sum": "7f4c915668718d6135406de5a6c4fc30", + "filesize": 877920512, + "download_url": "https://armbian.com/boards/uefi-x86", + "direct_download_url": "https://armbian.atomonetworks.com/dl/uefi-x86/archive/Armbian_26.5.1_Uefi-x86_trixie_cloud_6.18.32_minimal.img.qcow2.xz", + "compression": "xz" + } + + ], + "versions": [ + { + "name": "Armbian 26.5.1 Minimal (CLI)", + "images": { + "bios_image": "OVMF-edk2-stable202305.fd", + "hda_disk_image": "Armbian_26.5.1_Uefi-x86_trixie_cloud_6.18.32_minimal.img.qcow2" + } + } + ] +} diff --git a/gns3server/appliances/fortimanager.gns3a b/gns3server/appliances/fortimanager.gns3a index b5de0248e..ae51af861 100644 --- a/gns3server/appliances/fortimanager.gns3a +++ b/gns3server/appliances/fortimanager.gns3a @@ -51,250 +51,12 @@ "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" }, { - "filename": "FMG_VM64_KVM-v7.4.3-build2487-FORTINET.out.kvm.qcow2", - "version": "7.4.3", - "md5sum": "b01d9f86aa27c538407d518df1326863", - "filesize": 346107904, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v7.4.2-build2397-FORTINET.out.kvm.qcow2", - "version": "7.4.2", - "md5sum": "36371fbf06210ded57c00b2ff290f2c5", - "filesize": 322514944, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v7.4.1-build2308-FORTINET.out.kvm.qcow2", - "version": "7.4.1", - "md5sum": "e542cc8f2d8f46e9c32b783bf31bef39", - "filesize": 309387264, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v7.2.5-build1574-FORTINET.out.kvm.qcow2", - "version": "7.2.5", - "md5sum": "754326845096afd909ec45d98f8d5a83", - "filesize": 278401024, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v7.2.4-build1460-FORTINET.out.kvm.qcow2", - "version": "7.2.4", - "md5sum": "98fa9830d9ecb5911a703d03b80026b6", - "filesize": 261992448, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v7.2.2-build1334-FORTINET.out.kvm.qcow2", - "version": "7.2.2", - "md5sum": "2ff1298257321cd485d2cad91d6ce510", - "filesize": 246083584, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v7.2.1-build1215-FORTINET.out.kvm.qcow2", - "version": "7.2.1", - "md5sum": "1a3eeff1204fa8f4243773f7521e12b5", - "filesize": 242814976, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v7.0.12-build0623-FORTINET.out.kvm.qcow2", - "version": "7.0.12", - "md5sum": "5b6f6a2b8bc00e56337aa7023a9025cf", - "filesize": 249520128, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v7.0.11-build0595-FORTINET.out.kvm.qcow2", - "version": "7.0.11", - "md5sum": "7b166222136e26190159f37cccbaab6e", - "filesize": 249360384, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v7.0.9-build0489-FORTINET.out.kvm.qcow2", - "version": "7.0.9", - "md5sum": "dbeb6a79b6e421000573dbbbdb50b8b5", - "filesize": 247955456, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v7.0.6-build0372-FORTINET.out.kvm.qcow2", - "version": "7.0.6", - "md5sum": "dfa4df9e976ed87e73cb9601a8a70323", - "filesize": 239190016, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v7.0.5-build0365-FORTINET.out.kvm.qcow2", - "version": "7.0.5", - "md5sum": "e8b9c992784cea766b52a427a5fe0279", - "filesize": 237535232, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v6.4.14-build2660-FORTINET.out.kvm.qcow2", - "version": "6.4.14", - "md5sum": "0fe56e363b166c07b710bde795e36049", - "filesize": 219430912, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v6.4.12-build2610-FORTINET.out.kvm.qcow2", - "version": "6.4.12", - "md5sum": "36c0dc531d921e5f1e1e09b030f7c813", - "filesize": 219455488, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v6-build2288-FORTINET.out.kvm.qcow2", - "version": "6.4.5", - "md5sum": "bd2791984b03f55a6825297e83c6576a", - "filesize": 117014528, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v6-build2253-FORTINET.out.kvm.qcow2", - "version": "6.4.4", - "md5sum": "3554a47fde2dc91d17eec16fd0dc10a3", - "filesize": 116621312, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v6-build1183-FORTINET.out.kvm.qcow2", - "version": "6.2.2", - "md5sum": "f5051a8fe49d916bb554b9bae32a1eb4", - "filesize": 139145216, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v6-build1050-FORTINET.out.kvm.qcow2", - "version": "6.2.0", - "md5sum": "c19d2527f91ad1bbafbde5bf08487867", - "filesize": 126894080, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v6-build0349-FORTINET.out.kvm.qcow2", - "version": "6.0.6", - "md5sum": "d03f024c948ba6e2bb9e66c11ca8f34c", - "filesize": 112553984, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v6-build0255-FORTINET.out.kvm.qcow2", - "version": "6.0.3", - "md5sum": "5f34d52d9289b0be2a4c04943446ea39", - "filesize": 115703808, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v6-build0205-FORTINET.out.kvm.qcow2", - "version": "6.0.2", - "md5sum": "8f748649c537d9b5466b24c5b4e62017", - "filesize": 116981760, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v6-build0092-FORTINET.out.kvm.qcow2", - "version": "6.0.0", - "md5sum": "73bfe1bc70124521a524d857646b9c2e", - "filesize": 119066624, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build1631-FORTINET.out.kvm.qcow2", - "version": "5.6.2", - "md5sum": "c81cc247e8eb03249b475fe0e847653e", - "filesize": 106946560, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build1619-FORTINET.out.kvm.qcow2", - "version": "5.6.1", - "md5sum": "8cc553842564d232af295d6a0c784c1f", - "filesize": 106831872, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build1557-FORTINET.out.kvm.qcow2", - "version": "5.6.0", - "md5sum": "f8bd600796f894f4ca1ea2d6b4066d3d", - "filesize": 108363776, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build1225-FORTINET.out.kvm.qcow2", - "version": "5.4.4", - "md5sum": "53bc6e320fe7bde5d2b636bde95a910c", - "filesize": 89911296, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build1187-FORTINET.out.kvm.qcow2", - "version": "5.4.3", - "md5sum": "53602c776d215d98e32163a10804fc49", - "filesize": 87425024, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build1151-FORTINET.out.kvm.qcow2", - "version": "5.4.2", - "md5sum": "8e131ad40009c740f3efdee6dc3a0ac3", - "filesize": 86437888, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build1082-FORTINET.out.kvm.qcow2", - "version": "5.4.1", - "md5sum": "fc1815410f3f0536e2e3a9c1c5c07f41", - "filesize": 83124224, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build1019-FORTINET.out.kvm.qcow2", - "version": "5.4.0", - "md5sum": "1cfb22671cb372d8bf3e47b9c3c55ded", - "filesize": 77541376, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build0786-FORTINET.out.kvm.qcow2", - "version": "5.2.10", - "md5sum": "377fe38bf07bc2435608e5b65f780f07", - "filesize": 64962560, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build0780-FORTINET.out.kvm.qcow2", - "version": "5.2.9", - "md5sum": "04268e779d3d5e6c928c6fd638423c52", - "filesize": 65007616, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build0777-FORTINET.out.kvm.qcow2", - "version": "5.2.8", - "md5sum": "6dbf148ace9bf309ad383757afd75fad", - "filesize": 65011712, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "FMG_VM64_KVM-v5-build0757-FORTINET.out.kvm.qcow2", - "version": "5.2.7", - "md5sum": "d37dbaa49d7522324681eeba19f7699b", - "filesize": 65056768, - "download_url": "https://support.fortinet.com/Download/FirmwareImages.aspx" - }, - { - "filename": "empty30G.qcow2", + "filename": "empty500G.qcow2", "version": "1.0", - "md5sum": "3411a599e822f2ac6be560a26405821a", - "filesize": 197120, + "md5sum": "658c825441b9b3080ba00f9eec002eaa", + "filesize": 204608, "download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/", - "direct_download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/empty30G.qcow2/download" + "direct_download_url": "https://sourceforge.net/projects/gns-3/files/Empty%20Qemu%20disk/empty500G.qcow2/download" } ], "versions": [ @@ -302,259 +64,21 @@ "name": "7.4.6", "images": { "hda_disk_image": "FMG_VM64_KVM-v7.4.6.M-build2588-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" + "hdb_disk_image": "empty500G.qcow2" } }, { "name": "7.4.5", "images": { "hda_disk_image": "FMG_VM64_KVM-v7.4.5.M-build2553-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" + "hdb_disk_image": "empty500G.qcow2" } }, { "name": "7.4.4", "images": { "hda_disk_image": "FMG_VM64_KVM-v7.4.4.F-build2550-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.4.3", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.4.3-build2487-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.4.2", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.4.2-build2397-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.4.1", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.4.1-build2308-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.2.5", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.2.5-build1574-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.2.4", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.2.4-build1460-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.2.2", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.2.2-build1334-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.2.1", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.2.1-build1215-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.0.12", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.0.12-build0623-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.0.11", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.0.11-build0595-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.0.9", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.0.9-build0489-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.0.6", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.0.6-build0372-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "7.0.5", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v7.0.5-build0365-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "6.4.14", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v6.4.14-build2660-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "6.4.12", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v6.4.12-build2610-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "6.4.5", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v6-build2288-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "6.4.4", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v6-build2253-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "6.2.2", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v6-build1183-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "6.2.0", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v6-build1050-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "6.0.6", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v6-build0349-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "6.0.3", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v6-build0255-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "6.0.2", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v6-build0205-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "6.0.0", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v6-build0092-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.6.2", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build1631-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.6.1", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build1619-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.6.0", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build1557-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.4.4", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build1225-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.4.3", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build1187-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.4.2", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build1151-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.4.1", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build1082-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.4.0", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build1019-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.2.10", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build0786-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.2.9", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build0780-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.2.8", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build0777-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" - } - }, - { - "name": "5.2.7", - "images": { - "hda_disk_image": "FMG_VM64_KVM-v5-build0757-FORTINET.out.kvm.qcow2", - "hdb_disk_image": "empty30G.qcow2" + "hdb_disk_image": "empty500G.qcow2" } } ] diff --git a/gns3server/appliances/infix.gns3a b/gns3server/appliances/infix.gns3a index b3bc38c1c..481cba0fd 100644 --- a/gns3server/appliances/infix.gns3a +++ b/gns3server/appliances/infix.gns3a @@ -139,9 +139,23 @@ "md5sum": "60f7c36c389c33ab108acc021f41ccd5", "version": "26.05.0", "direct_download_url": "https://github.com/kernelkit/infix/releases/download/v26.05.0/infix-x86_64-v26.05.0.qcow2" + }, + { + "filename": "infix-x86_64-v26.06.0.qcow2", + "filesize": 363593728, + "md5sum": "79ca8bd8534bbaa1af0ab874a49d6f4c", + "version": "26.06.0", + "direct_download_url": "https://github.com/kernelkit/infix/releases/download/v26.06.0/infix-x86_64-v26.06.0.qcow2" } ], "versions": [ + { + "name": "26.06.0", + "images": { + "bios_image": "OVMF-edk2-stable202305.fd", + "hda_disk_image": "infix-x86_64-v26.06.0.qcow2" + } + }, { "name": "26.05.0", "images": { diff --git a/gns3server/appliances/ubuntu-docker.gns3a b/gns3server/appliances/ubuntu-docker.gns3a index 9cde03e79..c69a1405d 100644 --- a/gns3server/appliances/ubuntu-docker.gns3a +++ b/gns3server/appliances/ubuntu-docker.gns3a @@ -14,7 +14,7 @@ "symbol": "linux_guest.svg", "docker": { "adapters": 1, - "image": "gns3/ubuntu:noble", + "image": "gns3/ubuntu:resolute", "console_type": "telnet" } } diff --git a/gns3server/compute/base_manager.py b/gns3server/compute/base_manager.py index 076b802d1..8ef27265c 100644 --- a/gns3server/compute/base_manager.py +++ b/gns3server/compute/base_manager.py @@ -356,6 +356,7 @@ class BaseManager: raise ComputeError(f"Could not create an UDP connection to {rhost}:{rport}: {e}") nio = NIOUDP(lport, rhost, rport) nio.filters = nio_settings.get("filters", {}) + nio.markers = nio_settings.get("markers", {}) nio.suspend = nio_settings.get("suspend", False) elif nio_settings["type"] == "nio_tap": tap_device = nio_settings["tap_device"] diff --git a/gns3server/compute/base_node.py b/gns3server/compute/base_node.py index 8e7681d9e..fc048892a 100644 --- a/gns3server/compute/base_node.py +++ b/gns3server/compute/base_node.py @@ -100,6 +100,9 @@ class BaseNode: self._internal_aux_port = None self._custom_adapters = [] self._ubridge_require_privileged_access = False + # marker filter name -> uBridge bridge_name (recorded at apply time so + # _ubridge_set_marker_filter_state can toggle on/off without an NIO rebuild). + self._marker_filter_bridges = {} if self._console is not None: # use a previously allocated console port @@ -926,27 +929,71 @@ class BaseNode: raise NodeError("uBridge requires root access or the capability to interact with network adapters") server_host = self._manager.config.settings.Server.host + transport = self._manager.config.settings.Server.ubridge_control_transport if not self.ubridge: - self._ubridge_hypervisor = Hypervisor(self._project, self.ubridge_path, self.working_dir, server_host) - log.info(f"Starting new uBridge hypervisor {self._ubridge_hypervisor.host}:{self._ubridge_hypervisor.port}") + self._ubridge_hypervisor = Hypervisor( + self._project, self.ubridge_path, self.working_dir, transport, server_host, self.id + ) + log.info(f"Starting new uBridge hypervisor at {self._ubridge_hypervisor.endpoint}") await self._ubridge_hypervisor.start() if self._ubridge_hypervisor: log.info( - f"Hypervisor {self._ubridge_hypervisor.host}:{self._ubridge_hypervisor.port} has successfully started" + f"Hypervisor at {self._ubridge_hypervisor.endpoint} has successfully started" ) await self._ubridge_hypervisor.connect() + # Tell this uBridge where to send MARK signals and which node id to + # tag them with. Marker is opt-in and inert until a `mark` filter is + # added, so this never disturbs the data plane. + await self._ubridge_configure_marker_sink() # save if privileged are required in case uBridge needs to be restarted in self._ubridge_send() self._ubridge_require_privileged_access = require_privileged_access + async def _ubridge_configure_marker_sink(self): + """ + Point this node's uBridge at the compute's marker UDP sink and tag its + signals with this node's id. Safe to call before any marker filter + exists — uBridge stays inert until a ``mark`` filter is configured. + + Old uBridge builds without the marker module are tolerated: the failure + is downgraded to a warning so node start is not blocked by an opt-in + observability feature. + """ + + from gns3server.compute.marker.marker_manager import MarkerManager + + manager = MarkerManager.instance() + if not manager.running or not manager.host or not manager.port: + return + if self._ubridge_hypervisor is None: + return + try: + # Talk to the hypervisor directly, NOT via _ubridge_send: this runs + # inside _start_ubridge, which is reached THROUGH _ubridge_send when + # uBridge starts lazily (e.g. linking a stopped node). _ubridge_send's + # lock is non-reentrant, so calling it again here would deadlock on + # the held ___ubridge_send_lock. uBridge is already running and + # connected at this point, so the raw hypervisor send is safe. + await self._ubridge_hypervisor.send(f"marker sink {manager.host} {manager.port}") + await self._ubridge_hypervisor.send(f"marker node {self._id}") + except UbridgeError: + log.warning( + "uBridge does not support the marker module; traffic insight disabled for node %r", + self.name, + ) + async def _stop_ubridge(self): """ Stops uBridge. """ if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running(): - log.info(f"Stopping uBridge hypervisor {self._ubridge_hypervisor.host}:{self._ubridge_hypervisor.port}") + log.info(f"Stopping uBridge hypervisor at {self._ubridge_hypervisor.endpoint}") await self._ubridge_hypervisor.stop() self._ubridge_hypervisor = None + # uBridge is gone, so every marker filter (and its in-bridge state) is + # gone too — clear the map so the next apply re-installs them all rather + # than skipping them as "already installed". + self._marker_filter_bridges.clear() async def add_ubridge_udp_connection(self, bridge_name, source_nio, destination_nio): """ @@ -983,10 +1030,12 @@ class BaseNode: await self._ubridge_send(f"bridge start {bridge_name}") await self._ubridge_apply_filters(bridge_name, destination_nio.filters) + await self._ubridge_apply_markers(bridge_name, destination_nio) async def update_ubridge_udp_connection(self, bridge_name, source_nio, destination_nio): if destination_nio: await self._ubridge_apply_filters(bridge_name, destination_nio.filters) + await self._ubridge_apply_markers(bridge_name, destination_nio) async def ubridge_delete_bridge(self, name): """ @@ -1042,6 +1091,242 @@ class BaseNode: ) i += 1 + @staticmethod + def _marker_linktype(data_link_type): + """ + Normalize a GNS3 pcap data-link type (e.g. ``DLT_C_HDLC``) to the bare + uBridge ``linktype`` token (``C_HDLC``) by stripping the ``DLT_`` prefix. + Returns ``None`` for Ethernet (``DLT_EN10MB`` / unset) so the ``linktype`` + keyword is omitted and uBridge defaults to EN10MB. Values come straight + from ``SerialPort.data_link_types`` (the single source of truth); uBridge + resolves them with ``pcap_datalink_name_to_val``, which is case-sensitive + and expects the canonical uppercase form. + """ + if not data_link_type: + return None + dlt = data_link_type.upper() + if dlt.startswith("DLT_"): + dlt = dlt[4:] + return None if dlt == "EN10MB" else dlt + + async def _ubridge_add_marker_filter(self, bridge_name, name, bpf, pcap_path, tag=None, link_id=None, direction=None, data_link_type=None): + """ + Attach a `mark` packet filter to a uBridge bridge for traffic insight. + + On BPF match uBridge (a) emits a UDP MARK signal to the configured sink + and (b) appends the packet to ``pcap_path``. Unlike the impairment + filters, this is an observability tap: it never drops or alters traffic, + and it is added/removed on its own (not via reset_packet_filters) so the + pcap is not closed/reopened on unrelated filter changes. + + :param bridge_name: uBridge bridge carrying the link's traffic + :param name: stable, gns3server-chosen filter name (pcap identity + echoed in signals) + :param bpf: libpcap BPF expression + :param pcap_path: absolute path ubridge appends matched packets to + :param tag: optional correlation id echoed in MARK signals + """ + + # mark [tag ] [pcap ] — tag/pcap keyword pairs, any order. + # name travels from the controller REST layer (MarkerCreate schema) but is + # validated here too as defense-in-depth against hand-edited topology files. + # Note: "global-*" names are legitimate here — they come from project-level + # marker definitions (inherit_marker). The prefix is only forbidden at the + # user-facing schema layer, not at the uBridge boundary. + _MARKER_NAME_RE = re.compile(r"^[A-Za-z0-9][A-Za-z0-9_.-]*$") + # Defense-in-depth vs hand-edited topology: the user-facing name is capped + # at 32 by the schema; inherited copies carry a ``global-`` prefix (≤ 39), + # so allow up to 48 here. + if not _MARKER_NAME_RE.match(name) or len(name) > 48: + raise UbridgeError(f"Invalid marker name: {name!r}") + cmd = 'bridge add_packet_filter {bridge} {name} mark "{bpf}"'.format( + bridge=bridge_name, name=name, bpf=bpf + ) + if tag is not None: + cmd += f" tag {tag}" + # Per-link attribution (contract §3.2): when one ubridge bridge serves + # several GNS3 links (e.g. IOU's per-node bridge), bridge+filter collide, + # so the link id is the only way to tell signals — and pcap files — apart. + if link_id: + cmd += f" link {link_id}" + if direction is not None: + cmd += f" dir {direction}" + linktype = self._marker_linktype(data_link_type) + if linktype is not None: + cmd += f" linktype {linktype}" + cmd += ' pcap "{path}"'.format(path=pcap_path) + # Let BPF compile errors propagate — the marker is the user's intent, so a + # bad expression must surface instead of being silently dropped. + await self._ubridge_send(cmd) + + async def delete_marker_capture(self, name, link_id, nio=None): + """ + Remove a marker from uBridge (fine-grained ``delete_packet_filter`` — NOT + reset_packet_filters, so sibling markers' pcaps aren't closed/reopened) + and delete its capture pcap. Called by the controller when a marker is + removed; safe with the node stopped (filter removal is skipped, the file + is still unlinked). IOU overrides ``_ubridge_delete_marker_filter`` for + its ``iol_bridge`` command shape. + + ``nio`` is the port NIO whose cached ``nio.markers`` carries this marker + spec; it is dropped here so a later node start / NIO reapply + (``_ubridge_apply_markers``) does not reinstall the marker. Without this, + deleting a marker while the node is stopped left the spec in + ``nio.markers``, and starting the node recreated an empty pcap. + """ + if nio is not None and getattr(nio, "markers", None): + nio.markers.pop(name, None) + bridge_name = self._marker_filter_bridges.pop((name, link_id), None) + if bridge_name is not None: + await self._ubridge_delete_marker_filter(bridge_name, name) + try: + markers_dir = self.project.markers_working_directory() + pcap_path = os.path.join(markers_dir, f"{self._id}_{link_id}_{name}.pcap") + os.remove(pcap_path) + except FileNotFoundError: + pass + except OSError as e: + log.warning("Could not remove marker pcap for '%s' on link %s: %s", name, link_id, e) + + async def _ubridge_delete_marker_filter(self, bridge_name, name): + """ + Remove a single marker filter from uBridge with ``delete_packet_filter`` + (not a bridge-wide reset) so other markers keep their pcaps open. A no-op + when uBridge isn't running — the pcap cleanup in the caller still proceeds. + """ + if not (self._ubridge_hypervisor and self._ubridge_hypervisor.is_running()): + return + try: + await self._ubridge_send(f"bridge delete_packet_filter {bridge_name} {name}") + except UbridgeError as e: + log.warning("Could not remove marker filter '%s' from %s: %s", name, bridge_name, e) + + async def rebuild_marker_filter(self, name, link_id, bpf, tag=None, direction=None, enabled=True): + """ + Re-install a single marker filter with new params (delete + add), without + a bridge-wide reset — so sibling markers keep their pcaps open. uBridge + reopens the marker's own pcap on re-add (a new capture session for the + new BPF), which is expected. No-op if the marker isn't installed (node + stopped) — the next NIO reapply picks up the updated ``_markers``. + + IOU needs no override: this calls ``_ubridge_delete_marker_filter`` / + ``_ubridge_add_marker_filter`` / ``_ubridge_set_marker_filter_state``, + all of which IOU already overrides for ``iol_bridge``. + """ + bridge_name = self._marker_filter_bridges.get((name, link_id)) + if bridge_name is None: + return + await self._ubridge_delete_marker_filter(bridge_name, name) + pcap_path = os.path.join(self.project.markers_working_directory(), f"{self._id}_{link_id}_{name}.pcap") + await self._ubridge_add_marker_filter(bridge_name, name, bpf, pcap_path, tag, link_id, direction=direction) + if not enabled: + await self._ubridge_set_marker_filter_state(name, enabled=False) + + async def _ubridge_apply_markers(self, bridge_name, nio): + """ + Install the traffic-insight markers carried by *nio* onto bridge + *bridge_name* that aren't already there. uBridge's ``reset_packet_filters`` + preserves mark filters (contract), so on an NIO update we add only the new + ones — re-adding an existing marker would either duplicate it or + close/reopen its pcap. Called from ``add_ubridge_udp_connection`` (fresh + bridge, empty map → installs all) and ``update_ubridge_udp_connection`` + (incremental). + """ + from gns3server.compute.marker.marker_manager import MarkerManager + + markers = nio.markers if hasattr(nio, 'markers') else {} + if not markers: + return + + manager = MarkerManager.instance() + markers_dir = self.project.markers_working_directory() + for name, spec in markers.items(): + link_id = spec.get("link_id", "") + # Incremental: skip markers already on this bridge. uBridge keeps mark + # filters across reset_packet_filters, so re-adding would duplicate (or + # reopen the pcap). A fresh bridge has an empty map → installs all. + if (name, link_id) in self._marker_filter_bridges: + continue + bpf = spec.get("bpf", "") + tag = spec.get("tag") + pcap_path = os.path.join( + markers_dir, f"{self._id}_{link_id}_{name}.pcap" + ) + try: + await self._ubridge_add_marker_filter(bridge_name, name, bpf, pcap_path, tag, link_id, + direction=spec.get("direction"), + data_link_type=spec.get("data_link_type")) + except UbridgeError as e: + # Swallow BPF compile errors (warn + skip) so a single bad + # expression can't break link creation / node restart — mirrors + # _ubridge_apply_filters, which does the same for packet filters. + if "syntax error" in str(e).lower() or "compile filter" in str(e).lower(): + message = f"Warning: ignoring marker '{name}' due to BPF syntax error: {e}" + log.warning(message) + self.project.emit("log.warning", {"message": message}) + continue + raise + # A disabled marker is installed but turned off (a paused tap), not + # dropped — so the UI can flip it back on instantly with + # enable_packet_filter, no NIO rebuild (ubridge contract §3.2). + if not spec.get("enabled", True): + try: + await self._ubridge_send(f"bridge enable_packet_filter {bridge_name} {name} off") + except UbridgeError as e: + # Old ubridge without enable_packet_filter: leave it installed + # (on) rather than fail the whole link/marker apply. + log.warning(f"Could not turn marker '{name}' off on {bridge_name}: {e}") + manager.register( + str(self.project.id), self._id, name, link_id, tag + ) + # Remember which bridge hosts this filter so an instant on/off toggle + # (no NIO rebuild) can resolve it by name alone. + # keyed (name, link_id) so a node that hosts markers for several links + # (e.g. IOU with one IOL-BRIDGE and many bays/units) records each + # copy independently — toggle below iterates all matching entries. + self._marker_filter_bridges[name, link_id] = bridge_name + + async def _ubridge_set_marker_filter_state(self, name, enabled): + """ + Toggle an installed marker filter on/off with a single uBridge command + (``bridge enable_packet_filter … on|off``) — no NIO reset/reapply, so the + pcap identity and emitted counter are preserved (ubridge contract §3.2). + The bridge is resolved from the (name, link_id)→bridge map populated at + apply time; entries are iterated so a node that hosts the same marker name + on several links (e.g. IOU with one IOL-BRIDGE per node) toggles every + copy. IOU overrides this for its ``iol_bridge`` command shape. + + :param name: marker filter name + :param enabled: True = on (signal+pcap), False = off (paused tap) + """ + + state = "on" if enabled else "off" + for (n, lid), bridge_name in list(self._marker_filter_bridges.items()): + if n == name: + await self._ubridge_send(f"bridge enable_packet_filter {bridge_name} {name} {state}") + + async def _ubridge_marker_pause(self): + """ + Pause all marker signal+pcap emission on this node's uBridge + (``marker pause``). Keeps the sink open so ``resume`` is instant. Safe + on old ubridge builds (the error is downgraded to a warning). Called by + the project-level pause fan-out. + """ + + if self._ubridge_hypervisor: + try: + await self._ubridge_hypervisor.send("marker pause") + except UbridgeError as e: + log.warning(f"Could not pause markers on node {self._id}: {e}") + + async def _ubridge_marker_resume(self): + """Resume marker signal+pcap emission (``marker resume``).""" + + if self._ubridge_hypervisor: + try: + await self._ubridge_hypervisor.send("marker resume") + except UbridgeError as e: + log.warning(f"Could not resume markers on node {self._id}: {e}") + async def _add_ubridge_ethernet_connection(self, bridge_name, ethernet_interface, block_host_traffic=False): """ Creates a connection with an Ethernet interface in uBridge. diff --git a/gns3server/compute/builtin/nodes/cloud.py b/gns3server/compute/builtin/nodes/cloud.py index 43d3bcc1f..62cfb45ba 100644 --- a/gns3server/compute/builtin/nodes/cloud.py +++ b/gns3server/compute/builtin/nodes/cloud.py @@ -82,8 +82,20 @@ class Cloud(BaseNode): host_interfaces = [] network_interfaces = gns3server.utils.interfaces.interfaces() for interface in network_interfaces: + # Hide GNS3 internal bridges (e.g. EthernetSwitch kernel bridges) + if interface["name"].lower().startswith("gns3"): + continue host_interfaces.append( - {"name": interface["name"], "type": interface["type"], "special": interface["special"]} + { + "name": interface["name"], + "type": interface["type"], + "special": interface["special"], + "ip_addresses": interface.get("ip_addresses", []), + "status": interface.get("status", "down"), + "speed": interface.get("speed", 0), + "mtu": interface.get("mtu", 0), + "flags": interface.get("flags", []), + } ) return { @@ -303,6 +315,7 @@ class Cloud(BaseNode): ) await self._ubridge_apply_filters(bridge_name, nio.filters) + await self._ubridge_apply_markers(bridge_name, nio) if port_info["type"] in ("ethernet", "tap"): if not self.manager.has_privileged_access(self.ubridge_path): @@ -443,6 +456,7 @@ class Cloud(BaseNode): bridge_name = f"{self._id}-{port_number}" if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running(): await self._ubridge_apply_filters(bridge_name, nio.filters) + await self._ubridge_apply_markers(bridge_name, nio) async def _delete_ubridge_connection(self, port_number): """ diff --git a/gns3server/compute/builtin/nodes/ethernet_switch.py b/gns3server/compute/builtin/nodes/ethernet_switch.py index d4a4863a3..a46366dd0 100644 --- a/gns3server/compute/builtin/nodes/ethernet_switch.py +++ b/gns3server/compute/builtin/nodes/ethernet_switch.py @@ -14,14 +14,45 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import asyncio +""" +Ethernet switch backed by a Linux kernel bridge driven through uBridge's +``brctl`` module. + +The historical GNS3 Ethernet switch was an emulated L2 device inside Dynamips +(``ethsw``). This implementation replaces it with a *real* Linux kernel bridge: +one bridge per switch node, managed over uBridge's hypervisor socket. Each +switch port is a persistent TAP that plays two roles at once -- uBridge holds +its file descriptor as a ``nio_tap`` relay endpoint, and the same TAP is +enslaved to the kernel bridge as a port. This dual-role TAP is exactly the +pattern the Cloud node already uses for host bridges (see +``cloud.py::_add_linux_ethernet``). + +Data path (UDP link mode):: + + peer --UDP-- ubridge[nio_udp <-> nio_tap(tap)] --tap-- kernel bridge --tap-- ... (other ports) + +The kernel bridge performs MAC learning/forwarding and VLAN filtering; uBridge +is only the per-port UDP transport (uBridge is strictly a 2-NIO pipe, it cannot +be the switch). ESW ``access``/``dot1q``/``qinq`` port modes are composed from +the ``brctl`` VLAN primitives here -- see ``_apply_port_vlan``. +""" from ...base_node import BaseNode +from ...nios.nio_udp import NIOUDP +from ...error import NodeError +from gns3server.compute.ubridge.ubridge_error import UbridgeError import logging log = logging.getLogger(__name__) +# VLAN ethertypes the Linux kernel bridge can realise. ``brctl setvlanproto`` +# accepts only 0x8100 (802.1Q) and 0x88a8 (802.1ad). The GNS3 schema also allows +# the legacy 0x9100/0x9200 QinQ ethertypes; the kernel bridge cannot do those, so +# configuring them on a qinq port is rejected. +_SUPPORTED_VLAN_ETHERTYPE = {"0x8100", "0x88a8"} +_QINQ_ETHERTYPE = "0x88a8" + class EthernetSwitch(BaseNode): @@ -32,11 +63,101 @@ class EthernetSwitch(BaseNode): :param node_id: Node identifier :param project: Project instance :param manager: Parent VM Manager + :param ports: initial switch ports """ - def __init__(self, name, node_id, project, manager): + def __init__(self, name, node_id, project, manager, console=None, console_type=None, ports=None): - super().__init__(name, node_id, project, manager) + super().__init__(name, node_id, project, manager, console=console, console_type=console_type or "none") + # The switch has no console; ``console_type="none"`` makes BaseNode skip + # reserving a TCP console port entirely. + self._ubridge_require_privileged_access = True + + self._nios = {} + self._tap_by_port = {} # port_number -> kernel TAP enslaved to the bridge + self._bridge_name = None # kernel bridge interface name (allocated on start) + self._bridge_created = False + self._bridge_proto_set = False # whether ``brctl setvlanproto`` has been applied + # Idempotency flag for start(). Decoupled from ``status`` so the node can + # report "started" (always-on, like the ESW) while ``duplicate_node`` still + # sees status "stopped" and refuses only genuinely running stateful nodes. + self._started = False + + if ports is None: + # 8 access ports in VLAN 1 by default, matching the historical ESW. + self._ports_mapping = [] + for port_number in range(0, 8): + self._ports_mapping.append( + {"port_number": port_number, "name": f"Ethernet{port_number}", "type": "access", "vlan": 1} + ) + else: + self._ports_mapping = self._normalize_ports(ports) + + # ------------------------------------------------------------------ # + # helpers + # ------------------------------------------------------------------ # + + @staticmethod + def _normalize_ports(ports): + """Assign sequential port numbers/names like the Dynamips ESW did.""" + port_number = 0 + normalized = [] + for port in ports: + port = dict(port) + port["name"] = f"Ethernet{port_number}" + port["port_number"] = port_number + normalized.append(port) + port_number += 1 + return normalized + + def _ubridge_bridge_name(self, port_number): + """Name of the per-port uBridge relay bridge (not a kernel interface).""" + return f"{self._id}-{port_number}" + + def _tap_name(self, port_number): + """Kernel TAP name for a port: ``-`` (host-unique via the bridge).""" + return f"{self._bridge_name}-{port_number}" + + def _port_settings(self, port_number): + for port in self._ports_mapping: + if port["port_number"] == port_number: + return port + return None + + # ------------------------------------------------------------------ # + # properties / serialisation + # ------------------------------------------------------------------ # + + @property + def nios(self): + return self._nios + + @property + def ports_mapping(self): + return self._ports_mapping + + @ports_mapping.setter + def ports_mapping(self, ports): + if ports != self._ports_mapping: + if len(self._nios) > 0 and len(ports) != len(self._ports_mapping): + raise NodeError("Cannot change the port count of a switch that is already connected.") + self._ports_mapping = self._normalize_ports(ports) + + @property + def console(self): + return self._console + + @console.setter + def console(self, console): + self._console = console + + @property + def console_type(self): + return self._console_type + + @console_type.setter + def console_type(self, console_type): + self._console_type = console_type def asdict(self): @@ -44,61 +165,375 @@ class EthernetSwitch(BaseNode): "name": self.name, "usage": self.usage, "node_id": self.id, - "project_id": self.project.id + "project_id": self.project.id, + "ports_mapping": self._ports_mapping, + "console": self.console, + "console_type": self.console_type, + # The switch is always-on once created (a kernel bridge), like the ESW. + "status": "started", } + # ------------------------------------------------------------------ # + # lifecycle + # ------------------------------------------------------------------ # + async def create(self): """ Creates this switch. """ - super().create() + await self.start() log.info(f'Ethernet switch "{self._name}" [{self._id}] has been created') + async def start(self): + """ + Starts this switch: bring up uBridge, create the kernel bridge, and + re-wire any ports already bound before a restart. + """ + + if not self._started: + if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running(): + await self._stop_ubridge() + await self._start_ubridge(self._ubridge_require_privileged_access) + await self._ensure_bridge() + for port_number in self._nios: + if self._nios[port_number]: + try: + await self._add_ubridge_connection(self._nios[port_number], port_number) + except (UbridgeError, NodeError) as e: + self._started = False + raise e + self._started = True + + async def _ensure_bridge(self): + """ + Creates the per-node kernel bridge once and enables VLAN filtering. + Applies the bridge-level QinQ ethertype if any port needs it. + + The bridge name is deterministic: ``gns3`` + the first 6 hex chars of + this switch's UUID (kernel interface names are ≤ 15 chars). A stale + bridge from a previous crash is deleted first so ``brctl create`` never + hits EEXIST. + """ + + if self._bridge_created: + return + # deterministic short name — 10 chars, always fits the 15-char kernel cap + self._bridge_name = "gns3" + self._id.replace("-", "")[:6] + # crash recovery: best-effort delete any leftover bridge + try: + await self._ubridge_send(f'brctl delete "{self._bridge_name}"') + except UbridgeError: + pass # not found = nothing to clean + await self._ubridge_send(f'brctl create "{self._bridge_name}"') + # ``brctl create`` leaves the bridge DOWN; bring it UP so it forwards. + await self._ubridge_send(f'link set "{self._bridge_name}" up') + await self._ubridge_send(f'brctl vlanfiltering "{self._bridge_name}" on') + self._bridge_created = True + await self._apply_bridge_proto_if_needed() + + async def _apply_bridge_proto_if_needed(self): + """ + If any port is a QinQ port using the 802.1ad ethertype (0x88a8), switch + the whole bridge to that protocol. A Linux bridge has a single VLAN + protocol, so mixed QinQ ethertypes within one switch are not supported. + """ + + proto = None + for port in self._ports_mapping: + if port.get("type") == "qinq": + # normalise case: the schema carries uppercase (e.g. "0x88A8") but + # brctl setvlanproto wants lowercase hex + ethertype = port.get("ethertype", "0x8100").lower() + if ethertype not in _SUPPORTED_VLAN_ETHERTYPE: + raise NodeError( + f"VLAN ethertype {ethertype} is not supported by the Linux bridge " + f"(only 0x8100/0x88a8) for QinQ port {port['name']}" + ) + if ethertype == _QINQ_ETHERTYPE: + proto = _QINQ_ETHERTYPE + if proto and not self._bridge_proto_set: + await self._ubridge_send(f'brctl setvlanproto "{self._bridge_name}" {proto}') + self._bridge_proto_set = True + async def delete(self): """ Deletes this switch. """ - raise NotImplementedError() + return await self.close() + + async def close(self): + """ + Closes this switch: release UDP ports, tear down the kernel bridge, stop uBridge. + """ + + if not (await super().close()): + return False + + for nio in self._nios.values(): + if nio and isinstance(nio, NIOUDP): + self.manager.port_manager.release_udp_port(nio.lport, self._project) + self._nios.clear() + self._tap_by_port.clear() + + if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running() and self._bridge_created: + try: + # Deleting the bridge releases its enslaved TAPs; uBridge destroys + # them when it stops below. + await self._ubridge_send(f'brctl delete "{self._bridge_name}"') + except UbridgeError as e: + log.warning(f'Could not delete kernel bridge "{self._bridge_name}": {e}') + self._bridge_created = False + self._bridge_proto_set = False + self._bridge_name = None + self._started = False + + await self._stop_ubridge() + log.info(f'Ethernet switch "{self._name}" [{self._id}] has been closed') + return True + + # ------------------------------------------------------------------ # + # per-port wiring + # ------------------------------------------------------------------ # async def add_nio(self, nio, port_number): """ - Adds a NIO as new port on this switch. + Adds a NIO as a new port on this switch. :param nio: NIO instance to add :param port_number: port to allocate for the NIO """ - raise NotImplementedError() + if port_number in self._nios: + raise NodeError(f"Port {port_number} isn't free") + if not isinstance(nio, NIOUDP): + raise NodeError("Ethernet switch ports only support UDP NIOs") + + log.info( + 'Ethernet switch "{name}" [{id}]: NIO {nio} bound to port {port}'.format( + name=self._name, id=self._id, nio=nio, port=port_number + ) + ) + try: + await self.start() + await self._add_ubridge_connection(nio, port_number) + self._nios[port_number] = nio + except (NodeError, UbridgeError) as e: + log.error('Cannot add NIO on Ethernet switch "{name}": {error}'.format(name=self._name, error=e)) + await self._stop_ubridge() + self.status = "stopped" + self._nios[port_number] = nio + self.project.emit("log.error", {"message": str(e)}) + + async def _add_ubridge_connection(self, nio, port_number): + """ + Wires one port: a per-port uBridge relay (nio_tap <-> nio_udp) whose TAP + is enslaved to the kernel bridge, with the port's VLAN mode applied. + """ + + port_settings = self._port_settings(port_number) + if port_settings is None: + raise NodeError(f"Port {port_number} doesn't exist on Ethernet switch '{self.name}'") + + ubridge_bridge = self._ubridge_bridge_name(port_number) + tap = self._tap_name(port_number) + + # per-port uBridge relay -- uBridge holds the TAP fd + await self._ubridge_send(f"bridge create {ubridge_bridge}") + await self._ubridge_send(f'bridge add_nio_tap {ubridge_bridge} "{tap}"') + # enslave the same TAP to the kernel bridge (the cloud.py::_add_linux_ethernet move) + await self._ubridge_send(f'brctl addif "{self._bridge_name}" "{tap}"') + # VLAN membership for this port's access/trunk/qinq mode + await self._apply_port_vlan(port_settings, tap) + # GNS3 link endpoint + await self._ubridge_send( + "bridge add_nio_udp {name} {lport} {rhost} {rport}".format( + name=ubridge_bridge, lport=nio.lport, rhost=nio.rhost, rport=nio.rport + ) + ) + await self._ubridge_apply_filters(ubridge_bridge, nio.filters) + await self._ubridge_apply_markers(ubridge_bridge, nio) + if nio.capturing: + await self._ubridge_send( + 'bridge start_capture {name} "{output_file}"'.format( + name=ubridge_bridge, output_file=nio.pcap_output_file + ) + ) + await self._ubridge_send(f"bridge start {ubridge_bridge}") + self._tap_by_port[port_number] = tap + + async def _delete_ubridge_connection(self, port_number): + """ + Tears down one port's wiring: release the TAP from the bridge and delete + the per-port uBridge relay. + """ + + tap = self._tap_by_port.pop(port_number, None) + ubridge_bridge = self._ubridge_bridge_name(port_number) + if tap is not None and self._bridge_created: + try: + await self._ubridge_send(f'brctl delif "{self._bridge_name}" "{tap}"') + except UbridgeError as e: + log.warning(f'Could not remove TAP "{tap}" from bridge "{self._bridge_name}": {e}') + try: + await self._ubridge_send(f"bridge delete {ubridge_bridge}") + except UbridgeError as e: + log.warning(f"Could not delete uBridge bridge {ubridge_bridge}: {e}") async def remove_nio(self, port_number): """ - Removes the specified NIO as member of this switch. + Removes the specified NIO from this switch. :param port_number: allocated port number - :returns: the NIO that was bound to the allocated port """ - raise NotImplementedError() + if port_number not in self._nios: + raise NodeError(f"Port {port_number} is not allocated") + + await self.stop_capture(port_number) + nio = self._nios[port_number] + if isinstance(nio, NIOUDP): + self.manager.port_manager.release_udp_port(nio.lport, self._project) + + log.info( + 'Ethernet switch "{name}" [{id}]: NIO {nio} removed from port {port}'.format( + name=self._name, id=self._id, nio=nio, port=port_number + ) + ) + del self._nios[port_number] + if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running(): + await self._delete_ubridge_connection(port_number) + return nio + + def get_nio(self, port_number): + """ + Gets a port NIO binding. + + :param port_number: port number + :returns: NIO instance + """ + + if port_number not in self._nios: + raise NodeError(f"Port {port_number} is not connected") + return self._nios[port_number] + + async def update_nio(self, port_number, nio): + """ + Re-applies uBridge filters/markers for a port (called when a link is updated). + """ + + ubridge_bridge = self._ubridge_bridge_name(port_number) + if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running(): + await self._ubridge_apply_filters(ubridge_bridge, nio.filters) + await self._ubridge_apply_markers(ubridge_bridge, nio) + + # ------------------------------------------------------------------ # + # VLAN mode translation + # ------------------------------------------------------------------ # + + async def _reset_port_vlan(self, tap): + """ + Resets a port's VLAN membership to the kernel default (PVID 1, untagged) + by re-enslaving it. Used before re-applying a changed mode so stale VIDs + from the previous mode do not leak. + """ + + await self._ubridge_send(f'brctl delif "{self._bridge_name}" "{tap}"') + await self._ubridge_send(f'brctl addif "{self._bridge_name}" "{tap}"') + + async def _apply_port_vlan(self, port_settings, tap): + """ + Translates an ESW port mode into ``brctl`` VLAN primitives. The port must + already be enslaved to the bridge and carry the default PVID 1. + + - access VLAN N: drop default 1, add N as PVID + egress untagged. + - dot1q trunk (native N): drop default 1, admit all VIDs tagged, then mark + the native VLAN PVID + untagged. (The ESW model declares only the native + VLAN per trunk port, so the trunk admits all VIDs, like the emulated ESW.) + - qinq (outer N): the bridge-level protocol is set separately; the port + gets the service VLAN as PVID + untagged so customer frames are S-tagged. + """ + + br = self._bridge_name + port_type = port_settings["type"] + vlan = int(port_settings["vlan"]) + + if port_type == "access": + await self._ubridge_send(f'brctl vlan_del "{br}" "{tap}" 1') + await self._ubridge_send(f'brctl vlan_add "{br}" "{tap}" {vlan} pvid untagged') + elif port_type == "dot1q": + await self._ubridge_send(f'brctl vlan_del "{br}" "{tap}" 1') + await self._ubridge_send(f'brctl vlan_add "{br}" "{tap}" 1 vid 4094') + await self._ubridge_send(f'brctl vlan_add "{br}" "{tap}" {vlan} pvid untagged') + elif port_type == "qinq": + # setvlanproto is applied at the bridge level by _apply_bridge_proto_if_needed + await self._ubridge_send(f'brctl vlan_del "{br}" "{tap}" 1') + await self._ubridge_send(f'brctl vlan_add "{br}" "{tap}" {vlan} pvid untagged') + else: + raise NodeError(f"Unknown port type '{port_type}' on Ethernet switch '{self.name}'") + + async def update_port_settings(self): + """ + Re-applies port settings (called after ``ports_mapping`` is updated). For + ports already wired, reset then re-apply so a mode/VLAN change fully + replaces the previous VLAN membership. + """ + + await self._apply_bridge_proto_if_needed() + if not (self._ubridge_hypervisor and self._ubridge_hypervisor.is_running() and self._bridge_created): + return + for port_settings in self._ports_mapping: + port_number = port_settings["port_number"] + tap = self._tap_by_port.get(port_number) + if tap is None: + continue + await self._reset_port_vlan(tap) + await self._apply_port_vlan(port_settings, tap) + + # ------------------------------------------------------------------ # + # capture + # ------------------------------------------------------------------ # async def start_capture(self, port_number, output_file, data_link_type="DLT_EN10MB"): """ - Starts a packet capture. + Starts a packet capture on a port (uBridge captures on the per-port relay). :param port_number: allocated port number :param output_file: PCAP destination file for the capture :param data_link_type: PCAP data link type (DLT_*), default is DLT_EN10MB """ - raise NotImplementedError() + nio = self.get_nio(port_number) + if nio.capturing: + raise NodeError(f"Packet capture is already activated on port {port_number}") + nio.start_packet_capture(output_file) + if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running(): + ubridge_bridge = self._ubridge_bridge_name(port_number) + await self._ubridge_send(f'bridge start_capture {ubridge_bridge} "{output_file}"') + log.info( + 'Ethernet switch "{name}" [{id}]: starting packet capture on port {port}'.format( + name=self.name, id=self.id, port=port_number + ) + ) async def stop_capture(self, port_number): """ - Stops a packet capture. + Stops a packet capture on a port. :param port_number: allocated port number """ - raise NotImplementedError() + nio = self.get_nio(port_number) + if not nio.capturing: + return + nio.stop_packet_capture() + if self._ubridge_hypervisor and self._ubridge_hypervisor.is_running(): + ubridge_bridge = self._ubridge_bridge_name(port_number) + await self._ubridge_send(f"bridge stop_capture {ubridge_bridge}") + log.info( + 'Ethernet switch "{name}" [{id}]: stopping packet capture on port {port}'.format( + name=self.name, id=self.id, port=port_number + ) + ) diff --git a/gns3server/compute/builtin/nodes/nat.py b/gns3server/compute/builtin/nodes/nat.py index f833f4e50..31b96b9fe 100644 --- a/gns3server/compute/builtin/nodes/nat.py +++ b/gns3server/compute/builtin/nodes/nat.py @@ -87,6 +87,23 @@ class Nat(Cloud): return True def asdict(self): + + nat_interface = self._ports_mapping[0].get("interface", "") if self._ports_mapping else "" + + host_interfaces = [] + network_interfaces = gns3server.utils.interfaces.interfaces() + for interface in network_interfaces: + if interface["name"] == nat_interface: + host_interfaces.append( + { + "name": interface["name"], + "type": interface["type"], + "special": interface["special"], + "ip_addresses": interface.get("ip_addresses", []), + } + ) + break + return { "name": self.name, "usage": self.usage, @@ -94,4 +111,5 @@ class Nat(Cloud): "project_id": self.project.id, "status": "started", "ports_mapping": self.ports_mapping, + "interfaces": host_interfaces, } diff --git a/gns3server/compute/docker/__init__.py b/gns3server/compute/docker/__init__.py index 4a64a4d3a..f076e556c 100644 --- a/gns3server/compute/docker/__init__.py +++ b/gns3server/compute/docker/__init__.py @@ -260,19 +260,21 @@ class Docker(BaseManager): return connection @locking - async def pull_image(self, image, progress_callback=None): + async def pull_image(self, image, progress_callback=None, force=False): """ Pulls an image from the Docker repository :params image: Image name :params progress_callback: A function that receive a log message about image download progress + :params force: Pull the image even if it is already available locally """ - try: - await self.query("GET", f"images/{image}/json") - return # We already have the image skip the download - except DockerHttp404Error: - pass + if not force: + try: + await self.query("GET", f"images/{image}/json") + return # We already have the image skip the download + except DockerHttp404Error: + pass if progress_callback: progress_callback(f"Pulling '{image}' from Docker repository") @@ -285,29 +287,45 @@ class Docker(BaseManager): ) # The pull api will stream status via an HTTP JSON stream content = "" - while True: - try: - chunk = await response.content.read(CHUNK_SIZE) - except aiohttp.ServerDisconnectedError: - log.error(f"Disconnected from server while pulling Docker image '{image}' from Docker repository") - break - except asyncio.TimeoutError: - log.error("Timeout while pulling Docker image '{}' from Docker repository".format(image)) - break - if not chunk: - break - content += chunk.decode("utf-8") + try: + while True: + try: + chunk = await response.content.read(CHUNK_SIZE) + except aiohttp.ServerDisconnectedError as e: + raise DockerError( + f"Disconnected while pulling Docker image '{image}' from Docker repository" + ) from e + except asyncio.TimeoutError as e: + raise DockerError( + f"Timeout while pulling Docker image '{image}' from Docker repository" + ) from e + if not chunk: + break + content += chunk.decode("utf-8") + + try: + while True: + content = content.lstrip(" \r\n\t") + answer, index = json.JSONDecoder().raw_decode(content) + if not isinstance(answer, dict): + raise DockerError(f"Invalid response while pulling Docker image '{image}'") + error_detail = answer.get("errorDetail") + error = answer.get("error") + if not error and isinstance(error_detail, dict): + error = error_detail.get("message") + if error: + raise DockerError(error) + if "progress" in answer and progress_callback: + progress_callback("Pulling image {}:{}: {}".format(image, answer["id"], answer["progress"])) + content = content[index:] + except ValueError: # Partial JSON + pass + + if content.strip(): + raise DockerError(f"Invalid response while pulling Docker image '{image}'") + finally: + response.close() - try: - while True: - content = content.lstrip(" \r\n\t") - answer, index = json.JSONDecoder().raw_decode(content) - if "progress" in answer and progress_callback: - progress_callback("Pulling image {}:{}: {}".format(image, answer["id"], answer["progress"])) - content = content[index:] - except ValueError: # Partial JSON - pass - response.close() if progress_callback: progress_callback(f"Success pulling image {image}") diff --git a/gns3server/compute/docker/docker_vm.py b/gns3server/compute/docker/docker_vm.py index 8c139cdfd..dafe3e8ee 100644 --- a/gns3server/compute/docker/docker_vm.py +++ b/gns3server/compute/docker/docker_vm.py @@ -1048,7 +1048,7 @@ class DockerVM(BaseNode): await self._fix_permissions() state = await self._get_container_state() - if state != "stopped" or state != "exited": + if state != "stopped" and state != "exited": # t=5 number of seconds to wait before killing the container try: await self.manager.query("POST", f"containers/{self._cid}/stop", params={"t": 5}) @@ -1228,6 +1228,7 @@ class DockerVM(BaseNode): ) await self._ubridge_send(f"bridge start {bridge_name}") await self._ubridge_apply_filters(bridge_name, nio.filters) + await self._ubridge_apply_markers(bridge_name, nio) async def adapter_add_nio_binding(self, adapter_number, nio): """ @@ -1268,7 +1269,7 @@ class DockerVM(BaseNode): bridge_name = f"bridge{adapter_number}" if bridge_name in self._bridges: await self._ubridge_apply_filters(bridge_name, nio.filters) - + await self._ubridge_apply_markers(bridge_name, nio) async def adapter_remove_nio_binding(self, adapter_number): """ Removes an adapter NIO binding. diff --git a/gns3server/compute/dynamips/__init__.py b/gns3server/compute/dynamips/__init__.py index 3d620b6a2..eeb4ed91f 100644 --- a/gns3server/compute/dynamips/__init__.py +++ b/gns3server/compute/dynamips/__init__.py @@ -376,6 +376,7 @@ class Dynamips(BaseManager): raise DynamipsError(f"Could not create an UDP connection to {rhost}:{rport}: {e}") nio = NIOUDP(node, lport, rhost, rport) nio.filters = nio_settings.get("filters", {}) + nio.markers = nio_settings.get("markers", {}) nio.suspend = nio_settings.get("suspend", False) elif nio_settings["type"] == "nio_generic_ethernet": ethernet_device = nio_settings["ethernet_device"] diff --git a/gns3server/compute/dynamips/nios/nio.py b/gns3server/compute/dynamips/nios/nio.py index 2872b89eb..5c5c9ec6d 100644 --- a/gns3server/compute/dynamips/nios/nio.py +++ b/gns3server/compute/dynamips/nios/nio.py @@ -40,6 +40,7 @@ class NIO: self._hypervisor = hypervisor self._name = name self._filters = {} + self._markers = {} self._suspended = False self._capturing = False self._pcap_output_file = "" @@ -303,6 +304,26 @@ class NIO: assert isinstance(new_filters, dict) self._filters = new_filters + @property + def markers(self): + """ + Returns the list of traffic-insight markers for this NIO. + + :returns: markers (dictionary) + """ + + return self._markers + + @markers.setter + def markers(self, new_markers): + """ + Set markers for this NIO. + + :param new_markers: markers (dictionary) + """ + + self._markers = new_markers + @property def capturing(self): """ diff --git a/gns3server/compute/dynamips/nios/nio_udp.py b/gns3server/compute/dynamips/nios/nio_udp.py index 47faacc43..d849a37bf 100644 --- a/gns3server/compute/dynamips/nios/nio_udp.py +++ b/gns3server/compute/dynamips/nios/nio_udp.py @@ -82,10 +82,12 @@ class NIOUDP(NIO): self._source_nio = nio_udp.NIOUDP(self._local_tunnel_rport, "127.0.0.1", self._local_tunnel_lport) self._destination_nio = nio_udp.NIOUDP(self._lport, self._rhost, self._rport) self._destination_nio.filters = self._filters + self._destination_nio.markers = self._markers await self._node.add_ubridge_udp_connection(self._bridge_name, self._source_nio, self._destination_nio) async def update(self): self._destination_nio.filters = self._filters + self._destination_nio.markers = self._markers await self._node.update_ubridge_udp_connection(self._bridge_name, self._source_nio, self._destination_nio) async def close(self): diff --git a/gns3server/compute/iou/iou_vm.py b/gns3server/compute/iou/iou_vm.py index 506bff3d7..edba56876 100644 --- a/gns3server/compute/iou/iou_vm.py +++ b/gns3server/compute/iou/iou_vm.py @@ -54,6 +54,85 @@ import sys log = logging.getLogger(__name__) +class IOUL1KeepaliveProtocol(asyncio.DatagramProtocol): + """Handle IOU/IOL Layer 1 keepalives for connected interfaces.""" + + _header = struct.Struct("!HHBBBB") + _message_type = 3 + + def __init__(self, vm): + self._vm = vm + self.transport = None + + def connection_made(self, transport): + self.transport = transport + + @staticmethod + def encode_interface(adapter_number, port_number): + """Encode an IOU bay/unit for the L1 keepalive protocol.""" + + # IOU stores the zero-based unit in the high nibble and the + # zero-based bay in the low nibble. + return (port_number << 4) | adapter_number + + @staticmethod + def decode_interface(interface): + """Decode an L1 keepalive interface into an IOU bay/unit.""" + + return interface & 0x0F, interface >> 4 + + def datagram_received(self, data, address): + if len(data) != self._header.size: + log.debug('IOU "%s": ignored malformed L1 keepalive of %d bytes', self._vm.name, len(data)) + return + + destination, source, destination_interface, source_interface, message_type, channel = self._header.unpack(data) + if ( + destination != self._vm.l1_bridge_id + or source != self._vm.application_id + or message_type != self._message_type + or not self._vm.has_nio_for_iou_interface(source_interface) + ): + return + + response = self._header.pack( + source, + destination, + source_interface, + destination_interface, + message_type, + channel, + ) + try: + self.transport.sendto(response, self._vm.l1_iou_socket_path) + except OSError as e: + # IOU creates its endpoint during startup and removes it on stop. + # Dropping a keepalive during either transition is harmless. + log.debug('IOU "%s": could not send an L1 keepalive response: %s', self._vm.name, e) + + def send_keepalives(self): + """Tell IOU that every interface with an attached NIO has Layer 1 connectivity.""" + + for adapter_number, adapter in enumerate(self._vm.adapters): + for port_number, nio in adapter.ports.items(): + if nio is None: + continue + interface = self.encode_interface(adapter_number, port_number) + keepalive = self._header.pack( + self._vm.application_id, + self._vm.l1_bridge_id, + interface, + interface, + self._message_type, + 0, + ) + try: + self.transport.sendto(keepalive, self._vm.l1_iou_socket_path) + except OSError as e: + # The IOU endpoint does not exist until the image has started. + log.debug('IOU "%s": could not send an L1 keepalive: %s', self._vm.name, e) + + class IOUVM(BaseNode): module_name = "iou" @@ -98,6 +177,8 @@ class IOUVM(BaseNode): self._lib_base = self.manager.get_images_directory() self._loader = None self._license_check = True + self._l1_keepalive_transport = None + self._l1_keepalive_task = None # IOU settings self._ethernet_adapters = [] @@ -110,7 +191,7 @@ class IOUVM(BaseNode): self._private_config = "" self._ram = 1024 # Megabytes self._application_id = application_id - self._l1_keepalives = False # used to overcome the always-up Ethernet interfaces (not supported by all IOSes). + self._l1_keepalives = False def _nvram_changed(self, path): """ @@ -637,6 +718,10 @@ class IOUVM(BaseNode): raise IOUError(f"Could not create symbolic link: {e}") command = await self._build_command() + # Only start the responder when the capability probe actually + # enabled IOU's L1 protocol on the command line. + if "-l" in command: + await self._start_l1_keepalive_responder() try: if self._loader: log.info(f"Starting IOU: {command} with loader {self._loader}") @@ -657,8 +742,10 @@ class IOUVM(BaseNode): callback = functools.partial(self._termination_callback, "IOU") gns3server.utils.asyncio.monitor_process(self._iou_process, callback) except FileNotFoundError as e: + self._stop_l1_keepalive_responder() raise IOUError(f"Could not start IOU: {e}: 32-bit binary support is probably not installed, it is recommended to use a 64-bit image instead") except (OSError, subprocess.SubprocessError) as e: + self._stop_l1_keepalive_responder() iou_stdout = self.read_iou_stdout() log.error(f"Could not start IOU {self._path}: {e}\n{iou_stdout}") raise IOUError(f"Could not start IOU {self._path}: {e}\n{iou_stdout}") @@ -746,6 +833,7 @@ class IOUVM(BaseNode): ) await self._ubridge_apply_filters(bay_id, unit_id, nio.filters) + await self._ubridge_apply_markers(bay_id, unit_id, nio) unit_id += 1 bay_id += 1 @@ -759,6 +847,7 @@ class IOUVM(BaseNode): """ self._terminate_process_iou() + self._stop_l1_keepalive_responder() if returncode != 0: if returncode == -11: message = 'IOU VM "{}" process has stopped with return code: {} (segfault). This could be an issue with the IOU image, using a different image may fix this.\n{}'.format( @@ -791,6 +880,7 @@ class IOUVM(BaseNode): Stops the IOU process. """ + self._stop_l1_keepalive_responder() await self._stop_ubridge() if self._nvram_watcher: self._nvram_watcher.close() @@ -893,6 +983,83 @@ class IOUVM(BaseNode): except OSError as e: raise IOUError(f"Could not create {netmap_path}: {e}") + @property + def l1_bridge_id(self): + return self.application_id + 512 + + @property + def l1_socket_directory(self): + # IOU hard-codes this directory independently from TMPDIR. + return os.path.join("/tmp", f"netl1{os.geteuid()}") + + @property + def l1_bridge_socket_path(self): + return os.path.join(self.l1_socket_directory, f"L1{self.l1_bridge_id}") + + @property + def l1_iou_socket_path(self): + return os.path.join(self.l1_socket_directory, f"L1{self.application_id}") + + def has_nio_for_iou_interface(self, interface): + """Return whether the IOU bay/unit encoded in one byte is connected.""" + + adapter_number, port_number = IOUL1KeepaliveProtocol.decode_interface(interface) + if adapter_number >= len(self._adapters): + return False + adapter = self._adapters[adapter_number] + return adapter.port_exists(port_number) and adapter.get_nio(port_number) is not None + + async def _start_l1_keepalive_responder(self): + """Create the bridge-side UNIX datagram endpoint used by IOU's ``-l`` option.""" + + if self._l1_keepalive_transport is not None: + return + + socket_directory = self.l1_socket_directory + try: + os.makedirs(socket_directory, mode=0o755, exist_ok=True) + if os.path.islink(socket_directory) or os.stat(socket_directory).st_uid != os.geteuid(): + raise IOUError(f"Unsafe IOU L1 keepalive directory '{socket_directory}'") + if os.path.lexists(self.l1_bridge_socket_path): + os.unlink(self.l1_bridge_socket_path) + loop = asyncio.get_running_loop() + transport, protocol = await loop.create_datagram_endpoint( + lambda: IOUL1KeepaliveProtocol(self), + local_addr=self.l1_bridge_socket_path, + family=socket.AF_UNIX, + ) + self._l1_keepalive_transport = transport + self._l1_keepalive_task = asyncio.create_task(self._send_l1_keepalives(protocol)) + log.info( + 'IOU "%s" [%s]: L1 keepalive responder listening on %s', + self._name, + self._id, + self.l1_bridge_socket_path, + ) + except (OSError, RuntimeError) as e: + self._stop_l1_keepalive_responder() + raise IOUError(f"Could not start IOU L1 keepalive responder: {e}") + + async def _send_l1_keepalives(self, protocol): + while self._l1_keepalive_transport is not None: + protocol.send_keepalives() + await asyncio.sleep(1) + + def _stop_l1_keepalive_responder(self): + """Stop the L1 endpoint and remove its bridge-side socket.""" + + if self._l1_keepalive_task is not None: + self._l1_keepalive_task.cancel() + self._l1_keepalive_task = None + if self._l1_keepalive_transport is not None: + self._l1_keepalive_transport.close() + self._l1_keepalive_transport = None + try: + if os.path.lexists(self.l1_bridge_socket_path): + os.unlink(self.l1_bridge_socket_path) + except OSError as e: + log.warning('Could not remove IOU L1 keepalive socket "%s": %s', self.l1_bridge_socket_path, e) + async def _build_command(self): """ Command to start the IOU process. @@ -1067,6 +1234,7 @@ class IOUVM(BaseNode): ) ) await self._ubridge_apply_filters(adapter_number, port_number, nio.filters) + await self._ubridge_apply_markers(adapter_number, port_number, nio) async def adapter_update_nio_binding(self, adapter_number, port_number, nio): """ @@ -1079,6 +1247,7 @@ class IOUVM(BaseNode): if self.ubridge: await self._ubridge_apply_filters(adapter_number, port_number, nio.filters) + await self._ubridge_apply_markers(adapter_number, port_number, nio) async def _ubridge_apply_filters(self, adapter_number, port_number, filters): """ @@ -1095,6 +1264,105 @@ class IOUVM(BaseNode): cmd = "iol_bridge add_packet_filter {} {}".format(location, filter) await self._ubridge_send(cmd) + async def _ubridge_apply_markers(self, adapter_number, port_number, nio): + """ + (Re-)apply traffic-insight markers to the IOL bridge. + + IOU uses ``iol_bridge`` (not ``bridge``) and the ``add_packet_filter`` + command carries extra ``{bay} {unit}`` positional arguments between the + bridge name and the filter name — this override mirrors the pattern in + ``_ubridge_apply_filters`` above. + + :param adapter_number: bay id + :param port_number: unit id + :param nio: NIO instance carrying ``nio.markers`` + """ + from gns3server.compute.marker.marker_manager import MarkerManager + + markers = nio.markers if hasattr(nio, 'markers') else {} + if not markers: + return + + manager = MarkerManager.instance() + markers_dir = self.project.markers_working_directory() + bridge_name = f"IOL-BRIDGE-{self.application_id + 512}" + location = "{bridge_name} {bay} {unit}".format( + bridge_name=bridge_name, bay=adapter_number, unit=port_number + ) + for name, spec in markers.items(): + link_id = spec.get("link_id", "") + # Incremental: skip markers already installed on this port. A NIO + # update carries EVERY marker on the port (e.g. an inherited + # global-* copy plus a newly added private one); uBridge's + # add_packet_filter rejects a duplicate filter name (packet_filter.c), + # so we must not re-add one already here — mirrors the generic + # _ubridge_apply_markers guard. A fresh bridge has an empty map + # (cleared on _stop_ubridge) so all are installed. + if (name, link_id) in self._marker_filter_bridges: + continue + bpf = spec.get("bpf", "") + tag = spec.get("tag") + pcap_path = os.path.join( + markers_dir, f"{self._id}_{link_id}_{name}.pcap" + ) + # Build the iol_bridge marker filter command: + # iol_bridge add_packet_filter {br} {bay} {unit} {name} mark "{bpf}" [tag {id}] pcap "{path}" + cmd = 'iol_bridge add_packet_filter {loc} {name} mark "{bpf}"'.format( + loc=location, name=name, bpf=bpf + ) + if tag is not None: + cmd += f" tag {tag}" + # IOU uses one per-node IOL-BRIDGE for every link, so bridge+filter + # are identical across this node's links — `link` is the only way the + # controller can tell their signals apart (contract §3.2). + if link_id: + cmd += f" link {link_id}" + direction = spec.get("direction") + if direction is not None: + cmd += f" dir {direction}" + linktype = self._marker_linktype(spec.get("data_link_type")) + if linktype is not None: + cmd += f" linktype {linktype}" + cmd += ' pcap "{path}"'.format(path=pcap_path) + try: + await self._ubridge_send(cmd) + except UbridgeError as e: + if "syntax error" in str(e).lower() or "compile filter" in str(e).lower(): + message = f"Warning: ignoring marker '{name}' due to BPF syntax error: {e}" + log.warning(message) + self.project.emit("log.warning", {"message": message}) + continue + raise + if not spec.get("enabled", True): + try: + await self._ubridge_send(f"iol_bridge enable_packet_filter {location} {name} off") + except UbridgeError as e: + log.warning(f"Could not turn marker '{name}' off on {location}: {e}") + manager.register( + str(self.project.id), self._id, name, link_id, tag + ) + # Record name -> location (bridge bay unit) for instant toggle. + self._marker_filter_bridges[name, link_id] = location + + async def _ubridge_set_marker_filter_state(self, name, enabled): + """IOU override: toggle every (name, link_id) entry via ``iol_bridge``.""" + + state = "on" if enabled else "off" + for (n, lid), location in list(self._marker_filter_bridges.items()): + if n == name: + await self._ubridge_send(f"iol_bridge enable_packet_filter {location} {name} {state}") + + async def _ubridge_delete_marker_filter(self, location, name): + """IOU override: remove a single marker filter via ``iol_bridge`` + (location = ``{bridge} {bay} {unit}``), not a bridge-wide reset.""" + + if not (self._ubridge_hypervisor and self._ubridge_hypervisor.is_running()): + return + try: + await self._ubridge_send(f"iol_bridge delete_packet_filter {location} {name}") + except UbridgeError as e: + log.warning("Could not remove marker filter '%s' from %s: %s", name, location, e) + async def adapter_remove_nio_binding(self, adapter_number, port_number): """ Removes an adapter NIO binding. @@ -1207,8 +1475,9 @@ class IOUVM(BaseNode): """ env = os.environ.copy() - if "IOURC" not in os.environ: - env["IOURC"] = self.iourc_path + iourc_path = self.iourc_path + if "IOURC" not in os.environ and iourc_path: + env["IOURC"] = iourc_path try: output = await gns3server.utils.asyncio.subprocess_check_output( *self._loader, self._path, "-h", cwd=self.working_dir, env=env, stderr=True diff --git a/gns3server/compute/marker/__init__.py b/gns3server/compute/marker/__init__.py new file mode 100644 index 000000000..8fdb2b775 --- /dev/null +++ b/gns3server/compute/marker/__init__.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# +# Copyright (C) 2024 GNS3 Technologies Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# +# Traffic-insight marker subsystem (compute side). +# +# ubridge's ``marker`` module is a passive tap: on a BPF match it emits a UDP +# ``MARK`` signal to a configured sink and/or appends the packet to a pcap. +# This package owns the compute-side UDP sink: one listener per compute process +# serves every ubridge on that host, disambiguated by ``node=``. diff --git a/gns3server/compute/marker/marker_listener.py b/gns3server/compute/marker/marker_listener.py new file mode 100644 index 000000000..2b5e5d47f --- /dev/null +++ b/gns3server/compute/marker/marker_listener.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python +# +# Copyright (C) 2024 GNS3 Technologies Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import asyncio +import logging + +log = logging.getLogger(__name__) + + +class MarkerListener(asyncio.DatagramProtocol): + """ + Receives ubridge ``MARK`` signal datagrams and turns each into a + ``marker.match`` notification. + + Signal format (one datagram per match, ASCII):: + + MARK node= filter= tag= len= [dir=]\\n + + The signal carries metadata only (no packet bytes). ``dir`` is optional and + additive: uBridge stamps it from the ingress NIO of the matched packet to + indicate travel direction relative to the capture node (the ``node=`` + above) — ``tx`` = the capture node is sending (ingressed on the device-side + NIO), ``rx`` = it is receiving (ingressed on the link-side NIO). Older + uBridge builds omit it, so the listener leaves ``dir`` unset and consumers + fall back to undirected rendering. Unknown keys are always ignored, so the + field ships safely with no version coupling. + + The compute-side + :class:`~gns3server.compute.marker.marker_manager.MarkerManager` registry + resolves ``(node_id, filter_name)`` to ``(project_id, link_id, tag)`` so the + event can be emitted on the right project-scoped notification stream. + """ + + def __init__(self, manager): + # MarkerManager owns this listener and the registry. + self._manager = manager + self.transport = None + + def connection_made(self, transport): + self.transport = transport + + def datagram_received(self, data, addr): + try: + self._handle(data) + except Exception: + # Never let a malformed datagram kill the listener. + log.exception("Failed to process MARK datagram from %s: %r", addr, data) + + def _handle(self, data): + line = data.decode("utf-8", errors="replace").strip() + if not line.startswith("MARK"): + return + + parts = line.split() + # parts[0] == "MARK"; parts[1] == "" + if len(parts) < 2: + return + + try: + ts = float(parts[1]) + except ValueError: + log.warning("Ignoring MARK signal with bad timestamp: %r", line) + return + + kv = {} + for token in parts[2:]: + if "=" in token: + key, value = token.split("=", 1) + kv[key] = value + + node_id = kv.get("node") + filter_name = kv.get("filter") + if not node_id or not filter_name: + return + + # "-" means the field was unset on the ubridge side (see contract §3.3). + link = kv.get("link") + tag = kv.get("tag") + length = kv.get("len") + # Travel direction relative to the capture node (the node= above): + # "tx" = capture node is sending (matched packet ingressed on the + # device-side NIO), "rx" = it is receiving (link-side NIO). Older + # uBridge builds omit dir; None here lets consumers render undirected. + direction = kv.get("dir") + + project_id, link_id, registered_tag = self._manager.lookup(node_id, filter_name) + if project_id is None: + log.warning( + "MARK signal for unregistered node=%s filter=%s, dropping", node_id, filter_name + ) + return + + # `link=` is the authoritative per-link id (opaque, set by gns3server at + # filter install time). It disambiguates signals that share a node+filter + # across several links; fall back to the registry's link only for legacy + # signals that carry no `link=`. + signal_link = link if link and link != "-" else None + + event = { + "project_id": project_id, + "node_id": node_id, + "link_id": signal_link or link_id, + "filter": filter_name, + # Prefer the value carried in the signal; fall back to the one we registered. + "tag": tag if tag and tag != "-" else registered_tag, + "ts": ts, + "len": int(length) if length and length.isdigit() else 0, + # Travel direction relative to the capture node (node_id above); + # None when the signal carries none (older uBridge) — undirected. + "dir": direction, + } + self._manager.emit_match(project_id, event) diff --git a/gns3server/compute/marker/marker_manager.py b/gns3server/compute/marker/marker_manager.py new file mode 100644 index 000000000..6ec128158 --- /dev/null +++ b/gns3server/compute/marker/marker_manager.py @@ -0,0 +1,185 @@ +#!/usr/bin/env python +# +# Copyright (C) 2024 GNS3 Technologies Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import asyncio +import logging + +from gns3server.compute.marker.marker_listener import MarkerListener +from gns3server.compute.notification_manager import NotificationManager + +log = logging.getLogger(__name__) + + +class MarkerManager: + """ + Singleton owning the compute-side UDP sink for ubridge ``MARK`` signals and + the registry that maps each ``(node_id, filter_name)`` back to its + ``(project_id, link_id, tag)``. + + The registry is populated when a marker is created on a link (the compute + endpoint has project_id + node_id from its route path and link_id/name/tag + from the request body) and cleared when the marker is deleted or the project + closed. At signal time it is an O(1) lookup — no node-table scan, and the + signal payload is untouched. + + One listener per compute process serves every ubridge on that host; source + ubridges are disambiguated by ``node=`` (UUID, globally unique). + """ + + def __init__(self): + + self._listener = None + self._transport = None + self._host = None + self._port = None + # Flat lookup: (node_id, filter_name) -> {"project_id", "link_id", "tag"} + self._entries = {} + # Reverse index for O(1) per-project teardown: project_id -> set of keys + self._by_project = {} + + @property + def host(self): + """The host the UDP sink is reachable on (for ``marker sink``).""" + return self._host + + @property + def port(self): + """The UDP port the sink is bound on (for ``marker sink``).""" + return self._port + + @property + def running(self): + return self._transport is not None + + async def start(self, host="127.0.0.1", port=0): + """ + Bind the UDP sink. ``port=0`` lets the OS choose a free port, which is + then read back and exposed via :attr:`port` for ``marker sink`` commands. + """ + + if self.running: + return + loop = asyncio.get_running_loop() + self._listener = MarkerListener(self) + try: + self._transport, _ = await loop.create_datagram_endpoint( + lambda: self._listener, local_addr=(host, port) + ) + except OSError: + if port != 0: + log.warning( + "Marker listener: port %s unavailable, falling back to OS-assigned port", port + ) + try: + self._transport, _ = await loop.create_datagram_endpoint( + lambda: self._listener, local_addr=(host, 0) + ) + except OSError as e: + log.error( + "Marker listener startup failed: %s. Traffic insight signals are unavailable.", e + ) + self._listener = None + return + else: + log.error( + "Marker listener startup failed on OS-assigned port. Traffic insight signals are unavailable." + ) + self._listener = None + return + sock = self._transport.get_extra_info("socket") + self._host = host + self._port = sock.getsockname()[1] if sock else port + log.info("Marker signal sink listening on %s:%s", self._host, self._port) + + async def stop(self): + """Close the UDP sink and drop the whole registry.""" + + if self._transport: + self._transport.close() + self._transport = None + self._listener = None + self._entries.clear() + self._by_project.clear() + self._host = None + self._port = None + + def register(self, project_id, node_id, filter_name, link_id, tag=None): + """ + Record that ``filter_name`` on ``node_id`` belongs to ``project_id`` / + ``link_id``. Called from the compute marker-start endpoint. + + Re-registering the same key updates the stored tag (e.g. on re-add). + """ + + key = (node_id, filter_name) + self._entries[key] = {"project_id": project_id, "link_id": link_id, "tag": tag} + self._by_project.setdefault(project_id, set()).add(key) + + def unregister(self, node_id, filter_name): + """Forget a single marker. Returns True if something was removed.""" + + key = (node_id, filter_name) + entry = self._entries.pop(key, None) + if entry is None: + return False + project_entries = self._by_project.get(entry["project_id"]) + if project_entries is not None: + project_entries.discard(key) + if not project_entries: + self._by_project.pop(entry["project_id"], None) + return True + + def unregister_project(self, project_id): + """Drop every marker belonging to ``project_id`` (project close).""" + + keys = self._by_project.pop(project_id, None) + if not keys: + return + for key in keys: + self._entries.pop(key, None) + + def lookup(self, node_id, filter_name): + """ + O(1) resolution of an incoming signal to its project/link/tag. + + :returns: (project_id, link_id, tag) or (None, None, None) on miss. + """ + + entry = self._entries.get((node_id, filter_name)) + if entry is None: + return None, None, None + return entry["project_id"], entry["link_id"], entry["tag"] + + def emit_match(self, project_id, event): + """ + Forward a parsed match as a project-scoped ``marker.match`` notification. + Flows compute -> controller dispatch -> project_emit -> web UI WS. + """ + + NotificationManager.instance().emit("marker.match", event, project_id=project_id) + + _instance = None + + @staticmethod + def instance(): + if MarkerManager._instance is None: + MarkerManager._instance = MarkerManager() + return MarkerManager._instance + + @staticmethod + def reset(): + MarkerManager._instance = None diff --git a/gns3server/compute/nios/nio.py b/gns3server/compute/nios/nio.py index 8ad5bd870..6fe57a130 100644 --- a/gns3server/compute/nios/nio.py +++ b/gns3server/compute/nios/nio.py @@ -30,6 +30,7 @@ class NIO: self._capturing = False self._suspended = False self._filters = {} + self._markers = {} self._pcap_output_file = "" self._pcap_data_link_type = "" @@ -118,3 +119,24 @@ class NIO: assert isinstance(new_filters, dict) self._filters = new_filters + + @property + def markers(self): + """ + Returns the traffic-insight markers for this NIO. + + :returns: markers (dictionary: name -> {bpf, tag, link_id}) + """ + + return self._markers + + @markers.setter + def markers(self, new_markers): + """ + Set the traffic-insight markers for this NIO. + + :param new_markers: markers (dictionary: name -> {bpf, tag, link_id}) + """ + + assert isinstance(new_markers, dict) + self._markers = new_markers diff --git a/gns3server/compute/nios/nio_udp.py b/gns3server/compute/nios/nio_udp.py index b7736a39e..e6f1bd8bc 100644 --- a/gns3server/compute/nios/nio_udp.py +++ b/gns3server/compute/nios/nio_udp.py @@ -80,5 +80,6 @@ class NIOUDP(NIO): "rport": self._rport, "rhost": self._rhost, "suspend": self._suspended, - "filters": self._filters + "filters": self._filters, + "markers": self._markers } diff --git a/gns3server/compute/project.py b/gns3server/compute/project.py index eebb65ca1..ae3b5c8d1 100644 --- a/gns3server/compute/project.py +++ b/gns3server/compute/project.py @@ -246,6 +246,22 @@ class Project: raise ComputeError(f"Could not create the capture working directory: {e}") return workdir + def markers_working_directory(self): + """ + Returns the working directory where uBridge writes per-link marker pcaps + (matched packets, kept for later replay). + + :returns: path to the directory + """ + + workdir = os.path.join(self._path, "project-files", "markers") + if not self._deleted: + try: + os.makedirs(workdir, exist_ok=True) + except OSError as e: + raise ComputeError(f"Could not create the markers working directory: {e}") + return workdir + def add_node(self, node): """ Adds a node to the project. diff --git a/gns3server/compute/qemu/qemu_vm.py b/gns3server/compute/qemu/qemu_vm.py index f91177111..ce538d7f6 100644 --- a/gns3server/compute/qemu/qemu_vm.py +++ b/gns3server/compute/qemu/qemu_vm.py @@ -34,6 +34,7 @@ import json import shlex import psutil +from pathlib import Path from gns3server.utils import parse_version from gns3server.utils.asyncio import subprocess_check_output, cancellable_wait_run_in_executor from .qemu_error import QemuError @@ -1337,7 +1338,7 @@ class QemuVM(BaseNode): ) ) else: - log.info( + log.debug( f"Connected to QEMU monitor on {self._monitor_host}:{self._monitor} after {time.time() - begin:.4f} seconds" ) return reader, writer @@ -1354,7 +1355,7 @@ class QemuVM(BaseNode): result = None if self.is_running() and self._monitor: - log.info(f"Execute QEMU monitor command: {command}") + log.debug(f"Execute QEMU monitor command: {command}") reader, writer = await self._open_qemu_monitor_connection_vm() if reader is None and writer is None: return result @@ -1404,7 +1405,7 @@ class QemuVM(BaseNode): return for command in commands: - log.info(f"Execute QEMU monitor command: {command}") + log.debug(f"Execute QEMU monitor command: {command}") try: cmd_byte = command.encode("ascii") writer.write(cmd_byte + b"\n") @@ -2292,15 +2293,22 @@ class QemuVM(BaseNode): options.extend(["-bios", self._bios_image.replace(",", ",,")]) elif self._uefi: - + system_ovmf_firmware_dir = Path(self.manager.config.settings.Qemu.ovmf_firmware_dir) + log.info("Using OVMF firmware directory: {}".format(system_ovmf_firmware_dir)) old_ovmf_vars_path = os.path.join(self.working_dir, "OVMF_VARS.fd") if os.path.exists(old_ovmf_vars_path): # the node has its own UEFI variables store already, we must also use the old UEFI firmware ovmf_firmware_path = self.manager.get_abs_image_path("OVMF_CODE.fd") else: - system_ovmf_firmware_path = "/usr/share/OVMF/OVMF_CODE_4M.fd" - if os.path.exists(system_ovmf_firmware_path): - ovmf_firmware_path = system_ovmf_firmware_path + # Use a manual case-insensitive search instead + try: + system_ovmf_firmware_path = next((f for f in system_ovmf_firmware_dir.glob("*.fd") + if f.name.lower() == "ovmf_code_4m.fd"), None) + except (FileNotFoundError, StopIteration): + system_ovmf_firmware_path = None + + if system_ovmf_firmware_path: + ovmf_firmware_path = str(system_ovmf_firmware_path) else: # otherwise, get the UEFI firmware from the images directory ovmf_firmware_path = self.manager.get_abs_image_path("OVMF_CODE_4M.fd") @@ -2309,9 +2317,13 @@ class QemuVM(BaseNode): options.extend(["-drive", "if=pflash,format=raw,readonly,file={}".format(ovmf_firmware_path)]) # try to use the UEFI variables store from the system first - system_ovmf_vars_path = "/usr/share/OVMF/OVMF_VARS_4M.fd" - if os.path.exists(system_ovmf_vars_path): - ovmf_vars_path = system_ovmf_vars_path + try: + system_ovmf_vars_path = next((f for f in system_ovmf_firmware_dir.glob("*.fd") + if f.name.lower() == "ovmf_vars_4m.fd"), None) + except (FileNotFoundError, StopIteration): + system_ovmf_vars_path = None + if system_ovmf_vars_path: + ovmf_vars_path = str(system_ovmf_vars_path) else: # otherwise, get the UEFI variables store from the images directory ovmf_vars_path = self.manager.get_abs_image_path("OVMF_VARS_4M.fd") @@ -2327,6 +2339,10 @@ class QemuVM(BaseNode): except OSError as e: raise QemuError("Cannot copy OVMF_VARS_4M.fd file to the node working directory: {}".format(e)) options.extend(["-drive", "if=pflash,format=raw,file={}".format(ovmf_vars_node_path)]) + + # edk2 firmware requires a Random Number Generator (RNG) device in order to turn network adapters on + options.extend(["-object", "rng-random,filename=/dev/urandom,id=rng0"]) + options.extend(["-device", "virtio-rng-pci,rng=rng0"]) return options def _linux_boot_options(self): @@ -2649,7 +2665,6 @@ class QemuVM(BaseNode): elif sys.platform.startswith("darwin"): command.extend(["-enable-hax"]) command.extend(["-boot", f"order={self._boot_priority}"]) - command.extend(self._bios_option()) command.extend(self._cdrom_option()) command.extend(await self._disk_options()) command.extend(self._linux_boot_options()) @@ -2659,6 +2674,8 @@ class QemuVM(BaseNode): command.extend(self._aux_options()) command.extend(self._monitor_options()) command.extend(await self._network_options()) + # bios options must be last to have predictable NIC numbering, see https://github.com/GNS3/gns3-server/issues/2838 + command.extend(self._bios_option()) if self.on_close != "save_vm_state": await self._clear_save_vm_stated() else: diff --git a/gns3server/compute/ubridge/hypervisor.py b/gns3server/compute/ubridge/hypervisor.py index a702adb34..89d815100 100644 --- a/gns3server/compute/ubridge/hypervisor.py +++ b/gns3server/compute/ubridge/hypervisor.py @@ -18,11 +18,11 @@ Represents a uBridge hypervisor and starts/stops the associated uBridge process. """ -import sys import os +import socket import subprocess import asyncio -import socket +import tempfile import re from gns3server.utils import parse_version @@ -44,17 +44,42 @@ class Hypervisor(UBridgeHypervisor): :param project: Project instance :param path: path to uBridge executable :param working_dir: working directory - :param host: host/address for this hypervisor - :param port: port for this hypervisor + :param transport: control channel transport — "unix" (-U) or "tcp" (-H) + :param host: host/address for the TCP transport (unused for "unix") + :param node_id: node id used to name the AF_UNIX socket (unix transport) """ - _instance_count = 1 + _instance_count = 0 - def __init__(self, project, path, working_dir, host, port=None): + def __init__(self, project, path, working_dir, transport, host=None, node_id=None): - if port is None: + self._project = project + self._path = path + self._working_dir = working_dir + + if transport == "unix": + # AF_UNIX control socket (-U). Name it after the node so the socket + # is self-describing (one ubridge per node => node_id is unique). + # sun_path is capped at 107 bytes; a single UUID fits comfortably + # (~69 bytes with this prefix), so no project_id is needed. + if node_id: + socket_name = f"ubridge-{node_id}.sock" + else: + Hypervisor._instance_count += 1 + socket_name = f"ubridge-{Hypervisor._instance_count}.sock" + runtime_dir = os.environ.get("XDG_RUNTIME_DIR") or tempfile.gettempdir() + socket_dir = os.path.join(runtime_dir, "gns3") + try: + os.makedirs(socket_dir, mode=0o700, exist_ok=True) + os.chmod(socket_dir, 0o700) + except OSError as e: + raise UbridgeError(f"Could not create uBridge socket directory {socket_dir}: {e}") + socket_path = os.path.join(socket_dir, socket_name) + super().__init__(socket_path=socket_path) + else: + # TCP control channel (-H): let the OS find an unused local port. + port = None try: - port = None info = socket.getaddrinfo(host, 0, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE) if not info: raise UbridgeError(f"getaddrinfo returns an empty list on {host}") @@ -68,11 +93,8 @@ class Hypervisor(UBridgeHypervisor): break except OSError as e: raise UbridgeError(f"Could not find free port for the uBridge hypervisor: {e}") + super().__init__(host=host, port=port) - super().__init__(host, port) - self._project = project - self._path = path - self._working_dir = working_dir self._command = [] self._process = None self._stdout_file = "" @@ -131,19 +153,17 @@ class Hypervisor(UBridgeHypervisor): async def _check_ubridge_version(self, env=None): """ - Checks if the ubridge executable version + Checks if the ubridge executable version meets the minimum required. """ try: output = await subprocess_check_output(self._path, "-v", cwd=self._working_dir, env=env) match = re.search(r"ubridge version ([0-9a-z\.]+)", output) if match: self._version = match.group(1) - if sys.platform.startswith("darwin"): - minimum_required_version = "0.9.12" - else: - # uBridge version 0.9.14 is required for packet filters - # to work for IOU nodes. - minimum_required_version = "0.9.14" + # uBridge >= 1.2.0 is required for features this server now + # relies on: the AF_UNIX control channel (-U), the marker + # (mark) filter, and the brctl-backed builtin Ethernet Switch. + minimum_required_version = "1.2.0" if parse_version(self._version) < parse_version(minimum_required_version): raise UbridgeError(f"uBridge executable version must be >= {minimum_required_version}") else: @@ -169,6 +189,17 @@ class Hypervisor(UBridgeHypervisor): ) log.info(f"ubridge started PID={self._process.pid}") + # An unsupported flag (e.g. -U on an old ubridge build) makes ubridge exit + # immediately with a non-zero code. Detect that here and surface the real + # reason from ubridge.log instead of waiting for connect() to time out with + # a confusing "couldn't connect" error. + await asyncio.sleep(0.3) + if self._process.returncode is not None: + raise UbridgeError( + f"uBridge exited immediately (code {self._process.returncode}); if " + f"ubridge_control_transport is 'unix', the installed ubridge may not " + f"support -U.\n{self.read_stdout()}" + ) # recv: Bad address is received by uBridge when a docker image stops by itself # see https://github.com/GNS3/gns3-gui/issues/2957 # monitor_process(self._process, self._termination_callback) @@ -214,6 +245,16 @@ class Hypervisor(UBridgeHypervisor): os.remove(self._stdout_file) except OSError as e: log.warning(f"could not delete temporary uBridge log file: {e}") + + # ubridge unlinks its AF_UNIX control socket on a clean exit; for the + # unix transport remove it here too so a killed process leaves no stale + # socket behind. The TCP transport has no socket_path. + if self._socket_path: + try: + os.unlink(self._socket_path) + except OSError: + pass + self._process = None self._started = False @@ -250,7 +291,10 @@ class Hypervisor(UBridgeHypervisor): """ command = [self._path] - command.extend(["-H", f"{self._host}:{self._port}"]) + if self._socket_path: + command.extend(["-U", self._socket_path]) + else: + command.extend(["-H", f"{self._host}:{self._port}"]) if log.getEffectiveLevel() == logging.DEBUG: command.extend(["-d", "1"]) return command diff --git a/gns3server/compute/ubridge/ubridge_hypervisor.py b/gns3server/compute/ubridge/ubridge_hypervisor.py index a44bf3834..83f765d16 100644 --- a/gns3server/compute/ubridge/ubridge_hypervisor.py +++ b/gns3server/compute/ubridge/ubridge_hypervisor.py @@ -28,20 +28,29 @@ log = logging.getLogger(__name__) class UBridgeHypervisor: """ - Creates a new connection to uBridge hypervisor. + Creates a new connection to a uBridge hypervisor control channel. - :param host: the hostname or ip address string of the uBridge hypervisor - :param port: the tcp port integer + Two transports, selected by which argument is set: + * ``socket_path`` -> AF_UNIX (``-U``), authenticated in-kernel via + SO_PEERCRED (ubridge accepts only its own UID; the compute process that + spawned it shares that UID). Recommended on Linux. + * ``host``/``port`` -> TCP (``-H``), retained for backward compatibility. + + :param socket_path: path to the uBridge AF_UNIX control socket (None for TCP) + :param host: TCP hostname/IP (None for AF_UNIX) + :param port: TCP port :param timeout: timeout integer for how long to wait for a response to commands sent to the - hypervisor (defaults to 30 seconds) + hypervisor (defaults to 30 seconds) """ # Used to parse Ubridge response codes error_re = re.compile(r"""^2[0-9]{2}-""") success_re = re.compile(r"""^1[0-9]{2}\s{1}""") - def __init__(self, host, port, timeout=30.0): + def __init__(self, socket_path=None, host=None, port=None, timeout=30.0): + # Exactly one transport is active: socket_path (AF_UNIX) or host/port (TCP). + self._socket_path = socket_path self._host = host self._port = port self._version = "N/A" @@ -54,22 +63,23 @@ class UBridgeHypervisor: Connects to the hypervisor. """ - # connect to a local address by default - # if listening to all addresses (IPv4 or IPv6) - if self._host == "0.0.0.0": - host = "127.0.0.1" - elif self._host == "::": - host = "::1" - else: - host = self._host - begin = time.time() connection_success = False last_exception = None while time.time() - begin < timeout: await asyncio.sleep(0.1) try: - self._reader, self._writer = await asyncio.open_connection(host, self._port) + if self._socket_path: + self._reader, self._writer = await asyncio.open_unix_connection(self._socket_path) + else: + # connect to a local address by default if listening on all addresses + if self._host == "0.0.0.0": + host = "127.0.0.1" + elif self._host == "::": + host = "::1" + else: + host = self._host + self._reader, self._writer = await asyncio.open_connection(host, self._port) except OSError as e: last_exception = e continue @@ -77,9 +87,9 @@ class UBridgeHypervisor: break if not connection_success: - raise UbridgeError(f"Couldn't connect to hypervisor on {host}:{self._port} :{last_exception}") + raise UbridgeError(f"Couldn't connect to hypervisor on {self.endpoint} :{last_exception}") else: - log.info(f"Connected to uBridge hypervisor on {host}:{self._port} after {time.time() - begin:.4f} seconds") + log.info(f"Connected to uBridge hypervisor on {self.endpoint} after {time.time() - begin:.4f} seconds") try: await asyncio.sleep(0.1) @@ -122,7 +132,7 @@ class UBridgeHypervisor: await self._writer.drain() self._writer.close() except OSError as e: - log.debug(f"Stopping hypervisor {self._host}:{self._port} {e}") + log.debug(f"Stopping hypervisor {self.endpoint} {e}") self._reader = self._writer = None async def reset(self): @@ -133,44 +143,17 @@ class UBridgeHypervisor: await self.send("hypervisor reset") @property - def port(self): + def endpoint(self): """ - Returns the port used to start the hypervisor. + Returns a human-readable control endpoint: the AF_UNIX socket path when + using -U, or host:port when using -H. Used for logging and errors. - :returns: port number (integer) + :returns: endpoint (string) """ - return self._port - - @port.setter - def port(self, port): - """ - Sets the port used to start the hypervisor. - - :param port: port number (integer) - """ - - self._port = port - - @property - def host(self): - """ - Returns the host (binding) used to start the hypervisor. - - :returns: host/address (string) - """ - - return self._host - - @host.setter - def host(self, host): - """ - Sets the host (binding) used to start the hypervisor. - - :param host: host/address (string) - """ - - self._host = host + if self._socket_path: + return self._socket_path + return f"{self._host}:{self._port}" @locking async def send(self, command): @@ -205,8 +188,8 @@ class UBridgeHypervisor: await self._writer.drain() except OSError as e: raise UbridgeError( - "Lost communication with {host}:{port} when sending command '{command}': {error}, uBridge process running: {run}".format( - host=self._host, port=self._port, command=command, error=e, run=self.is_running() + "Lost communication with {endpoint} when sending command '{command}': {error}, uBridge process running: {run}".format( + endpoint=self.endpoint, command=command, error=e, run=self.is_running() ) ) @@ -232,8 +215,8 @@ class UBridgeHypervisor: if not chunk: if retries > max_retries: raise UbridgeError( - "No data returned from {host}:{port} after sending command '{command}', uBridge process running: {run}".format( - host=self._host, port=self._port, command=command, run=self.is_running() + "No data returned from {endpoint} after sending command '{command}', uBridge process running: {run}".format( + endpoint=self.endpoint, command=command, run=self.is_running() ) ) else: @@ -244,8 +227,8 @@ class UBridgeHypervisor: buf += chunk.decode("utf-8") except OSError as e: raise UbridgeError( - "Lost communication with {host}:{port} after sending command '{command}': {error}, uBridge process running: {run}".format( - host=self._host, port=self._port, command=command, error=e, run=self.is_running() + "Lost communication with {endpoint} after sending command '{command}': {error}, uBridge process running: {run}".format( + endpoint=self.endpoint, command=command, error=e, run=self.is_running() ) ) @@ -255,8 +238,8 @@ class UBridgeHypervisor: continue except IndexError: raise UbridgeError( - "Could not communicate with {host}:{port} after sending command '{command}', uBridge process running: {run}".format( - host=self._host, port=self._port, command=command, run=self.is_running() + "Could not communicate with {endpoint} after sending command '{command}', uBridge process running: {run}".format( + endpoint=self.endpoint, command=command, run=self.is_running() ) ) diff --git a/gns3server/config_samples/gns3_server.conf b/gns3server/config_samples/gns3_server.conf index 248e18fcc..50a6ca01a 100644 --- a/gns3server/config_samples/gns3_server.conf +++ b/gns3server/config_samples/gns3_server.conf @@ -4,6 +4,7 @@ jwt_secret_key = efd08eccec3bd0a1be2e086670e5efa90969c68d07e072d7354a76cea5e33d4e jwt_algorithm = HS256 jwt_access_token_expire_minutes = 1440 +jwt_refresh_token_expire_minutes = 43200 ; Initial default super admin username ; It cannot be changed once the controller has started once @@ -91,6 +92,19 @@ udp_end_port_range = 30000 ; uBridge executable location, default: search in PATH ;ubridge_path = ubridge +; uBridge control channel transport: "unix" (-U socket_path; AF_UNIX + +; SO_PEERCRED, default — recommended on Linux for kernel-level peer +; authentication) or "tcp" (-H host:port; retained for backward compatibility, +; binds loopback). +;ubridge_control_transport = unix + +; Marker (traffic-insight) UDP sink: one listener per compute process that +; receives uBridge MARK signals from every uBridge on this host. +; marker_listen_host defaults to 127.0.0.1 because uBridge runs locally. +; marker_listen_port defaults to 3070 (set to 0 for OS-chosen). +;marker_listen_host = 127.0.0.1 +;marker_listen_port = 3070 + ; Option to enable or disable compute HTTP authentication enable_http_auth = True @@ -169,6 +183,8 @@ enable_hardware_acceleration = True require_hardware_acceleration = False ; Allow unsafe additional command line options allow_unsafe_options = False +; Path to the OVMF firmware directory +ovmf_firmware_dir = "/usr/share/OVMF" [WebWireshark] ; Enable Web Wireshark feature (container-based Wireshark in browser) diff --git a/gns3server/controller/__init__.py b/gns3server/controller/__init__.py index 9cfe2bcd7..9a519a616 100644 --- a/gns3server/controller/__init__.py +++ b/gns3server/controller/__init__.py @@ -29,7 +29,7 @@ try: except ImportError: from importlib import resources as importlib_resources -from watchdog.events import FileSystemEventHandler +from watchdog.events import FileSystemEventHandler, DirDeletedEvent, FileDeletedEvent from watchdog.observers import Observer from ..config import Config @@ -73,6 +73,9 @@ class _ProjectsDirectoryEventHandler(FileSystemEventHandler): def on_moved(self, event): self._handle_event(event) + def on_deleted(self, event: DirDeletedEvent | FileDeletedEvent) -> None: + self._handle_event(event) + def _handle_event(self, event): if event.is_directory: # Only react to direct child directories of the projects path @@ -446,6 +449,12 @@ class Controller: return # Monitor was stopped, skip the scan try: await self.load_projects() + # Remove stale projects that no longer exist on disk + for project_id in list(self._projects): + project = self._projects[project_id] + if not os.path.exists(project.path): + log.info(f"Removing stale project '{project.name}' ('{project.path}' no longer exists)") + del self._projects[project.id] except Exception as e: log.warning(f"Projects directory rescan failed: {e}") @@ -741,6 +750,9 @@ class Controller: topo_data.pop("version") topo_data.pop("revision") topo_data.pop("type") + # marker_definitions is restored by Project.open() from the topology + # file; it must not be passed to Project.__init__. + topo_data.pop("marker_definitions", None) if topo_data["project_id"] in self._projects: project = self._projects[topo_data["project_id"]] diff --git a/gns3server/controller/import_project.py b/gns3server/controller/import_project.py index 18ff6cd3a..e5da5460c 100644 --- a/gns3server/controller/import_project.py +++ b/gns3server/controller/import_project.py @@ -182,24 +182,46 @@ async def import_project( project = await controller.load_project(dot_gns3_path, load=False) return project + def _create_symbolic_links(zip_file, path): """ Manually create symbolic links (if any) because ZipFile does not support it. + Refuse any target that escapes `path`. :param zip_file: ZipFile instance :param path: project location """ + path_root = os.path.realpath(path) + os.sep for zip_info in zip_file.infolist(): - if stat.S_ISLNK(zip_info.external_attr >> 16): - symlink_target = zip_file.read(zip_info.filename).decode() - symlink_path = os.path.join(path, zip_info.filename) - try: - # remove the regular file and replace it by a symbolic link - os.remove(symlink_path) - os.symlink(symlink_target, symlink_path) - except OSError as e: - raise ControllerError(f"Cannot create symbolic link: {e}") + if not stat.S_ISLNK(zip_info.external_attr >> 16): + continue + symlink_target = zip_file.read(zip_info.filename).decode() + symlink_path = os.path.join(path, zip_info.filename) + + # 1. Reject absolute targets outright. + if os.path.isabs(symlink_target): + raise ControllerError(f"Symlink {zip_info.filename!r} has absolute target {symlink_target!r}, refusing") + + # 2. Reject paths where the entry name itself escapes (defence in depth; + # extractall normally would already have caught this). + member_abs = os.path.realpath(symlink_path) + if not (member_abs + os.sep).startswith(path_root) and member_abs + os.sep != path_root: + raise ControllerError(f"Symlink entry {zip_info.filename!r} escapes project dir, refusing") + + # 3. Resolve the symlink target relative to the entry's own parent + # directory and verify the resolved real path stays inside `path`. + link_dir = os.path.realpath(os.path.dirname(symlink_path)) + resolved_target = os.path.realpath(os.path.join(link_dir, symlink_target)) + if not (resolved_target + os.sep).startswith(path_root) and resolved_target + os.sep != path_root: + raise ControllerError("Symlink {zip_info.filename!r} -> {symlink_target!r} escapes project dir, refusing") + + try: + os.remove(symlink_path) + os.symlink(symlink_target, symlink_path) + except OSError as e: + raise ControllerError(f"Cannot create symbolic link: {e}") + def regenerate_topology_ids(topology, new_project_path, reset_mac_addresses=False): """ @@ -295,14 +317,19 @@ async def _import_images(controller, images_path): for (dirpath, dirnames, filenames) in os.walk(root, followlinks=False): for filename in filenames: path = os.path.join(dirpath, filename) - if os.path.islink(path): - continue dst = os.path.join(image_dir, os.path.relpath(path, root)) os.makedirs(os.path.dirname(dst), exist_ok=True) if not os.path.exists(dst): await wait_run_in_executor(shutil.move, path, dst) - os.chmod(dst, stat.S_IWRITE | stat.S_IREAD | stat.S_IEXEC) - + try: + with open(dst, "rb") as f: + # read the first 7 bytes of the file. + elf_header_start = f.read(7) + # IOU images must start with the ELF magic number, be 32-bit or 64-bit, little endian and have an ELF version of 1 + if elf_header_start == b'\x7fELF\x01\x01\x01' or elf_header_start == b'\x7fELF\x02\x01\x01': + os.chmod(dst, stat.S_IWRITE | stat.S_IREAD | stat.S_IEXEC) + except OSError as e: + continue async def update_snapshots(snapshots_dir, project_path, project_name, project_id, reset_mac_addresses=True): """ diff --git a/gns3server/controller/link.py b/gns3server/controller/link.py index 556f5ba5f..e716bfd03 100644 --- a/gns3server/controller/link.py +++ b/gns3server/controller/link.py @@ -30,6 +30,13 @@ import logging log = logging.getLogger(__name__) +# Sentinel for "argument not passed". Distinct from None so marker/definition +# updaters can tell "caller omitted direction" (keep current value) from +# "caller passed direction=None" (clear it back to both directions). See +# UDPLink.update_marker and Project.update_marker_definition. +_UNSET = object() + + FILTERS = [ { "type": "frequency_drop", @@ -88,6 +95,7 @@ class Link: self._link_type = "ethernet" self._suspended = False self._filters = {} + self._markers = {} self._link_style = {} self._wireshark = False self._show_filters_icon = True @@ -99,6 +107,57 @@ class Link: """ return self._filters + @property + def markers(self): + """ + Get the traffic insight markers dict: name → {bpf, tag, enabled} + """ + return self._markers + + async def inherit_marker(self, def_name, marker_def, dump=True): + """ + Apply a project-level marker definition to this link. + + The marker is stored under ``global-{def_name}`` so it cannot collide + with a per-link private marker of the same name. It carries an + ``inherited_from`` back-reference that (a) guards against per-link + edits and (b) lets the project sync changes to every copy at once. + + The pcap link-layer follows the link type: Ethernet is always EN10MB. + A serial link needs the definition's WAN encapsulation (HDLC / PPP / + Frame Relay); if none was chosen the serial link is skipped — an EN10MB + pcap on a serial link is undecodable. + """ + + def_data_link_type = marker_def.get("data_link_type", "DLT_EN10MB") + if self._link_type == "serial": + if def_data_link_type.upper() == "DLT_EN10MB": + return # definition is Ethernet-only; skip this serial link + data_link_type = def_data_link_type + else: + data_link_type = "DLT_EN10MB" + + await self.start_marker( + name=f"global-{def_name}", + bpf=marker_def["bpf"], + tag=marker_def.get("tag"), + direction=marker_def.get("direction"), + data_link_type=data_link_type, + color=marker_def.get("color"), + highlight_duration=marker_def.get("highlight_duration"), + enabled=not marker_def.get("paused", False), + inherited_from=def_name, + dump=dump, + ) + + def _persist_markers(self): + """ + Return only the per-link (non-inherited) markers suitable for + persistence in a topology dump. Inherited markers are re-created from + ``project._marker_definitions`` on load so they do not need to be saved. + """ + return {k: v for k, v in self._markers.items() if not v.get("inherited_from")} + @property def show_filters_icon(self): """ @@ -298,6 +357,27 @@ class Link: raise NotImplementedError + async def start_marker(self, name, bpf, tag=None, direction=None, capture_node_id=None, enabled=True): + """ + Attach a traffic-insight marker to this link (base — UDPLink overrides). + """ + raise NotImplementedError + + async def stop_marker(self, name): + """ + Remove a traffic-insight marker from this link (base — UDPLink overrides). + """ + raise NotImplementedError + + async def update_marker(self, name, bpf=None, tag=None, enabled=None, direction=_UNSET): + """ + Update an existing marker's BPF, tag, or enabled flag. + + A BPF change is a delete+re-add on the ubridge side so the pcap is + flushed and the new filter takes effect. + """ + raise NotImplementedError + async def start_capture(self, data_link_type="DLT_EN10MB", capture_file_name=None, wireshark=False, jwt_token=None): """ Start capture on the link @@ -571,6 +651,7 @@ class Link: "nodes": res, "link_id": self._id, "filters": self._filters, + "markers": self._persist_markers(), "link_style": self._link_style, "suspend": self._suspended, "show_filters_icon": getattr(self, '_show_filters_icon', True), @@ -585,6 +666,7 @@ class Link: "capture_compute_id": self.capture_compute_id, "link_type": self._link_type, "filters": self._filters, + "markers": self._markers, "suspend": self._suspended, "link_style": self._link_style, "wireshark": self._wireshark, diff --git a/gns3server/controller/node.py b/gns3server/controller/node.py index 3378f055f..2046c7cd0 100644 --- a/gns3server/controller/node.py +++ b/gns3server/controller/node.py @@ -639,6 +639,14 @@ class Node: except asyncio.TimeoutError: raise ControllerTimeoutError(f"Timeout when reset console {self._name}") + async def get(self, path="", **kwargs): + """ + HTTP get on the node + """ + return await self._compute.get( + f"/projects/{self._project.id}/{self._node_type}/nodes/{self._id}{path}", **kwargs + ) + async def post(self, path, data=None, **kwargs): """ HTTP post on the node diff --git a/gns3server/controller/project.py b/gns3server/controller/project.py index 989619940..a6bcc159c 100644 --- a/gns3server/controller/project.py +++ b/gns3server/controller/project.py @@ -37,10 +37,12 @@ from .snapshot import Snapshot from .drawing import Drawing from .topology import project_to_topology, load_topology from .udp_link import UDPLink +from .link import _UNSET from ..config import Config from ..utils.path import check_path_allowed, get_default_project_directory from ..utils.application_id import get_next_application_id from ..utils.asyncio.pool import Pool +from ..utils.packet_filter_validation import validate_bpf_syntax from ..utils.asyncio import locking from ..utils.asyncio import aiozipstream from ..utils.asyncio import wait_run_in_executor @@ -211,6 +213,7 @@ class Project: self._allocated_node_names = set() self._nodes = {} self._links = {} + self._marker_definitions = {} # name → {bpf, tag, color, highlight_duration} self._drawings = {} self._snapshots = {} self._computes = [] @@ -765,6 +768,33 @@ class Project: "Dropping invalid filters on link %s: %s", link_data.get("link_id"), e ) + # Restore traffic-insight markers directly into link state (mirrors how + # filters are restored via update_filters). The capture_node_id persisted + # last time is reused for NIO routing; no side resolution is possible here + # because the link's nodes are added later. The marker is applied to + # uBridge by _ubridge_apply_markers when create() runs. Invalid BPF is + # dropped (like invalid filters). + for name, marker in (link_data.get("markers") or {}).items(): + bpf = marker.get("bpf") + if not bpf: + log.warning("Dropping marker %s on link %s: missing bpf", name, link_data.get("link_id")) + continue + result = validate_bpf_syntax(bpf) + if not result.get("valid"): + log.warning( + "Dropping marker %s on link %s: invalid BPF (%s)", + name, link_data.get("link_id"), result.get("error") + ) + continue + link._markers[name] = { + "bpf": bpf, + "tag": marker.get("tag"), + "enabled": marker.get("enabled", True), + "color": marker.get("color"), + "highlight_duration": marker.get("highlight_duration"), + "capture_node_id": marker.get("capture_node_id"), + "direction": marker.get("direction"), + } if "link_style" in link_data: await link.update_link_style(link_data["link_style"]) if "show_filters_icon" in link_data: @@ -872,6 +902,285 @@ class Project: return self._get_closed_data("links", "link_id") return self._links + @property + def markers(self): + """ + Project-level read-only aggregation of all markers across every link. + + Each entry is keyed ``"{link_id}/{marker_name}"`` so the flat dict is + globally unique within the project. The value is a clone of the link's + per-marker dict plus ``link_id`` and ``node_id`` (the capture-side node) + for convenience — the frontend can filter/group by link or node without + extra round-trips. + + :returns: dict[str, dict] — keyed by "{link_id}/{marker_name}" + """ + result = {} + for link_id, link in self._links.items(): + for name, info in link.markers.items(): + key = f"{link_id}/{name}" + result[key] = { + **info, + "link_id": link_id, + "node_id": info.get("capture_node_id"), + } + return result + + async def pause_marker_definition(self, name): + """ + Pause every inherited copy of a definition (``global-{name}``) on every + link: toggle each filter off in place via ``update_marker(enabled=False)`` + — uBridge ``enable_packet_filter off``, no NIO rebuild, pcap/emitted + preserved. The definition's ``paused`` flag is persisted, so links + created later inherit the marker already paused. + """ + + if name not in self._marker_definitions: + raise ControllerError(f"Marker definition '{name}' not found") + self._marker_definitions[name]["paused"] = True + marker_name = f"global-{name}" + affected = [ + link for link in self._links.values() + if marker_name in link.markers and link.markers[marker_name].get("inherited_from") == name + ] + await self._marker_apply_concurrently( + affected, + lambda link: link.update_marker(marker_name, enabled=False, inherited=True, dump=False), + lambda link, e: f"Failed to pause marker {marker_name} on link {link.id}: {e}", + ) + self.dump() + self.emit_notification("project.updated", self.asdict()) + + async def resume_marker_definition(self, name): + """Resume every inherited copy of a definition (toggle on).""" + + if name not in self._marker_definitions: + raise ControllerError(f"Marker definition '{name}' not found") + self._marker_definitions[name]["paused"] = False + marker_name = f"global-{name}" + affected = [ + link for link in self._links.values() + if marker_name in link.markers and link.markers[marker_name].get("inherited_from") == name + ] + await self._marker_apply_concurrently( + affected, + lambda link: link.update_marker(marker_name, enabled=True, inherited=True, dump=False), + lambda link, e: f"Failed to resume marker {marker_name} on link {link.id}: {e}", + ) + self.dump() + self.emit_notification("project.updated", self.asdict()) + + @property + def marker_definitions(self): + """ + :returns: dict of project-level marker definitions (name → {bpf, tag, color, highlight_duration}) + """ + return self._marker_definitions + + def _validate_marker_definition_bpf(self, name, bpf): + """ + Validate a marker definition's BPF once, here, so the fan-out to every + link (``_apply_def_to_all_links`` → ``inherit_marker`` → ``start_marker``) + and the per-link sync (``update_marker_definition`` → ``update_marker``) + can skip re-validation for the inherited copies — otherwise one + ``tcpdump -d`` subprocess runs per link for the same expression. A + private per-link marker still validates in ``start_marker``/``update_marker``. + """ + result = validate_bpf_syntax(bpf) + if not result.get("valid"): + raise ControllerError( + f"Marker definition '{name}': invalid BPF — {result.get('error', 'unknown error')}" + ) + + def _validate_marker_definition_direction(self, name, direction): + """ + Reject tx/rx on a marker definition: a definition fans out to every link + and auto-selects its capture node on each (``_choose_marker_side``), + while tx/rx is relative to that node, so a fixed direction has no + consistent meaning across links. Only 'both' (the default, = ``None``) + is allowed — encode the direction in the BPF instead (e.g. + ``icmp[icmptype]==8`` for echo requests), or use a per-link marker whose + capture node is pinned. + """ + if direction in ("tx", "rx"): + raise ControllerError( + f"Marker definition '{name}': direction '{direction}' is not allowed. " + "A definition fans out to every link and auto-selects its capture node on each, " + "but tx/rx is relative to that node, so a fixed direction has no consistent " + "meaning across links. Keep 'both' (the default) and encode the direction in " + "the BPF instead, e.g. 'icmp and icmp[icmptype]==8' for echo requests only. " + "For a capture-node-relative direction on a single link, use a per-link marker." + ) + + async def create_marker_definition(self, name, bpf, tag=None, direction=None, color=None, highlight_duration=None, data_link_type="DLT_EN10MB"): + """ + Create a project-level marker definition and fan out to every existing + link that has a capable node. Links without a capable node are silently + skipped. + """ + + if name in self._marker_definitions: + raise ControllerError( + f"Marker definition '{name}' already exists in this project" + ) + + self._validate_marker_definition_bpf(name, bpf) + self._validate_marker_definition_direction(name, direction) + self._marker_definitions[name] = {"bpf": bpf, "tag": tag, "direction": direction, "color": color, "highlight_duration": highlight_duration, "data_link_type": data_link_type, "paused": False} + await self._apply_def_to_all_links(name) + self.dump() + self.emit_notification("project.updated", self.asdict()) + + async def update_marker_definition(self, name, bpf=None, tag=None, direction=_UNSET, color=None, highlight_duration=None, data_link_type=_UNSET): + """ + Update a marker definition and sync every inherited copy on every link. + """ + + if name not in self._marker_definitions: + raise ControllerNotFoundError( + f"Marker definition '{name}' not found in this project" + ) + + d = self._marker_definitions[name] + if bpf is not None: + self._validate_marker_definition_bpf(name, bpf) + d["bpf"] = bpf + if tag is not None: + d["tag"] = tag + if color is not None: + d["color"] = color + if highlight_duration is not None: + d["highlight_duration"] = highlight_duration + if direction is not _UNSET: + self._validate_marker_definition_direction(name, direction) + d["direction"] = direction # None = clear back to both directions + if data_link_type is not _UNSET: + d["data_link_type"] = data_link_type + + # Links that currently carry an inherited copy of this definition. + affected = [ + link for link in self._links.values() + if f"global-{name}" in link.markers + and link.markers[f"global-{name}"].get("inherited_from") == name + ] + + if data_link_type is not _UNSET: + # data_link_type decides which links host an inherited copy (serial + # links are skipped unless a WAN encapsulation is chosen), so a change + # needs a full re-fan-out: drop every copy, then re-apply. + await self._marker_apply_concurrently( + affected, + lambda link: link.stop_marker(f"global-{name}", inherited=True, dump=False), + lambda link, e: f"Failed to remove inherited marker global-{name} from link {link.id}: {e}", + ) + await self._apply_def_to_all_links(name) + else: + # Sync: update every inherited copy across all links. + await self._marker_apply_concurrently( + affected, + lambda link: link.update_marker( + f"global-{name}", bpf=d["bpf"], tag=d.get("tag"), direction=d.get("direction"), + color=d.get("color"), highlight_duration=d.get("highlight_duration"), inherited=True, + dump=False + ), + lambda link, e: f"Failed to sync marker global-{name} on link {link.id}: {e}", + ) + self.dump() + self.emit_notification("project.updated", self.asdict()) + + async def delete_marker_definition(self, name): + """ + Delete a marker definition and remove every inherited copy from every link. + """ + + if name not in self._marker_definitions: + raise ControllerNotFoundError( + f"Marker definition '{name}' not found in this project" + ) + + del self._marker_definitions[name] + + affected = [ + link for link in self._links.values() + if f"global-{name}" in link.markers + and link.markers[f"global-{name}"].get("inherited_from") == name + ] + await self._marker_apply_concurrently( + affected, + lambda link: link.stop_marker(f"global-{name}", inherited=True), + # A missing compute or broken link shouldn't block the delete. + lambda link, e: f"Failed to remove inherited marker global-{name} from link {link.id}: {e}", + ) + + self.dump() + self.emit_notification("project.updated", self.asdict()) + + async def _apply_def_to_all_links(self, def_name): + """ + Fan out a single marker definition to every existing link in the project. + Links that have no capable node (``_MARKER_CAPABLE_TYPES``) are silently + skipped — the marker can only live on a uBridge bridge. + """ + + d = self._marker_definitions[def_name] + # dump=False: per-link topology writes are the dominant cost on large + # projects — the callers (create/update_marker_definition) dump once + # after the fan-out. + await self._marker_apply_concurrently( + list(self._links.values()), + lambda link: link.inherit_marker(def_name, d, dump=False), + lambda link, e: f"Marker definition '{def_name}' could not be applied to link {link.id}: {e}", + ) + + async def apply_defs_to_new_link(self, link): + """ + Apply every active marker definition to a newly created link so it + inherits project-level rules automatically. + + Deliberately serial: all definitions share the same link, and each + ``inherit_marker`` pushes the link's full marker set — concurrent + pushes would race (a later push overwriting an earlier one's spec and + losing markers). + """ + + for def_name, d in self._marker_definitions.items(): + try: + # dump=False: the caller (link create / project open) dumps once + # after; per-def dumps here would be N full topology writes. + await link.inherit_marker(def_name, d, dump=False) + except ControllerError as e: + log.warning( + "Marker definition '%s' could not be applied to new link %s: %s", + def_name, link.id, e + ) + + async def _marker_apply_concurrently(self, links, operation, fail_msg): + """ + Run an async per-link marker operation across *links* with bounded + concurrency. A serial loop takes N sequential compute round-trips — a + definition over 1000 links would take minutes on remote computes — so + fan out in parallel batches. Links are independent (own ``_markers`` / + ``_link_data``), so this is race-free; per-link ``ControllerError`` is + logged and skipped, preserving the serial loop's isolation semantics. + ``Project.dump`` is synchronous and writes atomically (tmp + rename), + so concurrent dumps from the fan-out cannot corrupt the topology file. + + :param links: iterable of links to operate on + :param operation: async callable ``(link) -> coroutine`` + :param fail_msg: callable ``(link, error) -> log message`` + """ + + sem = asyncio.Semaphore(32) + + async def guarded(link): + async with sem: + try: + await operation(link) + except ControllerError as e: + log.warning(fail_msg(link, e)) + + await asyncio.gather(*(guarded(link) for link in links)) + @property def snapshots(self): """ @@ -1125,7 +1434,7 @@ class Project: if self._status != "opened": try: - await self.open() + await self.open(auto_start=False) except ControllerError as e: # ignore missing images or other conflicts when deleting a project log.warning(f"Conflict while deleting project: {e}") @@ -1215,9 +1524,12 @@ class Project: return os.path.join(self.path, self._filename) @locking - async def open(self): + async def open(self, auto_start=True): """ Load topology elements + + :param auto_start: whether the nodes may be started when the project + has auto start enabled """ if self._closing is True: @@ -1262,6 +1574,29 @@ class Project: if val is not None: setattr(self, key, val) + # marker_definitions is loaded separately (it is not a __init__ kwarg + # nor a simple attribute — it backs a read-only property). Each BPF + # is validated once here so the inherited fan-out (start_marker) can + # skip re-validation; an invalid definition is dropped with a warning + # rather than failing the open — it could not fan out anyway. + defs = project_data.get("marker_definitions") + if isinstance(defs, dict): + clean_defs = {} + for def_name, d in defs.items(): + bpf = d.get("bpf") + if not bpf: + log.warning("Dropping marker definition '%s' on load: missing bpf", def_name) + continue + result = validate_bpf_syntax(bpf) + if not result.get("valid"): + log.warning( + "Dropping marker definition '%s' on load: invalid BPF (%s)", + def_name, result.get("error") + ) + continue + clean_defs[def_name] = d + self._marker_definitions = clean_defs + topology = project_data["topology"] for compute in topology.get("computes", []): compute_id = compute.get("compute_id") @@ -1328,6 +1663,10 @@ class Project: for drawing_data in topology.get("drawings", []): await self.add_drawing(dump=False, **drawing_data) + # Note: project-level marker definitions are applied to each link + # inside UDPLink.create() (the inheritance hook), so they are + # already present once links are loaded — no separate fan-out here. + self.dump() # We catch all error to be able to roll back the .gns3 to the previous state except Exception as e: @@ -1356,7 +1695,7 @@ class Project: self._loading = False self.emit_controller_notification("project.opened", self.asdict()) # Should we start the nodes when project is open - if self._auto_start: + if self._auto_start and auto_start: # Start all in the background without waiting for completion # we ignore errors because we want to let the user open # their project and fix it @@ -1684,6 +2023,7 @@ class Project: "links": len(self._links), "drawings": len(self._drawings), "snapshots": len(self._snapshots), + "markers": sum(len(link.markers) for link in self._links.values()), } def asdict(self): @@ -1708,6 +2048,7 @@ class Project: "supplier": self._supplier, "variables": self._variables, "created_by": self._created_by, + "marker_definitions": self._marker_definitions, } def __repr__(self): diff --git a/gns3server/controller/topology.py b/gns3server/controller/topology.py index 150283c39..a71b88dd6 100644 --- a/gns3server/controller/topology.py +++ b/gns3server/controller/topology.py @@ -88,6 +88,7 @@ def project_to_topology(project): "variables": project.variables, "supplier": project.supplier, "created_by": project.created_by, + "marker_definitions": project.marker_definitions, "topology": {"nodes": [], "links": [], "computes": [], "drawings": []}, "type": "topology", "revision": GNS3_FILE_FORMAT_REVISION, diff --git a/gns3server/controller/udp_link.py b/gns3server/controller/udp_link.py index 7c2e6f187..b25e1126b 100644 --- a/gns3server/controller/udp_link.py +++ b/gns3server/controller/udp_link.py @@ -17,8 +17,17 @@ from .controller_error import ControllerError, ControllerNotFoundError -from .link import Link +from .link import Link, _UNSET from .node_types import BUILTIN_NODE_TYPES +from gns3server.utils.packet_filter_validation import validate_bpf_syntax, FilterValidationError + +# Node types without a uBridge bridge — a marker filter has nothing to attach to. +# Node types that can host a marker (have a uBridge bridge to attach the +# `mark` filter to). Mirrors _get_filter_node in link.py, minus "nat" +# (which has no uBridge). +_MARKER_CAPABLE_TYPES = frozenset({ + "vpcs", "qemu", "docker", "iou", "dynamips", "cloud", +}) class UDPLink(Link): @@ -37,7 +46,7 @@ class UDPLink(Link): def _get_node_filters(self, node1, node2): """ Determine which node gets the active filters applied. - + :returns: Tuple of (node1_filters, node2_filters) """ filter_node = self._get_filter_node() @@ -46,6 +55,32 @@ class UDPLink(Link): self.get_active_filters() if filter_node == node2 else {}, ) + def _markers_for_node(self, node): + """ + Marker specs (name -> {bpf, tag, link_id, direction, data_link_type, + enabled}) for the markers whose capture side is ``node``. Routed by + capture_node_id so a marker only rides the NIO of the node whose uBridge + will host it. A disabled marker is included (installed then turned + ``off`` at uBridge, not dropped) so the UI can toggle it instantly + without an NIO rebuild. + """ + return { + name: {"bpf": m["bpf"], "tag": m.get("tag"), "link_id": self._id, + "direction": m.get("direction"), + "data_link_type": m.get("data_link_type", "DLT_EN10MB"), + "enabled": m.get("enabled", True)} + for name, m in self._markers.items() + if m.get("capture_node_id") == node.id + } + + def _get_node_markers(self, node1, node2): + """ + Determine which node gets which markers applied. + + :returns: Tuple of (node1_markers, node2_markers) + """ + return self._markers_for_node(node1), self._markers_for_node(node2) + async def create(self): """ Create the link on the nodes @@ -80,6 +115,7 @@ class UDPLink(Link): self._node2_port = response.json["udp_port"] node1_filters, node2_filters = self._get_node_filters(node1, node2) + node1_markers, node2_markers = self._get_node_markers(node1, node2) # Create the tunnel on both side self._link_data.append( @@ -89,6 +125,7 @@ class UDPLink(Link): "rport": self._node2_port, "type": "nio_udp", "filters": node1_filters, + "markers": node1_markers, "suspend": self._suspended, } ) @@ -101,6 +138,7 @@ class UDPLink(Link): "rport": self._node1_port, "type": "nio_udp", "filters": node2_filters, + "markers": node2_markers, "suspend": self._suspended, } ) @@ -113,6 +151,9 @@ class UDPLink(Link): await node1.delete(f"/adapters/{adapter_number1}/ports/{port_number1}/nio", timeout=120) raise e self._created = True + # New links automatically inherit every active project-level marker + # definition so the user doesn't have to reconfigure. + await self._project.apply_defs_to_new_link(self) async def update(self): """ @@ -125,10 +166,12 @@ class UDPLink(Link): node2 = self._nodes[1]["node"] node1_filters, node2_filters = self._get_node_filters(node1, node2) + node1_markers, node2_markers = self._get_node_markers(node1, node2) adapter_number1 = self._nodes[0]["adapter_number"] port_number1 = self._nodes[0]["port_number"] self._link_data[0]["filters"] = node1_filters + self._link_data[0]["markers"] = node1_markers self._link_data[0]["suspend"] = self._suspended if node1.node_type not in ("ethernet_switch", "ethernet_hub"): await node1.put( @@ -138,6 +181,7 @@ class UDPLink(Link): adapter_number2 = self._nodes[1]["adapter_number"] port_number2 = self._nodes[1]["port_number"] self._link_data[1]["filters"] = node2_filters + self._link_data[1]["markers"] = node2_markers self._link_data[1]["suspend"] = self._suspended if node2.node_type not in ("ethernet_switch", "ethernet_hub"): await node2.put( @@ -245,9 +289,256 @@ class UDPLink(Link): raise ControllerError("Cannot capture because there is no running device on this link") + def _choose_marker_side(self): + """ + Pick the node that will host the marker, mirroring ``_get_filter_node`` + in link.py. Only types with a uBridge bridge (``_MARKER_CAPABLE_TYPES``) + are eligible. A running node is preferred, but a stopped one is + accepted — like packet filters, the marker is stored on the NIO and + applied when the node starts. + """ + + # Prefer started. + for node in self._nodes: + if ( + node["node"].node_type in _MARKER_CAPABLE_TYPES + and node["node"].status == "started" + ): + return node + + # Accept stopped but capable (marker rides NIO, applied at start). + for node in self._nodes: + if node["node"].node_type in _MARKER_CAPABLE_TYPES: + return node + + raise ControllerError( + "Cannot add marker because no device on this link supports " + "traffic insight" + ) + + def _node_by_id(self, node_id): + """ + Resolve a caller-chosen capture node by id, validating it is an + endpoint of this link and marker-capable. Used when the caller + (REST/MCP) explicitly pins the observer side instead of letting + ``_choose_marker_side`` auto-pick. + + :param node_id: node id (UUID or str) the caller requested + :returns: a ``self._nodes`` entry (node/adapter_number/port_number) + """ + + target = str(node_id) + for node in self._nodes: + if str(node["node"].id) != target: + continue + if node["node"].node_type not in _MARKER_CAPABLE_TYPES: + raise ControllerError( + f"Node {node_id} ({node['node'].node_type}) cannot host a " + f"marker — no uBridge bridge to attach the filter to" + ) + return node + raise ControllerNotFoundError( + f"Node {node_id} is not an endpoint of link {self._id}" + ) + async def node_updated(self, node): """ Called when a node member of the link is updated """ if self._capture_node and node == self._capture_node["node"] and node.status != "started": await self.stop_capture() + # Marker clean-up is *not* done on node stop — markers are a persistent + # link-scoped feature that recovers via NIO on restart (see + # _ubridge_apply_markers in add_ubridge_udp_connection). The user + # explicitly deletes a marker via the REST API, and a marker is torn + # down automatically only when its link is deleted. + + async def start_marker(self, name, bpf, tag=None, direction=None, data_link_type="DLT_EN10MB", capture_node_id=None, color=None, highlight_duration=None, enabled=True, inherited_from=None, dump=True): + """ + Attach a traffic-insight marker to this link. + + State-only model (mirrors ``update_filters``): record the marker in + ``_markers`` (with its capture-side node id for NIO routing), then push + via ``self.update()`` so it rides the NIO and is applied by + ``_ubridge_apply_markers``. No dedicated uBridge round-trip — exactly + how packet filters are applied. + + :param name: stable filter name — echoed in MARK signals + pcap identity + :param bpf: libpcap BPF expression + :param tag: optional correlation id + :param capture_node_id: optional explicit observer node. When set the + marker is pinned to that endpoint's uBridge (and ``direction`` is + interpreted from its perspective); validated by ``_node_by_id``. + Omitted = auto-pick via ``_choose_marker_side``. Ignored for + inherited markers (project defs are link-agnostic → always auto). + :param color: optional hex color for the Web UI (e.g. '#ff5722'); stored + with the link and persisted in the topology, never sent to uBridge + :param highlight_duration: optional UI-only hint (milliseconds) for how + long a match keeps the marker highlighted; stored, never sent to uBridge + :param inherited_from: def name when this marker is a project-level + inheritance copy; set automatically, never exposed to REST callers + """ + + if name in self._markers: + raise ControllerError(f"Marker '{name}' already exists on link {self._id}") + + # Validate the BPF only for private per-link markers. An inherited copy + # (``inherited_from`` set) fans out from a definition whose BPF was + # already validated once at create/update (and on project load), so + # re-validating per link would spawn one ``tcpdump -d`` per link for the + # same expression. + if not inherited_from: + result = validate_bpf_syntax(bpf) + if not result.get("valid"): + raise ControllerError(f"Invalid BPF expression: {result.get('error', 'unknown error')}") + + if capture_node_id and not inherited_from: + marker_side = self._node_by_id(capture_node_id) + else: + marker_side = self._choose_marker_side() + marker_entry = { + "bpf": bpf, + "tag": tag, + "enabled": enabled, + "color": color, + "highlight_duration": highlight_duration, + "capture_node_id": marker_side["node"].id, + "direction": direction, + "data_link_type": data_link_type, + } + if inherited_from: + marker_entry["inherited_from"] = inherited_from + self._markers[name] = marker_entry + if self._created: + await self.update() + self._project.emit_notification("link.updated", self.asdict()) + # Bulk fan-out passes dump=False: N per-link topology writes on a + # 500-link project are the dominant cost — the caller dumps once after. + if dump: + self._project.dump() + + async def stop_marker(self, name, inherited=False, dump=True): + """ + Remove a traffic-insight marker from this link. + + Drop it from ``_markers`` and push via ``self.update()``: the NIO + reset+reapply in ``_ubridge_apply_filters``/``_ubridge_apply_markers`` + drops it from uBridge. Mirrors how deleting a packet filter works. + + :param name: filter name to remove + :param inherited: set by project-level def-delete to bypass the + inheritance guard (the project layer is the legitimate remover) + """ + + if name not in self._markers: + raise ControllerNotFoundError(f"Marker '{name}' not found on link {self._id}") + + if self._markers[name].get("inherited_from") and not inherited: + raise ControllerError( + f"Marker '{name}' is inherited from the project-level " + f"definition '{self._markers[name]['inherited_from']}'. " + "Delete or update it via the marker-definitions API instead." + ) + + capture_node_id = self._markers[name].get("capture_node_id") + del self._markers[name] + # Remove the marker filter + its pcap on the capture node directly — NOT a + # full NIO reapply (which would reset_packet_filters and close/reopen every + # sibling marker's pcap). delete_packet_filter removes just this filter; + # the marker is already gone from _markers, so any later reapply (filter + # change, node restart) won't re-add it either. + if capture_node_id is not None: + side = next((s for s in self._nodes if str(s["node"].id) == str(capture_node_id)), None) + if side is not None: + try: + await side["node"].delete( + f"/adapters/{side['adapter_number']}/ports/{side['port_number']}/markers/{name}", + params={"link_id": self._id}, + ) + except Exception: + pass # best-effort: old compute without the route leaves the file + self._project.emit_notification("link.updated", self.asdict()) + if dump: + self._project.dump() + + async def update_marker(self, name, bpf=None, tag=None, enabled=None, direction=_UNSET, color=None, highlight_duration=None, inherited=False, dump=True): + """ + Update an existing marker's fields and push to uBridge fine-grained — no + full NIO reapply, so sibling markers' pcaps stay open. bpf/tag/direction + rebuild just this filter (delete + add); enabled is an instant toggle; + color/highlight_duration are UI-only (stored, never pushed). + + :param name: filter name to update + :param bpf: new BPF expression (None = keep existing) + :param tag: new tag id (None = keep existing) + :param enabled: toggle (None = keep existing) + :param color: new hex color (None = keep existing) + :param highlight_duration: new UI highlight duration in ms (None = keep existing) + :param inherited: set by project-level sync to bypass the inheritance + guard (the project layer is the legitimate editor) + """ + + marker_info = self._markers.get(name) + if not marker_info: + raise ControllerNotFoundError(f"Marker '{name}' not found on link {self._id}") + + if marker_info.get("inherited_from") and not inherited: + raise ControllerError( + f"Marker '{name}' is inherited from the project-level " + f"definition '{marker_info['inherited_from']}'. " + "Update it via the marker-definitions API instead." + ) + + # Merge every changed field into the marker state first. + if bpf is not None and bpf != marker_info["bpf"]: + # An inherited marker is synced from a definition whose BPF was + # already validated at create/update (or load); re-validating per + # link is redundant. Private markers validate here as before. + if not inherited: + result = validate_bpf_syntax(bpf) + if not result.get("valid"): + raise ControllerError(f"Invalid BPF expression: {result.get('error', 'unknown error')}") + marker_info["bpf"] = bpf + if tag is not None: + marker_info["tag"] = tag + if enabled is not None: + marker_info["enabled"] = enabled + if color is not None: + marker_info["color"] = color + if highlight_duration is not None: + marker_info["highlight_duration"] = highlight_duration + if direction is not _UNSET: + marker_info["direction"] = direction # None = clear back to both directions + + # Push to uBridge fine-grained — NO full NIO reapply (which would + # reset_packet_filters and close/reopen every sibling marker's pcap): + # * bpf/tag/direction changed → rebuild just this filter (delete + add), + # reopening only this marker's pcap (expected, new BPF) + # * only enabled changed → instant toggle (enable_packet_filter) + # * only UI fields changed → nothing to push to uBridge + if self._created: + ubridge_rebuild = (bpf is not None) or (tag is not None) or (direction is not _UNSET) + capture_node_id = marker_info.get("capture_node_id") + side = next((s for s in self._nodes if str(s["node"].id) == str(capture_node_id)), None) + if side is not None: + try: + if ubridge_rebuild: + await side["node"].put( + f"/markers/{name}/rebuild", + data={ + "bpf": marker_info["bpf"], + "tag": marker_info.get("tag"), + "direction": marker_info.get("direction"), + "enabled": marker_info.get("enabled", True), + "link_id": self._id, + }, + ) + elif enabled is not None: + await side["node"].put(f"/markers/{name}", data={"enabled": enabled}) + except Exception: + # Old compute without the route / node down: state is already + # correct in _markers; the next NIO reapply converges uBridge. + pass + self._project.emit_notification("link.updated", self.asdict()) + if dump: + self._project.dump() diff --git a/gns3server/core/tasks.py b/gns3server/core/tasks.py index d4968d8f5..9fc911d55 100644 --- a/gns3server/core/tasks.py +++ b/gns3server/core/tasks.py @@ -24,6 +24,7 @@ from gns3server.controller import Controller from gns3server.config import Config from gns3server.compute import MODULES from gns3server.compute.port_manager import PortManager +from gns3server.compute.marker.marker_manager import MarkerManager from gns3server.utils.http_client import HTTPClient from gns3server.db.tasks import connect_to_db, get_computes, disconnect_from_db, discover_images_on_filesystem @@ -84,6 +85,14 @@ async def startup(app: FastAPI) -> None: m = module.instance() m.port_manager = PortManager.instance() + # Start the marker (traffic-insight) UDP sink. One listener per compute + # process receives ubridge MARK signals; ubridges are told its host/port at + # startup (see BaseNode._start_ubridge). + server_settings = Config.instance().settings.Server + await MarkerManager.instance().start( + host=server_settings.marker_listen_host, port=server_settings.marker_listen_port + ) + # Mark MCP server as ready to accept connections (if MCP is available) from gns3server.agent import MCP_AVAILABLE @@ -101,6 +110,7 @@ async def shutdown(app: FastAPI) -> None: if auto_discover_images_task_handle is not None and not auto_discover_images_task_handle.cancelled(): auto_discover_images_task_handle.cancel() await HTTPClient.close_session() + await MarkerManager.instance().stop() await Controller.instance().stop() for module in MODULES: diff --git a/gns3server/crash_report.py b/gns3server/crash_report.py index 0f34c0ace..77bb23363 100644 --- a/gns3server/crash_report.py +++ b/gns3server/crash_report.py @@ -58,7 +58,7 @@ class CrashReport: Report crash to a third party service """ - DSN = "https://5a97c548f3a1cdc23c9b6b82f7c64744@o19455.ingest.us.sentry.io/38482" + DSN = "https://7b5d8f1189b61e674dc6ee41b0ec9da8@o19455.ingest.us.sentry.io/38482" _instance = None def __init__(self): diff --git a/gns3server/db/repositories/templates.py b/gns3server/db/repositories/templates.py index c141008d0..0f03c74a3 100644 --- a/gns3server/db/repositories/templates.py +++ b/gns3server/db/repositories/templates.py @@ -52,6 +52,9 @@ class TemplatesRepository(BaseRepository): super().__init__(db_session) + def configs_path(self) -> str: + return os.path.join(os.getcwd(), "configs") + async def get_template(self, template_id: UUID) -> Union[None, models.Template]: query = select(models.Template).\ diff --git a/gns3server/main.py b/gns3server/main.py index bb30a2d81..4069f5e3a 100644 --- a/gns3server/main.py +++ b/gns3server/main.py @@ -31,6 +31,8 @@ import os import sys import asyncio import argparse +import logging +import resource def daemonize(): @@ -97,6 +99,34 @@ def parse_arguments(argv): return parser, args +log = logging.getLogger(__name__) + + +def _raise_open_files_limit(target=65535): + """ + Raise RLIMIT_NOFILE at startup so large topologies don't hit EMFILE. + Every started node holds ~3 file descriptors in the server's table + (pidfd + stdout/stderr pipes per child process), so a few hundred nodes + exhaust the default 1024 limit. Best-effort: the hard limit caps what we + can request; failures are logged but never fatal. Runs before daemonize() + so the daemon inherits the raised limit. + """ + try: + soft, hard = resource.getrlimit(resource.RLIMIT_NOFILE) + if soft >= target: + return + new_soft = min(target, hard) + resource.setrlimit(resource.RLIMIT_NOFILE, (new_soft, hard)) + if new_soft < target: + log.warning( + f"Open-files limit raised to {new_soft} (hard limit), below the requested {target}" + ) + else: + log.info(f"Open-files limit raised from {soft} to {new_soft}") + except (OSError, ValueError) as e: + log.warning(f"Could not raise the open-files limit: {e}") + + def main(): """ Entry point for GNS3 server @@ -104,6 +134,7 @@ def main(): if sys.platform.startswith("win"): raise SystemExit("Windows is not a supported platform to run the GNS3 server") + _raise_open_files_limit() if "--daemon" in sys.argv: daemonize() diff --git a/gns3server/schemas/__init__.py b/gns3server/schemas/__init__.py index d228f4b84..af026c241 100644 --- a/gns3server/schemas/__init__.py +++ b/gns3server/schemas/__init__.py @@ -20,7 +20,7 @@ from .common import ErrorMessage from .version import Version # Controller schemas -from .controller.links import LinkCreate, LinkUpdate, Link, UDPPortInfo, EthernetPortInfo, LinkCapture +from .controller.links import LinkCreate, LinkUpdate, Link, UDPPortInfo, EthernetPortInfo, LinkCapture, MarkerCreate, MarkerUpdate, MarkerDefinitionCreate from .controller.computes import ComputeCreate, ComputeUpdate, ComputeVirtualBoxVM, ComputeVMwareVM, ComputeDockerImage, AutoIdlePC, Compute from .controller.templates import TemplateCreate, TemplateUpdate, TemplateUsage, Template from .controller.images import Image, ImageType @@ -91,7 +91,7 @@ from .controller.templates.dynamips_templates import ( ) # Compute schemas -from .compute.nios import UDPNIO, TAPNIO, EthernetNIO +from .compute.nios import UDPNIO, TAPNIO, EthernetNIO, MarkerToggle, MarkerRebuild from .compute.atm_switch_nodes import ATMSwitchCreate, ATMSwitchUpdate, ATMSwitch from .compute.cloud_nodes import CloudCreate, CloudUpdate, Cloud from .compute.docker_nodes import DockerCreate, DockerUpdate, Docker diff --git a/gns3server/schemas/compute/cloud_nodes.py b/gns3server/schemas/compute/cloud_nodes.py index a4dbfae40..28e01c72d 100644 --- a/gns3server/schemas/compute/cloud_nodes.py +++ b/gns3server/schemas/compute/cloud_nodes.py @@ -28,6 +28,28 @@ class HostInterfaceType(str, Enum): tap = "tap" +class IPAddressFamily(str, Enum): + + ipv4 = "ipv4" + ipv6 = "ipv6" + + +class InterfaceStatus(str, Enum): + + up = "up" + down = "down" + + +class HostInterfaceIPAddress(BaseModel): + """ + An IP address (with optional netmask) bound to a host interface. + """ + + family: IPAddressFamily = Field(..., description="Address family (ipv4 or ipv6)") + address: str = Field(..., description="IP address") + netmask: Optional[str] = Field(None, description="Network mask, if available") + + class HostInterface(BaseModel): """ Interface on this host. @@ -36,6 +58,13 @@ class HostInterface(BaseModel): name: str = Field(..., description="Interface name") type: HostInterfaceType = Field(..., description="Interface type") special: bool = Field(..., description="Whether the interface is non standard") + ip_addresses: List[HostInterfaceIPAddress] = Field( + default_factory=list, description="All IPv4 and IPv6 addresses on this interface" + ) + status: InterfaceStatus = Field(InterfaceStatus.down, description="Interface status (up or down)") + speed: int = Field(0, description="Interface speed in Mbit/s (0 if unknown)") + mtu: int = Field(0, description="Interface MTU") + flags: List[str] = Field(default_factory=list, description="Interface flags") class EthernetType(str, Enum): diff --git a/gns3server/schemas/compute/iou_nodes.py b/gns3server/schemas/compute/iou_nodes.py index fe3fe8570..c04b6f0ef 100644 --- a/gns3server/schemas/compute/iou_nodes.py +++ b/gns3server/schemas/compute/iou_nodes.py @@ -38,7 +38,10 @@ class IOUBase(BaseModel): ethernet_adapters: Optional[int] = Field(None, description="How many Ethernet adapters are connected to IOU") ram: Optional[int] = Field(None, gt=0, description="Amount of RAM in MB") nvram: Optional[int] = Field(None, gt=0, description="Amount of NVRAM in KB") - l1_keepalives: Optional[bool] = Field(None, description="Use default IOU values") + l1_keepalives: Optional[bool] = Field( + None, + description="Enable Layer 1 keepalives so IOU interfaces report accurate link state", + ) use_default_iou_values: Optional[bool] = Field(None, description="Use default IOU values") startup_config_content: Optional[str] = Field(None, description="Content of IOU startup configuration file") private_config_content: Optional[str] = Field(None, description="Content of IOU private configuration file") diff --git a/gns3server/schemas/compute/nios.py b/gns3server/schemas/compute/nios.py index cf69f9e30..5830847c5 100644 --- a/gns3server/schemas/compute/nios.py +++ b/gns3server/schemas/compute/nios.py @@ -36,6 +36,7 @@ class UDPNIO(BaseModel): rport: int = Field(..., gt=0, le=65535, description="Remote port") suspend: Optional[bool] = Field(None, description="Suspend the NIO") filters: Optional[dict] = Field(None, description="Packet filters") + markers: Optional[dict] = Field(None, description="Traffic-insight markers") class EthernetNIOType(str, Enum): @@ -64,3 +65,29 @@ class TAPNIO(BaseModel): type: TAPNIOType tap_device: str = Field(..., description="TAP device name e.g. tap0") + + +class MarkerToggle(BaseModel): + """ + Body for the per-marker enable/disable toggle endpoint: flips a running + uBridge marker filter with ``enable_packet_filter on|off`` (no NIO rebuild, + so the pcap identity and emitted counter are preserved). + """ + + enabled: bool + + +class MarkerRebuild(BaseModel): + """ + Body for the per-marker rebuild endpoint: re-install a single uBridge marker + filter with new BPF/tag/direction via ``delete_packet_filter`` + add (NOT a + bridge-wide reset), so sibling markers keep their pcaps open. The marker's + own pcap is reopened by uBridge on re-add (new capture session for the new + BPF), which is expected. + """ + + bpf: str + tag: Optional[int] = None + direction: Optional[str] = None + enabled: bool = True + link_id: str = "" diff --git a/gns3server/schemas/config.py b/gns3server/schemas/config.py index 294ea4cf6..0c712b351 100644 --- a/gns3server/schemas/config.py +++ b/gns3server/schemas/config.py @@ -71,6 +71,7 @@ class QemuSettings(BaseModel): enable_hardware_acceleration: bool = True require_hardware_acceleration: bool = False allow_unsafe_options: bool = False + ovmf_firmware_dir: str = "/usr/share/OVMF" model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True) @@ -112,6 +113,16 @@ class ServerProtocol(str, Enum): https = "https" +class UbridgeControlTransport(str, Enum): + + # TCP control channel: -H host:port. ubridge now binds loopback by default, + # so this is reachable only locally. Retained for backward compatibility. + tcp = "tcp" + # AF_UNIX control channel: -U socket_path, authenticated in-kernel via + # SO_PEERCRED (ubridge accepts only its own UID). Recommended on Linux. + unix = "unix" + + class BuiltinSymbolTheme(str, Enum): classic = "Classic" @@ -153,6 +164,17 @@ class ServerSettings(BaseModel): udp_start_port_range: int = Field(10000, gt=0, le=65535) udp_end_port_range: int = Field(30000, gt=0, le=65535) ubridge_path: str = "ubridge" + # Transport for the uBridge hypervisor control channel. "unix" (-U, + # AF_UNIX + SO_PEERCRED) is the default — recommended on Linux for + # kernel-level peer authentication. "tcp" (-H) is retained for backward + # compatibility. + ubridge_control_transport: UbridgeControlTransport = UbridgeControlTransport.unix + # Marker (traffic-insight) UDP sink: one listener per compute process that + # receives ubridge MARK signals from every ubridge on this host. The host + # defaults to loopback because ubridge runs on the same host as the compute. + # port=0 lets the OS choose a free port (read back and handed to ubridge). + marker_listen_host: str = "127.0.0.1" + marker_listen_port: int = Field(3070, ge=0, le=65535) compute_username: str = "gns3" compute_password: SecretStr = SecretStr("") allowed_interfaces: List[str] = Field(default_factory=list) diff --git a/gns3server/schemas/controller/links.py b/gns3server/schemas/controller/links.py index be6846bb8..fef63f8b1 100644 --- a/gns3server/schemas/controller/links.py +++ b/gns3server/schemas/controller/links.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from pydantic import BaseModel, Field +from pydantic import BaseModel, Field, field_validator from typing import List, Optional, Tuple from enum import Enum from uuid import UUID, uuid4 @@ -62,6 +62,10 @@ class LinkBase(BaseModel): suspend: Optional[bool] = None link_style: Optional[LinkStyle] = None filters: Optional[dict] = None + markers: Optional[dict] = Field( + None, + description="Traffic-insight markers on this link: name → {bpf, tag, enabled}" + ) show_filters_icon: Optional[bool] = Field( True, description="Show filters icon in Web UI" @@ -135,3 +139,154 @@ class LinkCapture(BaseModel): data_link_type: str = "DLT_EN10MB" capture_file_name: Optional[str] = None wireshark: bool = False + + +class MarkerCreate(BaseModel): + """ + Body for attaching a traffic-insight marker to a link. + + ``name`` is optional at the controller REST layer (auto-generated when + absent) but always set when the controller forwards to the compute. + """ + + name: Optional[str] = Field( + None, + pattern=r"^[A-Za-z0-9][A-Za-z0-9_.-]*$", + max_length=32, + description='Unique marker name on the link. Auto-generated when absent.', + ) + bpf: str + tag: Optional[int] = None + link_id: Optional[str] = None + color: Optional[str] = Field( + None, + description="User-chosen hex color for this marker in the Web UI, e.g. '#ff5722'", + ) + highlight_duration: Optional[int] = Field( + None, + ge=1, + description=( + "How long (milliseconds) the Web UI keeps this marker highlighted " + "after a match. Omitted = use the UI default. Pure render hint — " + "stored on the link, never sent to uBridge." + ), + ) + enabled: Optional[bool] = Field( + None, + description="Whether the marker is active. Defaults to true on creation.", + ) + direction: Optional[str] = Field( + None, + pattern=r"^(tx|rx|both)$", + description="Direction filter: 'tx' = capture node sending only, 'rx' = capture node receiving only, 'both' or null = both directions.", + ) + capture_node_id: Optional[UUID] = Field( + None, + description=( + "Which endpoint's uBridge hosts this marker (the 'observer'). " + "tx/rx in `direction` are interpreted from this node's perspective. " + "Must be one of the link's two endpoints and a marker-capable type. " + "Omitted = server auto-picks (first started marker-capable endpoint)." + ), + ) + data_link_type: str = Field( + "DLT_EN10MB", + description=( + "pcap link-layer type the marker's BPF compiles against and its " + "capture file is written with (a uBridge `linktype` token). Defaults " + "to DLT_EN10MB (Ethernet), which is omitted from the uBridge command. " + "Only meaningful for serial links: set it to the matching serial DLT " + "from the port's data_link_types — DLT_C_HDLC / DLT_PPP_SERIAL / " + "DLT_FRELAY / DLT_ATM_RFC1483 — so the BPF offsets and pcap decode " + "match the encapsulation configured in IOS. Create-only (changing it " + "would invalidate the pcap)." + ), + ) + + @field_validator("direction", mode="before") + @classmethod + def _both_to_none(cls, v): + return None if v == "both" else v + + +class MarkerUpdate(BaseModel): + """ + Body for updating a marker — partial update, every field optional. + + ``bpf`` is optional here (it is required on create). ``capture_node_id`` and + ``name`` are create-only / path-driven and intentionally absent; an explicit + ``direction: null`` clears the direction back to both (omitting keeps it). + """ + + bpf: Optional[str] = None + tag: Optional[int] = None + direction: Optional[str] = Field( + None, + pattern=r"^(tx|rx|both)$", + description="Direction filter; 'both' or an explicit null clears it to both. Omit to keep.", + ) + color: Optional[str] = Field(None, description="Hex color render hint, e.g. '#ff5722'") + highlight_duration: Optional[int] = Field( + None, ge=1, description="UI highlight duration in ms; null = UI default" + ) + enabled: Optional[bool] = Field(None, description="Toggle the marker on/off (instant).") + + @field_validator("direction", mode="before") + @classmethod + def _both_to_none(cls, v): + return None if v == "both" else v + + +class MarkerDefinitionCreate(BaseModel): + """ + Body for creating / updating a project-level marker definition. + + The definition is a template — when applied to a link the marker name is + prefixed with ``global-`` (e.g. ``arp`` → ``global-arp``) so it can never + collide with a per-link private marker. + """ + + name: Optional[str] = Field( + None, + pattern=r"^[A-Za-z0-9][A-Za-z0-9_.-]*$", + max_length=32, + description="Unique definition name. Auto-generated when absent.", + ) + bpf: str + tag: Optional[int] = None + color: Optional[str] = Field( + None, + description="User-chosen hex color for the marker in the Web UI, e.g. '#ff5722'", + ) + highlight_duration: Optional[int] = Field( + None, + ge=1, + description=( + "How long (milliseconds) the Web UI keeps this marker highlighted " + "after a match. Omitted = use the UI default. Pure render hint — " + "stored with the definition, never sent to uBridge." + ), + ) + direction: Optional[str] = Field( + None, + pattern=r"^(tx|rx|both)$", + description="Direction filter: 'tx' = capture node sending only, 'rx' = capture node receiving only, 'both' or null = both directions.", + ) + data_link_type: str = Field( + "DLT_EN10MB", + description=( + "pcap link-layer type for inherited markers on serial links (uBridge " + "`linktype`). Defaults to DLT_EN10MB (Ethernet): the definition then " + "applies only to Ethernet links and serial links are skipped. Set a " + "serial DLT — DLT_C_HDLC / DLT_PPP_SERIAL / DLT_FRELAY / " + "DLT_ATM_RFC1483 — to also cover serial links with that encapsulation; " + "Ethernet links stay EN10MB regardless. Changing it re-fans-out." + ), + ) + + @field_validator("direction", mode="before") + @classmethod + def _both_to_none(cls, v): + return None if v == "both" else v + + diff --git a/gns3server/schemas/controller/templates/iou_templates.py b/gns3server/schemas/controller/templates/iou_templates.py index 6dd83d14b..c0a8d398b 100644 --- a/gns3server/schemas/controller/templates/iou_templates.py +++ b/gns3server/schemas/controller/templates/iou_templates.py @@ -35,7 +35,10 @@ class IOUTemplate(TemplateBase): use_default_iou_values: Optional[bool] = Field(False, description="Use default IOU values") startup_config: Optional[str] = Field("iou_l3_base_startup-config.txt", description="Startup-config of IOU") private_config: Optional[str] = Field("", description="Private-config of IOU") - l1_keepalives: Optional[bool] = Field(False, description="Always keep up Ethernet interface (does not always work)") + l1_keepalives: Optional[bool] = Field( + False, + description="Enable Layer 1 keepalives so IOU interfaces report accurate link state", + ) console_type: Optional[ConsoleType] = Field(ConsoleType.telnet, description="Console type") console_auto_start: Optional[bool] = Field( False, description="Automatically start the console when the node has started" diff --git a/gns3server/services/templates.py b/gns3server/services/templates.py index b2fd6c582..c079608dd 100644 --- a/gns3server/services/templates.py +++ b/gns3server/services/templates.py @@ -175,6 +175,9 @@ class TemplatesService: if builtin_template["template_id"] == template_id: return jsonable_encoder(builtin_template) + def _base_path(self): + return self._templates_repo.configs_path() + async def get_templates(self) -> List[dict]: templates = [] @@ -342,3 +345,45 @@ class TemplatesService: self._controller.notification.controller_emit("template.deleted", {"template_id": str(template_id)}) else: raise ControllerNotFoundError(f"Template '{template_id}' not found") + + def _template_path(self, template_id: str) -> str: + return os.path.join(self._base_path(), str(template_id)) + + def list_files(self, template_id: str): + path = self._template_path(template_id) + + if not os.path.exists(path): + return [] + + return [ + {"filename": f} + for f in sorted(os.listdir(path)) + if os.path.isfile(os.path.join(path, f)) + ] + + def get_file(self, template_id: str, filename: str): + safe_filename = os.path.basename(filename) + path = os.path.join(self._template_path(template_id), safe_filename) + + if not os.path.isfile(path): + raise ControllerNotFoundError(f"File '{safe_filename}' not found") + + try: + with open(path, encoding="utf-8", errors="ignore") as f: + return f.read() + except OSError as e: + raise ControllerError(str(e)) + + def update_file(self, template_id: str, filename: str, content: str): + safe_filename = os.path.basename(filename) + + dir_path = self._template_path(template_id) + path = os.path.join(dir_path, safe_filename) + + os.makedirs(dir_path, exist_ok=True) + + try: + with open(path, "w", encoding="utf-8") as f: + f.write(content) + except OSError as e: + raise ControllerError(str(e)) \ No newline at end of file diff --git a/gns3server/static/web-ui/chunk-6QUQX5EO.js b/gns3server/static/web-ui/chunk-6QUQX5EO.js deleted file mode 100644 index b0cef2889..000000000 --- a/gns3server/static/web-ui/chunk-6QUQX5EO.js +++ /dev/null @@ -1,15 +0,0 @@ -var UE=Object.create;var ys=Object.defineProperty,$E=Object.defineProperties,zE=Object.getOwnPropertyDescriptor,GE=Object.getOwnPropertyDescriptors,WE=Object.getOwnPropertyNames,gs=Object.getOwnPropertySymbols,qE=Object.getPrototypeOf,Il=Object.prototype.hasOwnProperty,$p=Object.prototype.propertyIsEnumerable;var Up=(e,n,t)=>n in e?ys(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,w=(e,n)=>{for(var t in n||={})Il.call(n,t)&&Up(e,t,n[t]);if(gs)for(var t of gs(n))$p.call(n,t)&&Up(e,t,n[t]);return e},V=(e,n)=>$E(e,GE(n));var YE=(e,n)=>{var t={};for(var r in e)Il.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&gs)for(var r of gs(e))n.indexOf(r)<0&&$p.call(e,r)&&(t[r]=e[r]);return t};var uR=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),dR=(e,n)=>{for(var t in n)ys(e,t,{get:n[t],enumerable:!0})},ZE=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of WE(n))!Il.call(e,o)&&o!==t&&ys(e,o,{get:()=>n[o],enumerable:!(r=zE(n,o))||r.enumerable});return e};var fR=(e,n,t)=>(t=e!=null?UE(qE(e)):{},ZE(n||!e||!e.__esModule?ys(t,"default",{value:e,enumerable:!0}):t,e));function x(e){return typeof e=="function"}function mn(e){let t=e(r=>{Error.call(r),r.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var vs=mn(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription: -${t.map((r,o)=>`${o+1}) ${r.toString()}`).join(` - `)}`:"",this.name="UnsubscriptionError",this.errors=t});function Hn(e,n){if(e){let t=e.indexOf(n);0<=t&&e.splice(t,1)}}var B=class e{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;let{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(let i of t)i.remove(this);else t.remove(this);let{initialTeardown:r}=this;if(x(r))try{r()}catch(i){n=i instanceof vs?i.errors:[i]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let i of o)try{zp(i)}catch(s){n=n??[],s instanceof vs?n=[...n,...s.errors]:n.push(s)}}if(n)throw new vs(n)}}add(n){var t;if(n&&n!==this)if(this.closed)zp(n);else{if(n instanceof e){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(n)}}_hasParent(n){let{_parentage:t}=this;return t===n||Array.isArray(t)&&t.includes(n)}_addParent(n){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(n),t):t?[t,n]:n}_removeParent(n){let{_parentage:t}=this;t===n?this._parentage=null:Array.isArray(t)&&Hn(t,n)}remove(n){let{_finalizers:t}=this;t&&Hn(t,n),n instanceof e&&n._removeParent(this)}};B.EMPTY=(()=>{let e=new B;return e.closed=!0,e})();var Ml=B.EMPTY;function bs(e){return e instanceof B||e&&"closed"in e&&x(e.remove)&&x(e.add)&&x(e.unsubscribe)}function zp(e){x(e)?e():e.unsubscribe()}var dt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var kr={setTimeout(e,n,...t){let{delegate:r}=kr;return r?.setTimeout?r.setTimeout(e,n,...t):setTimeout(e,n,...t)},clearTimeout(e){let{delegate:n}=kr;return(n?.clearTimeout||clearTimeout)(e)},delegate:void 0};function _s(e){kr.setTimeout(()=>{let{onUnhandledError:n}=dt;if(n)n(e);else throw e})}function Un(){}var Gp=Sl("C",void 0,void 0);function Wp(e){return Sl("E",void 0,e)}function qp(e){return Sl("N",e,void 0)}function Sl(e,n,t){return{kind:e,value:n,error:t}}var $n=null;function Fr(e){if(dt.useDeprecatedSynchronousErrorHandling){let n=!$n;if(n&&($n={errorThrown:!1,error:null}),e(),n){let{errorThrown:t,error:r}=$n;if($n=null,t)throw r}}else e()}function Yp(e){dt.useDeprecatedSynchronousErrorHandling&&$n&&($n.errorThrown=!0,$n.error=e)}var zn=class extends B{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,bs(n)&&n.add(this)):this.destination=QE}static create(n,t,r){return new Wt(n,t,r)}next(n){this.isStopped?xl(qp(n),this):this._next(n)}error(n){this.isStopped?xl(Wp(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?xl(Gp,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},KE=Function.prototype.bind;function Tl(e,n){return KE.call(e,n)}var Al=class{constructor(n){this.partialObserver=n}next(n){let{partialObserver:t}=this;if(t.next)try{t.next(n)}catch(r){Ds(r)}}error(n){let{partialObserver:t}=this;if(t.error)try{t.error(n)}catch(r){Ds(r)}else Ds(n)}complete(){let{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(t){Ds(t)}}},Wt=class extends zn{constructor(n,t,r){super();let o;if(x(n)||!n)o={next:n??void 0,error:t??void 0,complete:r??void 0};else{let i;this&&dt.useDeprecatedNextContext?(i=Object.create(n),i.unsubscribe=()=>this.unsubscribe(),o={next:n.next&&Tl(n.next,i),error:n.error&&Tl(n.error,i),complete:n.complete&&Tl(n.complete,i)}):o=n}this.destination=new Al(o)}};function Ds(e){dt.useDeprecatedSynchronousErrorHandling?Yp(e):_s(e)}function XE(e){throw e}function xl(e,n){let{onStoppedNotification:t}=dt;t&&kr.setTimeout(()=>t(e,n))}var QE={closed:!0,next:Un,error:XE,complete:Un};var Pr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Ye(e){return e}function JE(...e){return Nl(e)}function Nl(e){return e.length===0?Ye:e.length===1?e[0]:function(t){return e.reduce((r,o)=>o(r),t)}}var k=(()=>{class e{constructor(t){t&&(this._subscribe=t)}lift(t){let r=new e;return r.source=this,r.operator=t,r}subscribe(t,r,o){let i=tw(t)?t:new Wt(t,r,o);return Fr(()=>{let{operator:s,source:a}=this;i.add(s?s.call(i,a):a?this._subscribe(i):this._trySubscribe(i))}),i}_trySubscribe(t){try{return this._subscribe(t)}catch(r){t.error(r)}}forEach(t,r){return r=Zp(r),new r((o,i)=>{let s=new Wt({next:a=>{try{t(a)}catch(c){i(c),s.unsubscribe()}},error:i,complete:o});this.subscribe(s)})}_subscribe(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)}[Pr](){return this}pipe(...t){return Nl(t)(this)}toPromise(t){return t=Zp(t),new t((r,o)=>{let i;this.subscribe(s=>i=s,s=>o(s),()=>r(i))})}}return e.create=n=>new e(n),e})();function Zp(e){var n;return(n=e??dt.Promise)!==null&&n!==void 0?n:Promise}function ew(e){return e&&x(e.next)&&x(e.error)&&x(e.complete)}function tw(e){return e&&e instanceof zn||ew(e)&&bs(e)}var Kp=mn(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var N=(()=>{class e extends k{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let r=new Es(this,this);return r.operator=t,r}_throwIfClosed(){if(this.closed)throw new Kp}next(t){Fr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(t)}})}error(t){Fr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:r}=this;for(;r.length;)r.shift().error(t)}})}complete(){Fr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){let{hasError:r,isStopped:o,observers:i}=this;return r||o?Ml:(this.currentObservers=null,i.push(t),new B(()=>{this.currentObservers=null,Hn(i,t)}))}_checkFinalizedStatuses(t){let{hasError:r,thrownError:o,isStopped:i}=this;r?t.error(o):i&&t.complete()}asObservable(){let t=new k;return t.source=this,t}}return e.create=(n,t)=>new Es(n,t),e})(),Es=class extends N{constructor(n,t){super(),this.destination=n,this.source=t}next(n){var t,r;(r=(t=this.destination)===null||t===void 0?void 0:t.next)===null||r===void 0||r.call(t,n)}error(n){var t,r;(r=(t=this.destination)===null||t===void 0?void 0:t.error)===null||r===void 0||r.call(t,n)}complete(){var n,t;(t=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||t===void 0||t.call(n)}_subscribe(n){var t,r;return(r=(t=this.source)===null||t===void 0?void 0:t.subscribe(n))!==null&&r!==void 0?r:Ml}};function Rl(e){return x(e?.lift)}function R(e){return n=>{if(Rl(n))return n.lift(function(t){try{return e(t,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function A(e,n,t,r,o){return new Ol(e,n,t,r,o)}var Ol=class extends zn{constructor(n,t,r,o,i,s){super(n),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=t?function(a){try{t(a)}catch(c){n.error(c)}}:super._next,this._error=o?function(a){try{o(a)}catch(c){n.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){n.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((n=this.onFinalize)===null||n===void 0||n.call(this))}}};function Qp(e,n,t,r){function o(i){return i instanceof t?i:new t(function(s){s(i)})}return new(t||(t=Promise))(function(i,s){function a(u){try{l(r.next(u))}catch(d){s(d)}}function c(u){try{l(r.throw(u))}catch(d){s(d)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((r=r.apply(e,n||[])).next())})}function Xp(e){var n=typeof Symbol=="function"&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gn(e){return this instanceof Gn?(this.v=e,this):new Gn(e)}function Jp(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t.apply(e,n||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(h){return function(m){return Promise.resolve(m).then(h,d)}}function a(h,m){r[h]&&(o[h]=function(b){return new Promise(function(_,C){i.push([h,b,_,C])>1||c(h,b)})},m&&(o[h]=m(o[h])))}function c(h,m){try{l(r[h](m))}catch(b){p(i[0][3],b)}}function l(h){h.value instanceof Gn?Promise.resolve(h.value.v).then(u,d):p(i[0][2],h)}function u(h){c("next",h)}function d(h){c("throw",h)}function p(h,m){h(m),i.shift(),i.length&&c(i[0][0],i[0][1])}}function em(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e[Symbol.asyncIterator],t;return n?n.call(e):(e=typeof Xp=="function"?Xp(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(i){t[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}var Lr=e=>e&&typeof e.length=="number"&&typeof e!="function";function ws(e){return x(e?.then)}function Cs(e){return x(e[Pr])}function Is(e){return Symbol.asyncIterator&&x(e?.[Symbol.asyncIterator])}function Ms(e){return new TypeError(`You provided ${e!==null&&typeof e=="object"?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function nw(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ss=nw();function Ts(e){return x(e?.[Ss])}function xs(e){return Jp(this,arguments,function*(){let t=e.getReader();try{for(;;){let{value:r,done:o}=yield Gn(t.read());if(o)return yield Gn(void 0);yield yield Gn(r)}}finally{t.releaseLock()}})}function As(e){return x(e?.getReader)}function $(e){if(e instanceof k)return e;if(e!=null){if(Cs(e))return rw(e);if(Lr(e))return ow(e);if(ws(e))return iw(e);if(Is(e))return tm(e);if(Ts(e))return sw(e);if(As(e))return aw(e)}throw Ms(e)}function rw(e){return new k(n=>{let t=e[Pr]();if(x(t.subscribe))return t.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ow(e){return new k(n=>{for(let t=0;t{e.then(t=>{n.closed||(n.next(t),n.complete())},t=>n.error(t)).then(null,_s)})}function sw(e){return new k(n=>{for(let t of e)if(n.next(t),n.closed)return;n.complete()})}function tm(e){return new k(n=>{cw(e,n).catch(t=>n.error(t))})}function aw(e){return tm(xs(e))}function cw(e,n){var t,r,o,i;return Qp(this,void 0,void 0,function*(){try{for(t=em(e);r=yield t.next(),!r.done;){let s=r.value;if(n.next(s),n.closed)return}}catch(s){o={error:s}}finally{try{r&&!r.done&&(i=t.return)&&(yield i.call(t))}finally{if(o)throw o.error}}n.complete()})}function qt(e){return R((n,t)=>{$(e).subscribe(A(t,()=>t.complete(),Un)),!t.closed&&n.subscribe(t)})}function nm(){return R((e,n)=>{let t=null;e._refCount++;let r=A(n,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount){t=null;return}let o=e._connection,i=t;t=null,o&&(!i||o===i)&&o.unsubscribe(),n.unsubscribe()});e.subscribe(r),r.closed||(t=e.connect())})}var Lo=class extends k{constructor(n,t){super(),this.source=n,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,Rl(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){let n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:n}=this;this._subject=this._connection=null,n?.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new B;let t=this.getSubject();n.add(this.source.subscribe(A(t,void 0,()=>{this._teardown(),t.complete()},r=>{this._teardown(),t.error(r)},()=>this._teardown()))),n.closed&&(this._connection=null,n=B.EMPTY)}return n}refCount(){return nm()(this)}};var Vr={schedule(e){let n=requestAnimationFrame,t=cancelAnimationFrame,{delegate:r}=Vr;r&&(n=r.requestAnimationFrame,t=r.cancelAnimationFrame);let o=n(i=>{t=void 0,e(i)});return new B(()=>t?.(o))},requestAnimationFrame(...e){let{delegate:n}=Vr;return(n?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:n}=Vr;return(n?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0};var Wn=class extends N{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){let t=super._subscribe(n);return!t.closed&&n.next(this._value),t}getValue(){let{hasError:n,thrownError:t,_value:r}=this;if(n)throw t;return this._throwIfClosed(),r}next(n){super.next(this._value=n)}};var Vo={now(){return(Vo.delegate||Date).now()},delegate:void 0};var jo=class extends N{constructor(n=1/0,t=1/0,r=Vo){super(),this._bufferSize=n,this._windowTime=t,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,t)}next(n){let{isStopped:t,_buffer:r,_infiniteTimeWindow:o,_timestampProvider:i,_windowTime:s}=this;t||(r.push(n),!o&&r.push(i.now()+s)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(n),{_infiniteTimeWindow:r,_buffer:o}=this,i=o.slice();for(let s=0;srm(n)&&e()),n},clearImmediate(e){rm(e)}};var{setImmediate:uw,clearImmediate:dw}=om,Ho={setImmediate(...e){let{delegate:n}=Ho;return(n?.setImmediate||uw)(...e)},clearImmediate(e){let{delegate:n}=Ho;return(n?.clearImmediate||dw)(e)},delegate:void 0};var Rs=class extends gn{constructor(n,t){super(n,t),this.scheduler=n,this.work=t}requestAsyncId(n,t,r=0){return r!==null&&r>0?super.requestAsyncId(n,t,r):(n.actions.push(this),n._scheduled||(n._scheduled=Ho.setImmediate(n.flush.bind(n,void 0))))}recycleAsyncId(n,t,r=0){var o;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(n,t,r);let{actions:i}=n;t!=null&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==t&&(Ho.clearImmediate(t),n._scheduled===t&&(n._scheduled=void 0))}};var jr=class e{constructor(n,t=e.now){this.schedulerActionCtor=n,this.now=t}schedule(n,t=0,r){return new this.schedulerActionCtor(this,n).schedule(r,t)}};jr.now=Vo.now;var yn=class extends jr{constructor(n,t=jr.now){super(n,t),this.actions=[],this._active=!1}flush(n){let{actions:t}=this;if(this._active){t.push(n);return}let r;this._active=!0;do if(r=n.execute(n.state,n.delay))break;while(n=t.shift());if(this._active=!1,r){for(;n=t.shift();)n.unsubscribe();throw r}}};var Os=class extends yn{flush(n){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:r}=this,o;n=n||r.shift();do if(o=n.execute(n.state,n.delay))break;while((n=r[0])&&n.id===t&&r.shift());if(this._active=!1,o){for(;(n=r[0])&&n.id===t&&r.shift();)n.unsubscribe();throw o}}};var Pl=new Os(Rs);var ft=new yn(gn),im=ft;var ks=class extends gn{constructor(n,t){super(n,t),this.scheduler=n,this.work=t}requestAsyncId(n,t,r=0){return r!==null&&r>0?super.requestAsyncId(n,t,r):(n.actions.push(this),n._scheduled||(n._scheduled=Vr.requestAnimationFrame(()=>n.flush(void 0))))}recycleAsyncId(n,t,r=0){var o;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(n,t,r);let{actions:i}=n;t!=null&&t===n._scheduled&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==t&&(Vr.cancelAnimationFrame(t),n._scheduled=void 0)}};var Fs=class extends yn{flush(n){this._active=!0;let t;n?t=n.id:(t=this._scheduled,this._scheduled=void 0);let{actions:r}=this,o;n=n||r.shift();do if(o=n.execute(n.state,n.delay))break;while((n=r[0])&&n.id===t&&r.shift());if(this._active=!1,o){for(;(n=r[0])&&n.id===t&&r.shift();)n.unsubscribe();throw o}}};var Ll=new Fs(ks);var qn=new k(e=>e.complete());function Ps(e){return e&&x(e.schedule)}function Vl(e){return e[e.length-1]}function Ls(e){return x(Vl(e))?e.pop():void 0}function xt(e){return Ps(Vl(e))?e.pop():void 0}function sm(e,n){return typeof Vl(e)=="number"?e.pop():n}function Ie(e,n,t,r=0,o=!1){let i=n.schedule(function(){t(),o?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(i),!o)return i}function Vs(e,n=0){return R((t,r)=>{t.subscribe(A(r,o=>Ie(r,e,()=>r.next(o),n),()=>Ie(r,e,()=>r.complete(),n),o=>Ie(r,e,()=>r.error(o),n)))})}function js(e,n=0){return R((t,r)=>{r.add(e.schedule(()=>t.subscribe(r),n))})}function am(e,n){return $(e).pipe(js(n),Vs(n))}function cm(e,n){return $(e).pipe(js(n),Vs(n))}function lm(e,n){return new k(t=>{let r=0;return n.schedule(function(){r===e.length?t.complete():(t.next(e[r++]),t.closed||this.schedule())})})}function um(e,n){return new k(t=>{let r;return Ie(t,n,()=>{r=e[Ss](),Ie(t,n,()=>{let o,i;try{({value:o,done:i}=r.next())}catch(s){t.error(s);return}i?t.complete():t.next(o)},0,!0)}),()=>x(r?.return)&&r.return()})}function Bs(e,n){if(!e)throw new Error("Iterable cannot be null");return new k(t=>{Ie(t,n,()=>{let r=e[Symbol.asyncIterator]();Ie(t,n,()=>{r.next().then(o=>{o.done?t.complete():t.next(o.value)})},0,!0)})})}function dm(e,n){return Bs(xs(e),n)}function fm(e,n){if(e!=null){if(Cs(e))return am(e,n);if(Lr(e))return lm(e,n);if(ws(e))return cm(e,n);if(Is(e))return Bs(e,n);if(Ts(e))return um(e,n);if(As(e))return dm(e,n)}throw Ms(e)}function tt(e,n){return n?fm(e,n):$(e)}function Be(...e){let n=xt(e);return tt(e,n)}function jl(e,n){let t=x(e)?e:()=>e,r=o=>o.error(t());return new k(n?o=>n.schedule(r,0,o):r)}function vn(e){return!!e&&(e instanceof k||x(e.lift)&&x(e.subscribe))}var Uo=mn(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Hs(e){return e instanceof Date&&!isNaN(e)}var fw=mn(e=>function(t=null){e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t});function hw(e,n){let{first:t,each:r,with:o=pw,scheduler:i=n??ft,meta:s=null}=Hs(e)?{first:e}:typeof e=="number"?{each:e}:e;if(t==null&&r==null)throw new TypeError("No timeout provided.");return R((a,c)=>{let l,u,d=null,p=0,h=m=>{u=Ie(c,i,()=>{try{l.unsubscribe(),$(o({meta:s,lastValue:d,seen:p})).subscribe(c)}catch(b){c.error(b)}},m)};l=a.subscribe(A(c,m=>{u?.unsubscribe(),p++,c.next(d=m),r>0&&h(r)},void 0,void 0,()=>{u?.closed||u?.unsubscribe(),d=null})),!p&&h(t!=null?typeof t=="number"?t:+t-i.now():r)})}function pw(e){throw new fw(e)}function re(e,n){return R((t,r)=>{let o=0;t.subscribe(A(r,i=>{r.next(e.call(n,i,o++))}))})}var{isArray:mw}=Array;function gw(e,n){return mw(n)?e(...n):e(n)}function Br(e){return re(n=>gw(e,n))}var{isArray:yw}=Array,{getPrototypeOf:vw,prototype:bw,keys:_w}=Object;function Us(e){if(e.length===1){let n=e[0];if(yw(n))return{args:n,keys:null};if(Dw(n)){let t=_w(n);return{args:t.map(r=>n[r]),keys:t}}}return{args:e,keys:null}}function Dw(e){return e&&typeof e=="object"&&vw(e)===bw}function $s(e,n){return e.reduce((t,r,o)=>(t[r]=n[o],t),{})}function Bl(...e){let n=xt(e),t=Ls(e),{args:r,keys:o}=Us(e);if(r.length===0)return tt([],n);let i=new k(Ew(r,n,o?s=>$s(o,s):Ye));return t?i.pipe(Br(t)):i}function Ew(e,n,t=Ye){return r=>{hm(n,()=>{let{length:o}=e,i=new Array(o),s=o,a=o;for(let c=0;c{let l=tt(e[c],n),u=!1;l.subscribe(A(r,d=>{i[c]=d,u||(u=!0,a--),a||r.next(t(i.slice()))},()=>{--s||r.complete()}))},r)},r)}}function hm(e,n,t){e?Ie(t,e,n):n()}function pm(e,n,t,r,o,i,s,a){let c=[],l=0,u=0,d=!1,p=()=>{d&&!c.length&&!l&&n.complete()},h=b=>l{i&&n.next(b),l++;let _=!1;$(t(b,u++)).subscribe(A(n,C=>{o?.(C),i?h(C):n.next(C)},()=>{_=!0},void 0,()=>{if(_)try{for(l--;c.length&&lm(C)):m(C)}p()}catch(C){n.error(C)}}))};return e.subscribe(A(n,h,()=>{d=!0,p()})),()=>{a?.()}}function ht(e,n,t=1/0){return x(n)?ht((r,o)=>re((i,s)=>n(r,i,o,s))($(e(r,o))),t):(typeof n=="number"&&(t=n),R((r,o)=>pm(r,o,e,t)))}function $o(e=1/0){return ht(Ye,e)}function mm(){return $o(1)}function bn(...e){return mm()(tt(e,xt(e)))}function ww(e){return new k(n=>{$(e()).subscribe(n)})}function Hl(...e){let n=Ls(e),{args:t,keys:r}=Us(e),o=new k(i=>{let{length:s}=t;if(!s){i.complete();return}let a=new Array(s),c=s,l=s;for(let u=0;u{d||(d=!0,l--),a[u]=p},()=>c--,void 0,()=>{(!c||!d)&&(l||i.next(r?$s(r,a):a),i.complete())}))}});return n?o.pipe(Br(n)):o}var Cw=["addListener","removeListener"],Iw=["addEventListener","removeEventListener"],Mw=["on","off"];function Ul(e,n,t,r){if(x(t)&&(r=t,t=void 0),r)return Ul(e,n,t).pipe(Br(r));let[o,i]=xw(e)?Iw.map(s=>a=>e[s](n,a,t)):Sw(e)?Cw.map(gm(e,n)):Tw(e)?Mw.map(gm(e,n)):[];if(!o&&Lr(e))return ht(s=>Ul(s,n,t))($(e));if(!o)throw new TypeError("Invalid event target");return new k(s=>{let a=(...c)=>s.next(1i(a)})}function gm(e,n){return t=>r=>e[t](n,r)}function Sw(e){return x(e.addListener)&&x(e.removeListener)}function Tw(e){return x(e.on)&&x(e.off)}function xw(e){return x(e.addEventListener)&&x(e.removeEventListener)}function Yn(e=0,n,t=im){let r=-1;return n!=null&&(Ps(n)?t=n:r=n),new k(o=>{let i=Hs(e)?+e-t.now():e;i<0&&(i=0);let s=0;return t.schedule(function(){o.closed||(o.next(s++),0<=r?this.schedule(void 0,r):o.complete())},i)})}function Aw(e=0,n=ft){return e<0&&(e=0),Yn(e,e,n)}function Nw(...e){let n=xt(e),t=sm(e,1/0),r=e;return r.length?r.length===1?$(r[0]):$o(t)(tt(r,n)):qn}function we(e,n){return R((t,r)=>{let o=0;t.subscribe(A(r,i=>e.call(n,i,o++)&&r.next(i)))})}function ym(e){return R((n,t)=>{let r=!1,o=null,i=null,s=!1,a=()=>{if(i?.unsubscribe(),i=null,r){r=!1;let l=o;o=null,t.next(l)}s&&t.complete()},c=()=>{i=null,s&&t.complete()};n.subscribe(A(t,l=>{r=!0,o=l,i||$(e(l)).subscribe(i=A(t,a,c))},()=>{s=!0,(!r||!i||i.closed)&&t.complete()}))})}function zo(e,n=ft){return ym(()=>Yn(e,n))}function He(e){return R((n,t)=>{let r=null,o=!1,i;r=n.subscribe(A(t,void 0,void 0,s=>{i=$(e(s,He(e)(n))),r?(r.unsubscribe(),r=null,i.subscribe(t)):o=!0})),o&&(r.unsubscribe(),r=null,i.subscribe(t))})}function vm(e,n,t,r,o){return(i,s)=>{let a=t,c=n,l=0;i.subscribe(A(s,u=>{let d=l++;c=a?e(c,u,d):(a=!0,u),r&&s.next(c)},o&&(()=>{a&&s.next(c),s.complete()})))}}function $l(e,n){return R(vm(e,n,arguments.length>=2,!1,!0))}function zl(e,n){return x(n)?ht(e,n,1):ht(e,1)}function Rw(e){return $l((n,t,r)=>!e||e(t,r)?n+1:n,0)}function Zn(e,n=ft){return R((t,r)=>{let o=null,i=null,s=null,a=()=>{if(o){o.unsubscribe(),o=null;let l=i;i=null,r.next(l)}};function c(){let l=s+e,u=n.now();if(u{i=l,s=n.now(),o||(o=n.schedule(c,e),r.add(o))},()=>{a(),r.complete()},void 0,()=>{i=o=null}))})}function bm(e){return R((n,t)=>{let r=!1;n.subscribe(A(t,o=>{r=!0,t.next(o)},()=>{r||t.next(e),t.complete()}))})}function pt(e){return e<=0?()=>qn:R((n,t)=>{let r=0;n.subscribe(A(t,o=>{++r<=e&&(t.next(o),e<=r&&t.complete())}))})}function _m(){return R((e,n)=>{e.subscribe(A(n,Un))})}function Gl(e){return re(()=>e)}function Wl(e,n){return n?t=>bn(n.pipe(pt(1),_m()),t.pipe(Wl(e))):ht((t,r)=>$(e(t,r)).pipe(pt(1),Gl(t)))}function Ow(e,n=ft){let t=Yn(e,n);return Wl(()=>t)}function Hr(e,n=Ye){return e=e??kw,R((t,r)=>{let o,i=!0;t.subscribe(A(r,s=>{let a=n(s);(i||!e(o,a))&&(i=!1,o=a,r.next(s))}))})}function kw(e,n){return e===n}function Dm(e=Fw){return R((n,t)=>{let r=!1;n.subscribe(A(t,o=>{r=!0,t.next(o)},()=>r?t.complete():t.error(e())))})}function Fw(){return new Uo}function zs(e){return R((n,t)=>{try{n.subscribe(t)}finally{t.add(e)}})}function Pw(e,n){let t=arguments.length>=2;return r=>r.pipe(e?we((o,i)=>e(o,i,r)):Ye,pt(1),t?bm(n):Dm(()=>new Uo))}function Lw(e){return e<=0?()=>qn:R((n,t)=>{let r=[];n.subscribe(A(t,o=>{r.push(o),e{for(let o of r)t.next(o);t.complete()},void 0,()=>{r=null}))})}function Em(){return R((e,n)=>{let t,r=!1;e.subscribe(A(n,o=>{let i=t;t=o,r&&n.next([i,o]),r=!0}))})}function Yl(e={}){let{connector:n=()=>new N,resetOnError:t=!0,resetOnComplete:r=!0,resetOnRefCountZero:o=!0}=e;return i=>{let s,a,c,l=0,u=!1,d=!1,p=()=>{a?.unsubscribe(),a=void 0},h=()=>{p(),s=c=void 0,u=d=!1},m=()=>{let b=s;h(),b?.unsubscribe()};return R((b,_)=>{l++,!d&&!u&&p();let C=c=c??n();_.add(()=>{l--,l===0&&!d&&!u&&(a=ql(m,o))}),C.subscribe(_),!s&&l>0&&(s=new Wt({next:ne=>C.next(ne),error:ne=>{d=!0,p(),a=ql(h,t,ne),C.error(ne)},complete:()=>{u=!0,p(),a=ql(h,r),C.complete()}}),$(b).subscribe(s))})(i)}}function ql(e,n,...t){if(n===!0){e();return}if(n===!1)return;let r=new Wt({next:()=>{r.unsubscribe(),e()}});return $(n(...t)).subscribe(r)}function wm(e,n,t){let r,o=!1;return e&&typeof e=="object"?{bufferSize:r=1/0,windowTime:n=1/0,refCount:o=!1,scheduler:t}=e:r=e??1/0,Yl({connector:()=>new jo(r,n,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function Go(e){return we((n,t)=>e<=t)}function Wo(...e){let n=xt(e);return R((t,r)=>{(n?bn(e,t,n):bn(e,t)).subscribe(r)})}function Gs(e,n){return R((t,r)=>{let o=null,i=0,s=!1,a=()=>s&&!o&&r.complete();t.subscribe(A(r,c=>{o?.unsubscribe();let l=0,u=i++;$(e(c,u)).subscribe(o=A(r,d=>r.next(n?n(c,d,u,l++):d),()=>{o=null,a()}))},()=>{s=!0,a()}))})}function Zl(e,n=!1){return R((t,r)=>{let o=0;t.subscribe(A(r,i=>{let s=e(i,o++);(s||n)&&r.next(i),!s&&r.complete()}))})}function Kl(e,n,t){let r=x(e)||n||t?{next:e,error:n,complete:t}:e;return r?R((o,i)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;o.subscribe(A(i,c=>{var l;(l=r.next)===null||l===void 0||l.call(r,c),i.next(c)},()=>{var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),i.complete()},c=>{var l;a=!1,(l=r.error)===null||l===void 0||l.call(r,c),i.error(c)},()=>{var c,l;a&&((c=r.unsubscribe)===null||c===void 0||c.call(r)),(l=r.finalize)===null||l===void 0||l.call(r)}))}):Ye}var Me=null,Ws=!1,Xl=1,Vw=null,ie=Symbol("SIGNAL");function M(e){let n=Me;return Me=e,n}function qs(){return Me}var _n={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Yt(e){if(Ws)throw new Error("");if(Me===null)return;Me.consumerOnSignalRead(e);let n=Me.producersTail;if(n!==void 0&&n.producer===e)return;let t,r=Me.recomputing;if(r&&(t=n!==void 0?n.nextProducer:Me.producers,t!==void 0&&t.producer===e)){Me.producersTail=t,t.lastReadVersion=e.version;return}let o=e.consumersTail;if(o!==void 0&&o.consumer===Me&&(!r||Bw(o,Me)))return;let i=zr(Me),s={producer:e,consumer:Me,nextProducer:t,prevConsumer:o,lastReadVersion:e.version,nextConsumer:void 0};Me.producersTail=s,n!==void 0?n.nextProducer=s:Me.producers=s,i&&Sm(e,s)}function Cm(){Xl++}function Qn(e){if(!(zr(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===Xl)){if(!e.producerMustRecompute(e)&&!$r(e)){Ur(e);return}e.producerRecomputeValue(e),Ur(e)}}function Ql(e){if(e.consumers===void 0)return;let n=Ws;Ws=!0;try{for(let t=e.consumers;t!==void 0;t=t.nextConsumer){let r=t.consumer;r.dirty||jw(r)}}finally{Ws=n}}function Jl(){return Me?.consumerAllowSignalWrites!==!1}function jw(e){e.dirty=!0,Ql(e),e.consumerMarkedDirty?.(e)}function Ur(e){e.dirty=!1,e.lastCleanEpoch=Xl}function Zt(e){return e&&Im(e),M(e)}function Im(e){e.producersTail=void 0,e.recomputing=!0}function Dn(e,n){M(n),e&&Mm(e)}function Mm(e){e.recomputing=!1;let n=e.producersTail,t=n!==void 0?n.nextProducer:e.producers;if(t!==void 0){if(zr(e))do t=eu(t);while(t!==void 0);n!==void 0?n.nextProducer=void 0:e.producers=void 0}}function $r(e){for(let n=e.producers;n!==void 0;n=n.nextProducer){let t=n.producer,r=n.lastReadVersion;if(r!==t.version||(Qn(t),r!==t.version))return!0}return!1}function En(e){if(zr(e)){let n=e.producers;for(;n!==void 0;)n=eu(n)}e.producers=void 0,e.producersTail=void 0,e.consumers=void 0,e.consumersTail=void 0}function Sm(e,n){let t=e.consumersTail,r=zr(e);if(t!==void 0?(n.nextConsumer=t.nextConsumer,t.nextConsumer=n):(n.nextConsumer=void 0,e.consumers=n),n.prevConsumer=t,e.consumersTail=n,!r)for(let o=e.producers;o!==void 0;o=o.nextProducer)Sm(o.producer,o)}function eu(e){let n=e.producer,t=e.nextProducer,r=e.nextConsumer,o=e.prevConsumer;if(e.nextConsumer=void 0,e.prevConsumer=void 0,r!==void 0?r.prevConsumer=o:n.consumersTail=o,o!==void 0)o.nextConsumer=r;else if(n.consumers=r,!zr(n)){let i=n.producers;for(;i!==void 0;)i=eu(i)}return t}function zr(e){return e.consumerIsAlwaysLive||e.consumers!==void 0}function qo(e){Vw?.(e)}function Bw(e,n){let t=n.producersTail;if(t!==void 0){let r=n.producers;do{if(r===e)return!0;if(r===t)break;r=r.nextProducer}while(r!==void 0)}return!1}function Yo(e,n){return Object.is(e,n)}function Zo(e,n){let t=Object.create(Hw);t.computation=e,n!==void 0&&(t.equal=n);let r=()=>{if(Qn(t),Yt(t),t.value===At)throw t.error;return t.value};return r[ie]=t,qo(t),r}var Kn=Symbol("UNSET"),Xn=Symbol("COMPUTING"),At=Symbol("ERRORED"),Hw=V(w({},_n),{value:Kn,dirty:!0,error:null,equal:Yo,kind:"computed",producerMustRecompute(e){return e.value===Kn||e.value===Xn},producerRecomputeValue(e){if(e.value===Xn)throw new Error("");let n=e.value;e.value=Xn;let t=Zt(e),r,o=!1;try{r=e.computation(),M(null),o=n!==Kn&&n!==At&&r!==At&&e.equal(n,r)}catch(i){r=At,e.error=i}finally{Dn(e,t)}if(o){e.value=n;return}e.value=r,e.version++}});function Uw(){throw new Error}var Tm=Uw;function xm(e){Tm(e)}function tu(e){Tm=e}var $w=null;function nu(e,n){let t=Object.create(Ko);t.value=e,n!==void 0&&(t.equal=n);let r=()=>Am(t);return r[ie]=t,qo(t),[r,s=>wn(t,s),s=>Ys(t,s)]}function Am(e){return Yt(e),e.value}function wn(e,n){Jl()||xm(e),e.equal(e.value,n)||(e.value=n,zw(e))}function Ys(e,n){Jl()||xm(e),wn(e,n(e.value))}var Ko=V(w({},_n),{equal:Yo,value:void 0,kind:"signal"});function zw(e){e.version++,Cm(),Ql(e),$w?.(e)}var ru=V(w({},_n),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function ou(e){if(e.dirty=!1,e.version>0&&!$r(e))return;e.version++;let n=Zt(e);try{e.cleanup(),e.fn()}finally{Dn(e,n)}}var iu;function Zs(){return iu}function Nt(e){let n=iu;return iu=e,n}var Nm=Symbol("NotFound");function Gr(e){return e===Nm||e?.name==="\u0275NotFound"}function su(e,n,t){let r=Object.create(Gw);r.source=e,r.computation=n,t!=null&&(r.equal=t);let i=()=>{if(Qn(r),Yt(r),r.value===At)throw r.error;return r.value};return i[ie]=r,qo(r),i}function Rm(e,n){Qn(e),wn(e,n),Ur(e)}function Om(e,n){if(Qn(e),e.value===At)throw e.error;Ys(e,n),Ur(e)}var Gw=V(w({},_n),{value:Kn,dirty:!0,error:null,equal:Yo,kind:"linkedSignal",producerMustRecompute(e){return e.value===Kn||e.value===Xn},producerRecomputeValue(e){if(e.value===Xn)throw new Error("");let n=e.value;e.value=Xn;let t=Zt(e),r,o=!1;try{let i=e.source(),s=n!==Kn&&n!==At,a=s?{source:e.sourceValue,value:n}:void 0;r=e.computation(i,a),e.sourceValue=i,M(null),o=s&&r!==At&&e.equal(n,r)}catch(i){r=At,e.error=i}finally{Dn(e,t)}if(o){e.value=n;return}e.value=r,e.version++}});function km(e){let n=M(null);try{return e()}finally{M(n)}}var na="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",v=class extends Error{code;constructor(n,t){super(Ot(n,t)),this.code=n}};function Ww(e){return`NG0${Math.abs(e)}`}function Ot(e,n){return`${Ww(e)}${n?": "+n:""}`}var ue=globalThis;function Y(e){for(let n in e)if(e[n]===Y)return n;throw Error("")}function jm(e,n){for(let t in n)n.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=n[t])}function ri(e){if(typeof e=="string")return e;if(Array.isArray(e))return`[${e.map(ri).join(", ")}]`;if(e==null)return""+e;let n=e.overriddenName||e.name;if(n)return`${n}`;let t=e.toString();if(t==null)return""+t;let r=t.indexOf(` -`);return r>=0?t.slice(0,r):t}function ra(e,n){return e?n?`${e} ${n}`:e:n||""}var qw=Y({__forward_ref__:Y});function de(e){return e.__forward_ref__=de,e}function ye(e){return bu(e)?e():e}function bu(e){return typeof e=="function"&&e.hasOwnProperty(qw)&&e.__forward_ref__===de}function g(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function W(e){return{providers:e.providers||[],imports:e.imports||[]}}function oi(e){return Zw(e,oa)}function Yw(e){return oi(e)!==null}function Zw(e,n){return e.hasOwnProperty(n)&&e[n]||null}function Kw(e){let n=e?.[oa]??null;return n||null}function cu(e){return e&&e.hasOwnProperty(Xs)?e[Xs]:null}var oa=Y({\u0275prov:Y}),Xs=Y({\u0275inj:Y}),y=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(n,t){this._desc=n,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=g({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function _u(e){return e&&!!e.\u0275providers}var Du=Y({\u0275cmp:Y}),Eu=Y({\u0275dir:Y}),wu=Y({\u0275pipe:Y}),Cu=Y({\u0275mod:Y}),Qo=Y({\u0275fac:Y}),rr=Y({__NG_ELEMENT_ID__:Y}),Fm=Y({__NG_ENV_ID__:Y});function Iu(e){return sa(e,"@NgModule"),e[Cu]||null}function kt(e){return sa(e,"@Component"),e[Du]||null}function ia(e){return sa(e,"@Directive"),e[Eu]||null}function Bm(e){return sa(e,"@Pipe"),e[wu]||null}function sa(e,n){if(e==null)throw new v(-919,!1)}function Ft(e){return typeof e=="string"?e:e==null?"":String(e)}var Hm=Y({ngErrorCode:Y}),Xw=Y({ngErrorMessage:Y}),Qw=Y({ngTokenPath:Y});function Mu(e,n){return Um("",-200,n)}function aa(e,n){throw new v(-201,!1)}function Um(e,n,t){let r=new v(n,e);return r[Hm]=n,r[Xw]=e,t&&(r[Qw]=t),r}function Jw(e){return e[Hm]}var lu;function $m(){return lu}function Oe(e){let n=lu;return lu=e,n}function Su(e,n,t){let r=oi(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(t&8)return null;if(n!==void 0)return n;aa(e,"")}var eC={},Jn=eC,tC="__NG_DI_FLAG__",uu=class{injector;constructor(n){this.injector=n}retrieve(n,t){let r=er(t)||0;try{return this.injector.get(n,r&8?null:Jn,r)}catch(o){if(Gr(o))return o;throw o}}};function nC(e,n=0){let t=Zs();if(t===void 0)throw new v(-203,!1);if(t===null)return Su(e,void 0,n);{let r=rC(n),o=t.retrieve(e,r);if(Gr(o)){if(r.optional)return null;throw o}return o}}function I(e,n=0){return($m()||nC)(ye(e),n)}function f(e,n){return I(e,er(n))}function er(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function rC(e){return{optional:!!(e&8),host:!!(e&1),self:!!(e&2),skipSelf:!!(e&4)}}function du(e){let n=[];for(let t=0;tArray.isArray(t)?ca(t,n):n(t))}function Tu(e,n,t){n>=e.length?e.push(t):e.splice(n,0,t)}function ii(e,n){return n>=e.length-1?e.pop():e.splice(n,1)[0]}function Wm(e,n){let t=[];for(let r=0;rn;){let i=o-2;e[o]=e[i],o--}e[n]=t,e[n+1]=r}}function la(e,n,t){let r=qr(e,n);return r>=0?e[r|1]=t:(r=~r,qm(e,r,n,t)),r}function ua(e,n){let t=qr(e,n);if(t>=0)return e[t|1]}function qr(e,n){return iC(e,n,1)}function iC(e,n,t){let r=0,o=e.length>>t;for(;o!==r;){let i=r+(o-r>>1),s=e[i<n?o=i:r=i+1}return~(o<{t.push(s)};return ca(n,s=>{let a=s;Qs(a,i,[],r)&&(o||=[],o.push(a))}),o!==void 0&&Zm(o,i),t}function Zm(e,n){for(let t=0;t{n(i,r)})}}function Qs(e,n,t,r){if(e=ye(e),!e)return!1;let o=null,i=cu(e),s=!i&&kt(e);if(!i&&!s){let c=e.ngModule;if(i=cu(c),i)o=c;else return!1}else{if(s&&!s.standalone)return!1;o=e}let a=r.has(o);if(s){if(a)return!1;if(r.add(o),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)Qs(l,n,t,r)}}else if(i){if(i.imports!=null&&!a){r.add(o);let l;ca(i.imports,u=>{Qs(u,n,t,r)&&(l||=[],l.push(u))}),l!==void 0&&Zm(l,n)}if(!a){let l=Cn(o)||(()=>new o);n({provide:o,useFactory:l,deps:Se},o),n({provide:Au,useValue:o,multi:!0},o),n({provide:Yr,useValue:()=>I(o),multi:!0},o)}let c=i.providers;if(c!=null&&!a){let l=e;Ru(c,u=>{n(u,l)})}}else return!1;return o!==e&&e.providers!==void 0}function Ru(e,n){for(let t of e)_u(t)&&(t=t.\u0275providers),Array.isArray(t)?Ru(t,n):n(t)}var sC=Y({provide:String,useValue:Y});function Km(e){return e!==null&&typeof e=="object"&&sC in e}function aC(e){return!!(e&&e.useExisting)}function cC(e){return!!(e&&e.useFactory)}function tr(e){return typeof e=="function"}function Xm(e){return!!e.useClass}var si=new y(""),Ks={},Pm={},au;function Zr(){return au===void 0&&(au=new Jo),au}var le=class{},nr=class extends le{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(n,t,r,o){super(),this.parent=t,this.source=r,this.scopes=o,hu(n,s=>this.processProvider(s)),this.records.set(xu,Wr(void 0,this)),o.has("environment")&&this.records.set(le,Wr(void 0,this));let i=this.records.get(si);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Au,Se,{self:!0}))}retrieve(n,t){let r=er(t)||0;try{return this.get(n,Jn,r)}catch(o){if(Gr(o))return o;throw o}}destroy(){Xo(this),this._destroyed=!0;let n=M(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of t)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),M(n)}}onDestroy(n){return Xo(this),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){Xo(this);let t=Nt(this),r=Oe(void 0),o;try{return n()}finally{Nt(t),Oe(r)}}get(n,t=Jn,r){if(Xo(this),n.hasOwnProperty(Fm))return n[Fm](this);let o=er(r),i,s=Nt(this),a=Oe(void 0);try{if(!(o&4)){let l=this.records.get(n);if(l===void 0){let u=hC(n)&&oi(n);u&&this.injectableDefInScope(u)?l=Wr(fu(n),Ks):l=null,this.records.set(n,l)}if(l!=null)return this.hydrate(n,l,o)}let c=o&2?Zr():this.parent;return t=o&8&&t===Jn?null:t,c.get(n,t)}catch(c){let l=Jw(c);throw l===-200||l===-201?new v(l,null):c}finally{Oe(a),Nt(s)}}resolveInjectorInitializers(){let n=M(null),t=Nt(this),r=Oe(void 0),o;try{let i=this.get(Yr,Se,{self:!0});for(let s of i)s()}finally{Nt(t),Oe(r),M(n)}}toString(){return"R3Injector[...]"}processProvider(n){n=ye(n);let t=tr(n)?n:ye(n&&n.provide),r=uC(n);if(!tr(n)&&n.multi===!0){let o=this.records.get(t);o||(o=Wr(void 0,Ks,!0),o.factory=()=>du(o.multi),this.records.set(t,o)),t=n,o.multi.push(n)}this.records.set(t,r)}hydrate(n,t,r){let o=M(null);try{if(t.value===Pm)throw Mu("");return t.value===Ks&&(t.value=Pm,t.value=t.factory(void 0,r)),typeof t.value=="object"&&t.value&&fC(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{M(o)}}injectableDefInScope(n){if(!n.providedIn)return!1;let t=ye(n.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(n){let t=this._onDestroyHooks.indexOf(n);t!==-1&&this._onDestroyHooks.splice(t,1)}};function fu(e){let n=oi(e),t=n!==null?n.factory:Cn(e);if(t!==null)return t;if(e instanceof y)throw new v(-204,!1);if(e instanceof Function)return lC(e);throw new v(-204,!1)}function lC(e){if(e.length>0)throw new v(-204,!1);let t=Kw(e);return t!==null?()=>t.factory(e):()=>new e}function uC(e){if(Km(e))return Wr(void 0,e.useValue);{let n=Ou(e);return Wr(n,Ks)}}function Ou(e,n,t){let r;if(tr(e)){let o=ye(e);return Cn(o)||fu(o)}else if(Km(e))r=()=>ye(e.useValue);else if(cC(e))r=()=>e.useFactory(...du(e.deps||[]));else if(aC(e))r=(o,i)=>I(ye(e.useExisting),i!==void 0&&i&8?8:void 0);else{let o=ye(e&&(e.useClass||e.provide));if(dC(e))r=()=>new o(...du(e.deps));else return Cn(o)||fu(o)}return r}function Xo(e){if(e.destroyed)throw new v(-205,!1)}function Wr(e,n,t=!1){return{factory:e,value:n,multi:t?[]:void 0}}function dC(e){return!!e.deps}function fC(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function hC(e){return typeof e=="function"||typeof e=="object"&&e.ngMetadataName==="InjectionToken"}function hu(e,n){for(let t of e)Array.isArray(t)?hu(t,n):t&&_u(t)?hu(t.\u0275providers,n):n(t)}function Kr(e,n){let t;e instanceof nr?(Xo(e),t=e):t=new uu(e);let r,o=Nt(t),i=Oe(void 0);try{return n()}finally{Nt(o),Oe(i)}}function ku(){return $m()!==void 0||Zs()!=null}var gt=0,S=1,O=2,ve=3,rt=4,ke=5,ir=6,Xr=7,se=8,Xt=9,yt=10,X=11,Qr=12,Fu=13,sr=14,Te=15,Sn=16,ar=17,Pt=18,Qt=19,Pu=20,Kt=21,da=22,In=23,Ze=24,cr=25,Tn=26,ee=27,Qm=1,Lu=6,xn=7,ai=8,lr=9,ae=10;function Jt(e){return Array.isArray(e)&&typeof e[Qm]=="object"}function vt(e){return Array.isArray(e)&&e[Qm]===!0}function Vu(e){return(e.flags&4)!==0}function Lt(e){return e.componentOffset>-1}function Jr(e){return(e.flags&1)===1}function bt(e){return!!e.template}function eo(e){return(e[O]&512)!==0}function ur(e){return(e[O]&256)===256}var ju="svg",Jm="math";function ot(e){for(;Array.isArray(e);)e=e[gt];return e}function Bu(e,n){return ot(n[e])}function it(e,n){return ot(n[e.index])}function fa(e,n){return e.data[n]}function ci(e,n){return e[n]}function Hu(e,n,t,r){t>=e.data.length&&(e.data[t]=null,e.blueprint[t]=null),n[t]=r}function st(e,n){let t=n[e];return Jt(t)?t:t[gt]}function eg(e){return(e[O]&4)===4}function ha(e){return(e[O]&128)===128}function tg(e){return vt(e[ve])}function Ke(e,n){return n==null?null:e[n]}function Uu(e){e[ar]=0}function $u(e){e[O]&1024||(e[O]|=1024,ha(e)&&dr(e))}function ng(e,n){for(;e>0;)n=n[sr],e--;return n}function li(e){return!!(e[O]&9216||e[Ze]?.dirty)}function pa(e){e[yt].changeDetectionScheduler?.notify(8),e[O]&64&&(e[O]|=1024),li(e)&&dr(e)}function dr(e){e[yt].changeDetectionScheduler?.notify(0);let n=Mn(e);for(;n!==null&&!(n[O]&8192||(n[O]|=8192,!ha(n)));)n=Mn(n)}function zu(e,n){if(ur(e))throw new v(911,!1);e[Kt]===null&&(e[Kt]=[]),e[Kt].push(n)}function rg(e,n){if(e[Kt]===null)return;let t=e[Kt].indexOf(n);t!==-1&&e[Kt].splice(t,1)}function Mn(e){let n=e[ve];return vt(n)?n[ve]:n}function Gu(e){return e[Xr]??=[]}function Wu(e){return e.cleanup??=[]}function og(e,n,t,r){let o=Gu(n);o.push(t),e.firstCreatePass&&Wu(e).push(r,o.length-1)}var L={lFrame:yg(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var pu=!1;function ig(){return L.lFrame.elementDepthCount}function sg(){L.lFrame.elementDepthCount++}function qu(){L.lFrame.elementDepthCount--}function ma(){return L.bindingsEnabled}function Yu(){return L.skipHydrationRootTNode!==null}function Zu(e){return L.skipHydrationRootTNode===e}function Ku(){L.skipHydrationRootTNode=null}function E(){return L.lFrame.lView}function J(){return L.lFrame.tView}function ag(e){return L.lFrame.contextLView=e,e[se]}function cg(e){return L.lFrame.contextLView=null,e}function pe(){let e=Xu();for(;e!==null&&e.type===64;)e=e.parent;return e}function Xu(){return L.lFrame.currentTNode}function lg(){let e=L.lFrame,n=e.currentTNode;return e.isParent?n:n.parent}function to(e,n){let t=L.lFrame;t.currentTNode=e,t.isParent=n}function Qu(){return L.lFrame.isParent}function Ju(){L.lFrame.isParent=!1}function ug(){return L.lFrame.contextLView}function ed(){return pu}function ei(e){let n=pu;return pu=e,n}function Vt(){let e=L.lFrame,n=e.bindingRootIndex;return n===-1&&(n=e.bindingRootIndex=e.tView.bindingStartIndex),n}function td(){return L.lFrame.bindingIndex}function dg(e){return L.lFrame.bindingIndex=e}function en(){return L.lFrame.bindingIndex++}function ui(e){let n=L.lFrame,t=n.bindingIndex;return n.bindingIndex=n.bindingIndex+e,t}function fg(){return L.lFrame.inI18n}function hg(e,n){let t=L.lFrame;t.bindingIndex=t.bindingRootIndex=e,ga(n)}function pg(){return L.lFrame.currentDirectiveIndex}function ga(e){L.lFrame.currentDirectiveIndex=e}function mg(e){let n=L.lFrame.currentDirectiveIndex;return n===-1?null:e[n]}function ya(){return L.lFrame.currentQueryIndex}function di(e){L.lFrame.currentQueryIndex=e}function pC(e){let n=e[S];return n.type===2?n.declTNode:n.type===1?e[ke]:null}function nd(e,n,t){if(t&4){let o=n,i=e;for(;o=o.parent,o===null&&!(t&1);)if(o=pC(i),o===null||(i=i[sr],o.type&10))break;if(o===null)return!1;n=o,e=i}let r=L.lFrame=gg();return r.currentTNode=n,r.lView=e,!0}function va(e){let n=gg(),t=e[S];L.lFrame=n,n.currentTNode=t.firstChild,n.lView=e,n.tView=t,n.contextLView=e,n.bindingIndex=t.bindingStartIndex,n.inI18n=!1}function gg(){let e=L.lFrame,n=e===null?null:e.child;return n===null?yg(e):n}function yg(e){let n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=n),n}function vg(){let e=L.lFrame;return L.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var rd=vg;function ba(){let e=vg();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function bg(e){return(L.lFrame.contextLView=ng(e,L.lFrame.contextLView))[se]}function _t(){return L.lFrame.selectedIndex}function An(e){L.lFrame.selectedIndex=e}function no(){let e=L.lFrame;return fa(e.tView,e.selectedIndex)}function _g(){L.lFrame.currentNamespace=ju}function Dg(){mC()}function mC(){L.lFrame.currentNamespace=null}function Eg(){return L.lFrame.currentNamespace}var wg=!0;function _a(){return wg}function fi(e){wg=e}function mu(e,n=null,t=null,r){let o=od(e,n,t,r);return o.resolveInjectorInitializers(),o}function od(e,n=null,t=null,r,o=new Set){let i=[t||Se,Ym(e)],s;return new nr(i,n||Zr(),s||null,o)}var j=class e{static THROW_IF_NOT_FOUND=Jn;static NULL=new Jo;static create(n,t){if(Array.isArray(n))return mu({name:""},t,n,"");{let r=n.name??"";return mu({name:r},n.parent,n.providers,r)}}static \u0275prov=g({token:e,providedIn:"any",factory:()=>I(xu)});static __NG_ELEMENT_ID__=-1},F=new y(""),xe=(()=>{class e{static __NG_ELEMENT_ID__=gC;static __NG_ENV_ID__=t=>t}return e})(),Js=class extends xe{_lView;constructor(n){super(),this._lView=n}get destroyed(){return ur(this._lView)}onDestroy(n){let t=this._lView;return zu(t,n),()=>rg(t,n)}};function gC(){return new Js(E())}var Cg=!1,Ig=new y(""),fr=(()=>{class e{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Wn(!1);debugTaskTracker=f(Ig,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new k(t=>{t.next(!1),t.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let t=this.taskId++;return this.pendingTasks.add(t),this.debugTaskTracker?.add(t),t}has(t){return this.pendingTasks.has(t)}remove(t){this.pendingTasks.delete(t),this.debugTaskTracker?.remove(t),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=g({token:e,providedIn:"root",factory:()=>new e})}return e})(),gu=class extends N{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(n=!1){super(),this.__isAsync=n,ku()&&(this.destroyRef=f(xe,{optional:!0})??void 0,this.pendingTasks=f(fr,{optional:!0})??void 0)}emit(n){let t=M(null);try{super.next(n)}finally{M(t)}}subscribe(n,t,r){let o=n,i=t||(()=>null),s=r;if(n&&typeof n=="object"){let c=n;o=c.next?.bind(c),i=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(i=this.wrapInTimeout(i),o&&(o=this.wrapInTimeout(o)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:o,error:i,complete:s});return n instanceof B&&n.add(a),a}wrapInTimeout(n){return t=>{let r=this.pendingTasks?.add();setTimeout(()=>{try{n(t)}finally{r!==void 0&&this.pendingTasks?.remove(r)}})}}},U=gu;function ea(...e){}function id(e){let n,t;function r(){e=ea;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),n!==void 0&&clearTimeout(n)}catch{}}return n=setTimeout(()=>{e(),r()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Mg(e){return queueMicrotask(()=>e()),()=>{e=ea}}var sd="isAngularZone",ti=sd+"_ID",yC=0,P=class e{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new U(!1);onMicrotaskEmpty=new U(!1);onStable=new U(!1);onError=new U(!1);constructor(n){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:i=Cg}=n;if(typeof Zone>"u")throw new v(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!o&&r,s.shouldCoalesceRunChangeDetection=o,s.callbackScheduled=!1,s.scheduleInRootZone=i,_C(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(sd)===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new v(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new v(909,!1)}run(n,t,r){return this._inner.run(n,t,r)}runTask(n,t,r,o){let i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+o,n,vC,ea,ea);try{return i.runTask(s,t,r)}finally{i.cancelTask(s)}}runGuarded(n,t,r){return this._inner.runGuarded(n,t,r)}runOutsideAngular(n){return this._outer.run(n)}},vC={};function ad(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function bC(e){if(e.isCheckStableRunning||e.callbackScheduled)return;e.callbackScheduled=!0;function n(){id(()=>{e.callbackScheduled=!1,yu(e),e.isCheckStableRunning=!0,ad(e),e.isCheckStableRunning=!1})}e.scheduleInRootZone?Zone.root.run(()=>{n()}):e._outer.run(()=>{n()}),yu(e)}function _C(e){let n=()=>{bC(e)},t=yC++;e._inner=e._inner.fork({name:"angular",properties:{[sd]:!0,[ti]:t,[ti+t]:!0},onInvokeTask:(r,o,i,s,a,c)=>{if(DC(c))return r.invokeTask(i,s,a,c);try{return Lm(e),r.invokeTask(i,s,a,c)}finally{(e.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&n(),Vm(e)}},onInvoke:(r,o,i,s,a,c,l)=>{try{return Lm(e),r.invoke(i,s,a,c,l)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!EC(c)&&n(),Vm(e)}},onHasTask:(r,o,i,s)=>{r.hasTask(i,s),o===i&&(s.change=="microTask"?(e._hasPendingMicrotasks=s.microTask,yu(e),ad(e)):s.change=="macroTask"&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,o,i,s)=>(r.handleError(i,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}function yu(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.callbackScheduled===!0?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function Lm(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Vm(e){e._nesting--,ad(e)}var ni=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new U;onMicrotaskEmpty=new U;onStable=new U;onError=new U;run(n,t,r){return n.apply(t,r)}runGuarded(n,t,r){return n.apply(t,r)}runOutsideAngular(n){return n()}runTask(n,t,r,o){return n.apply(t,r)}};function DC(e){return Sg(e,"__ignore_ng_zone__")}function EC(e){return Sg(e,"__scheduler_tick__")}function Sg(e,n){return!Array.isArray(e)||e.length!==1?!1:e[0]?.data?.[n]===!0}var nt=class{_console=console;handleError(n){this._console.error("ERROR",n)}},tn=new y("",{factory:()=>{let e=f(P),n=f(le),t;return r=>{e.runOutsideAngular(()=>{n.destroyed&&!t?setTimeout(()=>{throw r}):(t??=n.get(nt),t.handleError(r))})}}}),Tg={provide:Yr,useValue:()=>{let e=f(nt,{optional:!0})},multi:!0};function be(e,n){let[t,r,o]=nu(e,n?.equal),i=t,s=i[ie];return i.set=r,i.update=o,i.asReadonly=hi.bind(i),i}function hi(){let e=this[ie];if(e.readonlyFn===void 0){let n=()=>this();n[ie]=e,e.readonlyFn=n}return e.readonlyFn}var ro=(()=>{class e{view;node;constructor(t,r){this.view=t,this.node=r}static __NG_ELEMENT_ID__=wC}return e})();function wC(){return new ro(E(),pe())}var Rt=class{},pi=new y("",{factory:()=>!0});var cd=new y(""),oo=(()=>{class e{internalPendingTasks=f(fr);scheduler=f(Rt);errorHandler=f(tn);add(){let t=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(t)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(t))}}run(t){let r=this.add();t().catch(this.errorHandler).finally(r)}static \u0275prov=g({token:e,providedIn:"root",factory:()=>new e})}return e})(),Da=(()=>{class e{static \u0275prov=g({token:e,providedIn:"root",factory:()=>new vu})}return e})(),vu=class{dirtyEffectCount=0;queues=new Map;add(n){this.enqueue(n),this.schedule(n)}schedule(n){n.dirty&&this.dirtyEffectCount++}remove(n){let t=n.zone,r=this.queues.get(t);r.has(n)&&(r.delete(n),n.dirty&&this.dirtyEffectCount--)}enqueue(n){let t=n.zone;this.queues.has(t)||this.queues.set(t,new Set);let r=this.queues.get(t);r.has(n)||r.add(n)}flush(){for(;this.dirtyEffectCount>0;){let n=!1;for(let[t,r]of this.queues)t===null?n||=this.flushQueue(r):n||=t.run(()=>this.flushQueue(r));n||(this.dirtyEffectCount=0)}}flushQueue(n){let t=!1;for(let r of n)r.dirty&&(this.dirtyEffectCount--,t=!0,r.run());return t}},ta=class{[ie];constructor(n){this[ie]=n}destroy(){this[ie].destroy()}};function io(e,n){let t=n?.injector??f(j),r=n?.manualCleanup!==!0?t.get(xe):null,o,i=t.get(ro,null,{optional:!0}),s=t.get(Rt);return i!==null?(o=MC(i.view,s,e),r instanceof Js&&r._lView===i.view&&(r=null)):o=SC(e,t.get(Da),s),o.injector=t,r!==null&&(o.onDestroyFns=[r.onDestroy(()=>o.destroy())]),new ta(o)}var xg=V(w({},ru),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let e=ei(!1);try{ou(this)}finally{ei(e)}},cleanup(){if(!this.cleanupFns?.length)return;let e=M(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],M(e)}}}),CC=V(w({},xg),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(En(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.scheduler.remove(this)}}),IC=V(w({},xg),{consumerMarkedDirty(){this.view[O]|=8192,dr(this.view),this.notifier.notify(13)},destroy(){if(En(this),this.onDestroyFns!==null)for(let e of this.onDestroyFns)e();this.cleanup(),this.view[In]?.delete(this)}});function MC(e,n,t){let r=Object.create(IC);return r.view=e,r.zone=typeof Zone<"u"?Zone.current:null,r.notifier=n,r.fn=Ag(r,t),e[In]??=new Set,e[In].add(r),r.consumerMarkedDirty(r),r}function SC(e,n,t){let r=Object.create(CC);return r.fn=Ag(r,e),r.scheduler=n,r.notifier=t,r.zone=typeof Zone<"u"?Zone.current:null,r.scheduler.add(r),r.notifier.notify(12),r}function Ag(e,n){return()=>{n(t=>(e.cleanupFns??=[]).push(t))}}function Mi(e){return{toString:e}.toString()}function kC(e){return typeof e=="function"}function fy(e,n,t,r){n!==null?n.applyValueToInputSignal(n,r):e[t]=r}var Na=class{previousValue;currentValue;firstChange;constructor(n,t,r){this.previousValue=n,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}},$e=(()=>{let e=()=>hy;return e.ngInherit=!0,e})();function hy(e){return e.type.prototype.ngOnChanges&&(e.setInput=PC),FC}function FC(){let e=my(this),n=e?.current;if(n){let t=e.previous;if(t===mt)e.previous=n;else for(let r in n)t[r]=n[r];e.current=null,this.ngOnChanges(n)}}function PC(e,n,t,r,o){let i=this.declaredInputs[r],s=my(e)||LC(e,{previous:mt,current:null}),a=s.current||(s.current={}),c=s.previous,l=c[i];a[i]=new Na(l&&l.currentValue,t,c===mt),fy(e,n,o,t)}var py="__ngSimpleChanges__";function my(e){return e[py]||null}function LC(e,n){return e[py]=n}var Ng=[];var Z=function(e,n=null,t){for(let r=0;r=r)break}else n[c]<0&&(e[ar]+=65536),(a>14>16&&(e[O]&3)===n&&(e[O]+=16384,Rg(a,i)):Rg(a,i)}var ao=-1,pr=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(n,t,r,o){this.factory=n,this.name=o,this.canSeeViewProviders=t,this.injectImpl=r}};function BC(e){return(e.flags&8)!==0}function HC(e){return(e.flags&16)!==0}function UC(e,n,t){let r=0;for(;rn){s=i-1;break}}}for(;i>16}function Oa(e,n){let t=zC(e),r=n;for(;t>0;)r=r[sr],t--;return r}var _d=!0;function ka(e){let n=_d;return _d=e,n}var GC=256,_y=GC-1,Dy=5,WC=0,jt={};function qC(e,n,t){let r;typeof t=="string"?r=t.charCodeAt(0)||0:t.hasOwnProperty(rr)&&(r=t[rr]),r==null&&(r=t[rr]=WC++);let o=r&_y,i=1<>Dy)]|=i}function Fa(e,n){let t=Ey(e,n);if(t!==-1)return t;let r=n[S];r.firstCreatePass&&(e.injectorIndex=n.length,ud(r.data,e),ud(n,null),ud(r.blueprint,null));let o=of(e,n),i=e.injectorIndex;if(by(o)){let s=Ra(o),a=Oa(o,n),c=a[S].data;for(let l=0;l<8;l++)n[i+l]=a[s+l]|c[s+l]}return n[i+8]=o,i}function ud(e,n){e.push(0,0,0,0,0,0,0,0,n)}function Ey(e,n){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||n[e.injectorIndex+8]===null?-1:e.injectorIndex}function of(e,n){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let t=0,r=null,o=n;for(;o!==null;){if(r=Sy(o),r===null)return ao;if(t++,o=o[sr],r.injectorIndex!==-1)return r.injectorIndex|t<<16}return ao}function Dd(e,n,t){qC(e,n,t)}function YC(e,n){if(n==="class")return e.classes;if(n==="style")return e.styles;let t=e.attrs;if(t){let r=t.length,o=0;for(;o>20,d=r?a:a+u,p=o?a+u:l;for(let h=d;h=c&&m.type===t)return h}if(o){let h=s[c];if(h&&bt(h)&&h.type===t)return c}return null}function bi(e,n,t,r,o){let i=e[t],s=n.data;if(i instanceof pr){let a=i;if(a.resolving)throw Mu("");let c=ka(a.canSeeViewProviders);a.resolving=!0;let l=s[t].type||s[t],u,d=a.injectImpl?Oe(a.injectImpl):null,p=nd(e,r,0);try{i=e[t]=a.factory(void 0,o,s,e,r),n.firstCreatePass&&t>=r.directiveStart&&VC(t,s[t],n)}finally{d!==null&&Oe(d),ka(c),a.resolving=!1,rd()}}return i}function KC(e){if(typeof e=="string")return e.charCodeAt(0)||0;let n=e.hasOwnProperty(rr)?e[rr]:void 0;return typeof n=="number"?n>=0?n&_y:XC:n}function kg(e,n,t){let r=1<>Dy)]&r)}function Fg(e,n){return!(e&2)&&!(e&1&&n)}var hr=class{_tNode;_lView;constructor(n,t){this._tNode=n,this._lView=t}get(n,t,r){return Iy(this._tNode,this._lView,n,er(r),t)}};function XC(){return new hr(pe(),E())}function Ae(e){return Mi(()=>{let n=e.prototype.constructor,t=n[Qo]||Ed(n),r=Object.prototype,o=Object.getPrototypeOf(e.prototype).constructor;for(;o&&o!==r;){let i=o[Qo]||Ed(o);if(i&&i!==t)return i;o=Object.getPrototypeOf(o)}return i=>new i})}function Ed(e){return bu(e)?()=>{let n=Ed(ye(e));return n&&n()}:Cn(e)}function QC(e,n,t,r,o){let i=e,s=n;for(;i!==null&&s!==null&&s[O]&2048&&!eo(s);){let a=My(i,s,t,r|2,jt);if(a!==jt)return a;let c=i.parent;if(!c){let l=s[Pu];if(l){let u=l.get(t,jt,r&-5);if(u!==jt)return u}c=Sy(s),s=s[sr]}i=c}return o}function Sy(e){let n=e[S],t=n.type;return t===2?n.declTNode:t===1?e[ke]:null}function sf(e){return YC(pe(),e)}function JC(){return po(pe(),E())}function po(e,n){return new H(it(e,n))}var H=(()=>{class e{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=JC}return e})();function Ty(e){return e instanceof H?e.nativeElement:e}function eI(){return this._results[Symbol.iterator]()}var nn=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new N}constructor(n=!1){this._emitDistinctChangesOnly=n}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,t){return this._results.reduce(n,t)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,t){this.dirty=!1;let r=Gm(n);(this._changesDetected=!zm(this._results,r,t))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(n){this._onDirty=n}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=eI};function xy(e){return(e.flags&128)===128}var af=(function(e){return e[e.OnPush=0]="OnPush",e[e.Eager=1]="Eager",e[e.Default=1]="Default",e})(af||{}),Ay=new Map,tI=0;function nI(){return tI++}function rI(e){Ay.set(e[Qt],e)}function wd(e){Ay.delete(e[Qt])}var Pg="__ngContext__";function lo(e,n){Jt(n)?(e[Pg]=n[Qt],rI(n)):e[Pg]=n}function Ny(e){return Oy(e[Qr])}function Ry(e){return Oy(e[rt])}function Oy(e){for(;e!==null&&!vt(e);)e=e[rt];return e}var Cd;function cf(e){Cd=e}function ky(){if(Cd!==void 0)return Cd;if(typeof document<"u")return document;throw new v(210,!1)}var On=new y("",{factory:()=>oI}),oI="ng";var Za=new y(""),yr=new y("",{providedIn:"platform",factory:()=>"unknown"}),Si=new y(""),mo=new y("",{factory:()=>f(F).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var Fy="r";var Py="di";var Ly=!1,Vy=new y("",{factory:()=>Ly});var jy=new y("");var iI=(e,n,t,r)=>{};function sI(e,n,t,r){iI(e,n,t,r)}function Ka(e){return(e.flags&32)===32}var aI=()=>null;function By(e,n,t=!1){return aI(e,n,t)}function Hy(e,n){let t=e.contentQueries;if(t!==null){let r=M(null);try{for(let o=0;oe,createScript:e=>e,createScriptURL:e=>e})}catch{}return Ea}function Xa(e){return cI()?.createHTML(e)||e}var wa;function Uy(){if(wa===void 0&&(wa=null,ue.trustedTypes))try{wa=ue.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return wa}function Lg(e){return Uy()?.createHTML(e)||e}function Vg(e){return Uy()?.createScriptURL(e)||e}var rn=class{changingThisBreaksApplicationSecurity;constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${na})`}},Md=class extends rn{getTypeName(){return"HTML"}},Sd=class extends rn{getTypeName(){return"Style"}},Td=class extends rn{getTypeName(){return"Script"}},xd=class extends rn{getTypeName(){return"URL"}},Ad=class extends rn{getTypeName(){return"ResourceURL"}};function Qe(e){return e instanceof rn?e.changingThisBreaksApplicationSecurity:e}function Ht(e,n){let t=$y(e);if(t!=null&&t!==n){if(t==="ResourceURL"&&n==="URL")return!0;throw new Error(`Required a safe ${n}, got a ${t} (see ${na})`)}return t===n}function $y(e){return e instanceof rn&&e.getTypeName()||null}function uf(e){return new Md(e)}function df(e){return new Sd(e)}function ff(e){return new Td(e)}function hf(e){return new xd(e)}function pf(e){return new Ad(e)}function lI(e){let n=new Rd(e);return uI()?new Nd(n):n}var Nd=class{inertDocumentHelper;constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{let t=new window.DOMParser().parseFromString(Xa(n),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(n):(t.firstChild?.remove(),t)}catch{return null}}},Rd=class{defaultDoc;inertDocument;constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){let t=this.inertDocument.createElement("template");return t.innerHTML=Xa(n),t}};function uI(){try{return!!new window.DOMParser().parseFromString(Xa(""),"text/html")}catch{return!1}}var dI=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Ti(e){return e=String(e),e.match(dI)?e:"unsafe:"+e}function on(e){let n={};for(let t of e.split(","))n[t]=!0;return n}function xi(...e){let n={};for(let t of e)for(let r in t)t.hasOwnProperty(r)&&(n[r]=!0);return n}var zy=on("area,br,col,hr,img,wbr"),Gy=on("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Wy=on("rp,rt"),fI=xi(Wy,Gy),hI=xi(Gy,on("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),pI=xi(Wy,on("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),jg=xi(zy,hI,pI,fI),qy=on("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),mI=on("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),gI=on("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),yI=xi(qy,mI,gI),vI=on("script,style,template");var Od=class{sanitizedSomething=!1;buf=[];sanitizeChildren(n){let t=n.firstChild,r=!0,o=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild){o.push(t),t=DI(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let i=_I(t);if(i){t=i;break}t=o.pop()}}return this.buf.join("")}startElement(n){let t=Bg(n).toLowerCase();if(!jg.hasOwnProperty(t))return this.sanitizedSomething=!0,!vI.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let r=n.attributes;for(let o=0;o"),!0}endElement(n){let t=Bg(n).toLowerCase();jg.hasOwnProperty(t)&&!zy.hasOwnProperty(t)&&(this.buf.push(""))}chars(n){this.buf.push(Hg(n))}};function bI(e,n){return(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function _I(e){let n=e.nextSibling;if(n&&e!==n.previousSibling)throw Yy(n);return n}function DI(e){let n=e.firstChild;if(n&&bI(e,n))throw Yy(n);return n}function Bg(e){let n=e.nodeName;return typeof n=="string"?n:"FORM"}function Yy(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var EI=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wI=/([^\#-~ |!])/g;function Hg(e){return e.replace(/&/g,"&").replace(EI,function(n){let t=n.charCodeAt(0),r=n.charCodeAt(1);return"&#"+((t-55296)*1024+(r-56320)+65536)+";"}).replace(wI,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}var Ca;function Qa(e,n){let t=null;try{Ca=Ca||lI(e);let r=n?String(n):"";t=Ca.getInertBodyElement(r);let o=5,i=r;do{if(o===0)throw new Error("Failed to sanitize html because the input is unstable");o--,r=i,i=t.innerHTML,t=Ca.getInertBodyElement(r)}while(r!==i);let a=new Od().sanitizeChildren(Ug(t)||t);return Xa(a)}finally{if(t){let r=Ug(t)||t;for(;r.firstChild;)r.firstChild.remove()}}}function Ug(e){return"content"in e&&CI(e)?e.content:null}function CI(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var II=/^>|^->||--!>|)/g,SI="\u200B$1\u200B";function TI(e){return e.replace(II,n=>n.replace(MI,SI))}function xI(e,n){return e.createText(n)}function AI(e,n,t){e.setValue(n,t)}function NI(e,n){return e.createComment(TI(n))}function Zy(e,n,t){return e.createElement(n,t)}function Pa(e,n,t,r,o){e.insertBefore(n,t,r,o)}function Ky(e,n,t){e.appendChild(n,t)}function $g(e,n,t,r,o){r!==null?Pa(e,n,t,r,o):Ky(e,n,t)}function Xy(e,n,t,r){e.removeChild(null,n,t,r)}function RI(e,n,t){e.setAttribute(n,"style",t)}function OI(e,n,t){t===""?e.removeAttribute(n,"class"):e.setAttribute(n,"class",t)}function Qy(e,n,t){let{mergedAttrs:r,classes:o,styles:i}=t;r!==null&&UC(e,n,r),o!==null&&OI(e,n,o),i!==null&&RI(e,n,i)}var ze=(function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e})(ze||{});function kI(e){let n=mf();return n?Lg(n.sanitize(ze.HTML,e)||""):Ht(e,"HTML")?Lg(Qe(e)):Qa(ky(),Ft(e))}function Jy(e){let n=mf();return n?n.sanitize(ze.URL,e)||"":Ht(e,"URL")?Qe(e):Ti(Ft(e))}function ev(e){let n=mf();if(n)return Vg(n.sanitize(ze.RESOURCE_URL,e)||"");if(Ht(e,"ResourceURL"))return Vg(Qe(e));throw new v(904,!1)}var FI=new Set(["embed","frame","iframe","media","script"]),PI=new Set(["base","link","script"]);function LI(e,n){return n==="src"&&FI.has(e)||n==="href"&&PI.has(e)||n==="xlink:href"&&e==="script"?ev:Jy}function VI(e,n,t){return LI(n,t)(e)}function mf(){let e=E();return e&&e[yt].sanitizer}function jI(e){return e.ownerDocument.defaultView}function BI(e){return e.ownerDocument}function tv(e){return e instanceof Function?e():e}function HI(e,n,t){let r=e.length;for(;;){let o=e.indexOf(n,t);if(o===-1)return o;if(o===0||e.charCodeAt(o-1)<=32){let i=n.length;if(o+i===r||e.charCodeAt(o+i)<=32)return o}t=o+1}}var nv="ng-template";function UI(e,n,t,r){let o=0;if(r){for(;o-1){let i;for(;++oi?d="":d=o[u+1].toLowerCase(),r&2&&l!==d){if(Dt(r))return!1;s=!0}}}}return Dt(r)||s}function Dt(e){return(e&1)===0}function GI(e,n,t,r){if(n===null)return-1;let o=0;if(r||!t){let i=!1;for(;o-1)for(t++;t0?'="'+a+'"':"")+"]"}else r&8?o+="."+s:r&4&&(o+=" "+s);else o!==""&&!Dt(s)&&(n+=zg(i,o),o=""),r=s,i=i||!Dt(r);t++}return o!==""&&(n+=zg(i,o)),n}function XI(e){return e.map(KI).join(",")}function QI(e){let n=[],t=[],r=1,o=2;for(;r=0;i--){let s=t[i],a=s.parentNode;s===n?(t.splice(i,1),gi.add(s),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))):(o&&s===o||a&&r&&a!==r)&&(t.splice(i,1),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),s.parentNode?.removeChild(s))}}function oM(e,n){let t=Fd.get(e);t?t.includes(n)||t.push(n):Fd.set(e,[n])}var mr=new Set,ec=(function(e){return e[e.CHANGE_DETECTION=0]="CHANGE_DETECTION",e[e.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",e})(ec||{}),It=new y(""),Gg=new Set;function sn(e){Gg.has(e)||(Gg.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}var tc=(()=>{class e{impl=null;execute(){this.impl?.execute()}static \u0275prov=g({token:e,providedIn:"root",factory:()=>new e})}return e})(),Ef=[0,1,2,3],wf=(()=>{class e{ngZone=f(P);scheduler=f(Rt);errorHandler=f(nt,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){f(It,{optional:!0})}execute(){let t=this.sequences.size>0;t&&Z(z.AfterRenderHooksStart),this.executing=!0;for(let r of Ef)for(let o of this.sequences)if(!(o.erroredOrDestroyed||!o.hooks[r]))try{o.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let i=o.hooks[r];return i(o.pipelinedValue)},o.snapshot))}catch(i){o.erroredOrDestroyed=!0,this.errorHandler?.handleError(i)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),t&&Z(z.AfterRenderHooksEnd)}register(t){let{view:r}=t;r!==void 0?((r[cr]??=[]).push(t),dr(r),r[O]|=8192):this.executing?this.deferredRegistrations.add(t):this.addSequence(t)}addSequence(t){this.sequences.add(t),this.scheduler.notify(7)}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}maybeTrace(t,r){return r?r.run(ec.AFTER_NEXT_RENDER,t):t()}static \u0275prov=g({token:e,providedIn:"root",factory:()=>new e})}return e})(),_i=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(n,t,r,o,i,s=null){this.impl=n,this.hooks=t,this.view=r,this.once=o,this.snapshot=s,this.unregisterOnDestroy=i?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let n=this.view?.[cr];n&&(this.view[cr]=n.filter(t=>t!==this))}};function Ut(e,n){let t=n?.injector??f(j);return sn("NgAfterNextRender"),sM(e,t,n,!0)}function iM(e){return e instanceof Function?[void 0,void 0,e,void 0]:[e.earlyRead,e.write,e.mixedReadWrite,e.read]}function sM(e,n,t,r){let o=n.get(tc);o.impl??=n.get(wf);let i=n.get(It,null,{optional:!0}),s=t?.manualCleanup!==!0?n.get(xe):null,a=n.get(ro,null,{optional:!0}),c=new _i(o.impl,iM(e),a?.view,r,s,i?.snapshot(null));return o.impl.register(c),c}var av=new y("",{factory:()=>({queue:new Set,isScheduled:!1,scheduler:null,injector:f(le)})});function cv(e,n,t){let r=e.get(av);if(Array.isArray(n))for(let o of n)r.queue.add(o),t?.detachedLeaveAnimationFns?.push(o);else r.queue.add(n),t?.detachedLeaveAnimationFns?.push(n);r.scheduler&&r.scheduler(e)}function aM(e,n){let t=e.get(av);if(n.detachedLeaveAnimationFns){for(let r of n.detachedLeaveAnimationFns)t.queue.delete(r);n.detachedLeaveAnimationFns=void 0}}function cM(e,n){for(let[t,r]of n)cv(e,r.animateFns)}function Wg(e,n,t,r){let o=e?.[Tn]?.enter;n!==null&&o&&o.has(t.index)&&cM(r,o)}function so(e,n,t,r,o,i,s,a){if(o!=null){let c,l=!1;vt(o)?c=o:Jt(o)&&(l=!0,o=o[gt]);let u=ot(o);e===0&&r!==null?(Wg(a,r,i,t),s==null?Ky(n,r,u):Pa(n,r,u,s||null,!0)):e===1&&r!==null?(Wg(a,r,i,t),Pa(n,r,u,s||null,!0),rM(i,u)):e===2?(a?.[Tn]?.leave?.has(i.index)&&oM(i,u),gi.delete(u),qg(a,i,t,d=>{if(gi.has(u)){gi.delete(u);return}Xy(n,u,l,d)})):e===3&&(gi.delete(u),qg(a,i,t,()=>{n.destroyNode(u)})),c!=null&&bM(n,e,t,c,i,r,s)}}function lM(e,n){lv(e,n),n[gt]=null,n[ke]=null}function uM(e,n,t,r,o,i){r[gt]=o,r[ke]=n,rc(e,r,t,1,o,i)}function lv(e,n){n[yt].changeDetectionScheduler?.notify(9),rc(e,n,n[X],2,null,null)}function dM(e){let n=e[Qr];if(!n)return dd(e[S],e);for(;n;){let t=null;if(Jt(n))t=n[Qr];else{let r=n[ae];r&&(t=r)}if(!t){for(;n&&!n[rt]&&n!==e;)Jt(n)&&dd(n[S],n),n=n[ve];n===null&&(n=e),Jt(n)&&dd(n[S],n),t=n&&n[rt]}n=t}}function Cf(e,n){let t=e[lr],r=t.indexOf(n);t.splice(r,1)}function nc(e,n){if(ur(n))return;let t=n[X];t.destroyNode&&rc(e,n,t,3,null,null),dM(n)}function dd(e,n){if(ur(n))return;let t=M(null);try{n[O]&=-129,n[O]|=256,n[Ze]&&En(n[Ze]),pM(e,n),hM(e,n),n[S].type===1&&n[X].destroy();let r=n[Sn];if(r!==null&&vt(n[ve])){r!==n[ve]&&Cf(r,n);let o=n[Pt];o!==null&&o.detachView(e)}wd(n)}finally{M(t)}}function qg(e,n,t,r){let o=e?.[Tn];if(o==null||o.leave==null||!o.leave.has(n.index))return r(!1);e&&mr.add(e[Qt]),cv(t,()=>{if(o.leave&&o.leave.has(n.index)){let s=o.leave.get(n.index),a=[];if(s){for(let c=0;c{e[Tn].running=void 0,mr.delete(e[Qt]),n(!0)});return}n(!1)}function hM(e,n){let t=e.cleanup,r=n[Xr];if(t!==null)for(let s=0;s=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[t[s+1]];t[s].call(a)}r!==null&&(n[Xr]=null);let o=n[Kt];if(o!==null){n[Kt]=null;for(let s=0;see&&sv(e,n,ee,!1);let a=s?z.TemplateUpdateStart:z.TemplateCreateStart;Z(a,o,t),t(r,o)}finally{An(i);let a=s?z.TemplateUpdateEnd:z.TemplateCreateEnd;Z(a,o,t)}}function oc(e,n,t){IM(e,n,t),(t.flags&64)===64&&MM(e,n,t)}function Ai(e,n,t=it){let r=n.localNames;if(r!==null){let o=n.index+1;for(let i=0;inull;function CM(e){return e==="class"?"className":e==="for"?"htmlFor":e==="formaction"?"formAction":e==="innerHtml"?"innerHTML":e==="readonly"?"readOnly":e==="tabindex"?"tabIndex":e}function mv(e,n,t,r,o,i){let s=n[S];if(ic(e,s,n,t,r)){Lt(e)&&yv(n,e.index);return}e.type&3&&(t=CM(t)),gv(e,n,t,r,o,i)}function gv(e,n,t,r,o,i){if(e.type&3){let s=it(e,n);r=i!=null?i(r,e.value||"",t):r,o.setProperty(s,t,r)}else e.type&12}function yv(e,n){let t=st(n,e);t[O]&16||(t[O]|=64)}function IM(e,n,t){let r=t.directiveStart,o=t.directiveEnd;Lt(t)&&tM(n,t,e.data[r+t.componentOffset]),e.firstCreatePass||Fa(t,n);let i=t.initialInputs;for(let s=r;s{dr(e.lView)},consumerOnSignalRead(){this.lView[Ze]=this}});function VM(e){let n=e[Ze]??Object.create(jM);return n.lView=e,n}var jM=V(w({},_n),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:e=>{let n=Mn(e.lView);for(;n&&!Ev(n[S]);)n=Mn(n);n&&$u(n)},consumerOnSignalRead(){this.lView[Ze]=this}});function Ev(e){return e.type!==2}function wv(e){if(e[In]===null)return;let n=!0;for(;n;){let t=!1;for(let r of e[In])r.dirty&&(t=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));n=t&&!!(e[O]&8192)}}var BM=100;function Cv(e,n=0){let r=e[yt].rendererFactory,o=!1;o||r.begin?.();try{HM(e,n)}finally{o||r.end?.()}}function HM(e,n){let t=ed();try{ei(!0),Ld(e,n);let r=0;for(;li(e);){if(r===BM)throw new v(103,!1);r++,Ld(e,1)}}finally{ei(t)}}function UM(e,n,t,r){if(ur(n))return;let o=n[O],i=!1,s=!1;va(n);let a=!0,c=null,l=null;i||(Ev(e)?(l=kM(n),c=Zt(l)):qs()===null?(a=!1,l=VM(n),c=Zt(l)):n[Ze]&&(En(n[Ze]),n[Ze]=null));try{Uu(n),dg(e.bindingStartIndex),t!==null&&pv(e,n,t,2,r);let u=(o&3)===3;if(!i)if(u){let h=e.preOrderCheckHooks;h!==null&&Ma(n,h,null)}else{let h=e.preOrderHooks;h!==null&&Sa(n,h,0,null),ld(n,0)}if(s||$M(n),wv(n),Iv(n,0),e.contentQueries!==null&&Hy(e,n),!i)if(u){let h=e.contentCheckHooks;h!==null&&Ma(n,h)}else{let h=e.contentHooks;h!==null&&Sa(n,h,1),ld(n,1)}GM(e,n);let d=e.components;d!==null&&Sv(n,d,0);let p=e.viewQuery;if(p!==null&&Id(2,p,r),!i)if(u){let h=e.viewCheckHooks;h!==null&&Ma(n,h)}else{let h=e.viewHooks;h!==null&&Sa(n,h,2),ld(n,2)}if(e.firstUpdatePass===!0&&(e.firstUpdatePass=!1),n[da]){for(let h of n[da])h();n[da]=null}i||(_v(n),n[O]&=-73)}catch(u){throw i||dr(n),u}finally{l!==null&&(Dn(l,c),a&&PM(l)),ba()}}function Iv(e,n){for(let t=Ny(e);t!==null;t=Ry(t))for(let r=ae;r0&&(e[t-1][rt]=r[rt]);let i=ii(e,ae+n);lM(r[S],r);let s=i[Pt];s!==null&&s.detachView(i[S]),r[ve]=null,r[rt]=null,r[O]&=-129}return r}function WM(e,n,t,r){let o=ae+r,i=t.length;r>0&&(t[o-1][rt]=n),r-1&&(Ei(n,r),ii(t,r))}this._attachedToViewContainer=!1}nc(this._lView[S],this._lView)}onDestroy(n){zu(this._lView,n)}markForCheck(){Nf(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[O]&=-129}reattach(){pa(this._lView),this._lView[O]|=128}detectChanges(){this._lView[O]|=1024,Cv(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new v(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let n=eo(this._lView),t=this._lView[Sn];t!==null&&!n&&Cf(t,this._lView),lv(this._lView[S],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new v(902,!1);this._appRef=n;let t=eo(this._lView),r=this._lView[Sn];r!==null&&!t&&Nv(r,this._lView),pa(this._lView)}};var Xe=(()=>{class e{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=qM;constructor(t,r,o){this._declarationLView=t,this._declarationTContainer=r,this.elementRef=o}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,r){return this.createEmbeddedViewImpl(t,r)}createEmbeddedViewImpl(t,r,o){let i=Ni(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:r,dehydratedView:o});return new Nn(i)}}return e})();function qM(){return sc(pe(),E())}function sc(e,n){return e.type&4?new Xe(n,e,po(e,n)):null}function go(e,n,t,r,o){let i=e.data[n];if(i===null)i=YM(e,n,t,r,o),fg()&&(i.flags|=32);else if(i.type&64){i.type=t,i.value=r,i.attrs=o;let s=lg();i.injectorIndex=s===null?-1:s.injectorIndex}return to(i,!0),i}function YM(e,n,t,r,o){let i=Xu(),s=Qu(),a=s?i:i&&i.parent,c=e.data[n]=KM(e,a,t,n,r,o);return ZM(e,c,i,s),c}function ZM(e,n,t,r){e.firstChild===null&&(e.firstChild=n),t!==null&&(r?t.child==null&&n.parent!==null&&(t.child=n):t.next===null&&(t.next=n,n.prev=t))}function KM(e,n,t,r,o,i){let s=n?n.injectorIndex:-1,a=0;return Yu()&&(a|=128),{type:t,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:o,attrs:i,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:n,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function XM(e){let n=e[Lu]??[],r=e[ve][X],o=[];for(let i of n)i.data[Py]!==void 0?o.push(i):QM(i,r);e[Lu]=o}function QM(e,n){let t=0,r=e.firstChild;if(r){let o=e.data[Fy];for(;tnull,eS=()=>null;function La(e,n){return JM(e,n)}function Rv(e,n,t){return eS(e,n,t)}var Ov=class{},ac=class{},Vd=class{resolveComponentFactory(n){throw new v(917,!1)}},Oi=class{static NULL=new Vd},De=class{},Ne=(()=>{class e{destroyNode=null;static __NG_ELEMENT_ID__=()=>tS()}return e})();function tS(){let e=E(),n=pe(),t=st(n.index,e);return(Jt(t)?t:e)[X]}var kv=(()=>{class e{static \u0275prov=g({token:e,providedIn:"root",factory:()=>null})}return e})();var xa={},jd=class{injector;parentInjector;constructor(n,t){this.injector=n,this.parentInjector=t}get(n,t,r){let o=this.injector.get(n,xa,r);return o!==xa||t===xa?o:this.parentInjector.get(n,t,r)}};function Va(e,n,t){let r=t?e.styles:null,o=t?e.classes:null,i=0;if(n!==null)for(let s=0;s0&&(t.directiveToIndex=new Map);for(let p=0;p0;){let t=e[--n];if(typeof t=="number"&&t<0)return t}return 0}function uS(e,n,t){if(t){if(n.exportAs)for(let r=0;rr(ot(b[e.index])):e.index;Hv(m,n,t,i,a,h,!1)}}return l}function pS(e){return e.startsWith("animation")||e.startsWith("transition")}function mS(e,n,t,r){let o=e.cleanup;if(o!=null)for(let i=0;ic?a[c]:null}typeof s=="string"&&(i+=2)}return null}function Hv(e,n,t,r,o,i,s){let a=n.firstCreatePass?Wu(n):null,c=Gu(t),l=c.length;c.push(o,i),a&&a.push(r,e,l,(l+1)*(s?-1:1))}function Jg(e,n,t,r,o,i){let s=n[t],a=n[S],l=a.data[t].outputs[r],d=s[l].subscribe(i);Hv(e.index,a,n,o,i,d,!0)}var Bd=Symbol("BINDING");function Uv(e){return e.debugInfo?.className||e.type.name||null}var ja=class extends Oi{ngModule;constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){let t=kt(n);return new Rn(t,this.ngModule)}};function gS(e){return Object.keys(e).map(n=>{let[t,r,o]=e[n],i={propName:t,templateName:n,isSignal:(r&Ja.SignalBased)!==0};return o&&(i.transform=o),i})}function yS(e){return Object.keys(e).map(n=>({propName:e[n],templateName:n}))}function vS(e,n,t){let r=n instanceof le?n:n?.injector;return r&&e.getStandaloneInjector!==null&&(r=e.getStandaloneInjector(r)||r),r?new jd(t,r):t}function bS(e){let n=e.get(De,null);if(n===null)throw new v(407,!1);let t=e.get(kv,null),r=e.get(Rt,null),o=e.get(It,null,{optional:!0});return{rendererFactory:n,sanitizer:t,changeDetectionScheduler:r,ngReflect:!1,tracingService:o}}function _S(e,n){let t=$v(e);return Zy(n,t,t==="svg"?ju:t==="math"?Jm:null)}function $v(e){return(e.selectors[0][0]||"div").toLowerCase()}var Rn=class extends ac{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=gS(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=yS(this.componentDef.outputs),this.cachedOutputs}constructor(n,t){super(),this.componentDef=n,this.ngModule=t,this.componentType=n.type,this.selector=XI(n.selectors),this.ngContentSelectors=n.ngContentSelectors??[],this.isBoundToModule=!!t}create(n,t,r,o,i,s){Z(z.DynamicComponentStart);let a=M(null);try{let c=this.componentDef,l=vS(c,o||this.ngModule,n),u=bS(l),d=u.tracingService;return d&&d.componentCreate?d.componentCreate(Uv(c),()=>this.createComponentRef(u,l,t,r,i,s)):this.createComponentRef(u,l,t,r,i,s)}finally{M(a)}}createComponentRef(n,t,r,o,i,s){let a=this.componentDef,c=DS(o,a,s,i),l=n.rendererFactory.createRenderer(null,a),u=o?DM(l,o,a.encapsulation,t):_S(a,l),d=s?.some(ey)||i?.some(m=>typeof m!="function"&&m.bindings.some(ey)),p=vf(null,c,null,512|ov(a),null,null,n,l,t,null,By(u,t,!0));p[ee]=u,va(p);let h=null;try{let m=Rf(ee,p,2,"#host",()=>c.directiveRegistry,!0,0);Qy(l,u,m),lo(u,p),oc(c,p,m),lf(c,m,p),Of(c,m),r!==void 0&&wS(m,this.ngContentSelectors,r),h=st(m.index,p),p[se]=h[se],Af(c,p,null)}catch(m){throw h!==null&&wd(h),wd(p),m}finally{Z(z.DynamicComponentEnd),ba()}return new Ba(this.componentType,p,!!d)}};function DS(e,n,t,r){let o=e?["ng-version","21.2.6"]:QI(n.selectors[0]),i=null,s=null,a=0;if(t)for(let u of t)a+=u[Bd].requiredVars,u.create&&(u.targetIdx=0,(i??=[]).push(u)),u.update&&(u.targetIdx=0,(s??=[]).push(u));if(r)for(let u=0;u{if(t&1&&e)for(let r of e)r.create();if(t&2&&n)for(let r of n)r.update()}}function ey(e){let n=e[Bd].kind;return n==="input"||n==="twoWay"}var Ba=class extends Ov{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(n,t,r){super(),this._rootLView=t,this._hasInputBindings=r,this._tNode=fa(t[S],ee),this.location=po(this._tNode,t),this.instance=st(this._tNode.index,t)[se],this.hostView=this.changeDetectorRef=new Nn(t,void 0),this.componentType=n}setInput(n,t){this._hasInputBindings;let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(n)&&Object.is(this.previousInputValues.get(n),t))return;let o=this._rootLView,i=ic(r,o[S],o,n,t);this.previousInputValues.set(n,t);let s=st(r.index,o);Nf(s,1)}get injector(){return new hr(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(n){this.hostView.onDestroy(n)}};function wS(e,n,t){let r=e.projection=[];for(let o=0;o{class e{static __NG_ELEMENT_ID__=CS}return e})();function CS(){let e=pe();return zv(e,E())}var Hd=class e extends Ge{_lContainer;_hostTNode;_hostLView;constructor(n,t,r){super(),this._lContainer=n,this._hostTNode=t,this._hostLView=r}get element(){return po(this._hostTNode,this._hostLView)}get injector(){return new hr(this._hostTNode,this._hostLView)}get parentInjector(){let n=of(this._hostTNode,this._hostLView);if(by(n)){let t=Oa(n,this._hostLView),r=Ra(n),o=t[S].data[r+8];return new hr(o,t)}else return new hr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){let t=ty(this._lContainer);return t!==null&&t[n]||null}get length(){return this._lContainer.length-ae}createEmbeddedView(n,t,r){let o,i;typeof r=="number"?o=r:r!=null&&(o=r.index,i=r.injector);let s=La(this._lContainer,n.ssrId),a=n.createEmbeddedViewImpl(t||{},i,s);return this.insertImpl(a,o,uo(this._hostTNode,s)),a}createComponent(n,t,r,o,i,s,a){let c=n&&!kC(n),l;if(c)l=t;else{let _=t||{};l=_.index,r=_.injector,o=_.projectableNodes,i=_.environmentInjector||_.ngModuleRef,s=_.directives,a=_.bindings}let u=c?n:new Rn(kt(n)),d=r||this.parentInjector;if(!i&&u.ngModule==null){let C=(c?d:this.parentInjector).get(le,null);C&&(i=C)}let p=kt(u.componentType??{}),h=La(this._lContainer,p?.id??null),m=h?.firstChild??null,b=u.create(d,o,m,i,s,a);return this.insertImpl(b.hostView,l,uo(this._hostTNode,h)),b}insert(n,t){return this.insertImpl(n,t,!0)}insertImpl(n,t,r){let o=n._lView;if(tg(o)){let a=this.indexOf(n);if(a!==-1)this.detach(a);else{let c=o[ve],l=new e(c,c[ke],c[ve]);l.detach(l.indexOf(n))}}let i=this._adjustIndex(t),s=this._lContainer;return Ri(s,o,i,r),n.attachToViewContainerRef(),Tu(fd(s),i,n),n}move(n,t){return this.insert(n,t)}indexOf(n){let t=ty(this._lContainer);return t!==null?t.indexOf(n):-1}remove(n){let t=this._adjustIndex(n,-1),r=Ei(this._lContainer,t);r&&(ii(fd(this._lContainer),t),nc(r[S],r))}detach(n){let t=this._adjustIndex(n,-1),r=Ei(this._lContainer,t);return r&&ii(fd(this._lContainer),t)!=null?new Nn(r):null}_adjustIndex(n,t=0){return n??this.length+t}};function ty(e){return e[ai]}function fd(e){return e[ai]||(e[ai]=[])}function zv(e,n){let t,r=n[e.index];return vt(r)?t=r:(t=Tv(r,n,null,e),n[e.index]=t,bf(n,t)),MS(t,n,e,r),new Hd(t,e,n)}function IS(e,n){let t=e[X],r=t.createComment(""),o=it(n,e),i=t.parentNode(o);return Pa(t,i,r,t.nextSibling(o),!1),r}var MS=xS,SS=()=>!1;function TS(e,n,t){return SS(e,n,t)}function xS(e,n,t,r){if(e[xn])return;let o;t.type&8?o=ot(r):o=IS(n,t),e[xn]=o}var Ud=class e{queryList;matches=null;constructor(n){this.queryList=n}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},$d=class e{queries;constructor(n=[]){this.queries=n}createEmbeddedView(n){let t=n.queries;if(t!==null){let r=n.contentQueries!==null?n.contentQueries[0]:t.length,o=[];for(let i=0;i0)r.push(s[a/2]);else{let l=i[a+1],u=n[-c];for(let d=ae;dn.trim())}function Zv(e,n,t){e.queries===null&&(e.queries=new zd),e.queries.track(new Gd(n,t))}function FS(e,n){let t=e.contentQueries||(e.contentQueries=[]),r=t.length?t[t.length-1]:-1;n!==r&&t.push(e.queries.length-1,n)}function Pf(e,n){return e.queries.getByIndex(n)}function Kv(e,n){let t=e[S],r=Pf(t,n);return r.crossesNgTemplate?Wd(t,e,n,[]):Gv(t,e,r,n)}function Lf(e,n,t){let r,o=Zo(()=>{r._dirtyCounter();let i=PS(r,e);if(n&&i===void 0)throw new v(-951,!1);return i});return r=o[ie],r._dirtyCounter=be(0),r._flatValue=void 0,o}function Vf(e){return Lf(!0,!1,e)}function jf(e){return Lf(!0,!0,e)}function Xv(e){return Lf(!1,!1,e)}function Qv(e,n){let t=e[ie];t._lView=E(),t._queryIndex=n,t._queryList=Ff(t._lView,n),t._queryList.onDirty(()=>t._dirtyCounter.update(r=>r+1))}function PS(e,n){let t=e._lView,r=e._queryIndex;if(t===void 0||r===void 0||t[O]&4)return n?void 0:Se;let o=Ff(t,r),i=Kv(t,r);return o.reset(i,Ty),n?o.first:o._changesDetected||e._flatValue===void 0?e._flatValue=o.toArray():e._flatValue}var Bt=class{},Jv=class{};var Ua=class extends Bt{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new ja(this);constructor(n,t,r,o=!0){super(),this.ngModuleType=n,this._parent=t;let i=Iu(n);this._bootstrapComponents=tv(i.bootstrap),this._r3Injector=od(n,t,[{provide:Bt,useValue:this},{provide:Oi,useValue:this.componentFactoryResolver},...r],ri(n),new Set(["environment"])),o&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}},$a=class extends Jv{moduleType;constructor(n){super(),this.moduleType=n}create(n){return new Ua(this.moduleType,n,[])}};var Ci=class extends Bt{injector;componentFactoryResolver=new ja(this);instance=null;constructor(n){super();let t=new nr([...n.providers,{provide:Bt,useValue:this},{provide:Oi,useValue:this.componentFactoryResolver}],n.parent||Zr(),n.debugName,new Set(["environment"]));this.injector=t,n.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}};function eb(e,n,t=null){return new Ci({providers:e,parent:n,debugName:t,runEnvironmentInitializers:!0}).injector}var LS=(()=>{class e{_injector;cachedInjectors=new Map;constructor(t){this._injector=t}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){let r=Nu(!1,t.type),o=r.length>0?eb([r],this._injector,""):null;this.cachedInjectors.set(t,o)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=g({token:e,providedIn:"environment",factory:()=>new e(I(le))})}return e})();function Ce(e){return Mi(()=>{let n=tb(e),t=V(w({},n),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===af.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&e.dependencies||null,getStandaloneInjector:n.standalone?o=>o.get(LS).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||wt.Emulated,styles:e.styles||Se,_:null,schemas:e.schemas||null,tView:null,id:""});n.standalone&&sn("NgStandalone"),nb(t);let r=e.dependencies;return t.directiveDefs=ny(r,VS),t.pipeDefs=ny(r,Bm),t.id=HS(t),t})}function VS(e){return kt(e)||ia(e)}function K(e){return Mi(()=>({type:e.type,bootstrap:e.bootstrap||Se,declarations:e.declarations||Se,imports:e.imports||Se,exports:e.exports||Se,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function jS(e,n){if(e==null)return mt;let t={};for(let r in e)if(e.hasOwnProperty(r)){let o=e[r],i,s,a,c;Array.isArray(o)?(a=o[0],i=o[1],s=o[2]??i,c=o[3]||null):(i=o,s=o,a=Ja.None,c=null),t[i]=[r,a,c],n[i]=s}return t}function BS(e){if(e==null)return mt;let n={};for(let t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}function T(e){return Mi(()=>{let n=tb(e);return nb(n),n})}function ki(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone??!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function tb(e){let n={};return{type:e.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:n,inputConfig:e.inputs||mt,exportAs:e.exportAs||null,standalone:e.standalone??!0,signals:e.signals===!0,selectors:e.selectors||Se,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:jS(e.inputs,n),outputs:BS(e.outputs),debugInfo:null}}function nb(e){e.features?.forEach(n=>n(e))}function ny(e,n){return e?()=>{let t=typeof e=="function"?e():e,r=[];for(let o of t){let i=n(o);i!==null&&r.push(i)}return r}:null}function HS(e){let n=0,t=typeof e.consts=="function"?"":e.consts,r=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,t,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery];for(let i of r.join("|"))n=Math.imul(31,n)+i.charCodeAt(0)<<0;return n+=2147483648,"c"+n}function US(e){let n=t=>{let r=Array.isArray(e);t.hostDirectives===null?(t.resolveHostDirectives=$S,t.hostDirectives=r?e.map(qd):[e]):r?t.hostDirectives.unshift(...e.map(qd)):t.hostDirectives.unshift(e)};return n.ngInherit=!0,n}function $S(e){let n=[],t=!1,r=null,o=null;for(let i=0;i=0;r--){let o=e[r];o.hostVars=n+=o.hostVars,o.hostAttrs=co(o.hostAttrs,t=co(t,o.hostAttrs))}}function hd(e){return e===mt?{}:e===Se?[]:e}function YS(e,n){let t=e.viewQuery;t?e.viewQuery=(r,o)=>{n(r,o),t(r,o)}:e.viewQuery=n}function ZS(e,n){let t=e.contentQueries;t?e.contentQueries=(r,o,i)=>{n(r,o,i),t(r,o,i)}:e.contentQueries=n}function KS(e,n){let t=e.hostBindings;t?e.hostBindings=(r,o)=>{n(r,o),t(r,o)}:e.hostBindings=n}function ob(e,n,t,r,o,i,s,a){if(t.firstCreatePass){e.mergedAttrs=co(e.mergedAttrs,e.attrs);let u=e.tView=yf(2,e,o,i,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,t.consts,null);t.queries!==null&&(t.queries.template(t,e),u.queries=t.queries.embeddedTView(e))}a&&(e.flags|=a),to(e,!1);let c=QS(t,n,e,r);_a()&&If(t,n,c,e),lo(c,n);let l=Tv(c,n,c,e);n[r+ee]=l,bf(n,l),TS(l,e,n)}function XS(e,n,t,r,o,i,s,a,c,l,u){let d=t+ee,p;return n.firstCreatePass?(p=go(n,d,4,s||null,a||null),ma()&&Fv(n,e,p,Ke(n.consts,l),Sf),gy(n,p)):p=n.data[d],ob(p,e,n,t,r,o,i,c),Jr(p)&&oc(n,e,p),l!=null&&Ai(e,p,u),p}function fo(e,n,t,r,o,i,s,a,c,l,u){let d=t+ee,p;if(n.firstCreatePass){if(p=go(n,d,4,s||null,a||null),l!=null){let h=Ke(n.consts,l);p.localNames=[];for(let m=0;m{class e{log(t){console.log(t)}warn(t){console.warn(t)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();function vo(e){return typeof e=="function"&&e[ie]!==void 0}function Bf(e){return vo(e)&&typeof e.set=="function"}var lc=new y(""),uc=new y(""),Fi=(()=>{class e{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;constructor(t,r,o){this._ngZone=t,this.registry=r,ku()&&(this._destroyRef=f(xe,{optional:!0})??void 0),Hf||(lb(o),o.addToWindow(r)),this._watchAngularEvents(),t.run(()=>{this._taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){let t=this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),r=this._ngZone.runOutsideAngular(()=>this._ngZone.onStable.subscribe({next:()=>{P.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}}));this._destroyRef?.onDestroy(()=>{t.unsubscribe(),r.unsubscribe()})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb()}});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>r.updateCb&&r.updateCb(t)?(clearTimeout(r.timeoutId),!1):!0)}}getPendingTasks(){return this._taskTrackingZone?this._taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,r,o){let i=-1;r&&r>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==i),t()},r)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:o})}whenStable(t,r,o){if(o&&!this._taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,r,o),this._runCallbacksIfReady()}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,r,o){return[]}static \u0275fac=function(r){return new(r||e)(I(P),I(cb),I(uc))};static \u0275prov=g({token:e,factory:e.\u0275fac})}return e})(),cb=(()=>{class e{_applications=new Map;registerApplication(t,r){this._applications.set(t,r)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,r=!0){return Hf?.findTestabilityInTree(this,t,r)??null}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();function lb(e){Hf=e}var Hf;function vr(e){return!!e&&typeof e.then=="function"}function dc(e){return!!e&&typeof e.subscribe=="function"}var Uf=new y("");function eT(e){return or([{provide:Uf,multi:!0,useValue:e}])}var $f=(()=>{class e{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,r)=>{this.resolve=t,this.reject=r});appInits=f(Uf,{optional:!0})??[];injector=f(j);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let o of this.appInits){let i=Kr(this.injector,o);if(vr(i))t.push(i);else if(dc(i)){let s=new Promise((a,c)=>{i.subscribe({complete:a,error:c})});t.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{r()}).catch(o=>{this.reject(o)}),t.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ub=new y("");function db(){tu(()=>{let e="";throw new v(600,e)})}function fb(e){return e.isBoundToModule}var tT=10;var Fe=(()=>{class e{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=f(tn);afterRenderManager=f(tc);zonelessEnabled=f(pi);rootEffectScheduler=f(Da);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new N;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=f(fr);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(re(t=>!t))}constructor(){f(It,{optional:!0})}whenStable(){let t;return new Promise(r=>{t=this.isStable.subscribe({next:o=>{o&&r()}})}).finally(()=>{t.unsubscribe()})}_injector=f(le);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,r){return this.bootstrapImpl(t,r)}bootstrapImpl(t,r,o=j.NULL){return this._injector.get(P).run(()=>{Z(z.BootstrapComponentStart);let s=t instanceof ac;if(!this._injector.get($f).done){let m="";throw new v(405,m)}let c;s?c=t:c=this._injector.get(Oi).resolveComponentFactory(t),this.componentTypes.push(c.componentType);let l=fb(c)?void 0:this._injector.get(Bt),u=r||c.selector,d=c.create(o,[],u,l),p=d.location.nativeElement,h=d.injector.get(lc,null);return h?.registerApplication(p),d.onDestroy(()=>{this.detachView(d.hostView),vi(this.components,d),h?.unregisterApplication(p)}),this._loadComponent(d),Z(z.BootstrapComponentEnd,d),d})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Z(z.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(ec.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw Z(z.ChangeDetectionEnd),new v(101,!1);let t=M(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,M(t),this.afterTick.next(),Z(z.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(De,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++li(t))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(t){let r=t;this._views.push(r),r.attachToAppRef(this)}detachView(t){let r=t;vi(this._views,r),r.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView);try{this.tick()}catch(o){this.internalErrorHandler(o)}this.components.push(t),this._injector.get(ub,[]).forEach(o=>o(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>vi(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new v(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function vi(e,n){let t=e.indexOf(n);t>-1&&e.splice(t,1)}function hb(e,n){let t=E(),r=en();if(Ue(t,r,n)){let o=J(),i=no();if(ic(i,o,t,e,n))Lt(i)&&yv(t,i.index);else{let a=it(i,t);vv(t[X],a,null,i.value,e,n,null)}}return hb}function an(e,n,t,r){let o=E(),i=en();if(Ue(o,i,n)){let s=J(),a=no();TM(a,o,e,n,t,r)}return an}function nT(){return E()[Te][se]}var Yd=class{destroy(n){}updateValue(n,t){}swap(n,t){let r=Math.min(n,t),o=Math.max(n,t),i=this.detach(o);if(o-r>1){let s=this.detach(r);this.attach(r,i),this.attach(o,s)}else this.attach(r,i)}move(n,t){this.attach(t,this.detach(n))}};function pd(e,n,t,r,o){return e===t&&Object.is(n,r)?1:Object.is(o(e,n),o(t,r))?-1:0}function rT(e,n,t,r){let o,i,s=0,a=e.length-1,c=void 0;if(Array.isArray(n)){M(r);let l=n.length-1;for(M(null);s<=a&&s<=l;){let u=e.at(s),d=n[s],p=pd(s,u,s,d,t);if(p!==0){p<0&&e.updateValue(s,d),s++;continue}let h=e.at(a),m=n[l],b=pd(a,h,l,m,t);if(b!==0){b<0&&e.updateValue(a,m),a--,l--;continue}let _=t(s,u),C=t(a,h),ne=t(s,d);if(Object.is(ne,C)){let qe=t(l,m);Object.is(qe,_)?(e.swap(s,a),e.updateValue(a,m),l--,a--):e.move(a,s),e.updateValue(s,d),s++;continue}if(o??=new za,i??=sy(e,s,a,t),Zd(e,o,s,ne))e.updateValue(s,d),s++,a++;else if(i.has(ne))o.set(_,e.detach(s)),a--;else{let qe=e.create(s,n[s]);e.attach(s,qe),s++,a++}}for(;s<=l;)iy(e,o,t,s,n[s]),s++}else if(n!=null){M(r);let l=n[Symbol.iterator]();M(null);let u=l.next();for(;!u.done&&s<=a;){let d=e.at(s),p=u.value,h=pd(s,d,s,p,t);if(h!==0)h<0&&e.updateValue(s,p),s++,u=l.next();else{o??=new za,i??=sy(e,s,a,t);let m=t(s,p);if(Zd(e,o,s,m))e.updateValue(s,p),s++,a++,u=l.next();else if(!i.has(m))e.attach(s,e.create(s,p)),s++,a++,u=l.next();else{let b=t(s,d);o.set(b,e.detach(s)),a--}}}for(;!u.done;)iy(e,o,t,e.length,u.value),u=l.next()}for(;s<=a;)e.destroy(e.detach(a--));o?.forEach(l=>{e.destroy(l)})}function Zd(e,n,t,r){return n!==void 0&&n.has(r)?(e.attach(t,n.get(r)),n.delete(r),!0):!1}function iy(e,n,t,r,o){if(Zd(e,n,r,t(r,o)))e.updateValue(r,o);else{let i=e.create(r,o);e.attach(r,i)}}function sy(e,n,t,r){let o=new Set;for(let i=n;i<=t;i++)o.add(r(i,e.at(i)));return o}var za=class{kvMap=new Map;_vMap=void 0;has(n){return this.kvMap.has(n)}delete(n){if(!this.has(n))return!1;let t=this.kvMap.get(n);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(n,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(n),!0}get(n){return this.kvMap.get(n)}set(n,t){if(this.kvMap.has(n)){let r=this.kvMap.get(n);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(r);)r=o.get(r);o.set(r,t)}else this.kvMap.set(n,t)}forEach(n){for(let[t,r]of this.kvMap)if(n(r,t),this._vMap!==void 0){let o=this._vMap;for(;o.has(r);)r=o.get(r),n(r,t)}}};function oT(e,n,t,r,o,i,s,a){sn("NgControlFlow");let c=E(),l=J(),u=Ke(l.consts,i);return fo(c,l,e,n,t,r,o,u,256,s,a),zf}function zf(e,n,t,r,o,i,s,a){sn("NgControlFlow");let c=E(),l=J(),u=Ke(l.consts,i);return fo(c,l,e,n,t,r,o,u,512,s,a),zf}function iT(e,n){sn("NgControlFlow");let t=E(),r=en(),o=t[r]!==Ee?t[r]:-1,i=o!==-1?Ga(t,ee+o):void 0,s=0;if(Ue(t,r,e)){let a=M(null);try{if(i!==void 0&&Av(i,s),e!==-1){let c=ee+e,l=Ga(t,c),u=Jd(t[S],c),d=Rv(l,u,t),p=Ni(t,u,n,{dehydratedView:d});Ri(l,p,s,uo(u,d))}}finally{M(a)}}else if(i!==void 0){let a=xv(i,s);a!==void 0&&(a[se]=n)}}var Kd=class{lContainer;$implicit;$index;constructor(n,t,r){this.lContainer=n,this.$implicit=t,this.$index=r}get $count(){return this.lContainer.length-ae}};function sT(e){return e}function aT(e,n){return n}var Xd=class{hasEmptyBlock;trackByFn;liveCollection;constructor(n,t,r){this.hasEmptyBlock=n,this.trackByFn=t,this.liveCollection=r}};function cT(e,n,t,r,o,i,s,a,c,l,u,d,p){sn("NgControlFlow");let h=E(),m=J(),b=c!==void 0,_=E(),C=a?s.bind(_[Te][se]):s,ne=new Xd(b,C);_[ee+e]=ne,fo(h,m,e+1,n,t,r,o,Ke(m.consts,i),256),b&&fo(h,m,e+2,c,l,u,d,Ke(m.consts,p),512)}var Qd=class extends Yd{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(n,t,r){super(),this.lContainer=n,this.hostLView=t,this.templateTNode=r}get length(){return this.lContainer.length-ae}at(n){return this.getLView(n)[se].$implicit}attach(n,t){let r=t[ir];this.needsIndexUpdate||=n!==this.length,Ri(this.lContainer,t,n,uo(this.templateTNode,r)),uT(this.lContainer,n)}detach(n){return this.needsIndexUpdate||=n!==this.length-1,dT(this.lContainer,n),fT(this.lContainer,n)}create(n,t){let r=La(this.lContainer,this.templateTNode.tView.ssrId);return Ni(this.hostLView,this.templateTNode,new Kd(this.lContainer,t,n),{dehydratedView:r})}destroy(n){nc(n[S],n)}updateValue(n,t){this.getLView(n)[se].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let n=0;n0){let i=r[Xt];aM(i,o),mr.delete(r[Qt]),o.detachedLeaveAnimationFns=void 0}}function dT(e,n){if(e.length<=ae)return;let t=ae+n,r=e[t],o=r?r[Tn]:void 0;o&&o.leave&&o.leave.size>0&&(o.detachedLeaveAnimationFns=[])}function fT(e,n){return Ei(e,n)}function hT(e,n){return xv(e,n)}function Jd(e,n){return fa(e,n)}function pb(e,n,t){let r=E(),o=en();if(Ue(r,o,n)){let i=J(),s=no();mv(s,r,e,n,r[X],t)}return pb}function ef(e,n,t,r,o){ic(n,e,t,o?"class":"style",r)}function Wa(e,n,t,r){let o=E(),i=o[S],s=e+ee,a=i.firstCreatePass?Rf(s,o,2,n,Sf,ma(),t,r):i.data[s];if(Lt(a)){let c=o[yt].tracingService;if(c&&c.componentCreate){let l=i.data[a.directiveStart+a.componentOffset];return c.componentCreate(Uv(l),()=>(ay(e,n,o,a,r),Wa))}}return ay(e,n,o,a,r),Wa}function ay(e,n,t,r,o){if(Tf(r,t,e,n,gb),Jr(r)){let i=t[S];oc(i,t,r),lf(i,r,t)}o!=null&&Ai(t,r)}function Gf(){let e=J(),n=pe(),t=xf(n);return e.firstCreatePass&&Of(e,t),Zu(t)&&Ku(),qu(),t.classesWithoutHost!=null&&BC(t)&&ef(e,t,E(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&HC(t)&&ef(e,t,E(),t.stylesWithoutHost,!1),Gf}function mb(e,n,t,r){return Wa(e,n,t,r),Gf(),mb}function br(e,n,t,r){let o=E(),i=o[S],s=e+ee,a=i.firstCreatePass?fS(s,i,2,n,t,r):i.data[s];return Tf(a,o,e,n,gb),r!=null&&Ai(o,a),br}function _r(){let e=pe(),n=xf(e);return Zu(n)&&Ku(),qu(),_r}function $t(e,n,t,r){return br(e,n,t,r),_r(),$t}var gb=(e,n,t,r,o)=>(fi(!0),Zy(n[X],r,Eg()));function Wf(e,n,t){let r=E(),o=r[S],i=e+ee,s=o.firstCreatePass?Rf(i,r,8,"ng-container",Sf,ma(),n,t):o.data[i];if(Tf(s,r,e,"ng-container",pT),Jr(s)){let a=r[S];oc(a,r,s),lf(a,s,r)}return t!=null&&Ai(r,s),Wf}function qf(){let e=J(),n=pe(),t=xf(n);return e.firstCreatePass&&Of(e,t),qf}function yb(e,n,t){return Wf(e,n,t),qf(),yb}var pT=(e,n,t,r,o)=>(fi(!0),NI(n[X],""));function mT(){return E()}function vb(e,n,t){let r=E(),o=en();if(Ue(r,o,n)){let i=J(),s=no();gv(s,r,e,n,r[X],t)}return vb}var mi=void 0;function gT(e){let n=Math.floor(Math.abs(e)),t=e.toString().replace(/^[^.]*\.?/,"").length;return n===1&&t===0?1:5}var yT=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],mi,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],mi,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",mi,mi,mi],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",gT],md={};function Je(e){let n=vT(e),t=cy(n);if(t)return t;let r=n.split("-")[0];if(t=cy(r),t)return t;if(r==="en")return yT;throw new v(701,!1)}function cy(e){return e in md||(md[e]=ue.ng&&ue.ng.common&&ue.ng.common.locales&&ue.ng.common.locales[e]),md[e]}var fe=(function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e})(fe||{});function vT(e){return e.toLowerCase().replace(/_/g,"-")}var Pi="en-US";var bT=Pi;function bb(e){typeof e=="string"&&(bT=e.toLowerCase().replace(/_/g,"-"))}function cn(e,n,t){let r=E(),o=J(),i=pe();return Db(o,r,r[X],i,e,n,t),cn}function _b(e,n,t){let r=E(),o=J(),i=pe();return(i.type&3||t)&&Bv(i,o,r,t,r[X],e,n,Aa(i,r,n)),_b}function Db(e,n,t,r,o,i,s){let a=!0,c=null;if((r.type&3||s)&&(c??=Aa(r,n,i),Bv(r,e,n,s,t,o,i,c)&&(a=!1)),a){let l=r.outputs?.[o],u=r.hostDirectiveOutputs?.[o];if(u&&u.length)for(let d=0;d>17&32767}function IT(e){return(e&2)==2}function MT(e,n){return e&131071|n<<17}function tf(e){return e|2}function ho(e){return(e&131068)>>2}function gd(e,n){return e&-131069|n<<2}function ST(e){return(e&1)===1}function nf(e){return e|1}function TT(e,n,t,r,o,i){let s=i?n.classBindings:n.styleBindings,a=gr(s),c=ho(s);e[r]=t;let l=!1,u;if(Array.isArray(t)){let d=t;u=d[1],(u===null||qr(d,u)>0)&&(l=!0)}else u=t;if(o)if(c!==0){let p=gr(e[a+1]);e[r+1]=Ia(p,a),p!==0&&(e[p+1]=gd(e[p+1],r)),e[a+1]=MT(e[a+1],r)}else e[r+1]=Ia(a,0),a!==0&&(e[a+1]=gd(e[a+1],r)),a=r;else e[r+1]=Ia(c,0),a===0?a=r:e[c+1]=gd(e[c+1],r),c=r;l&&(e[r+1]=tf(e[r+1])),ly(e,u,r,!0),ly(e,u,r,!1),xT(n,u,e,r,i),s=Ia(a,c),i?n.classBindings=s:n.styleBindings=s}function xT(e,n,t,r,o){let i=o?e.residualClasses:e.residualStyles;i!=null&&typeof n=="string"&&qr(i,n)>=0&&(t[r+1]=nf(t[r+1]))}function ly(e,n,t,r){let o=e[t+1],i=n===null,s=r?gr(o):ho(o),a=!1;for(;s!==0&&(a===!1||i);){let c=e[s],l=e[s+1];AT(c,n)&&(a=!0,e[s+1]=r?nf(l):tf(l)),s=r?gr(l):ho(l)}a&&(e[t+1]=r?tf(o):nf(o))}function AT(e,n){return e===null||n==null||(Array.isArray(e)?e[1]:e)===n?!0:Array.isArray(e)&&typeof n=="string"?qr(e,n)>=0:!1}var Et={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function NT(e){return e.substring(Et.key,Et.keyEnd)}function RT(e){return OT(e),Ib(e,Mb(e,0,Et.textEnd))}function Ib(e,n){let t=Et.textEnd;return t===n?-1:(n=Et.keyEnd=kT(e,Et.key=n,t),Mb(e,n,t))}function OT(e){Et.key=0,Et.keyEnd=0,Et.value=0,Et.valueEnd=0,Et.textEnd=e.length}function Mb(e,n,t){for(;n32;)n++;return n}function hc(e,n,t){return Sb(e,n,t,!1),hc}function Pe(e,n){return Sb(e,n,null,!0),Pe}function Kf(e){PT(UT,FT,e,!0)}function FT(e,n){for(let t=RT(n);t>=0;t=Ib(n,t))la(e,NT(n),!0)}function Sb(e,n,t,r){let o=E(),i=J(),s=ui(2);if(i.firstUpdatePass&&xb(i,e,s,r),n!==Ee&&Ue(o,s,n)){let a=i.data[_t()];Ab(i,a,o,o[X],e,o[s+1]=zT(n,t),r,s)}}function PT(e,n,t,r){let o=J(),i=ui(2);o.firstUpdatePass&&xb(o,null,i,r);let s=E();if(t!==Ee&&Ue(s,i,t)){let a=o.data[_t()];if(Nb(a,r)&&!Tb(o,i)){let c=r?a.classesWithoutHost:a.stylesWithoutHost;c!==null&&(t=ra(c,t||"")),ef(o,a,s,t,r)}else $T(o,a,s,s[X],s[i+1],s[i+1]=HT(e,n,t),r,i)}}function Tb(e,n){return n>=e.expandoStartIndex}function xb(e,n,t,r){let o=e.data;if(o[t+1]===null){let i=o[_t()],s=Tb(e,t);Nb(i,r)&&n===null&&!s&&(n=!1),n=LT(o,i,n,r),TT(o,i,n,t,s,r)}}function LT(e,n,t,r){let o=mg(e),i=r?n.residualClasses:n.residualStyles;if(o===null)(r?n.classBindings:n.styleBindings)===0&&(t=yd(null,e,n,t,r),t=Ii(t,n.attrs,r),i=null);else{let s=n.directiveStylingLast;if(s===-1||e[s]!==o)if(t=yd(o,e,n,t,r),i===null){let c=VT(e,n,r);c!==void 0&&Array.isArray(c)&&(c=yd(null,e,n,c[1],r),c=Ii(c,n.attrs,r),jT(e,n,r,c))}else i=BT(e,n,r)}return i!==void 0&&(r?n.residualClasses=i:n.residualStyles=i),t}function VT(e,n,t){let r=t?n.classBindings:n.styleBindings;if(ho(r)!==0)return e[gr(r)]}function jT(e,n,t,r){let o=t?n.classBindings:n.styleBindings;e[gr(o)]=r}function BT(e,n,t){let r,o=n.directiveEnd;for(let i=1+n.directiveStylingLast;i0;){let c=e[o],l=Array.isArray(c),u=l?c[1]:c,d=u===null,p=t[o+1];p===Ee&&(p=d?Se:void 0);let h=d?ua(p,r):u===r?p:void 0;if(l&&!qa(h)&&(h=ua(c,r)),qa(h)&&(a=h,s))return a;let m=e[o+1];o=s?gr(m):ho(m)}if(n!==null){let c=i?n.residualClasses:n.residualStyles;c!=null&&(a=ua(c,r))}return a}function qa(e){return e!==void 0}function zT(e,n){return e==null||e===""||(typeof n=="string"?e=e+n:typeof e=="object"&&(e=ri(Qe(e)))),e}function Nb(e,n){return(e.flags&(n?8:16))!==0}function GT(e,n=""){let t=E(),r=J(),o=e+ee,i=r.firstCreatePass?go(r,o,1,n,null):r.data[o],s=WT(r,t,i,n);t[o]=s,_a()&&If(r,t,s,i),to(i,!1)}var WT=(e,n,t,r)=>(fi(!0),xI(n[X],r));function Rb(e,n,t,r=""){return Ue(e,en(),t)?n+Ft(t)+r:Ee}function qT(e,n,t,r,o,i=""){let s=td(),a=wi(e,s,t,o);return ui(2),a?n+Ft(t)+r+Ft(o)+i:Ee}function YT(e,n,t,r,o,i,s,a=""){let c=td(),l=jv(e,c,t,o,s);return ui(3),l?n+Ft(t)+r+Ft(o)+i+Ft(s)+a:Ee}function Ob(e){return Xf("",e),Ob}function Xf(e,n,t){let r=E(),o=Rb(r,e,n,t);return o!==Ee&&Qf(r,_t(),o),Xf}function kb(e,n,t,r,o){let i=E(),s=qT(i,e,n,t,r,o);return s!==Ee&&Qf(i,_t(),s),kb}function Fb(e,n,t,r,o,i,s){let a=E(),c=YT(a,e,n,t,r,o,i,s);return c!==Ee&&Qf(a,_t(),c),Fb}function Qf(e,n,t){let r=Bu(n,e);AI(e[X],r,t)}function Pb(e,n,t){Bf(n)&&(n=n());let r=E(),o=en();if(Ue(r,o,n)){let i=J(),s=no();mv(s,r,e,n,r[X],t)}return Pb}function ZT(e,n){let t=Bf(e);return t&&e.set(n),t}function Lb(e,n){let t=E(),r=J(),o=pe();return Db(r,t,t[X],o,e,n),Lb}function KT(e,n,t=""){return Rb(E(),e,n,t)}function XT(e,n,t){let r=Vt()+e,o=E();return o[r]===Ee?yo(o,r,n(t,o)):Vv(o,r)}function dy(e,n,t){let r=J();r.firstCreatePass&&Vb(n,r.data,r.blueprint,bt(e),t)}function Vb(e,n,t,r,o){if(e=ye(e),Array.isArray(e))for(let i=0;i>20;if(tr(e)||!e.multi){let h=new pr(l,o,D,null),m=bd(c,n,o?u:u+p,d);m===-1?(Dd(Fa(a,s),i,c),vd(i,e,n.length),n.push(c),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),t.push(h),s.push(h)):(t[m]=h,s[m]=h)}else{let h=bd(c,n,u+p,d),m=bd(c,n,u,u+p),b=h>=0&&t[h],_=m>=0&&t[m];if(o&&!_||!o&&!b){Dd(Fa(a,s),i,c);let C=e0(o?JT:QT,t.length,o,r,l,e);!o&&_&&(t[m].providerFactory=C),vd(i,e,n.length,0),n.push(c),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),t.push(C),s.push(C)}else{let C=jb(t[o?m:h],l,!o&&r);vd(i,e,h>-1?h:m,C)}!o&&r&&_&&t[m].componentProviders++}}}function vd(e,n,t,r){let o=tr(n),i=Xm(n);if(o||i){let c=(i?ye(n.useClass):n).prototype.ngOnDestroy;if(c){let l=e.destroyHooks||(e.destroyHooks=[]);if(!o&&n.multi){let u=l.indexOf(t);u===-1?l.push(t,[r,c]):l[u+1].push(r,c)}else l.push(t,c)}}}function jb(e,n,t){return t&&e.componentProviders++,e.multi.push(n)-1}function bd(e,n,t,r){for(let o=t;o{t.providersResolver=(r,o)=>dy(r,o?o(e):e,!1),n&&(t.viewProvidersResolver=(r,o)=>dy(r,o?o(n):n,!0))}}function t0(e,n){let t=Vt()+e,r=E();return r[t]===Ee?yo(r,t,n()):Vv(r,t)}function n0(e,n,t){return Bb(E(),Vt(),e,n,t)}function r0(e,n,t,r){return Hb(E(),Vt(),e,n,t,r)}function o0(e,n,t,r,o){return Ub(E(),Vt(),e,n,t,r,o)}function i0(e,n,t,r,o,i,s){return s0(E(),Vt(),e,n,t,r,o,i)}function pc(e,n){let t=e[n];return t===Ee?void 0:t}function Bb(e,n,t,r,o,i){let s=n+t;return Ue(e,s,o)?yo(e,s+1,i?r.call(i,o):r(o)):pc(e,s+1)}function Hb(e,n,t,r,o,i,s){let a=n+t;return wi(e,a,o,i)?yo(e,a+2,s?r.call(s,o,i):r(o,i)):pc(e,a+2)}function Ub(e,n,t,r,o,i,s,a){let c=n+t;return jv(e,c,o,i,s)?yo(e,c+3,a?r.call(a,o,i,s):r(o,i,s)):pc(e,c+3)}function s0(e,n,t,r,o,i,s,a,c){let l=n+t;return hS(e,l,o,i,s,a)?yo(e,l+4,c?r.call(c,o,i,s,a):r(o,i,s,a)):pc(e,l+4)}function a0(e,n){let t=J(),r,o=e+ee;t.firstCreatePass?(r=c0(n,t.pipeRegistry),t.data[o]=r,r.onDestroy&&(t.destroyHooks??=[]).push(o,r.onDestroy)):r=t.data[o];let i=r.factory||(r.factory=Cn(r.type,!0)),s,a=Oe(D);try{let c=ka(!1),l=i();return ka(c),Hu(t,E(),o,l),l}finally{Oe(a)}}function c0(e,n){if(n)for(let t=n.length-1;t>=0;t--){let r=n[t];if(e===r.name)return r}}function l0(e,n,t){let r=e+ee,o=E(),i=ci(o,r);return Jf(o,r)?Bb(o,Vt(),n,i.transform,t,i):i.transform(t)}function u0(e,n,t,r){let o=e+ee,i=E(),s=ci(i,o);return Jf(i,o)?Hb(i,Vt(),n,s.transform,t,r,s):s.transform(t,r)}function d0(e,n,t,r,o){let i=e+ee,s=E(),a=ci(s,i);return Jf(s,i)?Ub(s,Vt(),n,a.transform,t,r,o,a):a.transform(t,r,o)}function Jf(e,n){return e[S].data[n].pure}function f0(e,n){return sc(e,n)}var Ya=class{ngModuleFactory;componentFactories;constructor(n,t){this.ngModuleFactory=n,this.componentFactories=t}},h0=(()=>{class e{compileModuleSync(t){return new $a(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){let r=this.compileModuleSync(t),o=Iu(t),i=tv(o.declarations).reduce((s,a)=>{let c=kt(a);return c&&s.push(new Rn(c)),s},[]);return new Ya(r,i)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var $b=(()=>{class e{applicationErrorHandler=f(tn);appRef=f(Fe);taskService=f(fr);ngZone=f(P);zonelessEnabled=f(pi);tracing=f(It,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new B;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ti):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(f(cd,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let t=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(t);return}this.switchToMicrotaskScheduler(),this.taskService.remove(t)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let t=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(t)})})}notify(t){if(!this.zonelessEnabled&&t===5)return;switch(t){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;break}case 12:{this.appRef.dirtyFlags|=16;break}case 13:{this.appRef.dirtyFlags|=2;break}case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?Mg:id;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(ti+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let t=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){this.applicationErrorHandler(r)}finally{this.taskService.remove(t),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function p0(){return sn("NgZoneless"),or([...eh(),[]])}function eh(){return[{provide:Rt,useExisting:$b},{provide:P,useClass:ni},{provide:pi,useValue:!0}]}function m0(){return typeof $localize<"u"&&$localize.locale||Pi}var Li=new y("",{factory:()=>f(Li,{optional:!0,skipSelf:!0})||m0()});var Vi=class{destroyed=!1;listeners=null;errorHandler=f(nt,{optional:!0});destroyRef=f(xe);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(n){if(this.destroyed)throw new v(953,!1);return(this.listeners??=[]).push(n),{unsubscribe:()=>{let t=this.listeners?.indexOf(n);t!==void 0&&t!==-1&&this.listeners?.splice(t,1)}}}emit(n){if(this.destroyed){console.warn(Ot(953,!1));return}if(this.listeners===null)return;let t=M(null);try{for(let r of this.listeners)try{r(n)}catch(o){this.errorHandler?.handleError(o)}}finally{M(t)}}};function Le(e){return km(e)}function Er(e,n){return Zo(e,n?.equal)}var g0=e=>e;function y0(e,n){if(typeof e=="function"){let t=su(e,g0,n?.equal);return zb(t,n?.debugName)}else{let t=su(e.source,e.computation,e.equal);return zb(t,e.debugName)}}function zb(e,n){let t=e[ie],r=e;return r.set=o=>Rm(t,o),r.update=o=>Om(t,o),r.asReadonly=hi.bind(e),r}var yc=Symbol("InputSignalNode#UNSET"),t_=V(w({},Ko),{transformFn:void 0,applyValueToInputSignal(e,n){wn(e,n)}});function n_(e,n){let t=Object.create(t_);t.value=e,t.transformFn=n?.transform;function r(){if(Yt(t),t.value===yc){let o=null;throw new v(-950,o)}return t.value}return r[ie]=t,r}var Gb=class{attributeName;constructor(n){this.attributeName=n}__NG_ELEMENT_ID__=()=>sf(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}},O8=(()=>{let e=new y("");return e.__NG_ELEMENT_ID__=n=>{let t=pe();if(t===null)throw new v(-204,!1);if(t.type&2)return t.value;if(n&8)return null;throw new v(-204,!1)},e})();function k8(e){return new Vi}function Wb(e,n){return n_(e,n)}function M0(e){return n_(yc,e)}var F8=(Wb.required=M0,Wb);function qb(e,n){return Vf(n)}function S0(e,n){return jf(n)}var P8=(qb.required=S0,qb);function L8(e,n){return Xv(n)}function Yb(e,n){return Vf(n)}function T0(e,n){return jf(n)}var V8=(Yb.required=T0,Yb);function r_(e,n){let t=Object.create(t_),r=new Vi;t.value=e;function o(){return Yt(t),Zb(t.value),t.value}return o[ie]=t,o.asReadonly=hi.bind(o),o.set=i=>{t.equal(t.value,i)||(wn(t,i),r.emit(i))},o.update=i=>{Zb(t.value),o.set(i(t.value))},o.subscribe=r.subscribe.bind(r),o.destroyRef=r.destroyRef,o}function Zb(e){if(e===yc)throw new v(952,!1)}function Kb(e,n){return r_(e,n)}function x0(e){return r_(yc,e)}var j8=(Kb.required=x0,Kb);var nh=new y(""),A0=new y("");function ji(e){return!e.moduleRef}function N0(e){let n=ji(e)?e.r3Injector:e.moduleRef.injector,t=n.get(P);return t.run(()=>{ji(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let r=n.get(tn),o;if(t.runOutsideAngular(()=>{o=t.onError.subscribe({next:r})}),ji(e)){let i=()=>n.destroy(),s=e.platformInjector.get(nh);s.add(i),n.onDestroy(()=>{o.unsubscribe(),s.delete(i)})}else{let i=()=>e.moduleRef.destroy(),s=e.platformInjector.get(nh);s.add(i),e.moduleRef.onDestroy(()=>{vi(e.allPlatformModules,e.moduleRef),o.unsubscribe(),s.delete(i)})}return O0(r,t,()=>{let i=n.get(fr),s=i.add(),a=n.get($f);return a.runInitializers(),a.donePromise.then(()=>{let c=n.get(Li,Pi);if(bb(c||Pi),!n.get(A0,!0))return ji(e)?n.get(Fe):(e.allPlatformModules.push(e.moduleRef),e.moduleRef);if(ji(e)){let u=n.get(Fe);return e.rootComponent!==void 0&&u.bootstrap(e.rootComponent),u}else return R0?.(e.moduleRef,e.allPlatformModules),e.moduleRef}).finally(()=>{i.remove(s)})})})}var R0;function O0(e,n,t){try{let r=t();return vr(r)?r.catch(o=>{throw n.runOutsideAngular(()=>e(o)),o}):r}catch(r){throw n.runOutsideAngular(()=>e(r)),r}}var mc=null;function k0(e=[],n){return j.create({name:n,providers:[{provide:si,useValue:"platform"},{provide:nh,useValue:new Set([()=>mc=null])},...e]})}function F0(e=[]){if(mc)return mc;let n=k0(e);return mc=n,db(),P0(n),n}function P0(e){let n=e.get(Za,null);Kr(e,()=>{n?.forEach(t=>t())})}var L0=1e4;var B8=L0-1e3;var kn=(()=>{class e{static __NG_ELEMENT_ID__=V0}return e})();function V0(e){return j0(pe(),E(),(e&16)===16)}function j0(e,n,t){if(Lt(e)&&!t){let r=st(e.index,n);return new Nn(r,r)}else if(e.type&175){let r=n[Te];return new Nn(r,n)}return null}var rh=class{supports(n){return kf(n)}create(n){return new oh(n)}},B0=(e,n)=>n,oh=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(n){this._trackByFn=n||B0}forEachItem(n){let t;for(t=this._itHead;t!==null;t=t._next)n(t)}forEachOperation(n){let t=this._itHead,r=this._removalsHead,o=0,i=null;for(;t||r;){let s=!r||t&&t.currentIndex{s=this._trackByFn(o,a),t===null||!Object.is(t.trackById,s)?(t=this._mismatch(t,a,s,o),r=!0):(r&&(t=this._verifyReinsertion(t,a,s,o)),Object.is(t.item,a)||this._addIdentityChange(t,a)),t=t._next,o++}),this.length=o;return this._truncate(t),this.collection=n,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;n!==null;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;n!==null;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;n!==null;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,t,r,o){let i;return n===null?i=this._itTail:(i=n._prev,this._remove(n)),n=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null),n!==null?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._reinsertAfter(n,i,o)):(n=this._linkedRecords===null?null:this._linkedRecords.get(r,o),n!==null?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._moveAfter(n,i,o)):n=this._addAfter(new ih(t,r),i,o)),n}_verifyReinsertion(n,t,r,o){let i=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null);return i!==null?n=this._reinsertAfter(i,n._prev,o):n.currentIndex!=o&&(n.currentIndex=o,this._addToMoves(n,o)),n}_truncate(n){for(;n!==null;){let t=n._next;this._addToRemovals(this._unlink(n)),n=t}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,t,r){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(n);let o=n._prevRemoved,i=n._nextRemoved;return o===null?this._removalsHead=i:o._nextRemoved=i,i===null?this._removalsTail=o:i._prevRemoved=o,this._insertAfter(n,t,r),this._addToMoves(n,r),n}_moveAfter(n,t,r){return this._unlink(n),this._insertAfter(n,t,r),this._addToMoves(n,r),n}_addAfter(n,t,r){return this._insertAfter(n,t,r),this._additionsTail===null?this._additionsTail=this._additionsHead=n:this._additionsTail=this._additionsTail._nextAdded=n,n}_insertAfter(n,t,r){let o=t===null?this._itHead:t._next;return n._next=o,n._prev=t,o===null?this._itTail=n:o._prev=n,t===null?this._itHead=n:t._next=n,this._linkedRecords===null&&(this._linkedRecords=new gc),this._linkedRecords.put(n),n.currentIndex=r,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){this._linkedRecords!==null&&this._linkedRecords.remove(n);let t=n._prev,r=n._next;return t===null?this._itHead=r:t._next=r,r===null?this._itTail=t:r._prev=t,n}_addToMoves(n,t){return n.previousIndex===t||(this._movesTail===null?this._movesTail=this._movesHead=n:this._movesTail=this._movesTail._nextMoved=n),n}_addToRemovals(n){return this._unlinkedRecords===null&&(this._unlinkedRecords=new gc),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,t){return n.item=t,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=n:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=n,n}},ih=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(n,t){this.item=n,this.trackById=t}},sh=class{_head=null;_tail=null;add(n){this._head===null?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,t){let r;for(r=this._head;r!==null;r=r._nextDup)if((t===null||t<=r.currentIndex)&&Object.is(r.trackById,n))return r;return null}remove(n){let t=n._prevDup,r=n._nextDup;return t===null?this._head=r:t._nextDup=r,r===null?this._tail=t:r._prevDup=t,this._head===null}},gc=class{map=new Map;put(n){let t=n.trackById,r=this.map.get(t);r||(r=new sh,this.map.set(t,r)),r.add(n)}get(n,t){let r=n,o=this.map.get(r);return o?o.get(n,t):null}remove(n){let t=n.trackById;return this.map.get(t).remove(n)&&this.map.delete(t),n}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Xb(e,n,t){let r=e.previousIndex;if(r===null)return r;let o=0;return t&&r{if(t&&t.key===o)this._maybeAddToChanges(t,r),this._appendAfter=t,t=t._next;else{let i=this._getOrCreateRecordForKey(o,r);t=this._insertBeforeOrAppend(t,i)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let r=t;r!==null;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,t){if(n){let r=n._prev;return t._next=n,t._prev=r,n._prev=t,r&&(r._next=t),n===this._mapHead&&(this._mapHead=t),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(n,t){if(this._records.has(n)){let o=this._records.get(n);this._maybeAddToChanges(o,t);let i=o._prev,s=o._next;return i&&(i._next=s),s&&(s._prev=i),o._next=null,o._prev=null,o}let r=new lh(n);return this._records.set(n,r),r.currentValue=t,this._addToAdditions(r),r}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;n!==null;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;n!==null;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;n!=null;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,t){Object.is(t,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=t,this._addToChanges(n))}_addToAdditions(n){this._additionsHead===null?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){this._changesHead===null?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,t){n instanceof Map?n.forEach(t):Object.keys(n).forEach(r=>t(n[r],r))}},lh=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(n){this.key=n}};function Qb(){return new vc([new rh])}var vc=(()=>{class e{factories;static \u0275prov=g({token:e,providedIn:"root",factory:Qb});constructor(t){this.factories=t}static create(t,r){if(r!=null){let o=r.factories.slice();t=t.concat(o)}return new e(t)}static extend(t){return{provide:e,useFactory:()=>{let r=f(e,{optional:!0,skipSelf:!0});return e.create(t,r||Qb())}}}find(t){let r=this.factories.find(o=>o.supports(t));if(r!=null)return r;throw new v(901,!1)}}return e})();function Jb(){return new fh([new ah])}var fh=(()=>{class e{static \u0275prov=g({token:e,providedIn:"root",factory:Jb});factories;constructor(t){this.factories=t}static create(t,r){if(r){let o=r.factories.slice();t=t.concat(o)}return new e(t)}static extend(t){return{provide:e,useFactory:()=>{let r=f(e,{optional:!0,skipSelf:!0});return e.create(t,r||Jb())}}}find(t){let r=this.factories.find(o=>o.supports(t));if(r)return r;throw new v(901,!1)}}return e})();var o_=(()=>{class e{constructor(t){}static \u0275fac=function(r){return new(r||e)(I(Fe))};static \u0275mod=K({type:e});static \u0275inj=W({})}return e})();function i_(e){let{rootComponent:n,appProviders:t,platformProviders:r,platformRef:o}=e;Z(z.BootstrapApplicationStart);try{let i=o?.injector??F0(r),s=[eh(),Tg,...t||[]],a=new Ci({providers:s,parent:i,debugName:"",runEnvironmentInitializers:!1});return N0({r3Injector:a.injector,platformInjector:i,rootComponent:n})}catch(i){return Promise.reject(i)}finally{Z(z.BootstrapApplicationEnd)}}function ce(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}function hh(e,n=NaN){return!isNaN(parseFloat(e))&&!isNaN(Number(e))?Number(e):n}var th=Symbol("NOT_SET"),s_=new Set,H0=V(w({},Ko),{kind:"afterRenderEffectPhase",consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:th,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(Yt(l),l.value),l.signal[ie]=l,l.registerCleanupFn=u=>(l.cleanup??=new Set).add(u),this.nodes[a]=l,this.hooks[a]=u=>l.phaseFn(u)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let n of this.onDestroyFns)n();super.destroy();for(let n of this.nodes)if(n)try{for(let t of n.cleanup??s_)t()}finally{En(n)}}};function H8(e,n){let t=n?.injector??f(j),r=t.get(Rt),o=t.get(tc),i=t.get(It,null,{optional:!0});o.impl??=t.get(wf);let s=e;typeof s=="function"&&(s={mixedReadWrite:e});let a=t.get(ro,null,{optional:!0}),c=new uh(o.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,r,t,i?.snapshot(null));return o.impl.register(c),c}function bc(e,n){let t=kt(e),r=n.elementInjector||Zr();return new Rn(t).create(r,n.projectableNodes,n.hostElement,n.environmentInjector,n.directives,n.bindings)}function U8(e){let n=kt(e);if(!n)return null;let t=new Rn(n);return{get selector(){return t.selector},get type(){return t.componentType},get inputs(){return t.inputs},get outputs(){return t.outputs},get ngContentSelectors(){return t.ngContentSelectors},get isStandalone(){return n.standalone},get isSignal(){return n.signals}}}var a_=null;function et(){return a_}function ph(e){a_??=e}var Bi=class{},Fn=(()=>{class e{historyGo(t){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:()=>f(c_),providedIn:"platform"})}return e})(),U0=new y(""),c_=(()=>{class e extends Fn{_location;_history;_doc=f(F);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return et().getBaseHref(this._doc)}onPopState(t){let r=et().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",t,!1),()=>r.removeEventListener("popstate",t)}onHashChange(t){let r=et().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",t,!1),()=>r.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,r,o){this._history.pushState(t,r,o)}replaceState(t,r,o){this._history.replaceState(t,r,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function _c(e,n){return e?n?e.endsWith("/")?n.startsWith("/")?e+n.slice(1):e+n:n.startsWith("/")?e+n:`${e}/${n}`:e:n}function l_(e){let n=e.search(/#|\?|$/);return e[n-1]==="/"?e.slice(0,n-1)+e.slice(n):e}function Mt(e){return e&&e[0]!=="?"?`?${e}`:e}var bo=(()=>{class e{historyGo(t){throw new Error("")}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:()=>f(d_),providedIn:"root"})}return e})(),Dc=new y(""),d_=(()=>{class e extends bo{_platformLocation;_baseHref;_removeListenerFns=[];constructor(t,r){super(),this._platformLocation=t,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??f(F).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return _c(this._baseHref,t)}path(t=!1){let r=this._platformLocation.pathname+Mt(this._platformLocation.search),o=this._platformLocation.hash;return o&&t?`${r}${o}`:r}pushState(t,r,o,i){let s=this.prepareExternalUrl(o+Mt(i));this._platformLocation.pushState(t,r,s)}replaceState(t,r,o,i){let s=this.prepareExternalUrl(o+Mt(i));this._platformLocation.replaceState(t,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static \u0275fac=function(r){return new(r||e)(I(Fn),I(Dc,8))};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Ec=(()=>{class e{_subject=new N;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(t){this._locationStrategy=t;let r=this._locationStrategy.getBaseHref();this._basePath=G0(l_(u_(r))),this._locationStrategy.onPopState(o=>{this._subject.next({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,r=""){return this.path()==this.normalize(t+Mt(r))}normalize(t){return e.stripTrailingSlash(z0(this._basePath,u_(t)))}prepareExternalUrl(t){return t&&t[0]!=="/"&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,r="",o=null){this._locationStrategy.pushState(o,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Mt(r)),o)}replaceState(t,r="",o=null){this._locationStrategy.replaceState(o,"",t,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Mt(r)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",r){this._urlChangeListeners.forEach(o=>o(t,r))}subscribe(t,r,o){return this._subject.subscribe({next:t,error:r??void 0,complete:o??void 0})}static normalizeQueryParams=Mt;static joinWithSlash=_c;static stripTrailingSlash=l_;static \u0275fac=function(r){return new(r||e)(I(bo))};static \u0275prov=g({token:e,factory:()=>$0(),providedIn:"root"})}return e})();function $0(){return new Ec(I(bo))}function z0(e,n){if(!e||!n.startsWith(e))return n;let t=n.substring(e.length);return t===""||["/",";","?","#"].includes(t[0])?t:n}function u_(e){return e.replace(/\/index.html$/,"")}function G0(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}var W0=(()=>{class e extends bo{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(t,r){super(),this._platformLocation=t,r!=null&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){let r=this._platformLocation.hash??"#";return r.length>0?r.substring(1):r}prepareExternalUrl(t){let r=_c(this._baseHref,t);return r.length>0?"#"+r:r}pushState(t,r,o,i){let s=this.prepareExternalUrl(o+Mt(i))||this._platformLocation.pathname;this._platformLocation.pushState(t,r,s)}replaceState(t,r,o,i){let s=this.prepareExternalUrl(o+Mt(i))||this._platformLocation.pathname;this._platformLocation.replaceState(t,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static \u0275fac=function(r){return new(r||e)(I(Fn),I(Dc,8))};static \u0275prov=g({token:e,factory:e.\u0275fac})}return e})();var Re=(function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e})(Re||{}),Q=(function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e})(Q||{}),We=(function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e})(We||{}),dn={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function g_(e){return Je(e)[fe.LocaleId]}function y_(e,n,t){let r=Je(e),o=[r[fe.DayPeriodsFormat],r[fe.DayPeriodsStandalone]],i=at(o,n);return at(i,t)}function v_(e,n,t){let r=Je(e),o=[r[fe.DaysFormat],r[fe.DaysStandalone]],i=at(o,n);return at(i,t)}function b_(e,n,t){let r=Je(e),o=[r[fe.MonthsFormat],r[fe.MonthsStandalone]],i=at(o,n);return at(i,t)}function __(e,n){let r=Je(e)[fe.Eras];return at(r,n)}function Hi(e,n){let t=Je(e);return at(t[fe.DateFormat],n)}function Ui(e,n){let t=Je(e);return at(t[fe.TimeFormat],n)}function $i(e,n){let r=Je(e)[fe.DateTimeFormat];return at(r,n)}function zi(e,n){let t=Je(e),r=t[fe.NumberSymbols][n];if(typeof r>"u"){if(n===dn.CurrencyDecimal)return t[fe.NumberSymbols][dn.Decimal];if(n===dn.CurrencyGroup)return t[fe.NumberSymbols][dn.Group]}return r}function D_(e){if(!e[fe.ExtraData])throw new v(2303,!1)}function E_(e){let n=Je(e);return D_(n),(n[fe.ExtraData][2]||[]).map(r=>typeof r=="string"?mh(r):[mh(r[0]),mh(r[1])])}function w_(e,n,t){let r=Je(e);D_(r);let o=[r[fe.ExtraData][0],r[fe.ExtraData][1]],i=at(o,n)||[];return at(i,t)||[]}function at(e,n){for(let t=n;t>-1;t--)if(typeof e[t]<"u")return e[t];throw new v(2304,!1)}function mh(e){let[n,t]=e.split(":");return{hours:+n,minutes:+t}}var q0=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,wc={},Y0=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function C_(e,n,t,r){let o=rx(e);n=un(t,n)||n;let s=[],a;for(;n;)if(a=Y0.exec(n),a){s=s.concat(a.slice(1));let u=s.pop();if(!u)break;n=u}else{s.push(n);break}let c=o.getTimezoneOffset();r&&(c=M_(r,c),o=nx(o,r));let l="";return s.forEach(u=>{let d=ex(u);l+=d?d(o,t,c):u==="''"?"'":u.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function Tc(e,n,t){let r=new Date(0);return r.setFullYear(e,n,t),r.setHours(0,0,0),r}function un(e,n){let t=g_(e);if(wc[t]??={},wc[t][n])return wc[t][n];let r="";switch(n){case"shortDate":r=Hi(e,We.Short);break;case"mediumDate":r=Hi(e,We.Medium);break;case"longDate":r=Hi(e,We.Long);break;case"fullDate":r=Hi(e,We.Full);break;case"shortTime":r=Ui(e,We.Short);break;case"mediumTime":r=Ui(e,We.Medium);break;case"longTime":r=Ui(e,We.Long);break;case"fullTime":r=Ui(e,We.Full);break;case"short":let o=un(e,"shortTime"),i=un(e,"shortDate");r=Cc($i(e,We.Short),[o,i]);break;case"medium":let s=un(e,"mediumTime"),a=un(e,"mediumDate");r=Cc($i(e,We.Medium),[s,a]);break;case"long":let c=un(e,"longTime"),l=un(e,"longDate");r=Cc($i(e,We.Long),[c,l]);break;case"full":let u=un(e,"fullTime"),d=un(e,"fullDate");r=Cc($i(e,We.Full),[u,d]);break}return r&&(wc[t][n]=r),r}function Cc(e,n){return n&&(e=e.replace(/\{([^}]+)}/g,function(t,r){return n!=null&&r in n?n[r]:t})),e}function St(e,n,t="-",r,o){let i="";(e<0||o&&e<=0)&&(o?e=-e+1:(e=-e,i=t));let s=String(e);for(;s.length0||a>-t)&&(a+=t),e===3)a===0&&t===-12&&(a=12);else if(e===6)return Z0(a,n);let c=zi(s,dn.MinusSign);return St(a,n,c,r,o)}}function K0(e,n){switch(e){case 0:return n.getFullYear();case 1:return n.getMonth();case 2:return n.getDate();case 3:return n.getHours();case 4:return n.getMinutes();case 5:return n.getSeconds();case 6:return n.getMilliseconds();case 7:return n.getDay();default:throw new v(2301,!1)}}function te(e,n,t=Re.Format,r=!1){return function(o,i){return X0(o,i,e,n,t,r)}}function X0(e,n,t,r,o,i){switch(t){case 2:return b_(n,o,r)[e.getMonth()];case 1:return v_(n,o,r)[e.getDay()];case 0:let s=e.getHours(),a=e.getMinutes();if(i){let l=E_(n),u=w_(n,o,r),d=l.findIndex(p=>{if(Array.isArray(p)){let[h,m]=p,b=s>=h.hours&&a>=h.minutes,_=s0?Math.floor(o/60):Math.ceil(o/60);switch(e){case 0:return(o>=0?"+":"")+St(s,2,i)+St(Math.abs(o%60),2,i);case 1:return"GMT"+(o>=0?"+":"")+St(s,1,i);case 2:return"GMT"+(o>=0?"+":"")+St(s,2,i)+":"+St(Math.abs(o%60),2,i);case 3:return r===0?"Z":(o>=0?"+":"")+St(s,2,i)+":"+St(Math.abs(o%60),2,i);default:throw new v(2310,!1)}}}var Q0=0,Sc=4;function J0(e){let n=Tc(e,Q0,1).getDay();return Tc(e,0,1+(n<=Sc?Sc:Sc+7)-n)}function I_(e){let n=e.getDay(),t=n===0?-3:Sc-n;return Tc(e.getFullYear(),e.getMonth(),e.getDate()+t)}function gh(e,n=!1){return function(t,r){let o;if(n){let i=new Date(t.getFullYear(),t.getMonth(),1).getDay()-1,s=t.getDate();o=1+Math.floor((s+i)/7)}else{let i=I_(t),s=J0(i.getFullYear()),a=i.getTime()-s.getTime();o=1+Math.round(a/6048e5)}return St(o,e,zi(r,dn.MinusSign))}}function Mc(e,n=!1){return function(t,r){let i=I_(t).getFullYear();return St(i,e,zi(r,dn.MinusSign),n)}}var yh={};function ex(e){if(yh[e])return yh[e];let n;switch(e){case"G":case"GG":case"GGG":n=te(3,Q.Abbreviated);break;case"GGGG":n=te(3,Q.Wide);break;case"GGGGG":n=te(3,Q.Narrow);break;case"y":n=ge(0,1,0,!1,!0);break;case"yy":n=ge(0,2,0,!0,!0);break;case"yyy":n=ge(0,3,0,!1,!0);break;case"yyyy":n=ge(0,4,0,!1,!0);break;case"Y":n=Mc(1);break;case"YY":n=Mc(2,!0);break;case"YYY":n=Mc(3);break;case"YYYY":n=Mc(4);break;case"M":case"L":n=ge(1,1,1);break;case"MM":case"LL":n=ge(1,2,1);break;case"MMM":n=te(2,Q.Abbreviated);break;case"MMMM":n=te(2,Q.Wide);break;case"MMMMM":n=te(2,Q.Narrow);break;case"LLL":n=te(2,Q.Abbreviated,Re.Standalone);break;case"LLLL":n=te(2,Q.Wide,Re.Standalone);break;case"LLLLL":n=te(2,Q.Narrow,Re.Standalone);break;case"w":n=gh(1);break;case"ww":n=gh(2);break;case"W":n=gh(1,!0);break;case"d":n=ge(2,1);break;case"dd":n=ge(2,2);break;case"c":case"cc":n=ge(7,1);break;case"ccc":n=te(1,Q.Abbreviated,Re.Standalone);break;case"cccc":n=te(1,Q.Wide,Re.Standalone);break;case"ccccc":n=te(1,Q.Narrow,Re.Standalone);break;case"cccccc":n=te(1,Q.Short,Re.Standalone);break;case"E":case"EE":case"EEE":n=te(1,Q.Abbreviated);break;case"EEEE":n=te(1,Q.Wide);break;case"EEEEE":n=te(1,Q.Narrow);break;case"EEEEEE":n=te(1,Q.Short);break;case"a":case"aa":case"aaa":n=te(0,Q.Abbreviated);break;case"aaaa":n=te(0,Q.Wide);break;case"aaaaa":n=te(0,Q.Narrow);break;case"b":case"bb":case"bbb":n=te(0,Q.Abbreviated,Re.Standalone,!0);break;case"bbbb":n=te(0,Q.Wide,Re.Standalone,!0);break;case"bbbbb":n=te(0,Q.Narrow,Re.Standalone,!0);break;case"B":case"BB":case"BBB":n=te(0,Q.Abbreviated,Re.Format,!0);break;case"BBBB":n=te(0,Q.Wide,Re.Format,!0);break;case"BBBBB":n=te(0,Q.Narrow,Re.Format,!0);break;case"h":n=ge(3,1,-12);break;case"hh":n=ge(3,2,-12);break;case"H":n=ge(3,1);break;case"HH":n=ge(3,2);break;case"m":n=ge(4,1);break;case"mm":n=ge(4,2);break;case"s":n=ge(5,1);break;case"ss":n=ge(5,2);break;case"S":n=ge(6,1);break;case"SS":n=ge(6,2);break;case"SSS":n=ge(6,3);break;case"Z":case"ZZ":case"ZZZ":n=Ic(0);break;case"ZZZZZ":n=Ic(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=Ic(1);break;case"OOOO":case"ZZZZ":case"zzzz":n=Ic(2);break;default:return null}return yh[e]=n,n}function M_(e,n){e=e.replace(/:/g,"");let t=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(t)?n:t}function tx(e,n){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+n),e}function nx(e,n,t){let o=e.getTimezoneOffset(),i=M_(n,o);return tx(e,-1*(i-o))}function rx(e){if(f_(e))return e;if(typeof e=="number"&&!isNaN(e))return new Date(e);if(typeof e=="string"){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[o,i=1,s=1]=e.split("-").map(a=>+a);return Tc(o,i-1,s)}let t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let r;if(r=e.match(q0))return ox(r)}let n=new Date(e);if(!f_(n))throw new v(2311,!1);return n}function ox(e){let n=new Date(0),t=0,r=0,o=e[8]?n.setUTCFullYear:n.setFullYear,i=e[8]?n.setUTCHours:n.setHours;e[9]&&(t=Number(e[9]+e[10]),r=Number(e[9]+e[11])),o.call(n,Number(e[1]),Number(e[2])-1,Number(e[3]));let s=Number(e[4]||0)-t,a=Number(e[5]||0)-r,c=Number(e[6]||0),l=Math.floor(parseFloat("0."+(e[7]||0))*1e3);return i.call(n,s,a,c,l),n}function f_(e){return e instanceof Date&&!isNaN(e.valueOf())}var vh=/\s+/,h_=[],ix=(()=>{class e{_ngEl;_renderer;initialClasses=h_;rawClass;stateMap=new Map;constructor(t,r){this._ngEl=t,this._renderer=r}set klass(t){this.initialClasses=t!=null?t.trim().split(vh):h_}set ngClass(t){this.rawClass=typeof t=="string"?t.trim().split(vh):t}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(let r of t)this._updateState(r,!0);else if(t!=null)for(let r of Object.keys(t))this._updateState(r,!!t[r]);this._applyStateDiff()}_updateState(t,r){let o=this.stateMap.get(t);o!==void 0?(o.enabled!==r&&(o.changed=!0,o.enabled=r),o.touched=!0):this.stateMap.set(t,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let t of this.stateMap){let r=t[0],o=t[1];o.changed?(this._toggleClass(r,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),o.touched=!1}}_toggleClass(t,r){t=t.trim(),t.length>0&&t.split(vh).forEach(o=>{r?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}static \u0275fac=function(r){return new(r||e)(D(H),D(Ne))};static \u0275dir=T({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return e})();var xc=class{$implicit;ngForOf;index;count;constructor(n,t,r,o){this.$implicit=n,this.ngForOf=t,this.index=r,this.count=o}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},S_=(()=>{class e{_viewContainer;_template;_differs;set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}_ngForOf=null;_ngForOfDirty=!0;_differ=null;_trackByFn;constructor(t,r,o){this._viewContainer=t,this._template=r,this._differs=o}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){let t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){let r=this._viewContainer;t.forEachOperation((o,i,s)=>{if(o.previousIndex==null)r.createEmbeddedView(this._template,new xc(o.item,this._ngForOf,-1,-1),s===null?void 0:s);else if(s==null)r.remove(i===null?void 0:i);else if(i!==null){let a=r.get(i);r.move(a,s),p_(a,o)}});for(let o=0,i=r.length;o{let i=r.get(o.currentIndex);p_(i,o)})}static ngTemplateContextGuard(t,r){return!0}static \u0275fac=function(r){return new(r||e)(D(Ge),D(Xe),D(vc))};static \u0275dir=T({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return e})();function p_(e,n){e.context.$implicit=n.item}var sx=(()=>{class e{_viewContainer;_context=new Ac;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(t,r){this._viewContainer=t,this._thenTemplateRef=r}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){m_(t,!1),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){m_(t,!1),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(t,r){return!0}static \u0275fac=function(r){return new(r||e)(D(Ge),D(Xe))};static \u0275dir=T({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return e})(),Ac=class{$implicit=null;ngIf=null};function m_(e,n){if(e&&!e.createEmbeddedView)throw new v(2020,!1)}var ax=(()=>{class e{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(t,r,o){this._ngEl=t,this._differs=r,this._renderer=o}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){let t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,r){let[o,i]=t.split("."),s=o.indexOf("-")===-1?void 0:Ct.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,o,i?`${r}${i}`:r,s):this._renderer.removeStyle(this._ngEl.nativeElement,o,s)}_applyChanges(t){t.forEachRemovedItem(r=>this._setStyle(r.key,null)),t.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),t.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}static \u0275fac=function(r){return new(r||e)(D(H),D(fh),D(Ne))};static \u0275dir=T({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return e})(),cx=(()=>{class e{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=f(j);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,r,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,o):!1,get:(t,r,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,o)}})}static \u0275fac=function(r){return new(r||e)(D(Ge))};static \u0275dir=T({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[$e]})}return e})();function Dh(e,n){return new v(2100,!1)}var bh=class{createSubscription(n,t,r){return Le(()=>n.subscribe({next:t,error:r}))}dispose(n){Le(()=>n.unsubscribe())}},_h=class{createSubscription(n,t,r){return n.then(o=>t?.(o),o=>r?.(o)),{unsubscribe:()=>{t=null,r=null}}}dispose(n){n.unsubscribe()}},lx=new _h,ux=new bh,dx=(()=>{class e{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=f(tn);constructor(t){this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){if(!this._obj){if(t)try{this.markForCheckOnValueUpdate=!1,this._subscribe(t)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,r=>this._updateLatestValue(t,r),r=>this.applicationErrorHandler(r))}_selectStrategy(t){if(vr(t))return lx;if(dc(t))return ux;throw Dh(e,t)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,r){t===this._obj&&(this._latestValue=r,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(r){return new(r||e)(D(kn,16))};static \u0275pipe=ki({name:"async",type:e,pure:!1})}return e})();var fx=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\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-\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\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\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\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g,hx=(()=>{class e{transform(t){return t==null?null:(px(e,t),t.replace(fx,r=>r[0].toUpperCase()+r.slice(1).toLowerCase()))}static \u0275fac=function(r){return new(r||e)};static \u0275pipe=ki({name:"titlecase",type:e,pure:!0})}return e})();function px(e,n){if(typeof n!="string")throw Dh(e,n)}var mx="mediumDate",T_=new y(""),x_=new y(""),gx=(()=>{class e{locale;defaultTimezone;defaultOptions;constructor(t,r,o){this.locale=t,this.defaultTimezone=r,this.defaultOptions=o}transform(t,r,o,i){if(t==null||t===""||t!==t)return null;try{let s=r??this.defaultOptions?.dateFormat??mx,a=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return C_(t,s,i||this.locale,a)}catch(s){throw Dh(e,s.message)}}static \u0275fac=function(r){return new(r||e)(D(Li,16),D(T_,24),D(x_,24))};static \u0275pipe=ki({name:"date",type:e,pure:!0})}return e})();var Eh=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({})}return e})();function Gi(e,n){n=encodeURIComponent(n);for(let t of e.split(";")){let r=t.indexOf("="),[o,i]=r==-1?[t,""]:[t.slice(0,r),t.slice(r+1)];if(o.trim()===n)return decodeURIComponent(i)}return null}var wr=class{};var Ch="browser";function A_(e){return e===Ch}var aW=(()=>{class e{static \u0275prov=g({token:e,providedIn:"root",factory:()=>new wh(f(F),window)})}return e})(),wh=class{document;window;offset=()=>[0,0];constructor(n,t){this.document=n,this.window=t}setOffset(n){Array.isArray(n)?this.offset=()=>n:this.offset=n}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(n,t){this.window.scrollTo(V(w({},t),{left:n[0],top:n[1]}))}scrollToAnchor(n,t){let r=yx(this.document,n);r&&(this.scrollToElement(r,t),r.focus())}setHistoryScrollRestoration(n){try{this.window.history.scrollRestoration=n}catch{console.warn(Ot(2400,!1))}}scrollToElement(n,t){let r=n.getBoundingClientRect(),o=r.left+this.window.pageXOffset,i=r.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(V(w({},t),{left:o-s[0],top:i-s[1]}))}};function yx(e,n){let t=e.getElementById(n)||e.getElementsByName(n)[0];if(t)return t;if(typeof e.createTreeWalker=="function"&&e.body&&typeof e.body.attachShadow=="function"){let r=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT),o=r.currentNode;for(;o;){let i=o.shadowRoot;if(i){let s=i.getElementById(n)||i.querySelector(`[name="${n}"]`);if(s)return s}o=r.nextNode()}}return null}var Wi=class{_doc;constructor(n){this._doc=n}manager},Nc=(()=>{class e extends Wi{constructor(t){super(t)}supports(t){return!0}addEventListener(t,r,o,i){return t.addEventListener(r,o,i),()=>this.removeEventListener(t,r,o,i)}removeEventListener(t,r,o,i){return t.removeEventListener(r,o,i)}static \u0275fac=function(r){return new(r||e)(I(F))};static \u0275prov=g({token:e,factory:e.\u0275fac})}return e})(),kc=new y(""),Th=(()=>{class e{_zone;_plugins;_eventNameToPlugin=new Map;constructor(t,r){this._zone=r,t.forEach(s=>{s.manager=this});let o=t.filter(s=>!(s instanceof Nc));this._plugins=o.slice().reverse();let i=t.find(s=>s instanceof Nc);i&&this._plugins.push(i)}addEventListener(t,r,o,i){return this._findPluginFor(r).addEventListener(t,r,o,i)}getZone(){return this._zone}_findPluginFor(t){let r=this._eventNameToPlugin.get(t);if(r)return r;if(r=this._plugins.find(i=>i.supports(t)),!r)throw new v(5101,!1);return this._eventNameToPlugin.set(t,r),r}static \u0275fac=function(r){return new(r||e)(I(kc),I(P))};static \u0275prov=g({token:e,factory:e.\u0275fac})}return e})(),Ih="ng-app-id";function N_(e){for(let n of e)n.remove()}function R_(e,n){let t=n.createElement("style");return t.textContent=e,t}function vx(e,n,t,r){let o=e.head?.querySelectorAll(`style[${Ih}="${n}"],link[${Ih}="${n}"]`);if(o)for(let i of o)i.removeAttribute(Ih),i instanceof HTMLLinkElement?r.set(i.href.slice(i.href.lastIndexOf("/")+1),{usage:0,elements:[i]}):i.textContent&&t.set(i.textContent,{usage:0,elements:[i]})}function Sh(e,n){let t=n.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",e),t}var xh=(()=>{class e{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(t,r,o,i={}){this.doc=t,this.appId=r,this.nonce=o,vx(t,r,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,r){for(let o of t)this.addUsage(o,this.inline,R_);r?.forEach(o=>this.addUsage(o,this.external,Sh))}removeStyles(t,r){for(let o of t)this.removeUsage(o,this.inline);r?.forEach(o=>this.removeUsage(o,this.external))}addUsage(t,r,o){let i=r.get(t);i?i.usage++:r.set(t,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,o(t,this.doc)))})}removeUsage(t,r){let o=r.get(t);o&&(o.usage--,o.usage<=0&&(N_(o.elements),r.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])N_(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[r,{elements:o}]of this.inline)o.push(this.addElement(t,R_(r,this.doc)));for(let[r,{elements:o}]of this.external)o.push(this.addElement(t,Sh(r,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,r){return this.nonce&&r.setAttribute("nonce",this.nonce),t.appendChild(r)}static \u0275fac=function(r){return new(r||e)(I(F),I(On),I(mo,8),I(yr))};static \u0275prov=g({token:e,factory:e.\u0275fac})}return e})(),Mh={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Ah=/%COMP%/g;var k_="%COMP%",bx=`_nghost-${k_}`,_x=`_ngcontent-${k_}`,Dx=!0,Ex=new y("",{factory:()=>Dx});function wx(e){return _x.replace(Ah,e)}function Cx(e){return bx.replace(Ah,e)}function F_(e,n){return n.map(t=>t.replace(Ah,e))}var Nh=(()=>{class e{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(t,r,o,i,s,a,c=null,l=null){this.eventManager=t,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=i,this.doc=s,this.ngZone=a,this.nonce=c,this.tracingService=l,this.defaultRenderer=new qi(t,s,a,this.tracingService)}createRenderer(t,r){if(!t||!r)return this.defaultRenderer;let o=this.getOrCreateRenderer(t,r);return o instanceof Oc?o.applyToHost(t):o instanceof Yi&&o.applyStyles(),o}getOrCreateRenderer(t,r){let o=this.rendererByCompId,i=o.get(r.id);if(!i){let s=this.doc,a=this.ngZone,c=this.eventManager,l=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,d=this.tracingService;switch(r.encapsulation){case wt.Emulated:i=new Oc(c,l,r,this.appId,u,s,a,d);break;case wt.ShadowDom:return new Rc(c,t,r,s,a,this.nonce,d,l);case wt.ExperimentalIsolatedShadowDom:return new Rc(c,t,r,s,a,this.nonce,d);default:i=new Yi(c,l,r,u,s,a,d);break}o.set(r.id,i)}return i}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(r){return new(r||e)(I(Th),I(xh),I(On),I(Ex),I(F),I(P),I(mo),I(It,8))};static \u0275prov=g({token:e,factory:e.\u0275fac})}return e})(),qi=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,t,r,o){this.eventManager=n,this.doc=t,this.ngZone=r,this.tracingService=o}destroy(){}destroyNode=null;createElement(n,t){return t?this.doc.createElementNS(Mh[t]||t,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,t){(O_(n)?n.content:n).appendChild(t)}insertBefore(n,t,r){n&&(O_(n)?n.content:n).insertBefore(t,r)}removeChild(n,t){t.remove()}selectRootElement(n,t){let r=typeof n=="string"?this.doc.querySelector(n):n;if(!r)throw new v(-5104,!1);return t||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,t,r,o){if(o){t=o+":"+t;let i=Mh[o];i?n.setAttributeNS(i,t,r):n.setAttribute(t,r)}else n.setAttribute(t,r)}removeAttribute(n,t,r){if(r){let o=Mh[r];o?n.removeAttributeNS(o,t):n.removeAttribute(`${r}:${t}`)}else n.removeAttribute(t)}addClass(n,t){n.classList.add(t)}removeClass(n,t){n.classList.remove(t)}setStyle(n,t,r,o){o&(Ct.DashCase|Ct.Important)?n.style.setProperty(t,r,o&Ct.Important?"important":""):n.style[t]=r}removeStyle(n,t,r){r&Ct.DashCase?n.style.removeProperty(t):n.style[t]=""}setProperty(n,t,r){n!=null&&(n[t]=r)}setValue(n,t){n.nodeValue=t}listen(n,t,r,o){if(typeof n=="string"&&(n=et().getGlobalEventTarget(this.doc,n),!n))throw new v(5102,!1);let i=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(i=this.tracingService.wrapEventListener(n,t,i)),this.eventManager.addEventListener(n,t,i,o)}decoratePreventDefault(n){return t=>{if(t==="__ngUnwrap__")return n;n(t)===!1&&t.preventDefault()}}};function O_(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var Rc=class extends qi{hostEl;sharedStylesHost;shadowRoot;constructor(n,t,r,o,i,s,a,c){super(n,o,i,a),this.hostEl=t,this.sharedStylesHost=c,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=r.styles;l=F_(r.id,l);for(let d of l){let p=document.createElement("style");s&&p.setAttribute("nonce",s),p.textContent=d,this.shadowRoot.appendChild(p)}let u=r.getExternalStyles?.();if(u)for(let d of u){let p=Sh(d,o);s&&p.setAttribute("nonce",s),this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,t){return super.appendChild(this.nodeOrShadowRoot(n),t)}insertBefore(n,t,r){return super.insertBefore(this.nodeOrShadowRoot(n),t,r)}removeChild(n,t){return super.removeChild(null,t)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},Yi=class extends qi{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,t,r,o,i,s,a,c){super(n,i,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=o;let l=r.styles;this.styles=c?F_(c,l):l,this.styleUrls=r.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&mr.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Oc=class extends Yi{contentAttr;hostAttr;constructor(n,t,r,o,i,s,a,c){let l=o+"-"+r.id;super(n,t,r,i,s,a,c,l),this.contentAttr=wx(l),this.hostAttr=Cx(l)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,t){let r=super.createElement(n,t);return super.setAttribute(r,this.contentAttr,""),r}};var Fc=class e extends Bi{supportsDOMEvents=!0;static makeCurrent(){ph(new e)}onAndCancel(n,t,r,o){return n.addEventListener(t,r,o),()=>{n.removeEventListener(t,r,o)}}dispatchEvent(n,t){n.dispatchEvent(t)}remove(n){n.remove()}createElement(n,t){return t=t||this.getDefaultDocument(),t.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,t){return t==="window"?window:t==="document"?n:t==="body"?n.body:null}getBaseHref(n){let t=Ix();return t==null?null:Mx(t)}resetBaseElement(){Zi=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return Gi(document.cookie,n)}},Zi=null;function Ix(){return Zi=Zi||document.head.querySelector("base"),Zi?Zi.getAttribute("href"):null}function Mx(e){return new URL(e,document.baseURI).pathname}var Pc=class{addToWindow(n){ue.getAngularTestability=(r,o=!0)=>{let i=n.findTestabilityInTree(r,o);if(i==null)throw new v(5103,!1);return i},ue.getAllAngularTestabilities=()=>n.getAllTestabilities(),ue.getAllAngularRootElements=()=>n.getAllRootElements();let t=r=>{let o=ue.getAllAngularTestabilities(),i=o.length,s=function(){i--,i==0&&r()};o.forEach(a=>{a.whenStable(s)})};ue.frameworkStabilizers||(ue.frameworkStabilizers=[]),ue.frameworkStabilizers.push(t)}findTestabilityInTree(n,t,r){if(t==null)return null;let o=n.getTestability(t);return o??(r?et().isShadowRoot(t)?this.findTestabilityInTree(n,t.host,!0):this.findTestabilityInTree(n,t.parentElement,!0):null)}},Sx=(()=>{class e{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac})}return e})(),P_=["alt","control","meta","shift"],Tx={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},xx={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},L_=(()=>{class e extends Wi{constructor(t){super(t)}supports(t){return e.parseEventName(t)!=null}addEventListener(t,r,o,i){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>et().onAndCancel(t,s.domEventName,a,i))}static parseEventName(t){let r=t.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let i=e._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),P_.forEach(l=>{let u=r.indexOf(l);u>-1&&(r.splice(u,1),s+=l+".")}),s+=i,r.length!=0||i.length===0)return null;let c={};return c.domEventName=o,c.fullKey=s,c}static matchEventFullKeyCode(t,r){let o=Tx[t.key]||t.key,i="";return r.indexOf("code.")>-1&&(o=t.code,i="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),P_.forEach(s=>{if(s!==o){let a=xx[s];a(t)&&(i+=s+".")}}),i+=o,i===r)}static eventCallback(t,r,o){return i=>{e.matchEventFullKeyCode(i,t)&&o.runGuarded(()=>r(i))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(r){return new(r||e)(I(F))};static \u0275prov=g({token:e,factory:e.\u0275fac})}return e})();async function Ax(e,n,t){let r=w({rootComponent:e},Nx(n,t));return i_(r)}function Nx(e,n){return{platformRef:n?.platformRef,appProviders:[...V_,...e?.providers??[]],platformProviders:Fx}}function Rx(){Fc.makeCurrent()}function Ox(){return new nt}function kx(){return cf(document),document}var Fx=[{provide:yr,useValue:Ch},{provide:Za,useValue:Rx,multi:!0},{provide:F,useFactory:kx}];var Px=[{provide:uc,useClass:Pc},{provide:lc,useClass:Fi},{provide:Fi,useClass:Fi}],V_=[{provide:si,useValue:"root"},{provide:nt,useFactory:Ox},{provide:kc,useClass:Nc,multi:!0},{provide:kc,useClass:L_,multi:!0},Nh,xh,Th,{provide:De,useExisting:Nh},{provide:wr,useClass:Sx},[]],Lx=(()=>{class e{constructor(){}static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({providers:[...V_,...Px],imports:[Eh,o_]})}return e})();var Pn=class e{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(n){n?typeof n=="string"?this.lazyInit=()=>{this.headers=new Map,n.split(` -`).forEach(t=>{let r=t.indexOf(":");if(r>0){let o=t.slice(0,r),i=t.slice(r+1).trim();this.addHeaderEntry(o,i)}})}:typeof Headers<"u"&&n instanceof Headers?(this.headers=new Map,n.forEach((t,r)=>{this.addHeaderEntry(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(n).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();let t=this.headers.get(n.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,t){return this.clone({name:n,value:t,op:"a"})}set(n,t){return this.clone({name:n,value:t,op:"s"})}delete(n,t){return this.clone({name:n,value:t,op:"d"})}maybeSetNormalizedName(n,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,n)}init(){this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(t=>{this.headers.set(t,n.headers.get(t)),this.normalizedNames.set(t,n.normalizedNames.get(t))})}clone(n){let t=new e;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([n]),t}applyUpdate(n){let t=n.name.toLowerCase();switch(n.op){case"a":case"s":let r=n.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(n.name,t);let o=(n.op==="a"?this.headers.get(t):void 0)||[];o.push(...r),this.headers.set(t,o);break;case"d":let i=n.value;if(!i)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>i.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}addHeaderEntry(n,t){let r=n.toLowerCase();this.maybeSetNormalizedName(n,r),this.headers.has(r)?this.headers.get(r).push(t):this.headers.set(r,[t])}setHeaderEntries(n,t){let r=(Array.isArray(t)?t:[t]).map(i=>i.toString()),o=n.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(n,o)}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>n(this.normalizedNames.get(t),this.headers.get(t)))}};var Vc=class{map=new Map;set(n,t){return this.map.set(n,t),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}},jc=class{encodeKey(n){return j_(n)}encodeValue(n){return j_(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}};function Vx(e,n){let t=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(o=>{let i=o.indexOf("="),[s,a]=i==-1?[n.decodeKey(o),""]:[n.decodeKey(o.slice(0,i)),n.decodeValue(o.slice(i+1))],c=t.get(s)||[];c.push(a),t.set(s,c)}),t}var jx=/%(\d[a-f0-9])/gi,Bx={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function j_(e){return encodeURIComponent(e).replace(jx,(n,t)=>Bx[t]??n)}function Lc(e){return`${e}`}var fn=class e{map;encoder;updates=null;cloneFrom=null;constructor(n={}){if(this.encoder=n.encoder||new jc,n.fromString){if(n.fromObject)throw new v(2805,!1);this.map=Vx(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(t=>{let r=n.fromObject[t],o=Array.isArray(r)?r.map(Lc):[Lc(r)];this.map.set(t,o)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();let t=this.map.get(n);return t?t[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,t){return this.clone({param:n,value:t,op:"a"})}appendAll(n){let t=[];return Object.keys(n).forEach(r=>{let o=n[r];Array.isArray(o)?o.forEach(i=>{t.push({param:r,value:i,op:"a"})}):t.push({param:r,value:o,op:"a"})}),this.clone(t)}set(n,t){return this.clone({param:n,value:t,op:"s"})}delete(n,t){return this.clone({param:n,value:t,op:"d"})}toString(){return this.init(),this.keys().map(n=>{let t=this.encoder.encodeKey(n);return this.map.get(n).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(n=>n!=="").join("&")}clone(n){let t=new e({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(n),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":let t=(n.op==="a"?this.map.get(n.param):void 0)||[];t.push(Lc(n.value)),this.map.set(n.param,t);break;case"d":if(n.value!==void 0){let r=this.map.get(n.param)||[],o=r.indexOf(Lc(n.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(n.param,r):this.map.delete(n.param)}else{this.map.delete(n.param);break}}}),this.cloneFrom=this.updates=null)}};function Hx(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function B_(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function H_(e){return typeof Blob<"u"&&e instanceof Blob}function U_(e){return typeof FormData<"u"&&e instanceof FormData}function Ux(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}var $_="Content-Type",z_="Accept",W_="text/plain",q_="application/json",$x=`${q_}, ${W_}, */*`,_o=class e{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(n,t,r,o){this.url=t,this.method=n.toUpperCase();let i;if(Hx(this.method)||o?(this.body=r!==void 0?r:null,i=o):i=r,i){if(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,this.keepalive=!!i.keepalive,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params),i.priority&&(this.priority=i.priority),i.cache&&(this.cache=i.cache),i.credentials&&(this.credentials=i.credentials),typeof i.timeout=="number"){if(i.timeout<1||!Number.isInteger(i.timeout))throw new v(2822,"");this.timeout=i.timeout}i.mode&&(this.mode=i.mode),i.redirect&&(this.redirect=i.redirect),i.integrity&&(this.integrity=i.integrity),i.referrer&&(this.referrer=i.referrer),i.referrerPolicy&&(this.referrerPolicy=i.referrerPolicy),this.transferCache=i.transferCache}if(this.headers??=new Pn,this.context??=new Vc,!this.params)this.params=new fn,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),c=a===-1?"?":aPo.set(Bn,n.setHeaders[Bn]),qe)),n.setParams&&(_e=Object.keys(n.setParams).reduce((Po,Bn)=>Po.set(Bn,n.setParams[Bn]),_e)),new e(t,r,_,{params:_e,headers:qe,context:Fo,reportProgress:ne,responseType:o,withCredentials:C,transferCache:m,keepalive:i,cache:a,priority:s,timeout:b,mode:c,redirect:l,credentials:u,referrer:d,integrity:p,referrerPolicy:h})}},Cr=(function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e})(Cr||{}),Eo=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(n,t=200,r="OK"){this.headers=n.headers||new Pn,this.status=n.status!==void 0?n.status:t,this.statusText=n.statusText||r,this.url=n.url||null,this.redirected=n.redirected,this.responseType=n.responseType,this.ok=this.status>=200&&this.status<300}},Bc=class e extends Eo{constructor(n={}){super(n)}type=Cr.ResponseHeader;clone(n={}){return new e({headers:n.headers||this.headers,status:n.status!==void 0?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}},Ki=class e extends Eo{body;constructor(n={}){super(n),this.body=n.body!==void 0?n.body:null}type=Cr.Response;clone(n={}){return new e({body:n.body!==void 0?n.body:this.body,headers:n.headers||this.headers,status:n.status!==void 0?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0,redirected:n.redirected??this.redirected,responseType:n.responseType??this.responseType})}},Do=class extends Eo{name="HttpErrorResponse";message;error;ok=!1;constructor(n){super(n,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${n.url||"(unknown url)"}`:this.message=`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}},zx=200,Gx=204;var Wx=new y("");var qx=/^\)\]\}',?\n/;var Oh=(()=>{class e{xhrFactory;tracingService=f(It,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new v(-2800,!1);let r=this.xhrFactory;return Be(null).pipe(Gs(()=>new k(i=>{let s=r.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((_,C)=>s.setRequestHeader(_,C.join(","))),t.headers.has(z_)||s.setRequestHeader(z_,$x),!t.headers.has($_)){let _=t.detectContentTypeHeader();_!==null&&s.setRequestHeader($_,_)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let _=t.responseType.toLowerCase();s.responseType=_!=="json"?_:"text"}let a=t.serializeBody(),c=null,l=()=>{if(c!==null)return c;let _=s.statusText||"OK",C=new Pn(s.getAllResponseHeaders()),ne=s.responseURL||t.url;return c=new Bc({headers:C,status:s.status,statusText:_,url:ne}),c},u=this.maybePropagateTrace(()=>{let{headers:_,status:C,statusText:ne,url:qe}=l(),_e=null;C!==Gx&&(_e=typeof s.response>"u"?s.responseText:s.response),C===0&&(C=_e?zx:0);let Fo=C>=200&&C<300;if(t.responseType==="json"&&typeof _e=="string"){let Po=_e;_e=_e.replace(qx,"");try{_e=_e!==""?JSON.parse(_e):null}catch(Bn){_e=Po,Fo&&(Fo=!1,_e={error:Bn,text:_e})}}Fo?(i.next(new Ki({body:_e,headers:_,status:C,statusText:ne,url:qe||void 0})),i.complete()):i.error(new Do({error:_e,headers:_,status:C,statusText:ne,url:qe||void 0}))}),d=this.maybePropagateTrace(_=>{let{url:C}=l(),ne=new Do({error:_,status:s.status||0,statusText:s.statusText||"Unknown Error",url:C||void 0});i.error(ne)}),p=d;t.timeout&&(p=this.maybePropagateTrace(_=>{let{url:C}=l(),ne=new Do({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:C||void 0});i.error(ne)}));let h=!1,m=this.maybePropagateTrace(_=>{h||(i.next(l()),h=!0);let C={type:Cr.DownloadProgress,loaded:_.loaded};_.lengthComputable&&(C.total=_.total),t.responseType==="text"&&s.responseText&&(C.partialText=s.responseText),i.next(C)}),b=this.maybePropagateTrace(_=>{let C={type:Cr.UploadProgress,loaded:_.loaded};_.lengthComputable&&(C.total=_.total),i.next(C)});return s.addEventListener("load",u),s.addEventListener("error",d),s.addEventListener("timeout",p),s.addEventListener("abort",d),t.reportProgress&&(s.addEventListener("progress",m),a!==null&&s.upload&&s.upload.addEventListener("progress",b)),s.send(a),i.next({type:Cr.Sent}),()=>{s.removeEventListener("error",d),s.removeEventListener("abort",d),s.removeEventListener("load",u),s.removeEventListener("timeout",p),t.reportProgress&&(s.removeEventListener("progress",m),a!==null&&s.upload&&s.upload.removeEventListener("progress",b)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(r){return new(r||e)(I(wr))};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Y_(e,n){return n(e)}function Yx(e,n){return(t,r)=>n.intercept(t,{handle:o=>e(o,r)})}function Zx(e,n,t){return(r,o)=>Kr(t,()=>n(r,i=>e(i,o)))}var Z_=new y(""),kh=new y("",{factory:()=>[]}),K_=new y(""),Fh=new y("",{factory:()=>!0});function Kx(){let e=null;return(n,t)=>{e===null&&(e=(f(Z_,{optional:!0})??[]).reduceRight(Yx,Y_));let r=f(oo);if(f(Fh)){let i=r.add();return e(n,t).pipe(zs(i))}else return e(n,t)}}var Ph=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=I(Oh),o},providedIn:"root"})}return e})();var Hc=(()=>{class e{backend;injector;chain=null;pendingTasks=f(oo);contributeToStability=f(Fh);constructor(t,r){this.backend=t,this.injector=r}handle(t){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(kh),...this.injector.get(K_,[])]));this.chain=r.reduceRight((o,i)=>Zx(o,i,this.injector),Y_)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(t,o=>this.backend.handle(o)).pipe(zs(r))}else return this.chain(t,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||e)(I(Ph),I(le))};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Lh=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=I(Hc),o},providedIn:"root"})}return e})();function Rh(e,n){return{body:n,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,credentials:e.credentials,transferCache:e.transferCache,timeout:e.timeout,keepalive:e.keepalive,priority:e.priority,cache:e.cache,mode:e.mode,redirect:e.redirect,integrity:e.integrity,referrer:e.referrer,referrerPolicy:e.referrerPolicy}}var Uc=(()=>{class e{handler;constructor(t){this.handler=t}request(t,r,o={}){let i;if(t instanceof _o)i=t;else{let c;o.headers instanceof Pn?c=o.headers:c=new Pn(o.headers);let l;o.params&&(o.params instanceof fn?l=o.params:l=new fn({fromObject:o.params})),i=new _o(t,r,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:l,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,referrerPolicy:o.referrerPolicy,integrity:o.integrity,timeout:o.timeout})}let s=Be(i).pipe(zl(c=>this.handler.handle(c)));if(t instanceof _o||o.observe==="events")return s;let a=s.pipe(we(c=>c instanceof Ki));switch(o.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return a.pipe(re(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new v(2806,!1);return c.body}));case"blob":return a.pipe(re(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new v(2807,!1);return c.body}));case"text":return a.pipe(re(c=>{if(c.body!==null&&typeof c.body!="string")throw new v(2808,!1);return c.body}));default:return a.pipe(re(c=>c.body))}case"response":return a;default:throw new v(2809,!1)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:new fn().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,o={}){return this.request("PATCH",t,Rh(o,r))}post(t,r,o={}){return this.request("POST",t,Rh(o,r))}put(t,r,o={}){return this.request("PUT",t,Rh(o,r))}static \u0275fac=function(r){return new(r||e)(I(Lh))};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Xx=new y("",{factory:()=>!0}),Qx="XSRF-TOKEN",Jx=new y("",{factory:()=>Qx}),eA="X-XSRF-TOKEN",tA=new y("",{factory:()=>eA}),nA=(()=>{class e{cookieName=f(Jx);doc=f(F);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Gi(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),X_=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=I(nA),o},providedIn:"root"})}return e})();function rA(e,n){if(!f(Xx)||e.method==="GET"||e.method==="HEAD")return n(e);try{let o=f(Fn).href,{origin:i}=new URL(o),{origin:s}=new URL(e.url,i);if(i!==s)return n(e)}catch{return n(e)}let t=f(X_).getToken(),r=f(tA);return t!=null&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,t)})),n(e)}var Vh=(function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e})(Vh||{});function oA(e,n){return{\u0275kind:e,\u0275providers:n}}function Q_(...e){let n=[Uc,Hc,{provide:Lh,useExisting:Hc},{provide:Ph,useFactory:()=>f(Wx,{optional:!0})??f(Oh)},{provide:kh,useValue:rA,multi:!0}];for(let t of e)n.push(...t.\u0275providers);return or(n)}var G_=new y("");function J_(){return oA(Vh.LegacyInterceptors,[{provide:G_,useFactory:Kx},{provide:kh,useExisting:G_,multi:!0}])}var iA=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({providers:[Q_(J_())]})}return e})();var E3=(()=>{class e{_doc;constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}static \u0275fac=function(r){return new(r||e)(I(F))};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function aA(e,n){if(typeof COMPILED>"u"||!COMPILED){let t=ue.ng=ue.ng||{};t[e]=n}}var jh=class{msPerTick;numTicks;constructor(n,t){this.msPerTick=n,this.numTicks=t}},Bh=class{appRef;constructor(n){this.appRef=n.injector.get(Fe)}timeChangeDetection(n){let t=n&&n.record,r="Change Detection";t&&"profile"in console&&typeof console.profile=="function"&&console.profile(r);let o=performance.now(),i=0;for(;i<5||performance.now()-o<500;)this.appRef.tick(),i++;let s=performance.now();t&&"profileEnd"in console&&typeof console.profileEnd=="function"&&console.profileEnd(r);let a=(s-o)/i;return console.log(`ran ${i} change detection cycles`),console.log(`${a.toFixed(2)} ms per check`),new jh(a,i)}},cA="profiler";function w3(e){return aA(cA,new Bh(e)),e}var Hh=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=I(lA),o},providedIn:"root"})}return e})(),lA=(()=>{class e extends Hh{_doc;constructor(t){super(),this._doc=t}sanitize(t,r){if(r==null)return null;switch(t){case ze.NONE:return r;case ze.HTML:return Ht(r,"HTML")?Qe(r):Qa(this._doc,String(r)).toString();case ze.STYLE:return Ht(r,"Style")?Qe(r):r;case ze.SCRIPT:if(Ht(r,"Script"))return Qe(r);throw new v(5200,!1);case ze.URL:return Ht(r,"URL")?Qe(r):Ti(String(r));case ze.RESOURCE_URL:if(Ht(r,"ResourceURL"))return Qe(r);throw new v(5201,!1);default:throw new v(5202,!1)}}bypassSecurityTrustHtml(t){return uf(t)}bypassSecurityTrustStyle(t){return df(t)}bypassSecurityTrustScript(t){return ff(t)}bypassSecurityTrustUrl(t){return hf(t)}bypassSecurityTrustResourceUrl(t){return pf(t)}static \u0275fac=function(r){return new(r||e)(I(F))};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Xi(e){return e.buttons===0||e.detail===0}function Qi(e){let n=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!n&&n.identifier===-1&&(n.radiusX==null||n.radiusX===1)&&(n.radiusY==null||n.radiusY===1)}var Uh;function eD(){if(Uh==null){let e=typeof document<"u"?document.head:null;Uh=!!(e&&(e.createShadowRoot||e.attachShadow))}return Uh}function $h(e){if(eD()){let n=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&n instanceof ShadowRoot)return n}return null}function uA(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let n=e.shadowRoot.activeElement;if(n===e)break;e=n}return e}function Ve(e){return e.composedPath?e.composedPath()[0]:e.target}var zh;try{zh=typeof Intl<"u"&&Intl.v8BreakIterator}catch{zh=!1}var oe=(()=>{class e{_platformId=f(yr);isBrowser=this._platformId?A_(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||zh)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Ji;function tD(){if(Ji==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Ji=!0}))}finally{Ji=Ji||!1}return Ji}function wo(e){return tD()?e:!!e.capture}function Ir(e,n=0){return nD(e)?Number(e):arguments.length===2?n:0}function nD(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function ct(e){return e instanceof H?e.nativeElement:e}var rD=new y("cdk-input-modality-detector-options"),oD={ignoreKeys:[18,17,224,91,16]},iD=650,Gh={passive:!0,capture:!0},sD=(()=>{class e{_platform=f(oe);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Wn(null);_options;_lastTouchMs=0;_onKeydown=t=>{this._options?.ignoreKeys?.some(r=>r===t.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Ve(t))};_onMousedown=t=>{Date.now()-this._lastTouchMs{if(Qi(t)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Ve(t)};constructor(){let t=f(P),r=f(F),o=f(rD,{optional:!0});if(this._options=w(w({},oD),o),this.modalityDetected=this._modality.pipe(Go(1)),this.modalityChanged=this.modalityDetected.pipe(Hr()),this._platform.isBrowser){let i=f(De).createRenderer(null,null);this._listenerCleanups=t.runOutsideAngular(()=>[i.listen(r,"keydown",this._onKeydown,Gh),i.listen(r,"mousedown",this._onMousedown,Gh),i.listen(r,"touchstart",this._onTouchstart,Gh)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(t=>t())}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),es=(function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e})(es||{}),aD=new y("cdk-focus-monitor-default-options"),$c=wo({passive:!0,capture:!0}),zc=(()=>{class e{_ngZone=f(P);_platform=f(oe);_inputModalityDetector=f(sD);_origin=null;_lastFocusOrigin=null;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=f(F);_stopInputModalityDetector=new N;constructor(){let t=f(aD,{optional:!0});this._detectionMode=t?.detectionMode||es.IMMEDIATE}_rootNodeFocusAndBlurListener=t=>{let r=Ve(t);for(let o=r;o;o=o.parentElement)t.type==="focus"?this._onFocus(t,o):this._onBlur(t,o)};monitor(t,r=!1){let o=ct(t);if(!this._platform.isBrowser||o.nodeType!==1)return Be();let i=$h(o)||this._document,s=this._elementInfo.get(o);if(s)return r&&(s.checkChildren=!0),s.subject;let a={checkChildren:r,subject:new N,rootNode:i};return this._elementInfo.set(o,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(t){let r=ct(t),o=this._elementInfo.get(r);o&&(o.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(o))}focusVia(t,r,o){let i=ct(t),s=this._document.activeElement;i===s?this._getClosestElementsInfo(i).forEach(([a,c])=>this._originChanged(a,r,c)):(this._setOrigin(r),typeof i.focus=="function"&&i.focus(o))}ngOnDestroy(){this._elementInfo.forEach((t,r)=>this.stopMonitoring(r))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===es.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,r){t.classList.toggle("cdk-focused",!!r),t.classList.toggle("cdk-touch-focused",r==="touch"),t.classList.toggle("cdk-keyboard-focused",r==="keyboard"),t.classList.toggle("cdk-mouse-focused",r==="mouse"),t.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(t,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=t,this._originFromTouchInteraction=t==="touch"&&r,this._detectionMode===es.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?iD:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(t,r){let o=this._elementInfo.get(r),i=Ve(t);!o||!o.checkChildren&&r!==i||this._originChanged(r,this._getFocusOrigin(i),o)}_onBlur(t,r){let o=this._elementInfo.get(r);!o||o.checkChildren&&t.relatedTarget instanceof Node&&r.contains(t.relatedTarget)||(this._setClasses(r),this._emitOrigin(o,null))}_emitOrigin(t,r){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(r))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;let r=t.rootNode,o=this._rootNodeFocusListenerCount.get(r)||0;o||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,$c),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,$c)}),this._rootNodeFocusListenerCount.set(r,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(qt(this._stopInputModalityDetector)).subscribe(i=>{this._setOrigin(i,!0)}))}_removeGlobalListeners(t){let r=t.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let o=this._rootNodeFocusListenerCount.get(r);o>1?this._rootNodeFocusListenerCount.set(r,o-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,$c),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,$c),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,r,o){this._setClasses(t,r),this._emitOrigin(o,r),this._lastFocusOrigin=r}_getClosestElementsInfo(t){let r=[];return this._elementInfo.forEach((o,i)=>{(i===t||o.checkChildren&&i.contains(t))&&r.push([i,o])}),r}_isLastInteractionFromInputLabel(t){let{_mostRecentTarget:r,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!r||r===t||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA"||t.disabled)return!1;let i=t.labels;if(i){for(let s=0;s{class e{_elementRef=f(H);_focusMonitor=f(zc);_monitorSubscription;_focusOrigin=null;cdkFocusChange=new U;constructor(){}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let t=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(t,t.nodeType===1&&t.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(r=>{this._focusOrigin=r,this.cdkFocusChange.emit(r)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]})}return e})();var Gc=new WeakMap,lt=(()=>{class e{_appRef;_injector=f(j);_environmentInjector=f(le);load(t){let r=this._appRef=this._appRef||this._injector.get(Fe),o=Gc.get(r);o||(o={loaders:new Set,refs:[]},Gc.set(r,o),r.onDestroy(()=>{Gc.get(r)?.refs.forEach(i=>i.destroy()),Gc.delete(r)})),o.loaders.has(t)||(o.loaders.add(t),o.refs.push(bc(t,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var qc=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,o){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0} -`],encapsulation:2,changeDetection:0})}return e})(),Wc;function fA(){if(Wc===void 0&&(Wc=null,typeof window<"u")){let e=window;e.trustedTypes!==void 0&&(Wc=e.trustedTypes.createPolicy("angular#components",{createHTML:n=>n}))}return Wc}function hA(e){return fA()?.createHTML(e)||e}function cD(e,n,t){let r=t.sanitize(ze.HTML,n);e.innerHTML=hA(r||"")}function Mr(e){return Array.isArray(e)?e:[e]}var lD=new Set,Sr,Yc=(()=>{class e{_platform=f(oe);_nonce=f(mo,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):mA}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&pA(t,this._nonce),this._matchMedia(t)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function pA(e,n){if(!lD.has(e))try{Sr||(Sr=document.createElement("style"),n&&Sr.setAttribute("nonce",n),Sr.setAttribute("type","text/css"),document.head.appendChild(Sr)),Sr.sheet&&(Sr.sheet.insertRule(`@media ${e} {body{ }}`,0),lD.add(e))}catch(t){console.error(t)}}function mA(e){return{matches:e==="all"||e==="",media:e,addListener:()=>{},removeListener:()=>{}}}var Wh=(()=>{class e{_mediaMatcher=f(Yc);_zone=f(P);_queries=new Map;_destroySubject=new N;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return uD(Mr(t)).some(o=>this._registerQuery(o).mql.matches)}observe(t){let o=uD(Mr(t)).map(s=>this._registerQuery(s).observable),i=Bl(o);return i=bn(i.pipe(pt(1)),i.pipe(Go(1),Zn(0))),i.pipe(re(s=>{let a={matches:!1,breakpoints:{}};return s.forEach(({matches:c,query:l})=>{a.matches=a.matches||c,a.breakpoints[l]=c}),a}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);let r=this._mediaMatcher.matchMedia(t),i={observable:new k(s=>{let a=c=>this._zone.run(()=>s.next(c));return r.addListener(a),()=>{r.removeListener(a)}}).pipe(Wo(r),re(({matches:s})=>({query:t,matches:s})),qt(this._destroySubject)),mql:r};return this._queries.set(t,i),i}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function uD(e){return e.map(n=>n.split(",")).reduce((n,t)=>n.concat(t)).map(n=>n.trim())}function gA(e){if(e.type==="characterData"&&e.target instanceof Comment)return!0;if(e.type==="childList"){for(let n=0;n{class e{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),fD=(()=>{class e{_mutationObserverFactory=f(dD);_observedElements=new Map;_ngZone=f(P);constructor(){}ngOnDestroy(){this._observedElements.forEach((t,r)=>this._cleanupObserver(r))}observe(t){let r=ct(t);return new k(o=>{let s=this._observeElement(r).pipe(re(a=>a.filter(c=>!gA(c))),we(a=>!!a.length)).subscribe(a=>{this._ngZone.run(()=>{o.next(a)})});return()=>{s.unsubscribe(),this._unobserveElement(r)}})}_observeElement(t){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(t))this._observedElements.get(t).count++;else{let r=new N,o=this._mutationObserverFactory.create(i=>r.next(i));o&&o.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:o,stream:r,count:1})}return this._observedElements.get(t).stream})}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){let{observer:r,stream:o}=this._observedElements.get(t);r&&r.disconnect(),o.complete(),this._observedElements.delete(t)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),I4=(()=>{class e{_contentObserver=f(fD);_elementRef=f(H);event=new U;get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._disabled?this._unsubscribe():this._subscribe()}_disabled=!1;get debounce(){return this._debounce}set debounce(t){this._debounce=Ir(t),this._subscribe()}_debounce;_currentSubscription=null;constructor(){}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let t=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?t.pipe(Zn(this.debounce)):t).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",ce],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return e})(),hD=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({providers:[dD]})}return e})();var yA=(()=>{class e{_platform=f(oe);constructor(){}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return bA(t)&&getComputedStyle(t).visibility==="visible"}isTabbable(t){if(!this._platform.isBrowser)return!1;let r=vA(SA(t));if(r&&(pD(r)===-1||!this.isVisible(r)))return!1;let o=t.nodeName.toLowerCase(),i=pD(t);return t.hasAttribute("contenteditable")?i!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!IA(t)?!1:o==="audio"?t.hasAttribute("controls")?i!==-1:!1:o==="video"?i===-1?!1:i!==null?!0:this._platform.FIREFOX||t.hasAttribute("controls"):t.tabIndex>=0}isFocusable(t,r){return MA(t)&&!this.isDisabled(t)&&(r?.ignoreVisibility||this.isVisible(t))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function vA(e){try{return e.frameElement}catch{return null}}function bA(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function _A(e){let n=e.nodeName.toLowerCase();return n==="input"||n==="select"||n==="button"||n==="textarea"}function DA(e){return wA(e)&&e.type=="hidden"}function EA(e){return CA(e)&&e.hasAttribute("href")}function wA(e){return e.nodeName.toLowerCase()=="input"}function CA(e){return e.nodeName.toLowerCase()=="a"}function yD(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let n=e.getAttribute("tabindex");return!!(n&&!isNaN(parseInt(n,10)))}function pD(e){if(!yD(e))return null;let n=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(n)?-1:n}function IA(e){let n=e.nodeName.toLowerCase(),t=n==="input"&&e.type;return t==="text"||t==="password"||n==="select"||n==="textarea"}function MA(e){return DA(e)?!1:_A(e)||EA(e)||e.hasAttribute("contenteditable")||yD(e)}function SA(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var Yh=class{_element;_checker;_ngZone;_document;_injector;_startAnchor=null;_endAnchor=null;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(n){this._enabled=n,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_enabled=!0;constructor(n,t,r,o,i=!1,s){this._element=n,this._checker=t,this._ngZone=r,this._document=o,this._injector=s,i||this.attachAnchors()}destroy(){let n=this._startAnchor,t=this._endAnchor;n&&(n.removeEventListener("focus",this.startAnchorListener),n.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(n)))})}focusFirstTabbableElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(n)))})}focusLastTabbableElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(n)))})}_getRegionBoundary(n){let t=this._element.querySelectorAll(`[cdk-focus-region-${n}], [cdkFocusRegion${n}], [cdk-focus-${n}]`);return n=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(n){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let r=this._getFirstTabbableElement(t);return r?.focus(n),!!r}return t.focus(n),!0}return this.focusFirstTabbableElement(n)}focusFirstTabbableElement(n){let t=this._getRegionBoundary("start");return t&&t.focus(n),!!t}focusLastTabbableElement(n){let t=this._getRegionBoundary("end");return t&&t.focus(n),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(n){if(this._checker.isFocusable(n)&&this._checker.isTabbable(n))return n;let t=n.children;for(let r=0;r=0;r--){let o=t[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[r]):null;if(o)return o}return null}_createAnchor(){let n=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,n),n.classList.add("cdk-visually-hidden"),n.classList.add("cdk-focus-trap-anchor"),n.setAttribute("aria-hidden","true"),n}_toggleAnchorTabIndex(n,t){n?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(n){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_executeOnStable(n){this._injector?Ut(n,{injector:this._injector}):setTimeout(n)}},TA=(()=>{class e{_checker=f(yA);_ngZone=f(P);_document=f(F);_injector=f(j);constructor(){f(lt).load(qc)}create(t,r=!1){return new Yh(t,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var vD=new y("liveAnnouncerElement",{providedIn:"root",factory:()=>null}),bD=new y("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),xA=0,AA=(()=>{class e{_ngZone=f(P);_defaultOptions=f(bD,{optional:!0});_liveElement;_document=f(F);_sanitizer=f(Hh);_previousTimeout;_currentPromise;_currentResolve;constructor(){let t=f(vD,{optional:!0});this._liveElement=t||this._createLiveElement()}announce(t,...r){let o=this._defaultOptions,i,s;return r.length===1&&typeof r[0]=="number"?s=r[0]:[i,s]=r,this.clear(),clearTimeout(this._previousTimeout),i||(i=o&&o.politeness?o.politeness:"polite"),s==null&&o&&(s=o.duration),this._liveElement.setAttribute("aria-live",i),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{!t||typeof t=="string"?this._liveElement.textContent=t:cD(this._liveElement,t,this._sanitizer),typeof s=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let t="cdk-live-announcer-element",r=this._document.getElementsByClassName(t),o=this._document.createElement("div");for(let i=0;i .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{class e{_platform=f(oe);_hasCheckedHighContrastMode=!1;_document=f(F);_breakpointSubscription;constructor(){this._breakpointSubscription=f(Wh).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return Ln.NONE;let t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);let r=this._document.defaultView||window,o=r&&r.getComputedStyle?r.getComputedStyle(t):null,i=(o&&o.backgroundColor||"").replace(/ /g,"");switch(t.remove(),i){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return Ln.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return Ln.BLACK_ON_WHITE}return Ln.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let t=this._document.body.classList;t.remove(qh,mD,gD),this._hasCheckedHighContrastMode=!0;let r=this.getHighContrastMode();r===Ln.BLACK_ON_WHITE?t.add(qh,mD):r===Ln.WHITE_ON_BLACK&&t.add(qh,gD)}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),NA=(()=>{class e{constructor(){f(_D)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({imports:[hD]})}return e})();var Zh={},ts=class e{_appId=f(On);static _infix=`a${Math.floor(Math.random()*1e5).toString()}`;getId(n,t=!1){return this._appId!=="ng"&&(n+=this._appId),Zh.hasOwnProperty(n)||(Zh[n]=0),`${n}${t?e._infix+"-":""}${Zh[n]++}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})};var RA=200,Co=class{_letterKeyStream=new N;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new N;selectedItem=this._selectedItem;constructor(n,t){let r=typeof t?.debounceInterval=="number"?t.debounceInterval:RA;t?.skipPredicate&&(this._skipPredicateFn=t.skipPredicate),this.setItems(n),this._setupKeyHandler(r)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(n){this._selectedItemIndex=n}setItems(n){this._items=n}handleKey(n){let t=n.keyCode;n.key&&n.key.length===1?this._letterKeyStream.next(n.key.toLocaleUpperCase()):(t>=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(n){this._letterKeyStream.pipe(Kl(t=>this._pressedLetters.push(t)),Zn(n),we(()=>this._pressedLetters.length>0),re(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(t=>{for(let r=1;re[t]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var Io=class{_items;_activeItemIndex=be(-1);_activeItem=be(null);_wrap=!1;_typeaheadSubscription=B.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal=null;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=n=>n.disabled;constructor(n,t){this._items=n,n instanceof nn?this._itemChangesSubscription=n.changes.subscribe(r=>this._itemsChanged(r.toArray())):vo(n)&&(this._effectRef=io(()=>this._itemsChanged(n()),{injector:t}))}tabOut=new N;change=new N;skipPredicate(n){return this._skipPredicateFn=n,this}withWrap(n=!0){return this._wrap=n,this}withVerticalOrientation(n=!0){return this._vertical=n,this}withHorizontalOrientation(n){return this._horizontal=n,this}withAllowedModifierKeys(n){return this._allowedModifierKeys=n,this}withTypeAhead(n=200){this._typeaheadSubscription.unsubscribe();let t=this._getItemsArray();return this._typeahead=new Co(t,{debounceInterval:typeof n=="number"?n:void 0,skipPredicate:r=>this._skipPredicateFn(r)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(r=>{this.setActiveItem(r)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(n=!0){return this._homeAndEnd=n,this}withPageUpDown(n=!0,t=10){return this._pageUpAndDown={enabled:n,delta:t},this}setActiveItem(n){let t=this._activeItem();this.updateActiveItem(n),this._activeItem()!==t&&this.change.next(this._activeItemIndex())}onKeydown(n){let t=n.keyCode,o=["altKey","ctrlKey","metaKey","shiftKey"].every(i=>!n[i]||this._allowedModifierKeys.indexOf(i)>-1);switch(t){case 9:this.tabOut.next();return;case 40:if(this._vertical&&o){this.setNextItemActive();break}else return;case 38:if(this._vertical&&o){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&o){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&o){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&o){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&o){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&o){let i=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(i>0?i:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&o){let i=this._activeItemIndex()+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(i-1&&r!==this._activeItemIndex()&&(this._activeItemIndex.set(r),this._typeahead?.setCurrentSelectedItemIndex(r))}}};var Kh=class extends Io{setActiveItem(n){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(n),this.activeItem&&this.activeItem.setActiveStyles()}};var Xh=class extends Io{_origin="program";setFocusOrigin(n){return this._origin=n,this}setActiveItem(n){super.setActiveItem(n),this.activeItem&&this.activeItem.focus(this._origin)}};function Qh(e){return vn(e)?e:Be(e)}var Jh=class{_activeItemIndex=-1;_activeItem=null;_shouldActivationFollowFocus=!1;_horizontalOrientation="ltr";_skipPredicateFn=n=>!1;_trackByFn=n=>n;_items=[];_typeahead;_typeaheadSubscription=B.EMPTY;_hasInitialFocused=!1;_initializeFocus(){if(this._hasInitialFocused||this._items.length===0)return;let n=0;for(let r=0;rthis._itemsChanged(r.toArray()))):vn(n)?n.subscribe(r=>this._itemsChanged(r)):(this._items=n,this._initializeFocus()),typeof t.shouldActivationFollowFocus=="boolean"&&(this._shouldActivationFollowFocus=t.shouldActivationFollowFocus),t.horizontalOrientation&&(this._horizontalOrientation=t.horizontalOrientation),t.skipPredicate&&(this._skipPredicateFn=t.skipPredicate),t.trackBy&&(this._trackByFn=t.trackBy),typeof t.typeAheadDebounceInterval<"u"&&this._setTypeAhead(t.typeAheadDebounceInterval)}change=new N;destroy(){this._typeaheadSubscription.unsubscribe(),this._typeahead?.destroy(),this.change.complete()}onKeydown(n){switch(n.key){case"Tab":return;case"ArrowDown":this._focusNextItem();break;case"ArrowUp":this._focusPreviousItem();break;case"ArrowRight":this._horizontalOrientation==="rtl"?this._collapseCurrentItem():this._expandCurrentItem();break;case"ArrowLeft":this._horizontalOrientation==="rtl"?this._expandCurrentItem():this._collapseCurrentItem();break;case"Home":this._focusFirstItem();break;case"End":this._focusLastItem();break;case"Enter":case" ":this._activateCurrentItem();break;default:if(n.key==="*"){this._expandAllItemsAtCurrentItemLevel();break}this._typeahead?.handleKey(n);return}this._typeahead?.reset(),n.preventDefault()}getActiveItemIndex(){return this._activeItemIndex}getActiveItem(){return this._activeItem}_itemsChanged(n){this._hasInitialFocused&&this._activeItem&&!n.includes(this._activeItem)&&(this._activeItem=null,this._hasInitialFocused=!1),this._items=n,this._typeahead?.setItems(this._items),this._updateActiveItemIndex(this._items),this._initializeFocus()}_focusFirstItem(){this.focusItem(this._findNextAvailableItemIndex(-1))}_focusLastItem(){this.focusItem(this._findPreviousAvailableItemIndex(this._items.length))}_focusNextItem(){this.focusItem(this._findNextAvailableItemIndex(this._activeItemIndex))}_focusPreviousItem(){this.focusItem(this._findPreviousAvailableItemIndex(this._activeItemIndex))}focusItem(n,t={}){t.emitChangeEvent??=!0;let r=typeof n=="number"?n:this._items.findIndex(s=>this._trackByFn(s)===this._trackByFn(n));if(r<0||r>=this._items.length)return;let o=this._items[r];if(this._activeItem!==null&&this._trackByFn(o)===this._trackByFn(this._activeItem))return;let i=this._activeItem;this._activeItem=o??null,this._activeItemIndex=r,this._typeahead?.setCurrentSelectedItemIndex(r),this._activeItem?.focus(),i?.unfocus(),t.emitChangeEvent&&this.change.next(this._activeItem),this._shouldActivationFollowFocus&&this._activateCurrentItem()}_updateActiveItemIndex(n){let t=this._activeItem;if(!t)return;let r=n.findIndex(o=>this._trackByFn(o)===this._trackByFn(t));r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r,this._typeahead?.setCurrentSelectedItemIndex(r))}_setTypeAhead(n){this._typeahead=new Co(this._items,{debounceInterval:typeof n=="number"?n:void 0,skipPredicate:t=>this._skipPredicateFn(t)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(t=>{this.focusItem(t)})}_findNextAvailableItemIndex(n){for(let t=n+1;t=0;t--)if(!this._skipPredicateFn(this._items[t]))return t;return n}_collapseCurrentItem(){if(this._activeItem)if(this._isCurrentItemExpanded())this._activeItem.collapse();else{let n=this._activeItem.getParent();if(!n||this._skipPredicateFn(n))return;this.focusItem(n)}}_expandCurrentItem(){this._activeItem&&(this._isCurrentItemExpanded()?Qh(this._activeItem.getChildren()).pipe(pt(1)).subscribe(n=>{let t=n.find(r=>!this._skipPredicateFn(r));t&&this.focusItem(t)}):this._activeItem.expand())}_isCurrentItemExpanded(){return this._activeItem?typeof this._activeItem.isExpanded=="boolean"?this._activeItem.isExpanded:this._activeItem.isExpanded():!1}_isItemDisabled(n){return typeof n.isDisabled=="boolean"?n.isDisabled:n.isDisabled?.()}_expandAllItemsAtCurrentItemLevel(){if(!this._activeItem)return;let n=this._activeItem.getParent(),t;n?t=Qh(n.getChildren()):t=Be(this._items.filter(r=>r.getParent()===null)),t.pipe(pt(1)).subscribe(r=>{for(let o of r)o.expand()})}_activateCurrentItem(){this._activeItem?.activate()}},D5=new y("tree-key-manager",{providedIn:"root",factory:()=>(e,n)=>new Jh(e,n)});var ED=" ";function OA(e,n,t){let r=Xc(e,n);t=t.trim(),!r.some(o=>o.trim()===t)&&(r.push(t),e.setAttribute(n,r.join(ED)))}function kA(e,n,t){let r=Xc(e,n);t=t.trim();let o=r.filter(i=>i!==t);o.length?e.setAttribute(n,o.join(ED)):e.removeAttribute(n)}function Xc(e,n){return e.getAttribute(n)?.match(/\S+/g)??[]}var wD="cdk-describedby-message",Kc="cdk-describedby-host",tp=0,N5=(()=>{class e{_platform=f(oe);_document=f(F);_messageRegistry=new Map;_messagesContainer=null;_id=`${tp++}`;constructor(){f(lt).load(qc),this._id=f(On)+"-"+tp++}describe(t,r,o){if(!this._canBeDescribed(t,r))return;let i=ep(r,o);typeof r!="string"?(DD(r,this._id),this._messageRegistry.set(i,{messageElement:r,referenceCount:0})):this._messageRegistry.has(i)||this._createMessageElement(r,o),this._isElementDescribedByMessage(t,i)||this._addMessageReference(t,i)}removeDescription(t,r,o){if(!r||!this._isElementNode(t))return;let i=ep(r,o);if(this._isElementDescribedByMessage(t,i)&&this._removeMessageReference(t,i),typeof r=="string"){let s=this._messageRegistry.get(i);s&&s.referenceCount===0&&this._deleteMessageElement(i)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let t=this._document.querySelectorAll(`[${Kc}="${this._id}"]`);for(let r=0;ro.indexOf(wD)!=0);t.setAttribute("aria-describedby",r.join(" "))}_addMessageReference(t,r){let o=this._messageRegistry.get(r);OA(t,"aria-describedby",o.messageElement.id),t.setAttribute(Kc,this._id),o.referenceCount++}_removeMessageReference(t,r){let o=this._messageRegistry.get(r);o.referenceCount--,kA(t,"aria-describedby",o.messageElement.id),t.removeAttribute(Kc)}_isElementDescribedByMessage(t,r){let o=Xc(t,"aria-describedby"),i=this._messageRegistry.get(r),s=i&&i.messageElement.id;return!!s&&o.indexOf(s)!=-1}_canBeDescribed(t,r){if(!this._isElementNode(t))return!1;if(r&&typeof r=="object")return!0;let o=r==null?"":`${r}`.trim(),i=t.getAttribute("aria-label");return o?!i||i.trim()!==o:!1}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function ep(e,n){return typeof e=="string"?`${n||""}/${e}`:e}function DD(e,n){e.id||(e.id=`${wD}-${n}-${tp++}`)}var Tt=(function(e){return e[e.NORMAL=0]="NORMAL",e[e.NEGATED=1]="NEGATED",e[e.INVERTED=2]="INVERTED",e})(Tt||{}),Qc,Tr;function Jc(){if(Tr==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Tr=!1,Tr;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Tr=!0;else{let e=Element.prototype.scrollTo;e?Tr=!/\{\s*\[native code\]\s*\}/.test(e.toString()):Tr=!1}}return Tr}function Mo(){if(typeof document!="object"||!document)return Tt.NORMAL;if(Qc==null){let e=document.createElement("div"),n=e.style;e.dir="rtl",n.width="1px",n.overflow="auto",n.visibility="hidden",n.pointerEvents="none",n.position="absolute";let t=document.createElement("div"),r=t.style;r.width="2px",r.height="1px",e.appendChild(t),document.body.appendChild(e),Qc=Tt.NORMAL,e.scrollLeft===0&&(e.scrollLeft=1,Qc=e.scrollLeft===0?Tt.NEGATED:Tt.INVERTED),e.remove()}return Qc}function np(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var So,CD=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function H5(){if(So)return So;if(typeof document!="object"||!document)return So=new Set(CD),So;let e=document.createElement("input");return So=new Set(CD.filter(n=>(e.setAttribute("type",n),e.type===n))),So}var W5={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var FA=new y("MATERIAL_ANIMATIONS"),ID=null;function PA(){return f(FA,{optional:!0})?.animationsDisabled||f(Si,{optional:!0})==="NoopAnimations"?"di-disabled":(ID??=f(Yc).matchMedia("(prefers-reduced-motion)").matches,ID?"reduced-motion":"enabled")}function Vn(){return PA()!=="enabled"}function he(e){return e==null?"":typeof e=="string"?e:`${e}px`}function J5(e){return e!=null&&`${e}`!="false"}var ut=(function(e){return e[e.FADING_IN=0]="FADING_IN",e[e.VISIBLE=1]="VISIBLE",e[e.FADING_OUT=2]="FADING_OUT",e[e.HIDDEN=3]="HIDDEN",e})(ut||{}),rp=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=ut.HIDDEN;constructor(n,t,r,o=!1){this._renderer=n,this.element=t,this.config=r,this._animationForciblyDisabledThroughCss=o}fadeOut(){this._renderer.fadeOutRipple(this)}},MD=wo({passive:!0,capture:!0}),op=class{_events=new Map;addHandler(n,t,r,o){let i=this._events.get(t);if(i){let s=i.get(r);s?s.add(o):i.set(r,new Set([o]))}else this._events.set(t,new Map([[r,new Set([o])]])),n.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,MD)})}removeHandler(n,t,r){let o=this._events.get(n);if(!o)return;let i=o.get(t);i&&(i.delete(r),i.size===0&&o.delete(t),o.size===0&&(this._events.delete(n),document.removeEventListener(n,this._delegateEventHandler,MD)))}_delegateEventHandler=n=>{let t=Ve(n);t&&this._events.get(n.type)?.forEach((r,o)=>{(o===t||o.contains(t))&&r.forEach(i=>i.handleEvent(n))})}},ns={enterDuration:225,exitDuration:150},LA=800,SD=wo({passive:!0,capture:!0}),TD=["mousedown","touchstart"],xD=["mouseup","mouseleave","touchend","touchcancel"],VA=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(r,o){},styles:[`.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none} -`],encapsulation:2,changeDetection:0})}return e})(),rs=class e{_target;_ngZone;_platform;_containerElement;_triggerElement=null;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple=null;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect=null;static _eventManager=new op;constructor(n,t,r,o,i){this._target=n,this._ngZone=t,this._platform=o,o.isBrowser&&(this._containerElement=ct(r)),i&&i.get(lt).load(VA)}fadeInRipple(n,t,r={}){let o=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),i=w(w({},ns),r.animation);r.centered&&(n=o.left+o.width/2,t=o.top+o.height/2);let s=r.radius||jA(n,t,o),a=n-o.left,c=t-o.top,l=i.enterDuration,u=document.createElement("div");u.classList.add("mat-ripple-element"),u.style.left=`${a-s}px`,u.style.top=`${c-s}px`,u.style.height=`${s*2}px`,u.style.width=`${s*2}px`,r.color!=null&&(u.style.backgroundColor=r.color),u.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(u);let d=window.getComputedStyle(u),p=d.transitionProperty,h=d.transitionDuration,m=p==="none"||h==="0s"||h==="0s, 0s"||o.width===0&&o.height===0,b=new rp(this,u,r,m);u.style.transform="scale3d(1, 1, 1)",b.state=ut.FADING_IN,r.persistent||(this._mostRecentTransientRipple=b);let _=null;return!m&&(l||i.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let C=()=>{_&&(_.fallbackTimer=null),clearTimeout(qe),this._finishRippleTransition(b)},ne=()=>this._destroyRipple(b),qe=setTimeout(ne,l+100);u.addEventListener("transitionend",C),u.addEventListener("transitioncancel",ne),_={onTransitionEnd:C,onTransitionCancel:ne,fallbackTimer:qe}}),this._activeRipples.set(b,_),(m||!l)&&this._finishRippleTransition(b),b}fadeOutRipple(n){if(n.state===ut.FADING_OUT||n.state===ut.HIDDEN)return;let t=n.element,r=w(w({},ns),n.config.animation);t.style.transitionDuration=`${r.exitDuration}ms`,t.style.opacity="0",n.state=ut.FADING_OUT,(n._animationForciblyDisabledThroughCss||!r.exitDuration)&&this._finishRippleTransition(n)}fadeOutAll(){this._getActiveRipples().forEach(n=>n.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(n=>{n.config.persistent||n.fadeOut()})}setupTriggerEvents(n){let t=ct(n);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,TD.forEach(r=>{e._eventManager.addHandler(this._ngZone,r,t,this)}))}handleEvent(n){n.type==="mousedown"?this._onMousedown(n):n.type==="touchstart"?this._onTouchStart(n):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{xD.forEach(t=>{this._triggerElement.addEventListener(t,this,SD)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(n){n.state===ut.FADING_IN?this._startFadeOutTransition(n):n.state===ut.FADING_OUT&&this._destroyRipple(n)}_startFadeOutTransition(n){let t=n===this._mostRecentTransientRipple,{persistent:r}=n.config;n.state=ut.VISIBLE,!r&&(!t||!this._isPointerDown)&&n.fadeOut()}_destroyRipple(n){let t=this._activeRipples.get(n)??null;this._activeRipples.delete(n),this._activeRipples.size||(this._containerRect=null),n===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),n.state=ut.HIDDEN,t!==null&&(n.element.removeEventListener("transitionend",t.onTransitionEnd),n.element.removeEventListener("transitioncancel",t.onTransitionCancel),t.fallbackTimer!==null&&clearTimeout(t.fallbackTimer)),n.element.remove()}_onMousedown(n){let t=Xi(n),r=this._lastTouchStartEvent&&Date.now(){let t=n.state===ut.VISIBLE||n.config.terminateOnPointerUp&&n.state===ut.FADING_IN;!n.config.persistent&&t&&n.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let n=this._triggerElement;n&&(TD.forEach(t=>e._eventManager.removeHandler(t,n,this)),this._pointerUpEventsRegistered&&(xD.forEach(t=>n.removeEventListener(t,this,SD)),this._pointerUpEventsRegistered=!1))}};function jA(e,n,t){let r=Math.max(Math.abs(e-t.left),Math.abs(e-t.right)),o=Math.max(Math.abs(n-t.top),Math.abs(n-t.bottom));return Math.sqrt(r*r+o*o)}var ip=new y("mat-ripple-global-options"),pq=(()=>{class e{_elementRef=f(H);_animationsDisabled=Vn();color;unbounded=!1;centered=!1;radius=0;animation;get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let t=f(P),r=f(oe),o=f(ip,{optional:!0}),i=f(j);this._globalOptions=o||{},this._rippleRenderer=new rs(this,t,this._elementRef,r,i)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:w(w(w({},this._globalOptions.animation),this._animationsDisabled?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,r=0,o){return typeof t=="number"?this._rippleRenderer.fadeInRipple(t,r,w(w({},this.rippleConfig),o)):this._rippleRenderer.fadeInRipple(0,0,w(w({},this.rippleConfig),t))}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(r,o){r&2&&Pe("mat-ripple-unbounded",o.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return e})();var BA={capture:!0},HA=["focus","mousedown","mouseenter","touchstart"],sp="mat-ripple-loader-uninitialized",ap="mat-ripple-loader-class-name",AD="mat-ripple-loader-centered",el="mat-ripple-loader-disabled",ND=(()=>{class e{_document=f(F);_animationsDisabled=Vn();_globalRippleOptions=f(ip,{optional:!0});_platform=f(oe);_ngZone=f(P);_injector=f(j);_eventCleanups;_hosts=new Map;constructor(){let t=f(De).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>HA.map(r=>t.listen(this._document,r,this._onInteraction,BA)))}ngOnDestroy(){let t=this._hosts.keys();for(let r of t)this.destroyRipple(r);this._eventCleanups.forEach(r=>r())}configureRipple(t,r){t.setAttribute(sp,this._globalRippleOptions?.namespace??""),(r.className||!t.hasAttribute(ap))&&t.setAttribute(ap,r.className||""),r.centered&&t.setAttribute(AD,""),r.disabled&&t.setAttribute(el,"")}setDisabled(t,r){let o=this._hosts.get(t);o?(o.target.rippleDisabled=r,!r&&!o.hasSetUpEvents&&(o.hasSetUpEvents=!0,o.renderer.setupTriggerEvents(t))):r?t.setAttribute(el,""):t.removeAttribute(el)}_onInteraction=t=>{let r=Ve(t);if(r instanceof HTMLElement){let o=r.closest(`[${sp}="${this._globalRippleOptions?.namespace??""}"]`);o&&this._createRipple(o)}};_createRipple(t){if(!this._document||this._hosts.has(t))return;t.querySelector(".mat-ripple")?.remove();let r=this._document.createElement("span");r.classList.add("mat-ripple",t.getAttribute(ap)),t.append(r);let o=this._globalRippleOptions,i=this._animationsDisabled?0:o?.animation?.enterDuration??ns.enterDuration,s=this._animationsDisabled?0:o?.animation?.exitDuration??ns.exitDuration,a={rippleDisabled:this._animationsDisabled||o?.disabled||t.hasAttribute(el),rippleConfig:{centered:t.hasAttribute(AD),terminateOnPointerUp:o?.terminateOnPointerUp,animation:{enterDuration:i,exitDuration:s}}},c=new rs(a,this._ngZone,r,this._platform,this._injector),l=!a.rippleDisabled;l&&c.setupTriggerEvents(t),this._hosts.set(t,{target:a,renderer:c,hasSetUpEvents:l}),t.removeAttribute(sp)}destroyRipple(t){let r=this._hosts.get(t);r&&(r.renderer._removeTriggerEvents(),this._hosts.delete(t))}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var RD=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=Ce({type:e,selectors:[["structural-styles"]],decls:0,vars:0,template:function(r,o){},styles:[`.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus-visible::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}} -`],encapsulation:2,changeDetection:0})}return e})();var UA=["mat-icon-button",""],$A=["*"],zA=new y("MAT_BUTTON_CONFIG");function OD(e){return e==null?void 0:hh(e)}var cp=(()=>{class e{_elementRef=f(H);_ngZone=f(P);_animationsDisabled=Vn();_config=f(zA,{optional:!0});_focusMonitor=f(zc);_cleanupClick;_renderer=f(Ne);_rippleLoader=f(ND);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=t,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(t){this.tabIndex=t}constructor(){f(lt).load(RD);let t=this._elementRef.nativeElement;this._isAnchor=t.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(t,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(t="program",r){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,r):this._elementRef.nativeElement.focus(r)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",t=>{this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}))}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,hostAttrs:[1,"mat-mdc-button-base"],hostVars:13,hostBindings:function(r,o){r&2&&(an("disabled",o._getDisabledAttribute())("aria-disabled",o._getAriaDisabled())("tabindex",o._getTabIndex()),Kf(o.color?"mat-"+o.color:""),Pe("mat-mdc-button-disabled",o.disabled)("mat-mdc-button-disabled-interactive",o.disabledInteractive)("mat-unthemed",!o.color)("_mat-animation-noopable",o._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",ce],disabled:[2,"disabled","disabled",ce],ariaDisabled:[2,"aria-disabled","ariaDisabled",ce],disabledInteractive:[2,"disabledInteractive","disabledInteractive",ce],tabIndex:[2,"tabIndex","tabIndex",OD],_tabindex:[2,"tabindex","_tabindex",OD]}})}return e})(),GA=(()=>{class e extends cp{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=Ce({type:e,selectors:[["button","mat-icon-button",""],["a","mat-icon-button",""],["button","matIconButton",""],["a","matIconButton",""]],hostAttrs:[1,"mdc-icon-button","mat-mdc-icon-button"],exportAs:["matButton","matAnchor"],features:[G],attrs:UA,ngContentSelectors:$A,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,o){r&1&&(Dr(),$t(0,"span",0),ln(1),$t(2,"span",1)(3,"span",2))},styles:[`.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%));flex-shrink:0;text-align:center;width:var(--mat-icon-button-state-layer-size, 40px);height:var(--mat-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mat-icon-button-state-layer-size, 40px) - var(--mat-icon-button-icon-size, 24px)) / 2);font-size:var(--mat-icon-button-icon-size, 24px);color:var(--mat-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-icon-button:focus-visible>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-icon-button-touch-target-size, 48px);display:var(--mat-icon-button-touch-target-display, block);left:50%;width:var(--mat-icon-button-touch-target-size, 48px);transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mat-icon-button-icon-size, 24px);height:var(--mat-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%))}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1} -`,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}} -`],encapsulation:2,changeDetection:0})}return e})();var WA=new y("cdk-dir-doc",{providedIn:"root",factory:()=>f(F)}),qA=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function kD(e){let n=e?.toLowerCase()||"";return n==="auto"&&typeof navigator<"u"&&navigator?.language?qA.test(navigator.language)?"rtl":"ltr":n==="rtl"?"rtl":"ltr"}var To=(()=>{class e{get value(){return this.valueSignal()}valueSignal=be("ltr");change=new U;constructor(){let t=f(WA,{optional:!0});if(t){let r=t.body?t.body.dir:null,o=t.documentElement?t.documentElement.dir:null;this.valueSignal.set(kD(r||o||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var hn=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({})}return e})();var FD=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({imports:[hn]})}return e})();var YA=["matButton",""],ZA=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],KA=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var PD=new Map([["text",["mat-mdc-button"]],["filled",["mdc-button--unelevated","mat-mdc-unelevated-button"]],["elevated",["mdc-button--raised","mat-mdc-raised-button"]],["outlined",["mdc-button--outlined","mat-mdc-outlined-button"]],["tonal",["mat-tonal-button"]]]),Wq=(()=>{class e extends cp{get appearance(){return this._appearance}set appearance(t){this.setAppearance(t||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let t=XA(this._elementRef.nativeElement);t&&this.setAppearance(t)}setAppearance(t){if(t===this._appearance)return;let r=this._elementRef.nativeElement.classList,o=this._appearance?PD.get(this._appearance):null,i=PD.get(t);o&&r.remove(...o),r.add(...i),this._appearance=t}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=Ce({type:e,selectors:[["button","matButton",""],["a","matButton",""],["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""],["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostAttrs:[1,"mdc-button"],inputs:{appearance:[0,"matButton","appearance"]},exportAs:["matButton","matAnchor"],features:[G],attrs:YA,ngContentSelectors:KA,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,o){r&1&&(Dr(ZA),$t(0,"span",0),ln(1),br(2,"span",1),ln(3,1),_r(),ln(4,2),$t(5,"span",2)(6,"span",3)),r&2&&Pe("mdc-button__ripple",!o._isFab)("mdc-fab__ripple",o._isFab)},styles:[`.mat-mdc-button-base{text-decoration:none}.mat-mdc-button-base .mat-icon{min-height:fit-content;flex-shrink:0}@media(hover: none){.mat-mdc-button-base:hover>span.mat-mdc-button-persistent-ripple::before{opacity:0}}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-button-text-horizontal-padding, 12px);height:var(--mat-button-text-container-height, 40px);font-family:var(--mat-button-text-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-text-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-text-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-text-label-text-transform);font-weight:var(--mat-button-text-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mat-button-text-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mat-button-text-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-text-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-button-text-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-button-text-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-text-touch-target-size, 48px);display:var(--mat-button-text-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-filled-container-height, 40px);font-family:var(--mat-button-filled-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-filled-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-filled-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-filled-label-text-transform);font-weight:var(--mat-button-filled-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-filled-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-button-filled-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-filled-touch-target-size, 48px);display:var(--mat-button-filled-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mat-button-filled-label-text-color, var(--mat-sys-on-primary));background-color:var(--mat-button-filled-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mat-button-filled-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mat-button-protected-container-elevation-shadow, var(--mat-sys-level1));height:var(--mat-button-protected-container-height, 40px);font-family:var(--mat-button-protected-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-protected-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-protected-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-protected-label-text-transform);font-weight:var(--mat-button-protected-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-protected-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-button-protected-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-protected-touch-target-size, 48px);display:var(--mat-button-protected-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-raised-button:not(:disabled){color:var(--mat-button-protected-label-text-color, var(--mat-sys-primary));background-color:var(--mat-button-protected-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mat-button-protected-container-shape, var(--mat-sys-corner-full))}@media(hover: hover){.mat-mdc-raised-button:hover{box-shadow:var(--mat-button-protected-hover-container-elevation-shadow, var(--mat-sys-level2))}}.mat-mdc-raised-button:focus{box-shadow:var(--mat-button-protected-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mat-button-protected-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-protected-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-protected-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mat-button-protected-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-outlined-container-height, 40px);font-family:var(--mat-button-outlined-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-outlined-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-outlined-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-outlined-label-text-transform);font-weight:var(--mat-button-outlined-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mat-button-outlined-container-shape, var(--mat-sys-corner-full));border-width:var(--mat-button-outlined-outline-width, 1px);padding:0 var(--mat-button-outlined-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-button-outlined-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-outlined-touch-target-size, 48px);display:var(--mat-button-outlined-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-outlined-button:not(:disabled){color:var(--mat-button-outlined-label-text-color, var(--mat-sys-primary));border-color:var(--mat-button-outlined-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mat-button-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-tonal-container-height, 40px);font-family:var(--mat-button-tonal-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-tonal-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-tonal-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-tonal-label-text-transform);font-weight:var(--mat-button-tonal-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-tonal-horizontal-padding, 24px)}.mat-tonal-button:not(:disabled){color:var(--mat-button-tonal-label-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-tonal-container-color, var(--mat-sys-secondary-container))}.mat-tonal-button,.mat-tonal-button .mdc-button__ripple{border-radius:var(--mat-button-tonal-container-shape, var(--mat-sys-corner-full))}.mat-tonal-button[disabled],.mat-tonal-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-tonal-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-tonal-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-tonal-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}[dir=rtl] .mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}.mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}[dir=rtl] .mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}.mat-tonal-button .mat-ripple-element{background-color:var(--mat-button-tonal-ripple-color, color-mix(in srgb, var(--mat-sys-on-secondary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-tonal-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-tonal-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-tonal-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-tonal-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-tonal-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-tonal-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-tonal-touch-target-size, 48px);display:var(--mat-button-tonal-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button,.mat-tonal-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon,.mat-tonal-button .mdc-button__label,.mat-tonal-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator,.mat-tonal-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-button:focus-visible>.mat-focus-indicator::before,.mat-mdc-unelevated-button:focus-visible>.mat-focus-indicator::before,.mat-mdc-raised-button:focus-visible>.mat-focus-indicator::before,.mat-mdc-outlined-button:focus-visible>.mat-focus-indicator::before,.mat-tonal-button:focus-visible>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable,.mat-tonal-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon,.mat-tonal-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-tonal-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)} -`,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}} -`],encapsulation:2,changeDetection:0})}return e})();function XA(e){return e.hasAttribute("mat-raised-button")?"elevated":e.hasAttribute("mat-stroked-button")?"outlined":e.hasAttribute("mat-flat-button")?"filled":e.hasAttribute("mat-button")?"text":null}var qq=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({imports:[FD,hn]})}return e})();var lp={production:!0,electron:!1,githubio:!1,solarputty_download_url:"",current_version:"v3",compute_id:"local"};var os=class{};function QA(e){return e&&typeof e.connect=="function"&&!(e instanceof Lo)}var up=class extends os{_data;constructor(n){super(),this._data=n}connect(){return vn(this._data)?this._data:Be(this._data)}disconnect(){}},zt=(function(e){return e[e.REPLACED=0]="REPLACED",e[e.INSERTED=1]="INSERTED",e[e.MOVED=2]="MOVED",e[e.REMOVED=3]="REMOVED",e})(zt||{}),dp=class{viewCacheSize=20;_viewCache=[];applyChanges(n,t,r,o,i){n.forEachOperation((s,a,c)=>{let l,u;if(s.previousIndex==null){let d=()=>r(s,a,c);l=this._insertView(d,c,t,o(s)),u=l?zt.INSERTED:zt.REPLACED}else c==null?(this._detachAndCacheView(a,t),u=zt.REMOVED):(l=this._moveView(a,c,t,o(s)),u=zt.MOVED);i&&i({context:l?.context,operation:u,record:s})})}detach(){for(let n of this._viewCache)n.destroy();this._viewCache=[]}_insertView(n,t,r,o){let i=this._insertViewFromCache(t,r);if(i){i.context.$implicit=o;return}let s=n();return r.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(n,t){let r=t.detach(n);this._maybeCacheView(r,t)}_moveView(n,t,r,o){let i=r.get(n);return r.move(i,t),i.context.$implicit=o,i}_maybeCacheView(n,t){if(this._viewCache.length0?i/this._itemSize:0;if(t.end>o){let c=Math.ceil(r/this._itemSize),l=Math.max(0,Math.min(s,o-c));s!=l&&(s=l,i=l*this._itemSize,t.start=Math.floor(s)),t.end=Math.max(0,Math.min(o,t.start+c))}let a=i-t.start*this._itemSize;if(a0&&(t.end=Math.min(o,t.end+l),t.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(t),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*t.start)),this._scrolledIndexChange.next(Math.floor(s))}};function tN(e){return e._scrollStrategy}var nN=(()=>{class e{get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=Ir(t)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(t){this._minBufferPx=Ir(t)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(t){this._maxBufferPx=Ir(t)}_maxBufferPx=200;_scrollStrategy=new fp(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[me([{provide:VD,useFactory:tN,deps:[de(()=>e)]}]),$e]})}return e})(),rN=20,is=(()=>{class e{_ngZone=f(P);_platform=f(oe);_renderer=f(De).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new N;_scrolledCount=0;scrollContainers=new Map;register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){let r=this.scrollContainers.get(t);r&&(r.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=rN){return this._platform.isBrowser?new k(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let o=t>0?this._scrolled.pipe(zo(t)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{o.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):Be()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((t,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(t,r){let o=this.getAncestorScrollContainers(t);return this.scrolled(r).pipe(we(i=>!i||o.indexOf(i)>-1))}getAncestorScrollContainers(t){let r=[];return this.scrollContainers.forEach((o,i)=>{this._scrollableContainsElement(i,t)&&r.push(i)}),r}_scrollableContainsElement(t,r){let o=ct(r),i=t.getElementRef().nativeElement;do if(o==i)return!0;while(o=o.parentElement);return!1}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pp=(()=>{class e{elementRef=f(H);scrollDispatcher=f(is);ngZone=f(P);dir=f(To,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new N;_renderer=f(Ne);_cleanupScroll;_elementScrolled=new N;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",t=>this._elementScrolled.next(t))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){let r=this.elementRef.nativeElement,o=this.dir&&this.dir.value=="rtl";t.left==null&&(t.left=o?t.end:t.start),t.right==null&&(t.right=o?t.start:t.end),t.bottom!=null&&(t.top=r.scrollHeight-r.clientHeight-t.bottom),o&&Mo()!=Tt.NORMAL?(t.left!=null&&(t.right=r.scrollWidth-r.clientWidth-t.left),Mo()==Tt.INVERTED?t.left=t.right:Mo()==Tt.NEGATED&&(t.left=t.right?-t.right:t.right)):t.right!=null&&(t.left=r.scrollWidth-r.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){let r=this.elementRef.nativeElement;Jc()?r.scrollTo(t):(t.top!=null&&(r.scrollTop=t.top),t.left!=null&&(r.scrollLeft=t.left))}measureScrollOffset(t){let r="left",o="right",i=this.elementRef.nativeElement;if(t=="top")return i.scrollTop;if(t=="bottom")return i.scrollHeight-i.clientHeight-i.scrollTop;let s=this.dir&&this.dir.value=="rtl";return t=="start"?t=s?o:r:t=="end"&&(t=s?r:o),s&&Mo()==Tt.INVERTED?t==r?i.scrollWidth-i.clientWidth-i.scrollLeft:i.scrollLeft:s&&Mo()==Tt.NEGATED?t==r?i.scrollLeft+i.scrollWidth-i.clientWidth:-i.scrollLeft:t==r?i.scrollLeft:i.scrollWidth-i.clientWidth-i.scrollLeft}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return e})(),oN=20,xr=(()=>{class e{_platform=f(oe);_listeners;_viewportSize=null;_change=new N;_document=f(F);constructor(){let t=f(P),r=f(De).createRenderer(null,null);t.runOutsideAngular(()=>{if(this._platform.isBrowser){let o=i=>this._change.next(i);this._listeners=[r.listen("window","resize",o),r.listen("window","orientationchange",o)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(t=>t()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){let t=this.getViewportScrollPosition(),{width:r,height:o}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+o,right:t.left+r,height:o,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let t=this._document,r=this._getWindow(),o=t.documentElement,i=o.getBoundingClientRect(),s=-i.top||t.body?.scrollTop||r.scrollY||o.scrollTop||0,a=-i.left||t.body?.scrollLeft||r.scrollX||o.scrollLeft||0;return{top:s,left:a}}change(t=oN){return t>0?this._change.pipe(zo(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),LD=new y("VIRTUAL_SCROLLABLE"),iN=(()=>{class e extends pp{constructor(){super()}measureViewportSize(t){let r=this.elementRef.nativeElement;return t==="horizontal"?r.clientWidth:r.clientHeight}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,features:[G]})}return e})();function sN(e,n){return e.start==n.start&&e.end==n.end}var aN=typeof requestAnimationFrame<"u"?Ll:Pl,cN=new y("CDK_VIRTUAL_SCROLL_VIEWPORT"),lN=(()=>{class e extends iN{elementRef=f(H);_changeDetectorRef=f(kn);_scrollStrategy=f(VD,{optional:!0});scrollable=f(LD,{optional:!0});_platform=f(oe);_detachedSubject=new N;_renderedRangeSubject=new N;_renderedContentOffsetSubject=new N;get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new k(t=>this._scrollStrategy.scrolledIndexChange.subscribe(r=>Promise.resolve().then(()=>this.ngZone.run(()=>t.next(r)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;renderedContentOffset=this._renderedContentOffsetSubject.pipe(we(t=>t!==null),Hr());_totalContentSize=0;_totalContentWidth=be("");_totalContentHeight=be("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf=null;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=be(!1);_runAfterChangeDetection=[];_viewportChanges=B.EMPTY;_injector=f(j);_isDestroyed=!1;constructor(){super();let t=f(xr);this._scrollStrategy,this._viewportChanges=t.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let r=io(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:f(Fe).injector});f(xe).onDestroy(()=>{r.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(Wo(null),zo(0,aN),qt(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(t){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=t,this._forOf.dataStream.pipe(qt(this._detachedSubject)).subscribe(r=>{let o=r.length;o!==this._dataLength&&(this._dataLength=o,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(t){return this.getElementRef().nativeElement.getBoundingClientRect()[t]}setTotalContentSize(t){this._totalContentSize!==t&&(this._totalContentSize=t,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(t){sN(this._renderedRange,t)||(this.appendOnly&&(t={start:0,end:Math.max(this._renderedRange.end,t.end)}),this._renderedRangeSubject.next(this._renderedRange=t),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(t,r="to-start"){t=this.appendOnly&&r==="to-start"?0:t;let o=this.dir&&this.dir.value=="rtl",i=this.orientation=="horizontal",s=i?"X":"Y",c=`translate${s}(${Number((i&&o?-1:1)*t)}px)`;this._renderedContentOffset=t,r==="to-end"&&(c+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=c&&(this._renderedContentTransform=c,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(t,r="auto"){let o={behavior:r};this.orientation==="horizontal"?o.start=t:o.top=t,this.scrollable.scrollTo(o)}scrollToIndex(t,r="auto"){this._scrollStrategy.scrollToIndex(t,r)}measureScrollOffset(t){let r;return this.scrollable==this?r=o=>super.measureScrollOffset(o):r=o=>this.scrollable.measureScrollOffset(o),Math.max(0,r(t??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(t){let r,o="left",i="right",s=this.dir?.value=="rtl";t=="start"?r=s?i:o:t=="end"?r=s?o:i:t?r=t:r=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(r);return this.elementRef.nativeElement.getBoundingClientRect()[r]-a}measureRenderedContentSize(){let t=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?t.offsetWidth:t.offsetHeight}measureRangeSize(t){return this._forOf?this._forOf.measureRangeSize(t,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(t){t&&this._runAfterChangeDetection.push(t),!Le(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this._renderedContentOffsetSubject.next(this.getOffsetToRenderedContentStart()),Ut(()=>{this._changeDetectionNeeded.set(!1);let t=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let r of t)r()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=Ce({type:e,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(r,o){if(r&1&&fc(JA,7),r&2){let i;Yf(i=Zf())&&(o._contentWrapper=i.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(r,o){r&2&&Pe("cdk-virtual-scroll-orientation-horizontal",o.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",o.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",ce]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[me([{provide:pp,useFactory:()=>f(LD,{optional:!0})||f(e)},{provide:cN,useExisting:e}]),G],ngContentSelectors:eN,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(r,o){r&1&&(Dr(),br(0,"div",1,0),ln(2),_r(),$t(3,"div",2)),r&2&&(_f(3),hc("width",o._totalContentWidth())("height",o._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0} -`],encapsulation:2,changeDetection:0})}return e})();var hp=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({})}return e})(),mp=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({imports:[hn,hp,hn,hp]})}return e})();var ss=class{_attachedHost=null;attach(n){return this._attachedHost=n,n.attach(this)}detach(){let n=this._attachedHost;n!=null&&(this._attachedHost=null,n.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},gp=class extends ss{component;viewContainerRef;injector;projectableNodes;bindings;constructor(n,t,r,o,i){super(),this.component=n,this.viewContainerRef=t,this.injector=r,this.projectableNodes=o,this.bindings=i||null}},xo=class extends ss{templateRef;viewContainerRef;context;injector;constructor(n,t,r,o){super(),this.templateRef=n,this.viewContainerRef=t,this.context=r,this.injector=o}get origin(){return this.templateRef.elementRef}attach(n,t=this.context){return this.context=t,super.attach(n)}detach(){return this.context=void 0,super.detach()}},yp=class extends ss{element;constructor(n){super(),this.element=n instanceof H?n.nativeElement:n}},tl=class{_attachedPortal=null;_disposeFn=null;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(n){if(n instanceof gp)return this._attachedPortal=n,this.attachComponentPortal(n);if(n instanceof xo)return this._attachedPortal=n,this.attachTemplatePortal(n);if(this.attachDomPortal&&n instanceof yp)return this._attachedPortal=n,this.attachDomPortal(n)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(n){this._disposeFn=n}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},nl=class extends tl{outletElement;_appRef;_defaultInjector;constructor(n,t,r){super(),this.outletElement=n,this._appRef=t,this._defaultInjector=r}attachComponentPortal(n){let t;if(n.viewContainerRef){let r=n.injector||n.viewContainerRef.injector,o=r.get(Bt,null,{optional:!0})||void 0;t=n.viewContainerRef.createComponent(n.component,{index:n.viewContainerRef.length,injector:r,ngModuleRef:o,projectableNodes:n.projectableNodes||void 0,bindings:n.bindings||void 0}),this.setDisposeFn(()=>t.destroy())}else{let r=this._appRef,o=n.injector||this._defaultInjector||j.NULL,i=o.get(le,r.injector);t=bc(n.component,{elementInjector:o,environmentInjector:i,projectableNodes:n.projectableNodes||void 0,bindings:n.bindings||void 0}),r.attachView(t.hostView),this.setDisposeFn(()=>{r.viewCount>0&&r.detachView(t.hostView),t.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(t)),this._attachedPortal=n,t}attachTemplatePortal(n){let t=n.viewContainerRef,r=t.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return r.rootNodes.forEach(o=>this.outletElement.appendChild(o)),r.detectChanges(),this.setDisposeFn(()=>{let o=t.indexOf(r);o!==-1&&t.remove(o)}),this._attachedPortal=n,r}attachDomPortal=n=>{let t=n.element;t.parentNode;let r=this.outletElement.ownerDocument.createComment("dom-portal");t.parentNode.insertBefore(r,t),this.outletElement.appendChild(t),this._attachedPortal=n,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(t,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},C6=(()=>{class e extends xo{constructor(){let t=f(Xe),r=f(Ge);super(t,r)}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[G]})}return e})(),I6=(()=>{class e extends tl{_moduleRef=f(Bt,{optional:!0});_document=f(F);_viewContainerRef=f(Ge);_isInitialized=!1;_attachedRef=null;constructor(){super()}get portal(){return this._attachedPortal}set portal(t){this.hasAttached()&&!t&&!this._isInitialized||(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t||null)}attached=new U;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(t){t.setAttachedHost(this);let r=t.viewContainerRef!=null?t.viewContainerRef:this._viewContainerRef,o=r.createComponent(t.component,{index:r.length,injector:t.injector||r.injector,projectableNodes:t.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0,bindings:t.bindings||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=t,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(t){t.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=t=>{let r=t.element;r.parentNode;let o=this._document.createComment("dom-portal");t.setAttachedHost(this),r.parentNode.insertBefore(o,r),this._getRootNode().appendChild(r),this._attachedPortal=t,super.setDisposeFn(()=>{o.parentNode&&o.parentNode.replaceChild(r,o)})};_getRootNode(){let t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[G]})}return e})(),jD=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({})}return e})();var BD=Jc();function qD(e){return new rl(e.get(xr),e.get(F))}var rl=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(n,t){this._viewportRuler=n,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let n=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=n.style.left||"",this._previousHTMLStyles.top=n.style.top||"",n.style.left=he(-this._previousScrollPosition.left),n.style.top=he(-this._previousScrollPosition.top),n.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let n=this._document.documentElement,t=this._document.body,r=n.style,o=t.style,i=r.scrollBehavior||"",s=o.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,n.classList.remove("cdk-global-scrollblock"),BD&&(r.scrollBehavior=o.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),BD&&(r.scrollBehavior=i,o.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let t=this._document.documentElement,r=this._viewportRuler.getViewportSize();return t.scrollHeight>r.height||t.scrollWidth>r.width}};function YD(e,n){return new ol(e.get(is),e.get(P),e.get(xr),n)}var ol=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(n,t,r,o){this._scrollDispatcher=n,this._ngZone=t,this._viewportRuler=r,this._config=o}attach(n){this._overlayRef,this._overlayRef=n}enable(){if(this._scrollSubscription)return;let n=this._scrollDispatcher.scrolled(0).pipe(we(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=n.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=n.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var as=class{enable(){}disable(){}attach(){}};function vp(e,n){return n.some(t=>{let r=e.bottomt.bottom,i=e.rightt.right;return r||o||i||s})}function HD(e,n){return n.some(t=>{let r=e.topt.bottom,i=e.leftt.right;return r||o||i||s})}function Dp(e,n){return new il(e.get(is),e.get(xr),e.get(P),n)}var il=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(n,t,r,o){this._scrollDispatcher=n,this._viewportRuler=t,this._ngZone=r,this._config=o}attach(n){this._overlayRef,this._overlayRef=n}enable(){if(!this._scrollSubscription){let n=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(n).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:r,height:o}=this._viewportRuler.getViewportSize();vp(t,[{width:r,height:o,bottom:o,right:r,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},ZD=(()=>{class e{_injector=f(j);constructor(){}noop=()=>new as;close=t=>YD(this._injector,t);block=()=>qD(this._injector);reposition=t=>Dp(this._injector,t);static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),cs=class{positionStrategy;scrollStrategy=new as;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;usePopover;eventPredicate;constructor(n){if(n){let t=Object.keys(n);for(let r of t)n[r]!==void 0&&(this[r]=n[r])}}};var sl=class{connectionPair;scrollableViewProperties;constructor(n,t){this.connectionPair=n,this.scrollableViewProperties=t}};var KD=(()=>{class e{_attachedOverlays=[];_document=f(F);_isAttached=!1;constructor(){}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){let r=this._attachedOverlays.indexOf(t);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}canReceiveEvent(t,r,o){return o.observers.length<1?!1:t.eventPredicate?t.eventPredicate(r):!0}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),XD=(()=>{class e extends KD{_ngZone=f(P);_renderer=f(De).createRenderer(null,null);_cleanupKeydown;add(t){super.add(t),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=t=>{let r=this._attachedOverlays;for(let o=r.length-1;o>-1;o--){let i=r[o];if(this.canReceiveEvent(i,t,i._keydownEvents)){this._ngZone.run(()=>i._keydownEvents.next(t));break}}};static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),QD=(()=>{class e extends KD{_platform=f(oe);_ngZone=f(P);_renderer=f(De).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget=null;_cleanups;add(t){if(super.add(t),!this._isAttached){let r=this._document.body,o={capture:!0},i=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[i.listen(r,"pointerdown",this._pointerDownListener,o),i.listen(r,"click",this._clickListener,o),i.listen(r,"auxclick",this._clickListener,o),i.listen(r,"contextmenu",this._clickListener,o)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(t=>t()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=t=>{this._pointerDownEventTarget=Ve(t)};_clickListener=t=>{let r=Ve(t),o=t.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let i=this._attachedOverlays.slice();for(let s=i.length-1;s>-1;s--){let a=i[s],c=a._outsidePointerEvents;if(!(!a.hasAttached()||!this.canReceiveEvent(a,t,c))){if(UD(a.overlayElement,r)||UD(a.overlayElement,o))break;this._ngZone?this._ngZone.run(()=>c.next(t)):c.next(t)}}};static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function UD(e,n){let t=typeof ShadowRoot<"u"&&ShadowRoot,r=n;for(;r;){if(r===e)return!0;r=t&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var JD=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,o){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.cdk-overlay-popover{background:none;border:none;padding:0;outline:0;overflow:visible;position:fixed;pointer-events:none;white-space:normal;color:inherit;text-decoration:none;width:100%;height:100%;inset:auto;top:0;left:0}.cdk-overlay-popover::backdrop{display:none}.cdk-overlay-popover .cdk-overlay-backdrop{position:fixed;z-index:auto} -`],encapsulation:2,changeDetection:0})}return e})(),Ep=(()=>{class e{_platform=f(oe);_containerElement;_document=f(F);_styleLoader=f(lt);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t="cdk-overlay-container";if(this._platform.isBrowser||np()){let o=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let i=0;i{let n=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(n,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),n.style.pointerEvents="none",n.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}};function wp(e){return e&&e.nodeType===1}var al=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new N;_attachments=new N;_detachments=new N;_positionStrategy;_scrollStrategy;_locationChanges=B.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_disposed=!1;_previousHostParent;_keydownEvents=new N;_outsidePointerEvents=new N;_afterNextRenderRef;constructor(n,t,r,o,i,s,a,c,l,u=!1,d,p){this._portalOutlet=n,this._host=t,this._pane=r,this._config=o,this._ngZone=i,this._keyboardDispatcher=s,this._document=a,this._location=c,this._outsideClickDispatcher=l,this._animationsDisabled=u,this._injector=d,this._renderer=p,o.scrollStrategy&&(this._scrollStrategy=o.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=o.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}get eventPredicate(){return this._config?.eventPredicate||null}attach(n){if(this._disposed)return null;this._attachHost();let t=this._portalOutlet.attach(n);return this._positionStrategy?.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Ut(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let n=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),n}dispose(){if(this._disposed)return;let n=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,n&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent(),this._disposed=!0}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(n){n!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=n,this.hasAttached()&&(n.attach(this),this.updatePosition()))}updateSize(n){this._config=w(w({},this._config),n),this._updateElementSize()}setDirection(n){this._config=V(w({},this._config),{direction:n}),this._updateElementDirection()}addPanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!0)}removePanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!1)}getDirection(){let n=this._config.direction;return n?typeof n=="string"?n:n.value:"ltr"}updateScrollStrategy(n){n!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=n,this.hasAttached()&&(n.attach(this),n.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let n=this._pane.style;n.width=he(this._config.width),n.height=he(this._config.height),n.minWidth=he(this._config.minWidth),n.minHeight=he(this._config.minHeight),n.maxWidth=he(this._config.maxWidth),n.maxHeight=he(this._config.maxHeight)}_togglePointerEvents(n){this._pane.style.pointerEvents=n?"":"none"}_attachHost(){if(!this._host.parentElement){let n=this._config.usePopover?this._positionStrategy?.getPopoverInsertionPoint?.():null;wp(n)?n.after(this._host):n?.type==="parent"?n.element.appendChild(this._host):this._previousHostParent?.appendChild(this._host)}if(this._config.usePopover)try{this._host.showPopover()}catch{}}_attachBackdrop(){let n="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new bp(this._document,this._renderer,this._ngZone,t=>{this._backdropClick.next(t)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._config.usePopover?this._host.prepend(this._backdropRef.element):this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(n))}):this._backdropRef.element.classList.add(n)}_updateStackingOrder(){!this._config.usePopover&&this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(n,t,r){let o=Mr(t||[]).filter(i=>!!i);o.length&&(r?n.classList.add(...o):n.classList.remove(...o))}_detachContentWhenEmpty(){let n=!1;try{this._detachContentAfterRenderRef=Ut(()=>{n=!0,this._detachContent()},{injector:this._injector})}catch(t){if(n)throw t;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let n=this._scrollStrategy;n?.disable(),n?.detach?.()}},$D="cdk-overlay-connected-position-bounding-box",uN=/([A-Za-z%]+)$/;function Cp(e,n){return new cl(n,e.get(xr),e.get(F),e.get(oe),e.get(Ep))}var cl=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender=!1;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed=!1;_boundingBox=null;_lastPosition=null;_lastScrollVisibility=null;_positionChanges=new N;_resizeSubscription=B.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount=null;_popoverLocation="global";positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(n,t,r,o,i){this._viewportRuler=t,this._document=r,this._platform=o,this._overlayContainer=i,this.setOrigin(n)}attach(n){this._overlayRef&&this._overlayRef,this._validatePositions(),n.hostElement.classList.add($D),this._overlayRef=n,this._boundingBox=n.hostElement,this._pane=n.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._getContainerRect();let n=this._originRect,t=this._overlayRect,r=this._viewportRect,o=this._containerRect,i=[],s;for(let a of this._preferredPositions){let c=this._getOriginPoint(n,o,a),l=this._getOverlayPoint(c,t,a),u=this._getOverlayFit(l,t,r,a);if(u.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,c);return}if(this._canFitWithFlexibleDimensions(u,l,r)){i.push({position:a,origin:c,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(c,a)});continue}(!s||s.overlayFit.visibleAreac&&(c=u,a=l)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Ar(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove($D),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let n=this._lastPosition;n?(this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._getContainerRect(),this._applyPosition(n,this._getOriginPoint(this._originRect,this._containerRect,n))):this.apply()}withScrollableContainers(n){return this._scrollables=n,this}withPositions(n){return this._preferredPositions=n,n.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(n){return this._viewportMargin=n,this}withFlexibleDimensions(n=!0){return this._hasFlexibleDimensions=n,this}withGrowAfterOpen(n=!0){return this._growAfterOpen=n,this}withPush(n=!0){return this._canPush=n,this}withLockedPosition(n=!0){return this._positionLocked=n,this}setOrigin(n){return this._origin=n,this}withDefaultOffsetX(n){return this._offsetX=n,this}withDefaultOffsetY(n){return this._offsetY=n,this}withTransformOriginOn(n){return this._transformOriginSelector=n,this}withPopoverLocation(n){return this._popoverLocation=n,this}getPopoverInsertionPoint(){return this._popoverLocation==="global"?null:this._popoverLocation!=="inline"?this._popoverLocation:this._origin instanceof H?this._origin.nativeElement:wp(this._origin)?this._origin:null}_getOriginPoint(n,t,r){let o;if(r.originX=="center")o=n.left+n.width/2;else{let s=this._isRtl()?n.right:n.left,a=this._isRtl()?n.left:n.right;o=r.originX=="start"?s:a}t.left<0&&(o-=t.left);let i;return r.originY=="center"?i=n.top+n.height/2:i=r.originY=="top"?n.top:n.bottom,t.top<0&&(i-=t.top),{x:o,y:i}}_getOverlayPoint(n,t,r){let o;r.overlayX=="center"?o=-t.width/2:r.overlayX==="start"?o=this._isRtl()?-t.width:0:o=this._isRtl()?0:-t.width;let i;return r.overlayY=="center"?i=-t.height/2:i=r.overlayY=="top"?0:-t.height,{x:n.x+o,y:n.y+i}}_getOverlayFit(n,t,r,o){let i=GD(t),{x:s,y:a}=n,c=this._getOffset(o,"x"),l=this._getOffset(o,"y");c&&(s+=c),l&&(a+=l);let u=0-s,d=s+i.width-r.width,p=0-a,h=a+i.height-r.height,m=this._subtractOverflows(i.width,u,d),b=this._subtractOverflows(i.height,p,h),_=m*b;return{visibleArea:_,isCompletelyWithinViewport:i.width*i.height===_,fitsInViewportVertically:b===i.height,fitsInViewportHorizontally:m==i.width}}_canFitWithFlexibleDimensions(n,t,r){if(this._hasFlexibleDimensions){let o=r.bottom-t.y,i=r.right-t.x,s=zD(this._overlayRef.getConfig().minHeight),a=zD(this._overlayRef.getConfig().minWidth),c=n.fitsInViewportVertically||s!=null&&s<=o,l=n.fitsInViewportHorizontally||a!=null&&a<=i;return c&&l}return!1}_pushOverlayOnScreen(n,t,r){if(this._previousPushAmount&&this._positionLocked)return{x:n.x+this._previousPushAmount.x,y:n.y+this._previousPushAmount.y};let o=GD(t),i=this._viewportRect,s=Math.max(n.x+o.width-i.width,0),a=Math.max(n.y+o.height-i.height,0),c=Math.max(i.top-r.top-n.y,0),l=Math.max(i.left-r.left-n.x,0),u=0,d=0;return o.width<=i.width?u=l||-s:u=n.xm&&!this._isInitialRender&&!this._growAfterOpen&&(s=n.y-m/2)}let c=t.overlayX==="start"&&!o||t.overlayX==="end"&&o,l=t.overlayX==="end"&&!o||t.overlayX==="start"&&o,u,d,p;if(l)p=r.width-n.x+this._getViewportMarginStart()+this._getViewportMarginEnd(),u=n.x-this._getViewportMarginStart();else if(c)d=n.x,u=r.right-n.x-this._getViewportMarginEnd();else{let h=Math.min(r.right-n.x+r.left,n.x),m=this._lastBoundingBoxSize.width;u=h*2,d=n.x-h,u>m&&!this._isInitialRender&&!this._growAfterOpen&&(d=n.x-m/2)}return{top:s,left:d,bottom:a,right:p,width:u,height:i}}_setBoundingBoxStyles(n,t){let r=this._calculateBoundingBoxRect(n,t);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));let o={};if(this._hasExactPosition())o.top=o.left="0",o.bottom=o.right="auto",o.maxHeight=o.maxWidth="",o.width=o.height="100%";else{let i=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;o.width=he(r.width),o.height=he(r.height),o.top=he(r.top)||"auto",o.bottom=he(r.bottom)||"auto",o.left=he(r.left)||"auto",o.right=he(r.right)||"auto",t.overlayX==="center"?o.alignItems="center":o.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?o.justifyContent="center":o.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",i&&(o.maxHeight=he(i)),s&&(o.maxWidth=he(s))}this._lastBoundingBoxSize=r,Ar(this._boundingBox.style,o)}_resetBoundingBoxStyles(){Ar(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Ar(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(n,t){let r={},o=this._hasExactPosition(),i=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(o){let u=this._viewportRuler.getViewportScrollPosition();Ar(r,this._getExactOverlayY(t,n,u)),Ar(r,this._getExactOverlayX(t,n,u))}else r.position="static";let a="",c=this._getOffset(t,"x"),l=this._getOffset(t,"y");c&&(a+=`translateX(${c}px) `),l&&(a+=`translateY(${l}px)`),r.transform=a.trim(),s.maxHeight&&(o?r.maxHeight=he(s.maxHeight):i&&(r.maxHeight="")),s.maxWidth&&(o?r.maxWidth=he(s.maxWidth):i&&(r.maxWidth="")),Ar(this._pane.style,r)}_getExactOverlayY(n,t,r){let o={top:"",bottom:""},i=this._getOverlayPoint(t,this._overlayRect,n);if(this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,r)),n.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;o.bottom=`${s-(i.y+this._overlayRect.height)}px`}else o.top=he(i.y);return o}_getExactOverlayX(n,t,r){let o={left:"",right:""},i=this._getOverlayPoint(t,this._overlayRect,n);this._isPushed&&(i=this._pushOverlayOnScreen(i,this._overlayRect,r));let s;if(this._isRtl()?s=n.overlayX==="end"?"left":"right":s=n.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;o.right=`${a-(i.x+this._overlayRect.width)}px`}else o.left=he(i.x);return o}_getScrollVisibility(){let n=this._getOriginRect(),t=this._pane.getBoundingClientRect(),r=this._scrollables.map(o=>o.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:HD(n,r),isOriginOutsideView:vp(n,r),isOverlayClipped:HD(t,r),isOverlayOutsideView:vp(t,r)}}_subtractOverflows(n,...t){return t.reduce((r,o)=>r-Math.max(o,0),n)}_getNarrowedViewportRect(){let n=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,r=this._viewportRuler.getViewportScrollPosition();return{top:r.top+this._getViewportMarginTop(),left:r.left+this._getViewportMarginStart(),right:r.left+n-this._getViewportMarginEnd(),bottom:r.top+t-this._getViewportMarginBottom(),width:n-this._getViewportMarginStart()-this._getViewportMarginEnd(),height:t-this._getViewportMarginTop()-this._getViewportMarginBottom()}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(n,t){return t==="x"?n.offsetX==null?this._offsetX:n.offsetX:n.offsetY==null?this._offsetY:n.offsetY}_validatePositions(){}_addPanelClasses(n){this._pane&&Mr(n).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(n=>{this._pane.classList.remove(n)}),this._appliedPanelClasses=[])}_getViewportMarginStart(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.start??0}_getViewportMarginEnd(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.end??0}_getViewportMarginTop(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.top??0}_getViewportMarginBottom(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.bottom??0}_getOriginRect(){let n=this._origin;if(n instanceof H)return n.nativeElement.getBoundingClientRect();if(n instanceof Element)return n.getBoundingClientRect();let t=n.width||0,r=n.height||0;return{top:n.y,bottom:n.y+r,left:n.x,right:n.x+t,height:r,width:t}}_getContainerRect(){let n=this._overlayRef.getConfig().usePopover&&this._popoverLocation!=="global",t=this._overlayContainer.getContainerElement();n&&(t.style.display="block");let r=t.getBoundingClientRect();return n&&(t.style.display=""),r}};function Ar(e,n){for(let t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function zD(e){if(typeof e!="number"&&e!=null){let[n,t]=e.split(uN);return!t||t==="px"?parseFloat(n):null}return e||null}function GD(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}function dN(e,n){return e===n?!0:e.isOriginClipped===n.isOriginClipped&&e.isOriginOutsideView===n.isOriginOutsideView&&e.isOverlayClipped===n.isOverlayClipped&&e.isOverlayOutsideView===n.isOverlayOutsideView}var WD="cdk-global-overlay-wrapper";function eE(e){return new ll}var ll=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(n){let t=n.getConfig();this._overlayRef=n,this._width&&!t.width&&n.updateSize({width:this._width}),this._height&&!t.height&&n.updateSize({height:this._height}),n.hostElement.classList.add(WD),this._isDisposed=!1}top(n=""){return this._bottomOffset="",this._topOffset=n,this._alignItems="flex-start",this}left(n=""){return this._xOffset=n,this._xPosition="left",this}bottom(n=""){return this._topOffset="",this._bottomOffset=n,this._alignItems="flex-end",this}right(n=""){return this._xOffset=n,this._xPosition="right",this}start(n=""){return this._xOffset=n,this._xPosition="start",this}end(n=""){return this._xOffset=n,this._xPosition="end",this}width(n=""){return this._overlayRef?this._overlayRef.updateSize({width:n}):this._width=n,this}height(n=""){return this._overlayRef?this._overlayRef.updateSize({height:n}):this._height=n,this}centerHorizontally(n=""){return this.left(n),this._xPosition="center",this}centerVertically(n=""){return this.top(n),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let n=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:o,height:i,maxWidth:s,maxHeight:a}=r,c=(o==="100%"||o==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(i==="100%"||i==="100vh")&&(!a||a==="100%"||a==="100vh"),u=this._xPosition,d=this._xOffset,p=this._overlayRef.getConfig().direction==="rtl",h="",m="",b="";c?b="flex-start":u==="center"?(b="center",p?m=d:h=d):p?u==="left"||u==="end"?(b="flex-end",h=d):(u==="right"||u==="start")&&(b="flex-start",m=d):u==="left"||u==="start"?(b="flex-start",h=d):(u==="right"||u==="end")&&(b="flex-end",m=d),n.position=this._cssPosition,n.marginLeft=c?"0":h,n.marginTop=l?"0":this._topOffset,n.marginBottom=this._bottomOffset,n.marginRight=c?"0":m,t.justifyContent=b,t.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let n=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,r=t.style;t.classList.remove(WD),r.justifyContent=r.alignItems=n.marginTop=n.marginBottom=n.marginLeft=n.marginRight=n.position="",this._overlayRef=null,this._isDisposed=!0}},tE=(()=>{class e{_injector=f(j);constructor(){}global(){return eE()}flexibleConnectedTo(t){return Cp(this._injector,t)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ip=new y("OVERLAY_DEFAULT_CONFIG");function Mp(e,n){e.get(lt).load(JD);let t=e.get(Ep),r=e.get(F),o=e.get(ts),i=e.get(Fe),s=e.get(To),a=e.get(Ne,null,{optional:!0})||e.get(De).createRenderer(null,null),c=new cs(n),l=e.get(Ip,null,{optional:!0})?.usePopover??!0;c.direction=c.direction||s.value,"showPopover"in r.body?c.usePopover=n?.usePopover??l:c.usePopover=!1;let u=r.createElement("div"),d=r.createElement("div");u.id=o.getId("cdk-overlay-"),u.classList.add("cdk-overlay-pane"),d.appendChild(u),c.usePopover&&(d.setAttribute("popover","manual"),d.classList.add("cdk-overlay-popover"));let p=c.usePopover?c.positionStrategy?.getPopoverInsertionPoint?.():null;return wp(p)?p.after(d):p?.type==="parent"?p.element.appendChild(d):t.getContainerElement().appendChild(d),new al(new nl(u,i,e),d,u,c,e.get(P),e.get(XD),r,e.get(Ec),e.get(QD),n?.disableAnimations??e.get(Si,null,{optional:!0})==="NoopAnimations",e.get(le),a)}var nE=(()=>{class e{scrollStrategies=f(ZD);_positionBuilder=f(tE);_injector=f(j);constructor(){}create(t){return Mp(this._injector,t)}position(){return this._positionBuilder}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),fN=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],hN=new y("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let e=f(j);return()=>Dp(e)}}),_p=(()=>{class e{elementRef=f(H);constructor(){}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return e})(),rE=new y("cdk-connected-overlay-default-config"),pN=(()=>{class e{_dir=f(To,{optional:!0});_injector=f(j);_overlayRef;_templatePortal;_backdropSubscription=B.EMPTY;_attachSubscription=B.EMPTY;_detachSubscription=B.EMPTY;_positionSubscription=B.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=f(hN);_ngZone=f(P);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;disposeOnNavigation=!1;usePopover;matchWidth=!1;set _config(t){typeof t!="string"&&this._assignConfig(t)}backdropClick=new U;positionChange=new U;attach=new U;detach=new U;overlayKeydown=new U;overlayOutsideClick=new U;constructor(){let t=f(Xe),r=f(Ge),o=f(rE,{optional:!0}),i=f(Ip,{optional:!0});this.usePopover=i?.usePopover===!1?null:"global",this._templatePortal=new xo(t,r),this.scrollStrategy=this._scrollStrategyFactory(),o&&this._assignConfig(o)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this._getWidth(),minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=fN);let t=this._overlayRef=Mp(this._injector,this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(r=>{this.overlayKeydown.next(r),r.keyCode===27&&!this.disableClose&&!Zc(r)&&(r.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(r=>{let o=this._getOriginElement(),i=Ve(r);(!o||o!==i&&!o.contains(i))&&this.overlayOutsideClick.next(r)})}_buildConfig(){let t=this._position=this.positionStrategy||this._createPositionStrategy(),r=new cs({direction:this._dir||"ltr",positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation,usePopover:!!this.usePopover});return(this.height||this.height===0)&&(r.height=this.height),(this.minWidth||this.minWidth===0)&&(r.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(r.minHeight=this.minHeight),this.backdropClass&&(r.backdropClass=this.backdropClass),this.panelClass&&(r.panelClass=this.panelClass),r}_updatePositionStrategy(t){let r=this.positions.map(o=>({originX:o.originX,originY:o.originY,overlayX:o.overlayX,overlayY:o.overlayY,offsetX:o.offsetX||this.offsetX,offsetY:o.offsetY||this.offsetY,panelClass:o.panelClass||void 0}));return t.setOrigin(this._getOrigin()).withPositions(r).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector).withPopoverLocation(this.usePopover===null?"global":this.usePopover)}_createPositionStrategy(){let t=Cp(this._injector,this._getOrigin());return this._updatePositionStrategy(t),t}_getOrigin(){return this.origin instanceof _p?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof _p?this.origin.elementRef.nativeElement:this.origin instanceof H?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_getWidth(){return this.width?this.width:this.matchWidth?this._getOriginElement()?.getBoundingClientRect?.().width:void 0}attachOverlay(){this._overlayRef||this._createOverlay();let t=this._overlayRef;t.getConfig().hasBackdrop=this.hasBackdrop,t.updateSize({width:this._getWidth()}),t.hasAttached()||t.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=t.backdropClick().subscribe(r=>this.backdropClick.emit(r)):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(Zl(()=>this.positionChange.observers.length>0)).subscribe(r=>{this._ngZone.run(()=>this.positionChange.emit(r)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}_assignConfig(t){this.origin=t.origin??this.origin,this.positions=t.positions??this.positions,this.positionStrategy=t.positionStrategy??this.positionStrategy,this.offsetX=t.offsetX??this.offsetX,this.offsetY=t.offsetY??this.offsetY,this.width=t.width??this.width,this.height=t.height??this.height,this.minWidth=t.minWidth??this.minWidth,this.minHeight=t.minHeight??this.minHeight,this.backdropClass=t.backdropClass??this.backdropClass,this.panelClass=t.panelClass??this.panelClass,this.viewportMargin=t.viewportMargin??this.viewportMargin,this.scrollStrategy=t.scrollStrategy??this.scrollStrategy,this.disableClose=t.disableClose??this.disableClose,this.transformOriginSelector=t.transformOriginSelector??this.transformOriginSelector,this.hasBackdrop=t.hasBackdrop??this.hasBackdrop,this.lockPosition=t.lockPosition??this.lockPosition,this.flexibleDimensions=t.flexibleDimensions??this.flexibleDimensions,this.growAfterOpen=t.growAfterOpen??this.growAfterOpen,this.push=t.push??this.push,this.disposeOnNavigation=t.disposeOnNavigation??this.disposeOnNavigation,this.usePopover=t.usePopover??this.usePopover,this.matchWidth=t.matchWidth??this.matchWidth}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",ce],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",ce],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",ce],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",ce],push:[2,"cdkConnectedOverlayPush","push",ce],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",ce],usePopover:[0,"cdkConnectedOverlayUsePopover","usePopover"],matchWidth:[2,"cdkConnectedOverlayMatchWidth","matchWidth",ce],_config:[0,"cdkConnectedOverlay","_config"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[$e]})}return e})(),mN=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({providers:[nE],imports:[hn,jD,mp,mp]})}return e})();var hE=(()=>{class e{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,r){this._renderer=t,this._elementRef=r}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(r){return new(r||e)(D(Ne),D(H))};static \u0275dir=T({type:e})}return e})(),_l=(()=>{class e extends hE{static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275dir=T({type:e,features:[G]})}return e})(),Rr=new y("");var gN={provide:Rr,useExisting:de(()=>pE),multi:!0};function yN(){let e=et()?et().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}var vN=new y(""),pE=(()=>{class e extends hE{_compositionMode;_composing=!1;constructor(t,r,o){super(t,r),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!yN())}writeValue(t){let r=t??"";this.setProperty("value",r)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(r){return new(r||e)(D(Ne),D(H),D(vN,8))};static \u0275dir=T({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){r&1&&cn("input",function(s){return o._handleInput(s.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(s){return o._compositionEnd(s.target.value)})},standalone:!1,features:[me([gN]),G]})}return e})();function Ap(e){return e==null||Np(e)===0}function Np(e){return e==null?null:Array.isArray(e)||typeof e=="string"?e.length:e instanceof Set?e.size:null}var Gt=new y(""),Or=new y(""),bN=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,oE=class{static min(n){return mE(n)}static max(n){return gE(n)}static required(n){return yE(n)}static requiredTrue(n){return _N(n)}static email(n){return DN(n)}static minLength(n){return EN(n)}static maxLength(n){return wN(n)}static pattern(n){return CN(n)}static nullValidator(n){return dl()}static compose(n){return wE(n)}static composeAsync(n){return CE(n)}};function mE(e){return n=>{if(n.value==null||e==null)return null;let t=parseFloat(n.value);return!isNaN(t)&&t{if(n.value==null||e==null)return null;let t=parseFloat(n.value);return!isNaN(t)&&t>e?{max:{max:e,actual:n.value}}:null}}function yE(e){return Ap(e.value)?{required:!0}:null}function _N(e){return e.value===!0?null:{required:!0}}function DN(e){return Ap(e.value)||bN.test(e.value)?null:{email:!0}}function EN(e){return n=>{let t=n.value?.length??Np(n.value);return t===null||t===0?null:t{let t=n.value?.length??Np(n.value);return t!==null&&t>e?{maxlength:{requiredLength:e,actualLength:t}}:null}}function CN(e){if(!e)return dl;let n,t;return typeof e=="string"?(t="",e.charAt(0)!=="^"&&(t+="^"),t+=e,e.charAt(e.length-1)!=="$"&&(t+="$"),n=new RegExp(t)):(t=e.toString(),n=e),r=>{if(Ap(r.value))return null;let o=r.value;return n.test(o)?null:{pattern:{requiredPattern:t,actualValue:o}}}}function dl(e){return null}function vE(e){return e!=null}function bE(e){return vr(e)?tt(e):e}function _E(e){let n={};return e.forEach(t=>{n=t!=null?w(w({},n),t):n}),Object.keys(n).length===0?null:n}function DE(e,n){return n.map(t=>t(e))}function IN(e){return!e.validate}function EE(e){return e.map(n=>IN(n)?n:t=>n.validate(t))}function wE(e){if(!e)return null;let n=e.filter(vE);return n.length==0?null:function(t){return _E(DE(t,n))}}function Rp(e){return e!=null?wE(EE(e)):null}function CE(e){if(!e)return null;let n=e.filter(vE);return n.length==0?null:function(t){let r=DE(t,n).map(bE);return Hl(r).pipe(re(_E))}}function Op(e){return e!=null?CE(EE(e)):null}function iE(e,n){return e===null?[n]:Array.isArray(e)?[...e,n]:[e,n]}function IE(e){return e._rawValidators}function ME(e){return e._rawAsyncValidators}function Sp(e){return e?Array.isArray(e)?e:[e]:[]}function fl(e,n){return Array.isArray(e)?e.includes(n):e===n}function sE(e,n){let t=Sp(n);return Sp(e).forEach(o=>{fl(t,o)||t.push(o)}),t}function aE(e,n){return Sp(n).filter(t=>!fl(e,t))}var hl=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=Rp(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=Op(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control?.reset(n)}hasError(n,t){return this.control?this.control.hasError(n,t):!1}getError(n,t){return this.control?this.control.getError(n,t):null}},je=class extends hl{name;get formDirective(){return null}get path(){return null}},pn=class extends hl{_parent=null;name=null;valueAccessor=null},pl=class{_cd;constructor(n){this._cd=n}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var A9=(()=>{class e extends pl{constructor(t){super(t)}static \u0275fac=function(r){return new(r||e)(D(pn,2))};static \u0275dir=T({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&Pe("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[G]})}return e})(),N9=(()=>{class e extends pl{constructor(t){super(t)}static \u0275fac=function(r){return new(r||e)(D(je,10))};static \u0275dir=T({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,o){r&2&&Pe("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[G]})}return e})();var ls="VALID",ul="INVALID",Ao="PENDING",us="DISABLED",jn=class{},ml=class extends jn{value;source;constructor(n,t){super(),this.value=n,this.source=t}},fs=class extends jn{pristine;source;constructor(n,t){super(),this.pristine=n,this.source=t}},hs=class extends jn{touched;source;constructor(n,t){super(),this.touched=n,this.source=t}},No=class extends jn{status;source;constructor(n,t){super(),this.status=n,this.source=t}},gl=class extends jn{source;constructor(n){super(),this.source=n}},ps=class extends jn{source;constructor(n){super(),this.source=n}};function kp(e){return(Dl(e)?e.validators:e)||null}function MN(e){return Array.isArray(e)?Rp(e):e||null}function Fp(e,n){return(Dl(n)?n.asyncValidators:e)||null}function SN(e){return Array.isArray(e)?Op(e):e||null}function Dl(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function SE(e,n,t){let r=e.controls;if(!(n?Object.keys(r):r).length)throw new v(1e3,"");if(!r[t])throw new v(1001,"")}function TE(e,n,t){e._forEachChild((r,o)=>{if(t[o]===void 0)throw new v(1002,"")})}var Oo=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(n,t){this._assignValidators(n),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get status(){return Le(this.statusReactive)}set status(n){Le(()=>this.statusReactive.set(n))}_status=Er(()=>this.statusReactive());statusReactive=be(void 0);get valid(){return this.status===ls}get invalid(){return this.status===ul}get pending(){return this.status==Ao}get disabled(){return this.status===us}get enabled(){return this.status!==us}errors;get pristine(){return Le(this.pristineReactive)}set pristine(n){Le(()=>this.pristineReactive.set(n))}_pristine=Er(()=>this.pristineReactive());pristineReactive=be(!0);get dirty(){return!this.pristine}get touched(){return Le(this.touchedReactive)}set touched(n){Le(()=>this.touchedReactive.set(n))}_touched=Er(()=>this.touchedReactive());touchedReactive=be(!1);get untouched(){return!this.touched}_events=new N;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(sE(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(sE(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(aE(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(aE(n,this._rawAsyncValidators))}hasValidator(n){return fl(this._rawValidators,n)}hasAsyncValidator(n){return fl(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){let t=this.touched===!1;this.touched=!0;let r=n.sourceControl??this;n.onlySelf||this._parent?.markAsTouched(V(w({},n),{sourceControl:r})),t&&n.emitEvent!==!1&&this._events.next(new hs(!0,r))}markAllAsDirty(n={}){this.markAsDirty({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(n))}markAllAsTouched(n={}){this.markAsTouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(n))}markAsUntouched(n={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=n.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:r})}),n.onlySelf||this._parent?._updateTouched(n,r),t&&n.emitEvent!==!1&&this._events.next(new hs(!1,r))}markAsDirty(n={}){let t=this.pristine===!0;this.pristine=!1;let r=n.sourceControl??this;n.onlySelf||this._parent?.markAsDirty(V(w({},n),{sourceControl:r})),t&&n.emitEvent!==!1&&this._events.next(new fs(!1,r))}markAsPristine(n={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=n.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:n.emitEvent})}),n.onlySelf||this._parent?._updatePristine(n,r),t&&n.emitEvent!==!1&&this._events.next(new fs(!0,r))}markAsPending(n={}){this.status=Ao;let t=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new No(this.status,t)),this.statusChanges.emit(this.status)),n.onlySelf||this._parent?.markAsPending(V(w({},n),{sourceControl:t}))}disable(n={}){let t=this._parentMarkedDirty(n.onlySelf);this.status=us,this.errors=null,this._forEachChild(o=>{o.disable(V(w({},n),{onlySelf:!0}))}),this._updateValue();let r=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new ml(this.value,r)),this._events.next(new No(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(V(w({},n),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(n={}){let t=this._parentMarkedDirty(n.onlySelf);this.status=ls,this._forEachChild(r=>{r.enable(V(w({},n),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors(V(w({},n),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n,t){n.onlySelf||(this._parent?.updateValueAndValidity(n),n.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===ls||this.status===Ao)&&this._runAsyncValidator(r,n.emitEvent)}let t=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new ml(this.value,t)),this._events.next(new No(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),n.onlySelf||this._parent?.updateValueAndValidity(V(w({},n),{sourceControl:t}))}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?us:ls}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n,t){if(this.asyncValidator){this.status=Ao,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:n!==!1};let r=bE(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:t,shouldHaveEmitted:n})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let n=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,n}return!1}setErrors(n,t={}){this.errors=n,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(n){let t=n;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((r,o)=>r&&r._find(o),this)}getError(n,t){let r=t?this.get(t):this;return r?.errors?r.errors[n]:null}hasError(n,t){return!!this.getError(n,t)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n,t,r){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),(n||r)&&this._events.next(new No(this.status,t)),this._parent&&this._parent._updateControlsErrors(n,t,r)}_initObservables(){this.valueChanges=new U,this.statusChanges=new U}_calculateStatus(){return this._allControlsDisabled()?us:this.errors?ul:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Ao)?Ao:this._anyControlsHaveStatus(ul)?ul:ls}_anyControlsHaveStatus(n){return this._anyControls(t=>t.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n,t){let r=!this._anyControlsDirty(),o=this.pristine!==r;this.pristine=r,n.onlySelf||this._parent?._updatePristine(n,t),o&&this._events.next(new fs(this.pristine,t))}_updateTouched(n={},t){this.touched=this._anyControlsTouched(),this._events.next(new hs(this.touched,t)),n.onlySelf||this._parent?._updateTouched(n,t)}_onDisabledChange=[];_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){Dl(n)&&n.updateOn!=null&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=MN(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=SN(this._rawAsyncValidators)}},Nr=class extends Oo{constructor(n,t,r){super(kp(t),Fp(r,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(n,t){return this.controls[n]?this.controls[n]:(this.controls[n]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(n,t,r={}){this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(n,t={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(n,t,r={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],t&&this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,t={}){TE(this,!0,n),Object.keys(n).forEach(r=>{SE(this,!0,r),this.controls[r].setValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){n!=null&&(Object.keys(n).forEach(r=>{let o=this.controls[r];o&&o.patchValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n={},t={}){this._forEachChild((r,o)=>{r.reset(n?n[o]:null,V(w({},t),{onlySelf:!0}))}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t),t?.emitEvent!==!1&&this._events.next(new ps(this))}getRawValue(){return this._reduceChildren({},(n,t,r)=>(n[r]=t.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(t,r)=>r._syncPendingControls()?!0:t);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(t=>{let r=this.controls[t];r&&n(r,t)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(let[t,r]of Object.entries(this.controls))if(this.contains(t)&&n(r))return!0;return!1}_reduceValue(){let n={};return this._reduceChildren(n,(t,r,o)=>((r.enabled||this.disabled)&&(t[o]=r.value),t))}_reduceChildren(n,t){let r=n;return this._forEachChild((o,i)=>{r=t(r,o,i)}),r}_allControlsDisabled(){for(let n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}};var R9=Nr;var Tp=class extends Nr{};var ko=new y("",{factory:()=>El}),El="always";function wl(e,n){return[...n.path,e]}function ms(e,n,t=El){Pp(e,n),n.valueAccessor.writeValue(e.value),(e.disabled||t==="always")&&n.valueAccessor.setDisabledState?.(e.disabled),xN(e,n),NN(e,n),AN(e,n),TN(e,n)}function yl(e,n,t=!0){let r=()=>{};n?.valueAccessor?.registerOnChange(r),n?.valueAccessor?.registerOnTouched(r),bl(e,n),e&&(n._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function vl(e,n){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(n)})}function TN(e,n){if(n.valueAccessor.setDisabledState){let t=r=>{n.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(t),n._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}function Pp(e,n){let t=IE(e);n.validator!==null?e.setValidators(iE(t,n.validator)):typeof t=="function"&&e.setValidators([t]);let r=ME(e);n.asyncValidator!==null?e.setAsyncValidators(iE(r,n.asyncValidator)):typeof r=="function"&&e.setAsyncValidators([r]);let o=()=>e.updateValueAndValidity();vl(n._rawValidators,o),vl(n._rawAsyncValidators,o)}function bl(e,n){let t=!1;if(e!==null){if(n.validator!==null){let o=IE(e);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==n.validator);i.length!==o.length&&(t=!0,e.setValidators(i))}}if(n.asyncValidator!==null){let o=ME(e);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==n.asyncValidator);i.length!==o.length&&(t=!0,e.setAsyncValidators(i))}}}let r=()=>{};return vl(n._rawValidators,r),vl(n._rawAsyncValidators,r),t}function xN(e,n){n.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,e.updateOn==="change"&&xE(e,n)})}function AN(e,n){n.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,e.updateOn==="blur"&&e._pendingChange&&xE(e,n),e.updateOn!=="submit"&&e.markAsTouched()})}function xE(e,n){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function NN(e,n){let t=(r,o)=>{n.valueAccessor.writeValue(r),o&&n.viewToModelUpdate(r)};e.registerOnChange(t),n._registerOnDestroy(()=>{e._unregisterOnChange(t)})}function AE(e,n){e==null,Pp(e,n)}function RN(e,n){return bl(e,n)}function Lp(e,n){if(!e.hasOwnProperty("model"))return!1;let t=e.model;return t.isFirstChange()?!0:!Object.is(n,t.currentValue)}function ON(e){return Object.getPrototypeOf(e.constructor)===_l}function NE(e,n){e._syncPendingControls(),n.forEach(t=>{let r=t.control;r.updateOn==="submit"&&r._pendingChange&&(t.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function Vp(e,n){if(!n)return null;Array.isArray(n);let t,r,o;return n.forEach(i=>{i.constructor===pE?t=i:ON(i)?r=i:o=i}),o||r||t||null}function kN(e,n){let t=e.indexOf(n);t>-1&&e.splice(t,1)}var FN={provide:je,useExisting:de(()=>PN)},ds=Promise.resolve(),PN=(()=>{class e extends je{callSetDisabledState;get submitted(){return Le(this.submittedReactive)}_submitted=Er(()=>this.submittedReactive());submittedReactive=be(!1);_directives=new Set;form;ngSubmit=new U;options;constructor(t,r,o){super(),this.callSetDisabledState=o,this.form=new Nr({},Rp(t),Op(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){ds.then(()=>{let r=this._findContainer(t.path);t.control=r.registerControl(t.name,t.control),ms(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){ds.then(()=>{this._findContainer(t.path)?.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){ds.then(()=>{let r=this._findContainer(t.path),o=new Nr({});AE(o,t),r.registerControl(t.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){ds.then(()=>{this._findContainer(t.path)?.removeControl?.(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,r){ds.then(()=>{this.form.get(t.path).setValue(r)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submittedReactive.set(!0),NE(this.form,this._directives),this.ngSubmit.emit(t),this.form._events.next(new gl(this.control)),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}static \u0275fac=function(r){return new(r||e)(D(Gt,10),D(Or,10),D(ko,8))};static \u0275dir=T({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,o){r&1&&cn("submit",function(s){return o.onSubmit(s)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[me([FN]),G]})}return e})();function cE(e,n){let t=e.indexOf(n);t>-1&&e.splice(t,1)}function lE(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===2&&"value"in e&&"disabled"in e}var Ro=class extends Oo{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(n=null,t,r){super(kp(t),Fp(r,t)),this._applyFormState(n),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Dl(t)&&(t.nonNullable||t.initialValueIsDefault)&&(lE(n)?this.defaultValue=n.value:this.defaultValue=n)}setValue(n,t={}){this.value=this._pendingValue=n,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(n,t={}){this.setValue(n,t)}reset(n=this.defaultValue,t={}){this._applyFormState(n),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),t.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new ps(this))}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){cE(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){cE(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(n){lE(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},k9=Ro,LN=e=>e instanceof Ro,VN=(()=>{class e extends je{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective?.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return wl(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275dir=T({type:e,standalone:!1,features:[G]})}return e})();var jN={provide:pn,useExisting:de(()=>BN)},uE=Promise.resolve(),BN=(()=>{class e extends pn{_changeDetectorRef;callSetDisabledState;control=new Ro;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new U;constructor(t,r,o,i,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=Vp(this,i)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let r=t.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),Lp(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){ms(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){uE.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let r=t.isDisabled.currentValue,o=r!==0&&ce(r);uE.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?wl(t,this._parent):[t]}static \u0275fac=function(r){return new(r||e)(D(je,9),D(Gt,10),D(Or,10),D(Rr,10),D(kn,8),D(ko,8))};static \u0275dir=T({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[me([jN]),G,$e]})}return e})();var F9=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return e})(),HN={provide:Rr,useExisting:de(()=>UN),multi:!0},UN=(()=>{class e extends _l{writeValue(t){let r=t??"";this.setProperty("value",r)}registerOnChange(t){this.onChange=r=>{t(r==""?null:parseFloat(r))}}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275dir=T({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(r,o){r&1&&cn("input",function(s){return o.onChange(s.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[me([HN]),G]})}return e})();var xp=class extends Oo{constructor(n,t,r){super(kp(t),Fp(r,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(n){return this.controls[this._adjustIndex(n)]}push(n,t={}){Array.isArray(n)?n.forEach(r=>{this.controls.push(r),this._registerControl(r)}):(this.controls.push(n),this._registerControl(n)),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(n,t,r={}){this.controls.splice(n,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(n,t={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(n,t,r={}){let o=this._adjustIndex(n);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),t&&(this.controls.splice(o,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,t={}){TE(this,!1,n),n.forEach((r,o)=>{SE(this,!1,o),this.at(o).setValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){n!=null&&(n.forEach((r,o)=>{this.at(o)&&this.at(o).patchValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n=[],t={}){this._forEachChild((r,o)=>{r.reset(n[o],V(w({},t),{onlySelf:!0}))}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t),t?.emitEvent!==!1&&this._events.next(new ps(this))}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((t,r)=>r._syncPendingControls()?!0:t,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((t,r)=>{n(t,r)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(t=>t.enabled&&n(t))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(let n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}};var RE=(()=>{class e extends je{callSetDisabledState;get submitted(){return Le(this._submittedReactive)}set submitted(t){this._submittedReactive.set(t)}_submitted=Er(()=>this._submittedReactive());_submittedReactive=be(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(t,r,o){super(),this.callSetDisabledState=o,this._setValidators(t),this._setAsyncValidators(r)}ngOnChanges(t){this.onChanges(t)}ngOnDestroy(){this.onDestroy()}onChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(bl(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(t){let r=this.form.get(t.path);return ms(r,t,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),r}getControl(t){return this.form.get(t.path)}removeControl(t){yl(t.control||null,t,!1),kN(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}getFormArray(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}updateModel(t,r){this.form.get(t.path).setValue(r)}onReset(){this.resetForm()}resetForm(t=void 0,r={}){this.form.reset(t,r),this._submittedReactive.set(!1)}onSubmit(t){return this.submitted=!0,NE(this.form,this.directives),this.ngSubmit.emit(t),this.form._events.next(new gl(this.control)),t?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(t=>{let r=t.control,o=this.form.get(t.path);r!==o&&(yl(r||null,t),LN(o)&&(ms(o,t,this.callSetDisabledState),t.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let r=this.form.get(t.path);AE(r,t),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){let r=this.form?.get(t.path);r&&RN(r,t)&&r.updateValueAndValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{})}_updateValidators(){Pp(this.form,this),this._oldForm&&bl(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(r){return new(r||e)(D(Gt,10),D(Or,10),D(ko,8))};static \u0275dir=T({type:e,features:[G,$e]})}return e})();var jp=new y(""),$N={provide:pn,useExisting:de(()=>zN)},zN=(()=>{class e extends pn{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(t){}model;update=new U;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(t,r,o,i,s){super(),this._ngModelWarningConfig=i,this.callSetDisabledState=s,this._setValidators(t),this._setAsyncValidators(r),this.valueAccessor=Vp(this,o)}ngOnChanges(t){if(this._isControlChanged(t)){let r=t.form.previousValue;r&&yl(r,this,!1),ms(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Lp(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&yl(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}static \u0275fac=function(r){return new(r||e)(D(Gt,10),D(Or,10),D(Rr,10),D(jp,8),D(ko,8))};static \u0275dir=T({type:e,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[me([$N]),G,$e]})}return e})(),GN={provide:je,useExisting:de(()=>OE)},OE=(()=>{class e extends VN{name=null;constructor(t,r,o){super(),this._parent=t,this._setValidators(r),this._setAsyncValidators(o)}_checkParentType(){FE(this._parent)}static \u0275fac=function(r){return new(r||e)(D(je,13),D(Gt,10),D(Or,10))};static \u0275dir=T({type:e,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[me([GN]),G]})}return e})(),WN={provide:je,useExisting:de(()=>kE)},kE=(()=>{class e extends je{_parent;name=null;constructor(t,r,o){super(),this._parent=t,this._setValidators(r),this._setAsyncValidators(o)}ngOnInit(){FE(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return wl(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(r){return new(r||e)(D(je,13),D(Gt,10),D(Or,10))};static \u0275dir=T({type:e,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[me([WN]),G]})}return e})();function FE(e){return!(e instanceof OE)&&!(e instanceof RE)&&!(e instanceof kE)}var qN={provide:pn,useExisting:de(()=>YN)},YN=(()=>{class e extends pn{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(t){}model;update=new U;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(t,r,o,i,s){super(),this._ngModelWarningConfig=s,this._parent=t,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=Vp(this,i)}ngOnChanges(t){this._added||this._setUpControl(),Lp(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective?.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return wl(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(r){return new(r||e)(D(je,13),D(Gt,10),D(Or,10),D(Rr,10),D(jp,8))};static \u0275dir=T({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[me([qN]),G,$e]})}return e})();var ZN={provide:je,useExisting:de(()=>KN)},KN=(()=>{class e extends RE{form=null;ngSubmit=new U;get control(){return this.form}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275dir=T({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&cn("submit",function(s){return o.onSubmit(s)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[me([ZN]),G]})}return e})(),XN={provide:Rr,useExisting:de(()=>LE),multi:!0};function PE(e,n){return e==null?`${n}`:(n&&typeof n=="object"&&(n="Object"),`${e}: ${n}`.slice(0,50))}function QN(e){return e.split(":")[0]}var LE=(()=>{class e extends _l{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=f(Fe).injector;destroyRef=f(xe);cdr=f(kn);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,Ut({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let r=this._getOptionId(t),o=PE(r,t);this.setProperty("value",o)}registerOnChange(t){this.onChange=r=>{this.value=this._getOptionValue(r),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),t))return r;return null}_getOptionValue(t){let r=QN(t);return this._optionMap.has(r)?this._optionMap.get(r):t}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275dir=T({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,o){r&1&&cn("change",function(s){return o.onChange(s.target.value)})("blur",function(){return o.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[me([XN]),G]})}return e})(),P9=(()=>{class e{_element;_renderer;_select;id;constructor(t,r,o){this._element=t,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(PE(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(r){return new(r||e)(D(H),D(Ne),D(LE,9))};static \u0275dir=T({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})(),JN={provide:Rr,useExisting:de(()=>VE),multi:!0};function dE(e,n){return e==null?`${n}`:(typeof n=="string"&&(n=`'${n}'`),n&&typeof n=="object"&&(n="Object"),`${e}: ${n}`.slice(0,50))}function eR(e){return e.split(":")[0]}var VE=(()=>{class e extends _l{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let r;if(Array.isArray(t)){let o=t.map(i=>this._getOptionId(i));r=(i,s)=>{i._setSelected(o.indexOf(s.toString())>-1)}}else r=(o,i)=>{o._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(t){this.onChange=r=>{let o=[],i=r.selectedOptions;if(i!==void 0){let s=i;for(let a=0;a{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275dir=T({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,o){r&1&&cn("change",function(s){return o.onChange(s.target)})("blur",function(){return o.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[me([JN]),G]})}return e})(),L9=(()=>{class e{_element;_renderer;_select;id;_value;constructor(t,r,o){this._element=t,this._renderer=r,this._select=o,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(dE(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(dE(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(r){return new(r||e)(D(H),D(Ne),D(VE,9))};static \u0275dir=T({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})();function jE(e){return typeof e=="number"?e:parseFloat(e)}var Bp=(()=>{class e{_validator=dl;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let r=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):dl,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(r){return new(r||e)};static \u0275dir=T({type:e,features:[$e]})}return e})(),tR={provide:Gt,useExisting:de(()=>nR),multi:!0},nR=(()=>{class e extends Bp{max;inputName="max";normalizeInput=t=>jE(t);createValidator=t=>gE(t);static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275dir=T({type:e,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&an("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[me([tR]),G]})}return e})(),rR={provide:Gt,useExisting:de(()=>oR),multi:!0},oR=(()=>{class e extends Bp{min;inputName="min";normalizeInput=t=>jE(t);createValidator=t=>mE(t);static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275dir=T({type:e,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(r,o){r&2&&an("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[me([rR]),G]})}return e})(),iR={provide:Gt,useExisting:de(()=>sR),multi:!0};var sR=(()=>{class e extends Bp{required;inputName="required";normalizeInput=ce;createValidator=t=>yE;enabled(t){return t}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275dir=T({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(r,o){r&2&&an("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[me([iR]),G]})}return e})();var BE=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({})}return e})();function fE(e){return!!e&&(e.asyncValidators!==void 0||e.validators!==void 0||e.updateOn!==void 0)}var aR=(()=>{class e{useNonNullable=!1;get nonNullable(){let t=new e;return t.useNonNullable=!0,t}group(t,r=null){let o=this._reduceControls(t),i={};return fE(r)?i=r:r!==null&&(i.validators=r.validator,i.asyncValidators=r.asyncValidator),new Nr(o,i)}record(t,r=null){let o=this._reduceControls(t);return new Tp(o,r)}control(t,r,o){let i={};return this.useNonNullable?(fE(r)?i=r:(i.validators=r,i.asyncValidators=o),new Ro(t,V(w({},i),{nonNullable:!0}))):new Ro(t,r,o)}array(t,r,o){let i=t.map(s=>this._createControl(s));return new xp(i,r,o)}_reduceControls(t){let r={};return Object.keys(t).forEach(o=>{r[o]=this._createControl(t[o])}),r}_createControl(t){if(t instanceof Ro)return t;if(t instanceof Oo)return t;if(Array.isArray(t)){let r=t[0],o=t.length>1?t[1]:null,i=t.length>2?t[2]:null;return this.control(r,o,i)}else return this.control(t)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var V9=(()=>{class e extends aR{group(t,r=null){return super.group(t,r)}control(t,r,o){return super.control(t,r,o)}array(t,r,o){return super.array(t,r,o)}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Ae(e)))(o||e)}})();static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),j9=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:ko,useValue:t.callSetDisabledState??El}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({imports:[BE]})}return e})(),B9=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:jp,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:ko,useValue:t.callSetDisabledState??El}]}}static \u0275fac=function(r){return new(r||e)};static \u0275mod=K({type:e});static \u0275inj=W({imports:[BE]})}return e})();var Cl=class e extends Error{originalError;constructor(n){super(n)}static fromError(n,t){let r=new e(n);return r.originalError=t,r}},cR=(()=>{class e{handleError(t){let r=t;return t.name==="HttpErrorResponse"&&t.status===0?r=Cl.fromError("Controller is unreachable",t):t.error?.message&&(r=Cl.fromError(t.error.message,t)),jl(()=>r)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac})}return e})(),Y9=(()=>{class e{http;errorHandler;requestsNotificationEmitter=new U;constructor(t,r){this.http=t,this.errorHandler=r}get(t,r,o){o=this.getJsonOptions(o);let i=this.getOptionsForController(t,r,o);return this.requestsNotificationEmitter.emit(`GET ${i.url}`),this.http.get(i.url,i.options).pipe(He(this.errorHandler.handleError))}getText(t,r,o){o=this.getTextOptions(o);let i=this.getOptionsForController(t,r,o);return this.requestsNotificationEmitter.emit(`GET ${i.url}`),this.http.get(i.url,i.options).pipe(He(this.errorHandler.handleError))}getBlob(t,r,o){o=this.getBlobOptions(o);let i=this.getOptionsForController(t,r,o);return this.requestsNotificationEmitter.emit(`GET ${i.url}`),this.http.get(i.url,i.options).pipe(He(this.errorHandler.handleError))}post(t,r,o,i){i=this.getJsonOptions(i);let s=this.getOptionsForController(t,r,i);return this.requestsNotificationEmitter.emit(`POST ${s.url}`),this.http.post(s.url,o,s.options).pipe(He(this.errorHandler.handleError))}postBlob(t,r,o){let i={responseType:"blob",headers:{}},s=this.getOptionsForController(t,r,i);return this.requestsNotificationEmitter.emit(`POST ${s.url}`),this.http.post(s.url,o,s.options).pipe(He(this.errorHandler.handleError))}put(t,r,o,i){i=this.getJsonOptions(i);let s=this.getOptionsForController(t,r,i);return this.requestsNotificationEmitter.emit(`PUT ${s.url}`),this.http.put(s.url,o,s.options).pipe(He(this.errorHandler.handleError))}delete(t,r,o){o=this.getJsonOptions(o);let i=this.getOptionsForController(t,r,o);return this.requestsNotificationEmitter.emit(`DELETE ${i.url}`),this.http.delete(i.url,i.options).pipe(He(this.errorHandler.handleError))}patch(t,r,o,i){i=this.getJsonOptions(i);let s=this.getOptionsForController(t,r,i);return this.http.patch(s.url,o,s.options).pipe(He(this.errorHandler.handleError))}head(t,r,o){o=this.getJsonOptions(o);let i=this.getOptionsForController(t,r,o);return this.http.head(i.url,i.options).pipe(He(this.errorHandler.handleError))}options(t,r,o){o=this.getJsonOptions(o);let i=this.getOptionsForController(t,r,o);return this.http.options(i.url,i.options).pipe(He(this.errorHandler.handleError))}getJsonOptions(t){return t||{responseType:"json"}}getTextOptions(t){return t||{responseType:"text"}}getBlobOptions(t){return t||{responseType:"blob"}}getOptionsForController(t,r,o){return t&&t.host&&t.port?(t.protocol||(t.protocol=location.protocol),r=`${t.protocol}//${t.host}:${t.port}/${lp.current_version}${r}`):r=`/${lp.current_version}${r}`,o.headers||(o.headers={}),t&&t.authToken&&!t.tokenExpired&&(o.headers.Authorization=`Bearer ${t.authToken}`),{url:r,options:o}}static \u0275fac=function(r){return new(r||e)(I(Uc),I(cR))};static \u0275prov=g({token:e,factory:e.\u0275fac})}return e})();var Hp=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected=null;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new N;constructor(n=!1,t,r=!0,o){this._multiple=n,this._emitChanges=r,this.compareWith=o,t&&t.length&&(n?t.forEach(i=>this._markSelected(i)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...n){this._verifyValueAssignment(n),n.forEach(r=>this._markSelected(r));let t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...n){this._verifyValueAssignment(n),n.forEach(r=>this._unmarkSelected(r));let t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...n){this._verifyValueAssignment(n);let t=this.selected,r=new Set(n.map(i=>this._getConcreteValue(i)));n.forEach(i=>this._markSelected(i)),t.filter(i=>!r.has(this._getConcreteValue(i,r))).forEach(i=>this._unmarkSelected(i));let o=this._hasQueuedChanges();return this._emitChangeEvent(),o}toggle(n){return this.isSelected(n)?this.deselect(n):this.select(n)}clear(n=!0){this._unmarkAll();let t=this._hasQueuedChanges();return n&&this._emitChangeEvent(),t}isSelected(n){return this._selection.has(this._getConcreteValue(n))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(n){this._multiple&&this.selected&&this._selected.sort(n)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(n){n=this._getConcreteValue(n),this.isSelected(n)||(this._multiple||this._unmarkAll(),this.isSelected(n)||this._selection.add(n),this._emitChanges&&this._selectedToEmit.push(n))}_unmarkSelected(n){n=this._getConcreteValue(n),this.isSelected(n)&&(this._selection.delete(n),this._emitChanges&&this._deselectedToEmit.push(n))}_unmarkAll(){this.isEmpty()||this._selection.forEach(n=>this._unmarkSelected(n))}_verifyValueAssignment(n){n.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(n,t){if(this.compareWith){t=t??this._selection;for(let r of t)if(this.compareWith(n,r))return r;return n}else return n}};var lR=(()=>{class e{_listeners=[];notify(t,r){for(let o of this._listeners)o(t,r)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(r=>t!==r)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(r){return new(r||e)};static \u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var HE=class{applyChanges(n,t,r,o,i){n.forEachOperation((s,a,c)=>{let l,u;if(s.previousIndex==null){let d=r(s,a,c);l=t.createEmbeddedView(d.templateRef,d.context,d.index),u=zt.INSERTED}else c==null?(t.remove(a),u=zt.REMOVED):(l=t.get(a),t.move(l,c),u=zt.MOVED);i&&i({context:l?.context,operation:u,record:s})})}detach(){}};var cY=(()=>{class e{_animationsDisabled=Vn();state="unchecked";disabled=!1;appearance="full";constructor(){}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=Ce({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(r,o){r&2&&Pe("mat-pseudo-checkbox-indeterminate",o.state==="indeterminate")("mat-pseudo-checkbox-checked",o.state==="checked")("mat-pseudo-checkbox-disabled",o.disabled)("mat-pseudo-checkbox-minimal",o.appearance==="minimal")("mat-pseudo-checkbox-full",o.appearance==="full")("_mat-animation-noopable",o._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(r,o){},styles:[`.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-minimal-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-pseudo-checkbox-full-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-pseudo-checkbox-full-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-pseudo-checkbox-full-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-full-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-pseudo-checkbox-full-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-full-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px} -`],encapsulation:2,changeDetection:0})}return e})();export{w as a,V as b,YE as c,uR as d,dR as e,fR as f,B as g,JE as h,k as i,N as j,Wn as k,jo as l,Pl as m,Ll as n,qn as o,tt as p,Be as q,jl as r,vn as s,Uo as t,hw as u,re as v,Bl as w,ht as x,$o as y,bn as z,ww as A,Hl as B,Ul as C,Yn as D,Aw as E,Nw as F,we as G,zo as H,He as I,$l as J,zl as K,Rw as L,Zn as M,pt as N,Gl as O,Ow as P,Hr as Q,zs as R,Pw as S,Lw as T,Em as U,Yl as V,wm as W,Go as X,Wo as Y,Gs as Z,qt as _,Kl as $,v as aa,Ot as ba,de as ca,g as da,W as ea,Yw as fa,y as ga,I as ha,f as ia,Ym as ja,le as ka,Kr as la,ag as ma,cg as na,_g as oa,Dg as pa,j as qa,F as ra,xe as sa,fr as ta,U as ua,P as va,nt as wa,tn as xa,be as ya,io as za,$e as Aa,Ae as Ba,sf as Ca,H as Da,nn as Ea,yr as Fa,Si as Ga,jy as Ha,ze as Ia,kI as Ja,Jy as Ka,ev as La,VI as Ma,jI as Na,BI as Oa,_f as Pa,sn as Qa,Ut as Ra,Xe as Sa,De as Ta,Ne as Ua,D as Va,nS as Wa,Ge as Xa,Jv as Ya,eb as Za,Ce as _a,K as $a,T as ab,ki as bb,US as cb,G as db,ib as eb,sb as fb,ab as gb,vo as hb,vr as ib,eT as jb,ub as kb,Fe as lb,hb as mb,an as nb,nT as ob,oT as pb,zf as qb,iT as rb,sT as sb,aT as tb,cT as ub,lT as vb,pb as wb,Wa as xb,Gf as yb,mb as zb,br as Ab,_r as Bb,$t as Cb,Wf as Db,qf as Eb,yb as Fb,mT as Gb,vb as Hb,cn as Ib,_b as Jb,_T as Kb,Dr as Lb,ln as Mb,Eb as Nb,fc as Ob,Yf as Pb,Zf as Qb,wb as Rb,Cb as Sb,wT as Tb,CT as Ub,hc as Vb,Pe as Wb,Kf as Xb,GT as Yb,Ob as Zb,Xf as _b,kb as $b,Fb as ac,Pb as bc,ZT as cc,Lb as dc,KT as ec,XT as fc,me as gc,t0 as hc,n0 as ic,r0 as jc,o0 as kc,i0 as lc,a0 as mc,l0 as nc,u0 as oc,d0 as pc,f0 as qc,h0 as rc,p0 as sc,Le as tc,Er as uc,y0 as vc,Gb as wc,O8 as xc,k8 as yc,F8 as zc,P8 as Ac,L8 as Bc,V8 as Cc,j8 as Dc,kn as Ec,vc as Fc,ce as Gc,hh as Hc,H8 as Ic,U8 as Jc,U0 as Kc,bo as Lc,d_ as Mc,Ec as Nc,W0 as Oc,ix as Pc,S_ as Qc,sx as Rc,ax as Sc,cx as Tc,dx as Uc,hx as Vc,gx as Wc,Eh as Xc,A_ as Yc,aW as Zc,Nh as _c,Ax as $c,Lx as ad,Pn as bd,fn as cd,_o as dd,Cr as ed,Do as fd,Z_ as gd,Uc as hd,iA as id,E3 as jd,w3 as kd,Hh as ld,$h as md,uA as nd,Ve as od,lt as pd,Xi as qd,Qi as rd,Ir as sd,nD as td,ct as ud,oe as vd,To as wd,hn as xd,os as yd,QA as zd,up as Ad,zt as Bd,dp as Cd,nN as Dd,is as Ed,pp as Fd,xr as Gd,cN as Hd,lN as Id,hp as Jd,mp as Kd,ts as Ld,Mr as Md,gp as Nd,xo as Od,tl as Pd,C6 as Qd,I6 as Rd,jD as Sd,Zc as Td,qD as Ud,Dp as Vd,cs as Wd,Ep as Xd,al as Yd,Cp as Zd,eE as _d,Ip as $d,Mp as ae,_p as be,pN as ce,mN as de,HE as ee,Rr as fe,pE as ge,Gt as he,oE as ie,je,pn as ke,A9 as le,N9 as me,Nr as ne,R9 as oe,PN as pe,Ro as qe,k9 as re,BN as se,F9 as te,UN as ue,zN as ve,OE as we,kE as xe,YN as ye,KN as ze,P9 as Ae,L9 as Be,nR as Ce,oR as De,sR as Ee,aR as Fe,V9 as Ge,j9 as He,B9 as Ie,zc as Je,dA as Ke,qc as Le,hA as Me,Yc as Ne,Wh as Oe,I4 as Pe,hD as Qe,yA as Re,TA as Se,AA as Te,NA as Ue,Kh as Ve,Xh as We,Qh as Xe,D5 as Ye,OA as Ze,kA as _e,N5 as $e,J5 as af,H5 as bf,W5 as cf,PA as df,Vn as ef,rs as ff,ip as gf,pq as hf,ND as if,RD as jf,GA as kf,FD as lf,Wq as mf,qq as nf,lp as of,cR as pf,Y9 as qf,lR as rf,Hp as sf,cY as tf}; diff --git a/gns3server/static/web-ui/chunk-72DGZVTL.js b/gns3server/static/web-ui/chunk-72DGZVTL.js new file mode 100644 index 000000000..a1a66cdef --- /dev/null +++ b/gns3server/static/web-ui/chunk-72DGZVTL.js @@ -0,0 +1,15 @@ +var vS=Object.create;var Na=Object.defineProperty,yS=Object.defineProperties,bS=Object.getOwnPropertyDescriptor,_S=Object.getOwnPropertyDescriptors,DS=Object.getOwnPropertyNames,Ra=Object.getOwnPropertySymbols,ES=Object.getPrototypeOf,Cd=Object.prototype.hasOwnProperty,Ev=Object.prototype.propertyIsEnumerable;var Dv=(t,n,e)=>n in t?Na(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,g=(t,n)=>{for(var e in n||={})Cd.call(n,e)&&Dv(t,e,n[e]);if(Ra)for(var e of Ra(n))Ev.call(n,e)&&Dv(t,e,n[e]);return t},F=(t,n)=>yS(t,_S(n));var wS=(t,n)=>{var e={};for(var r in t)Cd.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&Ra)for(var r of Ra(t))n.indexOf(r)<0&&Ev.call(t,r)&&(e[r]=t[r]);return e};var yL=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),bL=(t,n)=>{for(var e in n)Na(t,e,{get:n[e],enumerable:!0})},CS=(t,n,e,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of DS(n))!Cd.call(t,i)&&i!==e&&Na(t,i,{get:()=>n[i],enumerable:!(r=bS(n,i))||r.enumerable});return t};var _L=(t,n,e)=>(e=t!=null?vS(ES(t)):{},CS(n||!t||!t.__esModule?Na(e,"default",{value:t,enumerable:!0}):e,t));function R(t){return typeof t=="function"}function Zn(t){let e=t(r=>{Error.call(r),r.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Oa=Zn(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription: +${e.map((r,i)=>`${i+1}) ${r.toString()}`).join(` + `)}`:"",this.name="UnsubscriptionError",this.errors=e});function wr(t,n){if(t){let e=t.indexOf(n);0<=e&&t.splice(e,1)}}var G=class t{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let o of e)o.remove(this);else e.remove(this);let{initialTeardown:r}=this;if(R(r))try{r()}catch(o){n=o instanceof Oa?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{wv(o)}catch(s){n=n??[],s instanceof Oa?n=[...n,...s.errors]:n.push(s)}}if(n)throw new Oa(n)}}add(n){var e;if(n&&n!==this)if(this.closed)wv(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(n)}}_hasParent(n){let{_parentage:e}=this;return e===n||Array.isArray(e)&&e.includes(n)}_addParent(n){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(n),e):e?[e,n]:n}_removeParent(n){let{_parentage:e}=this;e===n?this._parentage=null:Array.isArray(e)&&wr(e,n)}remove(n){let{_finalizers:e}=this;e&&wr(e,n),n instanceof t&&n._removeParent(this)}};G.EMPTY=(()=>{let t=new G;return t.closed=!0,t})();var Id=G.EMPTY;function ka(t){return t instanceof G||t&&"closed"in t&&R(t.remove)&&R(t.add)&&R(t.unsubscribe)}function wv(t){R(t)?t():t.unsubscribe()}var Nt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var yi={setTimeout(t,n,...e){let{delegate:r}=yi;return r?.setTimeout?r.setTimeout(t,n,...e):setTimeout(t,n,...e)},clearTimeout(t){let{delegate:n}=yi;return(n?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Fa(t){yi.setTimeout(()=>{let{onUnhandledError:n}=Nt;if(n)n(t);else throw t})}function Cr(){}var Cv=Sd("C",void 0,void 0);function Iv(t){return Sd("E",void 0,t)}function Sv(t){return Sd("N",t,void 0)}function Sd(t,n,e){return{kind:t,value:n,error:e}}var Ir=null;function bi(t){if(Nt.useDeprecatedSynchronousErrorHandling){let n=!Ir;if(n&&(Ir={errorThrown:!1,error:null}),t(),n){let{errorThrown:e,error:r}=Ir;if(Ir=null,e)throw r}}else t()}function Mv(t){Nt.useDeprecatedSynchronousErrorHandling&&Ir&&(Ir.errorThrown=!0,Ir.error=t)}var Sr=class extends G{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,ka(n)&&n.add(this)):this.destination=MS}static create(n,e,r){return new Ot(n,e,r)}next(n){this.isStopped?Td(Sv(n),this):this._next(n)}error(n){this.isStopped?Td(Iv(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?Td(Cv,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},IS=Function.prototype.bind;function Md(t,n){return IS.call(t,n)}var xd=class{constructor(n){this.partialObserver=n}next(n){let{partialObserver:e}=this;if(e.next)try{e.next(n)}catch(r){Pa(r)}}error(n){let{partialObserver:e}=this;if(e.error)try{e.error(n)}catch(r){Pa(r)}else Pa(n)}complete(){let{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(e){Pa(e)}}},Ot=class extends Sr{constructor(n,e,r){super();let i;if(R(n)||!n)i={next:n??void 0,error:e??void 0,complete:r??void 0};else{let o;this&&Nt.useDeprecatedNextContext?(o=Object.create(n),o.unsubscribe=()=>this.unsubscribe(),i={next:n.next&&Md(n.next,o),error:n.error&&Md(n.error,o),complete:n.complete&&Md(n.complete,o)}):i=n}this.destination=new xd(i)}};function Pa(t){Nt.useDeprecatedSynchronousErrorHandling?Mv(t):Fa(t)}function SS(t){throw t}function Td(t,n){let{onStoppedNotification:e}=Nt;e&&yi.setTimeout(()=>e(t,n))}var MS={closed:!0,next:Cr,error:SS,complete:Cr};var _i=typeof Symbol=="function"&&Symbol.observable||"@@observable";function st(t){return t}function Ad(...t){return Rd(t)}function Rd(t){return t.length===0?st:t.length===1?t[0]:function(e){return t.reduce((r,i)=>i(r),e)}}var O=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){let r=new t;return r.source=this,r.operator=e,r}subscribe(e,r,i){let o=xS(e)?e:new Ot(e,r,i);return bi(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(e){try{return this._subscribe(e)}catch(r){e.error(r)}}forEach(e,r){return r=Tv(r),new r((i,o)=>{let s=new Ot({next:a=>{try{e(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)}[_i](){return this}pipe(...e){return Rd(e)(this)}toPromise(e){return e=Tv(e),new e((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return t.create=n=>new t(n),t})();function Tv(t){var n;return(n=t??Nt.Promise)!==null&&n!==void 0?n:Promise}function TS(t){return t&&R(t.next)&&R(t.error)&&R(t.complete)}function xS(t){return t&&t instanceof Sr||TS(t)&&ka(t)}var xv=Zn(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var S=(()=>{class t extends O{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let r=new La(this,this);return r.operator=e,r}_throwIfClosed(){if(this.closed)throw new xv}next(e){bi(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(e)}})}error(e){bi(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:r}=this;for(;r.length;)r.shift().error(e)}})}complete(){bi(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:r,isStopped:i,observers:o}=this;return r||i?Id:(this.currentObservers=null,o.push(e),new G(()=>{this.currentObservers=null,wr(o,e)}))}_checkFinalizedStatuses(e){let{hasError:r,thrownError:i,isStopped:o}=this;r?e.error(i):o&&e.complete()}asObservable(){let e=new O;return e.source=this,e}}return t.create=(n,e)=>new La(n,e),t})(),La=class extends S{constructor(n,e){super(),this.destination=n,this.source=e}next(n){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.next)===null||r===void 0||r.call(e,n)}error(n){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.error)===null||r===void 0||r.call(e,n)}complete(){var n,e;(e=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||e===void 0||e.call(n)}_subscribe(n){var e,r;return(r=(e=this.source)===null||e===void 0?void 0:e.subscribe(n))!==null&&r!==void 0?r:Id}};function Nd(t){return R(t?.lift)}function k(t){return n=>{if(Nd(n))return n.lift(function(e){try{return t(e,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function N(t,n,e,r,i){return new Od(t,n,e,r,i)}var Od=class extends Sr{constructor(n,e,r,i,o,s){super(n),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=e?function(a){try{e(a)}catch(c){n.error(c)}}:super._next,this._error=i?function(a){try{i(a)}catch(c){n.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){n.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((n=this.onFinalize)===null||n===void 0||n.call(this))}}};function Rv(t,n,e,r){function i(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(u){try{l(r.next(u))}catch(d){s(d)}}function c(u){try{l(r.throw(u))}catch(d){s(d)}}function l(u){u.done?o(u.value):i(u.value).then(a,c)}l((r=r.apply(t,n||[])).next())})}function Av(t){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function Mr(t){return this instanceof Mr?(this.v=t,this):new Mr(t)}function Nv(t,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(t,n||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(p){return function(m){return Promise.resolve(m).then(p,d)}}function a(p,m){r[p]&&(i[p]=function(_){return new Promise(function(E,I){o.push([p,_,E,I])>1||c(p,_)})},m&&(i[p]=m(i[p])))}function c(p,m){try{l(r[p](m))}catch(_){h(o[0][3],_)}}function l(p){p.value instanceof Mr?Promise.resolve(p.value.v).then(u,d):h(o[0][2],p)}function u(p){c("next",p)}function d(p){c("throw",p)}function h(p,m){p(m),o.shift(),o.length&&c(o[0][0],o[0][1])}}function Ov(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t[Symbol.asyncIterator],e;return n?n.call(t):(t=typeof Av=="function"?Av(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(o){e[o]=t[o]&&function(s){return new Promise(function(a,c){s=t[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},s)}}var Di=t=>t&&typeof t.length=="number"&&typeof t!="function";function ja(t){return R(t?.then)}function Va(t){return R(t[_i])}function Ba(t){return Symbol.asyncIterator&&R(t?.[Symbol.asyncIterator])}function Ua(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function AS(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ha=AS();function $a(t){return R(t?.[Ha])}function za(t){return Nv(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:r,done:i}=yield Mr(e.read());if(i)return yield Mr(void 0);yield yield Mr(r)}}finally{e.releaseLock()}})}function Ga(t){return R(t?.getReader)}function Y(t){if(t instanceof O)return t;if(t!=null){if(Va(t))return RS(t);if(Di(t))return NS(t);if(ja(t))return OS(t);if(Ba(t))return kv(t);if($a(t))return kS(t);if(Ga(t))return FS(t)}throw Ua(t)}function RS(t){return new O(n=>{let e=t[_i]();if(R(e.subscribe))return e.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function NS(t){return new O(n=>{for(let e=0;e{t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,Fa)})}function kS(t){return new O(n=>{for(let e of t)if(n.next(e),n.closed)return;n.complete()})}function kv(t){return new O(n=>{PS(t,n).catch(e=>n.error(e))})}function FS(t){return kv(za(t))}function PS(t,n){var e,r,i,o;return Rv(this,void 0,void 0,function*(){try{for(e=Ov(t);r=yield e.next(),!r.done;){let s=r.value;if(n.next(s),n.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=e.return)&&(yield o.call(e))}finally{if(i)throw i.error}}n.complete()})}function at(t){return k((n,e)=>{Y(t).subscribe(N(e,()=>e.complete(),Cr)),!e.closed&&n.subscribe(e)})}function Fv(){return k((t,n)=>{let e=null;t._refCount++;let r=N(n,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){e=null;return}let i=t._connection,o=e;e=null,i&&(!o||i===o)&&i.unsubscribe(),n.unsubscribe()});t.subscribe(r),r.closed||(e=t.connect())})}var ko=class extends O{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,Nd(n)&&(this.lift=n.lift)}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){let n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:n}=this;this._subject=this._connection=null,n?.unsubscribe()}connect(){let n=this._connection;if(!n){n=this._connection=new G;let e=this.getSubject();n.add(this.source.subscribe(N(e,void 0,()=>{this._teardown(),e.complete()},r=>{this._teardown(),e.error(r)},()=>this._teardown()))),n.closed&&(this._connection=null,n=G.EMPTY)}return n}refCount(){return Fv()(this)}};var Ei={schedule(t){let n=requestAnimationFrame,e=cancelAnimationFrame,{delegate:r}=Ei;r&&(n=r.requestAnimationFrame,e=r.cancelAnimationFrame);let i=n(o=>{e=void 0,t(o)});return new G(()=>e?.(i))},requestAnimationFrame(...t){let{delegate:n}=Ei;return(n?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:n}=Ei;return(n?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var Ie=class extends S{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){let e=super._subscribe(n);return!e.closed&&n.next(this._value),e}getValue(){let{hasError:n,thrownError:e,_value:r}=this;if(n)throw e;return this._throwIfClosed(),r}next(n){super.next(this._value=n)}};var Fo={now(){return(Fo.delegate||Date).now()},delegate:void 0};var Po=class extends S{constructor(n=1/0,e=1/0,r=Fo){super(),this._bufferSize=n,this._windowTime=e,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,e)}next(n){let{isStopped:e,_buffer:r,_infiniteTimeWindow:i,_timestampProvider:o,_windowTime:s}=this;e||(r.push(n),!i&&r.push(o.now()+s)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(n),{_infiniteTimeWindow:r,_buffer:i}=this,o=i.slice();for(let s=0;sPv(n)&&t()),n},clearImmediate(t){Pv(t)}};var{setImmediate:jS,clearImmediate:VS}=Lv,jo={setImmediate(...t){let{delegate:n}=jo;return(n?.setImmediate||jS)(...t)},clearImmediate(t){let{delegate:n}=jo;return(n?.clearImmediate||VS)(t)},delegate:void 0};var qa=class extends Kn{constructor(n,e){super(n,e),this.scheduler=n,this.work=e}requestAsyncId(n,e,r=0){return r!==null&&r>0?super.requestAsyncId(n,e,r):(n.actions.push(this),n._scheduled||(n._scheduled=jo.setImmediate(n.flush.bind(n,void 0))))}recycleAsyncId(n,e,r=0){var i;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(n,e,r);let{actions:o}=n;e!=null&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==e&&(jo.clearImmediate(e),n._scheduled===e&&(n._scheduled=void 0))}};var wi=class t{constructor(n,e=t.now){this.schedulerActionCtor=n,this.now=e}schedule(n,e=0,r){return new this.schedulerActionCtor(this,n).schedule(r,e)}};wi.now=Fo.now;var Qn=class extends wi{constructor(n,e=wi.now){super(n,e),this.actions=[],this._active=!1}flush(n){let{actions:e}=this;if(this._active){e.push(n);return}let r;this._active=!0;do if(r=n.execute(n.state,n.delay))break;while(n=e.shift());if(this._active=!1,r){for(;n=e.shift();)n.unsubscribe();throw r}}};var Ya=class extends Qn{flush(n){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let{actions:r}=this,i;n=n||r.shift();do if(i=n.execute(n.state,n.delay))break;while((n=r[0])&&n.id===e&&r.shift());if(this._active=!1,i){for(;(n=r[0])&&n.id===e&&r.shift();)n.unsubscribe();throw i}}};var Pd=new Ya(qa);var kt=new Qn(Kn),jv=kt;var Za=class extends Kn{constructor(n,e){super(n,e),this.scheduler=n,this.work=e}requestAsyncId(n,e,r=0){return r!==null&&r>0?super.requestAsyncId(n,e,r):(n.actions.push(this),n._scheduled||(n._scheduled=Ei.requestAnimationFrame(()=>n.flush(void 0))))}recycleAsyncId(n,e,r=0){var i;if(r!=null?r>0:this.delay>0)return super.recycleAsyncId(n,e,r);let{actions:o}=n;e!=null&&e===n._scheduled&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==e&&(Ei.cancelAnimationFrame(e),n._scheduled=void 0)}};var Ka=class extends Qn{flush(n){this._active=!0;let e;n?e=n.id:(e=this._scheduled,this._scheduled=void 0);let{actions:r}=this,i;n=n||r.shift();do if(i=n.execute(n.state,n.delay))break;while((n=r[0])&&n.id===e&&r.shift());if(this._active=!1,i){for(;(n=r[0])&&n.id===e&&r.shift();)n.unsubscribe();throw i}}};var Ld=new Ka(Za);var Se=new O(t=>t.complete());function Qa(t){return t&&R(t.schedule)}function jd(t){return t[t.length-1]}function Xa(t){return R(jd(t))?t.pop():void 0}function tn(t){return Qa(jd(t))?t.pop():void 0}function Vv(t,n){return typeof jd(t)=="number"?t.pop():n}function $e(t,n,e,r=0,i=!1){let o=n.schedule(function(){e(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Ja(t,n=0){return k((e,r)=>{e.subscribe(N(r,i=>$e(r,t,()=>r.next(i),n),()=>$e(r,t,()=>r.complete(),n),i=>$e(r,t,()=>r.error(i),n)))})}function ec(t,n=0){return k((e,r)=>{r.add(t.schedule(()=>e.subscribe(r),n))})}function Bv(t,n){return Y(t).pipe(ec(n),Ja(n))}function Uv(t,n){return Y(t).pipe(ec(n),Ja(n))}function Hv(t,n){return new O(e=>{let r=0;return n.schedule(function(){r===t.length?e.complete():(e.next(t[r++]),e.closed||this.schedule())})})}function $v(t,n){return new O(e=>{let r;return $e(e,n,()=>{r=t[Ha](),$e(e,n,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){e.error(s);return}o?e.complete():e.next(i)},0,!0)}),()=>R(r?.return)&&r.return()})}function tc(t,n){if(!t)throw new Error("Iterable cannot be null");return new O(e=>{$e(e,n,()=>{let r=t[Symbol.asyncIterator]();$e(e,n,()=>{r.next().then(i=>{i.done?e.complete():e.next(i.value)})},0,!0)})})}function zv(t,n){return tc(za(t),n)}function Gv(t,n){if(t!=null){if(Va(t))return Bv(t,n);if(Di(t))return Hv(t,n);if(ja(t))return Uv(t,n);if(Ba(t))return tc(t,n);if($a(t))return $v(t,n);if(Ga(t))return zv(t,n)}throw Ua(t)}function se(t,n){return n?Gv(t,n):Y(t)}function T(...t){let n=tn(t);return se(t,n)}function Tr(t,n){let e=R(t)?t:()=>t,r=i=>i.error(e());return new O(n?i=>n.schedule(r,0,i):r)}function Ft(t){return!!t&&(t instanceof O||R(t.lift)&&R(t.subscribe))}var In=Zn(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function BS(t,n){let e=typeof n=="object";return new Promise((r,i)=>{let o=new Ot({next:s=>{r(s),o.unsubscribe()},error:i,complete:()=>{e?r(n.defaultValue):i(new In)}});t.subscribe(o)})}function nc(t){return t instanceof Date&&!isNaN(t)}var US=Zn(t=>function(e=null){t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e});function HS(t,n){let{first:e,each:r,with:i=$S,scheduler:o=n??kt,meta:s=null}=nc(t)?{first:t}:typeof t=="number"?{each:t}:t;if(e==null&&r==null)throw new TypeError("No timeout provided.");return k((a,c)=>{let l,u,d=null,h=0,p=m=>{u=$e(c,o,()=>{try{l.unsubscribe(),Y(i({meta:s,lastValue:d,seen:h})).subscribe(c)}catch(_){c.error(_)}},m)};l=a.subscribe(N(c,m=>{u?.unsubscribe(),h++,c.next(d=m),r>0&&p(r)},void 0,void 0,()=>{u?.closed||u?.unsubscribe(),d=null})),!h&&p(e!=null?typeof e=="number"?e:+e-o.now():r)})}function $S(t){throw new US(t)}function H(t,n){return k((e,r)=>{let i=0;e.subscribe(N(r,o=>{r.next(t.call(n,o,i++))}))})}var{isArray:zS}=Array;function GS(t,n){return zS(n)?t(...n):t(n)}function Ci(t){return H(n=>GS(t,n))}var{isArray:WS}=Array,{getPrototypeOf:qS,prototype:YS,keys:ZS}=Object;function rc(t){if(t.length===1){let n=t[0];if(WS(n))return{args:n,keys:null};if(KS(n)){let e=ZS(n);return{args:e.map(r=>n[r]),keys:e}}}return{args:t,keys:null}}function KS(t){return t&&typeof t=="object"&&qS(t)===YS}function ic(t,n){return t.reduce((e,r,i)=>(e[r]=n[i],e),{})}function Ii(...t){let n=tn(t),e=Xa(t),{args:r,keys:i}=rc(t);if(r.length===0)return se([],n);let o=new O(QS(r,n,i?s=>ic(i,s):st));return e?o.pipe(Ci(e)):o}function QS(t,n,e=st){return r=>{Wv(n,()=>{let{length:i}=t,o=new Array(i),s=i,a=i;for(let c=0;c{let l=se(t[c],n),u=!1;l.subscribe(N(r,d=>{o[c]=d,u||(u=!0,a--),a||r.next(e(o.slice()))},()=>{--s||r.complete()}))},r)},r)}}function Wv(t,n,e){t?$e(e,t,n):n()}function qv(t,n,e,r,i,o,s,a){let c=[],l=0,u=0,d=!1,h=()=>{d&&!c.length&&!l&&n.complete()},p=_=>l{o&&n.next(_),l++;let E=!1;Y(e(_,u++)).subscribe(N(n,I=>{i?.(I),o?p(I):n.next(I)},()=>{E=!0},void 0,()=>{if(E)try{for(l--;c.length&&lm(I)):m(I)}h()}catch(I){n.error(I)}}))};return t.subscribe(N(n,p,()=>{d=!0,h()})),()=>{a?.()}}function ve(t,n,e=1/0){return R(n)?ve((r,i)=>H((o,s)=>n(r,o,i,s))(Y(t(r,i))),e):(typeof n=="number"&&(e=n),k((r,i)=>qv(r,i,t,e)))}function nn(t=1/0){return ve(st,t)}function Yv(){return nn(1)}function rn(...t){return Yv()(se(t,tn(t)))}function Vo(t){return new O(n=>{Y(t()).subscribe(n)})}function Vd(...t){let n=Xa(t),{args:e,keys:r}=rc(t),i=new O(o=>{let{length:s}=e;if(!s){o.complete();return}let a=new Array(s),c=s,l=s;for(let u=0;u{d||(d=!0,l--),a[u]=h},()=>c--,void 0,()=>{(!c||!d)&&(l||o.next(r?ic(r,a):a),o.complete())}))}});return n?i.pipe(Ci(n)):i}var XS=["addListener","removeListener"],JS=["addEventListener","removeEventListener"],eM=["on","off"];function Bd(t,n,e,r){if(R(e)&&(r=e,e=void 0),r)return Bd(t,n,e).pipe(Ci(r));let[i,o]=rM(t)?JS.map(s=>a=>t[s](n,a,e)):tM(t)?XS.map(Zv(t,n)):nM(t)?eM.map(Zv(t,n)):[];if(!i&&Di(t))return ve(s=>Bd(s,n,e))(Y(t));if(!i)throw new TypeError("Invalid event target");return new O(s=>{let a=(...c)=>s.next(1o(a)})}function Zv(t,n){return e=>r=>t[e](n,r)}function tM(t){return R(t.addListener)&&R(t.removeListener)}function nM(t){return R(t.on)&&R(t.off)}function rM(t){return R(t.addEventListener)&&R(t.removeEventListener)}function xr(t=0,n,e=jv){let r=-1;return n!=null&&(Qa(n)?e=n:r=n),new O(i=>{let o=nc(t)?+t-e.now():t;o<0&&(o=0);let s=0;return e.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function iM(t=0,n=kt){return t<0&&(t=0),xr(t,t,n)}function oM(...t){let n=tn(t),e=Vv(t,1/0),r=t;return r.length?r.length===1?Y(r[0]):nn(e)(se(r,n)):Se}function fe(t,n){return k((e,r)=>{let i=0;e.subscribe(N(r,o=>t.call(n,o,i++)&&r.next(o)))})}function Kv(t){return k((n,e)=>{let r=!1,i=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,r){r=!1;let l=i;i=null,e.next(l)}s&&e.complete()},c=()=>{o=null,s&&e.complete()};n.subscribe(N(e,l=>{r=!0,i=l,o||Y(t(l)).subscribe(o=N(e,a,c))},()=>{s=!0,(!r||!o||o.closed)&&e.complete()}))})}function Bo(t,n=kt){return Kv(()=>xr(t,n))}function on(t){return k((n,e)=>{let r=null,i=!1,o;r=n.subscribe(N(e,void 0,void 0,s=>{o=Y(t(s,on(t)(n))),r?(r.unsubscribe(),r=null,o.subscribe(e)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(e))})}function Qv(t,n,e,r,i){return(o,s)=>{let a=e,c=n,l=0;o.subscribe(N(s,u=>{let d=l++;c=a?t(c,u,d):(a=!0,u),r&&s.next(c)},i&&(()=>{a&&s.next(c),s.complete()})))}}function Ud(t,n){return k(Qv(t,n,arguments.length>=2,!1,!0))}function Xn(t,n){return R(n)?ve(t,n,1):ve(t,1)}function sM(t){return Ud((n,e,r)=>!t||t(e,r)?n+1:n,0)}function Ar(t,n=kt){return k((e,r)=>{let i=null,o=null,s=null,a=()=>{if(i){i.unsubscribe(),i=null;let l=o;o=null,r.next(l)}};function c(){let l=s+t,u=n.now();if(u{o=l,s=n.now(),i||(i=n.schedule(c,t),r.add(i))},()=>{a(),r.complete()},void 0,()=>{o=i=null}))})}function Xv(t){return k((n,e)=>{let r=!1;n.subscribe(N(e,i=>{r=!0,e.next(i)},()=>{r||e.next(t),e.complete()}))})}function Be(t){return t<=0?()=>Se:k((n,e)=>{let r=0;n.subscribe(N(e,i=>{++r<=t&&(e.next(i),t<=r&&e.complete())}))})}function Jv(){return k((t,n)=>{t.subscribe(N(n,Cr))})}function Hd(t){return H(()=>t)}function $d(t,n){return n?e=>rn(n.pipe(Be(1),Jv()),e.pipe($d(t))):ve((e,r)=>Y(t(e,r)).pipe(Be(1),Hd(e)))}function aM(t,n=kt){let e=xr(t,n);return $d(()=>e)}function Si(t,n=st){return t=t??cM,k((e,r)=>{let i,o=!0;e.subscribe(N(r,s=>{let a=n(s);(o||!t(i,a))&&(o=!1,i=a,r.next(s))}))})}function cM(t,n){return t===n}function ey(t=lM){return k((n,e)=>{let r=!1;n.subscribe(N(e,i=>{r=!0,e.next(i)},()=>r?e.complete():e.error(t())))})}function lM(){return new In}function Mi(t){return k((n,e)=>{try{n.subscribe(e)}finally{e.add(t)}})}function Sn(t,n){let e=arguments.length>=2;return r=>r.pipe(t?fe((i,o)=>t(i,o,r)):st,Be(1),e?Xv(n):ey(()=>new In))}function oc(t){return t<=0?()=>Se:k((n,e)=>{let r=[];n.subscribe(N(e,i=>{r.push(i),t{for(let i of r)e.next(i);e.complete()},void 0,()=>{r=null}))})}function ty(){return k((t,n)=>{let e,r=!1;t.subscribe(N(n,i=>{let o=e;e=i,r&&n.next([o,i]),r=!0}))})}function Gd(t={}){let{connector:n=()=>new S,resetOnError:e=!0,resetOnComplete:r=!0,resetOnRefCountZero:i=!0}=t;return o=>{let s,a,c,l=0,u=!1,d=!1,h=()=>{a?.unsubscribe(),a=void 0},p=()=>{h(),s=c=void 0,u=d=!1},m=()=>{let _=s;p(),_?.unsubscribe()};return k((_,E)=>{l++,!d&&!u&&h();let I=c=c??n();E.add(()=>{l--,l===0&&!d&&!u&&(a=zd(m,i))}),I.subscribe(E),!s&&l>0&&(s=new Ot({next:ee=>I.next(ee),error:ee=>{d=!0,h(),a=zd(p,e,ee),I.error(ee)},complete:()=>{u=!0,h(),a=zd(p,r),I.complete()}}),Y(_).subscribe(s))})(o)}}function zd(t,n,...e){if(n===!0){t();return}if(n===!1)return;let r=new Ot({next:()=>{r.unsubscribe(),t()}});return Y(n(...e)).subscribe(r)}function ny(t,n,e){let r,i=!1;return t&&typeof t=="object"?{bufferSize:r=1/0,windowTime:n=1/0,refCount:i=!1,scheduler:e}=t:r=t??1/0,Gd({connector:()=>new Po(r,n,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Uo(t){return fe((n,e)=>t<=e)}function Rr(...t){let n=tn(t);return k((e,r)=>{(n?rn(t,e,n):rn(t,e)).subscribe(r)})}function Ue(t,n){return k((e,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();e.subscribe(N(r,c=>{i?.unsubscribe();let l=0,u=o++;Y(t(c,u)).subscribe(i=N(r,d=>r.next(n?n(c,d,u,l++):d),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function Wd(t,n=!1){return k((e,r)=>{let i=0;e.subscribe(N(r,o=>{let s=t(o,i++);(s||n)&&r.next(o),!s&&r.complete()}))})}function nt(t,n,e){let r=R(t)||n||e?{next:t,error:n,complete:e}:t;return r?k((i,o)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;i.subscribe(N(o,c=>{var l;(l=r.next)===null||l===void 0||l.call(r,c),o.next(c)},()=>{var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),o.complete()},c=>{var l;a=!1,(l=r.error)===null||l===void 0||l.call(r,c),o.error(c)},()=>{var c,l;a&&((c=r.unsubscribe)===null||c===void 0||c.call(r)),(l=r.finalize)===null||l===void 0||l.call(r)}))}):st}var ze=null,sc=!1,qd=1,uM=null,pe=Symbol("SIGNAL");function x(t){let n=ze;return ze=t,n}function ac(){return ze}var Jn={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Mn(t){if(sc)throw new Error("");if(ze===null)return;ze.consumerOnSignalRead(t);let n=ze.producersTail;if(n!==void 0&&n.producer===t)return;let e,r=ze.recomputing;if(r&&(e=n!==void 0?n.nextProducer:ze.producers,e!==void 0&&e.producer===t)){ze.producersTail=e,e.lastReadVersion=t.version;return}let i=t.consumersTail;if(i!==void 0&&i.consumer===ze&&(!r||fM(i,ze)))return;let o=Ai(ze),s={producer:t,consumer:ze,nextProducer:e,prevConsumer:i,lastReadVersion:t.version,nextConsumer:void 0};ze.producersTail=s,n!==void 0?n.nextProducer=s:ze.producers=s,o&&sy(t,s)}function ry(){qd++}function kr(t){if(!(Ai(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===qd)){if(!t.producerMustRecompute(t)&&!xi(t)){Ti(t);return}t.producerRecomputeValue(t),Ti(t)}}function Yd(t){if(t.consumers===void 0)return;let n=sc;sc=!0;try{for(let e=t.consumers;e!==void 0;e=e.nextConsumer){let r=e.consumer;r.dirty||dM(r)}}finally{sc=n}}function Zd(){return ze?.consumerAllowSignalWrites!==!1}function dM(t){t.dirty=!0,Yd(t),t.consumerMarkedDirty?.(t)}function Ti(t){t.dirty=!1,t.lastCleanEpoch=qd}function Tn(t){return t&&iy(t),x(t)}function iy(t){t.producersTail=void 0,t.recomputing=!0}function er(t,n){x(n),t&&oy(t)}function oy(t){t.recomputing=!1;let n=t.producersTail,e=n!==void 0?n.nextProducer:t.producers;if(e!==void 0){if(Ai(t))do e=Kd(e);while(e!==void 0);n!==void 0?n.nextProducer=void 0:t.producers=void 0}}function xi(t){for(let n=t.producers;n!==void 0;n=n.nextProducer){let e=n.producer,r=n.lastReadVersion;if(r!==e.version||(kr(e),r!==e.version))return!0}return!1}function tr(t){if(Ai(t)){let n=t.producers;for(;n!==void 0;)n=Kd(n)}t.producers=void 0,t.producersTail=void 0,t.consumers=void 0,t.consumersTail=void 0}function sy(t,n){let e=t.consumersTail,r=Ai(t);if(e!==void 0?(n.nextConsumer=e.nextConsumer,e.nextConsumer=n):(n.nextConsumer=void 0,t.consumers=n),n.prevConsumer=e,t.consumersTail=n,!r)for(let i=t.producers;i!==void 0;i=i.nextProducer)sy(i.producer,i)}function Kd(t){let n=t.producer,e=t.nextProducer,r=t.nextConsumer,i=t.prevConsumer;if(t.nextConsumer=void 0,t.prevConsumer=void 0,r!==void 0?r.prevConsumer=i:n.consumersTail=i,i!==void 0)i.nextConsumer=r;else if(n.consumers=r,!Ai(n)){let o=n.producers;for(;o!==void 0;)o=Kd(o)}return e}function Ai(t){return t.consumerIsAlwaysLive||t.consumers!==void 0}function Ho(t){uM?.(t)}function fM(t,n){let e=n.producersTail;if(e!==void 0){let r=n.producers;do{if(r===t)return!0;if(r===e)break;r=r.nextProducer}while(r!==void 0)}return!1}function $o(t,n){return Object.is(t,n)}function zo(t,n){let e=Object.create(hM);e.computation=t,n!==void 0&&(e.equal=n);let r=()=>{if(kr(e),Mn(e),e.value===sn)throw e.error;return e.value};return r[pe]=e,Ho(e),r}var Nr=Symbol("UNSET"),Or=Symbol("COMPUTING"),sn=Symbol("ERRORED"),hM=F(g({},Jn),{value:Nr,dirty:!0,error:null,equal:$o,kind:"computed",producerMustRecompute(t){return t.value===Nr||t.value===Or},producerRecomputeValue(t){if(t.value===Or)throw new Error("");let n=t.value;t.value=Or;let e=Tn(t),r,i=!1;try{r=t.computation(),x(null),i=n!==Nr&&n!==sn&&r!==sn&&t.equal(n,r)}catch(o){r=sn,t.error=o}finally{er(t,e)}if(i){t.value=n;return}t.value=r,t.version++}});function pM(){throw new Error}var ay=pM;function cy(t){ay(t)}function Qd(t){ay=t}var mM=null;function Xd(t,n){let e=Object.create(Go);e.value=t,n!==void 0&&(e.equal=n);let r=()=>ly(e);return r[pe]=e,Ho(e),[r,s=>nr(e,s),s=>cc(e,s)]}function ly(t){return Mn(t),t.value}function nr(t,n){Zd()||cy(t),t.equal(t.value,n)||(t.value=n,gM(t))}function cc(t,n){Zd()||cy(t),nr(t,n(t.value))}var Go=F(g({},Jn),{equal:$o,value:void 0,kind:"signal"});function gM(t){t.version++,ry(),Yd(t),mM?.(t)}var Jd=F(g({},Jn),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function ef(t){if(t.dirty=!1,t.version>0&&!xi(t))return;t.version++;let n=Tn(t);try{t.cleanup(),t.fn()}finally{er(t,n)}}var tf;function lc(){return tf}function an(t){let n=tf;return tf=t,n}var uy=Symbol("NotFound");function Ri(t){return t===uy||t?.name==="\u0275NotFound"}function nf(t,n,e){let r=Object.create(vM);r.source=t,r.computation=n,e!=null&&(r.equal=e);let o=()=>{if(kr(r),Mn(r),r.value===sn)throw r.error;return r.value};return o[pe]=r,Ho(r),o}function dy(t,n){kr(t),nr(t,n),Ti(t)}function fy(t,n){if(kr(t),t.value===sn)throw t.error;cc(t,n),Ti(t)}var vM=F(g({},Jn),{value:Nr,dirty:!0,error:null,equal:$o,kind:"linkedSignal",producerMustRecompute(t){return t.value===Nr||t.value===Or},producerRecomputeValue(t){if(t.value===Or)throw new Error("");let n=t.value;t.value=Or;let e=Tn(t),r,i=!1;try{let o=t.source(),s=n!==Nr&&n!==sn,a=s?{source:t.sourceValue,value:n}:void 0;r=t.computation(o,a),t.sourceValue=o,x(null),i=s&&r!==sn&&t.equal(n,r)}catch(o){r=sn,t.error=o}finally{er(t,e)}if(i){t.value=n;return}t.value=r,t.version++}});function hy(t){let n=x(null);try{return t()}finally{x(n)}}var gc="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",b=class extends Error{code;constructor(n,e){super(Dt(n,e)),this.code=n}};function yM(t){return`NG0${Math.abs(t)}`}function Dt(t,n){return`${yM(t)}${n?": "+n:""}`}var ye=globalThis;function ne(t){for(let n in t)if(t[n]===ne)return n;throw Error("")}function yy(t,n){for(let e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function Xo(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(Xo).join(", ")}]`;if(t==null)return""+t;let n=t.overriddenName||t.name;if(n)return`${n}`;let e=t.toString();if(e==null)return""+e;let r=e.indexOf(` +`);return r>=0?e.slice(0,r):e}function vc(t,n){return t?n?`${t} ${n}`:t:n||""}var bM=ne({__forward_ref__:ne});function be(t){return t.__forward_ref__=be,t}function Me(t){return gf(t)?t():t}function gf(t){return typeof t=="function"&&t.hasOwnProperty(bM)&&t.__forward_ref__===be}function v(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Z(t){return{providers:t.providers||[],imports:t.imports||[]}}function Jo(t){return _M(t,yc)}function vf(t){return Jo(t)!==null}function _M(t,n){return t.hasOwnProperty(n)&&t[n]||null}function DM(t){let n=t?.[yc]??null;return n||null}function of(t){return t&&t.hasOwnProperty(dc)?t[dc]:null}var yc=ne({\u0275prov:ne}),dc=ne({\u0275inj:ne}),y=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(n,e){this._desc=n,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=v({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function yf(t){return t&&!!t.\u0275providers}var bf=ne({\u0275cmp:ne}),_f=ne({\u0275dir:ne}),Df=ne({\u0275pipe:ne}),Ef=ne({\u0275mod:ne}),qo=ne({\u0275fac:ne}),Vr=ne({__NG_ELEMENT_ID__:ne}),py=ne({__NG_ENV_ID__:ne});function wf(t){return _c(t,"@NgModule"),t[Ef]||null}function ln(t){return _c(t,"@Component"),t[bf]||null}function bc(t){return _c(t,"@Directive"),t[_f]||null}function by(t){return _c(t,"@Pipe"),t[Df]||null}function _c(t,n){if(t==null)throw new b(-919,!1)}function un(t){return typeof t=="string"?t:t==null?"":String(t)}var _y=ne({ngErrorCode:ne}),EM=ne({ngErrorMessage:ne}),wM=ne({ngTokenPath:ne});function Cf(t,n){return Dy("",-200,n)}function Dc(t,n){throw new b(-201,!1)}function Dy(t,n,e){let r=new b(n,t);return r[_y]=n,r[EM]=t,e&&(r[wM]=e),r}function CM(t){return t[_y]}var sf;function Ey(){return sf}function Ke(t){let n=sf;return sf=t,n}function If(t,n,e){let r=Jo(t);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(e&8)return null;if(n!==void 0)return n;Dc(t,"")}var IM={},Fr=IM,SM="__NG_DI_FLAG__",af=class{injector;constructor(n){this.injector=n}retrieve(n,e){let r=Pr(e)||0;try{return this.injector.get(n,r&8?null:Fr,r)}catch(i){if(Ri(i))return i;throw i}}};function MM(t,n=0){let e=lc();if(e===void 0)throw new b(-203,!1);if(e===null)return If(t,void 0,n);{let r=TM(n),i=e.retrieve(t,r);if(Ri(i)){if(r.optional)return null;throw i}return i}}function w(t,n=0){return(Ey()||MM)(Me(t),n)}function f(t,n){return w(t,Pr(n))}function Pr(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function TM(t){return{optional:!!(t&8),host:!!(t&1),self:!!(t&2),skipSelf:!!(t&4)}}function cf(t){let n=[];for(let e=0;eArray.isArray(e)?Ec(e,n):n(e))}function Sf(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function es(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function Iy(t,n){let e=[];for(let r=0;rn;){let o=i-2;t[i]=t[o],i--}t[n]=e,t[n+1]=r}}function wc(t,n,e){let r=Oi(t,n);return r>=0?t[r|1]=e:(r=~r,Sy(t,r,n,e)),r}function Cc(t,n){let e=Oi(t,n);if(e>=0)return t[e|1]}function Oi(t,n){return AM(t,n,1)}function AM(t,n,e){let r=0,i=t.length>>e;for(;i!==r;){let o=r+(i-r>>1),s=t[o<n?i=o:r=o+1}return~(i<{e.push(s)};return Ec(n,s=>{let a=s;fc(a,o,[],r)&&(i||=[],i.push(a))}),i!==void 0&&Ty(i,o),e}function Ty(t,n){for(let e=0;e{n(o,r)})}}function fc(t,n,e,r){if(t=Me(t),!t)return!1;let i=null,o=of(t),s=!o&&ln(t);if(!o&&!s){let c=t.ngModule;if(o=of(c),o)i=c;else return!1}else{if(s&&!s.standalone)return!1;i=t}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)fc(l,n,e,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let l;Ec(o.imports,u=>{fc(u,n,e,r)&&(l||=[],l.push(u))}),l!==void 0&&Ty(l,n)}if(!a){let l=rr(i)||(()=>new i);n({provide:i,useFactory:l,deps:Ge},i),n({provide:Tf,useValue:i,multi:!0},i),n({provide:Br,useValue:()=>w(i),multi:!0},i)}let c=o.providers;if(c!=null&&!a){let l=t;Af(c,u=>{n(u,l)})}}else return!1;return i!==t&&t.providers!==void 0}function Af(t,n){for(let e of t)yf(e)&&(e=e.\u0275providers),Array.isArray(e)?Af(e,n):n(e)}var RM=ne({provide:String,useValue:ne});function xy(t){return t!==null&&typeof t=="object"&&RM in t}function NM(t){return!!(t&&t.useExisting)}function OM(t){return!!(t&&t.useFactory)}function Lr(t){return typeof t=="function"}function Ay(t){return!!t.useClass}var ts=new y(""),uc={},my={},rf;function ki(){return rf===void 0&&(rf=new Yo),rf}var re=class{},jr=class extends re{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(n,e,r,i){super(),this.parent=e,this.source=r,this.scopes=i,uf(n,s=>this.processProvider(s)),this.records.set(Mf,Ni(void 0,this)),i.has("environment")&&this.records.set(re,Ni(void 0,this));let o=this.records.get(ts);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Tf,Ge,{self:!0}))}retrieve(n,e){let r=Pr(e)||0;try{return this.get(n,Fr,r)}catch(i){if(Ri(i))return i;throw i}}destroy(){Wo(this),this._destroyed=!0;let n=x(null);try{for(let r of this._ngOnDestroyHooks)r.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let r of e)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),x(n)}}onDestroy(n){return Wo(this),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){Wo(this);let e=an(this),r=Ke(void 0),i;try{return n()}finally{an(e),Ke(r)}}get(n,e=Fr,r){if(Wo(this),n.hasOwnProperty(py))return n[py](this);let i=Pr(r),o,s=an(this),a=Ke(void 0);try{if(!(i&4)){let l=this.records.get(n);if(l===void 0){let u=jM(n)&&Jo(n);u&&this.injectableDefInScope(u)?l=Ni(lf(n),uc):l=null,this.records.set(n,l)}if(l!=null)return this.hydrate(n,l,i)}let c=i&2?ki():this.parent;return e=i&8&&e===Fr?null:e,c.get(n,e)}catch(c){let l=CM(c);throw l===-200||l===-201?new b(l,null):c}finally{Ke(a),an(s)}}resolveInjectorInitializers(){let n=x(null),e=an(this),r=Ke(void 0),i;try{let o=this.get(Br,Ge,{self:!0});for(let s of o)s()}finally{an(e),Ke(r),x(n)}}toString(){return"R3Injector[...]"}processProvider(n){n=Me(n);let e=Lr(n)?n:Me(n&&n.provide),r=FM(n);if(!Lr(n)&&n.multi===!0){let i=this.records.get(e);i||(i=Ni(void 0,uc,!0),i.factory=()=>cf(i.multi),this.records.set(e,i)),e=n,i.multi.push(n)}this.records.set(e,r)}hydrate(n,e,r){let i=x(null);try{if(e.value===my)throw Cf("");return e.value===uc&&(e.value=my,e.value=e.factory(void 0,r)),typeof e.value=="object"&&e.value&&LM(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{x(i)}}injectableDefInScope(n){if(!n.providedIn)return!1;let e=Me(n.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(n){let e=this._onDestroyHooks.indexOf(n);e!==-1&&this._onDestroyHooks.splice(e,1)}};function lf(t){let n=Jo(t),e=n!==null?n.factory:rr(t);if(e!==null)return e;if(t instanceof y)throw new b(-204,!1);if(t instanceof Function)return kM(t);throw new b(-204,!1)}function kM(t){if(t.length>0)throw new b(-204,!1);let e=DM(t);return e!==null?()=>e.factory(t):()=>new t}function FM(t){if(xy(t))return Ni(void 0,t.useValue);{let n=Rf(t);return Ni(n,uc)}}function Rf(t,n,e){let r;if(Lr(t)){let i=Me(t);return rr(i)||lf(i)}else if(xy(t))r=()=>Me(t.useValue);else if(OM(t))r=()=>t.useFactory(...cf(t.deps||[]));else if(NM(t))r=(i,o)=>w(Me(t.useExisting),o!==void 0&&o&8?8:void 0);else{let i=Me(t&&(t.useClass||t.provide));if(PM(t))r=()=>new i(...cf(t.deps));else return rr(i)||lf(i)}return r}function Wo(t){if(t.destroyed)throw new b(-205,!1)}function Ni(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function PM(t){return!!t.deps}function LM(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function jM(t){return typeof t=="function"||typeof t=="object"&&t.ngMetadataName==="InjectionToken"}function uf(t,n){for(let e of t)Array.isArray(e)?uf(e,n):e&&yf(e)?uf(e.\u0275providers,n):n(e)}function xe(t,n){let e;t instanceof jr?(Wo(t),e=t):e=new af(t);let r,i=an(e),o=Ke(void 0);try{return n()}finally{an(i),Ke(o)}}function Nf(){return Ey()!==void 0||lc()!=null}var Lt=0,A=1,P=2,Te=3,Et=4,Qe=5,Ur=6,Fi=7,me=8,An=9,jt=10,oe=11,Pi=12,Of=13,Hr=14,We=15,ar=16,$r=17,dn=18,Rn=19,kf=20,xn=21,Ic=22,ir=23,ct=24,zr=25,cr=26,le=27,Ry=1,Ff=6,lr=7,ns=8,Gr=9,ge=10;function Nn(t){return Array.isArray(t)&&typeof t[Ry]=="object"}function Vt(t){return Array.isArray(t)&&t[Ry]===!0}function Pf(t){return(t.flags&4)!==0}function fn(t){return t.componentOffset>-1}function Li(t){return(t.flags&1)===1}function Bt(t){return!!t.template}function ji(t){return(t[P]&512)!==0}function Wr(t){return(t[P]&256)===256}var Lf="svg",Ny="math";function wt(t){for(;Array.isArray(t);)t=t[Lt];return t}function jf(t,n){return wt(n[t])}function Ct(t,n){return wt(n[t.index])}function Sc(t,n){return t.data[n]}function rs(t,n){return t[n]}function Vf(t,n,e,r){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=r}function It(t,n){let e=n[t];return Nn(e)?e:e[Lt]}function Oy(t){return(t[P]&4)===4}function Mc(t){return(t[P]&128)===128}function ky(t){return Vt(t[Te])}function lt(t,n){return n==null?null:t[n]}function Bf(t){t[$r]=0}function Uf(t){t[P]&1024||(t[P]|=1024,Mc(t)&&qr(t))}function Fy(t,n){for(;t>0;)n=n[Hr],t--;return n}function is(t){return!!(t[P]&9216||t[ct]?.dirty)}function Tc(t){t[jt].changeDetectionScheduler?.notify(8),t[P]&64&&(t[P]|=1024),is(t)&&qr(t)}function qr(t){t[jt].changeDetectionScheduler?.notify(0);let n=or(t);for(;n!==null&&!(n[P]&8192||(n[P]|=8192,!Mc(n)));)n=or(n)}function Hf(t,n){if(Wr(t))throw new b(911,!1);t[xn]===null&&(t[xn]=[]),t[xn].push(n)}function Py(t,n){if(t[xn]===null)return;let e=t[xn].indexOf(n);e!==-1&&t[xn].splice(e,1)}function or(t){let n=t[Te];return Vt(n)?n[Te]:n}function $f(t){return t[Fi]??=[]}function zf(t){return t.cleanup??=[]}function Ly(t,n,e,r){let i=$f(n);i.push(e),t.firstCreatePass&&zf(t).push(r,i.length-1)}var B={lFrame:Ky(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var df=!1;function jy(){return B.lFrame.elementDepthCount}function Vy(){B.lFrame.elementDepthCount++}function Gf(){B.lFrame.elementDepthCount--}function xc(){return B.bindingsEnabled}function Wf(){return B.skipHydrationRootTNode!==null}function qf(t){return B.skipHydrationRootTNode===t}function Yf(){B.skipHydrationRootTNode=null}function C(){return B.lFrame.lView}function ce(){return B.lFrame.tView}function By(t){return B.lFrame.contextLView=t,t[me]}function Uy(t){return B.lFrame.contextLView=null,t}function Ee(){let t=Zf();for(;t!==null&&t.type===64;)t=t.parent;return t}function Zf(){return B.lFrame.currentTNode}function Hy(){let t=B.lFrame,n=t.currentTNode;return t.isParent?n:n.parent}function Vi(t,n){let e=B.lFrame;e.currentTNode=t,e.isParent=n}function Kf(){return B.lFrame.isParent}function Qf(){B.lFrame.isParent=!1}function $y(){return B.lFrame.contextLView}function Xf(){return df}function Zo(t){let n=df;return df=t,n}function hn(){let t=B.lFrame,n=t.bindingRootIndex;return n===-1&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function Jf(){return B.lFrame.bindingIndex}function zy(t){return B.lFrame.bindingIndex=t}function On(){return B.lFrame.bindingIndex++}function os(t){let n=B.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function Gy(){return B.lFrame.inI18n}function Wy(t,n){let e=B.lFrame;e.bindingIndex=e.bindingRootIndex=t,Ac(n)}function qy(){return B.lFrame.currentDirectiveIndex}function Ac(t){B.lFrame.currentDirectiveIndex=t}function Yy(t){let n=B.lFrame.currentDirectiveIndex;return n===-1?null:t[n]}function Rc(){return B.lFrame.currentQueryIndex}function ss(t){B.lFrame.currentQueryIndex=t}function VM(t){let n=t[A];return n.type===2?n.declTNode:n.type===1?t[Qe]:null}function eh(t,n,e){if(e&4){let i=n,o=t;for(;i=i.parent,i===null&&!(e&1);)if(i=VM(o),i===null||(o=o[Hr],i.type&10))break;if(i===null)return!1;n=i,t=o}let r=B.lFrame=Zy();return r.currentTNode=n,r.lView=t,!0}function Nc(t){let n=Zy(),e=t[A];B.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function Zy(){let t=B.lFrame,n=t===null?null:t.child;return n===null?Ky(t):n}function Ky(t){let n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return t!==null&&(t.child=n),n}function Qy(){let t=B.lFrame;return B.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var th=Qy;function Oc(){let t=Qy();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Xy(t){return(B.lFrame.contextLView=Fy(t,B.lFrame.contextLView))[me]}function Ut(){return B.lFrame.selectedIndex}function ur(t){B.lFrame.selectedIndex=t}function Bi(){let t=B.lFrame;return Sc(t.tView,t.selectedIndex)}function Jy(){B.lFrame.currentNamespace=Lf}function eb(){BM()}function BM(){B.lFrame.currentNamespace=null}function tb(){return B.lFrame.currentNamespace}var nb=!0;function kc(){return nb}function as(t){nb=t}function ff(t,n=null,e=null,r){let i=nh(t,n,e,r);return i.resolveInjectorInitializers(),i}function nh(t,n=null,e=null,r,i=new Set){let o=[e||Ge,My(t)],s;return new jr(o,n||ki(),s||null,i)}var $=class t{static THROW_IF_NOT_FOUND=Fr;static NULL=new Yo;static create(n,e){if(Array.isArray(n))return ff({name:""},e,n,"");{let r=n.name??"";return ff({name:r},n.parent,n.providers,r)}}static \u0275prov=v({token:t,providedIn:"any",factory:()=>w(Mf)});static __NG_ELEMENT_ID__=-1},L=new y(""),Ae=(()=>{class t{static __NG_ELEMENT_ID__=UM;static __NG_ENV_ID__=e=>e}return t})(),hc=class extends Ae{_lView;constructor(n){super(),this._lView=n}get destroyed(){return Wr(this._lView)}onDestroy(n){let e=this._lView;return Hf(e,n),()=>Py(e,n)}};function UM(){return new hc(C())}var rb=!1,ib=new y(""),kn=(()=>{class t{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Ie(!1);debugTaskTracker=f(ib,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new O(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),this.debugTaskTracker?.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.debugTaskTracker?.remove(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=v({token:t,providedIn:"root",factory:()=>new t})}return t})(),hf=class extends S{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(n=!1){super(),this.__isAsync=n,Nf()&&(this.destroyRef=f(Ae,{optional:!0})??void 0,this.pendingTasks=f(kn,{optional:!0})??void 0)}emit(n){let e=x(null);try{super.next(n)}finally{x(e)}}subscribe(n,e,r){let i=n,o=e||(()=>null),s=r;if(n&&typeof n=="object"){let c=n;i=c.next?.bind(c),o=c.error?.bind(c),s=c.complete?.bind(c)}this.__isAsync&&(o=this.wrapInTimeout(o),i&&(i=this.wrapInTimeout(i)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:i,error:o,complete:s});return n instanceof G&&n.add(a),a}wrapInTimeout(n){return e=>{let r=this.pendingTasks?.add();setTimeout(()=>{try{n(e)}finally{r!==void 0&&this.pendingTasks?.remove(r)}})}}},U=hf;function pc(...t){}function rh(t){let n,e;function r(){t=pc;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),n!==void 0&&clearTimeout(n)}catch{}}return n=setTimeout(()=>{t(),r()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{t(),r()})),()=>r()}function ob(t){return queueMicrotask(()=>t()),()=>{t=pc}}var ih="isAngularZone",Ko=ih+"_ID",HM=0,j=class t{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new U(!1);onMicrotaskEmpty=new U(!1);onStable=new U(!1);onError=new U(!1);constructor(n){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:i=!1,scheduleInRootZone:o=rb}=n;if(typeof Zone>"u")throw new b(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!i&&r,s.shouldCoalesceRunChangeDetection=i,s.callbackScheduled=!1,s.scheduleInRootZone=o,GM(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(ih)===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new b(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new b(909,!1)}run(n,e,r){return this._inner.run(n,e,r)}runTask(n,e,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,n,$M,pc,pc);try{return o.runTask(s,e,r)}finally{o.cancelTask(s)}}runGuarded(n,e,r){return this._inner.runGuarded(n,e,r)}runOutsideAngular(n){return this._outer.run(n)}},$M={};function oh(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function zM(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function n(){rh(()=>{t.callbackScheduled=!1,pf(t),t.isCheckStableRunning=!0,oh(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{n()}):t._outer.run(()=>{n()}),pf(t)}function GM(t){let n=()=>{zM(t)},e=HM++;t._inner=t._inner.fork({name:"angular",properties:{[ih]:!0,[Ko]:e,[Ko+e]:!0},onInvokeTask:(r,i,o,s,a,c)=>{if(WM(c))return r.invokeTask(o,s,a,c);try{return gy(t),r.invokeTask(o,s,a,c)}finally{(t.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&n(),vy(t)}},onInvoke:(r,i,o,s,a,c,l)=>{try{return gy(t),r.invoke(o,s,a,c,l)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!qM(c)&&n(),vy(t)}},onHasTask:(r,i,o,s)=>{r.hasTask(o,s),i===o&&(s.change=="microTask"?(t._hasPendingMicrotasks=s.microTask,pf(t),oh(t)):s.change=="macroTask"&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(r,i,o,s)=>(r.handleError(o,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}function pf(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function gy(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function vy(t){t._nesting--,oh(t)}var Qo=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new U;onMicrotaskEmpty=new U;onStable=new U;onError=new U;run(n,e,r){return n.apply(e,r)}runGuarded(n,e,r){return n.apply(e,r)}runOutsideAngular(n){return n()}runTask(n,e,r,i){return n.apply(e,r)}};function WM(t){return sb(t,"__ignore_ng_zone__")}function qM(t){return sb(t,"__scheduler_tick__")}function sb(t,n){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[n]===!0}var _t=class{_console=console;handleError(n){this._console.error("ERROR",n)}},ut=new y("",{factory:()=>{let t=f(j),n=f(re),e;return r=>{t.runOutsideAngular(()=>{n.destroyed&&!e?setTimeout(()=>{throw r}):(e??=n.get(_t),e.handleError(r))})}}}),ab={provide:Br,useValue:()=>{let t=f(_t,{optional:!0})},multi:!0};function W(t,n){let[e,r,i]=Xd(t,n?.equal),o=e,s=o[pe];return o.set=r,o.update=i,o.asReadonly=cs.bind(o),o}function cs(){let t=this[pe];if(t.readonlyFn===void 0){let n=()=>this();n[pe]=t,t.readonlyFn=n}return t.readonlyFn}var Ui=(()=>{class t{view;node;constructor(e,r){this.view=e,this.node=r}static __NG_ELEMENT_ID__=YM}return t})();function YM(){return new Ui(C(),Ee())}var cn=class{},ls=new y("",{factory:()=>!0});var sh=new y(""),Hi=(()=>{class t{internalPendingTasks=f(kn);scheduler=f(cn);errorHandler=f(ut);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let r=this.add();e().catch(this.errorHandler).finally(r)}static \u0275prov=v({token:t,providedIn:"root",factory:()=>new t})}return t})(),Fc=(()=>{class t{static \u0275prov=v({token:t,providedIn:"root",factory:()=>new mf})}return t})(),mf=class{dirtyEffectCount=0;queues=new Map;add(n){this.enqueue(n),this.schedule(n)}schedule(n){n.dirty&&this.dirtyEffectCount++}remove(n){let e=n.zone,r=this.queues.get(e);r.has(n)&&(r.delete(n),n.dirty&&this.dirtyEffectCount--)}enqueue(n){let e=n.zone;this.queues.has(e)||this.queues.set(e,new Set);let r=this.queues.get(e);r.has(n)||r.add(n)}flush(){for(;this.dirtyEffectCount>0;){let n=!1;for(let[e,r]of this.queues)e===null?n||=this.flushQueue(r):n||=e.run(()=>this.flushQueue(r));n||(this.dirtyEffectCount=0)}}flushQueue(n){let e=!1;for(let r of n)r.dirty&&(this.dirtyEffectCount--,e=!0,r.run());return e}},mc=class{[pe];constructor(n){this[pe]=n}destroy(){this[pe].destroy()}};function $i(t,n){let e=n?.injector??f($),r=n?.manualCleanup!==!0?e.get(Ae):null,i,o=e.get(Ui,null,{optional:!0}),s=e.get(cn);return o!==null?(i=QM(o.view,s,t),r instanceof hc&&r._lView===o.view&&(r=null)):i=XM(t,e.get(Fc),s),i.injector=e,r!==null&&(i.onDestroyFns=[r.onDestroy(()=>i.destroy())]),new mc(i)}var cb=F(g({},Jd),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let t=Zo(!1);try{ef(this)}finally{Zo(t)}},cleanup(){if(!this.cleanupFns?.length)return;let t=x(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],x(t)}}}),ZM=F(g({},cb),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(tr(this),this.onDestroyFns!==null)for(let t of this.onDestroyFns)t();this.cleanup(),this.scheduler.remove(this)}}),KM=F(g({},cb),{consumerMarkedDirty(){this.view[P]|=8192,qr(this.view),this.notifier.notify(13)},destroy(){if(tr(this),this.onDestroyFns!==null)for(let t of this.onDestroyFns)t();this.cleanup(),this.view[ir]?.delete(this)}});function QM(t,n,e){let r=Object.create(KM);return r.view=t,r.zone=typeof Zone<"u"?Zone.current:null,r.notifier=n,r.fn=lb(r,e),t[ir]??=new Set,t[ir].add(r),r.consumerMarkedDirty(r),r}function XM(t,n,e){let r=Object.create(ZM);return r.fn=lb(r,t),r.scheduler=n,r.notifier=e,r.zone=typeof Zone<"u"?Zone.current:null,r.scheduler.add(r),r.notifier.notify(12),r}function lb(t,n){return()=>{n(e=>(t.cleanupFns??=[]).push(e))}}function Ds(t){return{toString:t}.toString()}function iT(t){return typeof t=="function"}function Wb(t,n,e,r){n!==null?n.applyValueToInputSignal(n,r):t[e]=r}var Gc=class{previousValue;currentValue;firstChange;constructor(n,e,r){this.previousValue=n,this.currentValue=e,this.firstChange=r}isFirstChange(){return this.firstChange}},Re=(()=>{let t=()=>qb;return t.ngInherit=!0,t})();function qb(t){return t.type.prototype.ngOnChanges&&(t.setInput=sT),oT}function oT(){let t=Zb(this),n=t?.current;if(n){let e=t.previous;if(e===Pt)t.previous=n;else for(let r in n)e[r]=n[r];t.current=null,this.ngOnChanges(n)}}function sT(t,n,e,r,i){let o=this.declaredInputs[r],s=Zb(t)||aT(t,{previous:Pt,current:null}),a=s.current||(s.current={}),c=s.previous,l=c[o];a[o]=new Gc(l&&l.currentValue,e,c===Pt),Wb(t,n,i,e)}var Yb="__ngSimpleChanges__";function Zb(t){return t[Yb]||null}function aT(t,n){return t[Yb]=n}var ub=[];var ie=function(t,n=null,e){for(let r=0;r=r)break}else n[c]<0&&(t[$r]+=65536),(a>14>16&&(t[P]&3)===n&&(t[P]+=16384,db(a,o)):db(a,o)}var Gi=-1,Zr=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(n,e,r,i){this.factory=n,this.name=i,this.canSeeViewProviders=e,this.injectImpl=r}};function uT(t){return(t.flags&8)!==0}function dT(t){return(t.flags&16)!==0}function fT(t,n,e){let r=0;for(;rn){s=o-1;break}}}for(;o>16}function qc(t,n){let e=pT(t),r=n;for(;e>0;)r=r[Hr],e--;return r}var yh=!0;function Yc(t){let n=yh;return yh=t,n}var mT=256,e_=mT-1,t_=5,gT=0,pn={};function vT(t,n,e){let r;typeof e=="string"?r=e.charCodeAt(0)||0:e.hasOwnProperty(Vr)&&(r=e[Vr]),r==null&&(r=e[Vr]=gT++);let i=r&e_,o=1<>t_)]|=o}function Zc(t,n){let e=n_(t,n);if(e!==-1)return e;let r=n[A];r.firstCreatePass&&(t.injectorIndex=n.length,ch(r.data,t),ch(n,null),ch(r.blueprint,null));let i=np(t,n),o=t.injectorIndex;if(Jb(i)){let s=Wc(i),a=qc(i,n),c=a[A].data;for(let l=0;l<8;l++)n[o+l]=a[s+l]|c[s+l]}return n[o+8]=i,o}function ch(t,n){t.push(0,0,0,0,0,0,0,0,n)}function n_(t,n){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||n[t.injectorIndex+8]===null?-1:t.injectorIndex}function np(t,n){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let e=0,r=null,i=n;for(;i!==null;){if(r=a_(i),r===null)return Gi;if(e++,i=i[Hr],r.injectorIndex!==-1)return r.injectorIndex|e<<16}return Gi}function bh(t,n,e){vT(t,n,e)}function yT(t,n){if(n==="class")return t.classes;if(n==="style")return t.styles;let e=t.attrs;if(e){let r=e.length,i=0;for(;i>20,d=r?a:a+u,h=i?a+u:l;for(let p=d;p=c&&m.type===e)return p}if(i){let p=s[c];if(p&&Bt(p)&&p.type===e)return c}return null}function ps(t,n,e,r,i){let o=t[e],s=n.data;if(o instanceof Zr){let a=o;if(a.resolving)throw Cf("");let c=Yc(a.canSeeViewProviders);a.resolving=!0;let l=s[e].type||s[e],u,d=a.injectImpl?Ke(a.injectImpl):null,h=eh(t,r,0);try{o=t[e]=a.factory(void 0,i,s,t,r),n.firstCreatePass&&e>=r.directiveStart&&cT(e,s[e],n)}finally{d!==null&&Ke(d),Yc(c),a.resolving=!1,th()}}return o}function _T(t){if(typeof t=="string")return t.charCodeAt(0)||0;let n=t.hasOwnProperty(Vr)?t[Vr]:void 0;return typeof n=="number"?n>=0?n&e_:DT:n}function hb(t,n,e){let r=1<>t_)]&r)}function pb(t,n){return!(t&2)&&!(t&1&&n)}var Yr=class{_tNode;_lView;constructor(n,e){this._tNode=n,this._lView=e}get(n,e,r){return o_(this._tNode,this._lView,n,Pr(r),e)}};function DT(){return new Yr(Ee(),C())}function Ne(t){return Ds(()=>{let n=t.prototype.constructor,e=n[qo]||_h(n),r=Object.prototype,i=Object.getPrototypeOf(t.prototype).constructor;for(;i&&i!==r;){let o=i[qo]||_h(i);if(o&&o!==e)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function _h(t){return gf(t)?()=>{let n=_h(Me(t));return n&&n()}:rr(t)}function ET(t,n,e,r,i){let o=t,s=n;for(;o!==null&&s!==null&&s[P]&2048&&!ji(s);){let a=s_(o,s,e,r|2,pn);if(a!==pn)return a;let c=o.parent;if(!c){let l=s[kf];if(l){let u=l.get(e,pn,r&-5);if(u!==pn)return u}c=a_(s),s=s[Hr]}o=c}return i}function a_(t){let n=t[A],e=n.type;return e===2?n.declTNode:e===1?t[Qe]:null}function Es(t){return yT(Ee(),t)}function wT(){return Qi(Ee(),C())}function Qi(t,n){return new z(Ct(t,n))}var z=(()=>{class t{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=wT}return t})();function c_(t){return t instanceof z?t.nativeElement:t}function CT(){return this._results[Symbol.iterator]()}var Fn=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new S}constructor(n=!1){this._emitDistinctChangesOnly=n}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){this.dirty=!1;let r=Cy(n);(this._changesDetected=!wy(this._results,r,e))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(n){this._onDirty=n}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=CT};function l_(t){return(t.flags&128)===128}var rp=(function(t){return t[t.OnPush=0]="OnPush",t[t.Eager=1]="Eager",t[t.Default=1]="Default",t})(rp||{}),u_=new Map,IT=0;function ST(){return IT++}function MT(t){u_.set(t[Rn],t)}function Dh(t){u_.delete(t[Rn])}var mb="__ngContext__";function qi(t,n){Nn(n)?(t[mb]=n[Rn],MT(n)):t[mb]=n}function d_(t){return h_(t[Pi])}function f_(t){return h_(t[Et])}function h_(t){for(;t!==null&&!Vt(t);)t=t[Et];return t}var Eh;function ip(t){Eh=t}function p_(){if(Eh!==void 0)return Eh;if(typeof document<"u")return document;throw new b(210,!1)}var hr=new y("",{factory:()=>TT}),TT="ng";var ll=new y(""),Xr=new y("",{providedIn:"platform",factory:()=>"unknown"}),ws=new y(""),Xi=new y("",{factory:()=>f(L).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var m_="r";var g_="di";var v_=!1,y_=new y("",{factory:()=>v_});var ul=new y("");var xT=(t,n,e,r)=>{};function AT(t,n,e,r){xT(t,n,e,r)}function dl(t){return(t.flags&32)===32}var RT=()=>null;function b_(t,n,e=!1){return RT(t,n,e)}function __(t,n){let e=t.contentQueries;if(e!==null){let r=x(null);try{for(let i=0;it,createScript:t=>t,createScriptURL:t=>t})}catch{}return Pc}function fl(t){return NT()?.createHTML(t)||t}var Lc;function D_(){if(Lc===void 0&&(Lc=null,ye.trustedTypes))try{Lc=ye.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Lc}function gb(t){return D_()?.createHTML(t)||t}function vb(t){return D_()?.createScriptURL(t)||t}var Pn=class{changingThisBreaksApplicationSecurity;constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${gc})`}},Ch=class extends Pn{getTypeName(){return"HTML"}},Ih=class extends Pn{getTypeName(){return"Style"}},Sh=class extends Pn{getTypeName(){return"Script"}},Mh=class extends Pn{getTypeName(){return"URL"}},Th=class extends Pn{getTypeName(){return"ResourceURL"}};function ft(t){return t instanceof Pn?t.changingThisBreaksApplicationSecurity:t}function gn(t,n){let e=E_(t);if(e!=null&&e!==n){if(e==="ResourceURL"&&n==="URL")return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${gc})`)}return e===n}function E_(t){return t instanceof Pn&&t.getTypeName()||null}function sp(t){return new Ch(t)}function ap(t){return new Ih(t)}function cp(t){return new Sh(t)}function lp(t){return new Mh(t)}function up(t){return new Th(t)}function OT(t){let n=new Ah(t);return kT()?new xh(n):n}var xh=class{inertDocumentHelper;constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{let e=new window.DOMParser().parseFromString(fl(n),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(n):(e.firstChild?.remove(),e)}catch{return null}}},Ah=class{defaultDoc;inertDocument;constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){let e=this.inertDocument.createElement("template");return e.innerHTML=fl(n),e}};function kT(){try{return!!new window.DOMParser().parseFromString(fl(""),"text/html")}catch{return!1}}var FT=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Cs(t){return t=String(t),t.match(FT)?t:"unsafe:"+t}function Ln(t){let n={};for(let e of t.split(","))n[e]=!0;return n}function Is(...t){let n={};for(let e of t)for(let r in e)e.hasOwnProperty(r)&&(n[r]=!0);return n}var w_=Ln("area,br,col,hr,img,wbr"),C_=Ln("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),I_=Ln("rp,rt"),PT=Is(I_,C_),LT=Is(C_,Ln("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),jT=Is(I_,Ln("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),yb=Is(w_,LT,jT,PT),S_=Ln("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),VT=Ln("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),BT=Ln("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),UT=Is(S_,VT,BT),HT=Ln("script,style,template");var Rh=class{sanitizedSomething=!1;buf=[];sanitizeChildren(n){let e=n.firstChild,r=!0,i=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?r=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,r&&e.firstChild){i.push(e),e=GT(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let o=zT(e);if(o){e=o;break}e=i.pop()}}return this.buf.join("")}startElement(n){let e=bb(n).toLowerCase();if(!yb.hasOwnProperty(e))return this.sanitizedSomething=!0,!HT.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let r=n.attributes;for(let i=0;i"),!0}endElement(n){let e=bb(n).toLowerCase();yb.hasOwnProperty(e)&&!w_.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(_b(n))}};function $T(t,n){return(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function zT(t){let n=t.nextSibling;if(n&&t!==n.previousSibling)throw M_(n);return n}function GT(t){let n=t.firstChild;if(n&&$T(t,n))throw M_(n);return n}function bb(t){let n=t.nodeName;return typeof n=="string"?n:"FORM"}function M_(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var WT=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,qT=/([^\#-~ |!])/g;function _b(t){return t.replace(/&/g,"&").replace(WT,function(n){let e=n.charCodeAt(0),r=n.charCodeAt(1);return"&#"+((e-55296)*1024+(r-56320)+65536)+";"}).replace(qT,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}var jc;function hl(t,n){let e=null;try{jc=jc||OT(t);let r=n?String(n):"";e=jc.getInertBodyElement(r);let i=5,o=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=e.innerHTML,e=jc.getInertBodyElement(r)}while(r!==o);let a=new Rh().sanitizeChildren(Db(e)||e);return fl(a)}finally{if(e){let r=Db(e)||e;for(;r.firstChild;)r.firstChild.remove()}}}function Db(t){return"content"in t&&YT(t)?t.content:null}function YT(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var ZT=/^>|^->||--!>|)/g,QT="\u200B$1\u200B";function XT(t){return t.replace(ZT,n=>n.replace(KT,QT))}function JT(t,n){return t.createText(n)}function e0(t,n,e){t.setValue(n,e)}function t0(t,n){return t.createComment(XT(n))}function T_(t,n,e){return t.createElement(n,e)}function Kc(t,n,e,r,i){t.insertBefore(n,e,r,i)}function x_(t,n,e){t.appendChild(n,e)}function Eb(t,n,e,r,i){r!==null?Kc(t,n,e,r,i):x_(t,n,e)}function A_(t,n,e,r){t.removeChild(null,n,e,r)}function n0(t,n,e){t.setAttribute(n,"style",e)}function r0(t,n,e){e===""?t.removeAttribute(n,"class"):t.setAttribute(n,"class",e)}function R_(t,n,e){let{mergedAttrs:r,classes:i,styles:o}=e;r!==null&&fT(t,n,r),i!==null&&r0(t,n,i),o!==null&&n0(t,n,o)}var it=(function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t})(it||{});function i0(t){let n=fp();return n?gb(n.sanitize(it.HTML,t)||""):gn(t,"HTML")?gb(ft(t)):hl(p_(),un(t))}function N_(t){let n=fp();return n?n.sanitize(it.URL,t)||"":gn(t,"URL")?ft(t):Cs(un(t))}function O_(t){let n=fp();if(n)return vb(n.sanitize(it.RESOURCE_URL,t)||"");if(gn(t,"ResourceURL"))return vb(ft(t));throw new b(904,!1)}var o0=new Set(["embed","frame","iframe","media","script"]),s0=new Set(["base","link","script"]);function a0(t,n){return n==="src"&&o0.has(t)||n==="href"&&s0.has(t)||n==="xlink:href"&&t==="script"?O_:N_}function dp(t,n,e){return a0(n,e)(t)}function fp(){let t=C();return t&&t[jt].sanitizer}function c0(t){return t.ownerDocument.defaultView}function l0(t){return t.ownerDocument}function k_(t){return t instanceof Function?t():t}function u0(t,n,e){let r=t.length;for(;;){let i=t.indexOf(n,e);if(i===-1)return i;if(i===0||t.charCodeAt(i-1)<=32){let o=n.length;if(i+o===r||t.charCodeAt(i+o)<=32)return i}e=i+1}}var F_="ng-template";function d0(t,n,e,r){let i=0;if(r){for(;i-1){let o;for(;++io?d="":d=i[u+1].toLowerCase(),r&2&&l!==d){if(Ht(r))return!1;s=!0}}}}return Ht(r)||s}function Ht(t){return(t&1)===0}function p0(t,n,e,r){if(n===null)return-1;let i=0;if(r||!e){let o=!1;for(;i-1)for(e++;e0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!Ht(s)&&(n+=wb(o,i),i=""),r=s,o=o||!Ht(r);e++}return i!==""&&(n+=wb(o,i)),n}function _0(t){return t.map(b0).join(",")}function D0(t){let n=[],e=[],r=1,i=2;for(;r=0;o--){let s=e[o],a=s.parentNode;s===n?(e.splice(o,1),ds.add(s),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))):(i&&s===i||a&&r&&a!==r)&&(e.splice(o,1),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),s.parentNode?.removeChild(s))}}function M0(t,n){let e=Oh.get(t);e?e.includes(n)||e.push(n):Oh.set(t,[n])}var Kr=new Set,ml=(function(t){return t[t.CHANGE_DETECTION=0]="CHANGE_DETECTION",t[t.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",t})(ml||{}),Wt=new y(""),Cb=new Set;function qt(t){Cb.has(t)||(Cb.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}var gl=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=v({token:t,providedIn:"root",factory:()=>new t})}return t})(),bp=[0,1,2,3],_p=(()=>{class t{ngZone=f(j);scheduler=f(cn);errorHandler=f(_t,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){f(Wt,{optional:!0})}execute(){let e=this.sequences.size>0;e&&ie(K.AfterRenderHooksStart),this.executing=!0;for(let r of bp)for(let i of this.sequences)if(!(i.erroredOrDestroyed||!i.hooks[r]))try{i.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=i.hooks[r];return o(i.pipelinedValue)},i.snapshot))}catch(o){i.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let r of this.sequences)r.afterRun(),r.once&&(this.sequences.delete(r),r.destroy());for(let r of this.deferredRegistrations)this.sequences.add(r);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&ie(K.AfterRenderHooksEnd)}register(e){let{view:r}=e;r!==void 0?((r[zr]??=[]).push(e),qr(r),r[P]|=8192):this.executing?this.deferredRegistrations.add(e):this.addSequence(e)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,r){return r?r.run(ml.AFTER_NEXT_RENDER,e):e()}static \u0275prov=v({token:t,providedIn:"root",factory:()=>new t})}return t})(),ms=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(n,e,r,i,o,s=null){this.impl=n,this.hooks=e,this.view=r,this.once=i,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let n=this.view?.[zr];n&&(this.view[zr]=n.filter(e=>e!==this))}};function ht(t,n){let e=n?.injector??f($);return qt("NgAfterNextRender"),x0(t,e,n,!0)}function T0(t){return t instanceof Function?[void 0,void 0,t,void 0]:[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function x0(t,n,e,r){let i=n.get(gl);i.impl??=n.get(_p);let o=n.get(Wt,null,{optional:!0}),s=e?.manualCleanup!==!0?n.get(Ae):null,a=n.get(Ui,null,{optional:!0}),c=new ms(i.impl,T0(t),a?.view,r,s,o?.snapshot(null));return i.impl.register(c),c}var B_=new y("",{factory:()=>({queue:new Set,isScheduled:!1,scheduler:null,injector:f(re)})});function U_(t,n,e){let r=t.get(B_);if(Array.isArray(n))for(let i of n)r.queue.add(i),e?.detachedLeaveAnimationFns?.push(i);else r.queue.add(n),e?.detachedLeaveAnimationFns?.push(n);r.scheduler&&r.scheduler(t)}function A0(t,n){let e=t.get(B_);if(n.detachedLeaveAnimationFns){for(let r of n.detachedLeaveAnimationFns)e.queue.delete(r);n.detachedLeaveAnimationFns=void 0}}function R0(t,n){for(let[e,r]of n)U_(t,r.animateFns)}function Ib(t,n,e,r){let i=t?.[cr]?.enter;n!==null&&i&&i.has(e.index)&&R0(r,i)}function zi(t,n,e,r,i,o,s,a){if(i!=null){let c,l=!1;Vt(i)?c=i:Nn(i)&&(l=!0,i=i[Lt]);let u=wt(i);t===0&&r!==null?(Ib(a,r,o,e),s==null?x_(n,r,u):Kc(n,r,u,s||null,!0)):t===1&&r!==null?(Ib(a,r,o,e),Kc(n,r,u,s||null,!0),S0(o,u)):t===2?(a?.[cr]?.leave?.has(o.index)&&M0(o,u),ds.delete(u),Sb(a,o,e,d=>{if(ds.has(u)){ds.delete(u);return}A_(n,u,l,d)})):t===3&&(ds.delete(u),Sb(a,o,e,()=>{n.destroyNode(u)})),c!=null&&H0(n,t,e,c,o,r,s)}}function N0(t,n){H_(t,n),n[Lt]=null,n[Qe]=null}function O0(t,n,e,r,i,o){r[Lt]=i,r[Qe]=n,yl(t,r,e,1,i,o)}function H_(t,n){n[jt].changeDetectionScheduler?.notify(9),yl(t,n,n[oe],2,null,null)}function k0(t){let n=t[Pi];if(!n)return lh(t[A],t);for(;n;){let e=null;if(Nn(n))e=n[Pi];else{let r=n[ge];r&&(e=r)}if(!e){for(;n&&!n[Et]&&n!==t;)Nn(n)&&lh(n[A],n),n=n[Te];n===null&&(n=t),Nn(n)&&lh(n[A],n),e=n&&n[Et]}n=e}}function Dp(t,n){let e=t[Gr],r=e.indexOf(n);e.splice(r,1)}function vl(t,n){if(Wr(n))return;let e=n[oe];e.destroyNode&&yl(t,n,e,3,null,null),k0(n)}function lh(t,n){if(Wr(n))return;let e=x(null);try{n[P]&=-129,n[P]|=256,n[ct]&&tr(n[ct]),L0(t,n),P0(t,n),n[A].type===1&&n[oe].destroy();let r=n[ar];if(r!==null&&Vt(n[Te])){r!==n[Te]&&Dp(r,n);let i=n[dn];i!==null&&i.detachView(t)}Dh(n)}finally{x(e)}}function Sb(t,n,e,r){let i=t?.[cr];if(i==null||i.leave==null||!i.leave.has(n.index))return r(!1);t&&Kr.add(t[Rn]),U_(e,()=>{if(i.leave&&i.leave.has(n.index)){let s=i.leave.get(n.index),a=[];if(s){for(let c=0;c{t[cr].running=void 0,Kr.delete(t[Rn]),n(!0)});return}n(!1)}function P0(t,n){let e=t.cleanup,r=n[Fi];if(e!==null)for(let s=0;s=0?r[a]():r[-a].unsubscribe(),s+=2}else{let a=r[e[s+1]];e[s].call(a)}r!==null&&(n[Fi]=null);let i=n[xn];if(i!==null){n[xn]=null;for(let s=0;sle&&V_(t,n,le,!1);let a=s?K.TemplateUpdateStart:K.TemplateCreateStart;ie(a,i,e),e(r,i)}finally{ur(o);let a=s?K.TemplateUpdateEnd:K.TemplateCreateEnd;ie(a,i,e)}}function bl(t,n,e){Y0(t,n,e),(e.flags&64)===64&&Z0(t,n,e)}function Ss(t,n,e=Ct){let r=n.localNames;if(r!==null){let i=n.index+1;for(let o=0;onull;function q0(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function Y_(t,n,e,r,i,o){let s=n[A];if(_l(t,s,n,e,r)){fn(t)&&K_(n,t.index);return}t.type&3&&(e=q0(e)),Z_(t,n,e,r,i,o)}function Z_(t,n,e,r,i,o){if(t.type&3){let s=Ct(t,n);r=o!=null?o(r,t.value||"",e):r,i.setProperty(s,e,r)}else t.type&12}function K_(t,n){let e=It(n,t);e[P]&16||(e[P]|=64)}function Y0(t,n,e){let r=e.directiveStart,i=e.directiveEnd;fn(e)&&C0(n,e,t.data[r+e.componentOffset]),t.firstCreatePass||Zc(e,n);let o=e.initialInputs;for(let s=r;s{qr(t.lView)},consumerOnSignalRead(){this.lView[ct]=this}});function ax(t){let n=t[ct]??Object.create(cx);return n.lView=t,n}var cx=F(g({},Jn),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let n=or(t.lView);for(;n&&!tD(n[A]);)n=or(n);n&&Uf(n)},consumerOnSignalRead(){this.lView[ct]=this}});function tD(t){return t.type!==2}function nD(t){if(t[ir]===null)return;let n=!0;for(;n;){let e=!1;for(let r of t[ir])r.dirty&&(e=!0,r.zone===null||Zone.current===r.zone?r.run():r.zone.run(()=>r.run()));n=e&&!!(t[P]&8192)}}var lx=100;function rD(t,n=0){let r=t[jt].rendererFactory,i=!1;i||r.begin?.();try{ux(t,n)}finally{i||r.end?.()}}function ux(t,n){let e=Xf();try{Zo(!0),Fh(t,n);let r=0;for(;is(t);){if(r===lx)throw new b(103,!1);r++,Fh(t,1)}}finally{Zo(e)}}function dx(t,n,e,r){if(Wr(n))return;let i=n[P],o=!1,s=!1;Nc(n);let a=!0,c=null,l=null;o||(tD(t)?(l=rx(n),c=Tn(l)):ac()===null?(a=!1,l=ax(n),c=Tn(l)):n[ct]&&(tr(n[ct]),n[ct]=null));try{Bf(n),zy(t.bindingStartIndex),e!==null&&q_(t,n,e,2,r);let u=(i&3)===3;if(!o)if(u){let p=t.preOrderCheckHooks;p!==null&&Bc(n,p,null)}else{let p=t.preOrderHooks;p!==null&&Uc(n,p,0,null),ah(n,0)}if(s||fx(n),nD(n),iD(n,0),t.contentQueries!==null&&__(t,n),!o)if(u){let p=t.contentCheckHooks;p!==null&&Bc(n,p)}else{let p=t.contentHooks;p!==null&&Uc(n,p,1),ah(n,1)}px(t,n);let d=t.components;d!==null&&sD(n,d,0);let h=t.viewQuery;if(h!==null&&wh(2,h,r),!o)if(u){let p=t.viewCheckHooks;p!==null&&Bc(n,p)}else{let p=t.viewHooks;p!==null&&Uc(n,p,2),ah(n,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),n[Ic]){for(let p of n[Ic])p();n[Ic]=null}o||(J_(n),n[P]&=-73)}catch(u){throw o||qr(n),u}finally{l!==null&&(er(l,c),a&&ox(l)),Oc()}}function iD(t,n){for(let e=d_(t);e!==null;e=f_(e))for(let r=ge;r0&&(t[e-1][Et]=r[Et]);let o=es(t,ge+n);N0(r[A],r);let s=o[dn];s!==null&&s.detachView(o[A]),r[Te]=null,r[Et]=null,r[P]&=-129}return r}function mx(t,n,e,r){let i=ge+r,o=e.length;r>0&&(e[i-1][Et]=n),r-1&&(vs(n,r),es(e,r))}this._attachedToViewContainer=!1}vl(this._lView[A],this._lView)}onDestroy(n){Hf(this._lView,n)}markForCheck(){Tp(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[P]&=-129}reattach(){Tc(this._lView),this._lView[P]|=128}detectChanges(){this._lView[P]|=1024,rD(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new b(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let n=ji(this._lView),e=this._lView[ar];e!==null&&!n&&Dp(e,this._lView),H_(this._lView[A],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new b(902,!1);this._appRef=n;let e=ji(this._lView),r=this._lView[ar];r!==null&&!e&&uD(r,this._lView),Tc(this._lView)}};var dt=(()=>{class t{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=gx;constructor(e,r,i){this._declarationLView=e,this._declarationTContainer=r,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,r){return this.createEmbeddedViewImpl(e,r)}createEmbeddedViewImpl(e,r,i){let o=Ms(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:r,dehydratedView:i});return new dr(o)}}return t})();function gx(){return Dl(Ee(),C())}function Dl(t,n){return t.type&4?new dt(n,t,Qi(t,n)):null}function Ji(t,n,e,r,i){let o=t.data[n];if(o===null)o=vx(t,n,e,r,i),Gy()&&(o.flags|=32);else if(o.type&64){o.type=e,o.value=r,o.attrs=i;let s=Hy();o.injectorIndex=s===null?-1:s.injectorIndex}return Vi(o,!0),o}function vx(t,n,e,r,i){let o=Zf(),s=Kf(),a=s?o:o&&o.parent,c=t.data[n]=bx(t,a,e,n,r,i);return yx(t,c,o,s),c}function yx(t,n,e,r){t.firstChild===null&&(t.firstChild=n),e!==null&&(r?e.child==null&&n.parent!==null&&(e.child=n):e.next===null&&(e.next=n,n.prev=e))}function bx(t,n,e,r,i,o){let s=n?n.injectorIndex:-1,a=0;return Wf()&&(a|=128),{type:e,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:n,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function _x(t){let n=t[Ff]??[],r=t[Te][oe],i=[];for(let o of n)o.data[g_]!==void 0?i.push(o):Dx(o,r);t[Ff]=i}function Dx(t,n){let e=0,r=t.firstChild;if(r){let i=t.data[m_];for(;enull,wx=()=>null;function Qc(t,n){return Ex(t,n)}function dD(t,n,e){return wx(t,n,e)}var fD=class{},El=class{},Ph=class{resolveComponentFactory(n){throw new b(917,!1)}},xs=class{static NULL=new Ph},je=class{},Oe=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>Cx()}return t})();function Cx(){let t=C(),n=Ee(),e=It(n.index,t);return(Nn(e)?e:t)[oe]}var hD=(()=>{class t{static \u0275prov=v({token:t,providedIn:"root",factory:()=>null})}return t})();var $c={},Lh=class{injector;parentInjector;constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,r){let i=this.injector.get(n,$c,r);return i!==$c||e===$c?i:this.parentInjector.get(n,e,r)}};function Xc(t,n,e){let r=e?t.styles:null,i=e?t.classes:null,o=0;if(n!==null)for(let s=0;s0&&(e.directiveToIndex=new Map);for(let h=0;h0;){let e=t[--n];if(typeof e=="number"&&e<0)return e}return 0}function Nx(t,n,e){if(e){if(n.exportAs)for(let r=0;rr(wt(_[t.index])):t.index;_D(m,n,e,o,a,p,!1)}}return l}function Px(t){return t.startsWith("animation")||t.startsWith("transition")}function Lx(t,n,e,r){let i=t.cleanup;if(i!=null)for(let o=0;oc?a[c]:null}typeof s=="string"&&(o+=2)}return null}function _D(t,n,e,r,i,o,s){let a=n.firstCreatePass?zf(n):null,c=$f(e),l=c.length;c.push(i,o),a&&a.push(r,t,l,(l+1)*(s?-1:1))}function Nb(t,n,e,r,i,o){let s=n[e],a=n[A],l=a.data[e].outputs[r],d=s[l].subscribe(o);_D(t.index,a,n,i,o,d,!0)}var jh=Symbol("BINDING");function DD(t){return t.debugInfo?.className||t.type.name||null}var Jc=class extends xs{ngModule;constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){let e=ln(n);return new fr(e,this.ngModule)}};function jx(t){return Object.keys(t).map(n=>{let[e,r,i]=t[n],o={propName:e,templateName:n,isSignal:(r&pl.SignalBased)!==0};return i&&(o.transform=i),o})}function Vx(t){return Object.keys(t).map(n=>({propName:t[n],templateName:n}))}function Bx(t,n,e){let r=n instanceof re?n:n?.injector;return r&&t.getStandaloneInjector!==null&&(r=t.getStandaloneInjector(r)||r),r?new Lh(e,r):e}function Ux(t){let n=t.get(je,null);if(n===null)throw new b(407,!1);let e=t.get(hD,null),r=t.get(cn,null),i=t.get(Wt,null,{optional:!0});return{rendererFactory:n,sanitizer:e,changeDetectionScheduler:r,ngReflect:!1,tracingService:i}}function Hx(t,n){let e=ED(t);return T_(n,e,e==="svg"?Lf:e==="math"?Ny:null)}function ED(t){return(t.selectors[0][0]||"div").toLowerCase()}var fr=class extends El{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=jx(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Vx(this.componentDef.outputs),this.cachedOutputs}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=_0(n.selectors),this.ngContentSelectors=n.ngContentSelectors??[],this.isBoundToModule=!!e}create(n,e,r,i,o,s){ie(K.DynamicComponentStart);let a=x(null);try{let c=this.componentDef,l=Bx(c,i||this.ngModule,n),u=Ux(l),d=u.tracingService;return d&&d.componentCreate?d.componentCreate(DD(c),()=>this.createComponentRef(u,l,e,r,o,s)):this.createComponentRef(u,l,e,r,o,s)}finally{x(a)}}createComponentRef(n,e,r,i,o,s){let a=this.componentDef,c=$x(i,a,s,o),l=n.rendererFactory.createRenderer(null,a),u=i?z0(l,i,a.encapsulation,e):Hx(a,l),d=s?.some(Ob)||o?.some(m=>typeof m!="function"&&m.bindings.some(Ob)),h=mp(null,c,null,512|L_(a),null,null,n,l,e,null,b_(u,e,!0));h[le]=u,Nc(h);let p=null;try{let m=Ap(le,h,2,"#host",()=>c.directiveRegistry,!0,0);R_(l,u,m),qi(u,h),bl(c,h,m),op(c,m,h),Rp(c,m),r!==void 0&&Gx(m,this.ngContentSelectors,r),p=It(m.index,h),h[me]=p[me],Mp(c,h,null)}catch(m){throw p!==null&&Dh(p),Dh(h),m}finally{ie(K.DynamicComponentEnd),Oc()}return new el(this.componentType,h,!!d)}};function $x(t,n,e,r){let i=t?["ng-version","21.2.6"]:D0(n.selectors[0]),o=null,s=null,a=0;if(e)for(let u of e)a+=u[jh].requiredVars,u.create&&(u.targetIdx=0,(o??=[]).push(u)),u.update&&(u.targetIdx=0,(s??=[]).push(u));if(r)for(let u=0;u{if(e&1&&t)for(let r of t)r.create();if(e&2&&n)for(let r of n)r.update()}}function Ob(t){let n=t[jh].kind;return n==="input"||n==="twoWay"}var el=class extends fD{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(n,e,r){super(),this._rootLView=e,this._hasInputBindings=r,this._tNode=Sc(e[A],le),this.location=Qi(this._tNode,e),this.instance=It(this._tNode.index,e)[me],this.hostView=this.changeDetectorRef=new dr(e,void 0),this.componentType=n}setInput(n,e){this._hasInputBindings;let r=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(n)&&Object.is(this.previousInputValues.get(n),e))return;let i=this._rootLView,o=_l(r,i[A],i,n,e);this.previousInputValues.set(n,e);let s=It(r.index,i);Tp(s,1)}get injector(){return new Yr(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(n){this.hostView.onDestroy(n)}};function Gx(t,n,e){let r=t.projection=[];for(let i=0;i{class t{static __NG_ELEMENT_ID__=Wx}return t})();function Wx(){let t=Ee();return wD(t,C())}var Vh=class t extends qe{_lContainer;_hostTNode;_hostLView;constructor(n,e,r){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=r}get element(){return Qi(this._hostTNode,this._hostLView)}get injector(){return new Yr(this._hostTNode,this._hostLView)}get parentInjector(){let n=np(this._hostTNode,this._hostLView);if(Jb(n)){let e=qc(n,this._hostLView),r=Wc(n),i=e[A].data[r+8];return new Yr(i,e)}else return new Yr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){let e=kb(this._lContainer);return e!==null&&e[n]||null}get length(){return this._lContainer.length-ge}createEmbeddedView(n,e,r){let i,o;typeof r=="number"?i=r:r!=null&&(i=r.index,o=r.injector);let s=Qc(this._lContainer,n.ssrId),a=n.createEmbeddedViewImpl(e||{},o,s);return this.insertImpl(a,i,Yi(this._hostTNode,s)),a}createComponent(n,e,r,i,o,s,a){let c=n&&!iT(n),l;if(c)l=e;else{let E=e||{};l=E.index,r=E.injector,i=E.projectableNodes,o=E.environmentInjector||E.ngModuleRef,s=E.directives,a=E.bindings}let u=c?n:new fr(ln(n)),d=r||this.parentInjector;if(!o&&u.ngModule==null){let I=(c?d:this.parentInjector).get(re,null);I&&(o=I)}let h=ln(u.componentType??{}),p=Qc(this._lContainer,h?.id??null),m=p?.firstChild??null,_=u.create(d,i,m,o,s,a);return this.insertImpl(_.hostView,l,Yi(this._hostTNode,p)),_}insert(n,e){return this.insertImpl(n,e,!0)}insertImpl(n,e,r){let i=n._lView;if(ky(i)){let a=this.indexOf(n);if(a!==-1)this.detach(a);else{let c=i[Te],l=new t(c,c[Qe],c[Te]);l.detach(l.indexOf(n))}}let o=this._adjustIndex(e),s=this._lContainer;return Ts(s,i,o,r),n.attachToViewContainerRef(),Sf(uh(s),o,n),n}move(n,e){return this.insert(n,e)}indexOf(n){let e=kb(this._lContainer);return e!==null?e.indexOf(n):-1}remove(n){let e=this._adjustIndex(n,-1),r=vs(this._lContainer,e);r&&(es(uh(this._lContainer),e),vl(r[A],r))}detach(n){let e=this._adjustIndex(n,-1),r=vs(this._lContainer,e);return r&&es(uh(this._lContainer),e)!=null?new dr(r):null}_adjustIndex(n,e=0){return n??this.length+e}};function kb(t){return t[ns]}function uh(t){return t[ns]||(t[ns]=[])}function wD(t,n){let e,r=n[t.index];return Vt(r)?e=r:(e=aD(r,n,null,t),n[t.index]=e,gp(n,e)),Yx(e,n,t,r),new Vh(e,t,n)}function qx(t,n){let e=t[oe],r=e.createComment(""),i=Ct(n,t),o=e.parentNode(i);return Kc(e,o,r,e.nextSibling(i),!1),r}var Yx=Qx,Zx=()=>!1;function Kx(t,n,e){return Zx(t,n,e)}function Qx(t,n,e,r){if(t[lr])return;let i;e.type&8?i=wt(r):i=qx(n,e),t[lr]=i}var Bh=class t{queryList;matches=null;constructor(n){this.queryList=n}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},Uh=class t{queries;constructor(n=[]){this.queries=n}createEmbeddedView(n){let e=n.queries;if(e!==null){let r=n.contentQueries!==null?n.contentQueries[0]:e.length,i=[];for(let o=0;o0)r.push(s[a/2]);else{let l=o[a+1],u=n[-c];for(let d=ge;dn.trim())}function TD(t,n,e){t.queries===null&&(t.queries=new Hh),t.queries.track(new $h(n,e))}function rA(t,n){let e=t.contentQueries||(t.contentQueries=[]),r=e.length?e[e.length-1]:-1;n!==r&&e.push(t.queries.length-1,n)}function kp(t,n){return t.queries.getByIndex(n)}function xD(t,n){let e=t[A],r=kp(e,n);return r.crossesNgTemplate?zh(e,t,n,[]):CD(e,t,r,n)}function Fp(t,n,e){let r,i=zo(()=>{r._dirtyCounter();let o=iA(r,t);if(n&&o===void 0)throw new b(-951,!1);return o});return r=i[pe],r._dirtyCounter=W(0),r._flatValue=void 0,i}function Pp(t){return Fp(!0,!1,t)}function Lp(t){return Fp(!0,!0,t)}function AD(t){return Fp(!1,!1,t)}function RD(t,n){let e=t[pe];e._lView=C(),e._queryIndex=n,e._queryList=Op(e._lView,n),e._queryList.onDirty(()=>e._dirtyCounter.update(r=>r+1))}function iA(t,n){let e=t._lView,r=t._queryIndex;if(e===void 0||r===void 0||e[P]&4)return n?void 0:Ge;let i=Op(e,r),o=xD(e,r);return i.reset(o,c_),n?i.first:i._changesDetected||t._flatValue===void 0?t._flatValue=i.toArray():t._flatValue}var mn=class{},Cl=class{};var nl=class extends mn{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new Jc(this);constructor(n,e,r,i=!0){super(),this.ngModuleType=n,this._parent=e;let o=wf(n);this._bootstrapComponents=k_(o.bootstrap),this._r3Injector=nh(n,e,[{provide:mn,useValue:this},{provide:xs,useValue:this.componentFactoryResolver},...r],Xo(n),new Set(["environment"])),i&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}},rl=class extends Cl{moduleType;constructor(n){super(),this.moduleType=n}create(n){return new nl(this.moduleType,n,[])}};var bs=class extends mn{injector;componentFactoryResolver=new Jc(this);instance=null;constructor(n){super();let e=new jr([...n.providers,{provide:mn,useValue:this},{provide:xs,useValue:this.componentFactoryResolver}],n.parent||ki(),n.debugName,new Set(["environment"]));this.injector=e,n.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}};function to(t,n,e=null){return new bs({providers:t,parent:n,debugName:e,runEnvironmentInitializers:!0}).injector}var oA=(()=>{class t{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let r=xf(!1,e.type),i=r.length>0?to([r],this._injector,""):null;this.cachedInjectors.set(e,i)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=v({token:t,providedIn:"environment",factory:()=>new t(w(re))})}return t})();function ke(t){return Ds(()=>{let n=ND(t),e=F(g({},n),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===rp.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&t.dependencies||null,getStandaloneInjector:n.standalone?i=>i.get(oA).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||zt.Emulated,styles:t.styles||Ge,_:null,schemas:t.schemas||null,tView:null,id:""});n.standalone&&qt("NgStandalone"),OD(e);let r=t.dependencies;return e.directiveDefs=Fb(r,sA),e.pipeDefs=Fb(r,by),e.id=lA(e),e})}function sA(t){return ln(t)||bc(t)}function X(t){return Ds(()=>({type:t.type,bootstrap:t.bootstrap||Ge,declarations:t.declarations||Ge,imports:t.imports||Ge,exports:t.exports||Ge,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function aA(t,n){if(t==null)return Pt;let e={};for(let r in t)if(t.hasOwnProperty(r)){let i=t[r],o,s,a,c;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o,c=i[3]||null):(o=i,s=i,a=pl.None,c=null),e[o]=[r,a,c],n[o]=s}return e}function cA(t){if(t==null)return Pt;let n={};for(let e in t)t.hasOwnProperty(e)&&(n[t[e]]=e);return n}function M(t){return Ds(()=>{let n=ND(t);return OD(n),n})}function As(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone??!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function ND(t){let n={};return{type:t.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:n,inputConfig:t.inputs||Pt,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||Ge,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:aA(t.inputs,n),outputs:cA(t.outputs),debugInfo:null}}function OD(t){t.features?.forEach(n=>n(t))}function Fb(t,n){return t?()=>{let e=typeof t=="function"?t():t,r=[];for(let i of e){let o=n(i);o!==null&&r.push(o)}return r}:null}function lA(t){let n=0,e=typeof t.consts=="function"?"":t.consts,r=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,e,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery];for(let o of r.join("|"))n=Math.imul(31,n)+o.charCodeAt(0)<<0;return n+=2147483648,"c"+n}function uA(t){let n=e=>{let r=Array.isArray(t);e.hostDirectives===null?(e.resolveHostDirectives=dA,e.hostDirectives=r?t.map(Gh):[t]):r?e.hostDirectives.unshift(...t.map(Gh)):e.hostDirectives.unshift(t)};return n.ngInherit=!0,n}function dA(t){let n=[],e=!1,r=null,i=null;for(let o=0;o=0;r--){let i=t[r];i.hostVars=n+=i.hostVars,i.hostAttrs=Wi(i.hostAttrs,e=Wi(e,i.hostAttrs))}}function dh(t){return t===Pt?{}:t===Ge?[]:t}function gA(t,n){let e=t.viewQuery;e?t.viewQuery=(r,i)=>{n(r,i),e(r,i)}:t.viewQuery=n}function vA(t,n){let e=t.contentQueries;e?t.contentQueries=(r,i,o)=>{n(r,i,o),e(r,i,o)}:t.contentQueries=n}function yA(t,n){let e=t.hostBindings;e?t.hostBindings=(r,i)=>{n(r,i),e(r,i)}:t.hostBindings=n}function FD(t,n,e,r,i,o,s,a){if(e.firstCreatePass){t.mergedAttrs=Wi(t.mergedAttrs,t.attrs);let u=t.tView=pp(2,t,i,o,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,e.consts,null);e.queries!==null&&(e.queries.template(e,t),u.queries=e.queries.embeddedTView(t))}a&&(t.flags|=a),Vi(t,!1);let c=_A(e,n,t,r);kc()&&Ep(e,n,c,t),qi(c,n);let l=aD(c,n,c,t);n[r+le]=l,gp(n,l),Kx(l,t,n)}function bA(t,n,e,r,i,o,s,a,c,l,u){let d=e+le,h;return n.firstCreatePass?(h=Ji(n,d,4,s||null,a||null),xc()&&pD(n,t,h,lt(n.consts,l),Cp),Kb(n,h)):h=n.data[d],FD(h,t,n,e,r,i,o,c),Li(h)&&bl(n,t,h),l!=null&&Ss(t,h,u),h}function Zi(t,n,e,r,i,o,s,a,c,l,u){let d=e+le,h;if(n.firstCreatePass){if(h=Ji(n,d,4,s||null,a||null),l!=null){let p=lt(n.consts,l);h.localNames=[];for(let m=0;m{class t{log(e){console.log(e)}warn(e){console.warn(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function no(t){return typeof t=="function"&&t[pe]!==void 0}function jp(t){return no(t)&&typeof t.set=="function"}var Sl=new y(""),Ml=new y(""),Rs=(()=>{class t{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;constructor(e,r,i){this._ngZone=e,this.registry=r,Nf()&&(this._destroyRef=f(Ae,{optional:!0})??void 0),Vp||(VD(i),i.addToWindow(r)),this._watchAngularEvents(),e.run(()=>{this._taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){let e=this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),r=this._ngZone.runOutsideAngular(()=>this._ngZone.onStable.subscribe({next:()=>{j.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}}));this._destroyRef?.onDestroy(()=>{e.unsubscribe(),r.unsubscribe()})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb()}});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>r.updateCb&&r.updateCb(e)?(clearTimeout(r.timeoutId),!1):!0)}}getPendingTasks(){return this._taskTrackingZone?this._taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,r,i){let o=-1;r&&r>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e()},r)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:i})}whenStable(e,r,i){if(i&&!this._taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,r,i),this._runCallbacksIfReady()}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,r,i){return[]}static \u0275fac=function(r){return new(r||t)(w(j),w(jD),w(Ml))};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})(),jD=(()=>{class t{_applications=new Map;registerApplication(e,r){this._applications.set(e,r)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,r=!0){return Vp?.findTestabilityInTree(this,e,r)??null}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function VD(t){Vp=t}var Vp;function jn(t){return!!t&&typeof t.then=="function"}function Tl(t){return!!t&&typeof t.subscribe=="function"}var Bp=new y("");function xl(t){return sr([{provide:Bp,multi:!0,useValue:t}])}var Up=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,r)=>{this.resolve=e,this.reject=r});appInits=f(Bp,{optional:!0})??[];injector=f($);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let i of this.appInits){let o=xe(this.injector,i);if(jn(o))e.push(o);else if(Tl(o)){let s=new Promise((a,c)=>{o.subscribe({complete:a,error:c})});e.push(s)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{r()}).catch(i=>{this.reject(i)}),e.length===0&&r(),this.initialized=!0}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Al=new y("");function BD(){Qd(()=>{let t="";throw new b(600,t)})}function UD(t){return t.isBoundToModule}var EA=10;var He=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=f(ut);afterRenderManager=f(gl);zonelessEnabled=f(ls);rootEffectScheduler=f(Fc);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new S;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=f(kn);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(H(e=>!e))}constructor(){f(Wt,{optional:!0})}whenStable(){let e;return new Promise(r=>{e=this.isStable.subscribe({next:i=>{i&&r()}})}).finally(()=>{e.unsubscribe()})}_injector=f(re);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,r){return this.bootstrapImpl(e,r)}bootstrapImpl(e,r,i=$.NULL){return this._injector.get(j).run(()=>{ie(K.BootstrapComponentStart);let s=e instanceof El;if(!this._injector.get(Up).done){let m="";throw new b(405,m)}let c;s?c=e:c=this._injector.get(xs).resolveComponentFactory(e),this.componentTypes.push(c.componentType);let l=UD(c)?void 0:this._injector.get(mn),u=r||c.selector,d=c.create(i,[],u,l),h=d.location.nativeElement,p=d.injector.get(Sl,null);return p?.registerApplication(h),d.onDestroy(()=>{this.detachView(d.hostView),hs(this.components,d),p?.unregisterApplication(h)}),this._loadComponent(d),ie(K.BootstrapComponentEnd,d),d})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){ie(K.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(ml.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw ie(K.ChangeDetectionEnd),new b(101,!1);let e=x(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,x(e),this.afterTick.next(),ie(K.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(je,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++is(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let r=e;this._views.push(r),r.attachToAppRef(this)}detachView(e){let r=e;hs(this._views,r),r.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(i){this.internalErrorHandler(i)}this.components.push(e),this._injector.get(Al,[]).forEach(i=>i(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>hs(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new b(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function hs(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}function HD(t,n){let e=C(),r=On();if(rt(e,r,n)){let i=ce(),o=Bi();if(_l(o,i,e,t,n))fn(o)&&K_(e,o.index);else{let a=Ct(o,e);Q_(e[oe],a,null,o.value,t,n,null)}}return HD}function Yt(t,n,e,r){let i=C(),o=On();if(rt(i,o,n)){let s=ce(),a=Bi();Q0(a,i,t,n,e,r)}return Yt}function wA(){return C()[We][me]}var Wh=class{destroy(n){}updateValue(n,e){}swap(n,e){let r=Math.min(n,e),i=Math.max(n,e),o=this.detach(i);if(i-r>1){let s=this.detach(r);this.attach(r,o),this.attach(i,s)}else this.attach(r,o)}move(n,e){this.attach(e,this.detach(n))}};function fh(t,n,e,r,i){return t===e&&Object.is(n,r)?1:Object.is(i(t,n),i(e,r))?-1:0}function CA(t,n,e,r){let i,o,s=0,a=t.length-1,c=void 0;if(Array.isArray(n)){x(r);let l=n.length-1;for(x(null);s<=a&&s<=l;){let u=t.at(s),d=n[s],h=fh(s,u,s,d,e);if(h!==0){h<0&&t.updateValue(s,d),s++;continue}let p=t.at(a),m=n[l],_=fh(a,p,l,m,e);if(_!==0){_<0&&t.updateValue(a,m),a--,l--;continue}let E=e(s,u),I=e(a,p),ee=e(s,d);if(Object.is(ee,I)){let Pe=e(l,m);Object.is(Pe,E)?(t.swap(s,a),t.updateValue(a,m),l--,a--):t.move(a,s),t.updateValue(s,d),s++;continue}if(i??=new il,o??=Vb(t,s,a,e),qh(t,i,s,ee))t.updateValue(s,d),s++,a++;else if(o.has(ee))i.set(E,t.detach(s)),a--;else{let Pe=t.create(s,n[s]);t.attach(s,Pe),s++,a++}}for(;s<=l;)jb(t,i,e,s,n[s]),s++}else if(n!=null){x(r);let l=n[Symbol.iterator]();x(null);let u=l.next();for(;!u.done&&s<=a;){let d=t.at(s),h=u.value,p=fh(s,d,s,h,e);if(p!==0)p<0&&t.updateValue(s,h),s++,u=l.next();else{i??=new il,o??=Vb(t,s,a,e);let m=e(s,h);if(qh(t,i,s,m))t.updateValue(s,h),s++,a++,u=l.next();else if(!o.has(m))t.attach(s,t.create(s,h)),s++,a++,u=l.next();else{let _=e(s,d);i.set(_,t.detach(s)),a--}}}for(;!u.done;)jb(t,i,e,t.length,u.value),u=l.next()}for(;s<=a;)t.destroy(t.detach(a--));i?.forEach(l=>{t.destroy(l)})}function qh(t,n,e,r){return n!==void 0&&n.has(r)?(t.attach(e,n.get(r)),n.delete(r),!0):!1}function jb(t,n,e,r,i){if(qh(t,n,r,e(r,i)))t.updateValue(r,i);else{let o=t.create(r,i);t.attach(r,o)}}function Vb(t,n,e,r){let i=new Set;for(let o=n;o<=e;o++)i.add(r(o,t.at(o)));return i}var il=class{kvMap=new Map;_vMap=void 0;has(n){return this.kvMap.has(n)}delete(n){if(!this.has(n))return!1;let e=this.kvMap.get(n);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(n,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(n),!0}get(n){return this.kvMap.get(n)}set(n,e){if(this.kvMap.has(n)){let r=this.kvMap.get(n);this._vMap===void 0&&(this._vMap=new Map);let i=this._vMap;for(;i.has(r);)r=i.get(r);i.set(r,e)}else this.kvMap.set(n,e)}forEach(n){for(let[e,r]of this.kvMap)if(n(r,e),this._vMap!==void 0){let i=this._vMap;for(;i.has(r);)r=i.get(r),n(r,e)}}};function IA(t,n,e,r,i,o,s,a){qt("NgControlFlow");let c=C(),l=ce(),u=lt(l.consts,o);return Zi(c,l,t,n,e,r,i,u,256,s,a),Hp}function Hp(t,n,e,r,i,o,s,a){qt("NgControlFlow");let c=C(),l=ce(),u=lt(l.consts,o);return Zi(c,l,t,n,e,r,i,u,512,s,a),Hp}function SA(t,n){qt("NgControlFlow");let e=C(),r=On(),i=e[r]!==Ve?e[r]:-1,o=i!==-1?ol(e,le+i):void 0,s=0;if(rt(e,r,t)){let a=x(null);try{if(o!==void 0&&lD(o,s),t!==-1){let c=le+t,l=ol(e,c),u=Qh(e[A],c),d=dD(l,u,e),h=Ms(e,u,n,{dehydratedView:d});Ts(l,h,s,Yi(u,d))}}finally{x(a)}}else if(o!==void 0){let a=cD(o,s);a!==void 0&&(a[me]=n)}}var Yh=class{lContainer;$implicit;$index;constructor(n,e,r){this.lContainer=n,this.$implicit=e,this.$index=r}get $count(){return this.lContainer.length-ge}};function MA(t){return t}function TA(t,n){return n}var Zh=class{hasEmptyBlock;trackByFn;liveCollection;constructor(n,e,r){this.hasEmptyBlock=n,this.trackByFn=e,this.liveCollection=r}};function xA(t,n,e,r,i,o,s,a,c,l,u,d,h){qt("NgControlFlow");let p=C(),m=ce(),_=c!==void 0,E=C(),I=a?s.bind(E[We][me]):s,ee=new Zh(_,I);E[le+t]=ee,Zi(p,m,t+1,n,e,r,i,lt(m.consts,o),256),_&&Zi(p,m,t+2,c,l,u,d,lt(m.consts,h),512)}var Kh=class extends Wh{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(n,e,r){super(),this.lContainer=n,this.hostLView=e,this.templateTNode=r}get length(){return this.lContainer.length-ge}at(n){return this.getLView(n)[me].$implicit}attach(n,e){let r=e[Ur];this.needsIndexUpdate||=n!==this.length,Ts(this.lContainer,e,n,Yi(this.templateTNode,r)),RA(this.lContainer,n)}detach(n){return this.needsIndexUpdate||=n!==this.length-1,NA(this.lContainer,n),OA(this.lContainer,n)}create(n,e){let r=Qc(this.lContainer,this.templateTNode.tView.ssrId);return Ms(this.hostLView,this.templateTNode,new Yh(this.lContainer,e,n),{dehydratedView:r})}destroy(n){vl(n[A],n)}updateValue(n,e){this.getLView(n)[me].$implicit=e}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let n=0;n0){let o=r[An];A0(o,i),Kr.delete(r[Rn]),i.detachedLeaveAnimationFns=void 0}}function NA(t,n){if(t.length<=ge)return;let e=ge+n,r=t[e],i=r?r[cr]:void 0;i&&i.leave&&i.leave.size>0&&(i.detachedLeaveAnimationFns=[])}function OA(t,n){return vs(t,n)}function kA(t,n){return cD(t,n)}function Qh(t,n){return Sc(t,n)}function $D(t,n,e){let r=C(),i=On();if(rt(r,i,n)){let o=ce(),s=Bi();Y_(s,r,t,n,r[oe],e)}return $D}function Xh(t,n,e,r,i){_l(n,t,e,i?"class":"style",r)}function sl(t,n,e,r){let i=C(),o=i[A],s=t+le,a=o.firstCreatePass?Ap(s,i,2,n,Cp,xc(),e,r):o.data[s];if(fn(a)){let c=i[jt].tracingService;if(c&&c.componentCreate){let l=o.data[a.directiveStart+a.componentOffset];return c.componentCreate(DD(l),()=>(Bb(t,n,i,a,r),sl))}}return Bb(t,n,i,a,r),sl}function Bb(t,n,e,r,i){if(Ip(r,e,t,n,zD),Li(r)){let o=e[A];bl(o,e,r),op(o,r,e)}i!=null&&Ss(e,r)}function $p(){let t=ce(),n=Ee(),e=Sp(n);return t.firstCreatePass&&Rp(t,e),qf(e)&&Yf(),Gf(),e.classesWithoutHost!=null&&uT(e)&&Xh(t,e,C(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&dT(e)&&Xh(t,e,C(),e.stylesWithoutHost,!1),$p}function Rl(t,n,e,r){return sl(t,n,e,r),$p(),Rl}function Jr(t,n,e,r){let i=C(),o=i[A],s=t+le,a=o.firstCreatePass?kx(s,o,2,n,e,r):o.data[s];return Ip(a,i,t,n,zD),r!=null&&Ss(i,a),Jr}function ei(){let t=Ee(),n=Sp(t);return qf(n)&&Yf(),Gf(),ei}function vn(t,n,e,r){return Jr(t,n,e,r),ei(),vn}var zD=(t,n,e,r,i)=>(as(!0),T_(n[oe],r,tb()));function zp(t,n,e){let r=C(),i=r[A],o=t+le,s=i.firstCreatePass?Ap(o,r,8,"ng-container",Cp,xc(),n,e):i.data[o];if(Ip(s,r,t,"ng-container",FA),Li(s)){let a=r[A];bl(a,r,s),op(a,s,r)}return e!=null&&Ss(r,s),zp}function Gp(){let t=ce(),n=Ee(),e=Sp(n);return t.firstCreatePass&&Rp(t,e),Gp}function GD(t,n,e){return zp(t,n,e),Gp(),GD}var FA=(t,n,e,r,i)=>(as(!0),t0(n[oe],""));function PA(){return C()}function WD(t,n,e){let r=C(),i=On();if(rt(r,i,n)){let o=ce(),s=Bi();Z_(s,r,t,n,r[oe],e)}return WD}var us=void 0;function LA(t){let n=Math.floor(Math.abs(t)),e=t.toString().replace(/^[^.]*\.?/,"").length;return n===1&&e===0?1:5}var jA=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],us,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],us,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",us,us,us],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",LA],hh={};function pt(t){let n=VA(t),e=Ub(n);if(e)return e;let r=n.split("-")[0];if(e=Ub(r),e)return e;if(r==="en")return jA;throw new b(701,!1)}function Ub(t){return t in hh||(hh[t]=ye.ng&&ye.ng.common&&ye.ng.common.locales&&ye.ng.common.locales[t]),hh[t]}var _e=(function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t})(_e||{});function VA(t){return t.toLowerCase().replace(/_/g,"-")}var Ns="en-US";var BA=Ns;function qD(t){typeof t=="string"&&(BA=t.toLowerCase().replace(/_/g,"-"))}function Zt(t,n,e){let r=C(),i=ce(),o=Ee();return ZD(i,r,r[oe],o,t,n,e),Zt}function YD(t,n,e){let r=C(),i=ce(),o=Ee();return(o.type&3||e)&&bD(o,i,r,e,r[oe],t,n,zc(o,r,n)),YD}function ZD(t,n,e,r,i,o,s){let a=!0,c=null;if((r.type&3||s)&&(c??=zc(r,n,o),bD(r,t,n,s,e,i,o,c)&&(a=!1)),a){let l=r.outputs?.[i],u=r.hostDirectiveOutputs?.[i];if(u&&u.length)for(let d=0;d>17&32767}function WA(t){return(t&2)==2}function qA(t,n){return t&131071|n<<17}function Jh(t){return t|2}function Ki(t){return(t&131068)>>2}function ph(t,n){return t&-131069|n<<2}function YA(t){return(t&1)===1}function ep(t){return t|1}function ZA(t,n,e,r,i,o){let s=o?n.classBindings:n.styleBindings,a=Qr(s),c=Ki(s);t[r]=e;let l=!1,u;if(Array.isArray(e)){let d=e;u=d[1],(u===null||Oi(d,u)>0)&&(l=!0)}else u=e;if(i)if(c!==0){let h=Qr(t[a+1]);t[r+1]=Vc(h,a),h!==0&&(t[h+1]=ph(t[h+1],r)),t[a+1]=qA(t[a+1],r)}else t[r+1]=Vc(a,0),a!==0&&(t[a+1]=ph(t[a+1],r)),a=r;else t[r+1]=Vc(c,0),a===0?a=r:t[c+1]=ph(t[c+1],r),c=r;l&&(t[r+1]=Jh(t[r+1])),Hb(t,u,r,!0),Hb(t,u,r,!1),KA(n,u,t,r,o),s=Vc(a,c),o?n.classBindings=s:n.styleBindings=s}function KA(t,n,e,r,i){let o=i?t.residualClasses:t.residualStyles;o!=null&&typeof n=="string"&&Oi(o,n)>=0&&(e[r+1]=ep(e[r+1]))}function Hb(t,n,e,r){let i=t[e+1],o=n===null,s=r?Qr(i):Ki(i),a=!1;for(;s!==0&&(a===!1||o);){let c=t[s],l=t[s+1];QA(c,n)&&(a=!0,t[s+1]=r?ep(l):Jh(l)),s=r?Qr(l):Ki(l)}a&&(t[e+1]=r?Jh(i):ep(i))}function QA(t,n){return t===null||n==null||(Array.isArray(t)?t[1]:t)===n?!0:Array.isArray(t)&&typeof n=="string"?Oi(t,n)>=0:!1}var $t={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function XA(t){return t.substring($t.key,$t.keyEnd)}function JA(t){return eR(t),XD(t,JD(t,0,$t.textEnd))}function XD(t,n){let e=$t.textEnd;return e===n?-1:(n=$t.keyEnd=tR(t,$t.key=n,e),JD(t,n,e))}function eR(t){$t.key=0,$t.keyEnd=0,$t.value=0,$t.valueEnd=0,$t.textEnd=t.length}function JD(t,n,e){for(;n32;)n++;return n}function kl(t,n,e){return eE(t,n,e,!1),kl}function Xe(t,n){return eE(t,n,null,!0),Xe}function Wp(t){rR(lR,nR,t,!0)}function nR(t,n){for(let e=JA(n);e>=0;e=XD(n,e))wc(t,XA(n),!0)}function eE(t,n,e,r){let i=C(),o=ce(),s=os(2);if(o.firstUpdatePass&&nE(o,t,s,r),n!==Ve&&rt(i,s,n)){let a=o.data[Ut()];rE(o,a,i,i[oe],t,i[s+1]=dR(n,e),r,s)}}function rR(t,n,e,r){let i=ce(),o=os(2);i.firstUpdatePass&&nE(i,null,o,r);let s=C();if(e!==Ve&&rt(s,o,e)){let a=i.data[Ut()];if(iE(a,r)&&!tE(i,o)){let c=r?a.classesWithoutHost:a.stylesWithoutHost;c!==null&&(e=vc(c,e||"")),Xh(i,a,s,e,r)}else uR(i,a,s,s[oe],s[o+1],s[o+1]=cR(t,n,e),r,o)}}function tE(t,n){return n>=t.expandoStartIndex}function nE(t,n,e,r){let i=t.data;if(i[e+1]===null){let o=i[Ut()],s=tE(t,e);iE(o,r)&&n===null&&!s&&(n=!1),n=iR(i,o,n,r),ZA(i,o,n,e,s,r)}}function iR(t,n,e,r){let i=Yy(t),o=r?n.residualClasses:n.residualStyles;if(i===null)(r?n.classBindings:n.styleBindings)===0&&(e=mh(null,t,n,e,r),e=_s(e,n.attrs,r),o=null);else{let s=n.directiveStylingLast;if(s===-1||t[s]!==i)if(e=mh(i,t,n,e,r),o===null){let c=oR(t,n,r);c!==void 0&&Array.isArray(c)&&(c=mh(null,t,n,c[1],r),c=_s(c,n.attrs,r),sR(t,n,r,c))}else o=aR(t,n,r)}return o!==void 0&&(r?n.residualClasses=o:n.residualStyles=o),e}function oR(t,n,e){let r=e?n.classBindings:n.styleBindings;if(Ki(r)!==0)return t[Qr(r)]}function sR(t,n,e,r){let i=e?n.classBindings:n.styleBindings;t[Qr(i)]=r}function aR(t,n,e){let r,i=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0;){let c=t[i],l=Array.isArray(c),u=l?c[1]:c,d=u===null,h=e[i+1];h===Ve&&(h=d?Ge:void 0);let p=d?Cc(h,r):u===r?h:void 0;if(l&&!al(p)&&(p=Cc(c,r)),al(p)&&(a=p,s))return a;let m=t[i+1];i=s?Qr(m):Ki(m)}if(n!==null){let c=o?n.residualClasses:n.residualStyles;c!=null&&(a=Cc(c,r))}return a}function al(t){return t!==void 0}function dR(t,n){return t==null||t===""||(typeof n=="string"?t=t+n:typeof t=="object"&&(t=Xo(ft(t)))),t}function iE(t,n){return(t.flags&(n?8:16))!==0}function fR(t,n=""){let e=C(),r=ce(),i=t+le,o=r.firstCreatePass?Ji(r,i,1,n,null):r.data[i],s=hR(r,e,o,n);e[i]=s,kc()&&Ep(r,e,s,o),Vi(o,!1)}var hR=(t,n,e,r)=>(as(!0),JT(n[oe],r));function oE(t,n,e,r=""){return rt(t,On(),e)?n+un(e)+r:Ve}function pR(t,n,e,r,i,o=""){let s=Jf(),a=ys(t,s,e,i);return os(2),a?n+un(e)+r+un(i)+o:Ve}function mR(t,n,e,r,i,o,s,a=""){let c=Jf(),l=yD(t,c,e,i,s);return os(3),l?n+un(e)+r+un(i)+o+un(s)+a:Ve}function sE(t){return qp("",t),sE}function qp(t,n,e){let r=C(),i=oE(r,t,n,e);return i!==Ve&&Yp(r,Ut(),i),qp}function aE(t,n,e,r,i){let o=C(),s=pR(o,t,n,e,r,i);return s!==Ve&&Yp(o,Ut(),s),aE}function cE(t,n,e,r,i,o,s){let a=C(),c=mR(a,t,n,e,r,i,o,s);return c!==Ve&&Yp(a,Ut(),c),cE}function Yp(t,n,e){let r=jf(n,t);e0(t[oe],r,e)}function lE(t,n,e){jp(n)&&(n=n());let r=C(),i=On();if(rt(r,i,n)){let o=ce(),s=Bi();Y_(s,r,t,n,r[oe],e)}return lE}function gR(t,n){let e=jp(t);return e&&t.set(n),e}function uE(t,n){let e=C(),r=ce(),i=Ee();return ZD(r,e,e[oe],i,t,n),uE}function vR(t,n,e=""){return oE(C(),t,n,e)}function yR(t,n,e){let r=hn()+t,i=C();return i[r]===Ve?eo(i,r,n(e,i)):vD(i,r)}function zb(t,n,e){let r=ce();r.firstCreatePass&&dE(n,r.data,r.blueprint,Bt(t),e)}function dE(t,n,e,r,i){if(t=Me(t),Array.isArray(t))for(let o=0;o>20;if(Lr(t)||!t.multi){let p=new Zr(l,i,D,null),m=vh(c,n,i?u:u+h,d);m===-1?(bh(Zc(a,s),o,c),gh(o,t,n.length),n.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),e.push(p),s.push(p)):(e[m]=p,s[m]=p)}else{let p=vh(c,n,u+h,d),m=vh(c,n,u,u+h),_=p>=0&&e[p],E=m>=0&&e[m];if(i&&!E||!i&&!_){bh(Zc(a,s),o,c);let I=DR(i?_R:bR,e.length,i,r,l,t);!i&&E&&(e[m].providerFactory=I),gh(o,t,n.length,0),n.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),e.push(I),s.push(I)}else{let I=fE(e[i?m:p],l,!i&&r);gh(o,t,p>-1?p:m,I)}!i&&r&&E&&e[m].componentProviders++}}}function gh(t,n,e,r){let i=Lr(n),o=Ay(n);if(i||o){let c=(o?Me(n.useClass):n).prototype.ngOnDestroy;if(c){let l=t.destroyHooks||(t.destroyHooks=[]);if(!i&&n.multi){let u=l.indexOf(e);u===-1?l.push(e,[r,c]):l[u+1].push(r,c)}else l.push(e,c)}}}function fE(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function vh(t,n,e,r){for(let i=e;i{e.providersResolver=(r,i)=>zb(r,i?i(t):t,!1),n&&(e.viewProvidersResolver=(r,i)=>zb(r,i?i(n):n,!0))}}function ER(t,n){let e=hn()+t,r=C();return r[e]===Ve?eo(r,e,n()):vD(r,e)}function wR(t,n,e){return hE(C(),hn(),t,n,e)}function CR(t,n,e,r){return pE(C(),hn(),t,n,e,r)}function IR(t,n,e,r,i){return mE(C(),hn(),t,n,e,r,i)}function SR(t,n,e,r,i,o,s){return MR(C(),hn(),t,n,e,r,i,o)}function Fl(t,n){let e=t[n];return e===Ve?void 0:e}function hE(t,n,e,r,i,o){let s=n+e;return rt(t,s,i)?eo(t,s+1,o?r.call(o,i):r(i)):Fl(t,s+1)}function pE(t,n,e,r,i,o,s){let a=n+e;return ys(t,a,i,o)?eo(t,a+2,s?r.call(s,i,o):r(i,o)):Fl(t,a+2)}function mE(t,n,e,r,i,o,s,a){let c=n+e;return yD(t,c,i,o,s)?eo(t,c+3,a?r.call(a,i,o,s):r(i,o,s)):Fl(t,c+3)}function MR(t,n,e,r,i,o,s,a,c){let l=n+e;return Fx(t,l,i,o,s,a)?eo(t,l+4,c?r.call(c,i,o,s,a):r(i,o,s,a)):Fl(t,l+4)}function TR(t,n){let e=ce(),r,i=t+le;e.firstCreatePass?(r=xR(n,e.pipeRegistry),e.data[i]=r,r.onDestroy&&(e.destroyHooks??=[]).push(i,r.onDestroy)):r=e.data[i];let o=r.factory||(r.factory=rr(r.type,!0)),s,a=Ke(D);try{let c=Yc(!1),l=o();return Yc(c),Vf(e,C(),i,l),l}finally{Ke(a)}}function xR(t,n){if(n)for(let e=n.length-1;e>=0;e--){let r=n[e];if(t===r.name)return r}}function AR(t,n,e){let r=t+le,i=C(),o=rs(i,r);return Zp(i,r)?hE(i,hn(),n,o.transform,e,o):o.transform(e)}function RR(t,n,e,r){let i=t+le,o=C(),s=rs(o,i);return Zp(o,i)?pE(o,hn(),n,s.transform,e,r,s):s.transform(e,r)}function NR(t,n,e,r,i){let o=t+le,s=C(),a=rs(s,o);return Zp(s,o)?mE(s,hn(),n,a.transform,e,r,i,a):a.transform(e,r,i)}function Zp(t,n){return t[A].data[n].pure}function OR(t,n){return Dl(t,n)}var cl=class{ngModuleFactory;componentFactories;constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}},Kp=(()=>{class t{compileModuleSync(e){return new rl(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let r=this.compileModuleSync(e),i=wf(e),o=k_(i.declarations).reduce((s,a)=>{let c=ln(a);return c&&s.push(new fr(c)),s},[]);return new cl(r,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var gE=(()=>{class t{applicationErrorHandler=f(ut);appRef=f(He);taskService=f(kn);ngZone=f(j);zonelessEnabled=f(ls);tracing=f(Wt,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new G;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Ko):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(f(sh,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let e=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(e);return}this.switchToMicrotaskScheduler(),this.taskService.remove(e)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let e=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})})}notify(e){if(!this.zonelessEnabled&&e===5)return;switch(e){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;break}case 12:{this.appRef.dirtyFlags|=16;break}case 13:{this.appRef.dirtyFlags|=2;break}case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?ob:rh;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Ko+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){this.applicationErrorHandler(r)}finally{this.taskService.remove(e),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function kR(){return qt("NgZoneless"),sr([...Qp(),[]])}function Qp(){return[{provide:cn,useExisting:gE},{provide:j,useClass:Qo},{provide:ls,useValue:!0}]}function FR(){return typeof $localize<"u"&&$localize.locale||Ns}var Fs=new y("",{factory:()=>f(Fs,{optional:!0,skipSelf:!0})||FR()});var Ps=class{destroyed=!1;listeners=null;errorHandler=f(_t,{optional:!0});destroyRef=f(Ae);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(n){if(this.destroyed)throw new b(953,!1);return(this.listeners??=[]).push(n),{unsubscribe:()=>{let e=this.listeners?.indexOf(n);e!==void 0&&e!==-1&&this.listeners?.splice(e,1)}}}emit(n){if(this.destroyed){console.warn(Dt(953,!1));return}if(this.listeners===null)return;let e=x(null);try{for(let r of this.listeners)try{r(n)}catch(i){this.errorHandler?.handleError(i)}}finally{x(e)}}};function q(t){return hy(t)}function Kt(t,n){return zo(t,n?.equal)}var PR=t=>t;function Xp(t,n){if(typeof t=="function"){let e=nf(t,PR,n?.equal);return vE(e,n?.debugName)}else{let e=nf(t.source,t.computation,t.equal);return vE(e,t.debugName)}}function vE(t,n){let e=t[pe],r=t;return r.set=i=>dy(e,i),r.update=i=>fy(e,i),r.asReadonly=cs.bind(t),r}var Vl=Symbol("InputSignalNode#UNSET"),ME=F(g({},Go),{transformFn:void 0,applyValueToInputSignal(t,n){nr(t,n)}});function TE(t,n){let e=Object.create(ME);e.value=t,e.transformFn=n?.transform;function r(){if(Mn(e),e.value===Vl){let i=null;throw new b(-950,i)}return e.value}return r[pe]=e,r}var Ll=class{attributeName;constructor(n){this.attributeName=n}__NG_ELEMENT_ID__=()=>Es(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}},z4=(()=>{let t=new y("");return t.__NG_ELEMENT_ID__=n=>{let e=Ee();if(e===null)throw new b(-204,!1);if(e.type&2)return e.value;if(n&8)return null;throw new b(-204,!1)},t})();function G4(t){return new Ps}function yE(t,n){return TE(t,n)}function qR(t){return TE(Vl,t)}var xE=(yE.required=qR,yE);function bE(t,n){return Pp(n)}function YR(t,n){return Lp(n)}var W4=(bE.required=YR,bE);function q4(t,n){return AD(n)}function _E(t,n){return Pp(n)}function ZR(t,n){return Lp(n)}var Y4=(_E.required=ZR,_E);function AE(t,n){let e=Object.create(ME),r=new Ps;e.value=t;function i(){return Mn(e),DE(e.value),e.value}return i[pe]=e,i.asReadonly=cs.bind(i),i.set=o=>{e.equal(e.value,o)||(nr(e,o),r.emit(o))},i.update=o=>{DE(e.value),i.set(o(e.value))},i.subscribe=r.subscribe.bind(r),i.destroyRef=r.destroyRef,i}function DE(t){if(t===Vl)throw new b(952,!1)}function EE(t,n){return AE(t,n)}function KR(t){return AE(Vl,t)}var Z4=(EE.required=KR,EE);var em=new y(""),QR=new y("");function Ls(t){return!t.moduleRef}function XR(t){let n=Ls(t)?t.r3Injector:t.moduleRef.injector,e=n.get(j);return e.run(()=>{Ls(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let r=n.get(ut),i;if(e.runOutsideAngular(()=>{i=e.onError.subscribe({next:r})}),Ls(t)){let o=()=>n.destroy(),s=t.platformInjector.get(em);s.add(o),n.onDestroy(()=>{i.unsubscribe(),s.delete(o)})}else{let o=()=>t.moduleRef.destroy(),s=t.platformInjector.get(em);s.add(o),t.moduleRef.onDestroy(()=>{hs(t.allPlatformModules,t.moduleRef),i.unsubscribe(),s.delete(o)})}return eN(r,e,()=>{let o=n.get(kn),s=o.add(),a=n.get(Up);return a.runInitializers(),a.donePromise.then(()=>{let c=n.get(Fs,Ns);if(qD(c||Ns),!n.get(QR,!0))return Ls(t)?n.get(He):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(Ls(t)){let u=n.get(He);return t.rootComponent!==void 0&&u.bootstrap(t.rootComponent),u}else return JR?.(t.moduleRef,t.allPlatformModules),t.moduleRef}).finally(()=>{o.remove(s)})})})}var JR;function eN(t,n,e){try{let r=e();return jn(r)?r.catch(i=>{throw n.runOutsideAngular(()=>t(i)),i}):r}catch(r){throw n.runOutsideAngular(()=>t(r)),r}}var Pl=null;function tN(t=[],n){return $.create({name:n,providers:[{provide:ts,useValue:"platform"},{provide:em,useValue:new Set([()=>Pl=null])},...t]})}function nN(t=[]){if(Pl)return Pl;let n=tN(t);return Pl=n,BD(),rN(n),n}function rN(t){let n=t.get(ll,null);xe(t,()=>{n?.forEach(e=>e())})}var iN=1e4;var K4=iN-1e3;var St=(()=>{class t{static __NG_ELEMENT_ID__=oN}return t})();function oN(t){return sN(Ee(),C(),(t&16)===16)}function sN(t,n,e){if(fn(t)&&!e){let r=It(t.index,n);return new dr(r,r)}else if(t.type&175){let r=n[We];return new dr(r,n)}return null}var tm=class{supports(n){return Np(n)}create(n){return new nm(n)}},aN=(t,n)=>n,nm=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(n){this._trackByFn=n||aN}forEachItem(n){let e;for(e=this._itHead;e!==null;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,r=this._removalsHead,i=0,o=null;for(;e||r;){let s=!r||e&&e.currentIndex{s=this._trackByFn(i,a),e===null||!Object.is(e.trackById,s)?(e=this._mismatch(e,a,s,i),r=!0):(r&&(e=this._verifyReinsertion(e,a,s,i)),Object.is(e.item,a)||this._addIdentityChange(e,a)),e=e._next,i++}),this.length=i;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;n!==null;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;n!==null;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;n!==null;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,r,i){let o;return n===null?o=this._itTail:(o=n._prev,this._remove(n)),n=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null),n!==null?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,o,i)):(n=this._linkedRecords===null?null:this._linkedRecords.get(r,i),n!==null?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,o,i)):n=this._addAfter(new rm(e,r),o,i)),n}_verifyReinsertion(n,e,r,i){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null);return o!==null?n=this._reinsertAfter(o,n._prev,i):n.currentIndex!=i&&(n.currentIndex=i,this._addToMoves(n,i)),n}_truncate(n){for(;n!==null;){let e=n._next;this._addToRemovals(this._unlink(n)),n=e}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,r){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(n);let i=n._prevRemoved,o=n._nextRemoved;return i===null?this._removalsHead=o:i._nextRemoved=o,o===null?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(n,e,r),this._addToMoves(n,r),n}_moveAfter(n,e,r){return this._unlink(n),this._insertAfter(n,e,r),this._addToMoves(n,r),n}_addAfter(n,e,r){return this._insertAfter(n,e,r),this._additionsTail===null?this._additionsTail=this._additionsHead=n:this._additionsTail=this._additionsTail._nextAdded=n,n}_insertAfter(n,e,r){let i=e===null?this._itHead:e._next;return n._next=i,n._prev=e,i===null?this._itTail=n:i._prev=n,e===null?this._itHead=n:e._next=n,this._linkedRecords===null&&(this._linkedRecords=new jl),this._linkedRecords.put(n),n.currentIndex=r,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){this._linkedRecords!==null&&this._linkedRecords.remove(n);let e=n._prev,r=n._next;return e===null?this._itHead=r:e._next=r,r===null?this._itTail=e:r._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail===null?this._movesTail=this._movesHead=n:this._movesTail=this._movesTail._nextMoved=n),n}_addToRemovals(n){return this._unlinkedRecords===null&&(this._unlinkedRecords=new jl),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=n:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=n,n}},rm=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(n,e){this.item=n,this.trackById=e}},im=class{_head=null;_tail=null;add(n){this._head===null?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let r;for(r=this._head;r!==null;r=r._nextDup)if((e===null||e<=r.currentIndex)&&Object.is(r.trackById,n))return r;return null}remove(n){let e=n._prevDup,r=n._nextDup;return e===null?this._head=r:e._nextDup=r,r===null?this._tail=e:r._prevDup=e,this._head===null}},jl=class{map=new Map;put(n){let e=n.trackById,r=this.map.get(e);r||(r=new im,this.map.set(e,r)),r.add(n)}get(n,e){let r=n,i=this.map.get(r);return i?i.get(n,e):null}remove(n){let e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function wE(t,n,e){let r=t.previousIndex;if(r===null)return r;let i=0;return e&&r{if(e&&e.key===i)this._maybeAddToChanges(e,r),this._appendAfter=e,e=e._next;else{let o=this._getOrCreateRecordForKey(i,r);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let r=e;r!==null;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){let r=n._prev;return e._next=n,e._prev=r,n._prev=e,r&&(r._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){let i=this._records.get(n);this._maybeAddToChanges(i,e);let o=i._prev,s=i._next;return o&&(o._next=s),s&&(s._prev=o),i._next=null,i._prev=null,i}let r=new am(n);return this._records.set(n,r),r.currentValue=e,this._addToAdditions(r),r}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;n!==null;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;n!==null;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;n!=null;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){this._additionsHead===null?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){this._changesHead===null?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(r=>e(n[r],r))}},am=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(n){this.key=n}};function CE(){return new Bl([new tm])}var Bl=(()=>{class t{factories;static \u0275prov=v({token:t,providedIn:"root",factory:CE});constructor(e){this.factories=e}static create(e,r){if(r!=null){let i=r.factories.slice();e=e.concat(i)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let r=f(t,{optional:!0,skipSelf:!0});return t.create(e,r||CE())}}}find(e){let r=this.factories.find(i=>i.supports(e));if(r!=null)return r;throw new b(901,!1)}}return t})();function IE(){return new um([new om])}var um=(()=>{class t{static \u0275prov=v({token:t,providedIn:"root",factory:IE});factories;constructor(e){this.factories=e}static create(e,r){if(r){let i=r.factories.slice();e=e.concat(i)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let r=f(t,{optional:!0,skipSelf:!0});return t.create(e,r||IE())}}}find(e){let r=this.factories.find(i=>i.supports(e));if(r)return r;throw new b(901,!1)}}return t})();var RE=(()=>{class t{constructor(e){}static \u0275fac=function(r){return new(r||t)(w(He))};static \u0275mod=X({type:t});static \u0275inj=Z({})}return t})();function NE(t){let{rootComponent:n,appProviders:e,platformProviders:r,platformRef:i}=t;ie(K.BootstrapApplicationStart);try{let o=i?.injector??nN(r),s=[Qp(),ab,...e||[]],a=new bs({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return XR({r3Injector:a.injector,platformInjector:o,rootComponent:n})}catch(o){return Promise.reject(o)}finally{ie(K.BootstrapApplicationEnd)}}function ue(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function dm(t,n=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):n}var Jp=Symbol("NOT_SET"),OE=new Set,cN=F(g({},Go),{kind:"afterRenderEffectPhase",consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Jp,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(Mn(l),l.value),l.signal[pe]=l,l.registerCleanupFn=u=>(l.cleanup??=new Set).add(u),this.nodes[a]=l,this.hooks[a]=u=>l.phaseFn(u)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){if(this.onDestroyFns!==null)for(let n of this.onDestroyFns)n();super.destroy();for(let n of this.nodes)if(n)try{for(let e of n.cleanup??OE)e()}finally{tr(n)}}};function Q4(t,n){let e=n?.injector??f($),r=e.get(cn),i=e.get(gl),o=e.get(Wt,null,{optional:!0});i.impl??=e.get(_p);let s=t;typeof s=="function"&&(s={mixedReadWrite:t});let a=e.get(Ui,null,{optional:!0}),c=new cm(i.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,r,e,o?.snapshot(null));return i.impl.register(c),c}function Ul(t,n){let e=ln(t),r=n.elementInjector||ki();return new fr(e).create(r,n.projectableNodes,n.hostElement,n.environmentInjector,n.directives,n.bindings)}function kE(t){let n=ln(t);if(!n)return null;let e=new fr(n);return{get selector(){return e.selector},get type(){return e.componentType},get inputs(){return e.inputs},get outputs(){return e.outputs},get ngContentSelectors(){return e.ngContentSelectors},get isStandalone(){return n.standalone},get isSignal(){return n.signals}}}var FE=null;function mt(){return FE}function fm(t){FE??=t}var js=class{},Bn=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:()=>f(PE),providedIn:"platform"})}return t})(),hm=new y(""),PE=(()=>{class t extends Bn{_location;_history;_doc=f(L);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return mt().getBaseHref(this._doc)}onPopState(e){let r=mt().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",e,!1),()=>r.removeEventListener("popstate",e)}onHashChange(e){let r=mt().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",e,!1),()=>r.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,r,i){this._history.pushState(e,r,i)}replaceState(e,r,i){this._history.replaceState(e,r,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function Hl(t,n){return t?n?t.endsWith("/")?n.startsWith("/")?t+n.slice(1):t+n:n.startsWith("/")?t+n:`${t}/${n}`:t:n}function LE(t){let n=t.search(/#|\?|$/);return t[n-1]==="/"?t.slice(0,n-1)+t.slice(n):t}function Qt(t){return t&&t[0]!=="?"?`?${t}`:t}var Xt=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:()=>f(zl),providedIn:"root"})}return t})(),$l=new y(""),zl=(()=>{class t extends Xt{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,r){super(),this._platformLocation=e,this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??f(L).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return Hl(this._baseHref,e)}path(e=!1){let r=this._platformLocation.pathname+Qt(this._platformLocation.search),i=this._platformLocation.hash;return i&&e?`${r}${i}`:r}pushState(e,r,i,o){let s=this.prepareExternalUrl(i+Qt(o));this._platformLocation.pushState(e,r,s)}replaceState(e,r,i,o){let s=this.prepareExternalUrl(i+Qt(o));this._platformLocation.replaceState(e,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(r){return new(r||t)(w(Bn),w($l,8))};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var yn=(()=>{class t{_subject=new S;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let r=this._locationStrategy.getBaseHref();this._basePath=dN(LE(jE(r))),this._locationStrategy.onPopState(i=>{this._subject.next({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,r=""){return this.path()==this.normalize(e+Qt(r))}normalize(e){return t.stripTrailingSlash(uN(this._basePath,jE(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,r="",i=null){this._locationStrategy.pushState(i,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Qt(r)),i)}replaceState(e,r="",i=null){this._locationStrategy.replaceState(i,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Qt(r)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",r){this._urlChangeListeners.forEach(i=>i(e,r))}subscribe(e,r,i){return this._subject.subscribe({next:e,error:r??void 0,complete:i??void 0})}static normalizeQueryParams=Qt;static joinWithSlash=Hl;static stripTrailingSlash=LE;static \u0275fac=function(r){return new(r||t)(w(Xt))};static \u0275prov=v({token:t,factory:()=>lN(),providedIn:"root"})}return t})();function lN(){return new yn(w(Xt))}function uN(t,n){if(!t||!n.startsWith(t))return n;let e=n.substring(t.length);return e===""||["/",";","?","#"].includes(e[0])?e:n}function jE(t){return t.replace(/\/index.html$/,"")}function dN(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}var _m=(()=>{class t extends Xt{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(e,r){super(),this._platformLocation=e,r!=null&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let r=this._platformLocation.hash??"#";return r.length>0?r.substring(1):r}prepareExternalUrl(e){let r=Hl(this._baseHref,e);return r.length>0?"#"+r:r}pushState(e,r,i,o){let s=this.prepareExternalUrl(i+Qt(o))||this._platformLocation.pathname;this._platformLocation.pushState(e,r,s)}replaceState(e,r,i,o){let s=this.prepareExternalUrl(i+Qt(o))||this._platformLocation.pathname;this._platformLocation.replaceState(e,r,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(r){return new(r||t)(w(Bn),w($l,8))};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})();var Ye=(function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t})(Ye||{}),ae=(function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t})(ae||{}),ot=(function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t})(ot||{}),Hn={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function $E(t){return pt(t)[_e.LocaleId]}function zE(t,n,e){let r=pt(t),i=[r[_e.DayPeriodsFormat],r[_e.DayPeriodsStandalone]],o=Mt(i,n);return Mt(o,e)}function GE(t,n,e){let r=pt(t),i=[r[_e.DaysFormat],r[_e.DaysStandalone]],o=Mt(i,n);return Mt(o,e)}function WE(t,n,e){let r=pt(t),i=[r[_e.MonthsFormat],r[_e.MonthsStandalone]],o=Mt(i,n);return Mt(o,e)}function qE(t,n){let r=pt(t)[_e.Eras];return Mt(r,n)}function Vs(t,n){let e=pt(t);return Mt(e[_e.DateFormat],n)}function Bs(t,n){let e=pt(t);return Mt(e[_e.TimeFormat],n)}function Us(t,n){let r=pt(t)[_e.DateTimeFormat];return Mt(r,n)}function Hs(t,n){let e=pt(t),r=e[_e.NumberSymbols][n];if(typeof r>"u"){if(n===Hn.CurrencyDecimal)return e[_e.NumberSymbols][Hn.Decimal];if(n===Hn.CurrencyGroup)return e[_e.NumberSymbols][Hn.Group]}return r}function YE(t){if(!t[_e.ExtraData])throw new b(2303,!1)}function ZE(t){let n=pt(t);return YE(n),(n[_e.ExtraData][2]||[]).map(r=>typeof r=="string"?pm(r):[pm(r[0]),pm(r[1])])}function KE(t,n,e){let r=pt(t);YE(r);let i=[r[_e.ExtraData][0],r[_e.ExtraData][1]],o=Mt(i,n)||[];return Mt(o,e)||[]}function Mt(t,n){for(let e=n;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new b(2304,!1)}function pm(t){let[n,e]=t.split(":");return{hours:+n,minutes:+e}}var fN=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Gl={},hN=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function QE(t,n,e,r){let i=EN(t);n=Un(e,n)||n;let s=[],a;for(;n;)if(a=hN.exec(n),a){s=s.concat(a.slice(1));let u=s.pop();if(!u)break;n=u}else{s.push(n);break}let c=i.getTimezoneOffset();r&&(c=JE(r,c),i=DN(i,r));let l="";return s.forEach(u=>{let d=bN(u);l+=d?d(i,e,c):u==="''"?"'":u.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function Kl(t,n,e){let r=new Date(0);return r.setFullYear(t,n,e),r.setHours(0,0,0),r}function Un(t,n){let e=$E(t);if(Gl[e]??={},Gl[e][n])return Gl[e][n];let r="";switch(n){case"shortDate":r=Vs(t,ot.Short);break;case"mediumDate":r=Vs(t,ot.Medium);break;case"longDate":r=Vs(t,ot.Long);break;case"fullDate":r=Vs(t,ot.Full);break;case"shortTime":r=Bs(t,ot.Short);break;case"mediumTime":r=Bs(t,ot.Medium);break;case"longTime":r=Bs(t,ot.Long);break;case"fullTime":r=Bs(t,ot.Full);break;case"short":let i=Un(t,"shortTime"),o=Un(t,"shortDate");r=Wl(Us(t,ot.Short),[i,o]);break;case"medium":let s=Un(t,"mediumTime"),a=Un(t,"mediumDate");r=Wl(Us(t,ot.Medium),[s,a]);break;case"long":let c=Un(t,"longTime"),l=Un(t,"longDate");r=Wl(Us(t,ot.Long),[c,l]);break;case"full":let u=Un(t,"fullTime"),d=Un(t,"fullDate");r=Wl(Us(t,ot.Full),[u,d]);break}return r&&(Gl[e][n]=r),r}function Wl(t,n){return n&&(t=t.replace(/\{([^}]+)}/g,function(e,r){return n!=null&&r in n?n[r]:e})),t}function Jt(t,n,e="-",r,i){let o="";(t<0||i&&t<=0)&&(i?t=-t+1:(t=-t,o=e));let s=String(t);for(;s.length0||a>-e)&&(a+=e),t===3)a===0&&e===-12&&(a=12);else if(t===6)return pN(a,n);let c=Hs(s,Hn.MinusSign);return Jt(a,n,c,r,i)}}function mN(t,n){switch(t){case 0:return n.getFullYear();case 1:return n.getMonth();case 2:return n.getDate();case 3:return n.getHours();case 4:return n.getMinutes();case 5:return n.getSeconds();case 6:return n.getMilliseconds();case 7:return n.getDay();default:throw new b(2301,!1)}}function de(t,n,e=Ye.Format,r=!1){return function(i,o){return gN(i,o,t,n,e,r)}}function gN(t,n,e,r,i,o){switch(e){case 2:return WE(n,i,r)[t.getMonth()];case 1:return GE(n,i,r)[t.getDay()];case 0:let s=t.getHours(),a=t.getMinutes();if(o){let l=ZE(n),u=KE(n,i,r),d=l.findIndex(h=>{if(Array.isArray(h)){let[p,m]=h,_=s>=p.hours&&a>=p.minutes,E=s0?Math.floor(i/60):Math.ceil(i/60);switch(t){case 0:return(i>=0?"+":"")+Jt(s,2,o)+Jt(Math.abs(i%60),2,o);case 1:return"GMT"+(i>=0?"+":"")+Jt(s,1,o);case 2:return"GMT"+(i>=0?"+":"")+Jt(s,2,o)+":"+Jt(Math.abs(i%60),2,o);case 3:return r===0?"Z":(i>=0?"+":"")+Jt(s,2,o)+":"+Jt(Math.abs(i%60),2,o);default:throw new b(2310,!1)}}}var vN=0,Zl=4;function yN(t){let n=Kl(t,vN,1).getDay();return Kl(t,0,1+(n<=Zl?Zl:Zl+7)-n)}function XE(t){let n=t.getDay(),e=n===0?-3:Zl-n;return Kl(t.getFullYear(),t.getMonth(),t.getDate()+e)}function mm(t,n=!1){return function(e,r){let i;if(n){let o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();i=1+Math.floor((s+o)/7)}else{let o=XE(e),s=yN(o.getFullYear()),a=o.getTime()-s.getTime();i=1+Math.round(a/6048e5)}return Jt(i,t,Hs(r,Hn.MinusSign))}}function Yl(t,n=!1){return function(e,r){let o=XE(e).getFullYear();return Jt(o,t,Hs(r,Hn.MinusSign),n)}}var gm={};function bN(t){if(gm[t])return gm[t];let n;switch(t){case"G":case"GG":case"GGG":n=de(3,ae.Abbreviated);break;case"GGGG":n=de(3,ae.Wide);break;case"GGGGG":n=de(3,ae.Narrow);break;case"y":n=Ce(0,1,0,!1,!0);break;case"yy":n=Ce(0,2,0,!0,!0);break;case"yyy":n=Ce(0,3,0,!1,!0);break;case"yyyy":n=Ce(0,4,0,!1,!0);break;case"Y":n=Yl(1);break;case"YY":n=Yl(2,!0);break;case"YYY":n=Yl(3);break;case"YYYY":n=Yl(4);break;case"M":case"L":n=Ce(1,1,1);break;case"MM":case"LL":n=Ce(1,2,1);break;case"MMM":n=de(2,ae.Abbreviated);break;case"MMMM":n=de(2,ae.Wide);break;case"MMMMM":n=de(2,ae.Narrow);break;case"LLL":n=de(2,ae.Abbreviated,Ye.Standalone);break;case"LLLL":n=de(2,ae.Wide,Ye.Standalone);break;case"LLLLL":n=de(2,ae.Narrow,Ye.Standalone);break;case"w":n=mm(1);break;case"ww":n=mm(2);break;case"W":n=mm(1,!0);break;case"d":n=Ce(2,1);break;case"dd":n=Ce(2,2);break;case"c":case"cc":n=Ce(7,1);break;case"ccc":n=de(1,ae.Abbreviated,Ye.Standalone);break;case"cccc":n=de(1,ae.Wide,Ye.Standalone);break;case"ccccc":n=de(1,ae.Narrow,Ye.Standalone);break;case"cccccc":n=de(1,ae.Short,Ye.Standalone);break;case"E":case"EE":case"EEE":n=de(1,ae.Abbreviated);break;case"EEEE":n=de(1,ae.Wide);break;case"EEEEE":n=de(1,ae.Narrow);break;case"EEEEEE":n=de(1,ae.Short);break;case"a":case"aa":case"aaa":n=de(0,ae.Abbreviated);break;case"aaaa":n=de(0,ae.Wide);break;case"aaaaa":n=de(0,ae.Narrow);break;case"b":case"bb":case"bbb":n=de(0,ae.Abbreviated,Ye.Standalone,!0);break;case"bbbb":n=de(0,ae.Wide,Ye.Standalone,!0);break;case"bbbbb":n=de(0,ae.Narrow,Ye.Standalone,!0);break;case"B":case"BB":case"BBB":n=de(0,ae.Abbreviated,Ye.Format,!0);break;case"BBBB":n=de(0,ae.Wide,Ye.Format,!0);break;case"BBBBB":n=de(0,ae.Narrow,Ye.Format,!0);break;case"h":n=Ce(3,1,-12);break;case"hh":n=Ce(3,2,-12);break;case"H":n=Ce(3,1);break;case"HH":n=Ce(3,2);break;case"m":n=Ce(4,1);break;case"mm":n=Ce(4,2);break;case"s":n=Ce(5,1);break;case"ss":n=Ce(5,2);break;case"S":n=Ce(6,1);break;case"SS":n=Ce(6,2);break;case"SSS":n=Ce(6,3);break;case"Z":case"ZZ":case"ZZZ":n=ql(0);break;case"ZZZZZ":n=ql(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=ql(1);break;case"OOOO":case"ZZZZ":case"zzzz":n=ql(2);break;default:return null}return gm[t]=n,n}function JE(t,n){t=t.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?n:e}function _N(t,n){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+n),t}function DN(t,n,e){let i=t.getTimezoneOffset(),o=JE(n,i);return _N(t,-1*(o-i))}function EN(t){if(VE(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[i,o=1,s=1]=t.split("-").map(a=>+a);return Kl(i,o-1,s)}let e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let r;if(r=t.match(fN))return wN(r)}let n=new Date(t);if(!VE(n))throw new b(2311,!1);return n}function wN(t){let n=new Date(0),e=0,r=0,i=t[8]?n.setUTCFullYear:n.setFullYear,o=t[8]?n.setUTCHours:n.setHours;t[9]&&(e=Number(t[9]+t[10]),r=Number(t[9]+t[11])),i.call(n,Number(t[1]),Number(t[2])-1,Number(t[3]));let s=Number(t[4]||0)-e,a=Number(t[5]||0)-r,c=Number(t[6]||0),l=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return o.call(n,s,a,c,l),n}function VE(t){return t instanceof Date&&!isNaN(t.valueOf())}var vm=/\s+/,BE=[],CN=(()=>{class t{_ngEl;_renderer;initialClasses=BE;rawClass;stateMap=new Map;constructor(e,r){this._ngEl=e,this._renderer=r}set klass(e){this.initialClasses=e!=null?e.trim().split(vm):BE}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(vm):e}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let r of e)this._updateState(r,!0);else if(e!=null)for(let r of Object.keys(e))this._updateState(r,!!e[r]);this._applyStateDiff()}_updateState(e,r){let i=this.stateMap.get(e);i!==void 0?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(e,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let r=e[0],i=e[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(e,r){e=e.trim(),e.length>0&&e.split(vm).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static \u0275fac=function(r){return new(r||t)(D(z),D(Oe))};static \u0275dir=M({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})();var Ql=class{$implicit;ngForOf;index;count;constructor(n,e,r,i){this.$implicit=n,this.ngForOf=e,this.index=r,this.count=i}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},ew=(()=>{class t{_viewContainer;_template;_differs;set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}_ngForOf=null;_ngForOfDirty=!0;_differ=null;_trackByFn;constructor(e,r,i){this._viewContainer=e,this._template=r,this._differs=i}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let r=this._viewContainer;e.forEachOperation((i,o,s)=>{if(i.previousIndex==null)r.createEmbeddedView(this._template,new Ql(i.item,this._ngForOf,-1,-1),s===null?void 0:s);else if(s==null)r.remove(o===null?void 0:o);else if(o!==null){let a=r.get(o);r.move(a,s),UE(a,i)}});for(let i=0,o=r.length;i{let o=r.get(i.currentIndex);UE(o,i)})}static ngTemplateContextGuard(e,r){return!0}static \u0275fac=function(r){return new(r||t)(D(qe),D(dt),D(Bl))};static \u0275dir=M({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return t})();function UE(t,n){t.context.$implicit=n.item}var IN=(()=>{class t{_viewContainer;_context=new Xl;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(e,r){this._viewContainer=e,this._thenTemplateRef=r}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){HE(e,!1),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){HE(e,!1),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(e,r){return!0}static \u0275fac=function(r){return new(r||t)(D(qe),D(dt))};static \u0275dir=M({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return t})(),Xl=class{$implicit=null;ngIf=null};function HE(t,n){if(t&&!t.createEmbeddedView)throw new b(2020,!1)}var SN=(()=>{class t{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(e,r,i){this._ngEl=e,this._differs=r,this._renderer=i}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){let e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,r){let[i,o]=e.split("."),s=i.indexOf("-")===-1?void 0:Gt.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,i,o?`${r}${o}`:r,s):this._renderer.removeStyle(this._ngEl.nativeElement,i,s)}_applyChanges(e){e.forEachRemovedItem(r=>this._setStyle(r.key,null)),e.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),e.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}static \u0275fac=function(r){return new(r||t)(D(z),D(um),D(Oe))};static \u0275dir=M({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return t})(),MN=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=f($);constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,r,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,i):!1,get:(e,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static \u0275fac=function(r){return new(r||t)(D(qe))};static \u0275dir=M({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Re]})}return t})();function Dm(t,n){return new b(2100,!1)}var ym=class{createSubscription(n,e,r){return q(()=>n.subscribe({next:e,error:r}))}dispose(n){q(()=>n.unsubscribe())}},bm=class{createSubscription(n,e,r){return n.then(i=>e?.(i),i=>r?.(i)),{unsubscribe:()=>{e=null,r=null}}}dispose(n){n.unsubscribe()}},TN=new bm,xN=new ym,AN=(()=>{class t{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=f(ut);constructor(e){this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,r=>this._updateLatestValue(e,r),r=>this.applicationErrorHandler(r))}_selectStrategy(e){if(jn(e))return TN;if(Tl(e))return xN;throw Dm(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,r){e===this._obj&&(this._latestValue=r,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(r){return new(r||t)(D(St,16))};static \u0275pipe=As({name:"async",type:t,pure:!1})}return t})();var RN=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\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-\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\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\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\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g,NN=(()=>{class t{transform(e){return e==null?null:(ON(t,e),e.replace(RN,r=>r[0].toUpperCase()+r.slice(1).toLowerCase()))}static \u0275fac=function(r){return new(r||t)};static \u0275pipe=As({name:"titlecase",type:t,pure:!0})}return t})();function ON(t,n){if(typeof n!="string")throw Dm(t,n)}var kN="mediumDate",tw=new y(""),nw=new y(""),FN=(()=>{class t{locale;defaultTimezone;defaultOptions;constructor(e,r,i){this.locale=e,this.defaultTimezone=r,this.defaultOptions=i}transform(e,r,i,o){if(e==null||e===""||e!==e)return null;try{let s=r??this.defaultOptions?.dateFormat??kN,a=i??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return QE(e,s,o||this.locale,a)}catch(s){throw Dm(t,s.message)}}static \u0275fac=function(r){return new(r||t)(D(Fs,16),D(tw,24),D(nw,24))};static \u0275pipe=As({name:"date",type:t,pure:!0})}return t})();var Em=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({})}return t})();function $s(t,n){n=encodeURIComponent(n);for(let e of t.split(";")){let r=e.indexOf("="),[i,o]=r==-1?[e,""]:[e.slice(0,r),e.slice(r+1)];if(i.trim()===n)return decodeURIComponent(o)}return null}var ni=class{};var Cm="browser";function rw(t){return t===Cm}var Im=(()=>{class t{static \u0275prov=v({token:t,providedIn:"root",factory:()=>new wm(f(L),window)})}return t})(),wm=class{document;window;offset=()=>[0,0];constructor(n,e){this.document=n,this.window=e}setOffset(n){Array.isArray(n)?this.offset=()=>n:this.offset=n}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(n,e){this.window.scrollTo(F(g({},e),{left:n[0],top:n[1]}))}scrollToAnchor(n,e){let r=PN(this.document,n);r&&(this.scrollToElement(r,e),r.focus())}setHistoryScrollRestoration(n){try{this.window.history.scrollRestoration=n}catch{console.warn(Dt(2400,!1))}}scrollToElement(n,e){let r=n.getBoundingClientRect(),i=r.left+this.window.pageXOffset,o=r.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(F(g({},e),{left:i-s[0],top:o-s[1]}))}};function PN(t,n){let e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let r=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),i=r.currentNode;for(;i;){let o=i.shadowRoot;if(o){let s=o.getElementById(n)||o.querySelector(`[name="${n}"]`);if(s)return s}i=r.nextNode()}}return null}var zs=class{_doc;constructor(n){this._doc=n}manager},Jl=(()=>{class t extends zs{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,i,o){return e.addEventListener(r,i,o),()=>this.removeEventListener(e,r,i,o)}removeEventListener(e,r,i,o){return e.removeEventListener(r,i,o)}static \u0275fac=function(r){return new(r||t)(w(L))};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})(),nu=new y(""),xm=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,r){this._zone=r,e.forEach(s=>{s.manager=this});let i=e.filter(s=>!(s instanceof Jl));this._plugins=i.slice().reverse();let o=e.find(s=>s instanceof Jl);o&&this._plugins.push(o)}addEventListener(e,r,i,o){return this._findPluginFor(r).addEventListener(e,r,i,o)}getZone(){return this._zone}_findPluginFor(e){let r=this._eventNameToPlugin.get(e);if(r)return r;if(r=this._plugins.find(o=>o.supports(e)),!r)throw new b(5101,!1);return this._eventNameToPlugin.set(e,r),r}static \u0275fac=function(r){return new(r||t)(w(nu),w(j))};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})(),Sm="ng-app-id";function iw(t){for(let n of t)n.remove()}function ow(t,n){let e=n.createElement("style");return e.textContent=t,e}function jN(t,n,e,r){let i=t.head?.querySelectorAll(`style[${Sm}="${n}"],link[${Sm}="${n}"]`);if(i)for(let o of i)o.removeAttribute(Sm),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function Tm(t,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var Am=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,r,i,o={}){this.doc=e,this.appId=r,this.nonce=i,jN(e,r,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,r){for(let i of e)this.addUsage(i,this.inline,ow);r?.forEach(i=>this.addUsage(i,this.external,Tm))}removeStyles(e,r){for(let i of e)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(e,r,i){let o=r.get(e);o?o.usage++:r.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(e,this.doc)))})}removeUsage(e,r){let i=r.get(e);i&&(i.usage--,i.usage<=0&&(iw(i.elements),r.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])iw(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(e,ow(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(e,Tm(r,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,r){return this.nonce&&r.setAttribute("nonce",this.nonce),e.appendChild(r)}static \u0275fac=function(r){return new(r||t)(w(L),w(hr),w(Xi,8),w(Xr))};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})(),Mm={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Rm=/%COMP%/g;var aw="%COMP%",VN=`_nghost-${aw}`,BN=`_ngcontent-${aw}`,UN=!0,HN=new y("",{factory:()=>UN});function $N(t){return BN.replace(Rm,t)}function zN(t){return VN.replace(Rm,t)}function cw(t,n){return n.map(e=>e.replace(Rm,t))}var Nm=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,r,i,o,s,a,c=null,l=null){this.eventManager=e,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=c,this.tracingService=l,this.defaultRenderer=new Gs(e,s,a,this.tracingService)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;let i=this.getOrCreateRenderer(e,r);return i instanceof tu?i.applyToHost(e):i instanceof Ws&&i.applyStyles(),i}getOrCreateRenderer(e,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,c=this.eventManager,l=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,d=this.tracingService;switch(r.encapsulation){case zt.Emulated:o=new tu(c,l,r,this.appId,u,s,a,d);break;case zt.ShadowDom:return new eu(c,e,r,s,a,this.nonce,d,l);case zt.ExperimentalIsolatedShadowDom:return new eu(c,e,r,s,a,this.nonce,d);default:o=new Ws(c,l,r,u,s,a,d);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(r){return new(r||t)(w(xm),w(Am),w(hr),w(HN),w(L),w(j),w(Xi),w(Wt,8))};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})(),Gs=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,r,i){this.eventManager=n,this.doc=e,this.ngZone=r,this.tracingService=i}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(Mm[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(sw(n)?n.content:n).appendChild(e)}insertBefore(n,e,r){n&&(sw(n)?n.content:n).insertBefore(e,r)}removeChild(n,e){e.remove()}selectRootElement(n,e){let r=typeof n=="string"?this.doc.querySelector(n):n;if(!r)throw new b(-5104,!1);return e||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,r,i){if(i){e=i+":"+e;let o=Mm[i];o?n.setAttributeNS(o,e,r):n.setAttribute(e,r)}else n.setAttribute(e,r)}removeAttribute(n,e,r){if(r){let i=Mm[r];i?n.removeAttributeNS(i,e):n.removeAttribute(`${r}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,r,i){i&(Gt.DashCase|Gt.Important)?n.style.setProperty(e,r,i&Gt.Important?"important":""):n.style[e]=r}removeStyle(n,e,r){r&Gt.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,r){n!=null&&(n[e]=r)}setValue(n,e){n.nodeValue=e}listen(n,e,r,i){if(typeof n=="string"&&(n=mt().getGlobalEventTarget(this.doc,n),!n))throw new b(5102,!1);let o=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(n,e,o)),this.eventManager.addEventListener(n,e,o,i)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function sw(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var eu=class extends Gs{hostEl;sharedStylesHost;shadowRoot;constructor(n,e,r,i,o,s,a,c){super(n,i,o,a),this.hostEl=e,this.sharedStylesHost=c,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let l=r.styles;l=cw(r.id,l);for(let d of l){let h=document.createElement("style");s&&h.setAttribute("nonce",s),h.textContent=d,this.shadowRoot.appendChild(h)}let u=r.getExternalStyles?.();if(u)for(let d of u){let h=Tm(d,i);s&&h.setAttribute("nonce",s),this.shadowRoot.appendChild(h)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,r){return super.insertBefore(this.nodeOrShadowRoot(n),e,r)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},Ws=class extends Gs{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(n,e,r,i,o,s,a,c){super(n,o,s,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=i;let l=r.styles;this.styles=c?cw(c,l):l,this.styleUrls=r.getExternalStyles?.(c)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Kr.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},tu=class extends Ws{contentAttr;hostAttr;constructor(n,e,r,i,o,s,a,c){let l=i+"-"+r.id;super(n,e,r,o,s,a,c,l),this.contentAttr=$N(l),this.hostAttr=zN(l)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let r=super.createElement(n,e);return super.setAttribute(r,this.contentAttr,""),r}};var ru=class t extends js{supportsDOMEvents=!0;static makeCurrent(){fm(new t)}onAndCancel(n,e,r,i){return n.addEventListener(e,r,i),()=>{n.removeEventListener(e,r,i)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=GN();return e==null?null:WN(e)}resetBaseElement(){qs=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return $s(document.cookie,n)}},qs=null;function GN(){return qs=qs||document.head.querySelector("base"),qs?qs.getAttribute("href"):null}function WN(t){return new URL(t,document.baseURI).pathname}var iu=class{addToWindow(n){ye.getAngularTestability=(r,i=!0)=>{let o=n.findTestabilityInTree(r,i);if(o==null)throw new b(5103,!1);return o},ye.getAllAngularTestabilities=()=>n.getAllTestabilities(),ye.getAllAngularRootElements=()=>n.getAllRootElements();let e=r=>{let i=ye.getAllAngularTestabilities(),o=i.length,s=function(){o--,o==0&&r()};i.forEach(a=>{a.whenStable(s)})};ye.frameworkStabilizers||(ye.frameworkStabilizers=[]),ye.frameworkStabilizers.push(e)}findTestabilityInTree(n,e,r){if(e==null)return null;let i=n.getTestability(e);return i??(r?mt().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},qN=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})(),lw=["alt","control","meta","shift"],YN={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},ZN={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},uw=(()=>{class t extends zs{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,r,i,o){let s=t.parseEventName(r),a=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>mt().onAndCancel(e,s.domEventName,a,o))}static parseEventName(e){let r=e.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=t._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),lw.forEach(l=>{let u=r.indexOf(l);u>-1&&(r.splice(u,1),s+=l+".")}),s+=o,r.length!=0||o.length===0)return null;let c={};return c.domEventName=i,c.fullKey=s,c}static matchEventFullKeyCode(e,r){let i=YN[e.key]||e.key,o="";return r.indexOf("code.")>-1&&(i=e.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),lw.forEach(s=>{if(s!==i){let a=ZN[s];a(e)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(e,r,i){return o=>{t.matchEventFullKeyCode(o,e)&&i.runGuarded(()=>r(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(r){return new(r||t)(w(L))};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})();async function KN(t,n,e){let r=g({rootComponent:t},QN(n,e));return NE(r)}function QN(t,n){return{platformRef:n?.platformRef,appProviders:[...dw,...t?.providers??[]],platformProviders:tO}}function XN(){ru.makeCurrent()}function JN(){return new _t}function eO(){return ip(document),document}var tO=[{provide:Xr,useValue:Cm},{provide:ll,useValue:XN,multi:!0},{provide:L,useFactory:eO}];var nO=[{provide:Ml,useClass:iu},{provide:Sl,useClass:Rs},{provide:Rs,useClass:Rs}],dw=[{provide:ts,useValue:"root"},{provide:_t,useFactory:JN},{provide:nu,useClass:Jl,multi:!0},{provide:nu,useClass:uw,multi:!0},Nm,Am,xm,{provide:je,useExisting:Nm},{provide:ni,useClass:qN},[]],rO=(()=>{class t{constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({providers:[...dw,...nO],imports:[Em,RE]})}return t})();var bn=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(n){n?typeof n=="string"?this.lazyInit=()=>{this.headers=new Map,n.split(` +`).forEach(e=>{let r=e.indexOf(":");if(r>0){let i=e.slice(0,r),o=e.slice(r+1).trim();this.addHeaderEntry(i,o)}})}:typeof Headers<"u"&&n instanceof Headers?(this.headers=new Map,n.forEach((e,r)=>{this.addHeaderEntry(r,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(n).forEach(([e,r])=>{this.setHeaderEntries(e,r)})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();let e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){let e=n.name.toLowerCase();switch(n.op){case"a":case"s":let r=n.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(n.name,e);let i=(n.op==="a"?this.headers.get(e):void 0)||[];i.push(...r),this.headers.set(e,i);break;case"d":let o=n.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=this.headers.get(e);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}break}}addHeaderEntry(n,e){let r=n.toLowerCase();this.maybeSetNormalizedName(n,r),this.headers.has(r)?this.headers.get(r).push(e):this.headers.set(r,[e])}setHeaderEntries(n,e){let r=(Array.isArray(e)?e:[e]).map(o=>o.toString()),i=n.toLowerCase();this.headers.set(i,r),this.maybeSetNormalizedName(n,i)}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}};var su=class{map=new Map;set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}},au=class{encodeKey(n){return fw(n)}encodeValue(n){return fw(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}};function iO(t,n){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(i=>{let o=i.indexOf("="),[s,a]=o==-1?[n.decodeKey(i),""]:[n.decodeKey(i.slice(0,o)),n.decodeValue(i.slice(o+1))],c=e.get(s)||[];c.push(a),e.set(s,c)}),e}var oO=/%(\d[a-f0-9])/gi,sO={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function fw(t){return encodeURIComponent(t).replace(oO,(n,e)=>sO[e]??n)}function ou(t){return`${t}`}var $n=class t{map;encoder;updates=null;cloneFrom=null;constructor(n={}){if(this.encoder=n.encoder||new au,n.fromString){if(n.fromObject)throw new b(2805,!1);this.map=iO(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{let r=n.fromObject[e],i=Array.isArray(r)?r.map(ou):[ou(r)];this.map.set(e,i)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();let e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){let e=[];return Object.keys(n).forEach(r=>{let i=n[r];Array.isArray(i)?i.forEach(o=>{e.push({param:r,value:o,op:"a"})}):e.push({param:r,value:i,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{let e=this.encoder.encodeKey(n);return this.map.get(n).map(r=>e+"="+this.encoder.encodeValue(r)).join("&")}).filter(n=>n!=="").join("&")}clone(n){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":let e=(n.op==="a"?this.map.get(n.param):void 0)||[];e.push(ou(n.value)),this.map.set(n.param,e);break;case"d":if(n.value!==void 0){let r=this.map.get(n.param)||[],i=r.indexOf(ou(n.value));i!==-1&&r.splice(i,1),r.length>0?this.map.set(n.param,r):this.map.delete(n.param)}else{this.map.delete(n.param);break}}}),this.cloneFrom=this.updates=null)}};function aO(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function hw(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function pw(t){return typeof Blob<"u"&&t instanceof Blob}function mw(t){return typeof FormData<"u"&&t instanceof FormData}function cO(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var gw="Content-Type",vw="Accept",bw="text/plain",_w="application/json",lO=`${_w}, ${bw}, */*`,ro=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(n,e,r,i){this.url=e,this.method=n.toUpperCase();let o;if(aO(this.method)||i?(this.body=r!==void 0?r:null,o=i):o=r,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new b(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new bn,this.context??=new su,!this.params)this.params=new $n,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),c=a===-1?"?":aOo.set(Er,n.setHeaders[Er]),Pe)),n.setParams&&(Le=Object.keys(n.setParams).reduce((Oo,Er)=>Oo.set(Er,n.setParams[Er]),Le)),new t(e,r,E,{params:Le,headers:Pe,context:No,reportProgress:ee,responseType:i,withCredentials:I,transferCache:m,keepalive:o,cache:a,priority:s,timeout:_,mode:c,redirect:l,credentials:u,referrer:d,integrity:h,referrerPolicy:p})}},ri=(function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t})(ri||{}),oo=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(n,e=200,r="OK"){this.headers=n.headers||new bn,this.status=n.status!==void 0?n.status:e,this.statusText=n.statusText||r,this.url=n.url||null,this.redirected=n.redirected,this.responseType=n.responseType,this.ok=this.status>=200&&this.status<300}},cu=class t extends oo{constructor(n={}){super(n)}type=ri.ResponseHeader;clone(n={}){return new t({headers:n.headers||this.headers,status:n.status!==void 0?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}},Ys=class t extends oo{body;constructor(n={}){super(n),this.body=n.body!==void 0?n.body:null}type=ri.Response;clone(n={}){return new t({body:n.body!==void 0?n.body:this.body,headers:n.headers||this.headers,status:n.status!==void 0?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0,redirected:n.redirected??this.redirected,responseType:n.responseType??this.responseType})}},io=class extends oo{name="HttpErrorResponse";message;error;ok=!1;constructor(n){super(n,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${n.url||"(unknown url)"}`:this.message=`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}},uO=200,dO=204;var fO=new y("");var hO=/^\)\]\}',?\n/;var km=(()=>{class t{xhrFactory;tracingService=f(Wt,{optional:!0});constructor(e){this.xhrFactory=e}maybePropagateTrace(e){return this.tracingService?.propagate?this.tracingService.propagate(e):e}handle(e){if(e.method==="JSONP")throw new b(-2800,!1);let r=this.xhrFactory;return T(null).pipe(Ue(()=>new O(o=>{let s=r.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((E,I)=>s.setRequestHeader(E,I.join(","))),e.headers.has(vw)||s.setRequestHeader(vw,lO),!e.headers.has(gw)){let E=e.detectContentTypeHeader();E!==null&&s.setRequestHeader(gw,E)}if(e.timeout&&(s.timeout=e.timeout),e.responseType){let E=e.responseType.toLowerCase();s.responseType=E!=="json"?E:"text"}let a=e.serializeBody(),c=null,l=()=>{if(c!==null)return c;let E=s.statusText||"OK",I=new bn(s.getAllResponseHeaders()),ee=s.responseURL||e.url;return c=new cu({headers:I,status:s.status,statusText:E,url:ee}),c},u=this.maybePropagateTrace(()=>{let{headers:E,status:I,statusText:ee,url:Pe}=l(),Le=null;I!==dO&&(Le=typeof s.response>"u"?s.responseText:s.response),I===0&&(I=Le?uO:0);let No=I>=200&&I<300;if(e.responseType==="json"&&typeof Le=="string"){let Oo=Le;Le=Le.replace(hO,"");try{Le=Le!==""?JSON.parse(Le):null}catch(Er){Le=Oo,No&&(No=!1,Le={error:Er,text:Le})}}No?(o.next(new Ys({body:Le,headers:E,status:I,statusText:ee,url:Pe||void 0})),o.complete()):o.error(new io({error:Le,headers:E,status:I,statusText:ee,url:Pe||void 0}))}),d=this.maybePropagateTrace(E=>{let{url:I}=l(),ee=new io({error:E,status:s.status||0,statusText:s.statusText||"Unknown Error",url:I||void 0});o.error(ee)}),h=d;e.timeout&&(h=this.maybePropagateTrace(E=>{let{url:I}=l(),ee=new io({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:I||void 0});o.error(ee)}));let p=!1,m=this.maybePropagateTrace(E=>{p||(o.next(l()),p=!0);let I={type:ri.DownloadProgress,loaded:E.loaded};E.lengthComputable&&(I.total=E.total),e.responseType==="text"&&s.responseText&&(I.partialText=s.responseText),o.next(I)}),_=this.maybePropagateTrace(E=>{let I={type:ri.UploadProgress,loaded:E.loaded};E.lengthComputable&&(I.total=E.total),o.next(I)});return s.addEventListener("load",u),s.addEventListener("error",d),s.addEventListener("timeout",h),s.addEventListener("abort",d),e.reportProgress&&(s.addEventListener("progress",m),a!==null&&s.upload&&s.upload.addEventListener("progress",_)),s.send(a),o.next({type:ri.Sent}),()=>{s.removeEventListener("error",d),s.removeEventListener("abort",d),s.removeEventListener("load",u),s.removeEventListener("timeout",h),e.reportProgress&&(s.removeEventListener("progress",m),a!==null&&s.upload&&s.upload.removeEventListener("progress",_)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(r){return new(r||t)(w(ni))};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Dw(t,n){return n(t)}function pO(t,n){return(e,r)=>n.intercept(e,{handle:i=>t(i,r)})}function mO(t,n,e){return(r,i)=>xe(e,()=>n(r,o=>t(o,i)))}var Ew=new y(""),Fm=new y("",{factory:()=>[]}),ww=new y(""),Pm=new y("",{factory:()=>!0});function gO(){let t=null;return(n,e)=>{t===null&&(t=(f(Ew,{optional:!0})??[]).reduceRight(pO,Dw));let r=f(Hi);if(f(Pm)){let o=r.add();return t(n,e).pipe(Mi(o))}else return t(n,e)}}var Lm=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:function(r){let i=null;return r?i=new(r||t):i=w(km),i},providedIn:"root"})}return t})();var lu=(()=>{class t{backend;injector;chain=null;pendingTasks=f(Hi);contributeToStability=f(Pm);constructor(e,r){this.backend=e,this.injector=r}handle(e){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(Fm),...this.injector.get(ww,[])]));this.chain=r.reduceRight((i,o)=>mO(i,o,this.injector),Dw)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(e,i=>this.backend.handle(i)).pipe(Mi(r))}else return this.chain(e,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||t)(w(Lm),w(re))};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),jm=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:function(r){let i=null;return r?i=new(r||t):i=w(lu),i},providedIn:"root"})}return t})();function Om(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,credentials:t.credentials,transferCache:t.transferCache,timeout:t.timeout,keepalive:t.keepalive,priority:t.priority,cache:t.cache,mode:t.mode,redirect:t.redirect,integrity:t.integrity,referrer:t.referrer,referrerPolicy:t.referrerPolicy}}var uu=(()=>{class t{handler;constructor(e){this.handler=e}request(e,r,i={}){let o;if(e instanceof ro)o=e;else{let c;i.headers instanceof bn?c=i.headers:c=new bn(i.headers);let l;i.params&&(i.params instanceof $n?l=i.params:l=new $n({fromObject:i.params})),o=new ro(e,r,i.body!==void 0?i.body:null,{headers:c,context:i.context,params:l,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials,transferCache:i.transferCache,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,credentials:i.credentials,referrer:i.referrer,referrerPolicy:i.referrerPolicy,integrity:i.integrity,timeout:i.timeout})}let s=T(o).pipe(Xn(c=>this.handler.handle(c)));if(e instanceof ro||i.observe==="events")return s;let a=s.pipe(fe(c=>c instanceof Ys));switch(i.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(H(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new b(2806,!1);return c.body}));case"blob":return a.pipe(H(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new b(2807,!1);return c.body}));case"text":return a.pipe(H(c=>{if(c.body!==null&&typeof c.body!="string")throw new b(2808,!1);return c.body}));default:return a.pipe(H(c=>c.body))}case"response":return a;default:throw new b(2809,!1)}}delete(e,r={}){return this.request("DELETE",e,r)}get(e,r={}){return this.request("GET",e,r)}head(e,r={}){return this.request("HEAD",e,r)}jsonp(e,r){return this.request("JSONP",e,{params:new $n().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,r={}){return this.request("OPTIONS",e,r)}patch(e,r,i={}){return this.request("PATCH",e,Om(i,r))}post(e,r,i={}){return this.request("POST",e,Om(i,r))}put(e,r,i={}){return this.request("PUT",e,Om(i,r))}static \u0275fac=function(r){return new(r||t)(w(jm))};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var vO=new y("",{factory:()=>!0}),yO="XSRF-TOKEN",bO=new y("",{factory:()=>yO}),_O="X-XSRF-TOKEN",DO=new y("",{factory:()=>_O}),EO=(()=>{class t{cookieName=f(bO);doc=f(L);lastCookieString="";lastToken=null;parseCount=0;getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=$s(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Cw=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:function(r){let i=null;return r?i=new(r||t):i=w(EO),i},providedIn:"root"})}return t})();function wO(t,n){if(!f(vO)||t.method==="GET"||t.method==="HEAD")return n(t);try{let i=f(Bn).href,{origin:o}=new URL(i),{origin:s}=new URL(t.url,o);if(o!==s)return n(t)}catch{return n(t)}let e=f(Cw).getToken(),r=f(DO);return e!=null&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,e)})),n(t)}var Vm=(function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t})(Vm||{});function CO(t,n){return{\u0275kind:t,\u0275providers:n}}function Iw(...t){let n=[uu,lu,{provide:jm,useExisting:lu},{provide:Lm,useFactory:()=>f(fO,{optional:!0})??f(km)},{provide:Fm,useValue:wO,multi:!0}];for(let e of t)n.push(...e.\u0275providers);return sr(n)}var yw=new y("");function Sw(){return CO(Vm.LegacyInterceptors,[{provide:yw,useFactory:gO},{provide:Fm,useExisting:yw,multi:!0}])}var IO=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({providers:[Iw(Sw())]})}return t})();var Mw=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(r){return new(r||t)(w(L))};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function MO(t,n){if(typeof COMPILED>"u"||!COMPILED){let e=ye.ng=ye.ng||{};e[t]=n}}var Bm=class{msPerTick;numTicks;constructor(n,e){this.msPerTick=n,this.numTicks=e}},Um=class{appRef;constructor(n){this.appRef=n.injector.get(He)}timeChangeDetection(n){let e=n&&n.record,r="Change Detection";e&&"profile"in console&&typeof console.profile=="function"&&console.profile(r);let i=performance.now(),o=0;for(;o<5||performance.now()-i<500;)this.appRef.tick(),o++;let s=performance.now();e&&"profileEnd"in console&&typeof console.profileEnd=="function"&&console.profileEnd(r);let a=(s-i)/o;return console.log(`ran ${o} change detection cycles`),console.log(`${a.toFixed(2)} ms per check`),new Bm(a,o)}},TO="profiler";function x9(t){return MO(TO,new Um(t)),t}var Hm=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:function(r){let i=null;return r?i=new(r||t):i=w(xO),i},providedIn:"root"})}return t})(),xO=(()=>{class t extends Hm{_doc;constructor(e){super(),this._doc=e}sanitize(e,r){if(r==null)return null;switch(e){case it.NONE:return r;case it.HTML:return gn(r,"HTML")?ft(r):hl(this._doc,String(r)).toString();case it.STYLE:return gn(r,"Style")?ft(r):r;case it.SCRIPT:if(gn(r,"Script"))return ft(r);throw new b(5200,!1);case it.URL:return gn(r,"URL")?ft(r):Cs(String(r));case it.RESOURCE_URL:if(gn(r,"ResourceURL"))return ft(r);throw new b(5201,!1);default:throw new b(5202,!1)}}bypassSecurityTrustHtml(e){return sp(e)}bypassSecurityTrustStyle(e){return ap(e)}bypassSecurityTrustScript(e){return cp(e)}bypassSecurityTrustUrl(e){return lp(e)}bypassSecurityTrustResourceUrl(e){return up(e)}static \u0275fac=function(r){return new(r||t)(w(L))};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Zs(t){return t.buttons===0||t.detail===0}function Ks(t){let n=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!n&&n.identifier===-1&&(n.radiusX==null||n.radiusX===1)&&(n.radiusY==null||n.radiusY===1)}var $m;function Tw(){if($m==null){let t=typeof document<"u"?document.head:null;$m=!!(t&&(t.createShadowRoot||t.attachShadow))}return $m}function zm(t){if(Tw()){let n=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&n instanceof ShadowRoot)return n}return null}function RO(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}function Je(t){return t.composedPath?t.composedPath()[0]:t.target}var Gm;try{Gm=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Gm=!1}var he=(()=>{class t{_platformId=f(Xr);isBrowser=this._platformId?rw(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Gm)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Qs;function xw(){if(Qs==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Qs=!0}))}finally{Qs=Qs||!1}return Qs}function so(t){return xw()?t:!!t.capture}function ii(t,n=0){return Aw(t)?Number(t):arguments.length===2?n:0}function Aw(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function Tt(t){return t instanceof z?t.nativeElement:t}var Rw=new y("cdk-input-modality-detector-options"),Nw={ignoreKeys:[18,17,224,91,16]},Ow=650,Wm={passive:!0,capture:!0},kw=(()=>{class t{_platform=f(he);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new Ie(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(r=>r===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Je(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs{if(Ks(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Je(e)};constructor(){let e=f(j),r=f(L),i=f(Rw,{optional:!0});if(this._options=g(g({},Nw),i),this.modalityDetected=this._modality.pipe(Uo(1)),this.modalityChanged=this.modalityDetected.pipe(Si()),this._platform.isBrowser){let o=f(je).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[o.listen(r,"keydown",this._onKeydown,Wm),o.listen(r,"mousedown",this._onMousedown,Wm),o.listen(r,"touchstart",this._onTouchstart,Wm)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Xs=(function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t})(Xs||{}),Fw=new y("cdk-focus-monitor-default-options"),du=so({passive:!0,capture:!0}),fu=(()=>{class t{_ngZone=f(j);_platform=f(he);_inputModalityDetector=f(kw);_origin=null;_lastFocusOrigin=null;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=f(L);_stopInputModalityDetector=new S;constructor(){let e=f(Fw,{optional:!0});this._detectionMode=e?.detectionMode||Xs.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let r=Je(e);for(let i=r;i;i=i.parentElement)e.type==="focus"?this._onFocus(e,i):this._onBlur(e,i)};monitor(e,r=!1){let i=Tt(e);if(!this._platform.isBrowser||i.nodeType!==1)return T();let o=zm(i)||this._document,s=this._elementInfo.get(i);if(s)return r&&(s.checkChildren=!0),s.subject;let a={checkChildren:r,subject:new S,rootNode:o};return this._elementInfo.set(i,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){let r=Tt(e),i=this._elementInfo.get(r);i&&(i.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(i))}focusVia(e,r,i){let o=Tt(e),s=this._document.activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,c])=>this._originChanged(a,r,c)):(this._setOrigin(r),typeof o.focus=="function"&&o.focus(i))}ngOnDestroy(){this._elementInfo.forEach((e,r)=>this.stopMonitoring(r))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===Xs.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,r){e.classList.toggle("cdk-focused",!!r),e.classList.toggle("cdk-touch-focused",r==="touch"),e.classList.toggle("cdk-keyboard-focused",r==="keyboard"),e.classList.toggle("cdk-mouse-focused",r==="mouse"),e.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(e,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&r,this._detectionMode===Xs.IMMEDIATE){clearTimeout(this._originTimeoutId);let i=this._originFromTouchInteraction?Ow:1;this._originTimeoutId=setTimeout(()=>this._origin=null,i)}})}_onFocus(e,r){let i=this._elementInfo.get(r),o=Je(e);!i||!i.checkChildren&&r!==o||this._originChanged(r,this._getFocusOrigin(o),i)}_onBlur(e,r){let i=this._elementInfo.get(r);!i||i.checkChildren&&e.relatedTarget instanceof Node&&r.contains(e.relatedTarget)||(this._setClasses(r),this._emitOrigin(i,null))}_emitOrigin(e,r){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(r))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let r=e.rootNode,i=this._rootNodeFocusListenerCount.get(r)||0;i||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,du),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,du)}),this._rootNodeFocusListenerCount.set(r,i+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(at(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(e){let r=e.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let i=this._rootNodeFocusListenerCount.get(r);i>1?this._rootNodeFocusListenerCount.set(r,i-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,du),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,du),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,r,i){this._setClasses(e,r),this._emitOrigin(i,r),this._lastFocusOrigin=r}_getClosestElementsInfo(e){let r=[];return this._elementInfo.forEach((i,o)=>{(o===e||i.checkChildren&&o.contains(e))&&r.push([o,i])}),r}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:r,mostRecentModality:i}=this._inputModalityDetector;if(i!=="mouse"||!r||r===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let o=e.labels;if(o){for(let s=0;s{class t{_elementRef=f(z);_focusMonitor=f(fu);_monitorSubscription;_focusOrigin=null;cdkFocusChange=new U;constructor(){}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,e.nodeType===1&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(r=>{this._focusOrigin=r,this.cdkFocusChange.emit(r)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]})}return t})();var hu=new WeakMap,xt=(()=>{class t{_appRef;_injector=f($);_environmentInjector=f(re);load(e){let r=this._appRef=this._appRef||this._injector.get(He),i=hu.get(r);i||(i={loaders:new Set,refs:[]},hu.set(r,i),r.onDestroy(()=>{hu.get(r)?.refs.forEach(o=>o.destroy()),hu.delete(r)})),i.loaders.has(e)||(i.loaders.add(e),i.refs.push(Ul(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var mu=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=ke({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0} +`],encapsulation:2,changeDetection:0})}return t})(),pu;function OO(){if(pu===void 0&&(pu=null,typeof window<"u")){let t=window;t.trustedTypes!==void 0&&(pu=t.trustedTypes.createPolicy("angular#components",{createHTML:n=>n}))}return pu}function kO(t){return OO()?.createHTML(t)||t}function Pw(t,n,e){let r=e.sanitize(it.HTML,n);t.innerHTML=kO(r||"")}function oi(t){return Array.isArray(t)?t:[t]}var Lw=new Set,si,gu=(()=>{class t{_platform=f(he);_nonce=f(Xi,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):PO}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&FO(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function FO(t,n){if(!Lw.has(t))try{si||(si=document.createElement("style"),n&&si.setAttribute("nonce",n),si.setAttribute("type","text/css"),document.head.appendChild(si)),si.sheet&&(si.sheet.insertRule(`@media ${t} {body{ }}`,0),Lw.add(t))}catch(e){console.error(e)}}function PO(t){return{matches:t==="all"||t==="",media:t,addListener:()=>{},removeListener:()=>{}}}var qm=(()=>{class t{_mediaMatcher=f(gu);_zone=f(j);_queries=new Map;_destroySubject=new S;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return jw(oi(e)).some(i=>this._registerQuery(i).mql.matches)}observe(e){let i=jw(oi(e)).map(s=>this._registerQuery(s).observable),o=Ii(i);return o=rn(o.pipe(Be(1)),o.pipe(Uo(1),Ar(0))),o.pipe(H(s=>{let a={matches:!1,breakpoints:{}};return s.forEach(({matches:c,query:l})=>{a.matches=a.matches||c,a.breakpoints[l]=c}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let r=this._mediaMatcher.matchMedia(e),o={observable:new O(s=>{let a=c=>this._zone.run(()=>s.next(c));return r.addListener(a),()=>{r.removeListener(a)}}).pipe(Rr(r),H(({matches:s})=>({query:e,matches:s})),at(this._destroySubject)),mql:r};return this._queries.set(e,o),o}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function jw(t){return t.map(n=>n.split(",")).reduce((n,e)=>n.concat(e)).map(n=>n.trim())}function LO(t){if(t.type==="characterData"&&t.target instanceof Comment)return!0;if(t.type==="childList"){for(let n=0;n{class t{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Bw=(()=>{class t{_mutationObserverFactory=f(Vw);_observedElements=new Map;_ngZone=f(j);constructor(){}ngOnDestroy(){this._observedElements.forEach((e,r)=>this._cleanupObserver(r))}observe(e){let r=Tt(e);return new O(i=>{let s=this._observeElement(r).pipe(H(a=>a.filter(c=>!LO(c))),fe(a=>!!a.length)).subscribe(a=>{this._ngZone.run(()=>{i.next(a)})});return()=>{s.unsubscribe(),this._unobserveElement(r)}})}_observeElement(e){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let r=new S,i=this._mutationObserverFactory.create(o=>r.next(o));i&&i.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:i,stream:r,count:1})}return this._observedElements.get(e).stream})}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:r,stream:i}=this._observedElements.get(e);r&&r.disconnect(),i.complete(),this._observedElements.delete(e)}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),AY=(()=>{class t{_contentObserver=f(Bw);_elementRef=f(z);event=new U;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled?this._unsubscribe():this._subscribe()}_disabled=!1;get debounce(){return this._debounce}set debounce(e){this._debounce=ii(e),this._subscribe()}_debounce;_currentSubscription=null;constructor(){}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let e=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?e.pipe(Ar(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",ue],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return t})(),Uw=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({providers:[Vw]})}return t})();var jO=(()=>{class t{_platform=f(he);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return BO(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let r=VO(YO(e));if(r&&(Hw(r)===-1||!this.isVisible(r)))return!1;let i=e.nodeName.toLowerCase(),o=Hw(e);return e.hasAttribute("contenteditable")?o!==-1:i==="iframe"||i==="object"||this._platform.WEBKIT&&this._platform.IOS&&!WO(e)?!1:i==="audio"?e.hasAttribute("controls")?o!==-1:!1:i==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,r){return qO(e)&&!this.isDisabled(e)&&(r?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function VO(t){try{return t.frameElement}catch{return null}}function BO(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function UO(t){let n=t.nodeName.toLowerCase();return n==="input"||n==="select"||n==="button"||n==="textarea"}function HO(t){return zO(t)&&t.type=="hidden"}function $O(t){return GO(t)&&t.hasAttribute("href")}function zO(t){return t.nodeName.toLowerCase()=="input"}function GO(t){return t.nodeName.toLowerCase()=="a"}function Gw(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let n=t.getAttribute("tabindex");return!!(n&&!isNaN(parseInt(n,10)))}function Hw(t){if(!Gw(t))return null;let n=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(n)?-1:n}function WO(t){let n=t.nodeName.toLowerCase(),e=n==="input"&&t.type;return e==="text"||e==="password"||n==="select"||n==="textarea"}function qO(t){return HO(t)?!1:UO(t)||$O(t)||t.hasAttribute("contenteditable")||Gw(t)}function YO(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var Zm=class{_element;_checker;_ngZone;_document;_injector;_startAnchor=null;_endAnchor=null;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(n){this._enabled=n,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_enabled=!0;constructor(n,e,r,i,o=!1,s){this._element=n,this._checker=e,this._ngZone=r,this._document=i,this._injector=s,o||this.attachAnchors()}destroy(){let n=this._startAnchor,e=this._endAnchor;n&&(n.removeEventListener("focus",this.startAnchorListener),n.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(n)))})}focusFirstTabbableElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(n)))})}focusLastTabbableElementWhenReady(n){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(n)))})}_getRegionBoundary(n){let e=this._element.querySelectorAll(`[cdk-focus-region-${n}], [cdkFocusRegion${n}], [cdk-focus-${n}]`);return n=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(n){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let r=this._getFirstTabbableElement(e);return r?.focus(n),!!r}return e.focus(n),!0}return this.focusFirstTabbableElement(n)}focusFirstTabbableElement(n){let e=this._getRegionBoundary("start");return e&&e.focus(n),!!e}focusLastTabbableElement(n){let e=this._getRegionBoundary("end");return e&&e.focus(n),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(n){if(this._checker.isFocusable(n)&&this._checker.isTabbable(n))return n;let e=n.children;for(let r=0;r=0;r--){let i=e[r].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[r]):null;if(i)return i}return null}_createAnchor(){let n=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,n),n.classList.add("cdk-visually-hidden"),n.classList.add("cdk-focus-trap-anchor"),n.setAttribute("aria-hidden","true"),n}_toggleAnchorTabIndex(n,e){n?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(n){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_executeOnStable(n){this._injector?ht(n,{injector:this._injector}):setTimeout(n)}},ZO=(()=>{class t{_checker=f(jO);_ngZone=f(j);_document=f(L);_injector=f($);constructor(){f(xt).load(mu)}create(e,r=!1){return new Zm(e,this._checker,this._ngZone,this._document,r,this._injector)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ww=new y("liveAnnouncerElement",{providedIn:"root",factory:()=>null}),qw=new y("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),KO=0,QO=(()=>{class t{_ngZone=f(j);_defaultOptions=f(qw,{optional:!0});_liveElement;_document=f(L);_sanitizer=f(Hm);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=f(Ww,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...r){let i=this._defaultOptions,o,s;return r.length===1&&typeof r[0]=="number"?s=r[0]:[o,s]=r,this.clear(),clearTimeout(this._previousTimeout),o||(o=i&&i.politeness?i.politeness:"polite"),s==null&&i&&(s=i.duration),this._liveElement.setAttribute("aria-live",o),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{!e||typeof e=="string"?this._liveElement.textContent=e:Pw(this._liveElement,e,this._sanitizer),typeof s=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",r=this._document.getElementsByClassName(e),i=this._document.createElement("div");for(let o=0;o .cdk-overlay-container [aria-modal="true"]');for(let i=0;i{class t{_platform=f(he);_hasCheckedHighContrastMode=!1;_document=f(L);_breakpointSubscription;constructor(){this._breakpointSubscription=f(qm).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return pr.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let r=this._document.defaultView||window,i=r&&r.getComputedStyle?r.getComputedStyle(e):null,o=(i&&i.backgroundColor||"").replace(/ /g,"");switch(e.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return pr.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return pr.BLACK_ON_WHITE}return pr.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Ym,$w,zw),this._hasCheckedHighContrastMode=!0;let r=this.getHighContrastMode();r===pr.BLACK_ON_WHITE?e.add(Ym,$w):r===pr.WHITE_ON_BLACK&&e.add(Ym,zw)}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),XO=(()=>{class t{constructor(){f(Yw)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({imports:[Uw]})}return t})();var Km={},Js=class t{_appId=f(hr);static _infix=`a${Math.floor(Math.random()*1e5).toString()}`;getId(n,e=!1){return this._appId!=="ng"&&(n+=this._appId),Km.hasOwnProperty(n)||(Km[n]=0),`${n}${e?t._infix+"-":""}${Km[n]++}`}static \u0275fac=function(e){return new(e||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})};var JO=200,ao=class{_letterKeyStream=new S;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new S;selectedItem=this._selectedItem;constructor(n,e){let r=typeof e?.debounceInterval=="number"?e.debounceInterval:JO;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(n),this._setupKeyHandler(r)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(n){this._selectedItemIndex=n}setItems(n){this._items=n}handleKey(n){let e=n.keyCode;n.key&&n.key.length===1?this._letterKeyStream.next(n.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(n){this._letterKeyStream.pipe(nt(e=>this._pressedLetters.push(e)),Ar(n),fe(()=>this._pressedLetters.length>0),H(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let r=1;rt[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var co=class{_items;_activeItemIndex=W(-1);_activeItem=W(null);_wrap=!1;_typeaheadSubscription=G.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal=null;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=n=>n.disabled;constructor(n,e){this._items=n,n instanceof Fn?this._itemChangesSubscription=n.changes.subscribe(r=>this._itemsChanged(r.toArray())):no(n)&&(this._effectRef=$i(()=>this._itemsChanged(n()),{injector:e}))}tabOut=new S;change=new S;skipPredicate(n){return this._skipPredicateFn=n,this}withWrap(n=!0){return this._wrap=n,this}withVerticalOrientation(n=!0){return this._vertical=n,this}withHorizontalOrientation(n){return this._horizontal=n,this}withAllowedModifierKeys(n){return this._allowedModifierKeys=n,this}withTypeAhead(n=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new ao(e,{debounceInterval:typeof n=="number"?n:void 0,skipPredicate:r=>this._skipPredicateFn(r)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(r=>{this.setActiveItem(r)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(n=!0){return this._homeAndEnd=n,this}withPageUpDown(n=!0,e=10){return this._pageUpAndDown={enabled:n,delta:e},this}setActiveItem(n){let e=this._activeItem();this.updateActiveItem(n),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(n){let e=n.keyCode,i=["altKey","ctrlKey","metaKey","shiftKey"].every(o=>!n[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&i){this.setNextItemActive();break}else return;case 38:if(this._vertical&&i){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&i){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&i){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&i){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&i){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&i){let o=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&i){let o=this._activeItemIndex()+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o-1&&r!==this._activeItemIndex()&&(this._activeItemIndex.set(r),this._typeahead?.setCurrentSelectedItemIndex(r))}}};var Qm=class extends co{setActiveItem(n){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(n),this.activeItem&&this.activeItem.setActiveStyles()}};var Xm=class extends co{_origin="program";setFocusOrigin(n){return this._origin=n,this}setActiveItem(n){super.setActiveItem(n),this.activeItem&&this.activeItem.focus(this._origin)}};function Jm(t){return Ft(t)?t:T(t)}var eg=class{_activeItemIndex=-1;_activeItem=null;_shouldActivationFollowFocus=!1;_horizontalOrientation="ltr";_skipPredicateFn=n=>!1;_trackByFn=n=>n;_items=[];_typeahead;_typeaheadSubscription=G.EMPTY;_hasInitialFocused=!1;_initializeFocus(){if(this._hasInitialFocused||this._items.length===0)return;let n=0;for(let r=0;rthis._itemsChanged(r.toArray()))):Ft(n)?n.subscribe(r=>this._itemsChanged(r)):(this._items=n,this._initializeFocus()),typeof e.shouldActivationFollowFocus=="boolean"&&(this._shouldActivationFollowFocus=e.shouldActivationFollowFocus),e.horizontalOrientation&&(this._horizontalOrientation=e.horizontalOrientation),e.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),e.trackBy&&(this._trackByFn=e.trackBy),typeof e.typeAheadDebounceInterval<"u"&&this._setTypeAhead(e.typeAheadDebounceInterval)}change=new S;destroy(){this._typeaheadSubscription.unsubscribe(),this._typeahead?.destroy(),this.change.complete()}onKeydown(n){switch(n.key){case"Tab":return;case"ArrowDown":this._focusNextItem();break;case"ArrowUp":this._focusPreviousItem();break;case"ArrowRight":this._horizontalOrientation==="rtl"?this._collapseCurrentItem():this._expandCurrentItem();break;case"ArrowLeft":this._horizontalOrientation==="rtl"?this._expandCurrentItem():this._collapseCurrentItem();break;case"Home":this._focusFirstItem();break;case"End":this._focusLastItem();break;case"Enter":case" ":this._activateCurrentItem();break;default:if(n.key==="*"){this._expandAllItemsAtCurrentItemLevel();break}this._typeahead?.handleKey(n);return}this._typeahead?.reset(),n.preventDefault()}getActiveItemIndex(){return this._activeItemIndex}getActiveItem(){return this._activeItem}_itemsChanged(n){this._hasInitialFocused&&this._activeItem&&!n.includes(this._activeItem)&&(this._activeItem=null,this._hasInitialFocused=!1),this._items=n,this._typeahead?.setItems(this._items),this._updateActiveItemIndex(this._items),this._initializeFocus()}_focusFirstItem(){this.focusItem(this._findNextAvailableItemIndex(-1))}_focusLastItem(){this.focusItem(this._findPreviousAvailableItemIndex(this._items.length))}_focusNextItem(){this.focusItem(this._findNextAvailableItemIndex(this._activeItemIndex))}_focusPreviousItem(){this.focusItem(this._findPreviousAvailableItemIndex(this._activeItemIndex))}focusItem(n,e={}){e.emitChangeEvent??=!0;let r=typeof n=="number"?n:this._items.findIndex(s=>this._trackByFn(s)===this._trackByFn(n));if(r<0||r>=this._items.length)return;let i=this._items[r];if(this._activeItem!==null&&this._trackByFn(i)===this._trackByFn(this._activeItem))return;let o=this._activeItem;this._activeItem=i??null,this._activeItemIndex=r,this._typeahead?.setCurrentSelectedItemIndex(r),this._activeItem?.focus(),o?.unfocus(),e.emitChangeEvent&&this.change.next(this._activeItem),this._shouldActivationFollowFocus&&this._activateCurrentItem()}_updateActiveItemIndex(n){let e=this._activeItem;if(!e)return;let r=n.findIndex(i=>this._trackByFn(i)===this._trackByFn(e));r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r,this._typeahead?.setCurrentSelectedItemIndex(r))}_setTypeAhead(n){this._typeahead=new ao(this._items,{debounceInterval:typeof n=="number"?n:void 0,skipPredicate:e=>this._skipPredicateFn(e)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(e=>{this.focusItem(e)})}_findNextAvailableItemIndex(n){for(let e=n+1;e=0;e--)if(!this._skipPredicateFn(this._items[e]))return e;return n}_collapseCurrentItem(){if(this._activeItem)if(this._isCurrentItemExpanded())this._activeItem.collapse();else{let n=this._activeItem.getParent();if(!n||this._skipPredicateFn(n))return;this.focusItem(n)}}_expandCurrentItem(){this._activeItem&&(this._isCurrentItemExpanded()?Jm(this._activeItem.getChildren()).pipe(Be(1)).subscribe(n=>{let e=n.find(r=>!this._skipPredicateFn(r));e&&this.focusItem(e)}):this._activeItem.expand())}_isCurrentItemExpanded(){return this._activeItem?typeof this._activeItem.isExpanded=="boolean"?this._activeItem.isExpanded:this._activeItem.isExpanded():!1}_isItemDisabled(n){return typeof n.isDisabled=="boolean"?n.isDisabled:n.isDisabled?.()}_expandAllItemsAtCurrentItemLevel(){if(!this._activeItem)return;let n=this._activeItem.getParent(),e;n?e=Jm(n.getChildren()):e=T(this._items.filter(r=>r.getParent()===null)),e.pipe(Be(1)).subscribe(r=>{for(let i of r)i.expand()})}_activateCurrentItem(){this._activeItem?.activate()}},SZ=new y("tree-key-manager",{providedIn:"root",factory:()=>(t,n)=>new eg(t,n)});var Kw=" ";function ek(t,n,e){let r=bu(t,n);e=e.trim(),!r.some(i=>i.trim()===e)&&(r.push(e),t.setAttribute(n,r.join(Kw)))}function tk(t,n,e){let r=bu(t,n);e=e.trim();let i=r.filter(o=>o!==e);i.length?t.setAttribute(n,i.join(Kw)):t.removeAttribute(n)}function bu(t,n){return t.getAttribute(n)?.match(/\S+/g)??[]}var Qw="cdk-describedby-message",yu="cdk-describedby-host",ng=0,PZ=(()=>{class t{_platform=f(he);_document=f(L);_messageRegistry=new Map;_messagesContainer=null;_id=`${ng++}`;constructor(){f(xt).load(mu),this._id=f(hr)+"-"+ng++}describe(e,r,i){if(!this._canBeDescribed(e,r))return;let o=tg(r,i);typeof r!="string"?(Zw(r,this._id),this._messageRegistry.set(o,{messageElement:r,referenceCount:0})):this._messageRegistry.has(o)||this._createMessageElement(r,i),this._isElementDescribedByMessage(e,o)||this._addMessageReference(e,o)}removeDescription(e,r,i){if(!r||!this._isElementNode(e))return;let o=tg(r,i);if(this._isElementDescribedByMessage(e,o)&&this._removeMessageReference(e,o),typeof r=="string"){let s=this._messageRegistry.get(o);s&&s.referenceCount===0&&this._deleteMessageElement(o)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${yu}="${this._id}"]`);for(let r=0;ri.indexOf(Qw)!=0);e.setAttribute("aria-describedby",r.join(" "))}_addMessageReference(e,r){let i=this._messageRegistry.get(r);ek(e,"aria-describedby",i.messageElement.id),e.setAttribute(yu,this._id),i.referenceCount++}_removeMessageReference(e,r){let i=this._messageRegistry.get(r);i.referenceCount--,tk(e,"aria-describedby",i.messageElement.id),e.removeAttribute(yu)}_isElementDescribedByMessage(e,r){let i=bu(e,"aria-describedby"),o=this._messageRegistry.get(r),s=o&&o.messageElement.id;return!!s&&i.indexOf(s)!=-1}_canBeDescribed(e,r){if(!this._isElementNode(e))return!1;if(r&&typeof r=="object")return!0;let i=r==null?"":`${r}`.trim(),o=e.getAttribute("aria-label");return i?!o||o.trim()!==i:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function tg(t,n){return typeof t=="string"?`${n||""}/${t}`:t}function Zw(t,n){t.id||(t.id=`${Qw}-${n}-${ng++}`)}var en=(function(t){return t[t.NORMAL=0]="NORMAL",t[t.NEGATED=1]="NEGATED",t[t.INVERTED=2]="INVERTED",t})(en||{}),_u,ai;function Du(){if(ai==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return ai=!1,ai;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)ai=!0;else{let t=Element.prototype.scrollTo;t?ai=!/\{\s*\[native code\]\s*\}/.test(t.toString()):ai=!1}}return ai}function lo(){if(typeof document!="object"||!document)return en.NORMAL;if(_u==null){let t=document.createElement("div"),n=t.style;t.dir="rtl",n.width="1px",n.overflow="auto",n.visibility="hidden",n.pointerEvents="none",n.position="absolute";let e=document.createElement("div"),r=e.style;r.width="2px",r.height="1px",t.appendChild(e),document.body.appendChild(t),_u=en.NORMAL,t.scrollLeft===0&&(t.scrollLeft=1,_u=t.scrollLeft===0?en.NEGATED:en.INVERTED),t.remove()}return _u}function rg(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var uo,Xw=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function WZ(){if(uo)return uo;if(typeof document!="object"||!document)return uo=new Set(Xw),uo;let t=document.createElement("input");return uo=new Set(Xw.filter(n=>(t.setAttribute("type",n),t.type===n))),uo}var QZ={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var nk=new y("MATERIAL_ANIMATIONS"),Jw=null;function rk(){return f(nk,{optional:!0})?.animationsDisabled||f(ws,{optional:!0})==="NoopAnimations"?"di-disabled":(Jw??=f(gu).matchMedia("(prefers-reduced-motion)").matches,Jw?"reduced-motion":"enabled")}function mr(){return rk()!=="enabled"}function De(t){return t==null?"":typeof t=="string"?t:`${t}px`}function iK(t){return t!=null&&`${t}`!="false"}var At=(function(t){return t[t.FADING_IN=0]="FADING_IN",t[t.VISIBLE=1]="VISIBLE",t[t.FADING_OUT=2]="FADING_OUT",t[t.HIDDEN=3]="HIDDEN",t})(At||{}),ig=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=At.HIDDEN;constructor(n,e,r,i=!1){this._renderer=n,this.element=e,this.config=r,this._animationForciblyDisabledThroughCss=i}fadeOut(){this._renderer.fadeOutRipple(this)}},eC=so({passive:!0,capture:!0}),og=class{_events=new Map;addHandler(n,e,r,i){let o=this._events.get(e);if(o){let s=o.get(r);s?s.add(i):o.set(r,new Set([i]))}else this._events.set(e,new Map([[r,new Set([i])]])),n.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,eC)})}removeHandler(n,e,r){let i=this._events.get(n);if(!i)return;let o=i.get(e);o&&(o.delete(r),o.size===0&&i.delete(e),i.size===0&&(this._events.delete(n),document.removeEventListener(n,this._delegateEventHandler,eC)))}_delegateEventHandler=n=>{let e=Je(n);e&&this._events.get(n.type)?.forEach((r,i)=>{(i===e||i.contains(e))&&r.forEach(o=>o.handleEvent(n))})}},ea={enterDuration:225,exitDuration:150},ik=800,tC=so({passive:!0,capture:!0}),nC=["mousedown","touchstart"],rC=["mouseup","mouseleave","touchend","touchcancel"],ok=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=ke({type:t,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(r,i){},styles:[`.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none} +`],encapsulation:2,changeDetection:0})}return t})(),ta=class t{_target;_ngZone;_platform;_containerElement;_triggerElement=null;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple=null;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect=null;static _eventManager=new og;constructor(n,e,r,i,o){this._target=n,this._ngZone=e,this._platform=i,i.isBrowser&&(this._containerElement=Tt(r)),o&&o.get(xt).load(ok)}fadeInRipple(n,e,r={}){let i=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=g(g({},ea),r.animation);r.centered&&(n=i.left+i.width/2,e=i.top+i.height/2);let s=r.radius||sk(n,e,i),a=n-i.left,c=e-i.top,l=o.enterDuration,u=document.createElement("div");u.classList.add("mat-ripple-element"),u.style.left=`${a-s}px`,u.style.top=`${c-s}px`,u.style.height=`${s*2}px`,u.style.width=`${s*2}px`,r.color!=null&&(u.style.backgroundColor=r.color),u.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(u);let d=window.getComputedStyle(u),h=d.transitionProperty,p=d.transitionDuration,m=h==="none"||p==="0s"||p==="0s, 0s"||i.width===0&&i.height===0,_=new ig(this,u,r,m);u.style.transform="scale3d(1, 1, 1)",_.state=At.FADING_IN,r.persistent||(this._mostRecentTransientRipple=_);let E=null;return!m&&(l||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let I=()=>{E&&(E.fallbackTimer=null),clearTimeout(Pe),this._finishRippleTransition(_)},ee=()=>this._destroyRipple(_),Pe=setTimeout(ee,l+100);u.addEventListener("transitionend",I),u.addEventListener("transitioncancel",ee),E={onTransitionEnd:I,onTransitionCancel:ee,fallbackTimer:Pe}}),this._activeRipples.set(_,E),(m||!l)&&this._finishRippleTransition(_),_}fadeOutRipple(n){if(n.state===At.FADING_OUT||n.state===At.HIDDEN)return;let e=n.element,r=g(g({},ea),n.config.animation);e.style.transitionDuration=`${r.exitDuration}ms`,e.style.opacity="0",n.state=At.FADING_OUT,(n._animationForciblyDisabledThroughCss||!r.exitDuration)&&this._finishRippleTransition(n)}fadeOutAll(){this._getActiveRipples().forEach(n=>n.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(n=>{n.config.persistent||n.fadeOut()})}setupTriggerEvents(n){let e=Tt(n);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,nC.forEach(r=>{t._eventManager.addHandler(this._ngZone,r,e,this)}))}handleEvent(n){n.type==="mousedown"?this._onMousedown(n):n.type==="touchstart"?this._onTouchStart(n):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{rC.forEach(e=>{this._triggerElement.addEventListener(e,this,tC)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(n){n.state===At.FADING_IN?this._startFadeOutTransition(n):n.state===At.FADING_OUT&&this._destroyRipple(n)}_startFadeOutTransition(n){let e=n===this._mostRecentTransientRipple,{persistent:r}=n.config;n.state=At.VISIBLE,!r&&(!e||!this._isPointerDown)&&n.fadeOut()}_destroyRipple(n){let e=this._activeRipples.get(n)??null;this._activeRipples.delete(n),this._activeRipples.size||(this._containerRect=null),n===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),n.state=At.HIDDEN,e!==null&&(n.element.removeEventListener("transitionend",e.onTransitionEnd),n.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),n.element.remove()}_onMousedown(n){let e=Zs(n),r=this._lastTouchStartEvent&&Date.now(){let e=n.state===At.VISIBLE||n.config.terminateOnPointerUp&&n.state===At.FADING_IN;!n.config.persistent&&e&&n.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let n=this._triggerElement;n&&(nC.forEach(e=>t._eventManager.removeHandler(e,n,this)),this._pointerUpEventsRegistered&&(rC.forEach(e=>n.removeEventListener(e,this,tC)),this._pointerUpEventsRegistered=!1))}};function sk(t,n,e){let r=Math.max(Math.abs(t-e.left),Math.abs(t-e.right)),i=Math.max(Math.abs(n-e.top),Math.abs(n-e.bottom));return Math.sqrt(r*r+i*i)}var sg=new y("mat-ripple-global-options"),bK=(()=>{class t{_elementRef=f(z);_animationsDisabled=mr();color;unbounded=!1;centered=!1;radius=0;animation;get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let e=f(j),r=f(he),i=f(sg,{optional:!0}),o=f($);this._globalOptions=i||{},this._rippleRenderer=new ta(this,e,this._elementRef,r,o)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:g(g(g({},this._globalOptions.animation),this._animationsDisabled?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,r=0,i){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,r,g(g({},this.rippleConfig),i)):this._rippleRenderer.fadeInRipple(0,0,g(g({},this.rippleConfig),e))}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(r,i){r&2&&Xe("mat-ripple-unbounded",i.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return t})();var ak={capture:!0},ck=["focus","mousedown","mouseenter","touchstart"],ag="mat-ripple-loader-uninitialized",cg="mat-ripple-loader-class-name",iC="mat-ripple-loader-centered",Eu="mat-ripple-loader-disabled",oC=(()=>{class t{_document=f(L);_animationsDisabled=mr();_globalRippleOptions=f(sg,{optional:!0});_platform=f(he);_ngZone=f(j);_injector=f($);_eventCleanups;_hosts=new Map;constructor(){let e=f(je).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>ck.map(r=>e.listen(this._document,r,this._onInteraction,ak)))}ngOnDestroy(){let e=this._hosts.keys();for(let r of e)this.destroyRipple(r);this._eventCleanups.forEach(r=>r())}configureRipple(e,r){e.setAttribute(ag,this._globalRippleOptions?.namespace??""),(r.className||!e.hasAttribute(cg))&&e.setAttribute(cg,r.className||""),r.centered&&e.setAttribute(iC,""),r.disabled&&e.setAttribute(Eu,"")}setDisabled(e,r){let i=this._hosts.get(e);i?(i.target.rippleDisabled=r,!r&&!i.hasSetUpEvents&&(i.hasSetUpEvents=!0,i.renderer.setupTriggerEvents(e))):r?e.setAttribute(Eu,""):e.removeAttribute(Eu)}_onInteraction=e=>{let r=Je(e);if(r instanceof HTMLElement){let i=r.closest(`[${ag}="${this._globalRippleOptions?.namespace??""}"]`);i&&this._createRipple(i)}};_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let r=this._document.createElement("span");r.classList.add("mat-ripple",e.getAttribute(cg)),e.append(r);let i=this._globalRippleOptions,o=this._animationsDisabled?0:i?.animation?.enterDuration??ea.enterDuration,s=this._animationsDisabled?0:i?.animation?.exitDuration??ea.exitDuration,a={rippleDisabled:this._animationsDisabled||i?.disabled||e.hasAttribute(Eu),rippleConfig:{centered:e.hasAttribute(iC),terminateOnPointerUp:i?.terminateOnPointerUp,animation:{enterDuration:o,exitDuration:s}}},c=new ta(a,this._ngZone,r,this._platform,this._injector),l=!a.rippleDisabled;l&&c.setupTriggerEvents(e),this._hosts.set(e,{target:a,renderer:c,hasSetUpEvents:l}),e.removeAttribute(ag)}destroyRipple(e){let r=this._hosts.get(e);r&&(r.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var sC=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=ke({type:t,selectors:[["structural-styles"]],decls:0,vars:0,template:function(r,i){},styles:[`.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus-visible::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}} +`],encapsulation:2,changeDetection:0})}return t})();var lk=["mat-icon-button",""],uk=["*"],dk=new y("MAT_BUTTON_CONFIG");function aC(t){return t==null?void 0:dm(t)}var lg=(()=>{class t{_elementRef=f(z);_ngZone=f(j);_animationsDisabled=mr();_config=f(dk,{optional:!0});_focusMonitor=f(fu);_cleanupClick;_renderer=f(Oe);_rippleLoader=f(oC);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(e){this.tabIndex=e}constructor(){f(xt).load(sC);let e=this._elementRef.nativeElement;this._isAnchor=e.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(e,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",r){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,r):this._elementRef.nativeElement.focus(r)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}))}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,hostAttrs:[1,"mat-mdc-button-base"],hostVars:13,hostBindings:function(r,i){r&2&&(Yt("disabled",i._getDisabledAttribute())("aria-disabled",i._getAriaDisabled())("tabindex",i._getTabIndex()),Wp(i.color?"mat-"+i.color:""),Xe("mat-mdc-button-disabled",i.disabled)("mat-mdc-button-disabled-interactive",i.disabledInteractive)("mat-unthemed",!i.color)("_mat-animation-noopable",i._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",ue],disabled:[2,"disabled","disabled",ue],ariaDisabled:[2,"aria-disabled","ariaDisabled",ue],disabledInteractive:[2,"disabledInteractive","disabledInteractive",ue],tabIndex:[2,"tabIndex","tabIndex",aC],_tabindex:[2,"tabindex","_tabindex",aC]}})}return t})(),fk=(()=>{class t extends lg{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=ke({type:t,selectors:[["button","mat-icon-button",""],["a","mat-icon-button",""],["button","matIconButton",""],["a","matIconButton",""]],hostAttrs:[1,"mdc-icon-button","mat-mdc-icon-button"],exportAs:["matButton","matAnchor"],features:[J],attrs:lk,ngContentSelectors:uk,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,i){r&1&&(ti(),vn(0,"span",0),Vn(1),vn(2,"span",1)(3,"span",2))},styles:[`.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%));flex-shrink:0;text-align:center;width:var(--mat-icon-button-state-layer-size, 40px);height:var(--mat-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mat-icon-button-state-layer-size, 40px) - var(--mat-icon-button-icon-size, 24px)) / 2);font-size:var(--mat-icon-button-icon-size, 24px);color:var(--mat-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-icon-button:focus-visible>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-icon-button-touch-target-size, 48px);display:var(--mat-icon-button-touch-target-display, block);left:50%;width:var(--mat-icon-button-touch-target-size, 48px);transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mat-icon-button-icon-size, 24px);height:var(--mat-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%))}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1} +`,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}} +`],encapsulation:2,changeDetection:0})}return t})();var hk=new y("cdk-dir-doc",{providedIn:"root",factory:()=>f(L)}),pk=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function cC(t){let n=t?.toLowerCase()||"";return n==="auto"&&typeof navigator<"u"&&navigator?.language?pk.test(navigator.language)?"rtl":"ltr":n==="rtl"?"rtl":"ltr"}var fo=(()=>{class t{get value(){return this.valueSignal()}valueSignal=W("ltr");change=new U;constructor(){let e=f(hk,{optional:!0});if(e){let r=e.body?e.body.dir:null,i=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(cC(r||i||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var zn=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({})}return t})();var lC=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({imports:[zn]})}return t})();var mk=["matButton",""],gk=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],vk=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var uC=new Map([["text",["mat-mdc-button"]],["filled",["mdc-button--unelevated","mat-mdc-unelevated-button"]],["elevated",["mdc-button--raised","mat-mdc-raised-button"]],["outlined",["mdc-button--outlined","mat-mdc-outlined-button"]],["tonal",["mat-tonal-button"]]]),QK=(()=>{class t extends lg{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=yk(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let r=this._elementRef.nativeElement.classList,i=this._appearance?uC.get(this._appearance):null,o=uC.get(e);i&&r.remove(...i),r.add(...o),this._appearance=e}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=ke({type:t,selectors:[["button","matButton",""],["a","matButton",""],["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""],["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostAttrs:[1,"mdc-button"],inputs:{appearance:[0,"matButton","appearance"]},exportAs:["matButton","matAnchor"],features:[J],attrs:mk,ngContentSelectors:vk,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,i){r&1&&(ti(gk),vn(0,"span",0),Vn(1),Jr(2,"span",1),Vn(3,1),ei(),Vn(4,2),vn(5,"span",2)(6,"span",3)),r&2&&Xe("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab)},styles:[`.mat-mdc-button-base{text-decoration:none}.mat-mdc-button-base .mat-icon{min-height:fit-content;flex-shrink:0}@media(hover: none){.mat-mdc-button-base:hover>span.mat-mdc-button-persistent-ripple::before{opacity:0}}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-button-text-horizontal-padding, 12px);height:var(--mat-button-text-container-height, 40px);font-family:var(--mat-button-text-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-text-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-text-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-text-label-text-transform);font-weight:var(--mat-button-text-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mat-button-text-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mat-button-text-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-text-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-button-text-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-button-text-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-text-touch-target-size, 48px);display:var(--mat-button-text-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-filled-container-height, 40px);font-family:var(--mat-button-filled-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-filled-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-filled-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-filled-label-text-transform);font-weight:var(--mat-button-filled-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-filled-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-button-filled-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-filled-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-filled-touch-target-size, 48px);display:var(--mat-button-filled-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mat-button-filled-label-text-color, var(--mat-sys-on-primary));background-color:var(--mat-button-filled-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mat-button-filled-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mat-button-protected-container-elevation-shadow, var(--mat-sys-level1));height:var(--mat-button-protected-container-height, 40px);font-family:var(--mat-button-protected-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-protected-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-protected-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-protected-label-text-transform);font-weight:var(--mat-button-protected-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-protected-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-button-protected-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-protected-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-protected-touch-target-size, 48px);display:var(--mat-button-protected-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-raised-button:not(:disabled){color:var(--mat-button-protected-label-text-color, var(--mat-sys-primary));background-color:var(--mat-button-protected-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mat-button-protected-container-shape, var(--mat-sys-corner-full))}@media(hover: hover){.mat-mdc-raised-button:hover{box-shadow:var(--mat-button-protected-hover-container-elevation-shadow, var(--mat-sys-level2))}}.mat-mdc-raised-button:focus{box-shadow:var(--mat-button-protected-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mat-button-protected-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-protected-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-protected-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mat-button-protected-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-outlined-container-height, 40px);font-family:var(--mat-button-outlined-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-outlined-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-outlined-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-outlined-label-text-transform);font-weight:var(--mat-button-outlined-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mat-button-outlined-container-shape, var(--mat-sys-corner-full));border-width:var(--mat-button-outlined-outline-width, 1px);padding:0 var(--mat-button-outlined-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-button-outlined-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-outlined-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-outlined-touch-target-size, 48px);display:var(--mat-button-outlined-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-outlined-button:not(:disabled){color:var(--mat-button-outlined-label-text-color, var(--mat-sys-primary));border-color:var(--mat-button-outlined-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mat-button-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-tonal-container-height, 40px);font-family:var(--mat-button-tonal-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-tonal-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-tonal-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-tonal-label-text-transform);font-weight:var(--mat-button-tonal-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-tonal-horizontal-padding, 24px)}.mat-tonal-button:not(:disabled){color:var(--mat-button-tonal-label-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-tonal-container-color, var(--mat-sys-secondary-container))}.mat-tonal-button,.mat-tonal-button .mdc-button__ripple{border-radius:var(--mat-button-tonal-container-shape, var(--mat-sys-corner-full))}.mat-tonal-button[disabled],.mat-tonal-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-tonal-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-tonal-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-tonal-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}[dir=rtl] .mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}.mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}[dir=rtl] .mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}.mat-tonal-button .mat-ripple-element{background-color:var(--mat-button-tonal-ripple-color, color-mix(in srgb, var(--mat-sys-on-secondary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-tonal-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-tonal-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-tonal-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-tonal-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-tonal-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-tonal-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-tonal-touch-target-size, 48px);display:var(--mat-button-tonal-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button,.mat-tonal-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before,.mat-tonal-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon,.mat-tonal-button .mdc-button__label,.mat-tonal-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator,.mat-tonal-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-button:focus-visible>.mat-focus-indicator::before,.mat-mdc-unelevated-button:focus-visible>.mat-focus-indicator::before,.mat-mdc-raised-button:focus-visible>.mat-focus-indicator::before,.mat-mdc-outlined-button:focus-visible>.mat-focus-indicator::before,.mat-tonal-button:focus-visible>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable,.mat-tonal-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon,.mat-tonal-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-tonal-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)} +`,`@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}} +`],encapsulation:2,changeDetection:0})}return t})();function yk(t){return t.hasAttribute("mat-raised-button")?"elevated":t.hasAttribute("mat-stroked-button")?"outlined":t.hasAttribute("mat-flat-button")?"filled":t.hasAttribute("mat-button")?"text":null}var XK=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({imports:[lC,zn]})}return t})();var wu={production:!0,electron:!1,githubio:!1,solarputty_download_url:"",current_version:"v3",compute_id:"local"};var na=class{};function bk(t){return t&&typeof t.connect=="function"&&!(t instanceof ko)}var ug=class extends na{_data;constructor(n){super(),this._data=n}connect(){return Ft(this._data)?this._data:T(this._data)}disconnect(){}},_n=(function(t){return t[t.REPLACED=0]="REPLACED",t[t.INSERTED=1]="INSERTED",t[t.MOVED=2]="MOVED",t[t.REMOVED=3]="REMOVED",t})(_n||{}),dg=class{viewCacheSize=20;_viewCache=[];applyChanges(n,e,r,i,o){n.forEachOperation((s,a,c)=>{let l,u;if(s.previousIndex==null){let d=()=>r(s,a,c);l=this._insertView(d,c,e,i(s)),u=l?_n.INSERTED:_n.REPLACED}else c==null?(this._detachAndCacheView(a,e),u=_n.REMOVED):(l=this._moveView(a,c,e,i(s)),u=_n.MOVED);o&&o({context:l?.context,operation:u,record:s})})}detach(){for(let n of this._viewCache)n.destroy();this._viewCache=[]}_insertView(n,e,r,i){let o=this._insertViewFromCache(e,r);if(o){o.context.$implicit=i;return}let s=n();return r.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(n,e){let r=e.detach(n);this._maybeCacheView(r,e)}_moveView(n,e,r,i){let o=r.get(n);return r.move(o,e),o.context.$implicit=i,o}_maybeCacheView(n,e){if(this._viewCache.length0?o/this._itemSize:0;if(e.end>i){let c=Math.ceil(r/this._itemSize),l=Math.max(0,Math.min(s,i-c));s!=l&&(s=l,o=l*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(i,e.start+c))}let a=o-e.start*this._itemSize;if(a0&&(e.end=Math.min(i,e.end+l),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*e.start)),this._scrolledIndexChange.next(Math.floor(s))}};function Ek(t){return t._scrollStrategy}var wk=(()=>{class t{get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=ii(e)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=ii(e)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=ii(e)}_maxBufferPx=200;_scrollStrategy=new fg(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[we([{provide:fC,useFactory:Ek,deps:[be(()=>t)]}]),Re]})}return t})(),Ck=20,ra=(()=>{class t{_ngZone=f(j);_platform=f(he);_renderer=f(je).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new S;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let r=this.scrollContainers.get(e);r&&(r.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=Ck){return this._platform.isBrowser?new O(r=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let i=e>0?this._scrolled.pipe(Bo(e)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):T()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(e,r){let i=this.getAncestorScrollContainers(e);return this.scrolled(r).pipe(fe(o=>!o||i.indexOf(o)>-1))}getAncestorScrollContainers(e){let r=[];return this.scrollContainers.forEach((i,o)=>{this._scrollableContainsElement(o,e)&&r.push(o)}),r}_scrollableContainsElement(e,r){let i=Tt(r),o=e.getElementRef().nativeElement;do if(i==o)return!0;while(i=i.parentElement);return!1}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),pg=(()=>{class t{elementRef=f(z);scrollDispatcher=f(ra);ngZone=f(j);dir=f(fo,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new S;_renderer=f(Oe);_cleanupScroll;_elementScrolled=new S;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let r=this.elementRef.nativeElement,i=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=i?e.end:e.start),e.right==null&&(e.right=i?e.start:e.end),e.bottom!=null&&(e.top=r.scrollHeight-r.clientHeight-e.bottom),i&&lo()!=en.NORMAL?(e.left!=null&&(e.right=r.scrollWidth-r.clientWidth-e.left),lo()==en.INVERTED?e.left=e.right:lo()==en.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=r.scrollWidth-r.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let r=this.elementRef.nativeElement;Du()?r.scrollTo(e):(e.top!=null&&(r.scrollTop=e.top),e.left!=null&&(r.scrollLeft=e.left))}measureScrollOffset(e){let r="left",i="right",o=this.elementRef.nativeElement;if(e=="top")return o.scrollTop;if(e=="bottom")return o.scrollHeight-o.clientHeight-o.scrollTop;let s=this.dir&&this.dir.value=="rtl";return e=="start"?e=s?i:r:e=="end"&&(e=s?r:i),s&&lo()==en.INVERTED?e==r?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&lo()==en.NEGATED?e==r?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==r?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return t})(),Ik=20,ci=(()=>{class t{_platform=f(he);_listeners;_viewportSize=null;_change=new S;_document=f(L);constructor(){let e=f(j),r=f(je).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let i=o=>this._change.next(o);this._listeners=[r.listen("window","resize",i),r.listen("window","orientationchange",i)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:r,height:i}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+i,right:e.left+r,height:i,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,r=this._getWindow(),i=e.documentElement,o=i.getBoundingClientRect(),s=-o.top||e.body?.scrollTop||r.scrollY||i.scrollTop||0,a=-o.left||e.body?.scrollLeft||r.scrollX||i.scrollLeft||0;return{top:s,left:a}}change(e=Ik){return e>0?this._change.pipe(Bo(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),dC=new y("VIRTUAL_SCROLLABLE"),Sk=(()=>{class t extends pg{constructor(){super()}measureViewportSize(e){let r=this.elementRef.nativeElement;return e==="horizontal"?r.clientWidth:r.clientHeight}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,features:[J]})}return t})();function Mk(t,n){return t.start==n.start&&t.end==n.end}var Tk=typeof requestAnimationFrame<"u"?Ld:Pd,xk=new y("CDK_VIRTUAL_SCROLL_VIEWPORT"),Ak=(()=>{class t extends Sk{elementRef=f(z);_changeDetectorRef=f(St);_scrollStrategy=f(fC,{optional:!0});scrollable=f(dC,{optional:!0});_platform=f(he);_detachedSubject=new S;_renderedRangeSubject=new S;_renderedContentOffsetSubject=new S;get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new O(e=>this._scrollStrategy.scrolledIndexChange.subscribe(r=>Promise.resolve().then(()=>this.ngZone.run(()=>e.next(r)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;renderedContentOffset=this._renderedContentOffsetSubject.pipe(fe(e=>e!==null),Si());_totalContentSize=0;_totalContentWidth=W("");_totalContentHeight=W("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf=null;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=W(!1);_runAfterChangeDetection=[];_viewportChanges=G.EMPTY;_injector=f($);_isDestroyed=!1;constructor(){super();let e=f(ci);this._scrollStrategy,this._viewportChanges=e.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let r=$i(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:f(He).injector});f(Ae).onDestroy(()=>{r.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(Rr(null),Bo(0,Tk),at(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(e){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(at(this._detachedSubject)).subscribe(r=>{let i=r.length;i!==this._dataLength&&(this._dataLength=i,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){Mk(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,r="to-start"){e=this.appendOnly&&r==="to-start"?0:e;let i=this.dir&&this.dir.value=="rtl",o=this.orientation=="horizontal",s=o?"X":"Y",c=`translate${s}(${Number((o&&i?-1:1)*e)}px)`;this._renderedContentOffset=e,r==="to-end"&&(c+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=c&&(this._renderedContentTransform=c,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,r="auto"){let i={behavior:r};this.orientation==="horizontal"?i.start=e:i.top=e,this.scrollable.scrollTo(i)}scrollToIndex(e,r="auto"){this._scrollStrategy.scrollToIndex(e,r)}measureScrollOffset(e){let r;return this.scrollable==this?r=i=>super.measureScrollOffset(i):r=i=>this.scrollable.measureScrollOffset(i),Math.max(0,r(e??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let r,i="left",o="right",s=this.dir?.value=="rtl";e=="start"?r=s?o:i:e=="end"?r=s?i:o:e?r=e:r=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(r);return this.elementRef.nativeElement.getBoundingClientRect()[r]-a}measureRenderedContentSize(){let e=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),!q(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this._renderedContentOffsetSubject.next(this.getOffsetToRenderedContentStart()),ht(()=>{this._changeDetectionNeeded.set(!1);let e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let r of e)r()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=ke({type:t,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(r,i){if(r&1&&Ol(_k,7),r&2){let o;Os(o=ks())&&(i._contentWrapper=o.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(r,i){r&2&&Xe("cdk-virtual-scroll-orientation-horizontal",i.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",i.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",ue]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[we([{provide:pg,useFactory:()=>f(dC,{optional:!0})||f(t)},{provide:xk,useExisting:t}]),J],ngContentSelectors:Dk,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(r,i){r&1&&(ti(),Jr(0,"div",1,0),Vn(2),ei(),vn(3,"div",2)),r&2&&(vp(3),kl("width",i._totalContentWidth())("height",i._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0} +`],encapsulation:2,changeDetection:0})}return t})();var hg=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({})}return t})(),mg=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({imports:[zn,hg,zn,hg]})}return t})();var ia=class{_attachedHost=null;attach(n){return this._attachedHost=n,n.attach(this)}detach(){let n=this._attachedHost;n!=null&&(this._attachedHost=null,n.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},gg=class extends ia{component;viewContainerRef;injector;projectableNodes;bindings;constructor(n,e,r,i,o){super(),this.component=n,this.viewContainerRef=e,this.injector=r,this.projectableNodes=i,this.bindings=o||null}},ho=class extends ia{templateRef;viewContainerRef;context;injector;constructor(n,e,r,i){super(),this.templateRef=n,this.viewContainerRef=e,this.context=r,this.injector=i}get origin(){return this.templateRef.elementRef}attach(n,e=this.context){return this.context=e,super.attach(n)}detach(){return this.context=void 0,super.detach()}},vg=class extends ia{element;constructor(n){super(),this.element=n instanceof z?n.nativeElement:n}},Cu=class{_attachedPortal=null;_disposeFn=null;_isDisposed=!1;hasAttached(){return!!this._attachedPortal}attach(n){if(n instanceof gg)return this._attachedPortal=n,this.attachComponentPortal(n);if(n instanceof ho)return this._attachedPortal=n,this.attachTemplatePortal(n);if(this.attachDomPortal&&n instanceof vg)return this._attachedPortal=n,this.attachDomPortal(n)}attachDomPortal=null;detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(n){this._disposeFn=n}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Iu=class extends Cu{outletElement;_appRef;_defaultInjector;constructor(n,e,r){super(),this.outletElement=n,this._appRef=e,this._defaultInjector=r}attachComponentPortal(n){let e;if(n.viewContainerRef){let r=n.injector||n.viewContainerRef.injector,i=r.get(mn,null,{optional:!0})||void 0;e=n.viewContainerRef.createComponent(n.component,{index:n.viewContainerRef.length,injector:r,ngModuleRef:i,projectableNodes:n.projectableNodes||void 0,bindings:n.bindings||void 0}),this.setDisposeFn(()=>e.destroy())}else{let r=this._appRef,i=n.injector||this._defaultInjector||$.NULL,o=i.get(re,r.injector);e=Ul(n.component,{elementInjector:i,environmentInjector:o,projectableNodes:n.projectableNodes||void 0,bindings:n.bindings||void 0}),r.attachView(e.hostView),this.setDisposeFn(()=>{r.viewCount>0&&r.detachView(e.hostView),e.destroy()})}return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=n,e}attachTemplatePortal(n){let e=n.viewContainerRef,r=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return r.rootNodes.forEach(i=>this.outletElement.appendChild(i)),r.detectChanges(),this.setDisposeFn(()=>{let i=e.indexOf(r);i!==-1&&e.remove(i)}),this._attachedPortal=n,r}attachDomPortal=n=>{let e=n.element;e.parentNode;let r=this.outletElement.ownerDocument.createComment("dom-portal");e.parentNode.insertBefore(r,e),this.outletElement.appendChild(e),this._attachedPortal=n,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(e,r)})};dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},x7=(()=>{class t extends ho{constructor(){let e=f(dt),r=f(qe);super(e,r)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[J]})}return t})(),A7=(()=>{class t extends Cu{_moduleRef=f(mn,{optional:!0});_document=f(L);_viewContainerRef=f(qe);_isInitialized=!1;_attachedRef=null;constructor(){super()}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}attached=new U;get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let r=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,i=r.createComponent(e.component,{index:r.length,injector:e.injector||r.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0,bindings:e.bindings||void 0});return r!==this._viewContainerRef&&this._getRootNode().appendChild(i.hostView.rootNodes[0]),super.setDisposeFn(()=>i.destroy()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}attachTemplatePortal(e){e.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=r,this.attached.emit(r),r}attachDomPortal=e=>{let r=e.element;r.parentNode;let i=this._document.createComment("dom-portal");e.setAttachedHost(this),r.parentNode.insertBefore(i,r),this._getRootNode().appendChild(r),this._attachedPortal=e,super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(r,i)})};_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[J]})}return t})(),hC=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({})}return t})();var pC=Du();function DC(t){return new Su(t.get(ci),t.get(L))}var Su=class{_viewportRuler;_previousHTMLStyles={top:"",left:""};_previousScrollPosition;_isEnabled=!1;_document;constructor(n,e){this._viewportRuler=n,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let n=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=n.style.left||"",this._previousHTMLStyles.top=n.style.top||"",n.style.left=De(-this._previousScrollPosition.left),n.style.top=De(-this._previousScrollPosition.top),n.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let n=this._document.documentElement,e=this._document.body,r=n.style,i=e.style,o=r.scrollBehavior||"",s=i.scrollBehavior||"";this._isEnabled=!1,r.left=this._previousHTMLStyles.left,r.top=this._previousHTMLStyles.top,n.classList.remove("cdk-global-scrollblock"),pC&&(r.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),pC&&(r.scrollBehavior=o,i.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.documentElement,r=this._viewportRuler.getViewportSize();return e.scrollHeight>r.height||e.scrollWidth>r.width}};function EC(t,n){return new Mu(t.get(ra),t.get(j),t.get(ci),n)}var Mu=class{_scrollDispatcher;_ngZone;_viewportRuler;_config;_scrollSubscription=null;_overlayRef;_initialScrollPosition;constructor(n,e,r,i){this._scrollDispatcher=n,this._ngZone=e,this._viewportRuler=r,this._config=i}attach(n){this._overlayRef,this._overlayRef=n}enable(){if(this._scrollSubscription)return;let n=this._scrollDispatcher.scrolled(0).pipe(fe(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=n.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=n.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}_detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}};var oa=class{enable(){}disable(){}attach(){}};function yg(t,n){return n.some(e=>{let r=t.bottome.bottom,o=t.righte.right;return r||i||o||s})}function mC(t,n){return n.some(e=>{let r=t.tope.bottom,o=t.lefte.right;return r||i||o||s})}function Dg(t,n){return new Tu(t.get(ra),t.get(ci),t.get(j),n)}var Tu=class{_scrollDispatcher;_viewportRuler;_ngZone;_config;_scrollSubscription=null;_overlayRef;constructor(n,e,r,i){this._scrollDispatcher=n,this._viewportRuler=e,this._ngZone=r,this._config=i}attach(n){this._overlayRef,this._overlayRef=n}enable(){if(!this._scrollSubscription){let n=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(n).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:r,height:i}=this._viewportRuler.getViewportSize();yg(e,[{width:r,height:i,bottom:i,right:r,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},wC=(()=>{class t{_injector=f($);constructor(){}noop=()=>new oa;close=e=>EC(this._injector,e);block=()=>DC(this._injector);reposition=e=>Dg(this._injector,e);static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),sa=class{positionStrategy;scrollStrategy=new oa;panelClass="";hasBackdrop=!1;backdropClass="cdk-overlay-dark-backdrop";disableAnimations;width;height;minWidth;minHeight;maxWidth;maxHeight;direction;disposeOnNavigation=!1;usePopover;eventPredicate;constructor(n){if(n){let e=Object.keys(n);for(let r of e)n[r]!==void 0&&(this[r]=n[r])}}};var xu=class{connectionPair;scrollableViewProperties;constructor(n,e){this.connectionPair=n,this.scrollableViewProperties=e}};var CC=(()=>{class t{_attachedOverlays=[];_document=f(L);_isAttached=!1;constructor(){}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let r=this._attachedOverlays.indexOf(e);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}canReceiveEvent(e,r,i){return i.observers.length<1?!1:e.eventPredicate?e.eventPredicate(r):!0}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),IC=(()=>{class t extends CC{_ngZone=f(j);_renderer=f(je).createRenderer(null,null);_cleanupKeydown;add(e){super.add(e),this._isAttached||(this._ngZone.runOutsideAngular(()=>{this._cleanupKeydown=this._renderer.listen("body","keydown",this._keydownListener)}),this._isAttached=!0)}detach(){this._isAttached&&(this._cleanupKeydown?.(),this._isAttached=!1)}_keydownListener=e=>{let r=this._attachedOverlays;for(let i=r.length-1;i>-1;i--){let o=r[i];if(this.canReceiveEvent(o,e,o._keydownEvents)){this._ngZone.run(()=>o._keydownEvents.next(e));break}}};static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),SC=(()=>{class t extends CC{_platform=f(he);_ngZone=f(j);_renderer=f(je).createRenderer(null,null);_cursorOriginalValue;_cursorStyleIsSet=!1;_pointerDownEventTarget=null;_cleanups;add(e){if(super.add(e),!this._isAttached){let r=this._document.body,i={capture:!0},o=this._renderer;this._cleanups=this._ngZone.runOutsideAngular(()=>[o.listen(r,"pointerdown",this._pointerDownListener,i),o.listen(r,"click",this._clickListener,i),o.listen(r,"auxclick",this._clickListener,i),o.listen(r,"contextmenu",this._clickListener,i)]),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){this._isAttached&&(this._cleanups?.forEach(e=>e()),this._cleanups=void 0,this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}_pointerDownListener=e=>{this._pointerDownEventTarget=Je(e)};_clickListener=e=>{let r=Je(e),i=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:r;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let a=o[s],c=a._outsidePointerEvents;if(!(!a.hasAttached()||!this.canReceiveEvent(a,e,c))){if(gC(a.overlayElement,r)||gC(a.overlayElement,i))break;this._ngZone?this._ngZone.run(()=>c.next(e)):c.next(e)}}};static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function gC(t,n){let e=typeof ShadowRoot<"u"&&ShadowRoot,r=n;for(;r;){if(r===t)return!0;r=e&&r instanceof ShadowRoot?r.host:r.parentNode}return!1}var MC=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=ke({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],decls:0,vars:0,template:function(r,i){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;touch-action:manipulation}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}@media(prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.cdk-overlay-popover{background:none;border:none;padding:0;outline:0;overflow:visible;position:fixed;pointer-events:none;white-space:normal;color:inherit;text-decoration:none;width:100%;height:100%;inset:auto;top:0;left:0}.cdk-overlay-popover::backdrop{display:none}.cdk-overlay-popover .cdk-overlay-backdrop{position:fixed;z-index:auto} +`],encapsulation:2,changeDetection:0})}return t})(),Eg=(()=>{class t{_platform=f(he);_containerElement;_document=f(L);_styleLoader=f(xt);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||rg()){let i=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let o=0;o{let n=this.element;clearTimeout(this._fallbackTimeout),this._cleanupTransitionEnd?.(),this._cleanupTransitionEnd=this._renderer.listen(n,"transitionend",this.dispose),this._fallbackTimeout=setTimeout(this.dispose,500),n.style.pointerEvents="none",n.classList.remove("cdk-overlay-backdrop-showing")})}dispose=()=>{clearTimeout(this._fallbackTimeout),this._cleanupClick?.(),this._cleanupTransitionEnd?.(),this._cleanupClick=this._cleanupTransitionEnd=this._fallbackTimeout=void 0,this.element.remove()}};function wg(t){return t&&t.nodeType===1}var Au=class{_portalOutlet;_host;_pane;_config;_ngZone;_keyboardDispatcher;_document;_location;_outsideClickDispatcher;_animationsDisabled;_injector;_renderer;_backdropClick=new S;_attachments=new S;_detachments=new S;_positionStrategy;_scrollStrategy;_locationChanges=G.EMPTY;_backdropRef=null;_detachContentMutationObserver;_detachContentAfterRenderRef;_disposed=!1;_previousHostParent;_keydownEvents=new S;_outsidePointerEvents=new S;_afterNextRenderRef;constructor(n,e,r,i,o,s,a,c,l,u=!1,d,h){this._portalOutlet=n,this._host=e,this._pane=r,this._config=i,this._ngZone=o,this._keyboardDispatcher=s,this._document=a,this._location=c,this._outsideClickDispatcher=l,this._animationsDisabled=u,this._injector=d,this._renderer=h,i.scrollStrategy&&(this._scrollStrategy=i.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=i.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropRef?.element||null}get hostElement(){return this._host}get eventPredicate(){return this._config?.eventPredicate||null}attach(n){if(this._disposed)return null;this._attachHost();let e=this._portalOutlet.attach(n);return this._positionStrategy?.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=ht(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._completeDetachContent(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let n=this._portalOutlet.detach();return this._detachments.next(),this._completeDetachContent(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),n}dispose(){if(this._disposed)return;let n=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._backdropRef?.dispose(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=this._backdropRef=null,n&&this._detachments.next(),this._detachments.complete(),this._completeDetachContent(),this._disposed=!0}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(n){n!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=n,this.hasAttached()&&(n.attach(this),this.updatePosition()))}updateSize(n){this._config=g(g({},this._config),n),this._updateElementSize()}setDirection(n){this._config=F(g({},this._config),{direction:n}),this._updateElementDirection()}addPanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!0)}removePanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!1)}getDirection(){let n=this._config.direction;return n?typeof n=="string"?n:n.value:"ltr"}updateScrollStrategy(n){n!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=n,this.hasAttached()&&(n.attach(this),n.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let n=this._pane.style;n.width=De(this._config.width),n.height=De(this._config.height),n.minWidth=De(this._config.minWidth),n.minHeight=De(this._config.minHeight),n.maxWidth=De(this._config.maxWidth),n.maxHeight=De(this._config.maxHeight)}_togglePointerEvents(n){this._pane.style.pointerEvents=n?"":"none"}_attachHost(){if(!this._host.parentElement){let n=this._config.usePopover?this._positionStrategy?.getPopoverInsertionPoint?.():null;wg(n)?n.after(this._host):n?.type==="parent"?n.element.appendChild(this._host):this._previousHostParent?.appendChild(this._host)}if(this._config.usePopover)try{this._host.showPopover()}catch{}}_attachBackdrop(){let n="cdk-overlay-backdrop-showing";this._backdropRef?.dispose(),this._backdropRef=new bg(this._document,this._renderer,this._ngZone,e=>{this._backdropClick.next(e)}),this._animationsDisabled&&this._backdropRef.element.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropRef.element,this._config.backdropClass,!0),this._config.usePopover?this._host.prepend(this._backdropRef.element):this._host.parentElement.insertBefore(this._backdropRef.element,this._host),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._backdropRef?.element.classList.add(n))}):this._backdropRef.element.classList.add(n)}_updateStackingOrder(){!this._config.usePopover&&this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){this._animationsDisabled?(this._backdropRef?.dispose(),this._backdropRef=null):this._backdropRef?.detach()}_toggleClasses(n,e,r){let i=oi(e||[]).filter(o=>!!o);i.length&&(r?n.classList.add(...i):n.classList.remove(...i))}_detachContentWhenEmpty(){let n=!1;try{this._detachContentAfterRenderRef=ht(()=>{n=!0,this._detachContent()},{injector:this._injector})}catch(e){if(n)throw e;this._detachContent()}globalThis.MutationObserver&&this._pane&&(this._detachContentMutationObserver||=new globalThis.MutationObserver(()=>{this._detachContent()}),this._detachContentMutationObserver.observe(this._pane,{childList:!0}))}_detachContent(){(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),this._completeDetachContent())}_completeDetachContent(){this._detachContentAfterRenderRef?.destroy(),this._detachContentAfterRenderRef=void 0,this._detachContentMutationObserver?.disconnect()}_disposeScrollStrategy(){let n=this._scrollStrategy;n?.disable(),n?.detach?.()}},vC="cdk-overlay-connected-position-bounding-box",Rk=/([A-Za-z%]+)$/;function Cg(t,n){return new Ru(n,t.get(ci),t.get(L),t.get(he),t.get(Eg))}var Ru=class{_viewportRuler;_document;_platform;_overlayContainer;_overlayRef;_isInitialRender=!1;_lastBoundingBoxSize={width:0,height:0};_isPushed=!1;_canPush=!0;_growAfterOpen=!1;_hasFlexibleDimensions=!0;_positionLocked=!1;_originRect;_overlayRect;_viewportRect;_containerRect;_viewportMargin=0;_scrollables=[];_preferredPositions=[];_origin;_pane;_isDisposed=!1;_boundingBox=null;_lastPosition=null;_lastScrollVisibility=null;_positionChanges=new S;_resizeSubscription=G.EMPTY;_offsetX=0;_offsetY=0;_transformOriginSelector;_appliedPanelClasses=[];_previousPushAmount=null;_popoverLocation="global";positionChanges=this._positionChanges;get positions(){return this._preferredPositions}constructor(n,e,r,i,o){this._viewportRuler=e,this._document=r,this._platform=i,this._overlayContainer=o,this.setOrigin(n)}attach(n){this._overlayRef&&this._overlayRef,this._validatePositions(),n.hostElement.classList.add(vC),this._overlayRef=n,this._boundingBox=n.hostElement,this._pane=n.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._getContainerRect();let n=this._originRect,e=this._overlayRect,r=this._viewportRect,i=this._containerRect,o=[],s;for(let a of this._preferredPositions){let c=this._getOriginPoint(n,i,a),l=this._getOverlayPoint(c,e,a),u=this._getOverlayFit(l,e,r,a);if(u.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,c);return}if(this._canFitWithFlexibleDimensions(u,l,r)){o.push({position:a,origin:c,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(c,a)});continue}(!s||s.overlayFit.visibleAreac&&(c=u,a=l)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&li(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(vC),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let n=this._lastPosition;n?(this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._getContainerRect(),this._applyPosition(n,this._getOriginPoint(this._originRect,this._containerRect,n))):this.apply()}withScrollableContainers(n){return this._scrollables=n,this}withPositions(n){return this._preferredPositions=n,n.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(n){return this._viewportMargin=n,this}withFlexibleDimensions(n=!0){return this._hasFlexibleDimensions=n,this}withGrowAfterOpen(n=!0){return this._growAfterOpen=n,this}withPush(n=!0){return this._canPush=n,this}withLockedPosition(n=!0){return this._positionLocked=n,this}setOrigin(n){return this._origin=n,this}withDefaultOffsetX(n){return this._offsetX=n,this}withDefaultOffsetY(n){return this._offsetY=n,this}withTransformOriginOn(n){return this._transformOriginSelector=n,this}withPopoverLocation(n){return this._popoverLocation=n,this}getPopoverInsertionPoint(){return this._popoverLocation==="global"?null:this._popoverLocation!=="inline"?this._popoverLocation:this._origin instanceof z?this._origin.nativeElement:wg(this._origin)?this._origin:null}_getOriginPoint(n,e,r){let i;if(r.originX=="center")i=n.left+n.width/2;else{let s=this._isRtl()?n.right:n.left,a=this._isRtl()?n.left:n.right;i=r.originX=="start"?s:a}e.left<0&&(i-=e.left);let o;return r.originY=="center"?o=n.top+n.height/2:o=r.originY=="top"?n.top:n.bottom,e.top<0&&(o-=e.top),{x:i,y:o}}_getOverlayPoint(n,e,r){let i;r.overlayX=="center"?i=-e.width/2:r.overlayX==="start"?i=this._isRtl()?-e.width:0:i=this._isRtl()?0:-e.width;let o;return r.overlayY=="center"?o=-e.height/2:o=r.overlayY=="top"?0:-e.height,{x:n.x+i,y:n.y+o}}_getOverlayFit(n,e,r,i){let o=bC(e),{x:s,y:a}=n,c=this._getOffset(i,"x"),l=this._getOffset(i,"y");c&&(s+=c),l&&(a+=l);let u=0-s,d=s+o.width-r.width,h=0-a,p=a+o.height-r.height,m=this._subtractOverflows(o.width,u,d),_=this._subtractOverflows(o.height,h,p),E=m*_;return{visibleArea:E,isCompletelyWithinViewport:o.width*o.height===E,fitsInViewportVertically:_===o.height,fitsInViewportHorizontally:m==o.width}}_canFitWithFlexibleDimensions(n,e,r){if(this._hasFlexibleDimensions){let i=r.bottom-e.y,o=r.right-e.x,s=yC(this._overlayRef.getConfig().minHeight),a=yC(this._overlayRef.getConfig().minWidth),c=n.fitsInViewportVertically||s!=null&&s<=i,l=n.fitsInViewportHorizontally||a!=null&&a<=o;return c&&l}return!1}_pushOverlayOnScreen(n,e,r){if(this._previousPushAmount&&this._positionLocked)return{x:n.x+this._previousPushAmount.x,y:n.y+this._previousPushAmount.y};let i=bC(e),o=this._viewportRect,s=Math.max(n.x+i.width-o.width,0),a=Math.max(n.y+i.height-o.height,0),c=Math.max(o.top-r.top-n.y,0),l=Math.max(o.left-r.left-n.x,0),u=0,d=0;return i.width<=o.width?u=l||-s:u=n.xm&&!this._isInitialRender&&!this._growAfterOpen&&(s=n.y-m/2)}let c=e.overlayX==="start"&&!i||e.overlayX==="end"&&i,l=e.overlayX==="end"&&!i||e.overlayX==="start"&&i,u,d,h;if(l)h=r.width-n.x+this._getViewportMarginStart()+this._getViewportMarginEnd(),u=n.x-this._getViewportMarginStart();else if(c)d=n.x,u=r.right-n.x-this._getViewportMarginEnd();else{let p=Math.min(r.right-n.x+r.left,n.x),m=this._lastBoundingBoxSize.width;u=p*2,d=n.x-p,u>m&&!this._isInitialRender&&!this._growAfterOpen&&(d=n.x-m/2)}return{top:s,left:d,bottom:a,right:h,width:u,height:o}}_setBoundingBoxStyles(n,e){let r=this._calculateBoundingBoxRect(n,e);!this._isInitialRender&&!this._growAfterOpen&&(r.height=Math.min(r.height,this._lastBoundingBoxSize.height),r.width=Math.min(r.width,this._lastBoundingBoxSize.width));let i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right="auto",i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;i.width=De(r.width),i.height=De(r.height),i.top=De(r.top)||"auto",i.bottom=De(r.bottom)||"auto",i.left=De(r.left)||"auto",i.right=De(r.right)||"auto",e.overlayX==="center"?i.alignItems="center":i.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?i.justifyContent="center":i.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",o&&(i.maxHeight=De(o)),s&&(i.maxWidth=De(s))}this._lastBoundingBoxSize=r,li(this._boundingBox.style,i)}_resetBoundingBoxStyles(){li(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){li(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(n,e){let r={},i=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(i){let u=this._viewportRuler.getViewportScrollPosition();li(r,this._getExactOverlayY(e,n,u)),li(r,this._getExactOverlayX(e,n,u))}else r.position="static";let a="",c=this._getOffset(e,"x"),l=this._getOffset(e,"y");c&&(a+=`translateX(${c}px) `),l&&(a+=`translateY(${l}px)`),r.transform=a.trim(),s.maxHeight&&(i?r.maxHeight=De(s.maxHeight):o&&(r.maxHeight="")),s.maxWidth&&(i?r.maxWidth=De(s.maxWidth):o&&(r.maxWidth="")),li(this._pane.style,r)}_getExactOverlayY(n,e,r){let i={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,n);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r)),n.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;i.bottom=`${s-(o.y+this._overlayRect.height)}px`}else i.top=De(o.y);return i}_getExactOverlayX(n,e,r){let i={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,n);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,r));let s;if(this._isRtl()?s=n.overlayX==="end"?"left":"right":s=n.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;i.right=`${a-(o.x+this._overlayRect.width)}px`}else i.left=De(o.x);return i}_getScrollVisibility(){let n=this._getOriginRect(),e=this._pane.getBoundingClientRect(),r=this._scrollables.map(i=>i.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:mC(n,r),isOriginOutsideView:yg(n,r),isOverlayClipped:mC(e,r),isOverlayOutsideView:yg(e,r)}}_subtractOverflows(n,...e){return e.reduce((r,i)=>r-Math.max(i,0),n)}_getNarrowedViewportRect(){let n=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,r=this._viewportRuler.getViewportScrollPosition();return{top:r.top+this._getViewportMarginTop(),left:r.left+this._getViewportMarginStart(),right:r.left+n-this._getViewportMarginEnd(),bottom:r.top+e-this._getViewportMarginBottom(),width:n-this._getViewportMarginStart()-this._getViewportMarginEnd(),height:e-this._getViewportMarginTop()-this._getViewportMarginBottom()}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(n,e){return e==="x"?n.offsetX==null?this._offsetX:n.offsetX:n.offsetY==null?this._offsetY:n.offsetY}_validatePositions(){}_addPanelClasses(n){this._pane&&oi(n).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(n=>{this._pane.classList.remove(n)}),this._appliedPanelClasses=[])}_getViewportMarginStart(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.start??0}_getViewportMarginEnd(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.end??0}_getViewportMarginTop(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.top??0}_getViewportMarginBottom(){return typeof this._viewportMargin=="number"?this._viewportMargin:this._viewportMargin?.bottom??0}_getOriginRect(){let n=this._origin;if(n instanceof z)return n.nativeElement.getBoundingClientRect();if(n instanceof Element)return n.getBoundingClientRect();let e=n.width||0,r=n.height||0;return{top:n.y,bottom:n.y+r,left:n.x,right:n.x+e,height:r,width:e}}_getContainerRect(){let n=this._overlayRef.getConfig().usePopover&&this._popoverLocation!=="global",e=this._overlayContainer.getContainerElement();n&&(e.style.display="block");let r=e.getBoundingClientRect();return n&&(e.style.display=""),r}};function li(t,n){for(let e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}function yC(t){if(typeof t!="number"&&t!=null){let[n,e]=t.split(Rk);return!e||e==="px"?parseFloat(n):null}return t||null}function bC(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}function Nk(t,n){return t===n?!0:t.isOriginClipped===n.isOriginClipped&&t.isOriginOutsideView===n.isOriginOutsideView&&t.isOverlayClipped===n.isOverlayClipped&&t.isOverlayOutsideView===n.isOverlayOutsideView}var _C="cdk-global-overlay-wrapper";function TC(t){return new Nu}var Nu=class{_overlayRef;_cssPosition="static";_topOffset="";_bottomOffset="";_alignItems="";_xPosition="";_xOffset="";_width="";_height="";_isDisposed=!1;attach(n){let e=n.getConfig();this._overlayRef=n,this._width&&!e.width&&n.updateSize({width:this._width}),this._height&&!e.height&&n.updateSize({height:this._height}),n.hostElement.classList.add(_C),this._isDisposed=!1}top(n=""){return this._bottomOffset="",this._topOffset=n,this._alignItems="flex-start",this}left(n=""){return this._xOffset=n,this._xPosition="left",this}bottom(n=""){return this._topOffset="",this._bottomOffset=n,this._alignItems="flex-end",this}right(n=""){return this._xOffset=n,this._xPosition="right",this}start(n=""){return this._xOffset=n,this._xPosition="start",this}end(n=""){return this._xOffset=n,this._xPosition="end",this}width(n=""){return this._overlayRef?this._overlayRef.updateSize({width:n}):this._width=n,this}height(n=""){return this._overlayRef?this._overlayRef.updateSize({height:n}):this._height=n,this}centerHorizontally(n=""){return this.left(n),this._xPosition="center",this}centerVertically(n=""){return this.top(n),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let n=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,r=this._overlayRef.getConfig(),{width:i,height:o,maxWidth:s,maxHeight:a}=r,c=(i==="100%"||i==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),u=this._xPosition,d=this._xOffset,h=this._overlayRef.getConfig().direction==="rtl",p="",m="",_="";c?_="flex-start":u==="center"?(_="center",h?m=d:p=d):h?u==="left"||u==="end"?(_="flex-end",p=d):(u==="right"||u==="start")&&(_="flex-start",m=d):u==="left"||u==="start"?(_="flex-start",p=d):(u==="right"||u==="end")&&(_="flex-end",m=d),n.position=this._cssPosition,n.marginLeft=c?"0":p,n.marginTop=l?"0":this._topOffset,n.marginBottom=this._bottomOffset,n.marginRight=c?"0":m,e.justifyContent=_,e.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let n=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,r=e.style;e.classList.remove(_C),r.justifyContent=r.alignItems=n.marginTop=n.marginBottom=n.marginLeft=n.marginRight=n.position="",this._overlayRef=null,this._isDisposed=!0}},xC=(()=>{class t{_injector=f($);constructor(){}global(){return TC()}flexibleConnectedTo(e){return Cg(this._injector,e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ig=new y("OVERLAY_DEFAULT_CONFIG");function Sg(t,n){t.get(xt).load(MC);let e=t.get(Eg),r=t.get(L),i=t.get(Js),o=t.get(He),s=t.get(fo),a=t.get(Oe,null,{optional:!0})||t.get(je).createRenderer(null,null),c=new sa(n),l=t.get(Ig,null,{optional:!0})?.usePopover??!0;c.direction=c.direction||s.value,"showPopover"in r.body?c.usePopover=n?.usePopover??l:c.usePopover=!1;let u=r.createElement("div"),d=r.createElement("div");u.id=i.getId("cdk-overlay-"),u.classList.add("cdk-overlay-pane"),d.appendChild(u),c.usePopover&&(d.setAttribute("popover","manual"),d.classList.add("cdk-overlay-popover"));let h=c.usePopover?c.positionStrategy?.getPopoverInsertionPoint?.():null;return wg(h)?h.after(d):h?.type==="parent"?h.element.appendChild(d):e.getContainerElement().appendChild(d),new Au(new Iu(u,o,t),d,u,c,t.get(j),t.get(IC),r,t.get(yn),t.get(SC),n?.disableAnimations??t.get(ws,null,{optional:!0})==="NoopAnimations",t.get(re),a)}var AC=(()=>{class t{scrollStrategies=f(wC);_positionBuilder=f(xC);_injector=f($);constructor(){}create(e){return Sg(this._injector,e)}position(){return this._positionBuilder}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ok=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],kk=new y("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let t=f($);return()=>Dg(t)}}),_g=(()=>{class t{elementRef=f(z);constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]})}return t})(),RC=new y("cdk-connected-overlay-default-config"),Fk=(()=>{class t{_dir=f(fo,{optional:!0});_injector=f($);_overlayRef;_templatePortal;_backdropSubscription=G.EMPTY;_attachSubscription=G.EMPTY;_detachSubscription=G.EMPTY;_positionSubscription=G.EMPTY;_offsetX;_offsetY;_position;_scrollStrategyFactory=f(kk);_ngZone=f(j);origin;positions;positionStrategy;get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}width;height;minWidth;minHeight;backdropClass;panelClass;viewportMargin=0;scrollStrategy;open=!1;disableClose=!1;transformOriginSelector;hasBackdrop=!1;lockPosition=!1;flexibleDimensions=!1;growAfterOpen=!1;push=!1;disposeOnNavigation=!1;usePopover;matchWidth=!1;set _config(e){typeof e!="string"&&this._assignConfig(e)}backdropClick=new U;positionChange=new U;attach=new U;detach=new U;overlayKeydown=new U;overlayOutsideClick=new U;constructor(){let e=f(dt),r=f(qe),i=f(RC,{optional:!0}),o=f(Ig,{optional:!0});this.usePopover=o?.usePopover===!1?null:"global",this._templatePortal=new ho(e,r),this.scrollStrategy=this._scrollStrategyFactory(),i&&this._assignConfig(i)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef?.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef?.updateSize({width:this._getWidth(),minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this.attachOverlay():this.detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=Ok);let e=this._overlayRef=Sg(this._injector,this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(r=>{this.overlayKeydown.next(r),r.keyCode===27&&!this.disableClose&&!vu(r)&&(r.preventDefault(),this.detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(r=>{let i=this._getOriginElement(),o=Je(r);(!i||i!==o&&!i.contains(o))&&this.overlayOutsideClick.next(r)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),r=new sa({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation,usePopover:!!this.usePopover});return(this.height||this.height===0)&&(r.height=this.height),(this.minWidth||this.minWidth===0)&&(r.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(r.minHeight=this.minHeight),this.backdropClass&&(r.backdropClass=this.backdropClass),this.panelClass&&(r.panelClass=this.panelClass),r}_updatePositionStrategy(e){let r=this.positions.map(i=>({originX:i.originX,originY:i.originY,overlayX:i.overlayX,overlayY:i.overlayY,offsetX:i.offsetX||this.offsetX,offsetY:i.offsetY||this.offsetY,panelClass:i.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(r).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector).withPopoverLocation(this.usePopover===null?"global":this.usePopover)}_createPositionStrategy(){let e=Cg(this._injector,this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof _g?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof _g?this.origin.elementRef.nativeElement:this.origin instanceof z?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_getWidth(){return this.width?this.width:this.matchWidth?this._getOriginElement()?.getBoundingClientRect?.().width:void 0}attachOverlay(){this._overlayRef||this._createOverlay();let e=this._overlayRef;e.getConfig().hasBackdrop=this.hasBackdrop,e.updateSize({width:this._getWidth()}),e.hasAttached()||e.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=e.backdropClick().subscribe(r=>this.backdropClick.emit(r)):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(Wd(()=>this.positionChange.observers.length>0)).subscribe(r=>{this._ngZone.run(()=>this.positionChange.emit(r)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()})),this.open=!0}detachOverlay(){this._overlayRef?.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.open=!1}_assignConfig(e){this.origin=e.origin??this.origin,this.positions=e.positions??this.positions,this.positionStrategy=e.positionStrategy??this.positionStrategy,this.offsetX=e.offsetX??this.offsetX,this.offsetY=e.offsetY??this.offsetY,this.width=e.width??this.width,this.height=e.height??this.height,this.minWidth=e.minWidth??this.minWidth,this.minHeight=e.minHeight??this.minHeight,this.backdropClass=e.backdropClass??this.backdropClass,this.panelClass=e.panelClass??this.panelClass,this.viewportMargin=e.viewportMargin??this.viewportMargin,this.scrollStrategy=e.scrollStrategy??this.scrollStrategy,this.disableClose=e.disableClose??this.disableClose,this.transformOriginSelector=e.transformOriginSelector??this.transformOriginSelector,this.hasBackdrop=e.hasBackdrop??this.hasBackdrop,this.lockPosition=e.lockPosition??this.lockPosition,this.flexibleDimensions=e.flexibleDimensions??this.flexibleDimensions,this.growAfterOpen=e.growAfterOpen??this.growAfterOpen,this.push=e.push??this.push,this.disposeOnNavigation=e.disposeOnNavigation??this.disposeOnNavigation,this.usePopover=e.usePopover??this.usePopover,this.matchWidth=e.matchWidth??this.matchWidth}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",ue],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",ue],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",ue],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",ue],push:[2,"cdkConnectedOverlayPush","push",ue],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",ue],usePopover:[0,"cdkConnectedOverlayUsePopover","usePopover"],matchWidth:[2,"cdkConnectedOverlayMatchWidth","matchWidth",ue],_config:[0,"cdkConnectedOverlay","_config"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[Re]})}return t})(),Pk=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({providers:[AC],imports:[zn,hC,mg,mg]})}return t})();var UC=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,r){this._renderer=e,this._elementRef=r}setProperty(e,r){this._renderer.setProperty(this._elementRef.nativeElement,e,r)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(r){return new(r||t)(D(Oe),D(z))};static \u0275dir=M({type:t})}return t})(),$u=(()=>{class t extends UC{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275dir=M({type:t,features:[J]})}return t})(),di=new y("");var Lk={provide:di,useExisting:be(()=>HC),multi:!0};function jk(){let t=mt()?mt().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var Vk=new y(""),HC=(()=>{class t extends UC{_compositionMode;_composing=!1;constructor(e,r,i){super(e,r),this._compositionMode=i,this._compositionMode==null&&(this._compositionMode=!jk())}writeValue(e){let r=e??"";this.setProperty("value",r)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(r){return new(r||t)(D(Oe),D(z),D(Vk,8))};static \u0275dir=M({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,i){r&1&&Zt("input",function(s){return i._handleInput(s.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(s){return i._compositionEnd(s.target.value)})},standalone:!1,features:[we([Lk]),J]})}return t})();function Ag(t){return t==null||Rg(t)===0}function Rg(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var Dn=new y(""),fi=new y(""),Bk=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,NC=class{static min(n){return $C(n)}static max(n){return zC(n)}static required(n){return GC(n)}static requiredTrue(n){return Uk(n)}static email(n){return Hk(n)}static minLength(n){return $k(n)}static maxLength(n){return zk(n)}static pattern(n){return Gk(n)}static nullValidator(n){return ku()}static compose(n){return QC(n)}static composeAsync(n){return XC(n)}};function $C(t){return n=>{if(n.value==null||t==null)return null;let e=parseFloat(n.value);return!isNaN(e)&&e{if(n.value==null||t==null)return null;let e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}function GC(t){return Ag(t.value)?{required:!0}:null}function Uk(t){return t.value===!0?null:{required:!0}}function Hk(t){return Ag(t.value)||Bk.test(t.value)?null:{email:!0}}function $k(t){return n=>{let e=n.value?.length??Rg(n.value);return e===null||e===0?null:e{let e=n.value?.length??Rg(n.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function Gk(t){if(!t)return ku;let n,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),r=>{if(Ag(r.value))return null;let i=r.value;return n.test(i)?null:{pattern:{requiredPattern:e,actualValue:i}}}}function ku(t){return null}function WC(t){return t!=null}function qC(t){return jn(t)?se(t):t}function YC(t){let n={};return t.forEach(e=>{n=e!=null?g(g({},n),e):n}),Object.keys(n).length===0?null:n}function ZC(t,n){return n.map(e=>e(t))}function Wk(t){return!t.validate}function KC(t){return t.map(n=>Wk(n)?n:e=>n.validate(e))}function QC(t){if(!t)return null;let n=t.filter(WC);return n.length==0?null:function(e){return YC(ZC(e,n))}}function Ng(t){return t!=null?QC(KC(t)):null}function XC(t){if(!t)return null;let n=t.filter(WC);return n.length==0?null:function(e){let r=ZC(e,n).map(qC);return Vd(r).pipe(H(YC))}}function Og(t){return t!=null?XC(KC(t)):null}function OC(t,n){return t===null?[n]:Array.isArray(t)?[...t,n]:[t,n]}function JC(t){return t._rawValidators}function eI(t){return t._rawAsyncValidators}function Mg(t){return t?Array.isArray(t)?t:[t]:[]}function Fu(t,n){return Array.isArray(t)?t.includes(n):t===n}function kC(t,n){let e=Mg(n);return Mg(t).forEach(i=>{Fu(e,i)||e.push(i)}),e}function FC(t,n){return Mg(n).filter(e=>!Fu(t,e))}var Pu=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=Ng(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=Og(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control?.reset(n)}hasError(n,e){return this.control?this.control.hasError(n,e):!1}getError(n,e){return this.control?this.control.getError(n,e):null}},et=class extends Pu{name;get formDirective(){return null}get path(){return null}},Gn=class extends Pu{_parent=null;name=null;valueAccessor=null},Lu=class{_cd;constructor(n){this._cd=n}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var FQ=(()=>{class t extends Lu{constructor(e){super(e)}static \u0275fac=function(r){return new(r||t)(D(Gn,2))};static \u0275dir=M({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,i){r&2&&Xe("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},standalone:!1,features:[J]})}return t})(),PQ=(()=>{class t extends Lu{constructor(e){super(e)}static \u0275fac=function(r){return new(r||t)(D(et,10))};static \u0275dir=M({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,i){r&2&&Xe("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},standalone:!1,features:[J]})}return t})();var aa="VALID",Ou="INVALID",po="PENDING",ca="DISABLED",gr=class{},ju=class extends gr{value;source;constructor(n,e){super(),this.value=n,this.source=e}},ua=class extends gr{pristine;source;constructor(n,e){super(),this.pristine=n,this.source=e}},da=class extends gr{touched;source;constructor(n,e){super(),this.touched=n,this.source=e}},mo=class extends gr{status;source;constructor(n,e){super(),this.status=n,this.source=e}},Vu=class extends gr{source;constructor(n){super(),this.source=n}},fa=class extends gr{source;constructor(n){super(),this.source=n}};function kg(t){return(zu(t)?t.validators:t)||null}function qk(t){return Array.isArray(t)?Ng(t):t||null}function Fg(t,n){return(zu(n)?n.asyncValidators:t)||null}function Yk(t){return Array.isArray(t)?Og(t):t||null}function zu(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function tI(t,n,e){let r=t.controls;if(!(n?Object.keys(r):r).length)throw new b(1e3,"");if(!r[e])throw new b(1001,"")}function nI(t,n,e){t._forEachChild((r,i)=>{if(e[i]===void 0)throw new b(1002,"")})}var vo=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(n,e){this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get status(){return q(this.statusReactive)}set status(n){q(()=>this.statusReactive.set(n))}_status=Kt(()=>this.statusReactive());statusReactive=W(void 0);get valid(){return this.status===aa}get invalid(){return this.status===Ou}get pending(){return this.status==po}get disabled(){return this.status===ca}get enabled(){return this.status!==ca}errors;get pristine(){return q(this.pristineReactive)}set pristine(n){q(()=>this.pristineReactive.set(n))}_pristine=Kt(()=>this.pristineReactive());pristineReactive=W(!0);get dirty(){return!this.pristine}get touched(){return q(this.touchedReactive)}set touched(n){q(()=>this.touchedReactive.set(n))}_touched=Kt(()=>this.touchedReactive());touchedReactive=W(!1);get untouched(){return!this.touched}_events=new S;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(kC(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(kC(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(FC(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(FC(n,this._rawAsyncValidators))}hasValidator(n){return Fu(this._rawValidators,n)}hasAsyncValidator(n){return Fu(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){let e=this.touched===!1;this.touched=!0;let r=n.sourceControl??this;n.onlySelf||this._parent?.markAsTouched(F(g({},n),{sourceControl:r})),e&&n.emitEvent!==!1&&this._events.next(new da(!0,r))}markAllAsDirty(n={}){this.markAsDirty({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(n))}markAllAsTouched(n={}){this.markAsTouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(n))}markAsUntouched(n={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let r=n.sourceControl??this;this._forEachChild(i=>{i.markAsUntouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:r})}),n.onlySelf||this._parent?._updateTouched(n,r),e&&n.emitEvent!==!1&&this._events.next(new da(!1,r))}markAsDirty(n={}){let e=this.pristine===!0;this.pristine=!1;let r=n.sourceControl??this;n.onlySelf||this._parent?.markAsDirty(F(g({},n),{sourceControl:r})),e&&n.emitEvent!==!1&&this._events.next(new ua(!1,r))}markAsPristine(n={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let r=n.sourceControl??this;this._forEachChild(i=>{i.markAsPristine({onlySelf:!0,emitEvent:n.emitEvent})}),n.onlySelf||this._parent?._updatePristine(n,r),e&&n.emitEvent!==!1&&this._events.next(new ua(!0,r))}markAsPending(n={}){this.status=po;let e=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new mo(this.status,e)),this.statusChanges.emit(this.status)),n.onlySelf||this._parent?.markAsPending(F(g({},n),{sourceControl:e}))}disable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=ca,this.errors=null,this._forEachChild(i=>{i.disable(F(g({},n),{onlySelf:!0}))}),this._updateValue();let r=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new ju(this.value,r)),this._events.next(new mo(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(F(g({},n),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){let e=this._parentMarkedDirty(n.onlySelf);this.status=aa,this._forEachChild(r=>{r.enable(F(g({},n),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors(F(g({},n),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n,e){n.onlySelf||(this._parent?.updateValueAndValidity(n),n.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===aa||this.status===po)&&this._runAsyncValidator(r,n.emitEvent)}let e=n.sourceControl??this;n.emitEvent!==!1&&(this._events.next(new ju(this.value,e)),this._events.next(new mo(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),n.onlySelf||this._parent?.updateValueAndValidity(F(g({},n),{sourceControl:e}))}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ca:aa}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n,e){if(this.asyncValidator){this.status=po,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:n!==!1};let r=qC(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:e,shouldHaveEmitted:n})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let n=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,n}return!1}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(n){let e=n;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((r,i)=>r&&r._find(i),this)}getError(n,e){let r=e?this.get(e):this;return r?.errors?r.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n,e,r){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),(n||r)&&this._events.next(new mo(this.status,e)),this._parent&&this._parent._updateControlsErrors(n,e,r)}_initObservables(){this.valueChanges=new U,this.statusChanges=new U}_calculateStatus(){return this._allControlsDisabled()?ca:this.errors?Ou:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(po)?po:this._anyControlsHaveStatus(Ou)?Ou:aa}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n,e){let r=!this._anyControlsDirty(),i=this.pristine!==r;this.pristine=r,n.onlySelf||this._parent?._updatePristine(n,e),i&&this._events.next(new ua(this.pristine,e))}_updateTouched(n={},e){this.touched=this._anyControlsTouched(),this._events.next(new da(this.touched,e)),n.onlySelf||this._parent?._updateTouched(n,e)}_onDisabledChange=[];_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){zu(n)&&n.updateOn!=null&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=qk(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=Yk(this._rawAsyncValidators)}},ui=class extends vo{constructor(n,e,r){super(kg(e),Fg(r,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,r={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,r={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){nI(this,!0,n),Object.keys(n).forEach(r=>{tI(this,!0,r),this.controls[r].setValue(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){n!=null&&(Object.keys(n).forEach(r=>{let i=this.controls[r];i&&i.patchValue(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((r,i)=>{r.reset(n?n[i]:null,F(g({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new fa(this))}getRawValue(){return this._reduceChildren({},(n,e,r)=>(n[r]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,r)=>r._syncPendingControls()?!0:e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{let r=this.controls[e];r&&n(r,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(let[e,r]of Object.entries(this.controls))if(this.contains(e)&&n(r))return!0;return!1}_reduceValue(){let n={};return this._reduceChildren(n,(e,r,i)=>((r.enabled||this.disabled)&&(e[i]=r.value),e))}_reduceChildren(n,e){let r=n;return this._forEachChild((i,o)=>{r=e(r,i,o)}),r}_allControlsDisabled(){for(let n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}};var LQ=ui;var Tg=class extends ui{};var yo=new y("",{factory:()=>Gu}),Gu="always";function Wu(t,n){return[...n.path,t]}function ha(t,n,e=Gu){Pg(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&n.valueAccessor.setDisabledState?.(t.disabled),Kk(t,n),Xk(t,n),Qk(t,n),Zk(t,n)}function Bu(t,n,e=!0){let r=()=>{};n?.valueAccessor?.registerOnChange(r),n?.valueAccessor?.registerOnTouched(r),Hu(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function Uu(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function Zk(t,n){if(n.valueAccessor.setDisabledState){let e=r=>{n.valueAccessor.setDisabledState(r)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function Pg(t,n){let e=JC(t);n.validator!==null?t.setValidators(OC(e,n.validator)):typeof e=="function"&&t.setValidators([e]);let r=eI(t);n.asyncValidator!==null?t.setAsyncValidators(OC(r,n.asyncValidator)):typeof r=="function"&&t.setAsyncValidators([r]);let i=()=>t.updateValueAndValidity();Uu(n._rawValidators,i),Uu(n._rawAsyncValidators,i)}function Hu(t,n){let e=!1;if(t!==null){if(n.validator!==null){let i=JC(t);if(Array.isArray(i)&&i.length>0){let o=i.filter(s=>s!==n.validator);o.length!==i.length&&(e=!0,t.setValidators(o))}}if(n.asyncValidator!==null){let i=eI(t);if(Array.isArray(i)&&i.length>0){let o=i.filter(s=>s!==n.asyncValidator);o.length!==i.length&&(e=!0,t.setAsyncValidators(o))}}}let r=()=>{};return Uu(n._rawValidators,r),Uu(n._rawAsyncValidators,r),e}function Kk(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&rI(t,n)})}function Qk(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&rI(t,n),t.updateOn!=="submit"&&t.markAsTouched()})}function rI(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Xk(t,n){let e=(r,i)=>{n.valueAccessor.writeValue(r),i&&n.viewToModelUpdate(r)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function iI(t,n){t==null,Pg(t,n)}function Jk(t,n){return Hu(t,n)}function Lg(t,n){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(n,e.currentValue)}function eF(t){return Object.getPrototypeOf(t.constructor)===$u}function oI(t,n){t._syncPendingControls(),n.forEach(e=>{let r=e.control;r.updateOn==="submit"&&r._pendingChange&&(e.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}function jg(t,n){if(!n)return null;Array.isArray(n);let e,r,i;return n.forEach(o=>{o.constructor===HC?e=o:eF(o)?r=o:i=o}),i||r||e||null}function tF(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}var nF={provide:et,useExisting:be(()=>rF)},la=Promise.resolve(),rF=(()=>{class t extends et{callSetDisabledState;get submitted(){return q(this.submittedReactive)}_submitted=Kt(()=>this.submittedReactive());submittedReactive=W(!1);_directives=new Set;form;ngSubmit=new U;options;constructor(e,r,i){super(),this.callSetDisabledState=i,this.form=new ui({},Ng(e),Og(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){la.then(()=>{let r=this._findContainer(e.path);e.control=r.registerControl(e.name,e.control),ha(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){la.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){la.then(()=>{let r=this._findContainer(e.path),i=new ui({});iI(i,e),r.registerControl(e.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){la.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,r){la.then(()=>{this.form.get(e.path).setValue(r)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),oI(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new Vu(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(r){return new(r||t)(D(Dn,10),D(fi,10),D(yo,8))};static \u0275dir=M({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,i){r&1&&Zt("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[we([nF]),J]})}return t})();function PC(t,n){let e=t.indexOf(n);e>-1&&t.splice(e,1)}function LC(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var go=class extends vo{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(n=null,e,r){super(kg(e),Fg(r,e)),this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),zu(e)&&(e.nonNullable||e.initialValueIsDefault)&&(LC(n)?this.defaultValue=n.value:this.defaultValue=n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new fa(this))}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){PC(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){PC(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(n){LC(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}},VQ=go,iF=t=>t instanceof go,oF=(()=>{class t extends et{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective?.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Wu(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275dir=M({type:t,standalone:!1,features:[J]})}return t})();var sF={provide:Gn,useExisting:be(()=>aF)},jC=Promise.resolve(),aF=(()=>{class t extends Gn{_changeDetectorRef;callSetDisabledState;control=new go;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new U;constructor(e,r,i,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=e,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=jg(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let r=e.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Lg(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){ha(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){jC.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let r=e.isDisabled.currentValue,i=r!==0&&ue(r);jC.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Wu(e,this._parent):[e]}static \u0275fac=function(r){return new(r||t)(D(et,9),D(Dn,10),D(fi,10),D(di,10),D(St,8),D(yo,8))};static \u0275dir=M({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[we([sF]),J,Re]})}return t})();var BQ=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),cF={provide:di,useExisting:be(()=>lF),multi:!0},lF=(()=>{class t extends $u{writeValue(e){let r=e??"";this.setProperty("value",r)}registerOnChange(e){this.onChange=r=>{e(r==""?null:parseFloat(r))}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275dir=M({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(r,i){r&1&&Zt("input",function(s){return i.onChange(s.target.value)})("blur",function(){return i.onTouched()})},standalone:!1,features:[we([cF]),J]})}return t})();var xg=class extends vo{constructor(n,e,r){super(kg(e),Fg(r,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){Array.isArray(n)?n.forEach(r=>{this.controls.push(r),this._registerControl(r)}):(this.controls.push(n),this._registerControl(n)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,r={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(n,e={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,r={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),e&&(this.controls.splice(i,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){nI(this,!1,n),n.forEach((r,i)=>{tI(this,!1,i),this.at(i).setValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){n!=null&&(n.forEach((r,i)=>{this.at(i)&&this.at(i).patchValue(r,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((r,i)=>{r.reset(n[i],F(g({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new fa(this))}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,r)=>r._syncPendingControls()?!0:e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,r)=>{n(e,r)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(let n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}};var sI=(()=>{class t extends et{callSetDisabledState;get submitted(){return q(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=Kt(()=>this._submittedReactive());_submittedReactive=W(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,r,i){super(),this.callSetDisabledState=i,this._setValidators(e),this._setAsyncValidators(r)}ngOnChanges(e){this.onChanges(e)}ngOnDestroy(){this.onDestroy()}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(Hu(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let r=this.form.get(e.path);return ha(r,e,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),r}getControl(e){return this.form.get(e.path)}removeControl(e){Bu(e.control||null,e,!1),tF(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}updateModel(e,r){this.form.get(e.path).setValue(r)}onReset(){this.resetForm()}resetForm(e=void 0,r={}){this.form.reset(e,r),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,oI(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new Vu(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let r=e.control,i=this.form.get(e.path);r!==i&&(Bu(r||null,e),iF(i)&&(ha(i,e,this.callSetDisabledState),e.control=i))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let r=this.form.get(e.path);iI(r,e),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){let r=this.form?.get(e.path);r&&Jk(r,e)&&r.updateValueAndValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{})}_updateValidators(){Pg(this.form,this),this._oldForm&&Hu(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(r){return new(r||t)(D(Dn,10),D(fi,10),D(yo,8))};static \u0275dir=M({type:t,features:[J,Re]})}return t})();var Vg=new y(""),uF={provide:Gn,useExisting:be(()=>dF)},dF=(()=>{class t extends Gn{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new U;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,r,i,o,s){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=s,this._setValidators(e),this._setAsyncValidators(r),this.valueAccessor=jg(this,i)}ngOnChanges(e){if(this._isControlChanged(e)){let r=e.form.previousValue;r&&Bu(r,this,!1),ha(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Lg(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Bu(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(r){return new(r||t)(D(Dn,10),D(fi,10),D(di,10),D(Vg,8),D(yo,8))};static \u0275dir=M({type:t,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[we([uF]),J,Re]})}return t})(),fF={provide:et,useExisting:be(()=>aI)},aI=(()=>{class t extends oF{name=null;constructor(e,r,i){super(),this._parent=e,this._setValidators(r),this._setAsyncValidators(i)}_checkParentType(){lI(this._parent)}static \u0275fac=function(r){return new(r||t)(D(et,13),D(Dn,10),D(fi,10))};static \u0275dir=M({type:t,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[we([fF]),J]})}return t})(),hF={provide:et,useExisting:be(()=>cI)},cI=(()=>{class t extends et{_parent;name=null;constructor(e,r,i){super(),this._parent=e,this._setValidators(r),this._setAsyncValidators(i)}ngOnInit(){lI(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return Wu(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(r){return new(r||t)(D(et,13),D(Dn,10),D(fi,10))};static \u0275dir=M({type:t,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[we([hF]),J]})}return t})();function lI(t){return!(t instanceof aI)&&!(t instanceof sI)&&!(t instanceof cI)}var pF={provide:Gn,useExisting:be(()=>mF)},mF=(()=>{class t extends Gn{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new U;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,r,i,o,s){super(),this._ngModelWarningConfig=s,this._parent=e,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=jg(this,o)}ngOnChanges(e){this._added||this._setUpControl(),Lg(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective?.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Wu(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(r){return new(r||t)(D(et,13),D(Dn,10),D(fi,10),D(di,10),D(Vg,8))};static \u0275dir=M({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[we([pF]),J,Re]})}return t})();var gF={provide:et,useExisting:be(()=>vF)},vF=(()=>{class t extends sI{form=null;ngSubmit=new U;get control(){return this.form}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275dir=M({type:t,selectors:[["","formGroup",""]],hostBindings:function(r,i){r&1&&Zt("submit",function(s){return i.onSubmit(s)})("reset",function(){return i.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[we([gF]),J]})}return t})(),yF={provide:di,useExisting:be(()=>dI),multi:!0};function uI(t,n){return t==null?`${n}`:(n&&typeof n=="object"&&(n="Object"),`${t}: ${n}`.slice(0,50))}function bF(t){return t.split(":")[0]}var dI=(()=>{class t extends $u{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=f(He).injector;destroyRef=f(Ae);cdr=f(St);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,ht({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let r=this._getOptionId(e),i=uI(r,e);this.setProperty("value",i)}registerOnChange(e){this.onChange=r=>{this.value=this._getOptionValue(r),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),e))return r;return null}_getOptionValue(e){let r=bF(e);return this._optionMap.has(r)?this._optionMap.get(r):e}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275dir=M({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,i){r&1&&Zt("change",function(s){return i.onChange(s.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[we([yF]),J]})}return t})(),UQ=(()=>{class t{_element;_renderer;_select;id;constructor(e,r,i){this._element=e,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(uI(this.id,e)),this._select._writeValueAfterRender())}set value(e){this._setElementValue(e),this._select?._writeValueAfterRender()}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(r){return new(r||t)(D(z),D(Oe),D(dI,9))};static \u0275dir=M({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return t})(),_F={provide:di,useExisting:be(()=>fI),multi:!0};function VC(t,n){return t==null?`${n}`:(typeof n=="string"&&(n=`'${n}'`),n&&typeof n=="object"&&(n="Object"),`${t}: ${n}`.slice(0,50))}function DF(t){return t.split(":")[0]}var fI=(()=>{class t extends $u{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let r;if(Array.isArray(e)){let i=e.map(o=>this._getOptionId(o));r=(o,s)=>{o._setSelected(i.indexOf(s.toString())>-1)}}else r=(i,o)=>{i._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(e){this.onChange=r=>{let i=[],o=r.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275dir=M({type:t,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,i){r&1&&Zt("change",function(s){return i.onChange(s.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[we([_F]),J]})}return t})(),HQ=(()=>{class t{_element;_renderer;_select;id;_value;constructor(e,r,i){this._element=e,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(VC(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(VC(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(r){return new(r||t)(D(z),D(Oe),D(fI,9))};static \u0275dir=M({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return t})();function hI(t){return typeof t=="number"?t:parseFloat(t)}var Bg=(()=>{class t{_validator=ku;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let r=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):ku,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,features:[Re]})}return t})(),EF={provide:Dn,useExisting:be(()=>wF),multi:!0},wF=(()=>{class t extends Bg{max;inputName="max";normalizeInput=e=>hI(e);createValidator=e=>zC(e);static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275dir=M({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(r,i){r&2&&Yt("max",i._enabled?i.max:null)},inputs:{max:"max"},standalone:!1,features:[we([EF]),J]})}return t})(),CF={provide:Dn,useExisting:be(()=>IF),multi:!0},IF=(()=>{class t extends Bg{min;inputName="min";normalizeInput=e=>hI(e);createValidator=e=>$C(e);static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275dir=M({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(r,i){r&2&&Yt("min",i._enabled?i.min:null)},inputs:{min:"min"},standalone:!1,features:[we([CF]),J]})}return t})(),SF={provide:Dn,useExisting:be(()=>MF),multi:!0};var MF=(()=>{class t extends Bg{required;inputName="required";normalizeInput=ue;createValidator=e=>GC;enabled(e){return e}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275dir=M({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(r,i){r&2&&Yt("required",i._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[we([SF]),J]})}return t})();var pI=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({})}return t})();function BC(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var TF=(()=>{class t{useNonNullable=!1;get nonNullable(){let e=new t;return e.useNonNullable=!0,e}group(e,r=null){let i=this._reduceControls(e),o={};return BC(r)?o=r:r!==null&&(o.validators=r.validator,o.asyncValidators=r.asyncValidator),new ui(i,o)}record(e,r=null){let i=this._reduceControls(e);return new Tg(i,r)}control(e,r,i){let o={};return this.useNonNullable?(BC(r)?o=r:(o.validators=r,o.asyncValidators=i),new go(e,F(g({},o),{nonNullable:!0}))):new go(e,r,i)}array(e,r,i){let o=e.map(s=>this._createControl(s));return new xg(o,r,i)}_reduceControls(e){let r={};return Object.keys(e).forEach(i=>{r[i]=this._createControl(e[i])}),r}_createControl(e){if(e instanceof go)return e;if(e instanceof vo)return e;if(Array.isArray(e)){let r=e[0],i=e.length>1?e[1]:null,o=e.length>2?e[2]:null;return this.control(r,i,o)}else return this.control(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var $Q=(()=>{class t extends TF{group(e,r=null){return super.group(e,r)}control(e,r,i){return super.control(e,r,i)}array(e,r,i){return super.array(e,r,i)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),zQ=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:yo,useValue:e.callSetDisabledState??Gu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({imports:[pI]})}return t})(),GQ=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Vg,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:yo,useValue:e.callSetDisabledState??Gu}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({imports:[pI]})}return t})();var V="primary",Sa=Symbol("RouteTitle"),Gg=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function pi(t){return new Gg(t)}function Ug(t,n,e){for(let r=0;rt.length||e.pathMatch==="full"&&(n.hasChildren()||r.lengtht.length||e.pathMatch==="full"&&n.hasChildren()&&e.path!=="**")return null;let a={};return!Ug(o,t.slice(0,o.length),a)||!Ug(s,t.slice(t.length-s.length),a)?null:{consumed:t,posParams:a}}function Xu(t){return new Promise((n,e)=>{t.pipe(Sn()).subscribe({next:r=>n(r),error:r=>e(r)})})}function xF(t,n){if(t.length!==n.length)return!1;for(let e=0;er[o]===i)}else return t===n}function AF(t){return t.length>0?t[t.length-1]:null}function gi(t){return Ft(t)?t:jn(t)?se(Promise.resolve(t)):T(t)}function wI(t){return Ft(t)?Xu(t):Promise.resolve(t)}var RF={exact:II,subset:SI},CI={exact:NF,subset:OF,ignored:()=>!0},sv={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},ya={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function av(t,n,e){let r=t instanceof tt?t:n.parseUrl(t);return Kt(()=>qg(n.lastSuccessfulNavigation()?.finalUrl??new tt,r,g(g({},ya),e)))}function qg(t,n,e){return RF[e.paths](t.root,n.root,e.matrixParams)&&CI[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function NF(t,n){return En(t,n)}function II(t,n,e){if(!hi(t.segments,n.segments)||!Zu(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!II(t.children[r],n.children[r],e))return!1;return!0}function OF(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>EI(t[e],n[e]))}function SI(t,n,e){return MI(t,n,n.segments,e)}function MI(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!hi(i,e)||n.hasChildren()||!Zu(i,e,r))}else if(t.segments.length===e.length){if(!hi(t.segments,e)||!Zu(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!SI(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!hi(t.segments,i)||!Zu(t.segments,i,r)||!t.children[V]?!1:MI(t.children[V],n,o,r)}}function Zu(t,n,e){return n.every((r,i)=>CI[e](t[i].parameters,r.parameters))}var tt=class{root;queryParams;fragment;_queryParamMap;constructor(n=new te([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=pi(this.queryParams),this._queryParamMap}toString(){return PF.serialize(this)}},te=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Ku(this)}},vr=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=pi(this.parameters),this._parameterMap}toString(){return xI(this)}};function kF(t,n){return hi(t,n)&&t.every((e,r)=>En(e.parameters,n[r].parameters))}function hi(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function FF(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===V&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==V&&(e=e.concat(n(i,r)))}),e}var _r=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:()=>new qn,providedIn:"root"})}return t})(),qn=class{parse(n){let e=new Zg(n);return new tt(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${pa(n.root,!0)}`,r=VF(n.queryParams),i=typeof n.fragment=="string"?`#${LF(n.fragment)}`:"";return`${e}${r}${i}`}},PF=new qn;function Ku(t){return t.segments.map(n=>xI(n)).join("/")}function pa(t,n){if(!t.hasChildren())return Ku(t);if(n){let e=t.children[V]?pa(t.children[V],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==V&&r.push(`${i}:${pa(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=FF(t,(r,i)=>i===V?[pa(t.children[V],!1)]:[`${i}:${pa(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[V]!=null?`${Ku(t)}/${e[0]}`:`${Ku(t)}/(${e.join("//")})`}}function TI(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function qu(t){return TI(t).replace(/%3B/gi,";")}function LF(t){return encodeURI(t)}function Yg(t){return TI(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Qu(t){return decodeURIComponent(t)}function mI(t){return Qu(t.replace(/\+/g,"%20"))}function xI(t){return`${Yg(t.path)}${jF(t.parameters)}`}function jF(t){return Object.entries(t).map(([n,e])=>`;${Yg(n)}=${Yg(e)}`).join("")}function VF(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${qu(e)}=${qu(i)}`).join("&"):`${qu(e)}=${qu(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var BF=/^[^\/()?;#]+/;function Hg(t){let n=t.match(BF);return n?n[0]:""}var UF=/^[^\/()?;=#]+/;function HF(t){let n=t.match(UF);return n?n[0]:""}var $F=/^[^=?&#]+/;function zF(t){let n=t.match($F);return n?n[0]:""}var GF=/^[^&#]+/;function WF(t){let n=t.match(GF);return n?n[0]:""}var Zg=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new te([],{}):new te([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(n=0){if(n>50)throw new b(4010,!1);if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0,n));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1,n)),(e.length>0||Object.keys(r).length>0)&&(i[V]=new te(e,r)),i}parseSegment(){let n=Hg(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new b(4009,!1);return this.capture(n),new vr(Qu(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=HF(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=Hg(this.remaining);i&&(r=i,this.capture(r))}n[Qu(e)]=Qu(r)}parseQueryParam(n){let e=zF(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=WF(this.remaining);s&&(r=s,this.capture(r))}let i=mI(e),o=mI(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n,e){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=Hg(this.remaining),o=this.remaining[i.length];if(o!=="/"&&o!==")"&&o!==";")throw new b(4010,!1);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):n&&(s=V);let a=this.parseChildren(e+1);r[s??V]=Object.keys(a).length===1&&a[V]?a[V]:new te([],a),this.consumeOptional("//")}return r}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new b(4011,!1)}};function AI(t){return t.segments.length>0?new te([],{[V]:t}):t}function RI(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=RI(i);if(r===V&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new te(t.segments,n);return qF(e)}function qF(t){if(t.numberOfChildren===1&&t.children[V]){let n=t.children[V];return new te(t.segments.concat(n.segments),n.children)}return t}function yr(t){return t instanceof tt}function NI(t,n,e=null,r=null,i=new qn){let o=OI(t);return kI(o,n,e,r,i)}function OI(t){let n;function e(o){let s={};for(let c of o.children){let l=e(c);s[c.outlet]=l}let a=new te(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=AI(r);return n??i}function kI(t,n,e,r,i){let o=t;for(;o.parent;)o=o.parent;if(n.length===0)return $g(o,o,o,e,r,i);let s=YF(n);if(s.toRoot())return $g(o,o,new te([],{}),e,r,i);let a=ZF(s,o,t),c=a.processChildren?ga(a.segmentGroup,a.index,s.commands):PI(a.segmentGroup,a.index,s.commands);return $g(o,a.segmentGroup,c,e,r,i)}function Ju(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function ba(t){return typeof t=="object"&&t!=null&&t.outlets}function gI(t,n,e){t||="\u0275";let r=new tt;return r.queryParams={[t]:n},e.parse(e.serialize(r)).queryParams[t]}function $g(t,n,e,r,i,o){let s={};for(let[l,u]of Object.entries(r??{}))s[l]=Array.isArray(u)?u.map(d=>gI(l,d,o)):gI(l,u,o);let a;t===n?a=e:a=FI(t,n,e);let c=AI(RI(a));return new tt(c,s,i)}function FI(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=FI(o,n,e)}),new te(t.segments,r)}var ed=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&Ju(r[0]))throw new b(4003,!1);let i=r.find(ba);if(i&&i!==AF(r))throw new b(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function YF(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new ed(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,l])=>{a[c]=typeof l=="string"?l.split("/"):l}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new ed(e,n,r)}var _o=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function ZF(t,n,e){if(t.isAbsolute)return new _o(n,!0,0);if(!e)return new _o(n,!1,NaN);if(e.parent===null)return new _o(e,!0,0);let r=Ju(t.commands[0])?0:1,i=e.segments.length-1+r;return KF(e,i,t.numberOfDoubleDots)}function KF(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new b(4005,!1);i=r.segments.length}return new _o(r,!1,i-o)}function QF(t){return ba(t[0])?t[0].outlets:{[V]:t}}function PI(t,n,e){if(t??=new te([],{}),t.segments.length===0&&t.hasChildren())return ga(t,n,e);let r=XF(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndexo!==V)&&t.children[V]&&t.numberOfChildren===1&&t.children[V].segments.length===0){let o=ga(t.children[V],n,e);return new te(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=PI(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new te(t.segments,i)}}function XF(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i=e.length)return o;let s=t.segments[i],a=e[r];if(ba(a))break;let c=`${a}`,l=r0&&c===void 0)break;if(c&&l&&typeof l=="object"&&l.outlets===void 0){if(!yI(c,l,s))return o;r+=2}else{if(!yI(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Kg(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Kg(new te([],{}),0,r))}),n}function vI(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function yI(t,n,e){return t==e.path&&En(n,e.parameters)}var Do="imperative",Fe=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(Fe||{}),vt=class{id;url;constructor(n,e){this.id=n,this.url=e}},br=class extends vt{type=Fe.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},yt=class extends vt{urlAfterRedirects;type=Fe.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Ze=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(Ze||{}),wo=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(wo||{}),Rt=class extends vt{reason;code;type=Fe.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function LI(t){return t instanceof Rt&&(t.code===Ze.Redirect||t.code===Ze.SupersededByNewNavigation)}var Cn=class extends vt{reason;code;type=Fe.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},mi=class extends vt{error;target;type=Fe.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},_a=class extends vt{urlAfterRedirects;state;type=Fe.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},td=class extends vt{urlAfterRedirects;state;type=Fe.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},nd=class extends vt{urlAfterRedirects;state;shouldActivate;type=Fe.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},rd=class extends vt{urlAfterRedirects;state;type=Fe.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},id=class extends vt{urlAfterRedirects;state;type=Fe.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},od=class{route;type=Fe.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},sd=class{route;type=Fe.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},ad=class{snapshot;type=Fe.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},cd=class{snapshot;type=Fe.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ld=class{snapshot;type=Fe.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ud=class{snapshot;type=Fe.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Co=class{routerEvent;position;anchor;scrollBehavior;type=Fe.Scroll;constructor(n,e,r,i){this.routerEvent=n,this.position=e,this.anchor=r,this.scrollBehavior=i}toString(){let n=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${n}')`}},Io=class{},Da=class{},So=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function eP(t){return!(t instanceof Io)&&!(t instanceof So)&&!(t instanceof Da)}var dd=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new vi(this.rootInjector)}},vi=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new dd(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(w(re))};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),fd=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=Qg(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=Qg(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Xg(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Xg(n,this._root).map(e=>e.value)}};function Qg(t,n){if(t===n.value)return n;for(let e of n.children){let r=Qg(t,e);if(r)return r}return null}function Xg(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Xg(t,e);if(r.length)return r.unshift(n),r}return[]}var gt=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function bo(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var Ea=class extends fd{snapshot;constructor(n,e){super(n),this.snapshot=e,lv(this,n)}toString(){return this.snapshot.toString()}};function jI(t,n){let e=tP(t,n),r=new Ie([new vr("",{})]),i=new Ie({}),o=new Ie({}),s=new Ie({}),a=new Ie(""),c=new Yn(r,i,s,a,o,V,t,e.root);return c.snapshot=e.root,new Ea(new gt(c,[]),e)}function tP(t,n){let e={},r={},i={},s=new Mo([],e,i,"",r,V,t,null,{},n);return new wa("",new gt(s,[]))}var Yn=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,c){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(H(l=>l[Sa]))??T(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(H(n=>pi(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(H(n=>pi(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function cv(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:g(g({},n.params),t.params),data:g(g({},n.data),t.data),resolve:g(g(g(g({},t.data),n.data),i?.data),t._resolvedData)}:r={params:g({},t.params),data:g({},t.data),resolve:g(g({},t.data),t._resolvedData??{})},i&&BI(i)&&(r.resolve[Sa]=i.title),r}var Mo=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[Sa]}constructor(n,e,r,i,o,s,a,c,l,u){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=l,this._environmentInjector=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=pi(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=pi(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},wa=class extends fd{url;constructor(n,e){super(e),this.url=n,lv(this,e)}toString(){return VI(this._root)}};function lv(t,n){n.value._routerState=t,n.children.forEach(e=>lv(t,e))}function VI(t){let n=t.children.length>0?` { ${t.children.map(VI).join(", ")} } `:"";return`${t.value}${n}`}function zg(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,En(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),En(n.params,e.params)||t.paramsSubject.next(e.params),xF(n.url,e.url)||t.urlSubject.next(e.url),En(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Jg(t,n){let e=En(t.params,n.params)&&kF(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Jg(t.parent,n.parent))}function BI(t){return typeof t.title=="string"||t.title===null}var UI=new y(""),uv=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=V;activateEvents=new U;deactivateEvents=new U;attachEvents=new U;detachEvents=new U;routerOutletData=xE();parentContexts=f(vi);location=f(qe);changeDetector=f(St);inputBinder=f(Ma,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new b(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new b(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new b(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new b(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new ev(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=M({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Re]})}return t})(),ev=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===Yn?this.route:n===vi?this.childContexts:n===UI?this.outletData:this.parent.get(n,e)}},Ma=new y(""),dv=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,i=Ii([r.queryParams,r.params,r.data]).pipe(Ue(([o,s,a],c)=>(a=g(g(g({},o),s),a),c===0?T(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=kE(r.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})(),fv=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=ke({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Rl(0,"router-outlet")},dependencies:[uv],encapsulation:2})}return t})();function hv(t){let n=t.children&&t.children.map(hv),e=n?F(g({},t),{children:n}):g({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==V&&(e.component=fv),e}function nP(t,n,e){let r=Ca(t,n._root,e?e._root:void 0);return new Ea(r,n)}function Ca(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=rP(t,n,e);return new gt(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Ca(t,a)),s}}let r=iP(n.value),i=n.children.map(o=>Ca(t,o));return new gt(r,i)}}function rP(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Ca(t,r,i);return Ca(t,r)})}function iP(t){return new Yn(new Ie(t.url),new Ie(t.params),new Ie(t.queryParams),new Ie(t.fragment),new Ie(t.data),t.outlet,t.component,t)}var To=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},HI="ngNavigationCancelingError";function hd(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=yr(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=$I(!1,Ze.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function $I(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[HI]=!0,e.cancellationCode=n,e}function oP(t){return zI(t)&&yr(t.url)}function zI(t){return!!t&&t[HI]}var tv=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),zg(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=bo(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=bo(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=bo(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=bo(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new ud(o.value.snapshot))}),n.children.length&&this.forwardEvent(new cd(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(zg(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),zg(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},pd=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},Eo=class{component;route;constructor(n,e){this.component=n,this.route=e}};function sP(t,n,e){let r=t._root,i=n?n._root:null;return ma(r,i,e,[r.value])}function aP(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function Ao(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!vf(t)?t:n.get(t):r}function ma(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=bo(n);return t.children.forEach(s=>{cP(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>va(a,e.getContext(s),i)),i}function cP(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=lP(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new pd(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?ma(t,n,a?a.children:null,r,i):ma(t,n,e,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new Eo(a.outlet.component,s))}else s&&va(n,a,i),i.canActivateChecks.push(new pd(r)),o.component?ma(t,null,a?a.children:null,r,i):ma(t,null,e,r,i);return i}function lP(t,n,e){if(typeof e=="function")return xe(n._environmentInjector,()=>e(t,n));switch(e){case"pathParamsChange":return!hi(t.url,n.url);case"pathParamsOrQueryParamsChange":return!hi(t.url,n.url)||!En(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Jg(t,n)||!En(t.queryParams,n.queryParams);default:return!Jg(t,n)}}function va(t,n,e){let r=bo(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?va(s,n.children.getContext(o),e):va(s,null,e):va(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new Eo(n.outlet.component,i)):e.canDeactivateChecks.push(new Eo(null,i)):e.canDeactivateChecks.push(new Eo(null,i))}function Ta(t){return typeof t=="function"}function uP(t){return typeof t=="boolean"}function dP(t){return t&&Ta(t.canLoad)}function fP(t){return t&&Ta(t.canActivate)}function hP(t){return t&&Ta(t.canActivateChild)}function pP(t){return t&&Ta(t.canDeactivate)}function mP(t){return t&&Ta(t.canMatch)}function GI(t){return t instanceof In||t?.name==="EmptyError"}var Yu=Symbol("INITIAL_VALUE");function xo(){return Ue(t=>Ii(t.map(n=>n.pipe(Be(1),Rr(Yu)))).pipe(H(n=>{for(let e of n)if(e!==!0){if(e===Yu)return Yu;if(e===!1||gP(e))return e}return!0}),fe(n=>n!==Yu),Be(1)))}function gP(t){return yr(t)||t instanceof To}function WI(t){return t.aborted?T(void 0).pipe(Be(1)):new O(n=>{let e=()=>{n.next(),n.complete()};return t.addEventListener("abort",e),()=>t.removeEventListener("abort",e)})}function qI(t){return at(WI(t))}function vP(t){return ve(n=>{let{targetSnapshot:e,currentSnapshot:r,guards:{canActivateChecks:i,canDeactivateChecks:o}}=n;return o.length===0&&i.length===0?T(F(g({},n),{guardsResult:!0})):yP(o,e,r).pipe(ve(s=>s&&uP(s)?bP(e,i,t):T(s)),H(s=>F(g({},n),{guardsResult:s})))})}function yP(t,n,e){return se(t).pipe(ve(r=>CP(r.component,r.route,e,n)),Sn(r=>r!==!0,!0))}function bP(t,n,e){return se(n).pipe(Xn(r=>rn(DP(r.route.parent,e),_P(r.route,e),wP(t,r.path),EP(t,r.route))),Sn(r=>r!==!0,!0))}function _P(t,n){return t!==null&&n&&n(new ld(t)),T(!0)}function DP(t,n){return t!==null&&n&&n(new ad(t)),T(!0)}function EP(t,n){let e=n.routeConfig?n.routeConfig.canActivate:null;if(!e||e.length===0)return T(!0);let r=e.map(i=>Vo(()=>{let o=n._environmentInjector,s=Ao(i,o),a=fP(s)?s.canActivate(n,t):xe(o,()=>s(n,t));return gi(a).pipe(Sn())}));return T(r).pipe(xo())}function wP(t,n){let e=n[n.length-1],i=n.slice(0,n.length-1).reverse().map(o=>aP(o)).filter(o=>o!==null).map(o=>Vo(()=>{let s=o.guards.map(a=>{let c=o.node._environmentInjector,l=Ao(a,c),u=hP(l)?l.canActivateChild(e,t):xe(c,()=>l(e,t));return gi(u).pipe(Sn())});return T(s).pipe(xo())}));return T(i).pipe(xo())}function CP(t,n,e,r){let i=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!i||i.length===0)return T(!0);let o=i.map(s=>{let a=n._environmentInjector,c=Ao(s,a),l=pP(c)?c.canDeactivate(t,n,e,r):xe(a,()=>c(t,n,e,r));return gi(l).pipe(Sn())});return T(o).pipe(xo())}function IP(t,n,e,r,i){let o=n.canLoad;if(o===void 0||o.length===0)return T(!0);let s=o.map(a=>{let c=Ao(a,t),l=dP(c)?c.canLoad(n,e):xe(t,()=>c(n,e)),u=gi(l);return i?u.pipe(qI(i)):u});return T(s).pipe(xo(),YI(r))}function YI(t){return Ad(nt(n=>{if(typeof n!="boolean")throw hd(t,n)}),H(n=>n===!0))}function SP(t,n,e,r,i,o){let s=n.canMatch;if(!s||s.length===0)return T(!0);let a=s.map(c=>{let l=Ao(c,t),u=mP(l)?l.canMatch(n,e,i):xe(t,()=>l(n,e,i));return gi(u).pipe(qI(o))});return T(a).pipe(xo(),YI(r))}var Wn=class t extends Error{segmentGroup;constructor(n){super(),this.segmentGroup=n||null,Object.setPrototypeOf(this,t.prototype)}},Ia=class t extends Error{urlTree;constructor(n){super(),this.urlTree=n,Object.setPrototypeOf(this,t.prototype)}};function MP(t){throw new b(4e3,!1)}function TP(t){throw $I(!1,Ze.GuardRejected)}var nv=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}async lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return r;if(i.numberOfChildren>1||!i.children[V])throw MP(`${n.redirectTo}`);i=i.children[V]}}async applyRedirectCommands(n,e,r,i,o){let s=await xP(e,i,o);if(s instanceof tt)throw new Ia(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new Ia(a);return a}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new tt(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(n,c,r,i)}),new te(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new b(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function xP(t,n,e){if(typeof t=="string")return Promise.resolve(t);let r=t;return Xu(gi(xe(e,()=>r(n))))}function AP(t,n){return t.providers&&!t._injector&&(t._injector=to(t.providers,n,`Route: ${t.path}`)),t._injector??n}function wn(t){return t.outlet||V}function RP(t,n){let e=t.filter(r=>wn(r)===n);return e.push(...t.filter(r=>wn(r)!==n)),e}var rv={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function ZI(t){return{routeConfig:t.routeConfig,url:t.url,params:t.params,queryParams:t.queryParams,fragment:t.fragment,data:t.data,outlet:t.outlet,title:t.title,paramMap:t.paramMap,queryParamMap:t.queryParamMap}}function NP(t,n,e,r,i,o,s){let a=KI(t,n,e);if(!a.matched)return T(a);let c=ZI(o(a));return r=AP(n,r),SP(r,n,e,i,c,s).pipe(H(l=>l===!0?a:g({},rv)))}function KI(t,n,e){if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?g({},rv):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||DI)(e,t,n);if(!i)return g({},rv);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?g(g({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function bI(t,n,e,r){return e.length>0&&FP(t,e,r)?{segmentGroup:new te(n,kP(r,new te(e,t.children))),slicedSegments:[]}:e.length===0&&PP(t,e,r)?{segmentGroup:new te(t.segments,OP(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new te(t.segments,t.children),slicedSegments:e}}function OP(t,n,e,r){let i={};for(let o of e)if(gd(t,n,o)&&!r[wn(o)]){let s=new te([],{});i[wn(o)]=s}return g(g({},r),i)}function kP(t,n){let e={};e[V]=n;for(let r of t)if(r.path===""&&wn(r)!==V){let i=new te([],{});e[wn(r)]=i}return e}function FP(t,n,e){return e.some(r=>gd(t,n,r)&&wn(r)!==V)}function PP(t,n,e){return e.some(r=>gd(t,n,r))}function gd(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function LP(t,n,e){return n.length===0&&!t.children[e]}var iv=class{};async function jP(t,n,e,r,i,o,s="emptyOnly",a){return new ov(t,n,e,r,i,s,o,a).recognize()}var VP=31,ov=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a,c){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.abortSignal=c,this.applyRedirects=new nv(this.urlSerializer,this.urlTree)}noMatchError(n){return new b(4002,`'${n.segmentGroup}'`)}async recognize(){let n=bI(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:r}=await this.match(n),i=new gt(r,e),o=new wa("",i),s=NI(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}async match(n){let e=new Mo([],Object.freeze({}),Object.freeze(g({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),V,this.rootComponentType,null,{},this.injector);try{return{children:await this.processSegmentGroup(this.injector,this.config,n,V,e),rootSnapshot:e}}catch(r){if(r instanceof Ia)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof Wn?this.noMatchError(r):r}}async processSegmentGroup(n,e,r,i,o){if(r.segments.length===0&&r.hasChildren())return this.processChildren(n,e,r,o);let s=await this.processSegment(n,e,r,r.segments,i,!0,o);return s instanceof gt?[s]:[]}async processChildren(n,e,r,i){let o=[];for(let c of Object.keys(r.children))c==="primary"?o.unshift(c):o.push(c);let s=[];for(let c of o){let l=r.children[c],u=RP(e,c),d=await this.processSegmentGroup(n,u,l,c,i);s.push(...d)}let a=QI(s);return BP(a),a}async processSegment(n,e,r,i,o,s,a){for(let c of e)try{return await this.processSegmentAgainstRoute(c._injector??n,e,c,r,i,o,s,a)}catch(l){if(l instanceof Wn||GI(l))continue;throw l}if(LP(r,i,o))return new iv;throw new Wn(r)}async processSegmentAgainstRoute(n,e,r,i,o,s,a,c){if(wn(r)!==s&&(s===V||!gd(i,o,r)))throw new Wn(i);if(r.redirectTo===void 0)return this.matchSegmentAgainstRoute(n,i,r,o,s,c);if(this.allowRedirects&&a)return this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,c);throw new Wn(i)}async expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:c,parameters:l,consumedSegments:u,positionalParamSegments:d,remainingSegments:h}=KI(e,i,o);if(!c)throw new Wn(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>VP&&(this.allowRedirects=!1));let p=this.createSnapshot(n,i,o,l,a);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let m=await this.applyRedirects.applyRedirectCommands(u,i.redirectTo,d,ZI(p),n),_=await this.applyRedirects.lineralizeSegments(i,m);return this.processSegment(n,r,e,_.concat(h),s,!1,a)}createSnapshot(n,e,r,i,o){let s=new Mo(r,i,Object.freeze(g({},this.urlTree.queryParams)),this.urlTree.fragment,HP(e),wn(e),e.component??e._loadedComponent??null,e,$P(e),n),a=cv(s,o,this.paramsInheritanceStrategy);return s.params=Object.freeze(a.params),s.data=Object.freeze(a.data),s}async matchSegmentAgainstRoute(n,e,r,i,o,s){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let a=Pe=>this.createSnapshot(n,r,Pe.consumedSegments,Pe.parameters,s),c=await Xu(NP(e,r,i,n,this.urlSerializer,a,this.abortSignal));if(r.path==="**"&&(e.children={}),!c?.matched)throw new Wn(e);n=r._injector??n;let{routes:l}=await this.getChildConfig(n,r,i),u=r._loadedInjector??n,{parameters:d,consumedSegments:h,remainingSegments:p}=c,m=this.createSnapshot(n,r,h,d,s),{segmentGroup:_,slicedSegments:E}=bI(e,h,p,l);if(E.length===0&&_.hasChildren()){let Pe=await this.processChildren(u,l,_,m);return new gt(m,Pe)}if(l.length===0&&E.length===0)return new gt(m,[]);let I=wn(r)===o,ee=await this.processSegment(u,l,_,E,I?V:o,!0,m);return new gt(m,ee instanceof gt?[ee]:[])}async getChildConfig(n,e,r){if(e.children)return{routes:e.children,injector:n};if(e.loadChildren){if(e._loadedRoutes!==void 0){let o=e._loadedNgModuleFactory;return o&&!e._loadedInjector&&(e._loadedInjector=o.create(n).injector),{routes:e._loadedRoutes,injector:e._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(await Xu(IP(n,e,r,this.urlSerializer,this.abortSignal))){let o=await this.configLoader.loadChildren(n,e);return e._loadedRoutes=o.routes,e._loadedInjector=o.injector,e._loadedNgModuleFactory=o.factory,o}throw TP(e)}return{routes:[],injector:n}}};function BP(t){t.sort((n,e)=>n.value.outlet===V?-1:e.value.outlet===V?1:n.value.outlet.localeCompare(e.value.outlet))}function UP(t){let n=t.value.routeConfig;return n&&n.path===""}function QI(t){let n=[],e=new Set;for(let r of t){if(!UP(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=QI(r.children);n.push(new gt(r.value,i))}return n.filter(r=>!e.has(r))}function HP(t){return t.data||{}}function $P(t){return t.resolve||{}}function zP(t,n,e,r,i,o,s){return ve(async a=>{let{state:c,tree:l}=await jP(t,n,e,r,a.extractedUrl,i,o,s);return F(g({},a),{targetSnapshot:c,urlAfterRedirects:l})})}function GP(t){return ve(n=>{let{targetSnapshot:e,guards:{canActivateChecks:r}}=n;if(!r.length)return T(n);let i=new Set(r.map(a=>a.route)),o=new Set;for(let a of i)if(!o.has(a))for(let c of XI(a))o.add(c);let s=0;return se(o).pipe(Xn(a=>i.has(a)?WP(a,e,t):(a.data=cv(a,a.parent,t).resolve,T(void 0))),nt(()=>s++),oc(1),ve(a=>s===o.size?T(n):Se))})}function XI(t){let n=t.children.map(e=>XI(e)).flat();return[t,...n]}function WP(t,n,e){let r=t.routeConfig,i=t._resolve;return r?.title!==void 0&&!BI(r)&&(i[Sa]=r.title),Vo(()=>(t.data=cv(t,t.parent,e).resolve,qP(i,t,n).pipe(H(o=>(t._resolvedData=o,t.data=g(g({},t.data),o),null)))))}function qP(t,n,e){let r=Wg(t);if(r.length===0)return T({});let i={};return se(r).pipe(ve(o=>YP(t[o],n,e).pipe(Sn(),nt(s=>{if(s instanceof To)throw hd(new qn,s);i[o]=s}))),oc(1),H(()=>i),on(o=>GI(o)?Se:Tr(o)))}function YP(t,n,e){let r=n._environmentInjector,i=Ao(t,r),o=i.resolve?i.resolve(n,e):xe(r,()=>i(n,e));return gi(o)}function _I(t){return Ue(n=>{let e=t(n);return e?se(e).pipe(H(()=>n)):T(n)})}var pv=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===V);return r}getResolvedTitleForRoute(e){return e.data[Sa]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:()=>f(JI),providedIn:"root"})}return t})(),JI=(()=>{class t extends pv{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(w(Mw))};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Dr=new y("",{factory:()=>({})}),Ro=new y(""),vd=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=f(Kp);async loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return Promise.resolve(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await wI(xe(e,()=>r.loadComponent())),s=await nS(tS(o));return this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s,s}finally{this.componentLoaders.delete(r)}})();return this.componentLoaders.set(r,i),i}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Promise.resolve({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let i=(async()=>{try{let o=await eS(r,this.compiler,e,this.onLoadEndListener);return r._loadedRoutes=o.routes,r._loadedInjector=o.injector,r._loadedNgModuleFactory=o.factory,o}finally{this.childrenLoaders.delete(r)}})();return this.childrenLoaders.set(r,i),i}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();async function eS(t,n,e,r){let i=await wI(xe(e,()=>t.loadChildren())),o=await nS(tS(i)),s;o instanceof Cl||Array.isArray(o)?s=o:s=await n.compileModuleAsync(o),r&&r(t);let a,c,l=!1,u;return Array.isArray(s)?(c=s,l=!0):(a=s.create(e).injector,u=s,c=a.get(Ro,[],{optional:!0,self:!0}).flat()),{routes:c.map(hv),injector:a,factory:u}}function ZP(t){return t&&typeof t=="object"&&"default"in t}function tS(t){return ZP(t)?t.default:t}async function nS(t){return t}var yd=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:()=>f(KP),providedIn:"root"})}return t})(),KP=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),mv=new y(""),gv=new y("");function rS(t,n,e){let r=t.get(gv),i=t.get(L);if(!i.startViewTransition||r.skipNextTransition)return r.skipNextTransition=!1,new Promise(l=>setTimeout(l));let o,s=new Promise(l=>{o=l}),a=i.startViewTransition(()=>(o(),QP(t)));a.updateCallbackDone.catch(l=>{}),a.ready.catch(l=>{}),a.finished.catch(l=>{});let{onViewTransitionCreated:c}=r;return c&&xe(t,()=>c({transition:a,from:n,to:e})),s}function QP(t){return new Promise(n=>{ht({read:()=>setTimeout(n)},{injector:t})})}var XP=()=>{},vv=new y(""),bd=(()=>{class t{currentNavigation=W(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=W(null);events=new S;transitionAbortWithErrorSubject=new S;configLoader=f(vd);environmentInjector=f(re);destroyRef=f(Ae);urlSerializer=f(_r);rootContexts=f(vi);location=f(yn);inputBindingEnabled=f(Ma,{optional:!0})!==null;titleStrategy=f(pv);options=f(Dr,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=f(yd);createViewTransition=f(mv,{optional:!0});navigationErrorHandler=f(vv,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>T(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new od(i)),r=i=>this.events.next(new sd(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;q(()=>{this.transitions?.next(F(g({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:r,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(e){return this.transitions=new Ie(null),this.transitions.pipe(fe(r=>r!==null),Ue(r=>{let i=!1,o=new AbortController,s=()=>!i&&this.currentTransition?.id===r.id;return T(r).pipe(Ue(a=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",Ze.SupersededByNewNavigation),Se;this.currentTransition=r;let c=this.lastSuccessfulNavigation();this.currentNavigation.set({id:a.id,initialUrl:a.rawUrl,extractedUrl:a.extractedUrl,targetBrowserUrl:typeof a.extras.browserUrl=="string"?this.urlSerializer.parse(a.extras.browserUrl):a.extras.browserUrl,trigger:a.source,extras:a.extras,previousNavigation:c?F(g({},c),{previousNavigation:null}):null,abort:()=>o.abort(),routesRecognizeHandler:a.routesRecognizeHandler,beforeActivateHandler:a.beforeActivateHandler});let l=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),u=a.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!l&&u!=="reload")return this.events.next(new Cn(a.id,this.urlSerializer.serialize(a.rawUrl),"",wo.IgnoredSameUrlNavigation)),a.resolve(!1),Se;if(this.urlHandlingStrategy.shouldProcessUrl(a.rawUrl))return T(a).pipe(Ue(d=>(this.events.next(new br(d.id,this.urlSerializer.serialize(d.extractedUrl),d.source,d.restoredState)),d.id!==this.navigationId?Se:Promise.resolve(d))),zP(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,o.signal),nt(d=>{r.targetSnapshot=d.targetSnapshot,r.urlAfterRedirects=d.urlAfterRedirects,this.currentNavigation.update(h=>(h.finalUrl=d.urlAfterRedirects,h)),this.events.next(new Da)}),Ue(d=>se(r.routesRecognizeHandler.deferredHandle??T(void 0)).pipe(H(()=>d))),nt(()=>{let d=new _a(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(d)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(a.currentRawUrl)){let{id:d,extractedUrl:h,source:p,restoredState:m,extras:_}=a,E=new br(d,this.urlSerializer.serialize(h),p,m);this.events.next(E);let I=jI(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=r=F(g({},a),{targetSnapshot:I,urlAfterRedirects:h,extras:F(g({},_),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(ee=>(ee.finalUrl=h,ee)),T(r)}else return this.events.next(new Cn(a.id,this.urlSerializer.serialize(a.extractedUrl),"",wo.IgnoredByUrlHandlingStrategy)),a.resolve(!1),Se}),H(a=>{let c=new td(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);return this.events.next(c),this.currentTransition=r=F(g({},a),{guards:sP(a.targetSnapshot,a.currentSnapshot,this.rootContexts)}),r}),vP(a=>this.events.next(a)),Ue(a=>{if(r.guardsResult=a.guardsResult,a.guardsResult&&typeof a.guardsResult!="boolean")throw hd(this.urlSerializer,a.guardsResult);let c=new nd(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot,!!a.guardsResult);if(this.events.next(c),!s())return Se;if(!a.guardsResult)return this.cancelNavigationTransition(a,"",Ze.GuardRejected),Se;if(a.guards.canActivateChecks.length===0)return T(a);let l=new rd(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);if(this.events.next(l),!s())return Se;let u=!1;return T(a).pipe(GP(this.paramsInheritanceStrategy),nt({next:()=>{u=!0;let d=new id(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(d)},complete:()=>{u||this.cancelNavigationTransition(a,"",Ze.NoDataFromResolver)}}))}),_I(a=>{let c=u=>{let d=[];if(u.routeConfig?._loadedComponent)u.component=u.routeConfig?._loadedComponent;else if(u.routeConfig?.loadComponent){let h=u._environmentInjector;d.push(this.configLoader.loadComponent(h,u.routeConfig).then(p=>{u.component=p}))}for(let h of u.children)d.push(...c(h));return d},l=c(a.targetSnapshot.root);return l.length===0?T(a):se(Promise.all(l).then(()=>a))}),_I(()=>this.afterPreactivation()),Ue(()=>{let{currentSnapshot:a,targetSnapshot:c}=r,l=this.createViewTransition?.(this.environmentInjector,a.root,c.root);return l?se(l).pipe(H(()=>r)):T(r)}),Be(1),Ue(a=>{let c=nP(e.routeReuseStrategy,a.targetSnapshot,a.currentRouterState);this.currentTransition=r=a=F(g({},a),{targetRouterState:c}),this.currentNavigation.update(u=>(u.targetRouterState=c,u)),this.events.next(new Io);let l=r.beforeActivateHandler.deferredHandle;return l?se(l.then(()=>a)):T(a)}),nt(a=>{new tv(e.routeReuseStrategy,r.targetRouterState,r.currentRouterState,c=>this.events.next(c),this.inputBindingEnabled).activate(this.rootContexts),s()&&(i=!0,this.currentNavigation.update(c=>(c.abort=XP,c)),this.lastSuccessfulNavigation.set(q(this.currentNavigation)),this.events.next(new yt(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects))),this.titleStrategy?.updateTitle(a.targetRouterState.snapshot),a.resolve(!0))}),at(WI(o.signal).pipe(fe(()=>!i&&!r.targetRouterState),nt(()=>{this.cancelNavigationTransition(r,o.signal.reason+"",Ze.Aborted)}))),nt({complete:()=>{i=!0}}),at(this.transitionAbortWithErrorSubject.pipe(nt(a=>{throw a}))),Mi(()=>{o.abort(),i||this.cancelNavigationTransition(r,"",Ze.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),on(a=>{if(i=!0,this.destroyed)return r.resolve(!1),Se;if(zI(a))this.events.next(new Rt(r.id,this.urlSerializer.serialize(r.extractedUrl),a.message,a.cancellationCode)),oP(a)?this.events.next(new So(a.url,a.navigationBehaviorOptions)):r.resolve(!1);else{let c=new mi(r.id,this.urlSerializer.serialize(r.extractedUrl),a,r.targetSnapshot??void 0);try{let l=xe(this.environmentInjector,()=>this.navigationErrorHandler?.(c));if(l instanceof To){let{message:u,cancellationCode:d}=hd(this.urlSerializer,l);this.events.next(new Rt(r.id,this.urlSerializer.serialize(r.extractedUrl),u,d)),this.events.next(new So(l.redirectTo,l.navigationBehaviorOptions))}else throw this.events.next(c),a}catch(l){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(l)}}return Se}))}))}cancelNavigationTransition(e,r,i){let o=new Rt(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=q(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function JP(t){return t!==Do}var iS=new y("");var oS=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:()=>f(eL),providedIn:"root"})}return t})(),md=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}shouldDestroyInjector(n){return!0}},eL=(()=>{class t extends md{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),_d=(()=>{class t{urlSerializer=f(_r);options=f(Dr,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=f(yn);urlHandlingStrategy=f(yd);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new tt;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof tt?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=jI(null,f(re));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:()=>f(tL),providedIn:"root"})}return t})(),tL=(()=>{class t extends _d{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate",{replaceUrl:!0})})})}handleRouterEvent(e,r){e instanceof br?this.updateStateMemento():e instanceof Cn?this.commitTransition(r):e instanceof _a?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Io?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Rt&&!LI(e)?this.restoreHistory(r):e instanceof mi?this.restoreHistory(r,!0):e instanceof yt&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,c=g(g({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",c)}else{let a=g(g({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ne(t)))(i||t)}})();static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Dd(t,n){t.events.pipe(fe(e=>e instanceof yt||e instanceof Rt||e instanceof mi||e instanceof Cn),H(e=>e instanceof yt||e instanceof Cn?0:(e instanceof Rt?e.code===Ze.Redirect||e.code===Ze.SupersededByNewNavigation:!1)?2:1),fe(e=>e!==2),Be(1)).subscribe(()=>{n()})}var bt=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=f(Il);stateManager=f(_d);options=f(Dr,{optional:!0})||{};pendingTasks=f(kn);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=f(bd);urlSerializer=f(_r);location=f(yn);urlHandlingStrategy=f(yd);injector=f(re);_events=new S;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=f(oS);injectorCleanup=f(iS,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=f(Ro,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!f(Ma,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new G;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=q(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof Rt&&r.code!==Ze.Redirect&&r.code!==Ze.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof yt)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(r instanceof So){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),c=g({scroll:i.extras.scroll,browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||JP(i.source)},s);this.scheduleNavigation(a,Do,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}eP(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Do,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i,o)=>{this.navigateToSyncWithBrowser(e,i,r,o)})}navigateToSyncWithBrowser(e,r,i,o){let s=i?.navigationId?i:null;if(i){let c=g({},i);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(o.state=c)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(c=>{this.disposed||this.injector.get(ut)(c)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return q(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(hv),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:c}=r,l=c?this.currentUrlTree.fragment:s,u=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":u=g(g({},this.currentUrlTree.queryParams),o);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}u!==null&&(u=this.removeEmptyProps(u));let d;try{let h=i?i.snapshot:this.routerState.snapshot.root;d=OI(h)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),d=this.currentUrlTree.root}return kI(d,e,u,l??null,this.urlSerializer)}navigateByUrl(e,r={skipLocationChange:!1}){let i=yr(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,Do,null,r)}navigate(e,r={skipLocationChange:!1}){return nL(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(Dt(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=g({},sv):r===!1?i=g({},ya):i=g(g({},ya),r),yr(e))return qg(this.currentUrlTree,e,i);let o=this.parseUrl(e);return qg(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,c,l;s?(a=s.resolve,c=s.reject,l=s.promise):l=new Promise((d,h)=>{a=d,c=h});let u=this.pendingTasks.add();return Dd(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(u))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:c,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(Promise.reject.bind(Promise))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function nL(t){for(let n=0;n{class t{router=f(bt);stateManager=f(_d);fragment=W("");queryParams=W({});path=W("");serializer=f(_r);constructor(){this.updateState(),this.router.events?.subscribe(e=>{e instanceof yt&&this.updateState()})}updateState(){let{fragment:e,root:r,queryParams:i}=this.stateManager.getCurrentUrlTree();this.fragment.set(e),this.queryParams.set(i),this.path.set(this.serializer.serialize(new tt(r)))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ed=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=f(new Ll("href"),{optional:!0});reactiveHref=Xp(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return q(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}set target(e){this._target.set(e)}get target(){return q(this._target)}_target=W(void 0);set queryParams(e){this._queryParams.set(e)}get queryParams(){return q(this._queryParams)}_queryParams=W(void 0,{equal:()=>!1});set fragment(e){this._fragment.set(e)}get fragment(){return q(this._fragment)}_fragment=W(void 0);set queryParamsHandling(e){this._queryParamsHandling.set(e)}get queryParamsHandling(){return q(this._queryParamsHandling)}_queryParamsHandling=W(void 0);set state(e){this._state.set(e)}get state(){return q(this._state)}_state=W(void 0,{equal:()=>!1});set info(e){this._info.set(e)}get info(){return q(this._info)}_info=W(void 0,{equal:()=>!1});set relativeTo(e){this._relativeTo.set(e)}get relativeTo(){return q(this._relativeTo)}_relativeTo=W(void 0);set preserveFragment(e){this._preserveFragment.set(e)}get preserveFragment(){return q(this._preserveFragment)}_preserveFragment=W(!1);set skipLocationChange(e){this._skipLocationChange.set(e)}get skipLocationChange(){return q(this._skipLocationChange)}_skipLocationChange=W(!1);set replaceUrl(e){this._replaceUrl.set(e)}get replaceUrl(){return q(this._replaceUrl)}_replaceUrl=W(!1);isAnchorElement;onChanges=new S;applicationErrorHandler=f(ut);options=f(Dr,{optional:!0});reactiveRouterState=f(rL);constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a;let c=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area"||!!(typeof customElements=="object"&&customElements.get(c)?.observedAttributes?.includes?.("href"))}setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.onChanges.next(this)}routerLinkInput=W(null);set routerLink(e){e==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):(yr(e)?this.routerLinkInput.set(e):this.routerLinkInput.set(Array.isArray(e)?e:[e]),this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this._urlTree();if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,c)?.catch(l=>{this.applicationErrorHandler(l)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}_urlTree=Kt(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let e=i=>i==="preserve"||i==="merge";(e(this._queryParamsHandling())||e(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let r=this.routerLinkInput();return r===null||!this.router.createUrlTree?null:yr(r)?r:this.router.createUrlTree(r,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(e,r)=>this.computeHref(e)===this.computeHref(r)});get urlTree(){return q(this._urlTree)}computeHref(e){return e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null}static \u0275fac=function(r){return new(r||t)(D(bt),D(Yn),Es("tabindex"),D(Oe),D(z),D(Xt))};static \u0275dir=M({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&Zt("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Yt("href",i.reactiveHref(),dp)("target",i._target())},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",ue],skipLocationChange:[2,"skipLocationChange","skipLocationChange",ue],replaceUrl:[2,"replaceUrl","replaceUrl",ue],routerLink:"routerLink"},features:[Re]})}return t})(),iL=(()=>{class t{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new U;link=f(Ed,{optional:!0});constructor(e,r,i,o){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.routerEventsSubscription=e.events.subscribe(s=>{s instanceof yt&&this.update()})}ngAfterContentInit(){T(this.links.changes,T(null)).pipe(nn()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=se(e).pipe(nn()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=oL(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact??!1?g({},sv):g({},ya);return i=>{let o=i.urlTree;return o?q(av(o,e,r)):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(D(bt),D(z),D(Oe),D(St))};static \u0275dir=M({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&Nl(o,Ed,5),r&2){let s;Os(s=ks())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Re]})}return t})();function oL(t){let n=t;return!!(n.paths||n.matrixParams||n.queryParams||n.fragment)}var xa=class{};var sS=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,r,i,o){this.router=e,this.injector=r,this.preloadingStrategy=i,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(fe(e=>e instanceof yt),Xn(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription?.unsubscribe()}processRoutes(e,r){let i=[];for(let o of r){o.providers&&!o._injector&&(o._injector=to(o.providers,e,""));let s=o._injector??e;o._loadedNgModuleFactory&&!o._loadedInjector&&(o._loadedInjector=o._loadedNgModuleFactory.create(s).injector);let a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&i.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&i.push(this.processRoutes(a,o.children??o._loadedRoutes))}return se(i).pipe(nn())}preloadConfig(e,r){return this.preloadingStrategy.preload(r,()=>{if(e.destroyed)return T(null);let i;r.loadChildren&&r.canLoad===void 0?i=se(this.loader.loadChildren(e,r)):i=T(null);let o=i.pipe(ve(s=>s===null?T(void 0):(r._loadedRoutes=s.routes,r._loadedInjector=s.injector,r._loadedNgModuleFactory=s.factory,this.processRoutes(s.injector??e,s.routes))));if(r.loadComponent&&!r._loadedComponent){let s=this.loader.loadComponent(e,r);return se([o,s]).pipe(nn())}else return o})}static \u0275fac=function(r){return new(r||t)(w(bt),w(re),w(xa),w(vd))};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),aS=new y(""),sL=(()=>{class t{options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=Do;restoredId=0;store={};urlSerializer=f(_r);zone=f(j);viewportScroller=f(Im);transitions=f(bd);constructor(e){this.options=e,this.options.scrollPositionRestoration||="disabled",this.options.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof br?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof yt?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof Cn&&e.code===wo.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{if(!(e instanceof Co)||e.scrollBehavior==="manual")return;let r={behavior:"instant"};e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0],r):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position,r):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0])})}scheduleScrollEvent(e,r){let i=q(this.transitions.currentNavigation)?.extras.scroll;this.zone.runOutsideAngular(async()=>{await new Promise(o=>{setTimeout(o),typeof requestAnimationFrame<"u"&&requestAnimationFrame(o)}),this.zone.run(()=>{this.transitions.events.next(new Co(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,r,i))})})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(r){xp()};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})();function aL(){return f(bt).routerState.root}function Aa(t,n){return{\u0275kind:t,\u0275providers:n}}function cL(){let t=f($);return n=>{let e=t.get(He);if(n!==e.components[0])return;let r=t.get(bt),i=t.get(cS);t.get(bv)===1&&r.initialNavigation(),t.get(dS,null,{optional:!0})?.setUpPreloading(),t.get(aS,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var cS=new y("",{factory:()=>new S}),bv=new y("",{factory:()=>1});function lS(){let t=[{provide:ul,useValue:!0},{provide:bv,useValue:0},xl(()=>{let n=f($);return n.get(hm,Promise.resolve()).then(()=>new Promise(r=>{let i=n.get(bt),o=n.get(cS);Dd(i,()=>{r(!0)}),n.get(bd).afterPreactivation=()=>(r(!0),o.closed?T(void 0):o),i.initialNavigation()}))})];return Aa(2,t)}function uS(){let t=[xl(()=>{f(bt).setUpLocationChangeListener()}),{provide:bv,useValue:2}];return Aa(3,t)}var dS=new y("");function fS(t){return Aa(0,[{provide:dS,useExisting:sS},{provide:xa,useExisting:t}])}function hS(){return Aa(8,[dv,{provide:Ma,useExisting:dv}])}function pS(t){qt("NgRouterViewTransitions");let n=[{provide:mv,useValue:rS},{provide:gv,useValue:g({skipNextTransition:!!t?.skipInitialTransition},t)}];return Aa(9,n)}var mS=[yn,{provide:_r,useClass:qn},bt,vi,{provide:Yn,useFactory:aL},vd,[]],lL=(()=>{class t{constructor(){}static forRoot(e,r){return{ngModule:t,providers:[mS,[],{provide:Ro,multi:!0,useValue:e},[],r?.errorHandler?{provide:vv,useValue:r.errorHandler}:[],{provide:Dr,useValue:r||{}},r?.useHash?dL():fL(),uL(),r?.preloadingStrategy?fS(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?hL(r):[],r?.bindToComponentInputs?hS().\u0275providers:[],r?.enableViewTransitions?pS().\u0275providers:[],pL()]}}static forChild(e){return{ngModule:t,providers:[{provide:Ro,multi:!0,useValue:e}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=X({type:t});static \u0275inj=Z({})}return t})();function uL(){return{provide:aS,useFactory:()=>{let t=f(Im),n=f(Dr);return n.scrollOffset&&t.setOffset(n.scrollOffset),new sL(n)}}}function dL(){return{provide:Xt,useClass:_m}}function fL(){return{provide:Xt,useClass:zl}}function hL(t){return[t.initialNavigation==="disabled"?uS().\u0275providers:[],t.initialNavigation==="enabledBlocking"?lS().\u0275providers:[]]}var yv=new y("");function pL(){return[{provide:yv,useFactory:cL},{provide:Al,multi:!0,useExisting:yv}]}var wd=class t extends Error{originalError;constructor(n){super(n)}static fromError(n,e){let r=new t(n);return r.originalError=e,r}},gL=(()=>{class t{handleError(e){let r=e;return e.name==="HttpErrorResponse"&&e.status===0?r=wd.fromError("Controller is unreachable",e):e.error?.message&&(r=wd.fromError(e.error.message,e)),Tr(()=>r)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})(),KX=(()=>{class t{http;errorHandler;router;requestsNotificationEmitter=new U;isRefreshing=!1;failedQueue=[];constructor(e,r,i){this.http=e,this.errorHandler=r,this.router=i}get(e,r,i){i=this.getJsonOptions(i);let o=this.getOptionsForController(e,r,i);return this.requestsNotificationEmitter.emit(`GET ${o.url}`),this.handleResponse(e,this.http.get(o.url,o.options),"GET",r,null,i)}getText(e,r,i){i=this.getTextOptions(i);let o=this.getOptionsForController(e,r,i);return this.requestsNotificationEmitter.emit(`GET ${o.url}`),this.handleResponse(e,this.http.get(o.url,o.options),"GET",r,null,i)}getBlob(e,r,i){i=this.getBlobOptions(i);let o=this.getOptionsForController(e,r,i);return this.requestsNotificationEmitter.emit(`GET ${o.url}`),this.handleResponse(e,this.http.get(o.url,o.options),"GET",r,null,i)}post(e,r,i,o){o=this.getJsonOptions(o);let s=this.getOptionsForController(e,r,o);return this.requestsNotificationEmitter.emit(`POST ${s.url}`),this.handleResponse(e,this.http.post(s.url,i,s.options),"POST",r,i,o)}postBlob(e,r,i){let o={responseType:"blob",headers:{}},s=this.getOptionsForController(e,r,o);return this.requestsNotificationEmitter.emit(`POST ${s.url}`),this.handleResponse(e,this.http.post(s.url,i,s.options),"POST",r,i,o)}put(e,r,i,o){o=this.getJsonOptions(o);let s=this.getOptionsForController(e,r,o);return this.requestsNotificationEmitter.emit(`PUT ${s.url}`),this.handleResponse(e,this.http.put(s.url,i,s.options),"PUT",r,i,o)}delete(e,r,i){i=this.getJsonOptions(i);let o=this.getOptionsForController(e,r,i);return this.requestsNotificationEmitter.emit(`DELETE ${o.url}`),this.handleResponse(e,this.http.delete(o.url,o.options),"DELETE",r,null,i)}patch(e,r,i,o){o=this.getJsonOptions(o);let s=this.getOptionsForController(e,r,o);return this.handleResponse(e,this.http.patch(s.url,i,s.options),"PATCH",r,i,o)}head(e,r,i){i=this.getJsonOptions(i);let o=this.getOptionsForController(e,r,i);return this.handleResponse(e,this.http.head(o.url,o.options),"HEAD",r,null,i)}options(e,r,i){i=this.getJsonOptions(i);let o=this.getOptionsForController(e,r,i);return this.handleResponse(e,this.http.options(o.url,o.options),"OPTIONS",r,null,i)}getJsonOptions(e){return e||{responseType:"json"}}getTextOptions(e){return e||{responseType:"text"}}getBlobOptions(e){return e||{responseType:"blob"}}getOptionsForController(e,r,i){return e&&e.host&&e.port?(e.protocol||(e.protocol=location.protocol),r=`${e.protocol}//${e.host}:${e.port}/${wu.current_version}${r}`):r=`/${wu.current_version}${r}`,i.headers||(i.headers={}),e&&e.authToken&&!e.tokenExpired&&(i.headers.Authorization=`Bearer ${e.authToken}`),{url:r,options:i}}handleResponse(e,r,i,o,s,a){return r.pipe(on(c=>{if(c.status!==401)return this.errorHandler.handleError(c);if(o.endsWith("/access/users/login")||o.endsWith("/access/users/authenticate")||o.endsWith("/access/users/refresh"))return this.errorHandler.handleError(c);let l=localStorage.getItem(`refresh_token_${e.id}`);return l?this.retryAfterRefresh(e,i,o,s,a,l):(this.redirectToLogin(e),Tr(()=>c))}))}retryAfterRefresh(e,r,i,o,s,a){return this.isRefreshing?new O(c=>{this.failedQueue.push({resolve:()=>{this.executeRequest(e,r,i,o,s).subscribe({next:l=>{c.next(l),c.complete()},error:l=>c.error(l)})},reject:l=>c.error(l)})}):(this.isRefreshing=!0,this.doRefreshToken(e,a).pipe(Ue(c=>(e.authToken=c.access_token,localStorage.setItem(`controller-${e.id}`,JSON.stringify(e)),c.refresh_token&&localStorage.setItem(`refresh_token_${e.id}`,c.refresh_token),this.isRefreshing=!1,this.processQueue(null),this.executeRequest(e,r,i,o,s))),on(c=>(this.isRefreshing=!1,this.processQueue(c),c.status===401&&this.redirectToLogin(e),Tr(()=>c)))))}doRefreshToken(e,r){let i=`${e.protocol}//${e.host}:${e.port}/${wu.current_version}/access/users/refresh`;return this.http.post(i,{refresh_token:r},{headers:new bn({"Content-Type":"application/json"})})}executeRequest(e,r,i,o,s){let a=this.getOptionsForController(e,i,s);return this.requestsNotificationEmitter.emit(`${r} ${a.url}`),this.http.request(r,a.url,{body:o,headers:a.options.headers,params:a.options.params,responseType:a.options.responseType||"json"})}processQueue(e){e?this.failedQueue.forEach(r=>r.reject(e)):this.failedQueue.forEach(r=>r.resolve()),this.failedQueue=[]}clearTokens(e){localStorage.removeItem(`refresh_token_${e.id}`),e.authToken=null,localStorage.setItem(`controller-${e.id}`,JSON.stringify(e))}redirectToLogin(e){this.clearTokens(e),e.tokenExpired=!0,localStorage.setItem(`controller-${e.id}`,JSON.stringify(e)),this.isRefreshing=!1,this.processQueue(new Error("Session expired, redirecting to login")),this.router.navigate(["/controller",e.id,"login"])}static \u0275fac=function(r){return new(r||t)(w(uu),w(gL),w(bt))};static \u0275prov=v({token:t,factory:t.\u0275fac})}return t})();var _v=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected=null;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new S;constructor(n=!1,e,r=!0,i){this._multiple=n,this._emitChanges=r,this.compareWith=i,e&&e.length&&(n?e.forEach(o=>this._markSelected(o)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...n){this._verifyValueAssignment(n),n.forEach(r=>this._markSelected(r));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...n){this._verifyValueAssignment(n),n.forEach(r=>this._unmarkSelected(r));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...n){this._verifyValueAssignment(n);let e=this.selected,r=new Set(n.map(o=>this._getConcreteValue(o)));n.forEach(o=>this._markSelected(o)),e.filter(o=>!r.has(this._getConcreteValue(o,r))).forEach(o=>this._unmarkSelected(o));let i=this._hasQueuedChanges();return this._emitChangeEvent(),i}toggle(n){return this.isSelected(n)?this.deselect(n):this.select(n)}clear(n=!0){this._unmarkAll();let e=this._hasQueuedChanges();return n&&this._emitChangeEvent(),e}isSelected(n){return this._selection.has(this._getConcreteValue(n))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(n){this._multiple&&this.selected&&this._selected.sort(n)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(n){n=this._getConcreteValue(n),this.isSelected(n)||(this._multiple||this._unmarkAll(),this.isSelected(n)||this._selection.add(n),this._emitChanges&&this._selectedToEmit.push(n))}_unmarkSelected(n){n=this._getConcreteValue(n),this.isSelected(n)&&(this._selection.delete(n),this._emitChanges&&this._deselectedToEmit.push(n))}_unmarkAll(){this.isEmpty()||this._selection.forEach(n=>this._unmarkSelected(n))}_verifyValueAssignment(n){n.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(n,e){if(this.compareWith){e=e??this._selection;for(let r of e)if(this.compareWith(n,r))return r;return n}else return n}};var vL=(()=>{class t{_listeners=[];notify(e,r){for(let i of this._listeners)i(e,r)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(r=>e!==r)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var gS=class{applyChanges(n,e,r,i,o){n.forEachOperation((s,a,c)=>{let l,u;if(s.previousIndex==null){let d=r(s,a,c);l=e.createEmbeddedView(d.templateRef,d.context,d.index),u=_n.INSERTED}else c==null?(e.remove(a),u=_n.REMOVED):(l=e.get(a),e.move(l,c),u=_n.MOVED);o&&o({context:l?.context,operation:u,record:s})})}detach(){}};var uJ=(()=>{class t{_animationsDisabled=mr();state="unchecked";disabled=!1;appearance="full";constructor(){}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=ke({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(r,i){r&2&&Xe("mat-pseudo-checkbox-indeterminate",i.state==="indeterminate")("mat-pseudo-checkbox-checked",i.state==="checked")("mat-pseudo-checkbox-disabled",i.disabled)("mat-pseudo-checkbox-minimal",i.appearance==="minimal")("mat-pseudo-checkbox-full",i.appearance==="full")("_mat-animation-noopable",i._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(r,i){},styles:[`.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-minimal-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-pseudo-checkbox-full-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-pseudo-checkbox-full-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-pseudo-checkbox-full-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-full-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-pseudo-checkbox-full-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-full-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px} +`],encapsulation:2,changeDetection:0})}return t})();export{g as a,F as b,wS as c,yL as d,bL as e,_L as f,G as g,O as h,S as i,Ie as j,Po as k,Pd as l,Ld as m,Se as n,se as o,T as p,Tr as q,Ft as r,BS as s,HS as t,H as u,Ii as v,ve as w,rn as x,Vo as y,Vd as z,Bd as A,xr as B,iM as C,oM as D,fe as E,Bo as F,on as G,Ud as H,Xn as I,sM as J,Ar as K,Be as L,Hd as M,aM as N,Si as O,Mi as P,oc as Q,ty as R,Gd as S,ny as T,Uo as U,Rr as V,Ue as W,at as X,nt as Y,b as Z,be as _,v as $,Z as aa,y as ba,w as ca,f as da,My as ea,re as fa,By as ga,Uy as ha,Jy as ia,eb as ja,$ as ka,L as la,Ae as ma,U as na,j as oa,_t as pa,W as qa,$i as ra,Re as sa,Ne as ta,z as ua,Fn as va,Xr as wa,ws as xa,it as ya,i0 as za,N_ as Aa,O_ as Ba,c0 as Ca,l0 as Da,vp as Ea,ht as Fa,dt as Ga,je as Ha,Oe as Ia,D as Ja,xp as Ka,qe as La,ke as Ma,X as Na,M as Oa,As as Pa,uA as Qa,J as Ra,PD as Sa,LD as Ta,no as Ua,He as Va,HD as Wa,Yt as Xa,wA as Ya,IA as Za,Hp as _a,SA as $a,MA as ab,TA as bb,xA as cb,AA as db,$D as eb,sl as fb,$p as gb,Rl as hb,Jr as ib,ei as jb,vn as kb,zp as lb,Gp as mb,GD as nb,PA as ob,WD as pb,Zt as qb,YD as rb,UA as sb,ti as tb,Vn as ub,Nl as vb,Ol as wb,Os as xb,ks as yb,KD as zb,QD as Ab,zA as Bb,GA as Cb,kl as Db,Xe as Eb,Wp as Fb,fR as Gb,sE as Hb,qp as Ib,aE as Jb,cE as Kb,lE as Lb,gR as Mb,uE as Nb,vR as Ob,yR as Pb,we as Qb,ER as Rb,wR as Sb,CR as Tb,IR as Ub,SR as Vb,TR as Wb,AR as Xb,RR as Yb,NR as Zb,OR as _b,kR as $b,q as ac,Kt as bc,Ll as cc,z4 as dc,G4 as ec,xE as fc,W4 as gc,q4 as hc,Y4 as ic,Z4 as jc,St as kc,Bl as lc,ue as mc,dm as nc,Q4 as oc,yn as pc,CN as qc,ew as rc,IN as sc,SN as tc,MN as uc,AN as vc,NN as wc,FN as xc,Em as yc,rw as zc,Nm as Ac,KN as Bc,rO as Cc,bn as Dc,$n as Ec,ro as Fc,ri as Gc,io as Hc,Ew as Ic,uu as Jc,IO as Kc,Mw as Lc,x9 as Mc,Hm as Nc,zm as Oc,RO as Pc,Je as Qc,xt as Rc,Zs as Sc,Ks as Tc,ii as Uc,Aw as Vc,Tt as Wc,he as Xc,fo as Yc,zn as Zc,na as _c,bk as $c,ug as ad,_n as bd,dg as cd,wk as dd,ra as ed,pg as fd,ci as gd,xk as hd,Ak as id,hg as jd,mg as kd,Js as ld,oi as md,gg as nd,ho as od,Cu as pd,Iu as qd,x7 as rd,A7 as sd,hC as td,vu as ud,DC as vd,Dg as wd,sa as xd,Eg as yd,Au as zd,Cg as Ad,TC as Bd,Ig as Cd,Sg as Dd,_g as Ed,Fk as Fd,Pk as Gd,gS as Hd,di as Id,HC as Jd,Dn as Kd,NC as Ld,et as Md,Gn as Nd,FQ as Od,PQ as Pd,ui as Qd,LQ as Rd,rF as Sd,go as Td,VQ as Ud,aF as Vd,BQ as Wd,lF as Xd,dF as Yd,aI as Zd,cI as _d,mF as $d,vF as ae,UQ as be,HQ as ce,wF as de,IF as ee,MF as fe,TF as ge,$Q as he,zQ as ie,GQ as je,fu as ke,NO as le,mu as me,kO as ne,gu as oe,qm as pe,AY as qe,Uw as re,jO as se,ZO as te,QO as ue,XO as ve,Qm as we,Xm as xe,Jm as ye,SZ as ze,ek as Ae,tk as Be,PZ as Ce,iK as De,WZ as Ee,QZ as Fe,rk as Ge,mr as He,br as Ie,yt as Je,Rt as Ke,mi as Le,Yn as Me,uv as Ne,bt as Oe,Ed as Pe,iL as Qe,lL as Re,ta as Se,sg as Te,bK as Ue,oC as Ve,sC as We,fk as Xe,lC as Ye,QK as Ze,XK as _e,wu as $e,gL as af,KX as bf,vL as cf,_v as df,uJ as ef}; diff --git a/gns3server/static/web-ui/chunk-EZEP55N7.js b/gns3server/static/web-ui/chunk-764TLGKY.js similarity index 88% rename from gns3server/static/web-ui/chunk-EZEP55N7.js rename to gns3server/static/web-ui/chunk-764TLGKY.js index 5583e61c2..c770d6caa 100644 --- a/gns3server/static/web-ui/chunk-EZEP55N7.js +++ b/gns3server/static/web-ui/chunk-764TLGKY.js @@ -1,4 +1,4 @@ -import{$ as ft,$a as E,A as ht,Aa as de,B as ie,Ba as vt,Da as I,Ec as st,F as ne,Fb as yt,Fd as we,G as rt,Gc as y,Hb as Wt,Hc as xt,I as f,Ia as K,Ib as tt,Je as Rt,Kb as Ct,Lb as St,Ld as z,Mb as It,Me as it,N,Nb as _e,Nd as Qt,Ob as et,Od as Te,Pa as k,Pb as U,Pd as De,Qb as W,R as ae,Ra as ue,Rd as ct,Re as Fe,Sa as ge,Sd as dt,Se as Re,Tc as ye,Td as ot,Ua as me,Ub as kt,Ud as Ot,Ue as Ne,V as re,Vb as wt,Wb as O,Wd as xe,Xb as Tt,Xd as Ae,Y as pt,Yd as Ee,_a as A,_d as Mt,a as M,ab as L,ae as Oe,b as Xt,bd as Ce,ca as se,cb as he,da as D,db as Z,de as Ft,df as Pe,ea as x,eb as Y,ef as ut,fe as Me,g as te,ga as h,gc as be,ha as S,hd as At,hf as Le,i as Ht,ia as l,j as T,jf as Be,k as ee,l as Vt,ld as Se,lf as je,nb as g,nd as Et,oa as Ut,pa as le,pb as pe,pd as Ie,q as Q,qa as F,qc as ve,qf as Nt,r as m,ra as J,rb as fe,sd as $t,sf as ze,tf as Ge,u as oe,ua as P,v as q,va as ce,vd as ke,wa as _t,wb as B,wc as Dt,wd as lt,xb as v,xd as j,ya as bt,yb as w,zb as X}from"./chunk-6QUQX5EO.js";var co=["determinateSpinner"];function uo(i,s){if(i&1&&(Ut(),v(0,"svg",11),X(1,"circle",12),w()),i&2){let t=Ct();g("viewBox",t._viewBox()),k(),wt("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),g("r",t._circleRadius())}}var go=new h("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:He})}),He=100,mo=10,ni=(()=>{class i{_elementRef=l(I);_noopAnimations;get color(){return this._color||this._defaultColor}set color(t){this._color=t}_color;_defaultColor="primary";_determinateCircle;constructor(){let t=l(go),e=Pe(),o=this._elementRef.nativeElement;this._noopAnimations=e==="di-disabled"&&!!t&&!t._forceAnimations,this.mode=o.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&e==="reduced-motion"&&o.classList.add("mat-progress-spinner-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),t.diameter&&(this.diameter=t.diameter),t.strokeWidth&&(this.strokeWidth=t.strokeWidth))}mode;get value(){return this.mode==="determinate"?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0))}_value=0;get diameter(){return this._diameter}set diameter(t){this._diameter=t||0}_diameter=He;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0}_strokeWidth;_circleRadius(){return(this.diameter-mo)/2}_viewBox(){let t=this._circleRadius()*2+this.strokeWidth;return`0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,o){if(e&1&&et(co,5),e&2){let n;U(n=W())&&(o._determinateCircle=n.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(e,o){e&2&&(g("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",o.mode==="determinate"?o.value:null)("mode",o.mode),Tt("mat-"+o.color),wt("width",o.diameter,"px")("height",o.diameter,"px")("--mat-progress-spinner-size",o.diameter+"px")("--mat-progress-spinner-active-indicator-width",o.diameter+"px"),O("_mat-animation-noopable",o._noopAnimations)("mdc-circular-progress--indeterminate",o.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",xt],diameter:[2,"diameter","diameter",xt],strokeWidth:[2,"strokeWidth","strokeWidth",xt]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(e,o){if(e&1&&(Y(0,uo,2,8,"ng-template",null,0,ve),v(2,"div",2,1),Ut(),v(4,"svg",3),X(5,"circle",4),w()(),le(),v(6,"div",5)(7,"div",6)(8,"div",7),yt(9,8),w(),v(10,"div",9),yt(11,8),w(),v(12,"div",10),yt(13,8),w()()()),e&2){let n=kt(1);k(4),g("viewBox",o._viewBox()),k(),wt("stroke-dasharray",o._strokeCircumference(),"px")("stroke-dashoffset",o._strokeDashOffset(),"px")("stroke-width",o._circleStrokeWidth(),"%"),g("r",o._circleRadius()),k(4),B("ngTemplateOutlet",n),k(2),B("ngTemplateOutlet",n),k(2),B("ngTemplateOutlet",n)}},dependencies:[ye],styles:[`.mat-mdc-progress-spinner{--mat-progress-spinner-animation-multiplier: 1;display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mat-progress-spinner-active-indicator-width, 4px)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}}.mat-progress-spinner-reduced-motion{--mat-progress-spinner-animation-multiplier: 1.25}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate calc(1568.2352941176ms*var(--mat-progress-spinner-animation-multiplier)) linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mat-progress-spinner-active-indicator-color, var(--mat-sys-primary))}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate calc(5332ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}} +import{$ as D,$a as fe,Bd as Mt,Cb as kt,D as ne,Db as wt,Dc as Ce,Dd as Oe,E as rt,Ea as k,Eb as O,Fa as ue,Fb as Tt,G as f,Ga as ge,Gd as Ft,Ge as Pe,He as ut,Ia as me,Id as Me,Jc as At,L as N,Ma as A,Na as E,Nc as Se,Oa as L,P as ae,Pc as Et,Qa as he,Qb as be,Ra as Z,Rc as Ie,S as re,Sa as Y,Uc as $t,Ue as Le,V as pt,We as Be,Xa as g,Xc as ke,Y as ft,Yc as lt,Ye as je,Za as pe,Zc as j,_ as se,_b as ve,a as M,aa as x,b as Xt,ba as h,bf as Nt,ca as S,cc as Dt,da as l,df as ze,eb as B,ef as Ge,fb as v,fd as we,g as te,gb as w,h as Ht,hb as X,i as T,ia as Ut,j as ee,ja as le,k as Vt,ka as F,kc as st,ke as Rt,la as J,ld as z,mc as y,na as P,nb as yt,nc as xt,nd as Qt,ne as it,oa as ce,od as Te,p as Q,pa as _t,pb as Wt,pd as De,q as m,qa as bt,qb as tt,sa as de,sb as Ct,sd as ct,se as Fe,t as oe,ta as vt,tb as St,td as dt,te as Re,u as q,ua as I,ub as It,uc as ye,ud as ot,vb as _e,vd as Ot,ve as Ne,wb as et,xb as U,xd as xe,y as ht,ya as K,yb as W,yd as Ae,z as ie,zd as Ee}from"./chunk-72DGZVTL.js";var co=["determinateSpinner"];function uo(i,s){if(i&1&&(Ut(),v(0,"svg",11),X(1,"circle",12),w()),i&2){let t=Ct();g("viewBox",t._viewBox()),k(),wt("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),g("r",t._circleRadius())}}var go=new h("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:He})}),He=100,mo=10,ni=(()=>{class i{_elementRef=l(I);_noopAnimations;get color(){return this._color||this._defaultColor}set color(t){this._color=t}_color;_defaultColor="primary";_determinateCircle;constructor(){let t=l(go),e=Pe(),o=this._elementRef.nativeElement;this._noopAnimations=e==="di-disabled"&&!!t&&!t._forceAnimations,this.mode=o.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&e==="reduced-motion"&&o.classList.add("mat-progress-spinner-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),t.diameter&&(this.diameter=t.diameter),t.strokeWidth&&(this.strokeWidth=t.strokeWidth))}mode;get value(){return this.mode==="determinate"?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0))}_value=0;get diameter(){return this._diameter}set diameter(t){this._diameter=t||0}_diameter=He;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0}_strokeWidth;_circleRadius(){return(this.diameter-mo)/2}_viewBox(){let t=this._circleRadius()*2+this.strokeWidth;return`0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,o){if(e&1&&et(co,5),e&2){let n;U(n=W())&&(o._determinateCircle=n.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(e,o){e&2&&(g("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",o.mode==="determinate"?o.value:null)("mode",o.mode),Tt("mat-"+o.color),wt("width",o.diameter,"px")("height",o.diameter,"px")("--mat-progress-spinner-size",o.diameter+"px")("--mat-progress-spinner-active-indicator-width",o.diameter+"px"),O("_mat-animation-noopable",o._noopAnimations)("mdc-circular-progress--indeterminate",o.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",xt],diameter:[2,"diameter","diameter",xt],strokeWidth:[2,"strokeWidth","strokeWidth",xt]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(e,o){if(e&1&&(Y(0,uo,2,8,"ng-template",null,0,ve),v(2,"div",2,1),Ut(),v(4,"svg",3),X(5,"circle",4),w()(),le(),v(6,"div",5)(7,"div",6)(8,"div",7),yt(9,8),w(),v(10,"div",9),yt(11,8),w(),v(12,"div",10),yt(13,8),w()()()),e&2){let n=kt(1);k(4),g("viewBox",o._viewBox()),k(),wt("stroke-dasharray",o._strokeCircumference(),"px")("stroke-dashoffset",o._strokeDashOffset(),"px")("stroke-width",o._circleStrokeWidth(),"%"),g("r",o._circleRadius()),k(4),B("ngTemplateOutlet",n),k(2),B("ngTemplateOutlet",n),k(2),B("ngTemplateOutlet",n)}},dependencies:[ye],styles:[`.mat-mdc-progress-spinner{--mat-progress-spinner-animation-multiplier: 1;display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mat-progress-spinner-active-indicator-width, 4px)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}}.mat-progress-spinner-reduced-motion{--mat-progress-spinner-animation-multiplier: 1.25}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate calc(1568.2352941176ms*var(--mat-progress-spinner-animation-multiplier)) linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mat-progress-spinner-active-indicator-color, var(--mat-sys-primary))}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin calc(1333ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate calc(5332ms*var(--mat-progress-spinner-animation-multiplier)) cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}} `],encapsulation:2,changeDetection:0})}return i})();var ai=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=E({type:i});static \u0275inj=x({imports:[j]})}return i})();function Ve(i){return Error(`Unable to find icon with the name "${i}"`)}function po(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function Ue(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function We(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var R=class{url;svgText;options;svgElement=null;constructor(s,t,e){this.url=s,this.svgText=t,this.options=e}},Qe=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(t,e,o,n){this._httpClient=t,this._sanitizer=e,this._errorHandler=n,this._document=o}addSvgIcon(t,e,o){return this.addSvgIconInNamespace("",t,e,o)}addSvgIconLiteral(t,e,o){return this.addSvgIconLiteralInNamespace("",t,e,o)}addSvgIconInNamespace(t,e,o,n){return this._addSvgIconConfig(t,e,new R(o,null,n))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,o,n){let a=this._sanitizer.sanitize(K.HTML,o);if(!a)throw We(o);let r=it(a);return this._addSvgIconConfig(t,e,new R("",r,n))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,o){return this._addSvgIconSetConfig(t,new R(e,null,o))}addSvgIconSetLiteralInNamespace(t,e,o){let n=this._sanitizer.sanitize(K.HTML,e);if(!n)throw We(e);let a=it(n);return this._addSvgIconSetConfig(t,new R("",a,o))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(K.RESOURCE_URL,t);if(!e)throw Ue(t);let o=this._cachedIconsByUrl.get(e);return o?Q(Pt(o)):this._loadSvgIconFromConfig(new R(t,null)).pipe(ft(n=>this._cachedIconsByUrl.set(e,n)),q(n=>Pt(n)))}getNamedSvgIcon(t,e=""){let o=$e(e,t),n=this._svgIconConfigs.get(o);if(n)return this._getSvgFromConfig(n);if(n=this._getIconConfigFromResolvers(e,t),n)return this._svgIconConfigs.set(o,n),this._getSvgFromConfig(n);let a=this._iconSetConfigs.get(e);return a?this._getSvgFromIconSetConfigs(t,a):m(Ve(o))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?Q(Pt(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(q(e=>Pt(e)))}_getSvgFromIconSetConfigs(t,e){let o=this._extractIconWithNameFromAnySet(t,e);if(o)return Q(o);let n=e.filter(a=>!a.svgText).map(a=>this._loadSvgIconSetFromConfig(a).pipe(f(r=>{let c=`Loading icon set URL: ${this._sanitizer.sanitize(K.RESOURCE_URL,a.url)} failed: ${r.message}`;return this._errorHandler.handleError(new Error(c)),Q(null)})));return ie(n).pipe(q(()=>{let a=this._extractIconWithNameFromAnySet(t,e);if(!a)throw Ve(t);return a}))}_extractIconWithNameFromAnySet(t,e){for(let o=e.length-1;o>=0;o--){let n=e[o];if(n.svgText&&n.svgText.toString().indexOf(t)>-1){let a=this._svgElementFromConfig(n),r=this._extractSvgIconFromSet(a,t,n.options);if(r)return r}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(ft(e=>t.svgText=e),q(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?Q(null):this._fetchIcon(t).pipe(ft(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,o){let n=t.querySelector(`[id="${e}"]`);if(!n)return null;let a=n.cloneNode(!0);if(a.removeAttribute("id"),a.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(a,o);if(a.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(a),o);let r=this._svgElementFromString(it(""));return r.appendChild(a),this._setSvgAttributes(r,o)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let o=e.querySelector("svg");if(!o)throw Error(" tag not found");return o}_toSvgElement(t){let e=this._svgElementFromString(it("")),o=t.attributes;for(let n=0;nit(c)),ae(()=>this._inProgressUrlFetches.delete(a)),re());return this._inProgressUrlFetches.set(a,d),d}_addSvgIconConfig(t,e,o){return this._svgIconConfigs.set($e(t,e),o),this}_addSvgIconSetConfig(t,e){let o=this._iconSetConfigs.get(t);return o?o.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let o=0;o{let i=l(J),s=i?i.location:null;return{getPathname:()=>s?s.pathname+s.search:""}}}),qe=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],yo=qe.map(i=>`[${i}]`).join(", "),Co=/^url\(['"]?#(.*?)['"]?\)$/,Ti=(()=>{class i{_elementRef=l(I);_iconRegistry=l(Qe);_location=l(vo);_errorHandler=l(_t);_defaultColor;get color(){return this._color||this._defaultColor}set color(t){this._color=t}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=te.EMPTY;constructor(){let t=l(new Dt("aria-hidden"),{optional:!0}),e=l(bo,{optional:!0});e&&(e.color&&(this.color=this._defaultColor=e.color),e.fontSet&&(this.fontSet=e.fontSet)),t||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];let e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let o=t.childNodes[e];(o.nodeType!==1||o.nodeName.toLowerCase()==="svg")&&o.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(o=>o.length>0);this._previousFontSetClass.forEach(o=>t.classList.remove(o)),e.forEach(o=>t.classList.add(o)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((o,n)=>{o.forEach(a=>{n.setAttribute(a.name,`url('${t}#${a.value}')`)})})}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(yo),o=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let n=0;n{let r=e[n],d=r.getAttribute(a),c=d?d.match(Co):null;if(c){let C=o.get(r);C||(C=[],o.set(r,C)),C.push({name:a,value:c[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,o]=this._splitIconName(t);e&&(this._svgNamespace=e),o&&(this._svgName=o),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(o,e).pipe(N(1)).subscribe(n=>this._setSvgElement(n),n=>{let a=`Error retrieving icon ${e}:${o}! ${n.message}`;this._errorHandler.handleError(new Error(a))})}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(e,o){e&2&&(g("data-mat-icon-type",o._usingFontIcon()?"font":"svg")("data-mat-icon-name",o._svgName||o.fontIcon)("data-mat-icon-namespace",o._svgNamespace||o.fontSet)("fontIcon",o._usingFontIcon()?o.fontIcon:null),Tt(o.color?"mat-"+o.color:""),O("mat-icon-inline",o.inline)("mat-icon-no-color",o.color!=="primary"&&o.color!=="accent"&&o.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",y],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:_o,decls:1,vars:0,template:function(e,o){e&1&&(St(),It(0))},styles:[`mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto} `],encapsulation:2,changeDetection:0})}return i})(),Di=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=E({type:i});static \u0275inj=x({imports:[j]})}return i})();function So(i,s){}var G=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext};var Jt=(()=>{class i extends De{_elementRef=l(I);_focusTrapFactory=l(Re);_config;_interactivityChecker=l(Fe);_ngZone=l(ce);_focusMonitor=l(Rt);_renderer=l(me);_changeDetectorRef=l(st);_injector=l(F);_platform=l(ke);_document=l(J);_portalOutlet;_focusTrapped=new T;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=l(G,{optional:!0})||new G,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){let e=this._ariaLabelledByQueue.indexOf(t);e>-1&&(this._ariaLabelledByQueue.splice(e,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();let e=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),e}attachTemplatePortal(t){this._portalOutlet.hasAttached();let e=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),e}attachDomPortal=t=>{this._portalOutlet.hasAttached();let e=this._portalOutlet.attachDomPortal(t);return this._contentAttached(),e};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,e){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{n(),a(),t.removeAttribute("tabindex")},n=this._renderer.listen(t,"blur",o),a=this._renderer.listen(t,"mousedown",o)})),t.focus(e)}_focusByCssSelector(t,e){let o=this._elementRef.nativeElement.querySelector(t);o&&this._forceFocus(o,e)}_trapFocus(t){this._isDestroyed||ue(()=>{let e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus(t);break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement(t)||this._focusDialogContainer(t);break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]',t);break;default:this._focusByCssSelector(this._config.autoFocus,t);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let t=this._config.restoreFocus,e=null;if(typeof t=="string"?e=this._document.querySelector(t):typeof t=="boolean"?e=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(e=t),this._config.restoreFocus&&e&&typeof e.focus=="function"){let o=Et(),n=this._elementRef.nativeElement;(!o||o===this._document.body||o===n||n.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(e,this._closeInteractionType),this._closeInteractionType=null):e.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(t){this._elementRef.nativeElement.focus?.(t)}_containsFocus(){let t=this._elementRef.nativeElement,e=Et();return t===e||t.contains(e)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Et()))}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(e,o){if(e&1&&et(ct,7),e&2){let n;U(n=W())&&(o._portalOutlet=n.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,o){e&2&&g("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},features:[Z],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,o){e&1&&Y(0,So,0,0,"ng-template",0)},dependencies:[ct],styles:[`.cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit} `],encapsulation:2})}return i})(),gt=class{overlayRef;config;componentInstance=null;componentRef=null;containerInstance;disableClose;closed=new T;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(s,t){this.overlayRef=s,this.config=t,this.disableClose=t.disableClose,this.backdropClick=s.backdropClick(),this.keydownEvents=s.keydownEvents(),this.outsidePointerEvents=s.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(e=>{e.keyCode===27&&!this.disableClose&&!ot(e)&&(e.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:"mouse"}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=s.detachments().subscribe(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(s,t){if(this._canClose(s)){let e=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),e.next(s),e.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(s="",t=""){return this.overlayRef.updateSize({width:s,height:t}),this}addPanelClass(s){return this.overlayRef.addPanelClass(s),this}removePanelClass(s){return this.overlayRef.removePanelClass(s),this}_canClose(s){let t=this.config;return!!this.containerInstance&&(!t.closePredicate||t.closePredicate(s,t,this.componentInstance))}},Io=new h("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=l(F);return()=>Ot(i)}}),ko=new h("DialogData"),wo=new h("DefaultDialogConfig");function To(i){let s=bt(i),t=new P;return{valueSignal:s,get value(){return s()},change:t,ngOnDestroy(){t.complete()}}}var Kt=(()=>{class i{_injector=l(F);_defaultOptions=l(wo,{optional:!0});_parentDialog=l(i,{optional:!0,skipSelf:!0});_overlayContainer=l(Ae);_idGenerator=l(z);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new T;_afterOpenedAtThisLevel=new T;_ariaHiddenElements=new Map;_scrollStrategy=l(Io);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=ht(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(pt(void 0)));constructor(){}open(t,e){let o=this._defaultOptions||new G;e=M(M({},o),e),e.id=e.id||this._idGenerator.getId("cdk-dialog-"),e.id&&this.getDialogById(e.id);let n=this._getOverlayConfig(e),a=Oe(this._injector,n),r=new gt(a,e),d=this._attachContainer(a,r,e);if(r.containerInstance=d,!this.openDialogs.length){let c=this._overlayContainer.getContainerElement();d._focusTrapped?d._focusTrapped.pipe(N(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(c)}):this._hideNonDialogContentFromAssistiveTechnology(c)}return this._attachDialogContent(t,r,d,e),this.openDialogs.push(r),r.closed.subscribe(()=>this._removeOpenDialog(r,!0)),this.afterOpened.next(r),r}closeAll(){qt(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(e=>e.id===t)}ngOnDestroy(){qt(this._openDialogsAtThisLevel,t=>{t.config.closeOnDestroy===!1&&this._removeOpenDialog(t,!1)}),qt(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){let e=new xe({positionStrategy:t.positionStrategy||Mt().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation,disableAnimations:t.disableAnimations});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}_attachContainer(t,e,o){let n=o.injector||o.viewContainerRef?.injector,a=[{provide:G,useValue:o},{provide:gt,useValue:e},{provide:Ee,useValue:t}],r;o.container?typeof o.container=="function"?r=o.container:(r=o.container.type,a.push(...o.container.providers(o))):r=Jt;let d=new Qt(r,o.viewContainerRef,F.create({parent:n||this._injector,providers:a}));return t.attach(d).instance}_attachDialogContent(t,e,o,n){if(t instanceof ge){let a=this._createInjector(n,e,o,void 0),r={$implicit:n.data,dialogRef:e};n.templateContext&&(r=M(M({},r),typeof n.templateContext=="function"?n.templateContext():n.templateContext)),o.attachTemplatePortal(new Te(t,null,r,a))}else{let a=this._createInjector(n,e,o,this._injector),r=o.attachComponentPortal(new Qt(t,n.viewContainerRef,a));e.componentRef=r,e.componentInstance=r.instance}}_createInjector(t,e,o,n){let a=t.injector||t.viewContainerRef?.injector,r=[{provide:ko,useValue:t.data},{provide:gt,useValue:e}];return t.providers&&(typeof t.providers=="function"?r.push(...t.providers(e,t,o)):r.push(...t.providers)),t.direction&&(!a||!a.get(lt,null,{optional:!0}))&&r.push({provide:lt,useValue:To(t.direction)}),F.create({parent:a||n,providers:r})}_removeOpenDialog(t,e){let o=this.openDialogs.indexOf(t);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((n,a)=>{n?a.setAttribute("aria-hidden",n):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),e&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(t){if(t.parentElement){let e=t.parentElement.children;for(let o=e.length-1;o>-1;o--){let n=e[o];n!==t&&n.nodeName!=="SCRIPT"&&n.nodeName!=="STYLE"&&!n.hasAttribute("aria-live")&&!n.hasAttribute("popover")&&(this._ariaHiddenElements.set(n,n.getAttribute("aria-hidden")),n.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(e){return new(e||i)};static \u0275prov=D({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function qt(i,s){let t=i.length;for(;t--;)s(i[t])}var Ke=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=E({type:i});static \u0275inj=x({providers:[Kt],imports:[Ft,dt,Ne,dt]})}return i})();function Do(i,s){}var Bt=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;closePredicate;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;enterAnimationDuration;exitAnimationDuration},Zt="mdc-dialog--open",Ze="mdc-dialog--opening",Ye="mdc-dialog--closing",xo=150,Ao=75,Eo=(()=>{class i extends Jt{_animationStateChanged=new P;_animationsEnabled=!ut();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?to(this._config.enterAnimationDuration)??xo:0;_exitAnimationDuration=this._animationsEnabled?to(this._config.exitAnimationDuration)??Ao:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Xe,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Ze,Zt)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(Zt),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(Zt),this._animationsEnabled?(this._hostElement.style.setProperty(Xe,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Ye)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(t){this._actionSectionCount+=t,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(Ze,Ye)}_waitForAnimationToComplete(t,e){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(e,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(t):t()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(t){let e=super.attachComponentPortal(t);return e.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),e}static \u0275fac=(()=>{let t;return function(o){return(t||(t=vt(i)))(o||i)}})();static \u0275cmp=A({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(e,o){e&2&&(Wt("id",o._config.id),g("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),O("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},features:[Z],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,o){e&1&&(v(0,"div",0)(1,"div",1),Y(2,Do,0,0,"ng-template",2),w()())},dependencies:[ct],styles:[`.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mat-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mat-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mat-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mat-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mat-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mat-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mat-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mat-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;box-sizing:border-box;min-height:52px;margin:0;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents} diff --git a/gns3server/static/web-ui/chunk-D2KWEP5N.js b/gns3server/static/web-ui/chunk-D2KWEP5N.js deleted file mode 100644 index 0ce907f04..000000000 --- a/gns3server/static/web-ui/chunk-D2KWEP5N.js +++ /dev/null @@ -1 +0,0 @@ -import{$ as a}from"./chunk-EI7RU2ND.js";import"./chunk-6QUQX5EO.js";export{a as TopologySummaryComponent}; diff --git a/gns3server/static/web-ui/chunk-TPRJS75F.js b/gns3server/static/web-ui/chunk-DIOHTFPG.js similarity index 97% rename from gns3server/static/web-ui/chunk-TPRJS75F.js rename to gns3server/static/web-ui/chunk-DIOHTFPG.js index 74eefe33a..0ccf8da05 100644 --- a/gns3server/static/web-ui/chunk-TPRJS75F.js +++ b/gns3server/static/web-ui/chunk-DIOHTFPG.js @@ -1 +1 @@ -import{b as V,d as A,e as z,l as $,m as R,p as L,q as G,r as W,s as Y,t as X,u as U,v as q,x as H}from"./chunk-EZEP55N7.js";import{Dc as O,Gb as _,Ib as f,Kb as s,Pa as l,Wb as v,Xc as F,Yb as a,Zb as x,_ as w,_a as M,a as b,bc as k,cc as T,dc as D,ia as C,j as S,ma as p,mf as B,na as u,nf as N,ob as j,pb as m,rb as d,ub as E,vb as I,wb as h,xb as e,ya as g,yb as n,zb as P}from"./chunk-6QUQX5EO.js";function J(o,c){if(o&1){let t=_();e(0,"div",3)(1,"mat-icon",6),a(2,"warning"),n(),e(3,"p",7),a(4,"Ready to inject a network fault?"),n(),e(5,"div",8)(6,"p",9),a(7,"Number of faults to inject"),n(),e(8,"mat-button-toggle-group",10),D("valueChange",function(i){p(t);let y=s();return T(y.faultType,i)||(y.faultType=i),u(i)}),e(9,"mat-button-toggle",11),a(10,"1"),n(),e(11,"mat-button-toggle",11),a(12,"2"),n(),e(13,"mat-button-toggle",11),a(14,"3"),n(),e(15,"mat-button-toggle",11),a(16,"Random"),n()()(),e(17,"p",12),a(18," This will inject a simulated network fault into your topology for troubleshooting practice. Make sure you have saved your current work. "),n(),e(19,"p",12),a(20," The fault injection process will analyze your topology, select an appropriate fault, and apply it automatically. You'll be able to see the details in AI Chat. "),n()()}if(o&2){let t=s();l(8),k("value",t.faultType),l(),h("value",1),l(2),h("value",2),l(2),h("value",3),l(2),h("value","random")}}function K(o,c){if(o&1&&(e(0,"p",17),a(1),n(),e(2,"p",18),a(3,"Agent is working"),n()),o&2){let t=s(2);l(),x(t.currentStep()||"Injecting fault...")}}function Q(o,c){if(o&1&&(e(0,"div",19)(1,"mat-icon",20),a(2),n(),e(3,"div",21)(4,"p",22),a(5),n(),e(6,"p",23),a(7,"Check the AI Chat panel for detailed execution history and tool results."),n()()()),o&2){let t=s(2);v("success",t.completionStatus()==="success")("error",t.completionStatus()==="error")("aborted",t.completionStatus()==="aborted"),l(2),x(t.completionStatus()==="success"?"check_circle":t.completionStatus()==="aborted"?"cancel":"error"),l(3),x(t.completionTitle())}}function Z(o,c){if(o&1&&(e(0,"div",26)(1,"mat-icon"),a(2),n(),e(3,"div",27)(4,"p",28),a(5),n()()()),o&2){let t=c.$implicit,r=s(3);v("success",t.type==="success")("error",t.type==="error"),l(2),x(r.getEventIcon(t.type)),l(3),x(t.message)}}function tt(o,c){if(o&1&&(e(0,"div",16)(1,"h3"),a(2,"Progress"),n(),e(3,"div",24),E(4,Z,6,6,"div",25,j().trackByEventId,!0),n()()),o&2){let t=s(2);l(4),I(t.displayedEvents())}}function et(o,c){if(o&1&&(e(0,"div",13),P(1,"img",14),n(),m(2,K,4,1),m(3,Q,8,8,"div",15),m(4,tt,6,0,"div",16)),o&2){let t=s();v("injecting",t.isInjecting()),l(2),d(t.isInjecting()?2:-1),l(),d(t.completed()&&!t.isInjecting()?3:-1),l(),d(t.isInjecting()&&t.displayedEvents().length>0?4:-1)}}function nt(o,c){if(o&1){let t=_();e(0,"button",29),f("click",function(){p(t);let i=s();return u(i.onCancelConfirm())}),a(1,"Cancel"),n(),e(2,"button",30),f("click",function(){p(t);let i=s();return u(i.onConfirmInject())}),e(3,"mat-icon"),a(4,"bug_report"),n(),e(5,"span"),a(6,"Confirm & Inject"),n()()}}function it(o,c){if(o&1){let t=_();e(0,"button",29),f("click",function(){p(t);let i=s();return u(i.onAbort())}),a(1,"Abort"),n()}}function ot(o,c){if(o&1){let t=_();e(0,"button",29),f("click",function(){p(t);let i=s();return u(i.onCancel())}),a(1,"Cancel"),n(),e(2,"button",30),f("click",function(){p(t);let i=s();return u(i.onInject())}),e(3,"mat-icon"),a(4,"bug_report"),n(),e(5,"span"),a(6,"Inject Fault"),n()()}}function at(o,c){if(o&1){let t=_();e(0,"button",29),f("click",function(){p(t);let i=s();return u(i.onViewDetails())}),e(1,"mat-icon"),a(2,"chat"),n(),e(3,"span"),a(4,"View in AI Chat"),n()(),e(5,"button",31),f("click",function(){p(t);let i=s();return u(i.onClose())}),e(6,"mat-icon"),a(7,"check"),n(),e(8,"span"),a(9,"Done"),n()()}}var bt=(()=>{class o{dialogRef=C($);data=C(R);aiChatService=C(H);controller=this.data.controller;project=this.data.project;isInjecting=g(!1);completed=g(!1);showConfirm=g(!1);faultType=O(1);faceState=g("idle");completionStatus=g("success");completionTitle=g("");currentStep=g("");eventsBuffer=[];displayedEvents=g([]);firstToolCallProcessed=!1;destroy$=new S;static MAX_DISPLAYED_EVENTS=3;ngOnInit(){this.faceState.set("idle")}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onInject(){this.showConfirm.set(!0)}onCancelConfirm(){this.showConfirm.set(!1)}onConfirmInject(){if(this.isInjecting())return;this.showConfirm.set(!1),this.isInjecting.set(!0),this.completed.set(!1),this.faceState.set("injecting"),this.eventsBuffer=[],this.displayedEvents.set([]),this.firstToolCallProcessed=!1;let r=`Inject ${this.faultType()==="random"?"random":String(this.faultType())} network fault(s) for troubleshooting practice`;this.aiChatService.injectFault(this.controller,this.project.project_id,r).pipe(w(this.destroy$)).subscribe({next:i=>{this.handleFaultEvent(i)},error:i=>{this.handleError(i)},complete:()=>{}})}handleFaultEvent(t){if(console.log("Fault injection event:",t),!(t.type==="heartbeat"||t.type==="content"))switch(t.type){case"tool_call":if(t.tool_call&&!this.firstToolCallProcessed){let r=t.tool_call.function.name;this.currentStep.set(`Preparing: ${r}`),this.addEvent({type:"tool_call",message:`Preparing: ${r}`}),this.firstToolCallProcessed=!0}break;case"tool_start":t.tool_name&&(this.currentStep.set(`Executing: ${t.tool_name}`),this.addEvent({type:"info",message:`Executing: ${t.tool_name}`}));break;case"tool_end":t.tool_name&&this.addEvent({type:"success",message:`Completed: ${t.tool_name}`});break;case"error":this.handleError(t);break;case"done":this.isInjecting.set(!1),this.completed.set(!0),this.faceState.set("success"),this.completionStatus.set("success"),this.completionTitle.set("Fault injected successfully!"),this.currentStep.set("");break}}handleError(t){console.error("Fault injection error:",t);let r=t?.error?.message||t?.message||t?.error||"Failed to inject fault";this.addEvent({type:"error",message:"Error injecting fault",details:r}),this.isInjecting.set(!1),this.completed.set(!0),this.faceState.set("error"),this.completionStatus.set("error"),this.completionTitle.set("Failed to inject fault"),this.currentStep.set("")}addEvent(t){let r=b({id:`event_${Date.now()}_${Math.random().toString(36).substring(2,11)}`,timestamp:new Date().toISOString()},t);this.eventsBuffer.push(r),this.eventsBuffer.length>o.MAX_DISPLAYED_EVENTS&&this.eventsBuffer.shift(),this.displayedEvents.set([...this.eventsBuffer])}getEventIcon(t){switch(t){case"info":return"info";case"tool_call":return"build";case"success":return"check_circle";case"error":return"error";default:return"info"}}onAbort(){this.isInjecting.set(!1),this.completed.set(!0),this.faceState.set("aborted"),this.completionStatus.set("aborted"),this.completionTitle.set("Fault injection aborted"),this.currentStep.set(""),this.destroy$.next(),this.addEvent({type:"info",message:"Fault injection aborted by user"})}onViewDetails(){this.dialogRef.close({success:this.completionStatus()==="success",openAIChat:!0})}onCancel(){this.isInjecting()||this.dialogRef.close(null)}onClose(){this.dialogRef.close({success:this.completionStatus()==="success",events:this.displayedEvents()})}trackByEventId(t,r){return r.id}static \u0275fac=function(r){return new(r||o)};static \u0275cmp=M({type:o,selectors:[["app-fault-injection-dialog"]],inputs:{faultType:[1,"faultType"]},outputs:{faultType:"faultTypeChange"},decls:13,vars:6,consts:[["mat-dialog-title","",1,"fault-injection-title"],[1,"fault-injection-icon"],["mat-dialog-content","",1,"fault-injection-content"],[1,"confirm-panel"],["mat-dialog-actions","","align","end"],["mat-button",""],[1,"confirm-panel__icon"],[1,"confirm-panel__title"],[1,"fault-type-selector"],[1,"fault-type-selector__label"],["hideSingleSelectionIndicator","true",1,"fault-type-selector__group",3,"valueChange","value"],[1,"fault-type-btn",3,"value"],[1,"confirm-panel__desc"],[1,"animation-area"],["src","assets/gns3_icon.svg","alt","GNS3",1,"gns3-logo"],[1,"completion-message",3,"success","error","aborted"],[1,"events-section"],[1,"status-main"],[1,"status-sub"],[1,"completion-message"],[1,"completion-icon"],[1,"completion-content"],[1,"completion-title"],[1,"completion-text"],[1,"events-list"],[1,"event",3,"success","error"],[1,"event"],[1,"event-content"],[1,"event-msg"],["mat-button","",3,"click"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(r,i){r&1&&(e(0,"h2",0)(1,"mat-icon",1),a(2,"bug_report"),n(),e(3,"span"),a(4,"Fault Injection"),n()(),e(5,"div",2),m(6,J,21,5,"div",3),m(7,et,5,5),n(),e(8,"div",4),m(9,nt,7,0),m(10,it,2,0,"button",5),m(11,ot,7,0),m(12,at,10,0),n()),r&2&&(l(6),d(i.showConfirm()?6:-1),l(),d(!i.showConfirm()||i.isInjecting()||i.completed()?7:-1),l(2),d(i.showConfirm()?9:-1),l(),d(i.isInjecting()?10:-1),l(),d(!i.showConfirm()&&!i.isInjecting()&&!i.completed()?11:-1),l(),d(i.completed()&&!i.isInjecting()?12:-1))},dependencies:[F,Y,L,W,G,N,B,z,A,V,q,X,U],styles:[".fault-injection-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.fault-injection-icon[_ngcontent-%COMP%]{font-size:24px;width:24px;height:24px;color:var(--mat-sys-error)}.fault-injection-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.confirm-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;padding:32px 24px;text-align:center}.confirm-panel__icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;color:var(--mat-sys-error)}.confirm-panel__title[_ngcontent-%COMP%]{font-size:20px;font-weight:500;margin:0;color:var(--mat-sys-on-surface)}.confirm-panel__desc[_ngcontent-%COMP%]{font-size:14px;margin:0;color:var(--mat-sys-on-surface-variant);line-height:1.6;text-align:left;width:100%}.fault-type-selector[_ngcontent-%COMP%]{width:100%;max-width:360px}.fault-type-selector__label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;margin:0 0 8px;text-align:left;color:var(--mat-sys-on-surface-variant)}.fault-type-selector__group[_ngcontent-%COMP%]{display:flex;gap:6px;width:100%;border:none;border-radius:0}.fault-type-btn[_ngcontent-%COMP%]{flex:1;min-width:0;height:36px;font-size:13px;font-weight:500;border:1px solid var(--mat-sys-outline-variant);border-radius:8px;color:var(--mat-sys-on-surface);display:flex;align-items:center;justify-content:center}.fault-type-btn.mat-button-toggle-checked[_ngcontent-%COMP%]{border-color:var(--mat-sys-primary);background:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);font-weight:600}.animation-area[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;padding:32px;background:var(--mat-sys-surface-container-low);border-radius:12px;min-height:200px}.animation-area.injecting[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--mat-sys-error-container) 30%,var(--mat-sys-surface-container-low))}.gns3-logo[_ngcontent-%COMP%]{width:120px;height:120px}.status-main[_ngcontent-%COMP%]{font-size:18px;font-weight:500;margin:0;text-align:center;color:var(--mat-sys-on-surface)}.status-sub[_ngcontent-%COMP%]{font-size:14px;margin:0;text-align:center;color:var(--mat-sys-on-surface-variant)}.completion-message[_ngcontent-%COMP%]{display:flex;gap:16px;padding:20px;background:var(--mat-sys-surface-container-low);border-radius:12px;border-left:4px solid var(--mat-sys-primary)}.completion-message.success[_ngcontent-%COMP%]{border-left-color:var(--mat-sys-primary);background:var(--mat-sys-primary-container-low)}.completion-message.error[_ngcontent-%COMP%]{border-left-color:var(--mat-sys-error);background:var(--mat-sys-error-container-low)}.completion-message.aborted[_ngcontent-%COMP%]{border-left-color:var(--mat-sys-outline);background:var(--mat-sys-surface-container-high)}.completion-icon[_ngcontent-%COMP%]{font-size:32px;width:32px;height:32px;flex-shrink:0;color:var(--mat-sys-primary)}.completion-message.error[_ngcontent-%COMP%] .completion-icon[_ngcontent-%COMP%]{color:var(--mat-sys-error)}.completion-message.aborted[_ngcontent-%COMP%] .completion-icon[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant)}.completion-content[_ngcontent-%COMP%]{flex:1}.completion-title[_ngcontent-%COMP%]{font-size:18px;font-weight:500;margin:0 0 8px;color:var(--mat-sys-on-surface)}.completion-text[_ngcontent-%COMP%]{font-size:14px;margin:0;color:var(--mat-sys-on-surface-variant);line-height:1.5}.events-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.events-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;font-weight:500;margin:0;color:var(--mat-sys-on-surface)}.events-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.event[_ngcontent-%COMP%]{display:flex;gap:12px;padding:12px 16px;background:var(--mat-sys-surface-container-low);border-radius:8px;border-left:3px solid var(--mat-sys-outline)}.event.success[_ngcontent-%COMP%]{border-left-color:var(--mat-sys-primary);background:var(--mat-sys-primary-container-low)}.event.error[_ngcontent-%COMP%]{border-left-color:var(--mat-sys-error);background:var(--mat-sys-error-container-low)}.event[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;flex-shrink:0;color:var(--mat-sys-on-surface-variant)}.event-content[_ngcontent-%COMP%]{flex:1;min-width:0}.event-msg[_ngcontent-%COMP%]{font-size:14px;font-weight:500;margin:0 0 4px;color:var(--mat-sys-on-surface);word-wrap:break-word}.event-details[_ngcontent-%COMP%]{font-size:12px;margin:0;color:var(--mat-sys-on-surface-variant);word-wrap:break-word}"],changeDetection:0})}return o})();export{bt as FaultInjectionDialogComponent}; +import{b as V,d as A,e as z,l as $,m as R,p as L,q as G,r as W,s as Y,t as X,u as U,v as q,x as H}from"./chunk-764TLGKY.js";import{$a as d,Ea as l,Eb as v,Gb as a,Hb as x,Lb as k,Ma as M,Mb as T,Nb as D,X as w,Ya as j,Za as m,Ze as B,_e as N,a as b,cb as E,da as C,db as I,eb as h,fb as e,ga as p,gb as n,ha as u,hb as P,i as S,jc as O,ob as _,qa as g,qb as f,sb as s,yc as F}from"./chunk-72DGZVTL.js";function J(o,c){if(o&1){let t=_();e(0,"div",3)(1,"mat-icon",6),a(2,"warning"),n(),e(3,"p",7),a(4,"Ready to inject a network fault?"),n(),e(5,"div",8)(6,"p",9),a(7,"Number of faults to inject"),n(),e(8,"mat-button-toggle-group",10),D("valueChange",function(i){p(t);let y=s();return T(y.faultType,i)||(y.faultType=i),u(i)}),e(9,"mat-button-toggle",11),a(10,"1"),n(),e(11,"mat-button-toggle",11),a(12,"2"),n(),e(13,"mat-button-toggle",11),a(14,"3"),n(),e(15,"mat-button-toggle",11),a(16,"Random"),n()()(),e(17,"p",12),a(18," This will inject a simulated network fault into your topology for troubleshooting practice. Make sure you have saved your current work. "),n(),e(19,"p",12),a(20," The fault injection process will analyze your topology, select an appropriate fault, and apply it automatically. You'll be able to see the details in AI Chat. "),n()()}if(o&2){let t=s();l(8),k("value",t.faultType),l(),h("value",1),l(2),h("value",2),l(2),h("value",3),l(2),h("value","random")}}function K(o,c){if(o&1&&(e(0,"p",17),a(1),n(),e(2,"p",18),a(3,"Agent is working"),n()),o&2){let t=s(2);l(),x(t.currentStep()||"Injecting fault...")}}function Q(o,c){if(o&1&&(e(0,"div",19)(1,"mat-icon",20),a(2),n(),e(3,"div",21)(4,"p",22),a(5),n(),e(6,"p",23),a(7,"Check the AI Chat panel for detailed execution history and tool results."),n()()()),o&2){let t=s(2);v("success",t.completionStatus()==="success")("error",t.completionStatus()==="error")("aborted",t.completionStatus()==="aborted"),l(2),x(t.completionStatus()==="success"?"check_circle":t.completionStatus()==="aborted"?"cancel":"error"),l(3),x(t.completionTitle())}}function Z(o,c){if(o&1&&(e(0,"div",26)(1,"mat-icon"),a(2),n(),e(3,"div",27)(4,"p",28),a(5),n()()()),o&2){let t=c.$implicit,r=s(3);v("success",t.type==="success")("error",t.type==="error"),l(2),x(r.getEventIcon(t.type)),l(3),x(t.message)}}function tt(o,c){if(o&1&&(e(0,"div",16)(1,"h3"),a(2,"Progress"),n(),e(3,"div",24),E(4,Z,6,6,"div",25,j().trackByEventId,!0),n()()),o&2){let t=s(2);l(4),I(t.displayedEvents())}}function et(o,c){if(o&1&&(e(0,"div",13),P(1,"img",14),n(),m(2,K,4,1),m(3,Q,8,8,"div",15),m(4,tt,6,0,"div",16)),o&2){let t=s();v("injecting",t.isInjecting()),l(2),d(t.isInjecting()?2:-1),l(),d(t.completed()&&!t.isInjecting()?3:-1),l(),d(t.isInjecting()&&t.displayedEvents().length>0?4:-1)}}function nt(o,c){if(o&1){let t=_();e(0,"button",29),f("click",function(){p(t);let i=s();return u(i.onCancelConfirm())}),a(1,"Cancel"),n(),e(2,"button",30),f("click",function(){p(t);let i=s();return u(i.onConfirmInject())}),e(3,"mat-icon"),a(4,"bug_report"),n(),e(5,"span"),a(6,"Confirm & Inject"),n()()}}function it(o,c){if(o&1){let t=_();e(0,"button",29),f("click",function(){p(t);let i=s();return u(i.onAbort())}),a(1,"Abort"),n()}}function ot(o,c){if(o&1){let t=_();e(0,"button",29),f("click",function(){p(t);let i=s();return u(i.onCancel())}),a(1,"Cancel"),n(),e(2,"button",30),f("click",function(){p(t);let i=s();return u(i.onInject())}),e(3,"mat-icon"),a(4,"bug_report"),n(),e(5,"span"),a(6,"Inject Fault"),n()()}}function at(o,c){if(o&1){let t=_();e(0,"button",29),f("click",function(){p(t);let i=s();return u(i.onViewDetails())}),e(1,"mat-icon"),a(2,"chat"),n(),e(3,"span"),a(4,"View in AI Chat"),n()(),e(5,"button",31),f("click",function(){p(t);let i=s();return u(i.onClose())}),e(6,"mat-icon"),a(7,"check"),n(),e(8,"span"),a(9,"Done"),n()()}}var bt=(()=>{class o{dialogRef=C($);data=C(R);aiChatService=C(H);controller=this.data.controller;project=this.data.project;isInjecting=g(!1);completed=g(!1);showConfirm=g(!1);faultType=O(1);faceState=g("idle");completionStatus=g("success");completionTitle=g("");currentStep=g("");eventsBuffer=[];displayedEvents=g([]);firstToolCallProcessed=!1;destroy$=new S;static MAX_DISPLAYED_EVENTS=3;ngOnInit(){this.faceState.set("idle")}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onInject(){this.showConfirm.set(!0)}onCancelConfirm(){this.showConfirm.set(!1)}onConfirmInject(){if(this.isInjecting())return;this.showConfirm.set(!1),this.isInjecting.set(!0),this.completed.set(!1),this.faceState.set("injecting"),this.eventsBuffer=[],this.displayedEvents.set([]),this.firstToolCallProcessed=!1;let r=`Inject ${this.faultType()==="random"?"random":String(this.faultType())} network fault(s) for troubleshooting practice`;this.aiChatService.injectFault(this.controller,this.project.project_id,r).pipe(w(this.destroy$)).subscribe({next:i=>{this.handleFaultEvent(i)},error:i=>{this.handleError(i)},complete:()=>{}})}handleFaultEvent(t){if(console.log("Fault injection event:",t),!(t.type==="heartbeat"||t.type==="content"))switch(t.type){case"tool_call":if(t.tool_call&&!this.firstToolCallProcessed){let r=t.tool_call.function.name;this.currentStep.set(`Preparing: ${r}`),this.addEvent({type:"tool_call",message:`Preparing: ${r}`}),this.firstToolCallProcessed=!0}break;case"tool_start":t.tool_name&&(this.currentStep.set(`Executing: ${t.tool_name}`),this.addEvent({type:"info",message:`Executing: ${t.tool_name}`}));break;case"tool_end":t.tool_name&&this.addEvent({type:"success",message:`Completed: ${t.tool_name}`});break;case"error":this.handleError(t);break;case"done":this.isInjecting.set(!1),this.completed.set(!0),this.faceState.set("success"),this.completionStatus.set("success"),this.completionTitle.set("Fault injected successfully!"),this.currentStep.set("");break}}handleError(t){console.error("Fault injection error:",t);let r=t?.error?.message||t?.message||t?.error||"Failed to inject fault";this.addEvent({type:"error",message:"Error injecting fault",details:r}),this.isInjecting.set(!1),this.completed.set(!0),this.faceState.set("error"),this.completionStatus.set("error"),this.completionTitle.set("Failed to inject fault"),this.currentStep.set("")}addEvent(t){let r=b({id:`event_${Date.now()}_${Math.random().toString(36).substring(2,11)}`,timestamp:new Date().toISOString()},t);this.eventsBuffer.push(r),this.eventsBuffer.length>o.MAX_DISPLAYED_EVENTS&&this.eventsBuffer.shift(),this.displayedEvents.set([...this.eventsBuffer])}getEventIcon(t){switch(t){case"info":return"info";case"tool_call":return"build";case"success":return"check_circle";case"error":return"error";default:return"info"}}onAbort(){this.isInjecting.set(!1),this.completed.set(!0),this.faceState.set("aborted"),this.completionStatus.set("aborted"),this.completionTitle.set("Fault injection aborted"),this.currentStep.set(""),this.destroy$.next(),this.addEvent({type:"info",message:"Fault injection aborted by user"})}onViewDetails(){this.dialogRef.close({success:this.completionStatus()==="success",openAIChat:!0})}onCancel(){this.isInjecting()||this.dialogRef.close(null)}onClose(){this.dialogRef.close({success:this.completionStatus()==="success",events:this.displayedEvents()})}trackByEventId(t,r){return r.id}static \u0275fac=function(r){return new(r||o)};static \u0275cmp=M({type:o,selectors:[["app-fault-injection-dialog"]],inputs:{faultType:[1,"faultType"]},outputs:{faultType:"faultTypeChange"},decls:13,vars:6,consts:[["mat-dialog-title","",1,"fault-injection-title"],[1,"fault-injection-icon"],["mat-dialog-content","",1,"fault-injection-content"],[1,"confirm-panel"],["mat-dialog-actions","","align","end"],["mat-button",""],[1,"confirm-panel__icon"],[1,"confirm-panel__title"],[1,"fault-type-selector"],[1,"fault-type-selector__label"],["hideSingleSelectionIndicator","true",1,"fault-type-selector__group",3,"valueChange","value"],[1,"fault-type-btn",3,"value"],[1,"confirm-panel__desc"],[1,"animation-area"],["src","assets/gns3_icon.svg","alt","GNS3",1,"gns3-logo"],[1,"completion-message",3,"success","error","aborted"],[1,"events-section"],[1,"status-main"],[1,"status-sub"],[1,"completion-message"],[1,"completion-icon"],[1,"completion-content"],[1,"completion-title"],[1,"completion-text"],[1,"events-list"],[1,"event",3,"success","error"],[1,"event"],[1,"event-content"],[1,"event-msg"],["mat-button","",3,"click"],["mat-raised-button","","color","warn",3,"click"],["mat-raised-button","","color","primary",3,"click"]],template:function(r,i){r&1&&(e(0,"h2",0)(1,"mat-icon",1),a(2,"bug_report"),n(),e(3,"span"),a(4,"Fault Injection"),n()(),e(5,"div",2),m(6,J,21,5,"div",3),m(7,et,5,5),n(),e(8,"div",4),m(9,nt,7,0),m(10,it,2,0,"button",5),m(11,ot,7,0),m(12,at,10,0),n()),r&2&&(l(6),d(i.showConfirm()?6:-1),l(),d(!i.showConfirm()||i.isInjecting()||i.completed()?7:-1),l(2),d(i.showConfirm()?9:-1),l(),d(i.isInjecting()?10:-1),l(),d(!i.showConfirm()&&!i.isInjecting()&&!i.completed()?11:-1),l(),d(i.completed()&&!i.isInjecting()?12:-1))},dependencies:[F,Y,L,W,G,N,B,z,A,V,q,X,U],styles:[".fault-injection-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.fault-injection-icon[_ngcontent-%COMP%]{font-size:24px;width:24px;height:24px;color:var(--mat-sys-error)}.fault-injection-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px}.confirm-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;padding:32px 24px;text-align:center}.confirm-panel__icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;color:var(--mat-sys-error)}.confirm-panel__title[_ngcontent-%COMP%]{font-size:20px;font-weight:500;margin:0;color:var(--mat-sys-on-surface)}.confirm-panel__desc[_ngcontent-%COMP%]{font-size:14px;margin:0;color:var(--mat-sys-on-surface-variant);line-height:1.6;text-align:left;width:100%}.fault-type-selector[_ngcontent-%COMP%]{width:100%;max-width:360px}.fault-type-selector__label[_ngcontent-%COMP%]{font-size:12px;font-weight:500;margin:0 0 8px;text-align:left;color:var(--mat-sys-on-surface-variant)}.fault-type-selector__group[_ngcontent-%COMP%]{display:flex;gap:6px;width:100%;border:none;border-radius:0}.fault-type-btn[_ngcontent-%COMP%]{flex:1;min-width:0;height:36px;font-size:13px;font-weight:500;border:1px solid var(--mat-sys-outline-variant);border-radius:8px;color:var(--mat-sys-on-surface);display:flex;align-items:center;justify-content:center}.fault-type-btn.mat-button-toggle-checked[_ngcontent-%COMP%]{border-color:var(--mat-sys-primary);background:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container);font-weight:600}.animation-area[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;padding:32px;background:var(--mat-sys-surface-container-low);border-radius:12px;min-height:200px}.animation-area.injecting[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--mat-sys-error-container) 30%,var(--mat-sys-surface-container-low))}.gns3-logo[_ngcontent-%COMP%]{width:120px;height:120px}.status-main[_ngcontent-%COMP%]{font-size:18px;font-weight:500;margin:0;text-align:center;color:var(--mat-sys-on-surface)}.status-sub[_ngcontent-%COMP%]{font-size:14px;margin:0;text-align:center;color:var(--mat-sys-on-surface-variant)}.completion-message[_ngcontent-%COMP%]{display:flex;gap:16px;padding:20px;background:var(--mat-sys-surface-container-low);border-radius:12px;border-left:4px solid var(--mat-sys-primary)}.completion-message.success[_ngcontent-%COMP%]{border-left-color:var(--mat-sys-primary);background:var(--mat-sys-primary-container-low)}.completion-message.error[_ngcontent-%COMP%]{border-left-color:var(--mat-sys-error);background:var(--mat-sys-error-container-low)}.completion-message.aborted[_ngcontent-%COMP%]{border-left-color:var(--mat-sys-outline);background:var(--mat-sys-surface-container-high)}.completion-icon[_ngcontent-%COMP%]{font-size:32px;width:32px;height:32px;flex-shrink:0;color:var(--mat-sys-primary)}.completion-message.error[_ngcontent-%COMP%] .completion-icon[_ngcontent-%COMP%]{color:var(--mat-sys-error)}.completion-message.aborted[_ngcontent-%COMP%] .completion-icon[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant)}.completion-content[_ngcontent-%COMP%]{flex:1}.completion-title[_ngcontent-%COMP%]{font-size:18px;font-weight:500;margin:0 0 8px;color:var(--mat-sys-on-surface)}.completion-text[_ngcontent-%COMP%]{font-size:14px;margin:0;color:var(--mat-sys-on-surface-variant);line-height:1.5}.events-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.events-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;font-weight:500;margin:0;color:var(--mat-sys-on-surface)}.events-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.event[_ngcontent-%COMP%]{display:flex;gap:12px;padding:12px 16px;background:var(--mat-sys-surface-container-low);border-radius:8px;border-left:3px solid var(--mat-sys-outline)}.event.success[_ngcontent-%COMP%]{border-left-color:var(--mat-sys-primary);background:var(--mat-sys-primary-container-low)}.event.error[_ngcontent-%COMP%]{border-left-color:var(--mat-sys-error);background:var(--mat-sys-error-container-low)}.event[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;flex-shrink:0;color:var(--mat-sys-on-surface-variant)}.event-content[_ngcontent-%COMP%]{flex:1;min-width:0}.event-msg[_ngcontent-%COMP%]{font-size:14px;font-weight:500;margin:0 0 4px;color:var(--mat-sys-on-surface);word-wrap:break-word}.event-details[_ngcontent-%COMP%]{font-size:12px;margin:0;color:var(--mat-sys-on-surface-variant);word-wrap:break-word}"],changeDetection:0})}return o})();export{bt as FaultInjectionDialogComponent}; diff --git a/gns3server/static/web-ui/chunk-HJ5XTV4X.js b/gns3server/static/web-ui/chunk-HJ5XTV4X.js new file mode 100644 index 000000000..66e62cb53 --- /dev/null +++ b/gns3server/static/web-ui/chunk-HJ5XTV4X.js @@ -0,0 +1 @@ +import{$ as a}from"./chunk-NJCA2RVJ.js";import"./chunk-72DGZVTL.js";export{a as TopologySummaryComponent}; diff --git a/gns3server/static/web-ui/chunk-EI7RU2ND.js b/gns3server/static/web-ui/chunk-NJCA2RVJ.js similarity index 88% rename from gns3server/static/web-ui/chunk-EI7RU2ND.js rename to gns3server/static/web-ui/chunk-NJCA2RVJ.js index deccf4ef8..1e208fc21 100644 --- a/gns3server/static/web-ui/chunk-EI7RU2ND.js +++ b/gns3server/static/web-ui/chunk-NJCA2RVJ.js @@ -1,4 +1,4 @@ -import{$a as N,$b as di,$d as Oi,$e as Qi,A as Ye,Aa as Wt,Ab as kt,Ac as Qt,Ba as Y,Bb as Ot,Cb as ke,Cc as bi,D as Ke,Da as O,Ea as ai,Ec as W,Ed as Ci,F as J,Fd as Ti,G as dt,Gb as lt,Gc as S,Gd as ae,Hb as Rt,Hc as bt,Ib as u,Ic as gi,Jb as si,Jd as ne,Je as le,Kb as p,Ke as Bi,Lb as B,Ld as U,Le as zi,M as Ze,Mb as y,N as Xe,Nb as et,Nd as qt,Ne as Ni,Oa as ye,Ob as V,Od as oe,Oe as ji,Pa as c,Pb as m,Pc as vi,Pd as Mi,Pe as Ut,Qb as h,Qd as Si,Qe as ce,Ra as rt,Rb as li,Rd as Lt,Sa as Dt,Sb as ci,Sc as yi,Sd as Ii,Tb as we,Tc as xi,Td as ct,Te as de,U as Je,Ua as st,Ub as ht,Ue as Vi,Vb as Ce,Vd as re,Ve as Hi,W as ti,Wb as _,Wd as Di,We as $i,X as ei,Xa as ee,Xb as _t,Xc as ki,Y as at,Yb as E,Z as $t,Zb as pt,Zd as Ei,Ze as Wi,_ as I,_a as C,_b as ft,_d as Fi,_e as Ie,a as X,ab as x,ac as mi,ae as se,af as K,bc as hi,be as Me,cc as pi,ce as Se,cf as Gi,da as P,db as q,dc as fi,de as Pt,ea as z,eb as tt,ef as Q,fb as ni,ff as De,g as it,ga as w,gc as $,gf as Yt,ha as nt,hb as oi,hc as ui,hf as gt,i as Jt,ia as r,ic as _i,ie as Ri,j as k,jf as Ct,k as St,ke as Ai,lf as Kt,ma as R,mb as ri,mf as qi,na as A,nb as T,nf as Ui,o as Ue,oa as mt,od as wi,of as vt,pb as g,pd as wt,pe as Li,q as te,qa as G,qc as Te,qf as me,ra as It,rb as v,sd as Gt,sf as Yi,tb as xe,tf as Ki,ua as F,ub as Et,uc as At,v as Ht,va as H,vb as Ft,vd as ot,wb as D,wc as ie,wd as ut,xb as l,xd as j,ya as Z,yb as d,za as ii,zb as M,ze as Pi}from"./chunk-6QUQX5EO.js";var Ee=class{_box;_destroyed=new k;_resizeSubject=new k;_resizeObserver;_elementObservables=new Map;constructor(s){this._box=s,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(s){return this._elementObservables.has(s)||this._elementObservables.set(s,new Jt(t=>{let e=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(s,{box:this._box}),()=>{this._resizeObserver?.unobserve(s),e.unsubscribe(),this._elementObservables.delete(s)}}).pipe(dt(t=>t.some(e=>e.target===s)),ti({bufferSize:1,refCount:!0}),I(this._destroyed))),this._elementObservables.get(s)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},he=(()=>{class a{_cleanupErrorListener;_observers=new Map;_ngZone=r(H);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,t]of this._observers)t.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(t,e){let i=e?.box||"content-box";return this._observers.has(i)||this._observers.set(i,new Ee(i)),this._observers.get(i).observe(t)}static \u0275fac=function(e){return new(e||a)};static \u0275prov=P({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var Bt=["*"];function on(a,s){a&1&&y(0)}var ta=["tabListContainer"],ea=["tabList"],ia=["tabListInner"],aa=["nextPaginator"],na=["previousPaginator"],rn=["content"];function sn(a,s){}var ln=["tabBodyWrapper"],cn=["tabHeader"];function dn(a,s){}function mn(a,s){if(a&1&&tt(0,dn,0,0,"ng-template",12),a&2){let t=p().$implicit;D("cdkPortalOutlet",t.templateLabel)}}function hn(a,s){if(a&1&&E(0),a&2){let t=p().$implicit;pt(t.textLabel)}}function pn(a,s){if(a&1){let t=lt();l(0,"div",7,2),u("click",function(){let i=R(t),n=i.$implicit,o=i.$index,f=p(),b=ht(1);return A(f._handleClick(n,b,o))})("cdkFocusChange",function(i){let n=R(t).$index,o=p();return A(o._tabFocusChanged(i,n))}),M(2,"span",8)(3,"div",9),l(4,"span",10)(5,"span",11),g(6,mn,1,1,null,12)(7,hn,1,1),d()()()}if(a&2){let t=s.$implicit,e=s.$index,i=ht(1),n=p();_t(t.labelClass),_("mdc-tab--active",n.selectedIndex===e),D("id",n._getTabLabelId(t,e))("disabled",t.disabled)("fitInkBarToContent",n.fitInkBarToContent),T("tabIndex",n._getTabIndex(e))("aria-posinset",e+1)("aria-setsize",n._tabs.length)("aria-controls",n._getTabContentId(e))("aria-selected",n.selectedIndex===e)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),c(3),D("matRippleTrigger",i)("matRippleDisabled",t.disabled||n.disableRipple),c(3),v(t.templateLabel?6:7)}}function fn(a,s){a&1&&y(0)}function un(a,s){if(a&1){let t=lt();l(0,"mat-tab-body",13),u("_onCentered",function(){R(t);let i=p();return A(i._removeTabBodyWrapperHeight())})("_onCentering",function(i){R(t);let n=p();return A(n._setTabBodyWrapperHeight(i))})("_beforeCentering",function(i){R(t);let n=p();return A(n._bodyCentered(i))}),d()}if(a&2){let t=s.$implicit,e=s.$index,i=p();_t(t.bodyClass),D("id",i._getTabContentId(e))("content",t.content)("position",t.position)("animationDuration",i.animationDuration)("preserveContent",i.preserveContent),T("tabindex",i.contentTabIndex!=null&&i.selectedIndex===e?i.contentTabIndex:null)("aria-labelledby",i._getTabLabelId(t,e))("aria-hidden",i.selectedIndex!==e)}}var _n=["mat-tab-nav-bar",""],bn=["mat-tab-link",""],gn=new w("MatTabContent"),vn=(()=>{class a{template=r(Dt);constructor(){}static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,selectors:[["","matTabContent",""]],features:[$([{provide:gn,useExisting:a}])]})}return a})(),yn=new w("MatTabLabel"),oa=new w("MAT_TAB"),xn=(()=>{class a extends Si{_closestTab=r(oa,{optional:!0});static \u0275fac=(()=>{let t;return function(i){return(t||(t=Y(a)))(i||a)}})();static \u0275dir=x({type:a,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[$([{provide:yn,useExisting:a}]),q]})}return a})(),ra=new w("MAT_TAB_GROUP"),Ae=(()=>{class a{_viewContainerRef=r(ee);_closestTabGroup=r(ra,{optional:!0});disabled=!1;get templateLabel(){return this._templateLabel}set templateLabel(t){this._setTemplateLabelInput(t)}_templateLabel;_explicitContent=void 0;_implicitContent;textLabel="";ariaLabel;ariaLabelledby;labelClass;bodyClass;id=null;_contentPortal=null;get content(){return this._contentPortal}_stateChanges=new k;position=null;origin=null;isActive=!1;constructor(){r(wt).load(Ct)}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new oe(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(t){t&&t._closestTab===this&&(this._templateLabel=t)}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=C({type:a,selectors:[["mat-tab"]],contentQueries:function(e,i,n){if(e&1&&et(n,xn,5)(n,vn,7,Dt),e&2){let o;m(o=h())&&(i.templateLabel=o.first),m(o=h())&&(i._explicitContent=o.first)}},viewQuery:function(e,i){if(e&1&&V(Dt,7),e&2){let n;m(n=h())&&(i._implicitContent=n.first)}},hostAttrs:["hidden",""],hostVars:1,hostBindings:function(e,i){e&2&&T("id",null)},inputs:{disabled:[2,"disabled","disabled",S],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass",id:"id"},exportAs:["matTab"],features:[$([{provide:oa,useExisting:a}]),Wt],ngContentSelectors:Bt,decls:1,vars:0,template:function(e,i){e&1&&(B(),ni(0,on,1,0,"ng-template"))},encapsulation:2})}return a})(),Fe="mdc-tab-indicator--active",Zi="mdc-tab-indicator--no-transition",pe=class{_items;_currentItem;constructor(s){this._items=s}hide(){this._items.forEach(s=>s.deactivateInkBar()),this._currentItem=void 0}alignToElement(s){let t=this._items.find(i=>i.elementRef.nativeElement===s),e=this._currentItem;if(t!==e&&(e?.deactivateInkBar(),t)){let i=e?.elementRef.nativeElement.getBoundingClientRect?.();t.activateInkBar(i),this._currentItem=t}}},sa=(()=>{class a{_elementRef=r(O);_inkBarElement=null;_inkBarContentElement=null;_fitToContent=!1;get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){this._fitToContent!==t&&(this._fitToContent=t,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){let e=this._elementRef.nativeElement;if(!t||!e.getBoundingClientRect||!this._inkBarContentElement){e.classList.add(Fe);return}let i=e.getBoundingClientRect(),n=t.width/i.width,o=t.left-i.left;e.classList.add(Zi),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${n})`),e.getBoundingClientRect(),e.classList.remove(Zi),e.classList.add(Fe),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(Fe)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let t=this._elementRef.nativeElement.ownerDocument||document,e=this._inkBarElement=t.createElement("span"),i=this._inkBarContentElement=t.createElement("span");e.className="mdc-tab-indicator",i.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",e.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){this._inkBarElement;let t=this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement;t.appendChild(this._inkBarElement)}static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",S]}})}return a})();var la=(()=>{class a extends sa{elementRef=r(O);disabled=!1;focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Y(a)))(i||a)}})();static \u0275dir=x({type:a,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,i){e&2&&(T("aria-disabled",!!i.disabled),_("mat-mdc-tab-disabled",i.disabled))},inputs:{disabled:[2,"disabled","disabled",S]},features:[q]})}return a})(),Xi={passive:!0},kn=650,wn=100,ca=(()=>{class a{_elementRef=r(O);_changeDetectorRef=r(W);_viewportRuler=r(ae);_dir=r(ut,{optional:!0});_ngZone=r(H);_platform=r(ot);_sharedResizeObserver=r(he);_injector=r(G);_renderer=r(st);_animationsDisabled=Q();_eventCleanups;_scrollDistance=0;_selectedIndexChanged=!1;_destroyed=new k;_showPaginationControls=!1;_disableScrollAfter=!0;_disableScrollBefore=!0;_tabLabelCount;_scrollDistanceChanged=!1;_keyManager;_currentTextContent;_stopScrolling=new k;disablePagination=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(t){let e=isNaN(t)?0:t;this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}_selectedIndex=0;selectFocusedIndex=new F;indexFocused=new F;constructor(){this._eventCleanups=this._ngZone.runOutsideAngular(()=>[this._renderer.listen(this._elementRef.nativeElement,"mouseleave",()=>this._stopInterval())])}ngAfterViewInit(){this._eventCleanups.push(this._renderer.listen(this._previousPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("before"),Xi),this._renderer.listen(this._nextPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("after"),Xi))}ngAfterContentInit(){let t=this._dir?this._dir.change:te("ltr"),e=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(Ze(32),I(this._destroyed)),i=this._viewportRuler.change(150).pipe(I(this._destroyed)),n=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new $i(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(Math.max(this._selectedIndex,0)),rt(n,{injector:this._injector}),J(t,i,e,this._items.changes,this._itemsResized()).pipe(I(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),n()})}),this._keyManager?.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return typeof ResizeObserver!="function"?Ue:this._items.changes.pipe(at(this._items),$t(t=>new Jt(e=>this._ngZone.runOutsideAngular(()=>{let i=new ResizeObserver(n=>e.next(n));return t.forEach(n=>i.observe(n.elementRef.nativeElement)),()=>{i.disconnect()}}))),ei(1),dt(t=>t.some(e=>e.contentRect.width>0&&e.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._eventCleanups.forEach(t=>t()),this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!ct(t))switch(t.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let e=this._items.get(this.focusIndex);e&&!e.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t))}break;default:this._keyManager?.onKeydown(t)}}_onContentChanges(){let t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){!this._isValidIndex(t)||this.focusIndex===t||!this._keyManager||this._keyManager.setActiveItem(t)}_isValidIndex(t){return this._items?!!this._items.toArray()[t]:!0}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();let e=this._tabListContainer.nativeElement;this._getLayoutDirection()=="ltr"?e.scrollLeft=0:e.scrollLeft=e.scrollWidth-e.offsetWidth}}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let t=this.scrollDistance,e=this._getLayoutDirection()==="ltr"?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(e)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){let e=this._tabListContainer.nativeElement.offsetWidth,i=(t=="before"?-1:1)*e/3;return this._scrollTo(this._scrollDistance+i)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;let e=this._items?this._items.toArray()[t]:null;if(!e)return;let i=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:n,offsetWidth:o}=e.elementRef.nativeElement,f,b;this._getLayoutDirection()=="ltr"?(f=n,b=f+o):(b=this._tabListInner.nativeElement.offsetWidth-n,f=b-o);let xt=this.scrollDistance,Mt=this.scrollDistance+i;fMt&&(this.scrollDistance+=Math.min(b-Mt,f-xt))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let t=this._tabListInner.nativeElement.scrollWidth,e=this._elementRef.nativeElement.offsetWidth,i=t-e>=5;i||(this.scrollDistance=0),i!==this._showPaginationControls&&(this._showPaginationControls=i,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=this.scrollDistance==0,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){let t=this._tabListInner.nativeElement.scrollWidth,e=this._tabListContainer.nativeElement.offsetWidth;return t-e||0}_alignInkBarToSelectedTab(){let t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,e){e&&e.button!=null&&e.button!==0||(this._stopInterval(),Ke(kn,wn).pipe(I(J(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:i,distance:n}=this._scrollHeader(t);(n===0||n>=i)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,inputs:{disablePagination:[2,"disablePagination","disablePagination",S],selectedIndex:[2,"selectedIndex","selectedIndex",bt]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"}})}return a})(),Cn=(()=>{class a extends ca{_items;_tabListContainer;_tabList;_tabListInner;_nextPaginator;_previousPaginator;_inkBar;ariaLabel;ariaLabelledby;disableRipple=!1;ngAfterContentInit(){this._inkBar=new pe(this._items),super.ngAfterContentInit()}_itemSelected(t){t.preventDefault()}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Y(a)))(i||a)}})();static \u0275cmp=C({type:a,selectors:[["mat-tab-header"]],contentQueries:function(e,i,n){if(e&1&&et(n,la,4),e&2){let o;m(o=h())&&(i._items=o)}},viewQuery:function(e,i){if(e&1&&V(ta,7)(ea,7)(ia,7)(aa,5)(na,5),e&2){let n;m(n=h())&&(i._tabListContainer=n.first),m(n=h())&&(i._tabList=n.first),m(n=h())&&(i._tabListInner=n.first),m(n=h())&&(i._nextPaginator=n.first),m(n=h())&&(i._previousPaginator=n.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,i){e&2&&_("mat-mdc-tab-header-pagination-controls-enabled",i._showPaginationControls)("mat-mdc-tab-header-rtl",i._getLayoutDirection()=="rtl")},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],disableRipple:[2,"disableRipple","disableRipple",S]},features:[q],ngContentSelectors:Bt,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(e,i){e&1&&(B(),l(0,"div",5,0),u("click",function(){return i._handlePaginatorClick("before")})("mousedown",function(o){return i._handlePaginatorPress("before",o)})("touchend",function(){return i._stopInterval()}),M(2,"div",6),d(),l(3,"div",7,1),u("keydown",function(o){return i._handleKeydown(o)}),l(5,"div",8,2),u("cdkObserveContent",function(){return i._onContentChanges()}),l(7,"div",9,3),y(9),d()()(),l(10,"div",10,4),u("mousedown",function(o){return i._handlePaginatorPress("after",o)})("click",function(){return i._handlePaginatorClick("after")})("touchend",function(){return i._stopInterval()}),M(12,"div",6),d()),e&2&&(_("mat-mdc-tab-header-pagination-disabled",i._disableScrollBefore),D("matRippleDisabled",i._disableScrollBefore||i.disableRipple),c(3),_("_mat-animation-noopable",i._animationsDisabled),c(2),T("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby||null),c(5),_("mat-mdc-tab-header-pagination-disabled",i._disableScrollAfter),D("matRippleDisabled",i._disableScrollAfter||i.disableRipple))},dependencies:[gt,Ut],styles:[`.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-divider-height, 1px);border-top-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}} +import{$ as P,$a as v,$e as vt,Ab as ci,Ad as Ei,Ae as Wi,B as Ke,Bb as we,Bd as Fi,Be as Ie,Cb as ht,Cd as Oi,Ce as Qi,D as J,Da as ye,Db as Ce,Dd as se,De as K,E as dt,Ea as c,Eb as _,Ed as Me,Fa as rt,Fb as _t,Fd as Se,Fe as Gi,Ga as Dt,Gb as E,Gd as Pt,Hb as pt,He as Q,Ia as st,Ib as ft,Jb as di,K as Ze,Kb as mi,L as Xe,La as ee,Lb as hi,Ld as Ri,Ma as C,Mb as pi,Na as N,Nb as fi,Nd as Ai,Oa as x,Qb as $,Qc as wi,R as Je,Ra as q,Rb as ui,Rc as wt,Sa as tt,Sb as _i,Sd as Li,Se as De,T as ti,Ta as ni,Te as Yt,U as ei,Ua as oi,Uc as Gt,Ue as gt,V as at,W as $t,Wa as ri,We as Ct,X as I,Xa as T,Xc as ot,Yc as ut,Ye as Kt,Za as g,Zc as j,Ze as qi,_b as Te,_e as Ui,a as X,aa as z,ae as Pi,ba as w,bb as xe,bc as At,bf as me,ca as nt,cb as Et,cc as ie,da as r,db as Ft,df as Yi,eb as D,ed as Ci,ef as Ki,fb as l,fd as Ti,g as it,ga as R,gb as d,gc as Qt,gd as ae,h as Jt,ha as A,hb as M,i as k,ia as mt,ib as kt,ic as bi,j as St,jb as Ot,jd as ne,ka as G,kb as ke,kc as W,ke as le,la as It,ld as U,le as Bi,mc as S,me as zi,n as Ue,na as F,nc as bt,nd as qt,oa as H,ob as lt,oc as gi,od as oe,oe as Ni,p as te,pb as Rt,pd as Mi,pe as ji,qa as Z,qb as u,qc as vi,qe as Ut,ra as ii,rb as si,rd as Si,re as ce,sa as Wt,sb as p,sd as Lt,ta as Y,tb as B,tc as yi,td as Ii,u as Ht,ua as O,ub as y,uc as xi,ud as ct,ue as de,va as ai,vb as et,ve as Vi,wb as V,wd as re,we as Hi,xb as m,xd as Di,xe as $i,y as Ye,yb as h,yc as ki,zb as li}from"./chunk-72DGZVTL.js";var Ee=class{_box;_destroyed=new k;_resizeSubject=new k;_resizeObserver;_elementObservables=new Map;constructor(s){this._box=s,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(s){return this._elementObservables.has(s)||this._elementObservables.set(s,new Jt(t=>{let e=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(s,{box:this._box}),()=>{this._resizeObserver?.unobserve(s),e.unsubscribe(),this._elementObservables.delete(s)}}).pipe(dt(t=>t.some(e=>e.target===s)),ti({bufferSize:1,refCount:!0}),I(this._destroyed))),this._elementObservables.get(s)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},he=(()=>{class a{_cleanupErrorListener;_observers=new Map;_ngZone=r(H);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,t]of this._observers)t.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(t,e){let i=e?.box||"content-box";return this._observers.has(i)||this._observers.set(i,new Ee(i)),this._observers.get(i).observe(t)}static \u0275fac=function(e){return new(e||a)};static \u0275prov=P({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var Bt=["*"];function on(a,s){a&1&&y(0)}var ta=["tabListContainer"],ea=["tabList"],ia=["tabListInner"],aa=["nextPaginator"],na=["previousPaginator"],rn=["content"];function sn(a,s){}var ln=["tabBodyWrapper"],cn=["tabHeader"];function dn(a,s){}function mn(a,s){if(a&1&&tt(0,dn,0,0,"ng-template",12),a&2){let t=p().$implicit;D("cdkPortalOutlet",t.templateLabel)}}function hn(a,s){if(a&1&&E(0),a&2){let t=p().$implicit;pt(t.textLabel)}}function pn(a,s){if(a&1){let t=lt();l(0,"div",7,2),u("click",function(){let i=R(t),n=i.$implicit,o=i.$index,f=p(),b=ht(1);return A(f._handleClick(n,b,o))})("cdkFocusChange",function(i){let n=R(t).$index,o=p();return A(o._tabFocusChanged(i,n))}),M(2,"span",8)(3,"div",9),l(4,"span",10)(5,"span",11),g(6,mn,1,1,null,12)(7,hn,1,1),d()()()}if(a&2){let t=s.$implicit,e=s.$index,i=ht(1),n=p();_t(t.labelClass),_("mdc-tab--active",n.selectedIndex===e),D("id",n._getTabLabelId(t,e))("disabled",t.disabled)("fitInkBarToContent",n.fitInkBarToContent),T("tabIndex",n._getTabIndex(e))("aria-posinset",e+1)("aria-setsize",n._tabs.length)("aria-controls",n._getTabContentId(e))("aria-selected",n.selectedIndex===e)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),c(3),D("matRippleTrigger",i)("matRippleDisabled",t.disabled||n.disableRipple),c(3),v(t.templateLabel?6:7)}}function fn(a,s){a&1&&y(0)}function un(a,s){if(a&1){let t=lt();l(0,"mat-tab-body",13),u("_onCentered",function(){R(t);let i=p();return A(i._removeTabBodyWrapperHeight())})("_onCentering",function(i){R(t);let n=p();return A(n._setTabBodyWrapperHeight(i))})("_beforeCentering",function(i){R(t);let n=p();return A(n._bodyCentered(i))}),d()}if(a&2){let t=s.$implicit,e=s.$index,i=p();_t(t.bodyClass),D("id",i._getTabContentId(e))("content",t.content)("position",t.position)("animationDuration",i.animationDuration)("preserveContent",i.preserveContent),T("tabindex",i.contentTabIndex!=null&&i.selectedIndex===e?i.contentTabIndex:null)("aria-labelledby",i._getTabLabelId(t,e))("aria-hidden",i.selectedIndex!==e)}}var _n=["mat-tab-nav-bar",""],bn=["mat-tab-link",""],gn=new w("MatTabContent"),vn=(()=>{class a{template=r(Dt);constructor(){}static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,selectors:[["","matTabContent",""]],features:[$([{provide:gn,useExisting:a}])]})}return a})(),yn=new w("MatTabLabel"),oa=new w("MAT_TAB"),xn=(()=>{class a extends Si{_closestTab=r(oa,{optional:!0});static \u0275fac=(()=>{let t;return function(i){return(t||(t=Y(a)))(i||a)}})();static \u0275dir=x({type:a,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[$([{provide:yn,useExisting:a}]),q]})}return a})(),ra=new w("MAT_TAB_GROUP"),Ae=(()=>{class a{_viewContainerRef=r(ee);_closestTabGroup=r(ra,{optional:!0});disabled=!1;get templateLabel(){return this._templateLabel}set templateLabel(t){this._setTemplateLabelInput(t)}_templateLabel;_explicitContent=void 0;_implicitContent;textLabel="";ariaLabel;ariaLabelledby;labelClass;bodyClass;id=null;_contentPortal=null;get content(){return this._contentPortal}_stateChanges=new k;position=null;origin=null;isActive=!1;constructor(){r(wt).load(Ct)}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new oe(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(t){t&&t._closestTab===this&&(this._templateLabel=t)}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=C({type:a,selectors:[["mat-tab"]],contentQueries:function(e,i,n){if(e&1&&et(n,xn,5)(n,vn,7,Dt),e&2){let o;m(o=h())&&(i.templateLabel=o.first),m(o=h())&&(i._explicitContent=o.first)}},viewQuery:function(e,i){if(e&1&&V(Dt,7),e&2){let n;m(n=h())&&(i._implicitContent=n.first)}},hostAttrs:["hidden",""],hostVars:1,hostBindings:function(e,i){e&2&&T("id",null)},inputs:{disabled:[2,"disabled","disabled",S],textLabel:[0,"label","textLabel"],ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass",id:"id"},exportAs:["matTab"],features:[$([{provide:oa,useExisting:a}]),Wt],ngContentSelectors:Bt,decls:1,vars:0,template:function(e,i){e&1&&(B(),ni(0,on,1,0,"ng-template"))},encapsulation:2})}return a})(),Fe="mdc-tab-indicator--active",Zi="mdc-tab-indicator--no-transition",pe=class{_items;_currentItem;constructor(s){this._items=s}hide(){this._items.forEach(s=>s.deactivateInkBar()),this._currentItem=void 0}alignToElement(s){let t=this._items.find(i=>i.elementRef.nativeElement===s),e=this._currentItem;if(t!==e&&(e?.deactivateInkBar(),t)){let i=e?.elementRef.nativeElement.getBoundingClientRect?.();t.activateInkBar(i),this._currentItem=t}}},sa=(()=>{class a{_elementRef=r(O);_inkBarElement=null;_inkBarContentElement=null;_fitToContent=!1;get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){this._fitToContent!==t&&(this._fitToContent=t,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){let e=this._elementRef.nativeElement;if(!t||!e.getBoundingClientRect||!this._inkBarContentElement){e.classList.add(Fe);return}let i=e.getBoundingClientRect(),n=t.width/i.width,o=t.left-i.left;e.classList.add(Zi),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${n})`),e.getBoundingClientRect(),e.classList.remove(Zi),e.classList.add(Fe),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(Fe)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let t=this._elementRef.nativeElement.ownerDocument||document,e=this._inkBarElement=t.createElement("span"),i=this._inkBarContentElement=t.createElement("span");e.className="mdc-tab-indicator",i.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",e.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){this._inkBarElement;let t=this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement;t.appendChild(this._inkBarElement)}static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,inputs:{fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",S]}})}return a})();var la=(()=>{class a extends sa{elementRef=r(O);disabled=!1;focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Y(a)))(i||a)}})();static \u0275dir=x({type:a,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,i){e&2&&(T("aria-disabled",!!i.disabled),_("mat-mdc-tab-disabled",i.disabled))},inputs:{disabled:[2,"disabled","disabled",S]},features:[q]})}return a})(),Xi={passive:!0},kn=650,wn=100,ca=(()=>{class a{_elementRef=r(O);_changeDetectorRef=r(W);_viewportRuler=r(ae);_dir=r(ut,{optional:!0});_ngZone=r(H);_platform=r(ot);_sharedResizeObserver=r(he);_injector=r(G);_renderer=r(st);_animationsDisabled=Q();_eventCleanups;_scrollDistance=0;_selectedIndexChanged=!1;_destroyed=new k;_showPaginationControls=!1;_disableScrollAfter=!0;_disableScrollBefore=!0;_tabLabelCount;_scrollDistanceChanged=!1;_keyManager;_currentTextContent;_stopScrolling=new k;disablePagination=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(t){let e=isNaN(t)?0:t;this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}_selectedIndex=0;selectFocusedIndex=new F;indexFocused=new F;constructor(){this._eventCleanups=this._ngZone.runOutsideAngular(()=>[this._renderer.listen(this._elementRef.nativeElement,"mouseleave",()=>this._stopInterval())])}ngAfterViewInit(){this._eventCleanups.push(this._renderer.listen(this._previousPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("before"),Xi),this._renderer.listen(this._nextPaginator.nativeElement,"touchstart",()=>this._handlePaginatorPress("after"),Xi))}ngAfterContentInit(){let t=this._dir?this._dir.change:te("ltr"),e=this._sharedResizeObserver.observe(this._elementRef.nativeElement).pipe(Ze(32),I(this._destroyed)),i=this._viewportRuler.change(150).pipe(I(this._destroyed)),n=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new $i(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(Math.max(this._selectedIndex,0)),rt(n,{injector:this._injector}),J(t,i,e,this._items.changes,this._itemsResized()).pipe(I(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),n()})}),this._keyManager?.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return typeof ResizeObserver!="function"?Ue:this._items.changes.pipe(at(this._items),$t(t=>new Jt(e=>this._ngZone.runOutsideAngular(()=>{let i=new ResizeObserver(n=>e.next(n));return t.forEach(n=>i.observe(n.elementRef.nativeElement)),()=>{i.disconnect()}}))),ei(1),dt(t=>t.some(e=>e.contentRect.width>0&&e.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._eventCleanups.forEach(t=>t()),this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!ct(t))switch(t.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let e=this._items.get(this.focusIndex);e&&!e.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t))}break;default:this._keyManager?.onKeydown(t)}}_onContentChanges(){let t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){!this._isValidIndex(t)||this.focusIndex===t||!this._keyManager||this._keyManager.setActiveItem(t)}_isValidIndex(t){return this._items?!!this._items.toArray()[t]:!0}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();let e=this._tabListContainer.nativeElement;this._getLayoutDirection()=="ltr"?e.scrollLeft=0:e.scrollLeft=e.scrollWidth-e.offsetWidth}}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let t=this.scrollDistance,e=this._getLayoutDirection()==="ltr"?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(e)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){let e=this._tabListContainer.nativeElement.offsetWidth,i=(t=="before"?-1:1)*e/3;return this._scrollTo(this._scrollDistance+i)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;let e=this._items?this._items.toArray()[t]:null;if(!e)return;let i=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:n,offsetWidth:o}=e.elementRef.nativeElement,f,b;this._getLayoutDirection()=="ltr"?(f=n,b=f+o):(b=this._tabListInner.nativeElement.offsetWidth-n,f=b-o);let xt=this.scrollDistance,Mt=this.scrollDistance+i;fMt&&(this.scrollDistance+=Math.min(b-Mt,f-xt))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let t=this._tabListInner.nativeElement.scrollWidth,e=this._elementRef.nativeElement.offsetWidth,i=t-e>=5;i||(this.scrollDistance=0),i!==this._showPaginationControls&&(this._showPaginationControls=i,this._changeDetectorRef.markForCheck())}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=this.scrollDistance==0,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){let t=this._tabListInner.nativeElement.scrollWidth,e=this._tabListContainer.nativeElement.offsetWidth;return t-e||0}_alignInkBarToSelectedTab(){let t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,e){e&&e.button!=null&&e.button!==0||(this._stopInterval(),Ke(kn,wn).pipe(I(J(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:i,distance:n}=this._scrollHeader(t);(n===0||n>=i)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,inputs:{disablePagination:[2,"disablePagination","disablePagination",S],selectedIndex:[2,"selectedIndex","selectedIndex",bt]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"}})}return a})(),Cn=(()=>{class a extends ca{_items;_tabListContainer;_tabList;_tabListInner;_nextPaginator;_previousPaginator;_inkBar;ariaLabel;ariaLabelledby;disableRipple=!1;ngAfterContentInit(){this._inkBar=new pe(this._items),super.ngAfterContentInit()}_itemSelected(t){t.preventDefault()}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Y(a)))(i||a)}})();static \u0275cmp=C({type:a,selectors:[["mat-tab-header"]],contentQueries:function(e,i,n){if(e&1&&et(n,la,4),e&2){let o;m(o=h())&&(i._items=o)}},viewQuery:function(e,i){if(e&1&&V(ta,7)(ea,7)(ia,7)(aa,5)(na,5),e&2){let n;m(n=h())&&(i._tabListContainer=n.first),m(n=h())&&(i._tabList=n.first),m(n=h())&&(i._tabListInner=n.first),m(n=h())&&(i._nextPaginator=n.first),m(n=h())&&(i._previousPaginator=n.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,i){e&2&&_("mat-mdc-tab-header-pagination-controls-enabled",i._showPaginationControls)("mat-mdc-tab-header-rtl",i._getLayoutDirection()=="rtl")},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],disableRipple:[2,"disableRipple","disableRipple",S]},features:[q],ngContentSelectors:Bt,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["mat-ripple","",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled"]],template:function(e,i){e&1&&(B(),l(0,"div",5,0),u("click",function(){return i._handlePaginatorClick("before")})("mousedown",function(o){return i._handlePaginatorPress("before",o)})("touchend",function(){return i._stopInterval()}),M(2,"div",6),d(),l(3,"div",7,1),u("keydown",function(o){return i._handleKeydown(o)}),l(5,"div",8,2),u("cdkObserveContent",function(){return i._onContentChanges()}),l(7,"div",9,3),y(9),d()()(),l(10,"div",10,4),u("mousedown",function(o){return i._handlePaginatorPress("after",o)})("click",function(){return i._handlePaginatorClick("after")})("touchend",function(){return i._stopInterval()}),M(12,"div",6),d()),e&2&&(_("mat-mdc-tab-header-pagination-disabled",i._disableScrollBefore),D("matRippleDisabled",i._disableScrollBefore||i.disableRipple),c(3),_("_mat-animation-noopable",i._animationsDisabled),c(2),T("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby||null),c(5),_("mat-mdc-tab-header-pagination-disabled",i._disableScrollAfter),D("matRippleDisabled",i._disableScrollAfter||i.disableRipple))},dependencies:[gt,Ut],styles:[`.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;outline:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-pagination-icon-color, var(--mat-sys-on-surface))}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-divider-height, 1px);border-top-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-labels,.mat-mdc-tab-labels.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab::before{margin:5px}@media(forced-colors: active){.mat-mdc-tab[aria-disabled=true]{color:GrayText}} `],encapsulation:2})}return a})(),da=new w("MAT_TABS_CONFIG"),Ji=(()=>{class a extends Lt{_host=r(Oe);_ngZone=r(H);_centeringSub=it.EMPTY;_leavingSub=it.EMPTY;constructor(){super()}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(at(this._host._isCenterPosition())).subscribe(t=>{this._host._content&&t&&!this.hasAttached()&&this._ngZone.run(()=>{Promise.resolve().then(),this.attach(this._host._content)})}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this._ngZone.run(()=>this.detach())})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,selectors:[["","matTabBodyHost",""]],features:[q]})}return a})(),Oe=(()=>{class a{_elementRef=r(O);_dir=r(ut,{optional:!0});_ngZone=r(H);_injector=r(G);_renderer=r(st);_diAnimationsDisabled=Q();_eventCleanups;_initialized=!1;_fallbackTimer;_positionIndex;_dirChangeSubscription=it.EMPTY;_position;_previousPosition;_onCentering=new F;_beforeCentering=new F;_afterLeavingCenter=new F;_onCentered=new F(!0);_portalHost;_contentElement;_content;animationDuration="500ms";preserveContent=!1;set position(t){this._positionIndex=t,this._computePositionAnimationState()}constructor(){if(this._dir){let t=r(W);this._dirChangeSubscription=this._dir.change.subscribe(e=>{this._computePositionAnimationState(e),t.markForCheck()})}}ngOnInit(){this._bindTransitionEvents(),this._position==="center"&&(this._setActiveClass(!0),rt(()=>this._onCentering.emit(this._elementRef.nativeElement.clientHeight),{injector:this._injector})),this._initialized=!0}ngOnDestroy(){clearTimeout(this._fallbackTimer),this._eventCleanups?.forEach(t=>t()),this._dirChangeSubscription.unsubscribe()}_bindTransitionEvents(){this._ngZone.runOutsideAngular(()=>{let t=this._elementRef.nativeElement,e=i=>{i.target===this._contentElement?.nativeElement&&(this._elementRef.nativeElement.classList.remove("mat-tab-body-animating"),i.type==="transitionend"&&this._transitionDone())};this._eventCleanups=[this._renderer.listen(t,"transitionstart",i=>{i.target===this._contentElement?.nativeElement&&(this._elementRef.nativeElement.classList.add("mat-tab-body-animating"),this._transitionStarted())}),this._renderer.listen(t,"transitionend",e),this._renderer.listen(t,"transitioncancel",e)]})}_transitionStarted(){clearTimeout(this._fallbackTimer);let t=this._position==="center";this._beforeCentering.emit(t),t&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_transitionDone(){this._position==="center"?this._onCentered.emit():this._previousPosition==="center"&&this._afterLeavingCenter.emit()}_setActiveClass(t){this._elementRef.nativeElement.classList.toggle("mat-mdc-tab-body-active",t)}_getLayoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_isCenterPosition(){return this._positionIndex===0}_computePositionAnimationState(t=this._getLayoutDirection()){this._previousPosition=this._position,this._positionIndex<0?this._position=t=="ltr"?"left":"right":this._positionIndex>0?this._position=t=="ltr"?"right":"left":this._position="center",this._animationsDisabled()?this._simulateTransitionEvents():this._initialized&&(this._position==="center"||this._previousPosition==="center")&&(clearTimeout(this._fallbackTimer),this._fallbackTimer=this._ngZone.runOutsideAngular(()=>setTimeout(()=>this._simulateTransitionEvents(),100)))}_simulateTransitionEvents(){this._transitionStarted(),rt(()=>this._transitionDone(),{injector:this._injector})}_animationsDisabled(){return this._diAnimationsDisabled||this.animationDuration==="0ms"||this.animationDuration==="0s"}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=C({type:a,selectors:[["mat-tab-body"]],viewQuery:function(e,i){if(e&1&&V(Ji,5)(rn,5),e&2){let n;m(n=h())&&(i._portalHost=n.first),m(n=h())&&(i._contentElement=n.first)}},hostAttrs:[1,"mat-mdc-tab-body"],hostVars:1,hostBindings:function(e,i){e&2&&T("inert",i._position==="center"?null:"")},inputs:{_content:[0,"content","_content"],animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_onCentered:"_onCentered"},decls:3,vars:6,consts:[["content",""],["cdkScrollable","",1,"mat-mdc-tab-body-content"],["matTabBodyHost",""]],template:function(e,i){e&1&&(l(0,"div",1,0),tt(2,sn,0,0,"ng-template",2),d()),e&2&&_("mat-tab-body-content-left",i._position==="left")("mat-tab-body-content-right",i._position==="right")("mat-tab-body-content-can-animate",i._position==="center"||i._previousPosition==="center")},dependencies:[Ji,Ti],styles:[`.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto;transform:none;visibility:hidden}.mat-tab-body-animating>.mat-mdc-tab-body-content,.mat-mdc-tab-body-active>.mat-mdc-tab-body-content{visibility:visible}.mat-tab-body-animating>.mat-mdc-tab-body-content{min-height:1px}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-tab-body-content-can-animate{transition:transform var(--mat-tab-animation-duration) 1ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable .mat-tab-body-content-can-animate{transition:none}.mat-tab-body-content-left{transform:translate3d(-100%, 0, 0)}.mat-tab-body-content-right{transform:translate3d(100%, 0, 0)} `],encapsulation:2})}return a})(),ma=(()=>{class a{_elementRef=r(O);_changeDetectorRef=r(W);_ngZone=r(H);_tabsSubscription=it.EMPTY;_tabLabelSubscription=it.EMPTY;_tabBodySubscription=it.EMPTY;_diAnimationsDisabled=Q();_allTabs;_tabBodies;_tabBodyWrapper;_tabHeader;_tabs=new ai;_indexToSelect=0;_lastFocusedTabIndex=null;_tabBodyWrapperHeight=0;color;get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(t){this._fitInkBarToContent=t,this._changeDetectorRef.markForCheck()}_fitInkBarToContent=!1;stretchTabs=!0;alignTabs=null;dynamicHeight=!1;get selectedIndex(){return this._selectedIndex}set selectedIndex(t){this._indexToSelect=isNaN(t)?null:t}_selectedIndex=null;headerPosition="above";get animationDuration(){return this._animationDuration}set animationDuration(t){let e=t+"";this._animationDuration=/^\d+$/.test(e)?t+"ms":e}_animationDuration;get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(t){this._contentTabIndex=isNaN(t)?null:t}_contentTabIndex=null;disablePagination=!1;disableRipple=!1;preserveContent=!1;get backgroundColor(){return this._backgroundColor}set backgroundColor(t){let e=this._elementRef.nativeElement.classList;e.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),t&&e.add("mat-tabs-with-background",`mat-background-${t}`),this._backgroundColor=t}_backgroundColor;ariaLabel;ariaLabelledby;selectedIndexChange=new F;focusChange=new F;animationDone=new F;selectedTabChange=new F(!0);_groupId;_isServer=!r(ot).isBrowser;constructor(){let t=r(da,{optional:!0});this._groupId=r(U).getId("mat-tab-group-"),this.animationDuration=t&&t.animationDuration?t.animationDuration:"500ms",this.disablePagination=t&&t.disablePagination!=null?t.disablePagination:!1,this.dynamicHeight=t&&t.dynamicHeight!=null?t.dynamicHeight:!1,t?.contentTabIndex!=null&&(this.contentTabIndex=t.contentTabIndex),this.preserveContent=!!t?.preserveContent,this.fitInkBarToContent=t&&t.fitInkBarToContent!=null?t.fitInkBarToContent:!1,this.stretchTabs=t&&t.stretchTabs!=null?t.stretchTabs:!0,this.alignTabs=t&&t.alignTabs!=null?t.alignTabs:null}ngAfterContentChecked(){let t=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=t){let e=this._selectedIndex==null;if(!e){this.selectedTabChange.emit(this._createChangeEvent(t));let i=this._tabBodyWrapper.nativeElement;i.style.minHeight=i.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((i,n)=>i.isActive=n===t),e||(this.selectedIndexChange.emit(t),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((e,i)=>{e.position=i-t,this._selectedIndex!=null&&e.position==0&&!e.origin&&(e.origin=t-this._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{let t=this._clampTabIndex(this._indexToSelect);if(t===this._selectedIndex){let e=this._tabs.toArray(),i;for(let n=0;n{e[t].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(t))})}this._changeDetectorRef.markForCheck()})}ngAfterViewInit(){this._tabBodySubscription=this._tabBodies.changes.subscribe(()=>this._bodyCentered(!0))}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(at(this._allTabs)).subscribe(t=>{this._tabs.reset(t.filter(e=>e._closestTabGroup===this||!e._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe(),this._tabBodySubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(t){let e=this._tabHeader;e&&(e.focusIndex=t)}_focusChanged(t){this._lastFocusedTabIndex=t,this.focusChange.emit(this._createChangeEvent(t))}_createChangeEvent(t){let e=new Re;return e.index=t,this._tabs&&this._tabs.length&&(e.tab=this._tabs.toArray()[t]),e}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=J(...this._tabs.map(t=>t._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(t){return Math.min(this._tabs.length-1,Math.max(t||0,0))}_getTabLabelId(t,e){return t.id||`${this._groupId}-label-${e}`}_getTabContentId(t){return`${this._groupId}-content-${t}`}_setTabBodyWrapperHeight(t){if(!this.dynamicHeight||!this._tabBodyWrapperHeight){this._tabBodyWrapperHeight=t;return}let e=this._tabBodyWrapper.nativeElement;e.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(e.style.height=t+"px")}_removeTabBodyWrapperHeight(){let t=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=t.clientHeight,t.style.height="",this._ngZone.run(()=>this.animationDone.emit())}_handleClick(t,e,i){e.focusIndex=i,t.disabled||(this.selectedIndex=i)}_getTabIndex(t){let e=this._lastFocusedTabIndex??this.selectedIndex;return t===e?0:-1}_tabFocusChanged(t,e){t&&t!=="mouse"&&t!=="touch"&&(this._tabHeader.focusIndex=e)}_bodyCentered(t){t&&this._tabBodies?.forEach((e,i)=>e._setActiveClass(i===this._selectedIndex))}_animationsDisabled(){return this._diAnimationsDisabled||this.animationDuration==="0"||this.animationDuration==="0ms"}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=C({type:a,selectors:[["mat-tab-group"]],contentQueries:function(e,i,n){if(e&1&&et(n,Ae,5),e&2){let o;m(o=h())&&(i._allTabs=o)}},viewQuery:function(e,i){if(e&1&&V(ln,5)(cn,5)(Oe,5),e&2){let n;m(n=h())&&(i._tabBodyWrapper=n.first),m(n=h())&&(i._tabHeader=n.first),m(n=h())&&(i._tabBodies=n)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:11,hostBindings:function(e,i){e&2&&(T("mat-align-tabs",i.alignTabs),_t("mat-"+(i.color||"primary")),Ce("--mat-tab-animation-duration",i.animationDuration),_("mat-mdc-tab-group-dynamic-height",i.dynamicHeight)("mat-mdc-tab-group-inverted-header",i.headerPosition==="below")("mat-mdc-tab-group-stretch-tabs",i.stretchTabs))},inputs:{color:"color",fitInkBarToContent:[2,"fitInkBarToContent","fitInkBarToContent",S],stretchTabs:[2,"mat-stretch-tabs","stretchTabs",S],alignTabs:[0,"mat-align-tabs","alignTabs"],dynamicHeight:[2,"dynamicHeight","dynamicHeight",S],selectedIndex:[2,"selectedIndex","selectedIndex",bt],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[2,"contentTabIndex","contentTabIndex",bt],disablePagination:[2,"disablePagination","disablePagination",S],disableRipple:[2,"disableRipple","disableRipple",S],preserveContent:[2,"preserveContent","preserveContent",S],backgroundColor:"backgroundColor",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"]},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],features:[$([{provide:ra,useExisting:a}])],ngContentSelectors:Bt,decls:9,vars:8,consts:[["tabHeader",""],["tabBodyWrapper",""],["tabNode",""],[3,"indexFocused","selectFocusedIndex","selectedIndex","disableRipple","disablePagination","aria-label","aria-labelledby"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"id","mdc-tab--active","class","disabled","fitInkBarToContent"],[1,"mat-mdc-tab-body-wrapper"],["role","tabpanel",3,"id","class","content","position","animationDuration","preserveContent"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-focus-indicator",3,"click","cdkFocusChange","id","disabled","fitInkBarToContent"],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"_onCentered","_onCentering","_beforeCentering","id","content","position","animationDuration","preserveContent"]],template:function(e,i){e&1&&(B(),l(0,"mat-tab-header",3,0),u("indexFocused",function(o){return i._focusChanged(o)})("selectFocusedIndex",function(o){return i.selectedIndex=o}),Et(2,pn,8,17,"div",4,xe),d(),g(4,fn,1,0),l(5,"div",5,1),Et(7,un,1,10,"mat-tab-body",6,xe),d()),e&2&&(D("selectedIndex",i.selectedIndex||0)("disableRipple",i.disableRipple)("disablePagination",i.disablePagination),ri("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledby),c(2),Ft(i._tabs),c(2),v(i._isServer?4:-1),c(),_("_mat-animation-noopable",i._animationsDisabled()),c(2),Ft(i._tabs))},dependencies:[Cn,la,Bi,gt,Lt,Oe],styles:[`.mdc-tab{min-width:90px;padding:0 24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;z-index:1;touch-action:manipulation}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab--active .mdc-tab__text-label{transition-delay:100ms}._mat-animation-noopable .mdc-tab__text-label{transition:none}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transition:var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}._mat-animation-noopable .mdc-tab-indicator__content,.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mat-mdc-tab-ripple.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;height:var(--mat-tab-container-height, 48px);font-family:var(--mat-tab-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-tab-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-tab-label-text-tracking, var(--mat-sys-title-small-tracking));line-height:var(--mat-tab-label-text-line-height, var(--mat-sys-title-small-line-height));font-weight:var(--mat-tab-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mat-tab-active-indicator-height, 2px);border-radius:var(--mat-tab-active-indicator-shape, 0)}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-inactive-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-inactive-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-active-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-active-hover-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-hover-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-active-focus-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-active-focus-indicator-color, var(--mat-sys-primary))}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-disabled-ripple-color, var(--mat-sys-on-surface-variant))}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-inactive-label-text-color, var(--mat-sys-on-surface));display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-inactive-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important} `],encapsulation:2})}return a})(),Re=class{index;tab},Tn=(()=>{class a extends ca{_focusedItem=Z(null);get fitInkBarToContent(){return this._fitInkBarToContent.value}set fitInkBarToContent(t){this._fitInkBarToContent.next(t),this._changeDetectorRef.markForCheck()}_fitInkBarToContent=new St(!1);stretchTabs=!0;get animationDuration(){return this._animationDuration}set animationDuration(t){let e=t+"";this._animationDuration=/^\d+$/.test(e)?t+"ms":e}_animationDuration;_items;get backgroundColor(){return this._backgroundColor}set backgroundColor(t){let e=this._elementRef.nativeElement.classList;e.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),t&&e.add("mat-tabs-with-background",`mat-background-${t}`),this._backgroundColor=t}_backgroundColor;get disableRipple(){return this._disableRipple()}set disableRipple(t){this._disableRipple.set(t)}_disableRipple=Z(!1);color="primary";tabPanel;_tabListContainer;_tabList;_tabListInner;_nextPaginator;_previousPaginator;_inkBar;constructor(){let t=r(da,{optional:!0});super(),this.disablePagination=t&&t.disablePagination!=null?t.disablePagination:!1,this.fitInkBarToContent=t&&t.fitInkBarToContent!=null?t.fitInkBarToContent:!1,this.stretchTabs=t&&t.stretchTabs!=null?t.stretchTabs:!0}_itemSelected(){}ngAfterContentInit(){this._inkBar=new pe(this._items),this._items.changes.pipe(at(null),I(this._destroyed)).subscribe(()=>this.updateActiveLink()),super.ngAfterContentInit(),this._keyManager.change.pipe(at(null),I(this._destroyed)).subscribe(()=>this._focusedItem.set(this._keyManager?.activeItem||null))}ngAfterViewInit(){this.tabPanel,super.ngAfterViewInit()}updateActiveLink(){if(!this._items)return;let t=this._items.toArray();for(let e=0;e.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.cdk-drop-list .mat-mdc-tab-links,.mat-mdc-tab-links.cdk-drop-list{min-height:var(--mat-tab-container-height, 48px)}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-divider-height, 1px);border-bottom-color:var(--mat-tab-divider-color, var(--mat-sys-surface-variant))}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-focus-indicator::before{border-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-foreground-color)} @@ -10,7 +10,7 @@ import{$a as N,$b as di,$d as Oi,$e as Qi,A as Ye,Aa as Wt,Ab as kt,Ac as Qt,Ba `],encapsulation:2,changeDetection:0})}return a})();var La=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275mod=N({type:a});static \u0275inj=z({imports:[Pt,Nt,j,ne,Fa,Nt]})}return a})();var Do=["mat-internal-form-field",""],Eo=["*"],Fl=(()=>{class a{labelPosition="after";static \u0275fac=function(e){return new(e||a)};static \u0275cmp=C({type:a,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(e,i){e&2&&_("mdc-form-field--align-end",i.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},attrs:Do,ngContentSelectors:Eo,decls:1,vars:0,template:function(e,i){e&1&&(B(),y(0))},styles:[`.mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0} `],encapsulation:2,changeDetection:0})}return a})();var Al=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275mod=N({type:a});static \u0275inj=z({imports:[j]})}return a})();var $e=(()=>{class a{get vertical(){return this._vertical}set vertical(t){this._vertical=K(t)}_vertical=!1;get inset(){return this._inset}set inset(t){this._inset=K(t)}_inset=!1;static \u0275fac=function(e){return new(e||a)};static \u0275cmp=C({type:a,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(e,i){e&2&&(T("aria-orientation",i.vertical?"vertical":"horizontal"),_("mat-divider-vertical",i.vertical)("mat-divider-horizontal",!i.vertical)("mat-divider-inset",i.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(e,i){},styles:[`.mat-divider{display:block;margin:0;border-top-style:solid;border-top-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-top-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-vertical{border-top:0;border-right-style:solid;border-right-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-right-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px} `],encapsulation:2,changeDetection:0})}return a})(),ve=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275mod=N({type:a});static \u0275inj=z({imports:[j]})}return a})();var Fo=["tooltip"],Oo=20;var Ro=new w("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let a=r(G);return()=>re(a,{scrollThrottle:Oo})}}),Ao=new w("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Pa="tooltip-panel",Lo={passive:!0},Po=8,Bo=8,zo=24,No=200,We=(()=>{class a{_elementRef=r(O);_ngZone=r(H);_platform=r(ot);_ariaDescriber=r(Qi);_focusMonitor=r(le);_dir=r(ut);_injector=r(G);_viewContainerRef=r(ee);_mediaMatcher=r(Ni);_document=r(It);_renderer=r(st);_animationsDisabled=Q();_defaultOptions=r(Ao,{optional:!0});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=Ba;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=!1;_dirSubscribed=!1;get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=K(t),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(t){let e=K(t);this._disabled!==e&&(this._disabled=e,e?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=Gt(t)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=Gt(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(t){let e=this._message;this._message=t!=null?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(e)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new k;_isDestroyed=!1;constructor(){let t=this._defaultOptions;t&&(this._showDelay=t.showDelay,this._hideDelay=t.hideDelay,t.position&&(this.position=t.position),t.positionAtOrigin&&(this.positionAtOrigin=t.positionAtOrigin),t.touchGestures&&(this.touchGestures=t.touchGestures),t.tooltipClass&&(this.tooltipClass=t.tooltipClass)),this._viewportMargin=Po}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(I(this._destroyed)).subscribe(t=>{t?t==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let t=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(e=>e()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0,this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t)}show(t=this.showDelay,e){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let i=this._createOverlay(e);this._detach(),this._portal=this._portal||new qt(this._tooltipComponent,this._viewContainerRef);let n=this._tooltipInstance=i.attach(this._portal).instance;n._triggerElement=this._elementRef.nativeElement,n._mouseLeaveHideDelay=this._hideDelay,n.afterHidden().pipe(I(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),n.show(t)}hide(t=this.hideDelay){let e=this._tooltipInstance;e&&(e.isVisible()?e.hide(t):(e._cancelPendingAnimations(),this._detach()))}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){let o=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&o._origin instanceof O)return this._overlayRef;this._detach()}let e=this._injector.get(Ci).getAncestorScrollContainers(this._elementRef),i=`${this._cssClassPrefix}-${Pa}`,n=Ei(this._injector,this.positionAtOrigin?t||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(e).withPopoverLocation("global");return n.positionChanges.pipe(I(this._destroyed)).subscribe(o=>{this._updateCurrentPositionClass(o.connectionPair),this._tooltipInstance&&o.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=se(this._injector,{direction:this._dir,positionStrategy:n,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,i]:i,scrollStrategy:this._injector.get(Ro)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(I(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(I(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(I(this._destroyed)).subscribe(o=>{o.preventDefault(),o.stopPropagation(),this._ngZone.run(()=>this.hide(0))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=!0,this._dir.change.pipe(I(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(t){let e=t.getConfig().positionStrategy,i=this._getOrigin(),n=this._getOverlayPosition();e.withPositions([this._addOffset(X(X({},i.main),n.main)),this._addOffset(X(X({},i.fallback),n.fallback))])}_addOffset(t){let e=Bo,i=!this._dir||this._dir.value=="ltr";return t.originY==="top"?t.offsetY=-e:t.originY==="bottom"?t.offsetY=e:t.originX==="start"?t.offsetX=i?-e:e:t.originX==="end"&&(t.offsetX=i?e:-e),t}_getOrigin(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"||e=="below"?i={originX:"center",originY:e=="above"?"top":"bottom"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={originX:"start",originY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={originX:"end",originY:"center"});let{x:n,y:o}=this._invertPosition(i.originX,i.originY);return{main:i,fallback:{originX:n,originY:o}}}_getOverlayPosition(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"?i={overlayX:"center",overlayY:"bottom"}:e=="below"?i={overlayX:"center",overlayY:"top"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={overlayX:"end",overlayY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={overlayX:"start",overlayY:"center"});let{x:n,y:o}=this._invertPosition(i.overlayX,i.overlayY);return{main:i,fallback:{overlayX:n,overlayY:o}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),rt(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t instanceof Set?Array.from(t):t,this._tooltipInstance._markForCheck())}_invertPosition(t,e){return this.position==="above"||this.position==="below"?e==="top"?e="bottom":e==="bottom"&&(e="top"):t==="end"?t="start":t==="start"&&(t="end"),{x:t,y:e}}_updateCurrentPositionClass(t){let{overlayY:e,originX:i,originY:n}=t,o;if(e==="center"?this._dir&&this._dir.value==="rtl"?o=i==="end"?"left":"right":o=i==="start"?"left":"right":o=e==="bottom"&&n==="top"?"above":"below",o!==this._currentPosition){let f=this._overlayRef;if(f){let b=`${this._cssClassPrefix}-${Pa}-`;f.removePanelClass(b+this._currentPosition),f.addPanelClass(b+o)}this._currentPosition=o}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",t=>{let e=t.targetTouches?.[0],i=e?{x:e.clientX,y:e.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let n=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,i)},this._defaultOptions?.touchLongPressShowDelay??n)})):this._addListener("mouseenter",t=>{this._setupPointerExitEventsIfNeeded();let e;t.x!==void 0&&t.y!==void 0&&(e=t),this.show(void 0,e)}))}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=!0,!this._isTouchPlatform())this._addListener("mouseleave",t=>{let e=t.relatedTarget;(!e||!this._overlayRef?.overlayElement.contains(e))&&this.hide()}),this._addListener("wheel",t=>{if(this._isTooltipVisible()){let e=this._document.elementFromPoint(t.clientX,t.clientY),i=this._elementRef.nativeElement;e!==i&&!i.contains(e)&&this.hide()}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let t=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};this._addListener("touchend",t),this._addListener("touchcancel",t)}}}_addListener(t,e){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,t,e,Lo))}_isTouchPlatform(){return this._platform.IOS||this._platform.ANDROID?!0:this._platform.isBrowser?!!this._defaultOptions?.detectHoverCapability&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:!1}_disableNativeGesturesIfNecessary(){let t=this.touchGestures;if(t!=="off"){let e=this._elementRef.nativeElement,i=e.style;(t==="on"||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA")&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),(t==="on"||!e.draggable)&&(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent"}}_syncAriaDescription(t){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,t,"tooltip"),this._isDestroyed||rt({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}_overlayEventPredicate=t=>t.type==="keydown"?this._isTooltipVisible()&&t.keyCode===27&&!ct(t):!0;static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(e,i){e&2&&_("mat-mdc-tooltip-disabled",i.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return a})(),Ba=(()=>{class a{_changeDetectorRef=r(W);_elementRef=r(O);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=Q();_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new k;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";constructor(){}show(t){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},t)}hide(t){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},t)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>zo&&t.width>=No}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(t){t?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(t){let e=this._tooltip.nativeElement,i=this._showAnimation,n=this._hideAnimation;if(e.classList.remove(t?n:i),e.classList.add(t?i:n),this._isVisible!==t&&(this._isVisible=t,this._changeDetectorRef.markForCheck()),t&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let o=getComputedStyle(e);(o.getPropertyValue("animation-duration")==="0s"||o.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}t&&this._onShow(),this._animationsDisabled&&(e.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t))}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=C({type:a,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(e&1&&V(Fo,7),e&2){let n;m(n=h())&&(i._tooltip=n.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(e,i){e&1&&u("mouseleave",function(o){return i._handleMouseLeave(o)})},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(e,i){e&1&&(kt(0,"div",1,0),si("animationend",function(o){return i._handleAnimationEnd(o)}),kt(2,"div",2),E(3),Ot()()),e&2&&(_t(i.tooltipClass),_("mdc-tooltip--multiline",i._isMultiline),c(3),pt(i.message))},styles:[`.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mat-tooltip-container-color, var(--mat-sys-inverse-surface));color:var(--mat-tooltip-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-tooltip-container-shape, var(--mat-sys-corner-extra-small));font-family:var(--mat-tooltip-supporting-text-font, var(--mat-sys-body-small-font));font-size:var(--mat-tooltip-supporting-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-tooltip-supporting-text-weight, var(--mat-sys-body-small-weight));line-height:var(--mat-tooltip-supporting-text-line-height, var(--mat-sys-body-small-line-height));letter-spacing:var(--mat-tooltip-supporting-text-tracking, var(--mat-sys-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel{line-height:normal}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards} -`],encapsulation:2,changeDetection:0})}return a})();var za=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275mod=N({type:a});static \u0275inj=z({imports:[Vi,Pt,j,ne]})}return a})();var jt=class{data=[];dataChange=new St([]);itemUpdated=new k;getItems(){return this.data}add(s){this.findIndex(s)>=0?this.update(s):(this.data.push(s),this.dataChange.next(this.data))}set(s){s.forEach(e=>{let i=this.findIndex(e);if(i>=0){let n=Object.assign(this.data[i],e);this.data[i]=n}else this.data.push(e)}),this.data.filter(e=>s.filter(i=>this.getItemKey(i)===this.getItemKey(e)).length===0).forEach(e=>this.remove(e)),this.dataChange.next(this.data)}get(s){let t=this.data.findIndex(e=>this.getItemKey(e)===s);if(t>=0)return this.data[t]}update(s){let t=this.findIndex(s);if(t>=0){let e=Object.assign(this.data[t],s);this.data[t]=e,this.dataChange.next(this.data),this.itemUpdated.next(e)}}remove(s){let t=this.findIndex(s);t>=0&&(this.data.splice(t,1),this.dataChange.next(this.data))}get changes(){return this.dataChange}get itemChanged(){return this.itemUpdated}clear(){this.data=[],this.dataChange.next(this.data)}findIndex(s){return this.data.findIndex(t=>this.getItemKey(t)===this.getItemKey(s))}};var Na=(()=>{class a extends jt{getItemKey(t){return t.link_id}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Y(a)))(i||a)}})();static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();var ja=(()=>{class a extends jt{getItemKey(t){return t.node_id}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Y(a)))(i||a)}})();static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();var Va=(()=>{class a{httpController;constructor(t){this.httpController=t}getComputes(t){return this.httpController.get(t,"/computes")}getCompute(t,e){return this.httpController.get(t,`/computes/${e}`)}createCompute(t,e){return this.httpController.post(t,"/computes",e)}updateCompute(t,e,i){return this.httpController.put(t,`/computes/${e}`,i)}deleteCompute(t,e){return this.httpController.delete(t,`/computes/${e}`)}connectCompute(t,e){return this.httpController.post(t,`/computes/${e}/connect`,null)}getStatistics(t){return this.httpController.get(t,"/statistics")}static \u0275fac=function(e){return new(e||a)(nt(me))};static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();var Ha=(()=>{class a{settings={crash_reports:!0,console_command:void 0,anonymous_statistics:!0};reportsSettings="crash_reports";consoleSettings="console_command";statisticsSettings="statistics_command";constructor(){this.getItem(this.reportsSettings)&&(this.settings.crash_reports=this.getItem(this.reportsSettings)==="true"),this.getItem(this.consoleSettings)&&(this.settings.console_command=this.getItem(this.consoleSettings)),this.getItem(this.statisticsSettings)&&(this.settings.anonymous_statistics=this.getItem(this.statisticsSettings)==="true")}setReportsSettings(t){this.settings.crash_reports=t,this.removeItem(this.reportsSettings),t?this.setItem(this.reportsSettings,"true"):this.setItem(this.reportsSettings,"false")}setStatisticsSettings(t){this.settings.anonymous_statistics=t,this.removeItem(this.statisticsSettings),t?this.setItem(this.statisticsSettings,"true"):this.setItem(this.statisticsSettings,"false")}getReportsSettings(){return this.getItem(this.reportsSettings)==="true"}getStatisticsSettings(){return this.getItem(this.statisticsSettings)==="true"}setConsoleSettings(t){this.settings.console_command=t,this.removeItem(this.consoleSettings),this.setItem(this.consoleSettings,t)}getConsoleSettings(){return this.getItem(this.consoleSettings)}removeItem(t){localStorage.removeItem(t)}setItem(t,e){localStorage.setItem(t,e)}getItem(t){return localStorage.getItem(t)}getAll(){return this.settings}setAll(t){this.settings=t,this.setConsoleSettings(t.console_command),this.setReportsSettings(t.crash_reports),this.setStatisticsSettings(t.anonymous_statistics)}static \u0275fac=function(e){return new(e||a)};static \u0275prov=P({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var $a=(()=>{class a{controllerId;projectId;controllerIdProjectList;setcontrollerId(t){this.controllerId=t}setProjectId(t){this.projectId=t}setcontrollerIdProjectList(t){this.controllerIdProjectList=t}getcontrollerId(){return this.controllerId}getProjectId(){return this.projectId}getcontrollerIdProjectList(){return this.controllerIdProjectList}removeData(){this.controllerId="",this.projectId=""}static \u0275fac=function(e){return new(e||a)};static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();var Wa=(()=>{class a{httpController;settingsService;recentlyOpenedProjectService;compression_methods=[{id:1,value:"none",name:"None"},{id:2,value:"zip",name:"Zip compression (deflate)"},{id:3,value:"bzip2",name:"Bzip2 compression"},{id:4,value:"lzma",name:"Lzma compression"},{id:5,value:"zstd",name:"Zstandard compression"}];compression_level_default_value=[{id:1,name:"none",value:"",selectionValues:[]},{id:2,name:"zip",value:6,selectionValues:[0,1,2,3,4,5,6,7,8,9]},{id:3,name:"bzip2",value:9,selectionValues:[1,2,3,4,5,6,7,8,9]},{id:4,name:"lzma",value:" ",selectionValues:[]},{id:5,name:"zstd",value:3,selectionValues:[1,2,3,4,5,6,7,8,9.1,11,12,13,14,15,16,17,18,19,20,21,22]}];projectListSubject=new k;projectLockIconSubject=new k;constructor(t,e,i){this.httpController=t,this.settingsService=e,this.recentlyOpenedProjectService=i}projectListUpdated(){this.projectListSubject.next(!0)}getReadmeFile(t,e){return this.httpController.getText(t,`/projects/${e}/files/README.txt`)}postReadmeFile(t,e,i){return this.httpController.post(t,`/projects/${e}/files/README.txt`,i)}get(t,e){return this.httpController.get(t,`/projects/${e}`)}open(t,e){return this.httpController.post(t,`/projects/${e}/open`,{})}close(t,e){return this.recentlyOpenedProjectService.removeData(),this.httpController.post(t,`/projects/${e}/close`,{})}list(t){return this.httpController.get(t,"/projects")}nodes(t,e){return this.httpController.get(t,`/projects/${e}/nodes`)}links(t,e){return this.httpController.get(t,`/projects/${e}/links`)}drawings(t,e){return this.httpController.get(t,`/projects/${e}/drawings`)}add(t,e,i){return this.httpController.post(t,"/projects",{name:e,project_id:i})}update(t,e){return this.httpController.put(t,`/projects/${e.project_id}`,{auto_close:e.auto_close,auto_open:e.auto_open,auto_start:e.auto_start,drawing_grid_size:e.drawing_grid_size,grid_size:e.grid_size,name:e.name,scene_width:e.scene_width,scene_height:e.scene_height,snap_to_grid:e.snap_to_grid,show_grid:e.show_grid,show_interface_labels:e.show_interface_labels,show_layers:e.show_layers,variables:e.variables,zoom:e.zoom})}delete(t,e){return this.httpController.delete(t,`/projects/${e}`)}getUploadPath(t,e,i){return`${t.protocol}//${t.host}:${t.port}/${vt.current_version}/projects/${e}/import?name=${i}`}getExportPath(t,e){return`${t.protocol}//${t.host}:${t.port}/${vt.current_version}/projects/${e.project_id}/export`}export(t,e){return this.httpController.get(t,`/projects/${e}/export`)}getStatistics(t,e){return this.httpController.get(t,`/projects/${e}/stats`)}duplicate(t,e,i){return this.httpController.post(t,`/projects/${e}/duplicate`,{name:i})}isReadOnly(t){return t.readonly?t.readonly:!1}getCompression(){return this.compression_methods}getCompressionLevel(){return this.compression_level_default_value}getexportPortableProjectPath(t,e,i={}){return i.compression_level!=null&&i.compression_level!=""?`${t.protocol}//${t.host}:${t.port}/${vt.current_version}/projects/${e}/export?include_snapshots=${i.include_snapshots}&include_images=${i.include_base_image}&reset_mac_addresses=${i.reset_mac_address}&compression=${i.compression}&compression_level=${i.compression_level}&token=${t.authToken}`:`${t.protocol}//${t.host}:${t.port}/${vt.current_version}/projects/${e}/export?include_snapshots=${i.include_snapshots}&include_images=${i.include_base_image}&reset_mac_addresses=${i.reset_mac_address}&compression=${i.compression}&token=${t.authToken}`}getProjectStatus(t,e){return this.get(t,`${e}/locked`)}projectUpdateLockIcon(){this.projectLockIconSubject.next(!0)}static \u0275fac=function(e){return new(e||a)(nt(me),nt(Ha),nt($a))};static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();var Wo=new w("DEFAULT_THEME_TOKEN",{providedIn:"root",factory:()=>"indigo-pink"}),Qa=(()=>{class a{document;_darkMode$=new St(!1);darkMode$=this._darkMode$.asObservable();themeChanged=new F;mapThemeChanged=new F;currentTheme="indigo-pink";currentMapTheme="auto";savedTheme="indigo-pink";savedMapTheme="auto";availableThemes=[{key:"deeppurple-amber",label:"Deep Purple & Amber",type:"light",primaryColor:"#6750A4"},{key:"indigo-pink",label:"Indigo & Pink",type:"light",primaryColor:"#3F51B5"},{key:"magenta-violet",label:"Magenta & Violet",type:"light",primaryColor:"#D81B60"},{key:"rose-red",label:"Rose & Red",type:"light",primaryColor:"#E91E63"},{key:"pink-bluegrey",label:"Pink & Bluegrey",type:"dark",primaryColor:"#E91E63"},{key:"purple-green",label:"Purple & Green",type:"dark",primaryColor:"#7E57C2"},{key:"azure-blue",label:"Azure & Blue",type:"dark",primaryColor:"#0078D4"},{key:"cyan-orange",label:"Cyan & Orange",type:"dark",primaryColor:"#00B7C3"}];availableMapBackgrounds=[{key:"auto",label:"Follow global theme",background:"",textColor:"",type:"light"},{key:"light-1",label:"Cyan Sky",background:"radial-gradient(ellipse at 20% 20%, #B2EBF2 0%, #E0F7FA 70%)",textColor:"#006064",type:"light"},{key:"light-2",label:"Blue Sky",background:"radial-gradient(ellipse at 20% 20%, #BBDEFB 0%, #E3F2FD 70%)",textColor:"#1565C0",type:"light"},{key:"light-3",label:"Cloud Gray",background:"radial-gradient(ellipse at 20% 20%, #F5F5F5 0%, #FAFAFA 70%)",textColor:"#424242",type:"light"},{key:"light-4",label:"Lavender",background:"radial-gradient(ellipse at 20% 20%, #E1BEE7 0%, #F3E5F5 70%)",textColor:"#4A148C",type:"light"},{key:"dark-1",label:"Deep Cyan",background:"linear-gradient(135deg, #006064 0%, #00838F 50%, #006064 100%)",textColor:"#FFFFFF",type:"dark"},{key:"dark-2",label:"Deep Blue",background:"linear-gradient(135deg, #1565C0 0%, #1976D2 50%, #1565C0 100%)",textColor:"#FFFFFF",type:"dark"},{key:"dark-3",label:"Charcoal",background:"linear-gradient(135deg, #424242 0%, #616161 50%, #424242 100%)",textColor:"#FFFFFF",type:"dark"},{key:"dark-4",label:"Deep Purple",background:"linear-gradient(135deg, #4A148C 0%, #6A1B9A 50%, #4A148C 100%)",textColor:"#FFFFFF",type:"dark"}];constructor(t,e){this.document=t;let i=localStorage.getItem("theme");this.currentTheme=i||e,this.savedTheme=this.currentTheme;let n=localStorage.getItem("mapTheme");this.currentMapTheme=n||"auto",this.savedMapTheme=this.currentMapTheme,this.applyTheme(this.currentTheme)}getCurrentTheme(){return this.currentTheme}getThemeType(){return this.isDarkTheme(this.currentTheme)?"dark":"light"}getActualMapTheme(){if(this.savedMapTheme==="auto")return this.getThemeType();let t=this.availableMapBackgrounds.find(e=>e.key===this.savedMapTheme);return t?t.type:"light"}getActualTheme(){return this.getThemeType()}isDarkTheme(t){return t==="pink-bluegrey"||t==="purple-green"||t==="azure-blue"||t==="cyan-orange"}setTheme(t){this.currentTheme!==t&&(this.currentTheme=t,this.savedTheme=t,this.applyTheme(t),this.saveThemePreference(t),this.themeChanged.emit(t),this.currentMapTheme==="auto"&&this.mapThemeChanged.emit(t),this._darkMode$.next(this.isDarkTheme(t)))}toggleTheme(){let t=this.getThemeType(),e;t==="dark"?e=this.availableThemes.find(i=>i.type==="light")?.key||"deeppurple-amber":e=this.availableThemes.find(i=>i.type==="dark")?.key||"pink-bluegrey",this.setTheme(e)}setDarkMode(t){let e=t?"pink-bluegrey":"indigo-pink";this.setTheme(e)}setMapTheme(t){this.currentMapTheme=t,this.savedMapTheme=t,localStorage.setItem("mapTheme",t),this.mapThemeChanged.emit(this.getActualMapTheme())}restoreTheme(){let t=localStorage.getItem("theme");t&&this.availableThemes.some(e=>e.key===t)&&this.setTheme(t)}applyTheme(t){let e=this.document.documentElement;e.classList.remove("theme-deeppurple-amber","theme-indigo-pink","theme-magenta-violet","theme-rose-red","theme-pink-bluegrey","theme-purple-green","theme-azure-blue","theme-cyan-orange"),e.classList.add(`theme-${t}`)}saveThemePreference(t){localStorage.setItem("theme",t)}isDarkMode(){return this.isDarkTheme(this.currentTheme)}isLightMode(){return!this.isDarkTheme(this.currentTheme)}getCanvasLabelColor(){return this.getActualMapTheme()==="dark"?"#FFFFFF":"#000000"}getCanvasLinkColor(){return this.getActualMapTheme()==="dark"?"#FFFFFF":"#000000"}static \u0275fac=function(e){return new(e||a)(nt(It),nt(Wo))};static \u0275prov=P({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var Ga=(()=>{class a{ws;currentController;computeNotificationEmitter=new F;computeCache=new Map;computeCacheUpdated=new F;notificationsPath(t){let e="ws";return t.protocol==="https:"&&(e="wss"),`${e}://${t.host}:${t.port}/${vt.current_version}/notifications/ws?token=${t.authToken}`}projectNotificationsPath(t,e){let i="ws";return t.protocol==="https:"&&(i="wss"),`${i}://${t.host}:${t.port}/${vt.current_version}/projects/${e}/notifications/ws?token=${t.authToken}`}connectToComputeNotifications(t){this.ws&&this.currentController===t||(this.disconnect(),this.currentController=t,this.ws=new WebSocket(this.notificationsPath(t)),this.ws.onmessage=e=>{let i=JSON.parse(e.data);this.handleMessage(i)},this.ws.onerror=()=>{console.error("Compute notifications WebSocket error")},this.ws.onclose=()=>{this.ws=null})}disconnect(){this.ws&&(this.ws.close(),this.ws=null,this.currentController=null,this.computeCache.clear())}getCachedComputes(){return Array.from(this.computeCache.values())}hasCachedData(){return this.computeCache.size>0}setInitialComputes(t){this.computeCache.clear(),t.forEach(e=>{this.computeCache.set(e.compute_id,e)}),this.computeCacheUpdated.emit(this.getCachedComputes())}handleMessage(t){switch(t.action){case"compute.created":this.computeCache.set(t.event.compute_id,t.event),this.computeNotificationEmitter.emit(t),this.computeCacheUpdated.emit(this.getCachedComputes());break;case"compute.updated":this.computeCache.set(t.event.compute_id,t.event),this.computeNotificationEmitter.emit(t),this.computeCacheUpdated.emit(this.getCachedComputes());break;case"compute.deleted":this.computeCache.delete(t.event.compute_id),this.computeNotificationEmitter.emit(t),this.computeCacheUpdated.emit(this.getCachedComputes());break}}static \u0275fac=function(e){return new(e||a)};static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();function Qo(a,s){if(a&1){let t=lt();l(0,"div",1)(1,"button",2),u("click",function(){R(t);let i=p();return A(i.action())}),E(2),d()()}if(a&2){let t=p();c(2),ft(" ",t.data.action," ")}}var Go=["label"];function qo(a,s){}var Uo=Math.pow(2,31)-1,Zt=class{_overlayRef;instance;containerInstance;_afterDismissed=new k;_afterOpened=new k;_onAction=new k;_durationTimeoutId;_dismissedByAction=!1;constructor(s,t){this._overlayRef=t,this.containerInstance=s,s._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(s){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(s,Uo))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},qa=new w("MatSnackBarData"),Vt=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},Yo=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return a})(),Ko=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return a})(),Zo=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return a})(),Ua=(()=>{class a{snackBarRef=r(Zt);data=r(qa);constructor(){}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=C({type:a,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["matButton","","matSnackBarAction","",3,"click"]],template:function(e,i){e&1&&(l(0,"div",0),E(1),d(),g(2,Qo,3,1,"div",1)),e&2&&(c(),ft(" ",i.data.message,` +`],encapsulation:2,changeDetection:0})}return a})();var za=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275mod=N({type:a});static \u0275inj=z({imports:[Vi,Pt,j,ne]})}return a})();var jt=class{data=[];dataChange=new St([]);itemUpdated=new k;getItems(){return this.data}add(s){this.findIndex(s)>=0?this.update(s):(this.data.push(s),this.dataChange.next(this.data))}set(s){s.forEach(e=>{let i=this.findIndex(e);if(i>=0){let n=Object.assign(this.data[i],e);this.data[i]=n}else this.data.push(e)}),this.data.filter(e=>s.filter(i=>this.getItemKey(i)===this.getItemKey(e)).length===0).forEach(e=>this.remove(e)),this.dataChange.next(this.data)}get(s){let t=this.data.findIndex(e=>this.getItemKey(e)===s);if(t>=0)return this.data[t]}update(s){let t=this.findIndex(s);if(t>=0){let e=Object.assign(this.data[t],s);this.data[t]=e,this.dataChange.next(this.data),this.itemUpdated.next(e)}}remove(s){let t=this.findIndex(s);t>=0&&(this.data.splice(t,1),this.dataChange.next(this.data))}get changes(){return this.dataChange}get itemChanged(){return this.itemUpdated}clear(){this.data=[],this.dataChange.next(this.data)}findIndex(s){return this.data.findIndex(t=>this.getItemKey(t)===this.getItemKey(s))}};var Na=(()=>{class a extends jt{getItemKey(t){return t.link_id}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Y(a)))(i||a)}})();static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();var ja=(()=>{class a extends jt{getItemKey(t){return t.node_id}static \u0275fac=(()=>{let t;return function(i){return(t||(t=Y(a)))(i||a)}})();static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();var Va=(()=>{class a{httpController;constructor(t){this.httpController=t}getComputes(t){return this.httpController.get(t,"/computes")}getCompute(t,e){return this.httpController.get(t,`/computes/${e}`)}createCompute(t,e){return this.httpController.post(t,"/computes",e)}updateCompute(t,e,i){return this.httpController.put(t,`/computes/${e}`,i)}deleteCompute(t,e){return this.httpController.delete(t,`/computes/${e}`)}connectCompute(t,e){return this.httpController.post(t,`/computes/${e}/connect`,null)}getStatistics(t){return this.httpController.get(t,"/statistics")}static \u0275fac=function(e){return new(e||a)(nt(me))};static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();var Ha=(()=>{class a{settings={crash_reports:!0,console_command:void 0,anonymous_statistics:!0};reportsSettings="crash_reports";consoleSettings="console_command";statisticsSettings="statistics_command";constructor(){this.getItem(this.reportsSettings)&&(this.settings.crash_reports=this.getItem(this.reportsSettings)==="true"),this.getItem(this.consoleSettings)&&(this.settings.console_command=this.getItem(this.consoleSettings)),this.getItem(this.statisticsSettings)&&(this.settings.anonymous_statistics=this.getItem(this.statisticsSettings)==="true")}setReportsSettings(t){this.settings.crash_reports=t,this.removeItem(this.reportsSettings),t?this.setItem(this.reportsSettings,"true"):this.setItem(this.reportsSettings,"false")}setStatisticsSettings(t){this.settings.anonymous_statistics=t,this.removeItem(this.statisticsSettings),t?this.setItem(this.statisticsSettings,"true"):this.setItem(this.statisticsSettings,"false")}getReportsSettings(){return this.getItem(this.reportsSettings)==="true"}getStatisticsSettings(){return this.getItem(this.statisticsSettings)==="true"}setConsoleSettings(t){this.settings.console_command=t,this.removeItem(this.consoleSettings),this.setItem(this.consoleSettings,t)}getConsoleSettings(){return this.getItem(this.consoleSettings)}removeItem(t){localStorage.removeItem(t)}setItem(t,e){localStorage.setItem(t,e)}getItem(t){return localStorage.getItem(t)}getAll(){return this.settings}setAll(t){this.settings=t,this.setConsoleSettings(t.console_command),this.setReportsSettings(t.crash_reports),this.setStatisticsSettings(t.anonymous_statistics)}static \u0275fac=function(e){return new(e||a)};static \u0275prov=P({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var $a=(()=>{class a{controllerId;projectId;controllerIdProjectList;setcontrollerId(t){this.controllerId=t}setProjectId(t){this.projectId=t}setcontrollerIdProjectList(t){this.controllerIdProjectList=t}getcontrollerId(){return this.controllerId}getProjectId(){return this.projectId}getcontrollerIdProjectList(){return this.controllerIdProjectList}removeData(){this.controllerId="",this.projectId=""}static \u0275fac=function(e){return new(e||a)};static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();var Wa=(()=>{class a{httpController;settingsService;recentlyOpenedProjectService;compression_methods=[{id:1,value:"none",name:"None"},{id:2,value:"zip",name:"Zip compression (deflate)"},{id:3,value:"bzip2",name:"Bzip2 compression"},{id:4,value:"lzma",name:"Lzma compression"},{id:5,value:"zstd",name:"Zstandard compression"}];compression_level_default_value=[{id:1,name:"none",value:"",selectionValues:[]},{id:2,name:"zip",value:6,selectionValues:[0,1,2,3,4,5,6,7,8,9]},{id:3,name:"bzip2",value:9,selectionValues:[1,2,3,4,5,6,7,8,9]},{id:4,name:"lzma",value:" ",selectionValues:[]},{id:5,name:"zstd",value:3,selectionValues:[1,2,3,4,5,6,7,8,9.1,11,12,13,14,15,16,17,18,19,20,21,22]}];projectListSubject=new k;projectLockIconSubject=new k;constructor(t,e,i){this.httpController=t,this.settingsService=e,this.recentlyOpenedProjectService=i}projectListUpdated(){this.projectListSubject.next(!0)}getReadmeFile(t,e){return this.httpController.getText(t,`/projects/${e}/files/README.txt`)}postReadmeFile(t,e,i){return this.httpController.post(t,`/projects/${e}/files/README.txt`,i)}get(t,e){return this.httpController.get(t,`/projects/${e}`)}open(t,e){return this.httpController.post(t,`/projects/${e}/open`,{})}close(t,e){return this.recentlyOpenedProjectService.removeData(),this.httpController.post(t,`/projects/${e}/close`,{})}list(t){return this.httpController.get(t,"/projects")}nodes(t,e){return this.httpController.get(t,`/projects/${e}/nodes`)}links(t,e){return this.httpController.get(t,`/projects/${e}/links`)}drawings(t,e){return this.httpController.get(t,`/projects/${e}/drawings`)}add(t,e,i){return this.httpController.post(t,"/projects",{name:e,project_id:i})}update(t,e){return this.httpController.put(t,`/projects/${e.project_id}`,{auto_close:e.auto_close,auto_open:e.auto_open,auto_start:e.auto_start,drawing_grid_size:e.drawing_grid_size,grid_size:e.grid_size,name:e.name,scene_width:e.scene_width,scene_height:e.scene_height,snap_to_grid:e.snap_to_grid,show_grid:e.show_grid,show_interface_labels:e.show_interface_labels,show_layers:e.show_layers,variables:e.variables,zoom:e.zoom})}delete(t,e){return this.httpController.delete(t,`/projects/${e}`)}getUploadPath(t,e,i){return`${t.protocol}//${t.host}:${t.port}/${vt.current_version}/projects/${e}/import?name=${i}`}getExportPath(t,e){return`${t.protocol}//${t.host}:${t.port}/${vt.current_version}/projects/${e.project_id}/export`}export(t,e){return this.httpController.get(t,`/projects/${e}/export`)}getStatistics(t,e){return this.httpController.get(t,`/projects/${e}/stats`)}duplicate(t,e,i){return this.httpController.post(t,`/projects/${e}/duplicate`,{name:i})}isReadOnly(t){return t.readonly?t.readonly:!1}getCompression(){return this.compression_methods}getCompressionLevel(){return this.compression_level_default_value}getexportPortableProjectPath(t,e,i={}){return i.compression_level!=null&&i.compression_level!=""?`${t.protocol}//${t.host}:${t.port}/${vt.current_version}/projects/${e}/export?include_snapshots=${i.include_snapshots}&include_images=${i.include_base_image}&reset_mac_addresses=${i.reset_mac_address}&compression=${i.compression}&compression_level=${i.compression_level}&token=${t.authToken}`:`${t.protocol}//${t.host}:${t.port}/${vt.current_version}/projects/${e}/export?include_snapshots=${i.include_snapshots}&include_images=${i.include_base_image}&reset_mac_addresses=${i.reset_mac_address}&compression=${i.compression}&token=${t.authToken}`}getProjectStatus(t,e){return this.get(t,`${e}/locked`)}projectUpdateLockIcon(){this.projectLockIconSubject.next(!0)}static \u0275fac=function(e){return new(e||a)(nt(me),nt(Ha),nt($a))};static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();var Wo=new w("DEFAULT_THEME_TOKEN",{providedIn:"root",factory:()=>"indigo-pink"}),Qa=(()=>{class a{document;_darkMode$=new St(!1);darkMode$=this._darkMode$.asObservable();themeChanged=new F;mapThemeChanged=new F;currentTheme="indigo-pink";currentMapTheme="auto";savedTheme="indigo-pink";savedMapTheme="auto";availableThemes=[{key:"deeppurple-amber",label:"Deep Purple & Amber",type:"light",primaryColor:"#6750A4"},{key:"indigo-pink",label:"Indigo & Pink",type:"light",primaryColor:"#3F51B5"},{key:"magenta-violet",label:"Magenta & Violet",type:"light",primaryColor:"#D81B60"},{key:"rose-red",label:"Rose & Red",type:"light",primaryColor:"#E91E63"},{key:"pink-bluegrey",label:"Pink & Bluegrey",type:"dark",primaryColor:"#E91E63"},{key:"purple-green",label:"Purple & Green",type:"dark",primaryColor:"#7E57C2"},{key:"azure-blue",label:"Azure & Blue",type:"dark",primaryColor:"#0078D4"},{key:"cyan-orange",label:"Cyan & Orange",type:"dark",primaryColor:"#00B7C3"}];availableMapBackgrounds=[{key:"auto",label:"Follow global theme",background:"",textColor:"",type:"light"},{key:"light-1",label:"Cyan Sky",background:"radial-gradient(ellipse at 20% 20%, #B2EBF2 0%, #E0F7FA 70%)",textColor:"#006064",type:"light"},{key:"light-2",label:"Blue Sky",background:"radial-gradient(ellipse at 20% 20%, #BBDEFB 0%, #E3F2FD 70%)",textColor:"#1565C0",type:"light"},{key:"light-3",label:"Cloud Gray",background:"radial-gradient(ellipse at 20% 20%, #F5F5F5 0%, #FAFAFA 70%)",textColor:"#424242",type:"light"},{key:"light-4",label:"Lavender",background:"radial-gradient(ellipse at 20% 20%, #E1BEE7 0%, #F3E5F5 70%)",textColor:"#4A148C",type:"light"},{key:"dark-1",label:"Deep Cyan",background:"linear-gradient(135deg, #006064 0%, #00838F 50%, #006064 100%)",textColor:"#FFFFFF",type:"dark"},{key:"dark-2",label:"Deep Blue",background:"linear-gradient(135deg, #1565C0 0%, #1976D2 50%, #1565C0 100%)",textColor:"#FFFFFF",type:"dark"},{key:"dark-3",label:"Charcoal",background:"linear-gradient(135deg, #424242 0%, #616161 50%, #424242 100%)",textColor:"#FFFFFF",type:"dark"},{key:"dark-4",label:"Deep Purple",background:"linear-gradient(135deg, #4A148C 0%, #6A1B9A 50%, #4A148C 100%)",textColor:"#FFFFFF",type:"dark"}];constructor(t,e){this.document=t;let i=localStorage.getItem("theme");this.currentTheme=i||e,this.savedTheme=this.currentTheme;let n=localStorage.getItem("mapTheme");this.currentMapTheme=n||"auto",this.savedMapTheme=this.currentMapTheme,this.applyTheme(this.currentTheme)}getCurrentTheme(){return this.currentTheme}getThemeType(){return this.isDarkTheme(this.currentTheme)?"dark":"light"}getActualMapTheme(){if(this.savedMapTheme==="auto")return this.getThemeType();let t=this.availableMapBackgrounds.find(e=>e.key===this.savedMapTheme);return t?t.type:"light"}getActualTheme(){return this.getThemeType()}isDarkTheme(t){return t==="pink-bluegrey"||t==="purple-green"||t==="azure-blue"||t==="cyan-orange"}setTheme(t){this.currentTheme!==t&&(this.currentTheme=t,this.savedTheme=t,this.applyTheme(t),this.saveThemePreference(t),this.themeChanged.emit(t),this.currentMapTheme==="auto"&&this.mapThemeChanged.emit(t),this._darkMode$.next(this.isDarkTheme(t)))}toggleTheme(){let t=this.getThemeType(),e;t==="dark"?e=this.availableThemes.find(i=>i.type==="light")?.key||"deeppurple-amber":e=this.availableThemes.find(i=>i.type==="dark")?.key||"pink-bluegrey",this.setTheme(e)}setDarkMode(t){let e=t?"pink-bluegrey":"indigo-pink";this.setTheme(e)}setMapTheme(t){this.currentMapTheme=t,this.savedMapTheme=t,localStorage.setItem("mapTheme",t),this.mapThemeChanged.emit(this.getActualMapTheme())}restoreTheme(){let t=localStorage.getItem("theme");t&&this.availableThemes.some(e=>e.key===t)&&this.setTheme(t)}applyTheme(t){let e=this.document.documentElement;e.classList.remove("theme-deeppurple-amber","theme-indigo-pink","theme-magenta-violet","theme-rose-red","theme-pink-bluegrey","theme-purple-green","theme-azure-blue","theme-cyan-orange"),e.classList.add(`theme-${t}`)}saveThemePreference(t){localStorage.setItem("theme",t)}isDarkMode(){return this.isDarkTheme(this.currentTheme)}isLightMode(){return!this.isDarkTheme(this.currentTheme)}getCanvasLabelColor(){return this.getActualMapTheme()==="dark"?"#FFFFFF":"#000000"}getCanvasLinkColor(){return this.getActualMapTheme()==="dark"?"#FFFFFF":"#000000"}static \u0275fac=function(e){return new(e||a)(nt(It),nt(Wo))};static \u0275prov=P({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var Ga=(()=>{class a{ws;currentController;computeNotificationEmitter=new F;computeCache=new Map;projectNotificationEmitter=new F;computeCacheUpdated=new F;notificationsPath(t){let e="ws";return t.protocol==="https:"&&(e="wss"),`${e}://${t.host}:${t.port}/${vt.current_version}/notifications/ws?token=${t.authToken}`}projectNotificationsPath(t,e){let i="ws";return t.protocol==="https:"&&(i="wss"),`${i}://${t.host}:${t.port}/${vt.current_version}/projects/${e}/notifications/ws?token=${t.authToken}`}connectToComputeNotifications(t){this.ws&&this.currentController===t||(this.disconnect(),this.currentController=t,this.ws=new WebSocket(this.notificationsPath(t)),this.ws.onmessage=e=>{let i=JSON.parse(e.data);this.handleMessage(i)},this.ws.onerror=()=>{console.error("Compute notifications WebSocket error")},this.ws.onclose=()=>{this.ws=null})}disconnect(){this.ws&&(this.ws.close(),this.ws=null,this.currentController=null,this.computeCache.clear())}getCachedComputes(){return Array.from(this.computeCache.values())}hasCachedData(){return this.computeCache.size>0}setInitialComputes(t){this.computeCache.clear(),t.forEach(e=>{this.computeCache.set(e.compute_id,e)}),this.computeCacheUpdated.emit(this.getCachedComputes())}handleMessage(t){switch(t.action){case"compute.created":this.computeCache.set(t.event.compute_id,t.event),this.computeNotificationEmitter.emit(t),this.computeCacheUpdated.emit(this.getCachedComputes());break;case"compute.updated":this.computeCache.set(t.event.compute_id,t.event),this.computeNotificationEmitter.emit(t),this.computeCacheUpdated.emit(this.getCachedComputes());break;case"compute.deleted":this.computeCache.delete(t.event.compute_id),this.computeNotificationEmitter.emit(t),this.computeCacheUpdated.emit(this.getCachedComputes());break;case"project.created":case"project.opened":case"project.closed":case"project.updated":case"project.deleted":this.projectNotificationEmitter.emit(t);break}}static \u0275fac=function(e){return new(e||a)};static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();function Qo(a,s){if(a&1){let t=lt();l(0,"div",1)(1,"button",2),u("click",function(){R(t);let i=p();return A(i.action())}),E(2),d()()}if(a&2){let t=p();c(2),ft(" ",t.data.action," ")}}var Go=["label"];function qo(a,s){}var Uo=Math.pow(2,31)-1,Zt=class{_overlayRef;instance;containerInstance;_afterDismissed=new k;_afterOpened=new k;_onAction=new k;_durationTimeoutId;_dismissedByAction=!1;constructor(s,t){this._overlayRef=t,this.containerInstance=s,s._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(s){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(s,Uo))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},qa=new w("MatSnackBarData"),Vt=class{politeness="polite";announcementMessage="";viewContainerRef;duration=0;panelClass;direction;data=null;horizontalPosition="center";verticalPosition="bottom"},Yo=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]})}return a})(),Ko=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]})}return a})(),Zo=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275dir=x({type:a,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]})}return a})(),Ua=(()=>{class a{snackBarRef=r(Zt);data=r(qa);constructor(){}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=C({type:a,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["matButton","","matSnackBarAction","",3,"click"]],template:function(e,i){e&1&&(l(0,"div",0),E(1),d(),g(2,Qo,3,1,"div",1)),e&2&&(c(),ft(" ",i.data.message,` `),c(),v(i.hasAction?2:-1))},dependencies:[qi,Yo,Ko,Zo],styles:[`.mat-mdc-simple-snack-bar{display:flex}.mat-mdc-simple-snack-bar .mat-mdc-snack-bar-label{max-height:50vh;overflow:auto} `],encapsulation:2,changeDetection:0})}return a})(),Qe="_mat-snack-bar-enter",Ge="_mat-snack-bar-exit",Xo=(()=>{class a extends Mi{_ngZone=r(H);_elementRef=r(O);_changeDetectorRef=r(W);_platform=r(ot);_animationsDisabled=Q();snackBarConfig=r(Vt);_document=r(It);_trackedModals=new Set;_enterFallback;_exitFallback;_injector=r(G);_announceDelay=150;_announceTimeoutId;_destroyed=!1;_portalOutlet;_onAnnounce=new k;_onExit=new k;_onEnter=new k;_animationState="void";_live;_label;_role;_liveElementId=r(U).getId("mat-snack-bar-container-live-");constructor(){super();let t=this.snackBarConfig;t.politeness==="assertive"&&!t.announcementMessage?this._live="assertive":t.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(t){this._assertNotAttached();let e=this._portalOutlet.attachComponentPortal(t);return this._afterPortalAttached(),e}attachTemplatePortal(t){this._assertNotAttached();let e=this._portalOutlet.attachTemplatePortal(t);return this._afterPortalAttached(),e}attachDomPortal=t=>{this._assertNotAttached();let e=this._portalOutlet.attachDomPortal(t);return this._afterPortalAttached(),e};onAnimationEnd(t){t===Ge?this._completeExit():t===Qe&&(clearTimeout(this._enterFallback),this._ngZone.run(()=>{this._onEnter.next(),this._onEnter.complete()}))}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce(),this._animationsDisabled?rt(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Qe)))},{injector:this._injector}):(clearTimeout(this._enterFallback),this._enterFallback=setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-snack-bar-fallback-visible"),this.onAnimationEnd(Qe)},200)))}exit(){return this._destroyed?te(void 0):(this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._animationsDisabled?rt(()=>{this._ngZone.run(()=>queueMicrotask(()=>this.onAnimationEnd(Ge)))},{injector:this._injector}):(clearTimeout(this._exitFallback),this._exitFallback=setTimeout(()=>this.onAnimationEnd(Ge),200))}),this._onExit)}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){clearTimeout(this._exitFallback),queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(o=>t.classList.add(o)):t.classList.add(e)),this._exposeToModals();let i=this._label.nativeElement,n="mdc-snackbar__label";i.classList.toggle(n,!i.querySelector(`.${n}`))}_exposeToModals(){let t=this._liveElementId,e=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let i=0;i{let e=t.getAttribute("aria-owns");if(e){let i=e.replace(this._liveElementId,"").trim();i.length>0?t.setAttribute("aria-owns",i):t.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{if(this._destroyed)return;let t=this._elementRef.nativeElement,e=t.querySelector("[aria-hidden]"),i=t.querySelector("[aria-live]");if(e&&i){let n=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(n=document.activeElement),e.removeAttribute("aria-hidden"),i.appendChild(e),n?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=C({type:a,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,i){if(e&1&&V(Lt,7)(Go,7),e&2){let n;m(n=h())&&(i._portalOutlet=n.first),m(n=h())&&(i._label=n.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:6,hostBindings:function(e,i){e&1&&u("animationend",function(o){return i.onAnimationEnd(o.animationName)})("animationcancel",function(o){return i.onAnimationEnd(o.animationName)}),e&2&&_("mat-snack-bar-container-enter",i._animationState==="visible")("mat-snack-bar-container-exit",i._animationState==="hidden")("mat-snack-bar-container-animations-enabled",!i._animationsDisabled)},features:[q],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(e,i){e&1&&(l(0,"div",1)(1,"div",2,0)(3,"div",3),tt(4,qo,0,0,"ng-template",4),d(),M(5,"div"),d()()),e&2&&(c(5),T("aria-live",i._live)("role",i._role)("id",i._liveElementId))},dependencies:[Lt],styles:[`@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-button-text-state-layer-color: currentColor;--mat-button-text-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1} `],encapsulation:2})}return a})(),Jo=new w("mat-snack-bar-default-options",{providedIn:"root",factory:()=>new Vt}),qe=(()=>{class a{_live=r(de);_injector=r(G);_breakpointObserver=r(ji);_parentSnackBar=r(a,{optional:!0,skipSelf:!0});_defaultConfig=r(Jo);_animationsDisabled=Q();_snackBarRefAtThisLevel=null;simpleSnackBarComponent=Ua;snackBarContainerComponent=Xo;handsetCssClass="mat-mdc-snack-bar-handset";get _openedSnackBarRef(){let t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}constructor(){}openFromComponent(t,e){return this._attach(t,e)}openFromTemplate(t,e){return this._attach(t,e)}open(t,e="",i){let n=X(X({},this._defaultConfig),i);return n.data={message:t,action:e},n.announcementMessage===t&&(n.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,n)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,e){let i=e&&e.viewContainerRef&&e.viewContainerRef.injector,n=G.create({parent:i||this._injector,providers:[{provide:Vt,useValue:e}]}),o=new qt(this.snackBarContainerComponent,e.viewContainerRef,n),f=t.attach(o);return f.instance.snackBarConfig=e,f.instance}_attach(t,e){let i=X(X(X({},new Vt),this._defaultConfig),e),n=this._createOverlay(i),o=this._attachSnackBarContainer(n,i),f=new Zt(o,n);if(t instanceof Dt){let b=new oe(t,null,{$implicit:i.data,snackBarRef:f});f.instance=o.attachTemplatePortal(b)}else{let b=this._createInjector(i,f),xt=new qt(t,void 0,b),Mt=o.attachComponentPortal(xt);f.instance=Mt.instance}return this._breakpointObserver.observe(Gi.HandsetPortrait).pipe(I(n.detachments())).subscribe(b=>{n.overlayElement.classList.toggle(this.handsetCssClass,b.matches)}),i.announcementMessage&&o._onAnnounce.subscribe(()=>{this._live.announce(i.announcementMessage,i.politeness)}),this._animateSnackBar(f,i),this._openedSnackBarRef=f,this._openedSnackBarRef}_animateSnackBar(t,e){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),e.announcementMessage&&this._live.clear()}),e.duration&&e.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(e.duration)),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter()}_createOverlay(t){let e=new Di;e.direction=t.direction;let i=Fi(this._injector),n=t.direction==="rtl",o=t.horizontalPosition==="left"||t.horizontalPosition==="start"&&!n||t.horizontalPosition==="end"&&n,f=!o&&t.horizontalPosition!=="center";return o?i.left("0"):f?i.right("0"):i.centerHorizontally(),t.verticalPosition==="top"?i.top("0"):i.bottom("0"),e.positionStrategy=i,e.disableAnimations=this._animationsDisabled,se(this._injector,e)}_createInjector(t,e){let i=t&&t.viewContainerRef&&t.viewContainerRef.injector;return G.create({parent:i||this._injector,providers:[{provide:Zt,useValue:e},{provide:qa,useValue:t.data}]})}static \u0275fac=function(e){return new(e||a)};static \u0275prov=P({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();var ad=(()=>{class a{static \u0275fac=function(e){return new(e||a)};static \u0275mod=N({type:a});static \u0275inj=z({providers:[qe],imports:[Pt,Ii,Ui,Ua,j]})}return a})();var Ya=(()=>{class a{snackbar;snackBarConfigForSuccess={duration:4e3,panelClass:["snackabar-success"],MatSnackBarHorizontalPosition:"center",MatSnackBarVerticalPosition:"bottom"};snackBarConfigForWarning={duration:4e3,panelClass:["snackabar-warning"],MatSnackBarHorizontalPosition:"center",MatSnackBarVerticalPosition:"bottom"};snackBarConfigForError={duration:1e4,panelClass:["snackabar-error"],MatSnackBarHorizontalPosition:"center",MatSnackBarVerticalPosition:"bottom"};constructor(t){this.snackbar=t}error(t){console.error(t),this.snackbar.open(t,"Close",this.snackBarConfigForError)}warning(t){this.snackbar.open(t,"Close",this.snackBarConfigForWarning)}success(t){this.snackbar.open(t,"Close",this.snackBarConfigForSuccess)}static \u0275fac=function(e){return new(e||a)(nt(qe))};static \u0275prov=P({token:a,factory:a.\u0275fac})}return a})();var Ka=["*"],Za=`.mdc-list{margin:0;padding:8px 0;list-style-type:none}.mdc-list:focus{outline:none}.mdc-list-item{display:flex;position:relative;justify-content:flex-start;overflow:hidden;padding:0;align-items:stretch;cursor:pointer;padding-left:16px;padding-right:16px;background-color:var(--mat-list-list-item-container-color, transparent);border-radius:var(--mat-list-list-item-container-shape, var(--mat-sys-corner-none))}.mdc-list-item.mdc-list-item--selected{background-color:var(--mat-list-list-item-selected-container-color)}.mdc-list-item:focus{outline:0}.mdc-list-item.mdc-list-item--disabled{cursor:auto}.mdc-list-item.mdc-list-item--with-one-line{height:var(--mat-list-list-item-one-line-container-height, 48px)}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines{height:var(--mat-list-list-item-two-line-container-height, 64px)}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines{height:var(--mat-list-list-item-three-line-container-height, 88px)}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--selected::before,.mdc-list-item.mdc-list-item--selected:focus::before,.mdc-list-item:not(.mdc-list-item--selected):focus::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;content:"";pointer-events:none}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor;flex-shrink:0;pointer-events:none}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mat-list-list-item-leading-icon-color, var(--mat-sys-on-surface-variant));width:var(--mat-list-list-item-leading-icon-size, 24px);height:var(--mat-list-list-item-leading-icon-size, 24px);margin-left:16px;margin-right:32px}[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:var(--mat-list-list-item-hover-leading-icon-color)}.mdc-list-item--with-leading-avatar .mdc-list-item__start{width:var(--mat-list-list-item-leading-avatar-size, 40px);height:var(--mat-list-list-item-leading-avatar-size, 40px);margin-left:16px;margin-right:16px;border-radius:50%}.mdc-list-item--with-leading-avatar .mdc-list-item__start,[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px;border-radius:50%}.mdc-list-item__end{flex-shrink:0;pointer-events:none}.mdc-list-item--with-trailing-meta .mdc-list-item__end{font-family:var(--mat-list-list-item-trailing-supporting-text-font, var(--mat-sys-label-small-font));line-height:var(--mat-list-list-item-trailing-supporting-text-line-height, var(--mat-sys-label-small-line-height));font-size:var(--mat-list-list-item-trailing-supporting-text-size, var(--mat-sys-label-small-size));font-weight:var(--mat-list-list-item-trailing-supporting-text-weight, var(--mat-sys-label-small-weight));letter-spacing:var(--mat-list-list-item-trailing-supporting-text-tracking, var(--mat-sys-label-small-tracking))}.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mat-list-list-item-trailing-icon-color, var(--mat-sys-on-surface-variant));width:var(--mat-list-list-item-trailing-icon-size, 24px);height:var(--mat-list-list-item-trailing-icon-size, 24px)}.mdc-list-item--with-trailing-icon:hover .mdc-list-item__end{color:var(--mat-list-list-item-hover-trailing-icon-color)}.mdc-list-item.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mat-list-list-item-trailing-supporting-text-color, var(--mat-sys-on-surface-variant))}.mdc-list-item--selected.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mat-list-list-item-selected-trailing-icon-color, var(--mat-sys-primary))}.mdc-list-item__content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;flex:1;pointer-events:none}.mdc-list-item--with-two-lines .mdc-list-item__content,.mdc-list-item--with-three-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:var(--mat-list-list-item-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-list-list-item-label-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-list-list-item-label-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-list-list-item-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-list-list-item-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-list-list-item-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-list-item:hover .mdc-list-item__primary-text{color:var(--mat-list-list-item-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-list-item:focus .mdc-list-item__primary-text{color:var(--mat-list-list-item-focus-label-text-color, var(--mat-sys-on-surface))}.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item__secondary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;color:var(--mat-list-list-item-supporting-text-color, var(--mat-sys-on-surface-variant));font-family:var(--mat-list-list-item-supporting-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-list-list-item-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-list-list-item-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-list-list-item-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-list-list-item-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mdc-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{white-space:normal;line-height:20px}.mdc-list-item--with-overline .mdc-list-item__secondary-text{white-space:nowrap;line-height:auto}.mdc-list-item--with-leading-radio.mdc-list-item,.mdc-list-item--with-leading-checkbox.mdc-list-item,.mdc-list-item--with-leading-icon.mdc-list-item,.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:16px}[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:16px;padding-right:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-trailing-icon.mdc-list-item,[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:0;padding-right:0}.mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:16px;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:0;padding-right:16px}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-webkit-user-select:none;user-select:none;margin-left:28px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;line-height:normal;align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end::before,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio .mdc-list-item__start,.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start,[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item,.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:16px;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:0;padding-right:16px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-icon,.mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-avatar,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-icon,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-avatar{padding-left:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-icon,[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-avatar,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-icon,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-avatar{padding-right:0}.mdc-list-item--with-trailing-radio .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end,[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-group__subheader{margin:.75rem 16px}.mdc-list-item--disabled .mdc-list-item__start,.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text{opacity:var(--mat-list-list-item-disabled-label-text-opacity, 0.3)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mat-list-list-item-disabled-leading-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-disabled-leading-icon-opacity, 0.38)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mat-list-list-item-disabled-trailing-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-disabled-trailing-icon-opacity, 0.38)}.mat-mdc-list-item.mat-mdc-list-item-both-leading-and-trailing,[dir=rtl] .mat-mdc-list-item.mat-mdc-list-item-both-leading-and-trailing{padding-left:0;padding-right:0}.mdc-list-item.mdc-list-item--disabled .mdc-list-item__primary-text{color:var(--mat-list-list-item-disabled-label-text-color, var(--mat-sys-on-surface))}.mdc-list-item:hover::before{background-color:var(--mat-list-list-item-hover-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-list-item.mdc-list-item--disabled::before{background-color:var(--mat-list-list-item-disabled-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-disabled-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-list-item:focus::before{background-color:var(--mat-list-list-item-focus-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-list-item--disabled .mdc-radio,.mdc-list-item--disabled .mdc-checkbox{opacity:var(--mat-list-list-item-disabled-label-text-opacity, 0.3)}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{border-radius:var(--mat-list-list-item-leading-avatar-shape, var(--mat-sys-corner-full));background-color:var(--mat-list-list-item-leading-avatar-color, var(--mat-sys-primary-container))}.mat-mdc-list-item-icon{font-size:var(--mat-list-list-item-leading-icon-size, 24px)}@media(forced-colors: active){a.mdc-list-item--activated::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}a.mdc-list-item--activated [dir=rtl]::after{right:auto;left:16px}}.mat-mdc-list-base{display:block}.mat-mdc-list-base .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item__end,.mat-mdc-list-base .mdc-list-item__content{pointer-events:auto}.mat-mdc-list-item,.mat-mdc-list-option{width:100%;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-list-item:not(.mat-mdc-list-item-interactive),.mat-mdc-list-option:not(.mat-mdc-list-item-interactive){cursor:default}.mat-mdc-list-item .mat-divider-inset,.mat-mdc-list-option .mat-divider-inset{position:absolute;left:0;right:0;bottom:0}.mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,.mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-left:72px}[dir=rtl] .mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,[dir=rtl] .mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-right:72px}.mat-mdc-list-item-interactive::before{top:0;left:0;right:0;bottom:0;position:absolute;content:"";opacity:0;pointer-events:none;border-radius:inherit}.mat-mdc-list-item>.mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-list-item:focus-visible>.mat-focus-indicator::before{content:""}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-line.mdc-list-item__secondary-text{white-space:nowrap;line-height:normal}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:start}mat-action-list button::-moz-focus-inner{border:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-inline-start:var(--mat-list-list-item-leading-icon-start-space, 16px);margin-inline-end:var(--mat-list-list-item-leading-icon-end-space, 16px)}.mat-mdc-nav-list .mat-mdc-list-item{border-radius:var(--mat-list-active-indicator-shape, var(--mat-sys-corner-full));--mat-focus-indicator-border-radius: var(--mat-list-active-indicator-shape, var(--mat-sys-corner-full))}.mat-mdc-nav-list .mat-mdc-list-item.mdc-list-item--activated{background-color:var(--mat-list-active-indicator-color, var(--mat-sys-secondary-container))} diff --git a/gns3server/static/web-ui/index.html b/gns3server/static/web-ui/index.html index a8f144709..b35237e40 100644 --- a/gns3server/static/web-ui/index.html +++ b/gns3server/static/web-ui/index.html @@ -33,7 +33,7 @@ } })(); - + @@ -115,5 +115,5 @@ } })(); - + diff --git a/gns3server/static/web-ui/main-USTL5CVT.js b/gns3server/static/web-ui/main-XWFCXTXO.js similarity index 59% rename from gns3server/static/web-ui/main-USTL5CVT.js rename to gns3server/static/web-ui/main-XWFCXTXO.js index 5606cad50..a9b7ddb13 100644 --- a/gns3server/static/web-ui/main-USTL5CVT.js +++ b/gns3server/static/web-ui/main-XWFCXTXO.js @@ -1,43 +1,43 @@ -import{a as ki,b as Sn,c as G5,d as de,e as oe,f as Q5,g as nt,h as Y5,i as K5,j as Z5,k as J5,l as Ie,m as xt,n as ot,o as bc,p as Ne,q as Tt,r as Re,s as ve,t as hR,u as fR,v as V1,w as gR,x as Dh}from"./chunk-EZEP55N7.js";import{$ as _R,A as aR,B as Wr,C as nl,D as ee,E as Eh,F as XT,G as rs,H as Sa,I as sR,J as pm,K as lR,L as io,M as mi,N as cR,O as dR,P as ar,Q as sr,R as mR,S as pR,T as uR,U as Po,V as qr,W as um,X as Ei,Y as hm,Z as jo,_ as pi,a as Ot,b as Mt,c as it,d as vi,e as R1,f as tl,g as Ti,h as F1,i as Th,j as Te,k as we,l as wd,m as L1,n as eR,o as tR,p as B1,q as nR,r as vt,s as iR,t as oR,u as Fo,v as Nt,w as bt,x as Do,y as xc,z as rR}from"./chunk-EI7RU2ND.js";import{$ as fi,$a as Ut,$b as gi,$c as g5,$e as H5,A as fh,Aa as dn,Ab as yo,Ac as $t,Ad as w5,Ae as B5,B as Ji,Ba as wi,Bb as To,Bc as s5,Bd as M5,Be as V5,C as la,Ca as GN,Cb as Ps,Cd as k5,Ce as Mh,D as is,Da as Yt,Db as Be,Dc as U,Dd as T5,De as vc,E as o1,Ea as $l,Eb as Ve,Ec as X,Ee as z5,F as Dn,Fa as _h,Fb as co,Fc as Cd,Fe as D1,G as Kn,Ga as VT,Gb as z,Gc as gt,Gd as bd,Ge as Pn,H as gh,Ha as WN,Hb as qo,Hc as Ro,Hd as E5,He as Je,I as eo,Ia as zT,Ib as _,Id as D5,Ie as It,J as BT,Ja as Gp,Jb as d1,Jc as l5,Jd as xd,Je as za,K as am,Ka as Va,Kb as v,Kc as c5,Kd as x1,L as RN,La as s1,Lb as ri,Lc as T_,Ld as Eo,Le as P1,M as FN,Ma as qN,Mb as rn,Mc as d5,Md as P5,N as Wi,Na as mr,Nb as Hi,Nc as fc,O as LN,Oa as vh,Ob as xn,Oc as m5,Od as dm,Oe as I1,P as BN,Pa as p,Pb as dt,Pc as no,Q as Hp,Qa as jT,Qb as mt,Qc as p5,R as VN,Ra as ca,Rc as u5,Rd as xh,S as gd,Sa as zo,Sb as tn,Sc as lm,Sd as yh,T as w_,Ta as vd,Tb as nn,Tc as UT,Td as ya,U as r1,Ua as hi,Ub as Pe,Uc as Gr,Ud as I5,V as zl,Va as Ye,Vb as yn,Vc as h5,Vd as y1,Ve as j5,W as Up,Wa as l1,Wb as ze,Wc as h1,Wd as S1,We as mm,Xa as to,Xb as or,Xc as ie,Xd as Sh,Xe as A1,Y as ci,Ya as QN,Yb as d,Yc as Is,Ye as $5,Z as hn,Za as c1,Zb as $,Zc as GT,Zd as w1,Ze as qT,_ as tt,_a as R,_b as te,_c as f5,_d as A5,_e as O1,a as q,aa as fn,ab as ft,ac as m1,ad as f1,ae as M1,af as N1,b as We,ba as zN,bb as pr,bc as pc,bd as g1,bf as QT,c as IN,ca as _d,cc as uc,cd as _5,cf as Sd,d as Ts,da as Y,db as di,dc as hc,dd as v5,de as wh,df as U5,e as En,ea as Ht,eb as Se,ec as Xi,ed as WT,ee as O5,ef as Qo,f as Xs,fa as jN,fb as Ch,fc as M_,fd as C5,fe as yd,g as fo,ga as jt,gb as XN,gc as Cn,gd as b5,ge as Ft,gf as W5,h as AN,ha as ge,hb as YN,hc as Zt,hd as gc,he as k1,hf as el,i as Nr,ia as f,ib as KN,ic as pn,id as x5,ie as Ue,if as q5,j as je,ja as $N,jb as $T,jc as Ys,jd as cm,je as N5,jf as da,k as zt,ka as jl,kb as ZN,kc as p1,kd as y5,ke as T1,kf as $e,l as hh,la as Es,lb as HT,lc as u1,ld as br,le as At,lf as Cc,m as ON,ma as T,mb as JN,mc as en,md as _1,me as at,mf as he,n as om,na as E,nb as Wt,nc as Un,nd as v1,ne as E1,nf as W,o as Ur,oa as ni,oc as Fr,od as Wp,oe as xr,of as zi,p as nr,pa as Rr,pb as A,pc as t5,pd as ur,pe as Wn,pf as X5,q as Ct,qa as Wo,qb as e5,qc as k_,qd as C1,qe as _c,qf as gn,r as Vo,ra as qi,rb as O,rc as n5,rd as b1,re as Ze,rf as kh,s as rm,sa as sm,sb as Qi,sc as i5,se as R5,sf as ja,t as NN,ta as HN,tb as Oe,tc as rr,td as S5,te as st,ua as _e,ub as Z,uc as sn,ud as Hl,ue as yr,v as _t,va as Ii,vb as J,vc as o5,vd as Zs,ve as Js,w as ir,wa as UN,wb as b,wc as Ks,wd as os,we as F5,x as Cr,xa as a1,xb as s,xc as r5,xd as _i,xe as L5,y as y_,ya as ce,yb as l,yc as a5,yd as Ul,ye as Vt,z as S_,za as Ds,zb as L,zc as le,zd as bh,ze as Lt}from"./chunk-6QUQX5EO.js";var cV=Ts((got,bS)=>{(function(n,i,e){if(!n)return;for(var t={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},o={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},r={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},a={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},c,m=1;m<20;++m)t[111+m]="f"+m;for(m=0;m<=9;++m)t[m+96]=m.toString();function u(P,F,re){if(P.addEventListener){P.addEventListener(F,re,!1);return}P.attachEvent("on"+F,re)}function h(P){if(P.type=="keypress"){var F=String.fromCharCode(P.which);return P.shiftKey||(F=F.toLowerCase()),F}return t[P.which]?t[P.which]:o[P.which]?o[P.which]:String.fromCharCode(P.which).toLowerCase()}function g(P,F){return P.sort().join(",")===F.sort().join(",")}function S(P){var F=[];return P.shiftKey&&F.push("shift"),P.altKey&&F.push("alt"),P.ctrlKey&&F.push("ctrl"),P.metaKey&&F.push("meta"),F}function x(P){if(P.preventDefault){P.preventDefault();return}P.returnValue=!1}function C(P){if(P.stopPropagation){P.stopPropagation();return}P.cancelBubble=!0}function M(P){return P=="shift"||P=="ctrl"||P=="alt"||P=="meta"}function w(){if(!c){c={};for(var P in t)P>95&&P<112||t.hasOwnProperty(P)&&(c[t[P]]=P)}return c}function y(P,F,re){return re||(re=w()[P]?"keydown":"keypress"),re=="keypress"&&F.length&&(re="keydown"),re}function k(P){return P==="+"?["+"]:(P=P.replace(/\+{2}/g,"+plus"),P.split("+"))}function I(P,F){var re,ne,G,j=[];for(re=k(P),G=0;G1){K(se,xe,Me,Le);return}Q=I(se,Le),F._callbacks[Q.key]=F._callbacks[Q.key]||[],me(Q.key,Q.modifiers,{type:Q.action},Ke,se,Xe),F._callbacks[Q.key][Ke?"unshift":"push"]({callback:Me,modifiers:Q.modifiers,action:Q.action,seq:Ke,level:Xe,combo:se})}F._bindMultiple=function(se,Me,Le){for(var Ke=0;Ke-1||D(F,re.target))return!1;if("composedPath"in P&&typeof P.composedPath=="function"){var ne=P.composedPath()[0];ne!==P.target&&(F=ne)}return F.tagName=="INPUT"||F.tagName=="SELECT"||F.tagName=="TEXTAREA"||F.isContentEditable},N.prototype.handleKey=function(){var P=this;return P._handleKey.apply(P,arguments)},N.addKeycodes=function(P){for(var F in P)P.hasOwnProperty(F)&&(t[F]=P[F]);c=null},N.init=function(){var P=N(i);for(var F in P)F.charAt(0)!=="_"&&(N[F]=(function(re){return function(){return P[re].apply(P,arguments)}})(F))},N.init(),n.Mousetrap=N,typeof bS<"u"&&bS.exports&&(bS.exports=N),typeof define=="function"&&define.amd&&define(function(){return N})})(typeof window<"u"?window:null,typeof window<"u"?document:null)});var pz=Ts(z3=>{var mz="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");z3.encode=function(n){if(0<=n&&n{var uz=pz(),j3=5,hz=1<>1;return i?-e:e}$3.encode=function(i){var e="",t,o=Ahe(i);do t=o&fz,o>>>=j3,o>0&&(t|=gz),e+=uz.encode(t);while(o>0);return e};$3.decode=function(i,e,t){var o=i.length,r=0,a=0,c,m;do{if(e>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(m=uz.decode(i.charCodeAt(e++)),m===-1)throw new Error("Invalid base64 digit: "+i.charAt(e-1));c=!!(m&gz),m&=fz,r=r+(m<{function Nhe(n,i,e){if(i in n)return n[i];if(arguments.length===3)return e;throw new Error('"'+i+'" is a required argument.')}ra.getArg=Nhe;var vz=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Rhe=/^data:.+\,.+$/;function tC(n){var i=n.match(vz);return i?{scheme:i[1],auth:i[2],host:i[3],port:i[4],path:i[5]}:null}ra.urlParse=tC;function tg(n){var i="";return n.scheme&&(i+=n.scheme+":"),i+="//",n.auth&&(i+=n.auth+"@"),n.host&&(i+=n.host),n.port&&(i+=":"+n.port),n.path&&(i+=n.path),i}ra.urlGenerate=tg;var Fhe=32;function Lhe(n){var i=[];return function(e){for(var t=0;tFhe&&i.pop(),r}}var H3=Lhe(function(i){var e=i,t=tC(i);if(t){if(!t.path)return i;e=t.path}for(var o=ra.isAbsolute(e),r=[],a=0,c=0;;)if(a=c,c=e.indexOf("/",a),c===-1){r.push(e.slice(a));break}else for(r.push(e.slice(a,c));c=0;c--)m=r[c],m==="."?r.splice(c,1):m===".."?u++:u>0&&(m===""?(r.splice(c+1,u),u=0):(r.splice(c,2),u--));return e=r.join("/"),e===""&&(e=o?"/":"."),t?(t.path=e,tg(t)):e});ra.normalize=H3;function Cz(n,i){n===""&&(n="."),i===""&&(i=".");var e=tC(i),t=tC(n);if(t&&(n=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),tg(e);if(e||i.match(Rhe))return i;if(t&&!t.host&&!t.path)return t.host=i,tg(t);var o=i.charAt(0)==="/"?i:H3(n.replace(/\/+$/,"")+"/"+i);return t?(t.path=o,tg(t)):o}ra.join=Cz;ra.isAbsolute=function(n){return n.charAt(0)==="/"||vz.test(n)};function Bhe(n,i){n===""&&(n="."),n=n.replace(/\/$/,"");for(var e=0;i.indexOf(n+"/")!==0;){var t=n.lastIndexOf("/");if(t<0||(n=n.slice(0,t),n.match(/^([^\/]+:\/)?\/*$/)))return i;++e}return Array(e+1).join("../")+i.substr(n.length+1)}ra.relative=Bhe;var bz=(function(){var n=Object.create(null);return!("__proto__"in n)})();function xz(n){return n}function Vhe(n){return yz(n)?"$"+n:n}ra.toSetString=bz?xz:Vhe;function zhe(n){return yz(n)?n.slice(1):n}ra.fromSetString=bz?xz:zhe;function yz(n){if(!n)return!1;var i=n.length;if(i<9||n.charCodeAt(i-1)!==95||n.charCodeAt(i-2)!==95||n.charCodeAt(i-3)!==111||n.charCodeAt(i-4)!==116||n.charCodeAt(i-5)!==111||n.charCodeAt(i-6)!==114||n.charCodeAt(i-7)!==112||n.charCodeAt(i-8)!==95||n.charCodeAt(i-9)!==95)return!1;for(var e=i-10;e>=0;e--)if(n.charCodeAt(e)!==36)return!1;return!0}function jhe(n,i,e){var t=Wd(n.source,i.source);return t!==0||(t=n.originalLine-i.originalLine,t!==0)||(t=n.originalColumn-i.originalColumn,t!==0||e)||(t=n.generatedColumn-i.generatedColumn,t!==0)||(t=n.generatedLine-i.generatedLine,t!==0)?t:Wd(n.name,i.name)}ra.compareByOriginalPositions=jhe;function $he(n,i,e){var t;return t=n.originalLine-i.originalLine,t!==0||(t=n.originalColumn-i.originalColumn,t!==0||e)||(t=n.generatedColumn-i.generatedColumn,t!==0)||(t=n.generatedLine-i.generatedLine,t!==0)?t:Wd(n.name,i.name)}ra.compareByOriginalPositionsNoSource=$he;function Hhe(n,i,e){var t=n.generatedLine-i.generatedLine;return t!==0||(t=n.generatedColumn-i.generatedColumn,t!==0||e)||(t=Wd(n.source,i.source),t!==0)||(t=n.originalLine-i.originalLine,t!==0)||(t=n.originalColumn-i.originalColumn,t!==0)?t:Wd(n.name,i.name)}ra.compareByGeneratedPositionsDeflated=Hhe;function Uhe(n,i,e){var t=n.generatedColumn-i.generatedColumn;return t!==0||e||(t=Wd(n.source,i.source),t!==0)||(t=n.originalLine-i.originalLine,t!==0)||(t=n.originalColumn-i.originalColumn,t!==0)?t:Wd(n.name,i.name)}ra.compareByGeneratedPositionsDeflatedNoLine=Uhe;function Wd(n,i){return n===i?0:n===null?1:i===null?-1:n>i?1:-1}function Ghe(n,i){var e=n.generatedLine-i.generatedLine;return e!==0||(e=n.generatedColumn-i.generatedColumn,e!==0)||(e=Wd(n.source,i.source),e!==0)||(e=n.originalLine-i.originalLine,e!==0)||(e=n.originalColumn-i.originalColumn,e!==0)?e:Wd(n.name,i.name)}ra.compareByGeneratedPositionsInflated=Ghe;function Whe(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}ra.parseSourceMapInput=Whe;function qhe(n,i,e){if(i=i||"",n&&(n[n.length-1]!=="/"&&i[0]!=="/"&&(n+="/"),i=n+i),e){var t=tC(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var o=t.path.lastIndexOf("/");o>=0&&(t.path=t.path.substring(0,o+1))}i=Cz(tg(t),i)}return H3(i)}ra.computeSourceURL=qhe});var wz=Ts(Sz=>{var U3=VS(),G3=Object.prototype.hasOwnProperty,qu=typeof Map<"u";function qd(){this._array=[],this._set=qu?new Map:Object.create(null)}qd.fromArray=function(i,e){for(var t=new qd,o=0,r=i.length;o=0)return e}else{var t=U3.toSetString(i);if(G3.call(this._set,t))return this._set[t]}throw new Error('"'+i+'" is not in the set.')};qd.prototype.at=function(i){if(i>=0&&i{var Mz=VS();function Qhe(n,i){var e=n.generatedLine,t=i.generatedLine,o=n.generatedColumn,r=i.generatedColumn;return t>e||t==e&&r>=o||Mz.compareByGeneratedPositionsInflated(n,i)<=0}function zS(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}zS.prototype.unsortedForEach=function(i,e){this._array.forEach(i,e)};zS.prototype.add=function(i){Qhe(this._last,i)?(this._last=i,this._array.push(i)):(this._sorted=!1,this._array.push(i))};zS.prototype.toArray=function(){return this._sorted||(this._array.sort(Mz.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};kz.MappingList=zS});var Dz=Ts(Ez=>{var nC=_z(),_r=VS(),jS=wz().ArraySet,Xhe=Tz().MappingList;function Pl(n){n||(n={}),this._file=_r.getArg(n,"file",null),this._sourceRoot=_r.getArg(n,"sourceRoot",null),this._skipValidation=_r.getArg(n,"skipValidation",!1),this._ignoreInvalidMapping=_r.getArg(n,"ignoreInvalidMapping",!1),this._sources=new jS,this._names=new jS,this._mappings=new Xhe,this._sourcesContents=null}Pl.prototype._version=3;Pl.fromSourceMap=function(i,e){var t=i.sourceRoot,o=new Pl(Object.assign(e||{},{file:i.file,sourceRoot:t}));return i.eachMapping(function(r){var a={generated:{line:r.generatedLine,column:r.generatedColumn}};r.source!=null&&(a.source=r.source,t!=null&&(a.source=_r.relative(t,a.source)),a.original={line:r.originalLine,column:r.originalColumn},r.name!=null&&(a.name=r.name)),o.addMapping(a)}),i.sources.forEach(function(r){var a=r;t!==null&&(a=_r.relative(t,r)),o._sources.has(a)||o._sources.add(a);var c=i.sourceContentFor(r);c!=null&&o.setSourceContent(r,c)}),o};Pl.prototype.addMapping=function(i){var e=_r.getArg(i,"generated"),t=_r.getArg(i,"original",null),o=_r.getArg(i,"source",null),r=_r.getArg(i,"name",null);!this._skipValidation&&this._validateMapping(e,t,o,r)===!1||(o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),r!=null&&(r=String(r),this._names.has(r)||this._names.add(r)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:t!=null&&t.line,originalColumn:t!=null&&t.column,source:o,name:r}))};Pl.prototype.setSourceContent=function(i,e){var t=i;this._sourceRoot!=null&&(t=_r.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[_r.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[_r.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Pl.prototype.applySourceMap=function(i,e,t){var o=e;if(e==null){if(i.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=i.file}var r=this._sourceRoot;r!=null&&(o=_r.relative(r,o));var a=new jS,c=new jS;this._mappings.unsortedForEach(function(m){if(m.source===o&&m.originalLine!=null){var u=i.originalPositionFor({line:m.originalLine,column:m.originalColumn});u.source!=null&&(m.source=u.source,t!=null&&(m.source=_r.join(t,m.source)),r!=null&&(m.source=_r.relative(r,m.source)),m.originalLine=u.line,m.originalColumn=u.column,u.name!=null&&(m.name=u.name))}var h=m.source;h!=null&&!a.has(h)&&a.add(h);var g=m.name;g!=null&&!c.has(g)&&c.add(g)},this),this._sources=a,this._names=c,i.sources.forEach(function(m){var u=i.sourceContentFor(m);u!=null&&(t!=null&&(m=_r.join(t,m)),r!=null&&(m=_r.relative(r,m)),this.setSourceContent(m,u))},this)};Pl.prototype._validateMapping=function(i,e,t,o){if(e&&typeof e.line!="number"&&typeof e.column!="number"){var r="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}if(!(i&&"line"in i&&"column"in i&&i.line>0&&i.column>=0&&!e&&!t&&!o)){if(i&&"line"in i&&"column"in i&&e&&"line"in e&&"column"in e&&i.line>0&&i.column>=0&&e.line>0&&e.column>=0&&t)return;var r="Invalid mapping: "+JSON.stringify({generated:i,source:t,original:e,name:o});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}};Pl.prototype._serializeMappings=function(){for(var i=0,e=1,t=0,o=0,r=0,a=0,c="",m,u,h,g,S=this._mappings.toArray(),x=0,C=S.length;x0){if(!_r.compareByGeneratedPositionsInflated(u,S[x-1]))continue;m+=","}m+=nC.encode(u.generatedColumn-i),i=u.generatedColumn,u.source!=null&&(g=this._sources.indexOf(u.source),m+=nC.encode(g-a),a=g,m+=nC.encode(u.originalLine-1-o),o=u.originalLine-1,m+=nC.encode(u.originalColumn-t),t=u.originalColumn,u.name!=null&&(h=this._names.indexOf(u.name),m+=nC.encode(h-r),r=h)),c+=m}return c};Pl.prototype._generateSourcesContent=function(i,e){return i.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=_r.relative(e,t));var o=_r.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};Pl.prototype.toJSON=function(){var i={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(i.file=this._file),this._sourceRoot!=null&&(i.sourceRoot=this._sourceRoot),this._sourcesContents&&(i.sourcesContent=this._generateSourcesContent(i.sources,i.sourceRoot)),i};Pl.prototype.toString=function(){return JSON.stringify(this.toJSON())};Ez.SourceMapGenerator=Pl});var sN=Ts((MH,lM)=>{(function(n){"use strict";let i="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp(`^${i}\\.${i}\\.${i}\\.${i}$`,"i"),threeOctet:new RegExp(`^${i}\\.${i}\\.${i}$`,"i"),twoOctet:new RegExp(`^${i}\\.${i}$`,"i"),longValue:new RegExp(`^${i}$`,"i")},t=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),r="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",c={zoneIndex:new RegExp(r,"i"),native:new RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${r})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${i}\\.${i}\\.${i}\\.${i}(${r})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${i}\\.${i}\\.${i}\\.${i}(${r})?$`,"i")};function m(x,C){if(x.indexOf("::")!==x.lastIndexOf("::"))return null;let M=0,w=-1,y=(x.match(c.zoneIndex)||[])[0],k,I;for(y&&(y=y.substring(1),x=x.replace(/%.+$/,""));(w=x.indexOf(":",w+1))>=0;)M++;if(x.substr(0,2)==="::"&&M--,x.substr(-2,2)==="::"&&M--,M>C)return null;for(I=C-M,k=":";I--;)k+="0:";return x=x.replace("::",k),x[0]===":"&&(x=x.slice(1)),x[x.length-1]===":"&&(x=x.slice(0,-1)),C=(function(){let D=x.split(":"),N=[];for(let P=0;P0;){if(k=M-w,k<0&&(k=0),x[y]>>k!==C[y]>>k)return!1;w-=M,y+=1}return!0}function h(x){if(o.test(x))return parseInt(x,16);if(x[0]==="0"&&!isNaN(parseInt(x[1],10))){if(t.test(x))return parseInt(x,8);throw new Error(`ipaddr: cannot parse ${x} as octal`)}return parseInt(x,10)}function g(x,C){for(;x.length=0;y-=1)if(k=this.octets[y],k in w){if(I=w[k],M&&I!==0)return null;I!==8&&(M=!0),C+=I}else return null;return 32-C},x.prototype.range=function(){return S.subnetMatch(this,this.SpecialRanges)},x.prototype.toByteArray=function(){return this.octets.slice(0)},x.prototype.toIPv4MappedAddress=function(){return S.IPv6.parse(`::ffff:${this.toString()}`)},x.prototype.toNormalizedString=function(){return this.toString()},x.prototype.toString=function(){return this.octets.join(".")},x})(),S.IPv4.broadcastAddressFromCIDR=function(x){try{let C=this.parseCIDR(x),M=C[0].toByteArray(),w=this.subnetMaskFromPrefixLength(C[1]).toByteArray(),y=[],k=0;for(;k<4;)y.push(parseInt(M[k],10)|parseInt(w[k],10)^255),k++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},S.IPv4.isIPv4=function(x){return this.parser(x)!==null},S.IPv4.isValid=function(x){try{return new this(this.parser(x)),!0}catch{return!1}},S.IPv4.isValidCIDR=function(x){try{return this.parseCIDR(x),!0}catch{return!1}},S.IPv4.isValidFourPartDecimal=function(x){return!!(S.IPv4.isValid(x)&&x.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},S.IPv4.isValidCIDRFourPartDecimal=function(x){let C=x.match(/^(.+)\/(\d+)$/);return!S.IPv4.isValidCIDR(x)||!C?!1:S.IPv4.isValidFourPartDecimal(C[1])},S.IPv4.networkAddressFromCIDR=function(x){let C,M,w,y,k;try{for(C=this.parseCIDR(x),w=C[0].toByteArray(),k=this.subnetMaskFromPrefixLength(C[1]).toByteArray(),y=[],M=0;M<4;)y.push(parseInt(w[M],10)&parseInt(k[M],10)),M++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},S.IPv4.parse=function(x){let C=this.parser(x);if(C===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(C)},S.IPv4.parseCIDR=function(x){let C;if(C=x.match(/^(.+)\/(\d+)$/)){let M=parseInt(C[2]);if(M>=0&&M<=32){let w=[this.parse(C[1]),M];return Object.defineProperty(w,"toString",{value:function(){return this.join("/")}}),w}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},S.IPv4.parser=function(x){let C,M,w;if(C=x.match(e.fourOctet))return(function(){let y=C.slice(1,6),k=[];for(let I=0;I4294967295||w<0)throw new Error("ipaddr: address outside defined range");return(function(){let y=[],k;for(k=0;k<=24;k+=8)y.push(w>>k&255);return y})().reverse()}else return(C=x.match(e.twoOctet))?(function(){let y=C.slice(1,4),k=[];if(w=h(y[1]),w>16777215||w<0)throw new Error("ipaddr: address outside defined range");return k.push(h(y[0])),k.push(w>>16&255),k.push(w>>8&255),k.push(w&255),k})():(C=x.match(e.threeOctet))?(function(){let y=C.slice(1,5),k=[];if(w=h(y[2]),w>65535||w<0)throw new Error("ipaddr: address outside defined range");return k.push(h(y[0])),k.push(h(y[1])),k.push(w>>8&255),k.push(w&255),k})():null},S.IPv4.subnetMaskFromPrefixLength=function(x){if(x=parseInt(x),x<0||x>32)throw new Error("ipaddr: invalid IPv4 prefix length");let C=[0,0,0,0],M=0,w=Math.floor(x/8);for(;M=0;I-=1)if(y=this.parts[I],y in w){if(k=w[y],M&&k!==0)return null;k!==16&&(M=!0),C+=k}else return null;return 128-C},x.prototype.range=function(){return S.subnetMatch(this,this.SpecialRanges)},x.prototype.toByteArray=function(){let C,M=[],w=this.parts;for(let y=0;y>8),M.push(C&255);return M},x.prototype.toFixedLengthString=function(){let C=function(){let w=[];for(let y=0;y>8,M&255,w>>8,w&255])},x.prototype.toNormalizedString=function(){let C=function(){let w=[];for(let y=0;yy&&(w=k.index,y=k[0].length);return y<0?M:`${M.substring(0,w)}::${M.substring(w+y)}`},x.prototype.toString=function(){return this.toRFC5952String()},x})(),S.IPv6.broadcastAddressFromCIDR=function(x){try{let C=this.parseCIDR(x),M=C[0].toByteArray(),w=this.subnetMaskFromPrefixLength(C[1]).toByteArray(),y=[],k=0;for(;k<16;)y.push(parseInt(M[k],10)|parseInt(w[k],10)^255),k++;return new this(y)}catch(C){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${C})`)}},S.IPv6.isIPv6=function(x){return this.parser(x)!==null},S.IPv6.isValid=function(x){if(typeof x=="string"&&x.indexOf(":")===-1)return!1;try{let C=this.parser(x);return new this(C.parts,C.zoneId),!0}catch{return!1}},S.IPv6.isValidCIDR=function(x){if(typeof x=="string"&&x.indexOf(":")===-1)return!1;try{return this.parseCIDR(x),!0}catch{return!1}},S.IPv6.networkAddressFromCIDR=function(x){let C,M,w,y,k;try{for(C=this.parseCIDR(x),w=C[0].toByteArray(),k=this.subnetMaskFromPrefixLength(C[1]).toByteArray(),y=[],M=0;M<16;)y.push(parseInt(w[M],10)&parseInt(k[M],10)),M++;return new this(y)}catch(I){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${I})`)}},S.IPv6.parse=function(x){let C=this.parser(x);if(C.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(C.parts,C.zoneId)},S.IPv6.parseCIDR=function(x){let C,M,w;if((M=x.match(/^(.+)\/(\d+)$/))&&(C=parseInt(M[2]),C>=0&&C<=128))return w=[this.parse(M[1]),C],Object.defineProperty(w,"toString",{value:function(){return this.join("/")}}),w;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},S.IPv6.parser=function(x){let C,M,w,y,k,I;if(w=x.match(c.deprecatedTransitional))return this.parser(`::ffff:${w[1]}`);if(c.native.test(x))return m(x,8);if((w=x.match(c.transitional))&&(I=w[6]||"",C=w[1],w[1].endsWith("::")||(C=C.slice(0,-1)),C=m(C+I,6),C.parts)){for(k=[parseInt(w[2]),parseInt(w[3]),parseInt(w[4]),parseInt(w[5])],M=0;M128)throw new Error("ipaddr: invalid IPv6 prefix length");let C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0,w=Math.floor(x/8);for(;M{(function(n){if(typeof RH=="object")FH.exports=n();else if(typeof define=="function"&&define.amd)define(n);else{var i;try{i=window}catch{i=self}i.SparkMD5=n()}})(function(n){"use strict";var i=function(y,k){return y+k&4294967295},e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function t(y,k,I,D,N,P){return k=i(i(k,y),i(D,P)),i(k<>>32-N,I)}function o(y,k){var I=y[0],D=y[1],N=y[2],P=y[3];I+=(D&N|~D&P)+k[0]-680876936|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+k[1]-389564586|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+k[2]+606105819|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+k[3]-1044525330|0,D=(D<<22|D>>>10)+N|0,I+=(D&N|~D&P)+k[4]-176418897|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+k[5]+1200080426|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+k[6]-1473231341|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+k[7]-45705983|0,D=(D<<22|D>>>10)+N|0,I+=(D&N|~D&P)+k[8]+1770035416|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+k[9]-1958414417|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+k[10]-42063|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+k[11]-1990404162|0,D=(D<<22|D>>>10)+N|0,I+=(D&N|~D&P)+k[12]+1804603682|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+k[13]-40341101|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+k[14]-1502002290|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+k[15]+1236535329|0,D=(D<<22|D>>>10)+N|0,I+=(D&P|N&~P)+k[1]-165796510|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+k[6]-1069501632|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+k[11]+643717713|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+k[0]-373897302|0,D=(D<<20|D>>>12)+N|0,I+=(D&P|N&~P)+k[5]-701558691|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+k[10]+38016083|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+k[15]-660478335|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+k[4]-405537848|0,D=(D<<20|D>>>12)+N|0,I+=(D&P|N&~P)+k[9]+568446438|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+k[14]-1019803690|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+k[3]-187363961|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+k[8]+1163531501|0,D=(D<<20|D>>>12)+N|0,I+=(D&P|N&~P)+k[13]-1444681467|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+k[2]-51403784|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+k[7]+1735328473|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+k[12]-1926607734|0,D=(D<<20|D>>>12)+N|0,I+=(D^N^P)+k[5]-378558|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+k[8]-2022574463|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+k[11]+1839030562|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+k[14]-35309556|0,D=(D<<23|D>>>9)+N|0,I+=(D^N^P)+k[1]-1530992060|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+k[4]+1272893353|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+k[7]-155497632|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+k[10]-1094730640|0,D=(D<<23|D>>>9)+N|0,I+=(D^N^P)+k[13]+681279174|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+k[0]-358537222|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+k[3]-722521979|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+k[6]+76029189|0,D=(D<<23|D>>>9)+N|0,I+=(D^N^P)+k[9]-640364487|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+k[12]-421815835|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+k[15]+530742520|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+k[2]-995338651|0,D=(D<<23|D>>>9)+N|0,I+=(N^(D|~P))+k[0]-198630844|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+k[7]+1126891415|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+k[14]-1416354905|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+k[5]-57434055|0,D=(D<<21|D>>>11)+N|0,I+=(N^(D|~P))+k[12]+1700485571|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+k[3]-1894986606|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+k[10]-1051523|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+k[1]-2054922799|0,D=(D<<21|D>>>11)+N|0,I+=(N^(D|~P))+k[8]+1873313359|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+k[15]-30611744|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+k[6]-1560198380|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+k[13]+1309151649|0,D=(D<<21|D>>>11)+N|0,I+=(N^(D|~P))+k[4]-145523070|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+k[11]-1120210379|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+k[2]+718787259|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+k[9]-343485551|0,D=(D<<21|D>>>11)+N|0,y[0]=I+y[0]|0,y[1]=D+y[1]|0,y[2]=N+y[2]|0,y[3]=P+y[3]|0}function r(y){var k=[],I;for(I=0;I<64;I+=4)k[I>>2]=y.charCodeAt(I)+(y.charCodeAt(I+1)<<8)+(y.charCodeAt(I+2)<<16)+(y.charCodeAt(I+3)<<24);return k}function a(y){var k=[],I;for(I=0;I<64;I+=4)k[I>>2]=y[I]+(y[I+1]<<8)+(y[I+2]<<16)+(y[I+3]<<24);return k}function c(y){var k=y.length,I=[1732584193,-271733879,-1732584194,271733878],D,N,P,F,re,ne;for(D=64;D<=k;D+=64)o(I,r(y.substring(D-64,D)));for(y=y.substring(D-64),N=y.length,P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],D=0;D>2]|=y.charCodeAt(D)<<(D%4<<3);if(P[D>>2]|=128<<(D%4<<3),D>55)for(o(I,P),D=0;D<16;D+=1)P[D]=0;return F=k*8,F=F.toString(16).match(/(.*?)(.{0,8})$/),re=parseInt(F[2],16),ne=parseInt(F[1],16)||0,P[14]=re,P[15]=ne,o(I,P),I}function m(y){var k=y.length,I=[1732584193,-271733879,-1732584194,271733878],D,N,P,F,re,ne;for(D=64;D<=k;D+=64)o(I,a(y.subarray(D-64,D)));for(y=D-64>2]|=y[D]<<(D%4<<3);if(P[D>>2]|=128<<(D%4<<3),D>55)for(o(I,P),D=0;D<16;D+=1)P[D]=0;return F=k*8,F=F.toString(16).match(/(.*?)(.{0,8})$/),re=parseInt(F[2],16),ne=parseInt(F[1],16)||0,P[14]=re,P[15]=ne,o(I,P),I}function u(y){var k="",I;for(I=0;I<4;I+=1)k+=e[y>>I*8+4&15]+e[y>>I*8&15];return k}function h(y){var k;for(k=0;k>16)+(k>>16)+(I>>16);return D<<16|I&65535}),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&(function(){function y(k,I){return k=k|0||0,k<0?Math.max(k+I,0):Math.min(k,I)}ArrayBuffer.prototype.slice=function(k,I){var D=this.byteLength,N=y(k,D),P=D,F,re,ne,G;return I!==n&&(P=y(I,D)),N>P?new ArrayBuffer(0):(F=P-N,re=new ArrayBuffer(F),ne=new Uint8Array(re),G=new Uint8Array(this,N,F),ne.set(G),re)}})();function g(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function S(y,k){var I=y.length,D=new ArrayBuffer(I),N=new Uint8Array(D),P;for(P=0;P>2]|=k.charCodeAt(D)<<(D%4<<3);return this._finish(N,I),P=h(this._hash),y&&(P=M(P)),this.reset(),P},w.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},w.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},w.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},w.prototype._finish=function(y,k){var I=k,D,N,P;if(y[I>>2]|=128<<(I%4<<3),I>55)for(o(this._hash,y),I=0;I<16;I+=1)y[I]=0;D=this._length*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),N=parseInt(D[2],16),P=parseInt(D[1],16)||0,y[14]=N,y[15]=P,o(this._hash,y)},w.hash=function(y,k){return w.hashBinary(g(y),k)},w.hashBinary=function(y,k){var I=c(y),D=h(I);return k?M(D):D},w.ArrayBuffer=function(){this.reset()},w.ArrayBuffer.prototype.append=function(y){var k=C(this._buff.buffer,y,!0),I=k.length,D;for(this._length+=y.byteLength,D=64;D<=I;D+=64)o(this._hash,a(k.subarray(D-64,D)));return this._buff=D-64>2]|=k[N]<<(N%4<<3);return this._finish(D,I),P=h(this._hash),y&&(P=M(P)),this.reset(),P},w.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.ArrayBuffer.prototype.getState=function(){var y=w.prototype.getState.call(this);return y.buff=x(y.buff),y},w.ArrayBuffer.prototype.setState=function(y){return y.buff=S(y.buff,!0),w.prototype.setState.call(this,y)},w.ArrayBuffer.prototype.destroy=w.prototype.destroy,w.ArrayBuffer.prototype._finish=w.prototype._finish,w.ArrayBuffer.hash=function(y,k){var I=m(new Uint8Array(y)),D=h(I);return k?M(D):D},w})});var $H=Ts(mN=>{"use strict";(function(){var n=typeof mN<"u"&&mN||typeof define<"u"&&{}||this||window;typeof define<"u"&&define("save-svg-as-png",[],function(){return n}),n.default=n;var i="http://www.w3.org/2000/xmlns/",e="http://www.w3.org/1999/xhtml",t="http://www.w3.org/2000/svg",o=']>',r=/url\(["']?(.+?)["']?\)/,a={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},c=function(j){return j instanceof HTMLElement||j instanceof SVGElement},m=function(j){if(!c(j))throw new Error("an HTMLElement or SVGElement is required; got "+j)},u=function(j){return new Promise(function(pe,be){c(j)?pe(j):be(new Error("an HTMLElement or SVGElement is required; got "+j))})},h=function(j){return j&&j.lastIndexOf("http",0)===0&&j.lastIndexOf(window.location.host)===-1},g=function(j){var pe=Object.keys(a).filter(function(be){return j.indexOf("."+be)>0}).map(function(be){return a[be]});return pe?pe[0]:(console.error("Unknown font format for "+j+". Fonts may not be working correctly."),"application/octet-stream")},S=function(j){for(var pe="",be=new Uint8Array(j),me=0;me"u"||me===null||isNaN(parseFloat(me))?0:me},C=function(j,pe,be,me){if(j.tagName==="svg")return{width:be||x(j,pe,"width"),height:me||x(j,pe,"height")};if(j.getBBox){var Ee=j.getBBox(),ue=Ee.x,V=Ee.y,K=Ee.width,ae=Ee.height;return{width:ue+K,height:V+ae}}},M=function(j){return decodeURIComponent(encodeURIComponent(j).replace(/%([0-9A-F]{2})/g,function(pe,be){var me=String.fromCharCode("0x"+be);return me==="%"?"%25":me}))},w=function(j){for(var pe=window.atob(j.split(",")[1]),be=j.split(",")[0].split(":")[1].split(";")[0],me=new ArrayBuffer(pe.length),Ee=new Uint8Array(me),ue=0;ue"u",Le=V||[];return F().forEach(function(Ke){var Xe=Ke.rules,xe=Ke.href;Xe&&Array.from(Xe).forEach(function(Q){if(typeof Q.style<"u")if(y(j,Q.selectorText))se.push(ae(Q.selectorText,Q.style.cssText));else if(Me&&Q.cssText.match(/^@font-face/)){var Ae=k(Q,xe);Ae&&Le.push(Ae)}else K||se.push(Q.cssText)})}),N(Le).then(function(Ke){return se.join(` -`)+Ke})},ne=function(){if(!navigator.msSaveOrOpenBlob&&!("download"in document.createElement("a")))return{popup:window.open()}};n.prepareSvg=function(G,j,pe){m(G);var be=j||{},me=be.left,Ee=me===void 0?0:me,ue=be.top,V=ue===void 0?0:ue,K=be.width,ae=be.height,se=be.scale,Me=se===void 0?1:se,Le=be.responsive,Ke=Le===void 0?!1:Le,Xe=be.excludeCss,xe=Xe===void 0?!1:Xe;return I(G).then(function(){var Q=G.cloneNode(!0);Q.style.backgroundColor=(j||{}).backgroundColor||G.style.backgroundColor;var Ae=C(G,Q,K,ae),qe=Ae.width,ct=Ae.height;if(G.tagName!=="svg")if(G.getBBox){Q.getAttribute("transform")!=null&&Q.setAttribute("transform",Q.getAttribute("transform").replace(/translate\(.*?\)/,""));var Et=document.createElementNS("http://www.w3.org/2000/svg","svg");Et.appendChild(Q),Q=Et}else{console.error("Attempted to render non-SVG element",G);return}if(Q.setAttribute("version","1.1"),Q.setAttribute("viewBox",[Ee,V,qe,ct].join(" ")),Q.getAttribute("xmlns")||Q.setAttributeNS(i,"xmlns",t),Q.getAttribute("xmlns:xlink")||Q.setAttributeNS(i,"xmlns:xlink","http://www.w3.org/1999/xlink"),Ke?(Q.removeAttribute("width"),Q.removeAttribute("height"),Q.setAttribute("preserveAspectRatio","xMinYMin meet")):(Q.setAttribute("width",qe*Me),Q.setAttribute("height",ct*Me)),Array.from(Q.querySelectorAll("foreignObject > *")).forEach(function(xo){xo.setAttributeNS(i,"xmlns",xo.tagName==="svg"?t:e)}),xe){var Yn=document.createElement("div");Yn.appendChild(Q);var No=Yn.innerHTML;if(typeof pe=="function")pe(No,qe,ct);else return{src:No,width:qe,height:ct}}else return re(G,j).then(function(xo){var Hr=document.createElement("style");Hr.setAttribute("type","text/css"),Hr.innerHTML=``;var Tn=document.createElement("defs");Tn.appendChild(Hr),Q.insertBefore(Tn,Q.firstChild);var tm=document.createElement("div");tm.appendChild(Q);var uh=tm.innerHTML.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');if(typeof pe=="function")pe(uh,qe,ct);else return{src:uh,width:qe,height:ct}})})},n.svgAsDataUri=function(G,j,pe){return m(G),n.prepareSvg(G,j).then(function(be){var me=be.src,Ee=be.width,ue=be.height,V="data:image/svg+xml;base64,"+window.btoa(M(o+me));return typeof pe=="function"&&pe(V,Ee,ue),V})},n.svgAsPngUri=function(G,j,pe){m(G);var be=j||{},me=be.encoderType,Ee=me===void 0?"image/png":me,ue=be.encoderOptions,V=ue===void 0?.8:ue,K=be.canvg,ae=function(Me){var Le=Me.src,Ke=Me.width,Xe=Me.height,xe=document.createElement("canvas"),Q=xe.getContext("2d"),Ae=window.devicePixelRatio||1;xe.width=Ke*Ae,xe.height=Xe*Ae,xe.style.width=xe.width+"px",xe.style.height=xe.height+"px",Q.setTransform(Ae,0,0,Ae,0,0),K?K(xe,Le):Q.drawImage(Le,0,0);var qe=void 0;try{qe=xe.toDataURL(Ee,V)}catch(ct){if(typeof SecurityError<"u"&&ct instanceof SecurityError||ct.name==="SecurityError"){console.error("Rendered SVG images cannot be downloaded in this browser.");return}else throw ct}return typeof pe=="function"&&pe(qe,xe.width,xe.height),Promise.resolve(qe)};return K?n.prepareSvg(G,j).then(ae):n.svgAsDataUri(G,j).then(function(se){return new Promise(function(Me,Le){var Ke=new Image;Ke.onload=function(){return Me(ae({src:Ke,width:Ke.width,height:Ke.height}))},Ke.onerror=function(){Le(`There was an error loading the data URI as an image on the following SVG -`+window.atob(se.slice(26))+`Open the following link to see browser's diagnosis -`+se)},Ke.src=se})})},n.download=function(G,j,pe){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(w(j),G);else{var be=document.createElement("a");if("download"in be){be.download=G,be.style.display="none",document.body.appendChild(be);try{var me=w(j),Ee=URL.createObjectURL(me);be.href=Ee,be.onclick=function(){return requestAnimationFrame(function(){return URL.revokeObjectURL(Ee)})}}catch(ue){console.error(ue),console.warn("Error while getting object URL. Falling back to string URL."),be.href=j}be.click(),document.body.removeChild(be)}else pe&&pe.popup&&(pe.popup.document.title=G,pe.popup.location.replace(j))}},n.saveSvg=function(G,j,pe){var be=ne();return u(G).then(function(me){return n.svgAsDataUri(me,pe||{})}).then(function(me){return n.download(j,me,be)})},n.saveSvgAsPng=function(G,j,pe){var be=ne();return u(G).then(function(me){return n.svgAsPngUri(me,pe||{})}).then(function(me){return n.download(j,me,be)})}})()});var _N=Ts((mk,gN)=>{(function(n,i){if(typeof mk=="object"&&typeof gN=="object")gN.exports=i();else if(typeof define=="function"&&define.amd)define([],i);else{var e=i();for(var t in e)(typeof mk=="object"?mk:n)[t]=e[t]}})(globalThis,()=>(()=>{"use strict";var n={4567:function(o,r,a){var c=this&&this.__decorate||function(w,y,k,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,k):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,k,I);else for(var F=w.length-1;F>=0;F--)(D=w[F])&&(P=(N<3?D(P):N>3?D(y,k,P):D(y,k))||P);return N>3&&P&&Object.defineProperty(y,k,P),P},m=this&&this.__param||function(w,y){return function(k,I){y(k,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;let u=a(9042),h=a(9924),g=a(844),S=a(4725),x=a(2585),C=a(3656),M=r.AccessibilityManager=class extends g.Disposable{constructor(w,y,k,I){super(),this._terminal=w,this._coreBrowserService=k,this._renderService=I,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let D=0;Dthis._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new h.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(D=>this._handleResize(D.rows))),this.register(this._terminal.onRender(D=>this._refreshRows(D.start,D.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(D=>this._handleChar(D))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` -`))),this.register(this._terminal.onA11yTab(D=>this._handleTab(D))),this.register(this._terminal.onKey(D=>this._handleKey(D.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,C.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(w){for(let y=0;y0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(w){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(w)||this._charsToConsume.push(w)}_refreshRows(w,y){this._liveRegionDebouncer.refresh(w,y,this._terminal.rows)}_renderRows(w,y){let k=this._terminal.buffer,I=k.lines.length.toString();for(let D=w;D<=y;D++){let N=k.lines.get(k.ydisp+D),P=[],F=N?.translateToString(!0,void 0,void 0,P)||"",re=(k.ydisp+D+1).toString(),ne=this._rowElements[D];ne&&(F.length===0?(ne.innerText="\xA0",this._rowColumns.set(ne,[0,1])):(ne.textContent=F,this._rowColumns.set(ne,P)),ne.setAttribute("aria-posinset",re),ne.setAttribute("aria-setsize",I))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,y){let k=w.target,I=this._rowElements[y===0?1:this._rowElements.length-2];if(k.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==I)return;let D,N;if(y===0?(D=k,N=this._rowElements.pop(),this._rowContainer.removeChild(N)):(D=this._rowElements.shift(),N=k,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),N.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){let P=this._createAccessibilityTreeNode();this._rowElements.unshift(P),this._rowContainer.insertAdjacentElement("afterbegin",P)}else{let P=this._createAccessibilityTreeNode();this._rowElements.push(P),this._rowContainer.appendChild(P)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let w=document.getSelection();if(!w)return;if(w.isCollapsed)return void(this._rowContainer.contains(w.anchorNode)&&this._terminal.clearSelection());if(!w.anchorNode||!w.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:w.anchorNode,offset:w.anchorOffset},k={node:w.focusNode,offset:w.focusOffset};if((y.node.compareDocumentPosition(k.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===k.node&&y.offset>k.offset)&&([y,k]=[k,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;let I=this._rowElements.slice(-1)[0];if(k.node.compareDocumentPosition(I)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(k={node:I,offset:I.textContent?.length??0}),!this._rowContainer.contains(k.node))return;let D=({node:F,offset:re})=>{let ne=F instanceof Text?F.parentNode:F,G=parseInt(ne?.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;let j=this._rowColumns.get(ne);if(!j)return console.warn("columns is null. Race condition?"),null;let pe=re=this._terminal.cols&&(++G,pe=0),{row:G,column:pe}},N=D(y),P=D(k);if(N&&P){if(N.row>P.row||N.row===P.row&&N.column>=P.column)throw new Error("invalid range");this._terminal.select(N.column,N.row,(P.row-N.row)*this._terminal.cols-N.column+P.column)}}_handleResize(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yw;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let w=this._coreBrowserService.mainDocument.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let w=0;w{function a(h){return h.replace(/\r?\n/g,"\r")}function c(h,g){return g?"\x1B[200~"+h+"\x1B[201~":h}function m(h,g,S,x){h=c(h=a(h),S.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(h,!0),g.value=""}function u(h,g,S){let x=S.getBoundingClientRect(),C=h.clientX-x.left-10,M=h.clientY-x.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${C}px`,g.style.top=`${M}px`,g.style.zIndex="1000",g.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=a,r.bracketTextForPaste=c,r.copyHandler=function(h,g){h.clipboardData&&h.clipboardData.setData("text/plain",g.selectionText),h.preventDefault()},r.handlePasteEvent=function(h,g,S,x){h.stopPropagation(),h.clipboardData&&m(h.clipboardData.getData("text/plain"),g,S,x)},r.paste=m,r.moveTextAreaUnderMouseCursor=u,r.rightClickHandler=function(h,g,S,x,C){u(h,g,S),C&&x.rightClickSelect(h),g.value=x.selectionText,g.select()}},7239:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;let c=a(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(m,u,h){this._css.set(m,u,h)}getCss(m,u){return this._css.get(m,u)}setColor(m,u,h){this._color.set(m,u,h)}getColor(m,u){return this._color.get(m,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(a,c,m,u){a.addEventListener(c,m,u);let h=!1;return{dispose:()=>{h||(h=!0,a.removeEventListener(c,m,u))}}}},3551:function(o,r,a){var c=this&&this.__decorate||function(M,w,y,k){var I,D=arguments.length,N=D<3?w:k===null?k=Object.getOwnPropertyDescriptor(w,y):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,y,k);else for(var P=M.length-1;P>=0;P--)(I=M[P])&&(N=(D<3?I(N):D>3?I(w,y,N):I(w,y))||N);return D>3&&N&&Object.defineProperty(w,y,N),N},m=this&&this.__param||function(M,w){return function(y,k){w(y,k,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;let u=a(3656),h=a(8460),g=a(844),S=a(2585),x=a(4725),C=r.Linkifier=class extends g.Disposable{get currentLink(){return this._currentLink}constructor(M,w,y,k,I){super(),this._element=M,this._mouseService=w,this._renderService=y,this._bufferService=k,this._linkProviderService=I,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new h.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new h.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.toDisposable)(()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(M){this._lastMouseEvent=M;let w=this._positionFromMouseEvent(M,this._element,this._mouseService);if(!w)return;this._isMouseOut=!1;let y=M.composedPath();for(let k=0;k{k?.forEach(I=>{I.link.dispose&&I.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=M.y);let y=!1;for(let[k,I]of this._linkProviderService.linkProviders.entries())w?this._activeProviderReplies?.get(k)&&(y=this._checkLinkProviderResult(k,M,y)):I.provideLinks(M.y,D=>{if(this._isMouseOut)return;let N=D?.map(P=>({link:P}));this._activeProviderReplies?.set(k,N),y=this._checkLinkProviderResult(k,M,y),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(M.y,this._activeProviderReplies)})}_removeIntersectingLinks(M,w){let y=new Set;for(let k=0;kM?this._bufferService.cols:N.link.range.end.x;for(let re=P;re<=F;re++){if(y.has(re)){I.splice(D--,1);break}y.add(re)}}}}_checkLinkProviderResult(M,w,y){if(!this._activeProviderReplies)return y;let k=this._activeProviderReplies.get(M),I=!1;for(let D=0;Dthis._linkAtPosition(N.link,w));D&&(y=!0,this._handleNewLink(D))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let D=0;Dthis._linkAtPosition(P.link,w));if(N){y=!0,this._handleNewLink(N);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(M){if(!this._currentLink)return;let w=this._positionFromMouseEvent(M,this._element,this._mouseService);w&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(M,this._currentLink.link.text)}_clearCurrentLink(M,w){this._currentLink&&this._lastMouseEvent&&(!M||!w||this._currentLink.link.range.start.y>=M&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,g.disposeArray)(this._linkCacheDisposables))}_handleNewLink(M){if(!this._lastMouseEvent)return;let w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._linkAtPosition(M.link,w)&&(this._currentLink=M,this._currentLink.state={decorations:{underline:M.link.decorations===void 0||M.link.decorations.underline,pointerCursor:M.link.decorations===void 0||M.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,M.link,this._lastMouseEvent),M.link.decorations={},Object.defineProperties(M.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:y=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:y=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(M.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(y=>{if(!this._currentLink)return;let k=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,I=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=k&&this._currentLink.link.range.end.y<=I&&(this._clearCurrentLink(k,I),this._lastMouseEvent)){let D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}})))}_linkHover(M,w,y){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&M.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(y,w.text)}_fireUnderlineEvent(M,w){let y=M.range,k=this._bufferService.buffer.ydisp,I=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-k-1,y.end.x,y.end.y-k-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(I)}_linkLeave(M,w,y){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&M.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(y,w.text)}_linkAtPosition(M,w){let y=M.range.start.y*this._bufferService.cols+M.range.start.x,k=M.range.end.y*this._bufferService.cols+M.range.end.x,I=w.y*this._bufferService.cols+w.x;return y<=I&&I<=k}_positionFromMouseEvent(M,w,y){let k=y.getCoords(M,w,this._bufferService.cols,this._bufferService.rows);if(k)return{x:k[0],y:k[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(M,w,y,k,I){return{x1:M,y1:w,x2:y,y2:k,cols:this._bufferService.cols,fg:I}}};r.Linkifier=C=c([m(1,x.IMouseService),m(2,x.IRenderService),m(3,S.IBufferService),m(4,x.ILinkProviderService)],C)},9042:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(o,r,a){var c=this&&this.__decorate||function(x,C,M,w){var y,k=arguments.length,I=k<3?C:w===null?w=Object.getOwnPropertyDescriptor(C,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(x,C,M,w);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(I=(k<3?y(I):k>3?y(C,M,I):y(C,M))||I);return k>3&&I&&Object.defineProperty(C,M,I),I},m=this&&this.__param||function(x,C){return function(M,w){C(M,w,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;let u=a(511),h=a(2585),g=r.OscLinkProvider=class{constructor(x,C,M){this._bufferService=x,this._optionsService=C,this._oscLinkService=M}provideLinks(x,C){let M=this._bufferService.buffer.lines.get(x-1);if(!M)return void C(void 0);let w=[],y=this._optionsService.rawOptions.linkHandler,k=new u.CellData,I=M.getTrimmedLength(),D=-1,N=-1,P=!1;for(let F=0;Fy?y.activate(j,pe,ne):S(0,pe),hover:(j,pe)=>y?.hover?.(j,pe,ne),leave:(j,pe)=>y?.leave?.(j,pe,ne)})}P=!1,k.hasExtendedAttrs()&&k.extended.urlId?(N=F,D=k.extended.urlId):(N=-1,D=-1)}}C(w)}};function S(x,C){if(confirm(`Do you want to navigate to ${C}? +import{a as li,b as pn,c as C4,d as de,e as ie,f as y4,g as Je,h as w4,i as M4,j as k4,k as T4,l as Ie,m as gt,n as nt,o as pc,p as Ne,q as bt,r as Fe,s as _e,t as $4,u as H4,v as DC,w as U4,x as eh}from"./chunk-764TLGKY.js";import{$ as G4,A as N4,B as vr,C as Ya,D as te,E as Ju,F as pk,G as ga,H as jr,I as F4,J as Wd,K as R4,L as Zi,M as ci,N as L4,O as V4,P as tr,Q as nr,R as B4,S as z4,T as j4,U as To,V as $r,W as qd,X as ki,Y as Qd,Z as zo,_ as di,a as It,b as wt,c as et,d as fi,e as MC,f as Gs,g as Mi,h as kC,i as Zu,j as Me,k as we,l as fd,m as TC,n as E4,o as D4,p as EC,q as P4,r as _t,s as I4,t as A4,u as Fo,v as At,w as vt,x as ko,y as Ws,z as O4}from"./chunk-NJCA2RVJ.js";import{$ as J,$a as O,$b as IO,$c as Uu,$d as zt,$e as wi,A as sr,Aa as Ia,Ab as Xt,Ac as VO,Ad as hC,Ae as dk,B as Qa,Ba as Zv,Bb as Kt,Bc as BO,Bd as n4,Be as SC,C as Kv,Ca as lr,Cb as Pe,Cc as rC,Ce as u4,D as Hn,Da as zu,Db as nn,Dc as aC,Dd as fC,De as wC,E as ai,Ea as m,Eb as Be,Ec as zO,Ee as mk,F as Ud,Fa as Xa,Fb as er,Fc as jO,Fe as hd,G as po,Ga as Oo,Gb as d,Gc as $u,Gd as Qu,Ge as h4,H as ok,Ha as sd,Hb as j,Hc as $O,Hd as i4,He as qo,I as rk,Ia as Si,Ib as ee,Ic as HO,Id as ud,Ie as f4,J as _O,Ja as ot,Jb as ui,Jc as js,Jd as Ft,Je as bp,K as vO,Ka as MO,Kb as eC,Kc as UO,Kd as gC,Ke as g4,L as Ao,La as oo,Lb as oc,Lc as Hu,Ld as Ue,Le as _4,M as CO,Ma as F,Mb as rc,Mc as GO,Md as o4,Me as lt,N as bO,Na as Ht,Nb as ac,Nc as fr,Nd as _C,Ne as Ku,O as gp,Oa as ft,Ob as Ui,Oc as sC,Od as Pt,Oe as ht,Pa as Ar,Pb as Fg,Pc as lC,Pd as rt,Pe as vn,Q as xO,Qb as fn,Qc as Cp,Qd as vC,Qe as v4,R as Yv,Ra as si,Rb as Bt,Rc as cr,Rd as gr,Re as dt,S as Dl,Sa as xe,Sb as dn,Sc as cC,Sd as Gn,T as _p,Ta as ju,Tb as zs,Tc as dC,Td as cc,Te as b4,Ua as kO,Ub as tC,Ud as Ye,Ue as Us,V as pi,Va as TO,Vb as nC,Vc as WO,Vd as r4,Ve as x4,W as Un,Wa as EO,Wb as en,Wc as Al,Wd as at,We as ia,X as tt,Xa as qt,Xb as jn,Xc as $s,Xd as _r,Xe as je,Y as Qi,Yb as na,Yc as Ka,Yd as Hs,Ye as mc,Z as yi,Za as A,Zb as PO,Zc as hi,Zd as a4,Ze as pe,_ as ad,_a as DO,_b as Rg,_c as cd,_d as s4,_e as W,a as K,aa as $t,ab as Hi,ac as lk,ad as qO,ae as Rt,af as S4,b as it,ba as cn,bb as Ae,bc as Jt,bd as QO,be as l4,bf as mn,c as uO,ca as ge,cb as Y,cc as sc,cd as XO,ce as c4,cf as Yu,d as Cs,da as f,db as Z,dc as AO,dd as KO,de as Xu,df as Oa,e as Ln,ea as yO,eb as C,ec as OO,ee as dc,f as Bs,fa as SO,fb as s,fc as le,fe as d4,g as So,ga as k,gb as l,gc as Nt,gd as dd,ge as CC,h as Dr,ha as T,hb as R,hc as NO,hd as YO,he as Vn,i as He,ia as ei,ib as vo,id as ZO,ie as Xe,j as an,ja as Ir,jb as wo,jc as U,jd as md,je as Dt,k as Hd,ka as Jo,kb as bs,kc as Q,kd as mC,ke as Aa,l as hO,la as Xi,lb as Le,lc as ld,ld as Mo,m as nc,ma as Pl,mb as Ve,mc as Ct,md as JO,me as bC,n as Lu,na as ve,nb as ro,nc as No,o as Vu,oa as Vi,ob as z,od as pd,p as Nn,pa as wO,pb as Wo,pc as iC,pe as xC,q as Bo,qa as ae,qb as g,qc as Yi,qd as e4,r as Ng,ra as ha,rb as Jv,rc as FO,s as fO,sa as bn,sb as v,sc as RO,sd as Gu,ta as Pi,tb as ii,tc as lc,td as Wu,u as Lt,ua as Zt,ub as on,uc as ck,ud as fa,v as Pr,va as Il,vb as Ki,vc as zr,vd as t4,w as ic,wa as Bu,wb as xn,wc as LO,wd as pC,we as m4,x as ik,xa as ak,xb as mt,xc as oC,xd as uC,xe as Gd,y as gO,ya as sk,yb as pt,yc as ne,yd as qu,ye as yC,z as qi,za as vp,zc as xs,ze as p4}from"./chunk-72DGZVTL.js";var B8=Cs((dJe,Fx)=>{(function(n,i,e){if(!n)return;for(var t={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},o={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},r={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},a={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},c,p=1;p<20;++p)t[111+p]="f"+p;for(p=0;p<=9;++p)t[p+96]=p.toString();function u(P,L,re){if(P.addEventListener){P.addEventListener(L,re,!1);return}P.attachEvent("on"+L,re)}function h(P){if(P.type=="keypress"){var L=String.fromCharCode(P.which);return P.shiftKey||(L=L.toLowerCase()),L}return t[P.which]?t[P.which]:o[P.which]?o[P.which]:String.fromCharCode(P.which).toLowerCase()}function _(P,L){return P.sort().join(",")===L.sort().join(",")}function S(P){var L=[];return P.shiftKey&&L.push("shift"),P.altKey&&L.push("alt"),P.ctrlKey&&L.push("ctrl"),P.metaKey&&L.push("meta"),L}function x(P){if(P.preventDefault){P.preventDefault();return}P.returnValue=!1}function b(P){if(P.stopPropagation){P.stopPropagation();return}P.cancelBubble=!0}function M(P){return P=="shift"||P=="ctrl"||P=="alt"||P=="meta"}function w(){if(!c){c={};for(var P in t)P>95&&P<112||t.hasOwnProperty(P)&&(c[t[P]]=P)}return c}function y(P,L,re){return re||(re=w()[P]?"keydown":"keypress"),re=="keypress"&&L.length&&(re="keydown"),re}function E(P){return P==="+"?["+"]:(P=P.replace(/\+{2}/g,"+plus"),P.split("+"))}function I(P,L){var re,oe,G,$=[];for(re=E(P),G=0;G1){X(ce,ye,ke,ze);return}q=I(ce,ze),L._callbacks[q.key]=L._callbacks[q.key]||[],me(q.key,q.modifiers,{type:q.action},Ke,ce,Qe),L._callbacks[q.key][Ke?"unshift":"push"]({callback:ke,modifiers:q.modifiers,action:q.action,seq:Ke,level:Qe,combo:ce})}L._bindMultiple=function(ce,ke,ze){for(var Ke=0;Ke-1||D(L,re.target))return!1;if("composedPath"in P&&typeof P.composedPath=="function"){var oe=P.composedPath()[0];oe!==P.target&&(L=oe)}return L.tagName=="INPUT"||L.tagName=="SELECT"||L.tagName=="TEXTAREA"||L.isContentEditable},N.prototype.handleKey=function(){var P=this;return P._handleKey.apply(P,arguments)},N.addKeycodes=function(P){for(var L in P)P.hasOwnProperty(L)&&(t[L]=P[L]);c=null},N.init=function(){var P=N(i);for(var L in P)L.charAt(0)!=="_"&&(N[L]=(function(re){return function(){return P[re].apply(P,arguments)}})(L))},N.init(),n.Mousetrap=N,typeof Fx<"u"&&Fx.exports&&(Fx.exports=N),typeof define=="function"&&define.amd&&define(function(){return N})})(typeof window<"u"?window:null,typeof window<"u"?document:null)});var $L=Cs(wP=>{var jL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");wP.encode=function(n){if(0<=n&&n{var HL=$L(),MP=5,UL=1<>1;return i?-e:e}kP.encode=function(i){var e="",t,o=Mce(i);do t=o&GL,o>>>=MP,o>0&&(t|=WL),e+=HL.encode(t);while(o>0);return e};kP.decode=function(i,e,t){var o=i.length,r=0,a=0,c,p;do{if(e>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(p=HL.decode(i.charCodeAt(e++)),p===-1)throw new Error("Invalid base64 digit: "+i.charAt(e-1));c=!!(p&WL),p&=GL,r=r+(p<{function Tce(n,i,e){if(i in n)return n[i];if(arguments.length===3)return e;throw new Error('"'+i+'" is a required argument.')}ea.getArg=Tce;var QL=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Ece=/^data:.+\,.+$/;function q0(n){var i=n.match(QL);return i?{scheme:i[1],auth:i[2],host:i[3],port:i[4],path:i[5]}:null}ea.urlParse=q0;function uf(n){var i="";return n.scheme&&(i+=n.scheme+":"),i+="//",n.auth&&(i+=n.auth+"@"),n.host&&(i+=n.host),n.port&&(i+=":"+n.port),n.path&&(i+=n.path),i}ea.urlGenerate=uf;var Dce=32;function Pce(n){var i=[];return function(e){for(var t=0;tDce&&i.pop(),r}}var TP=Pce(function(i){var e=i,t=q0(i);if(t){if(!t.path)return i;e=t.path}for(var o=ea.isAbsolute(e),r=[],a=0,c=0;;)if(a=c,c=e.indexOf("/",a),c===-1){r.push(e.slice(a));break}else for(r.push(e.slice(a,c));c=0;c--)p=r[c],p==="."?r.splice(c,1):p===".."?u++:u>0&&(p===""?(r.splice(c+1,u),u=0):(r.splice(c,2),u--));return e=r.join("/"),e===""&&(e=o?"/":"."),t?(t.path=e,uf(t)):e});ea.normalize=TP;function XL(n,i){n===""&&(n="."),i===""&&(i=".");var e=q0(i),t=q0(n);if(t&&(n=t.path||"/"),e&&!e.scheme)return t&&(e.scheme=t.scheme),uf(e);if(e||i.match(Ece))return i;if(t&&!t.host&&!t.path)return t.host=i,uf(t);var o=i.charAt(0)==="/"?i:TP(n.replace(/\/+$/,"")+"/"+i);return t?(t.path=o,uf(t)):o}ea.join=XL;ea.isAbsolute=function(n){return n.charAt(0)==="/"||QL.test(n)};function Ice(n,i){n===""&&(n="."),n=n.replace(/\/$/,"");for(var e=0;i.indexOf(n+"/")!==0;){var t=n.lastIndexOf("/");if(t<0||(n=n.slice(0,t),n.match(/^([^\/]+:\/)?\/*$/)))return i;++e}return Array(e+1).join("../")+i.substr(n.length+1)}ea.relative=Ice;var KL=(function(){var n=Object.create(null);return!("__proto__"in n)})();function YL(n){return n}function Ace(n){return ZL(n)?"$"+n:n}ea.toSetString=KL?YL:Ace;function Oce(n){return ZL(n)?n.slice(1):n}ea.fromSetString=KL?YL:Oce;function ZL(n){if(!n)return!1;var i=n.length;if(i<9||n.charCodeAt(i-1)!==95||n.charCodeAt(i-2)!==95||n.charCodeAt(i-3)!==111||n.charCodeAt(i-4)!==116||n.charCodeAt(i-5)!==111||n.charCodeAt(i-6)!==114||n.charCodeAt(i-7)!==112||n.charCodeAt(i-8)!==95||n.charCodeAt(i-9)!==95)return!1;for(var e=i-10;e>=0;e--)if(n.charCodeAt(e)!==36)return!1;return!0}function Nce(n,i,e){var t=Od(n.source,i.source);return t!==0||(t=n.originalLine-i.originalLine,t!==0)||(t=n.originalColumn-i.originalColumn,t!==0||e)||(t=n.generatedColumn-i.generatedColumn,t!==0)||(t=n.generatedLine-i.generatedLine,t!==0)?t:Od(n.name,i.name)}ea.compareByOriginalPositions=Nce;function Fce(n,i,e){var t;return t=n.originalLine-i.originalLine,t!==0||(t=n.originalColumn-i.originalColumn,t!==0||e)||(t=n.generatedColumn-i.generatedColumn,t!==0)||(t=n.generatedLine-i.generatedLine,t!==0)?t:Od(n.name,i.name)}ea.compareByOriginalPositionsNoSource=Fce;function Rce(n,i,e){var t=n.generatedLine-i.generatedLine;return t!==0||(t=n.generatedColumn-i.generatedColumn,t!==0||e)||(t=Od(n.source,i.source),t!==0)||(t=n.originalLine-i.originalLine,t!==0)||(t=n.originalColumn-i.originalColumn,t!==0)?t:Od(n.name,i.name)}ea.compareByGeneratedPositionsDeflated=Rce;function Lce(n,i,e){var t=n.generatedColumn-i.generatedColumn;return t!==0||e||(t=Od(n.source,i.source),t!==0)||(t=n.originalLine-i.originalLine,t!==0)||(t=n.originalColumn-i.originalColumn,t!==0)?t:Od(n.name,i.name)}ea.compareByGeneratedPositionsDeflatedNoLine=Lce;function Od(n,i){return n===i?0:n===null?1:i===null?-1:n>i?1:-1}function Vce(n,i){var e=n.generatedLine-i.generatedLine;return e!==0||(e=n.generatedColumn-i.generatedColumn,e!==0)||(e=Od(n.source,i.source),e!==0)||(e=n.originalLine-i.originalLine,e!==0)||(e=n.originalColumn-i.originalColumn,e!==0)?e:Od(n.name,i.name)}ea.compareByGeneratedPositionsInflated=Vce;function Bce(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}ea.parseSourceMapInput=Bce;function zce(n,i,e){if(i=i||"",n&&(n[n.length-1]!=="/"&&i[0]!=="/"&&(n+="/"),i=n+i),e){var t=q0(e);if(!t)throw new Error("sourceMapURL could not be parsed");if(t.path){var o=t.path.lastIndexOf("/");o>=0&&(t.path=t.path.substring(0,o+1))}i=XL(uf(t),i)}return TP(i)}ea.computeSourceURL=zce});var e7=Cs(JL=>{var EP=ey(),DP=Object.prototype.hasOwnProperty,gu=typeof Map<"u";function Nd(){this._array=[],this._set=gu?new Map:Object.create(null)}Nd.fromArray=function(i,e){for(var t=new Nd,o=0,r=i.length;o=0)return e}else{var t=EP.toSetString(i);if(DP.call(this._set,t))return this._set[t]}throw new Error('"'+i+'" is not in the set.')};Nd.prototype.at=function(i){if(i>=0&&i{var t7=ey();function jce(n,i){var e=n.generatedLine,t=i.generatedLine,o=n.generatedColumn,r=i.generatedColumn;return t>e||t==e&&r>=o||t7.compareByGeneratedPositionsInflated(n,i)<=0}function ty(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}ty.prototype.unsortedForEach=function(i,e){this._array.forEach(i,e)};ty.prototype.add=function(i){jce(this._last,i)?(this._last=i,this._array.push(i)):(this._sorted=!1,this._array.push(i))};ty.prototype.toArray=function(){return this._sorted||(this._array.sort(t7.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};n7.MappingList=ty});var r7=Cs(o7=>{var Q0=qL(),ur=ey(),ny=e7().ArraySet,$ce=i7().MappingList;function Cl(n){n||(n={}),this._file=ur.getArg(n,"file",null),this._sourceRoot=ur.getArg(n,"sourceRoot",null),this._skipValidation=ur.getArg(n,"skipValidation",!1),this._ignoreInvalidMapping=ur.getArg(n,"ignoreInvalidMapping",!1),this._sources=new ny,this._names=new ny,this._mappings=new $ce,this._sourcesContents=null}Cl.prototype._version=3;Cl.fromSourceMap=function(i,e){var t=i.sourceRoot,o=new Cl(Object.assign(e||{},{file:i.file,sourceRoot:t}));return i.eachMapping(function(r){var a={generated:{line:r.generatedLine,column:r.generatedColumn}};r.source!=null&&(a.source=r.source,t!=null&&(a.source=ur.relative(t,a.source)),a.original={line:r.originalLine,column:r.originalColumn},r.name!=null&&(a.name=r.name)),o.addMapping(a)}),i.sources.forEach(function(r){var a=r;t!==null&&(a=ur.relative(t,r)),o._sources.has(a)||o._sources.add(a);var c=i.sourceContentFor(r);c!=null&&o.setSourceContent(r,c)}),o};Cl.prototype.addMapping=function(i){var e=ur.getArg(i,"generated"),t=ur.getArg(i,"original",null),o=ur.getArg(i,"source",null),r=ur.getArg(i,"name",null);!this._skipValidation&&this._validateMapping(e,t,o,r)===!1||(o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),r!=null&&(r=String(r),this._names.has(r)||this._names.add(r)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:t!=null&&t.line,originalColumn:t!=null&&t.column,source:o,name:r}))};Cl.prototype.setSourceContent=function(i,e){var t=i;this._sourceRoot!=null&&(t=ur.relative(this._sourceRoot,t)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ur.toSetString(t)]=e):this._sourcesContents&&(delete this._sourcesContents[ur.toSetString(t)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Cl.prototype.applySourceMap=function(i,e,t){var o=e;if(e==null){if(i.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=i.file}var r=this._sourceRoot;r!=null&&(o=ur.relative(r,o));var a=new ny,c=new ny;this._mappings.unsortedForEach(function(p){if(p.source===o&&p.originalLine!=null){var u=i.originalPositionFor({line:p.originalLine,column:p.originalColumn});u.source!=null&&(p.source=u.source,t!=null&&(p.source=ur.join(t,p.source)),r!=null&&(p.source=ur.relative(r,p.source)),p.originalLine=u.line,p.originalColumn=u.column,u.name!=null&&(p.name=u.name))}var h=p.source;h!=null&&!a.has(h)&&a.add(h);var _=p.name;_!=null&&!c.has(_)&&c.add(_)},this),this._sources=a,this._names=c,i.sources.forEach(function(p){var u=i.sourceContentFor(p);u!=null&&(t!=null&&(p=ur.join(t,p)),r!=null&&(p=ur.relative(r,p)),this.setSourceContent(p,u))},this)};Cl.prototype._validateMapping=function(i,e,t,o){if(e&&typeof e.line!="number"&&typeof e.column!="number"){var r="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}if(!(i&&"line"in i&&"column"in i&&i.line>0&&i.column>=0&&!e&&!t&&!o)){if(i&&"line"in i&&"column"in i&&e&&"line"in e&&"column"in e&&i.line>0&&i.column>=0&&e.line>0&&e.column>=0&&t)return;var r="Invalid mapping: "+JSON.stringify({generated:i,source:t,original:e,name:o});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(r),!1;throw new Error(r)}};Cl.prototype._serializeMappings=function(){for(var i=0,e=1,t=0,o=0,r=0,a=0,c="",p,u,h,_,S=this._mappings.toArray(),x=0,b=S.length;x0){if(!ur.compareByGeneratedPositionsInflated(u,S[x-1]))continue;p+=","}p+=Q0.encode(u.generatedColumn-i),i=u.generatedColumn,u.source!=null&&(_=this._sources.indexOf(u.source),p+=Q0.encode(_-a),a=_,p+=Q0.encode(u.originalLine-1-o),o=u.originalLine-1,p+=Q0.encode(u.originalColumn-t),t=u.originalColumn,u.name!=null&&(h=this._names.indexOf(u.name),p+=Q0.encode(h-r),r=h)),c+=p}return c};Cl.prototype._generateSourcesContent=function(i,e){return i.map(function(t){if(!this._sourcesContents)return null;e!=null&&(t=ur.relative(e,t));var o=ur.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};Cl.prototype.toJSON=function(){var i={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(i.file=this._file),this._sourceRoot!=null&&(i.sourceRoot=this._sourceRoot),this._sourcesContents&&(i.sourcesContent=this._generateSourcesContent(i.sources,i.sourceRoot)),i};Cl.prototype.toString=function(){return JSON.stringify(this.toJSON())};o7.SourceMapGenerator=Cl});var GA=Cs((t9,ww)=>{(function(n){"use strict";let i="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp(`^${i}\\.${i}\\.${i}\\.${i}$`,"i"),threeOctet:new RegExp(`^${i}\\.${i}\\.${i}$`,"i"),twoOctet:new RegExp(`^${i}\\.${i}$`,"i"),longValue:new RegExp(`^${i}$`,"i")},t=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),r="%[0-9a-z]{1,}",a="(?:[0-9a-f]+::?)+",c={zoneIndex:new RegExp(r,"i"),native:new RegExp(`^(::)?(${a})?([0-9a-f]+)?(::)?(${r})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${i}\\.${i}\\.${i}\\.${i}(${r})?)$`,"i"),transitional:new RegExp(`^((?:${a})|(?:::)(?:${a})?)${i}\\.${i}\\.${i}\\.${i}(${r})?$`,"i")};function p(x,b){if(x.indexOf("::")!==x.lastIndexOf("::"))return null;let M=0,w=-1,y=(x.match(c.zoneIndex)||[])[0],E,I;for(y&&(y=y.substring(1),x=x.replace(/%.+$/,""));(w=x.indexOf(":",w+1))>=0;)M++;if(x.substr(0,2)==="::"&&M--,x.substr(-2,2)==="::"&&M--,M>b)return null;for(I=b-M,E=":";I--;)E+="0:";return x=x.replace("::",E),x[0]===":"&&(x=x.slice(1)),x[x.length-1]===":"&&(x=x.slice(0,-1)),b=(function(){let D=x.split(":"),N=[];for(let P=0;P0;){if(E=M-w,E<0&&(E=0),x[y]>>E!==b[y]>>E)return!1;w-=M,y+=1}return!0}function h(x){if(o.test(x))return parseInt(x,16);if(x[0]==="0"&&!isNaN(parseInt(x[1],10))){if(t.test(x))return parseInt(x,8);throw new Error(`ipaddr: cannot parse ${x} as octal`)}return parseInt(x,10)}function _(x,b){for(;x.length=0;y-=1)if(E=this.octets[y],E in w){if(I=w[E],M&&I!==0)return null;I!==8&&(M=!0),b+=I}else return null;return 32-b},x.prototype.range=function(){return S.subnetMatch(this,this.SpecialRanges)},x.prototype.toByteArray=function(){return this.octets.slice(0)},x.prototype.toIPv4MappedAddress=function(){return S.IPv6.parse(`::ffff:${this.toString()}`)},x.prototype.toNormalizedString=function(){return this.toString()},x.prototype.toString=function(){return this.octets.join(".")},x})(),S.IPv4.broadcastAddressFromCIDR=function(x){try{let b=this.parseCIDR(x),M=b[0].toByteArray(),w=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),y=[],E=0;for(;E<4;)y.push(parseInt(M[E],10)|parseInt(w[E],10)^255),E++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},S.IPv4.isIPv4=function(x){return this.parser(x)!==null},S.IPv4.isValid=function(x){try{return new this(this.parser(x)),!0}catch{return!1}},S.IPv4.isValidCIDR=function(x){try{return this.parseCIDR(x),!0}catch{return!1}},S.IPv4.isValidFourPartDecimal=function(x){return!!(S.IPv4.isValid(x)&&x.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},S.IPv4.isValidCIDRFourPartDecimal=function(x){let b=x.match(/^(.+)\/(\d+)$/);return!S.IPv4.isValidCIDR(x)||!b?!1:S.IPv4.isValidFourPartDecimal(b[1])},S.IPv4.networkAddressFromCIDR=function(x){let b,M,w,y,E;try{for(b=this.parseCIDR(x),w=b[0].toByteArray(),E=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),y=[],M=0;M<4;)y.push(parseInt(w[M],10)&parseInt(E[M],10)),M++;return new this(y)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},S.IPv4.parse=function(x){let b=this.parser(x);if(b===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(b)},S.IPv4.parseCIDR=function(x){let b;if(b=x.match(/^(.+)\/(\d+)$/)){let M=parseInt(b[2]);if(M>=0&&M<=32){let w=[this.parse(b[1]),M];return Object.defineProperty(w,"toString",{value:function(){return this.join("/")}}),w}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},S.IPv4.parser=function(x){let b,M,w;if(b=x.match(e.fourOctet))return(function(){let y=b.slice(1,6),E=[];for(let I=0;I4294967295||w<0)throw new Error("ipaddr: address outside defined range");return(function(){let y=[],E;for(E=0;E<=24;E+=8)y.push(w>>E&255);return y})().reverse()}else return(b=x.match(e.twoOctet))?(function(){let y=b.slice(1,4),E=[];if(w=h(y[1]),w>16777215||w<0)throw new Error("ipaddr: address outside defined range");return E.push(h(y[0])),E.push(w>>16&255),E.push(w>>8&255),E.push(w&255),E})():(b=x.match(e.threeOctet))?(function(){let y=b.slice(1,5),E=[];if(w=h(y[2]),w>65535||w<0)throw new Error("ipaddr: address outside defined range");return E.push(h(y[0])),E.push(h(y[1])),E.push(w>>8&255),E.push(w&255),E})():null},S.IPv4.subnetMaskFromPrefixLength=function(x){if(x=parseInt(x),x<0||x>32)throw new Error("ipaddr: invalid IPv4 prefix length");let b=[0,0,0,0],M=0,w=Math.floor(x/8);for(;M=0;I-=1)if(y=this.parts[I],y in w){if(E=w[y],M&&E!==0)return null;E!==16&&(M=!0),b+=E}else return null;return 128-b},x.prototype.range=function(){return S.subnetMatch(this,this.SpecialRanges)},x.prototype.toByteArray=function(){let b,M=[],w=this.parts;for(let y=0;y>8),M.push(b&255);return M},x.prototype.toFixedLengthString=function(){let b=function(){let w=[];for(let y=0;y>8,M&255,w>>8,w&255])},x.prototype.toNormalizedString=function(){let b=function(){let w=[];for(let y=0;yy&&(w=E.index,y=E[0].length);return y<0?M:`${M.substring(0,w)}::${M.substring(w+y)}`},x.prototype.toString=function(){return this.toRFC5952String()},x})(),S.IPv6.broadcastAddressFromCIDR=function(x){try{let b=this.parseCIDR(x),M=b[0].toByteArray(),w=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),y=[],E=0;for(;E<16;)y.push(parseInt(M[E],10)|parseInt(w[E],10)^255),E++;return new this(y)}catch(b){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${b})`)}},S.IPv6.isIPv6=function(x){return this.parser(x)!==null},S.IPv6.isValid=function(x){if(typeof x=="string"&&x.indexOf(":")===-1)return!1;try{let b=this.parser(x);return new this(b.parts,b.zoneId),!0}catch{return!1}},S.IPv6.isValidCIDR=function(x){if(typeof x=="string"&&x.indexOf(":")===-1)return!1;try{return this.parseCIDR(x),!0}catch{return!1}},S.IPv6.networkAddressFromCIDR=function(x){let b,M,w,y,E;try{for(b=this.parseCIDR(x),w=b[0].toByteArray(),E=this.subnetMaskFromPrefixLength(b[1]).toByteArray(),y=[],M=0;M<16;)y.push(parseInt(w[M],10)&parseInt(E[M],10)),M++;return new this(y)}catch(I){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${I})`)}},S.IPv6.parse=function(x){let b=this.parser(x);if(b.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(b.parts,b.zoneId)},S.IPv6.parseCIDR=function(x){let b,M,w;if((M=x.match(/^(.+)\/(\d+)$/))&&(b=parseInt(M[2]),b>=0&&b<=128))return w=[this.parse(M[1]),b],Object.defineProperty(w,"toString",{value:function(){return this.join("/")}}),w;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},S.IPv6.parser=function(x){let b,M,w,y,E,I;if(w=x.match(c.deprecatedTransitional))return this.parser(`::ffff:${w[1]}`);if(c.native.test(x))return p(x,8);if((w=x.match(c.transitional))&&(I=w[6]||"",b=w[1],w[1].endsWith("::")||(b=b.slice(0,-1)),b=p(b+I,6),b.parts)){for(E=[parseInt(w[2]),parseInt(w[3]),parseInt(w[4]),parseInt(w[5])],M=0;M128)throw new Error("ipaddr: invalid IPv6 prefix length");let b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0,w=Math.floor(x/8);for(;M{(function(n){if(typeof l9=="object")c9.exports=n();else if(typeof define=="function"&&define.amd)define(n);else{var i;try{i=window}catch{i=self}i.SparkMD5=n()}})(function(n){"use strict";var i=function(y,E){return y+E&4294967295},e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function t(y,E,I,D,N,P){return E=i(i(E,y),i(D,P)),i(E<>>32-N,I)}function o(y,E){var I=y[0],D=y[1],N=y[2],P=y[3];I+=(D&N|~D&P)+E[0]-680876936|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+E[1]-389564586|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+E[2]+606105819|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+E[3]-1044525330|0,D=(D<<22|D>>>10)+N|0,I+=(D&N|~D&P)+E[4]-176418897|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+E[5]+1200080426|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+E[6]-1473231341|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+E[7]-45705983|0,D=(D<<22|D>>>10)+N|0,I+=(D&N|~D&P)+E[8]+1770035416|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+E[9]-1958414417|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+E[10]-42063|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+E[11]-1990404162|0,D=(D<<22|D>>>10)+N|0,I+=(D&N|~D&P)+E[12]+1804603682|0,I=(I<<7|I>>>25)+D|0,P+=(I&D|~I&N)+E[13]-40341101|0,P=(P<<12|P>>>20)+I|0,N+=(P&I|~P&D)+E[14]-1502002290|0,N=(N<<17|N>>>15)+P|0,D+=(N&P|~N&I)+E[15]+1236535329|0,D=(D<<22|D>>>10)+N|0,I+=(D&P|N&~P)+E[1]-165796510|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+E[6]-1069501632|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+E[11]+643717713|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+E[0]-373897302|0,D=(D<<20|D>>>12)+N|0,I+=(D&P|N&~P)+E[5]-701558691|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+E[10]+38016083|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+E[15]-660478335|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+E[4]-405537848|0,D=(D<<20|D>>>12)+N|0,I+=(D&P|N&~P)+E[9]+568446438|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+E[14]-1019803690|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+E[3]-187363961|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+E[8]+1163531501|0,D=(D<<20|D>>>12)+N|0,I+=(D&P|N&~P)+E[13]-1444681467|0,I=(I<<5|I>>>27)+D|0,P+=(I&N|D&~N)+E[2]-51403784|0,P=(P<<9|P>>>23)+I|0,N+=(P&D|I&~D)+E[7]+1735328473|0,N=(N<<14|N>>>18)+P|0,D+=(N&I|P&~I)+E[12]-1926607734|0,D=(D<<20|D>>>12)+N|0,I+=(D^N^P)+E[5]-378558|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+E[8]-2022574463|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+E[11]+1839030562|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+E[14]-35309556|0,D=(D<<23|D>>>9)+N|0,I+=(D^N^P)+E[1]-1530992060|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+E[4]+1272893353|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+E[7]-155497632|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+E[10]-1094730640|0,D=(D<<23|D>>>9)+N|0,I+=(D^N^P)+E[13]+681279174|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+E[0]-358537222|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+E[3]-722521979|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+E[6]+76029189|0,D=(D<<23|D>>>9)+N|0,I+=(D^N^P)+E[9]-640364487|0,I=(I<<4|I>>>28)+D|0,P+=(I^D^N)+E[12]-421815835|0,P=(P<<11|P>>>21)+I|0,N+=(P^I^D)+E[15]+530742520|0,N=(N<<16|N>>>16)+P|0,D+=(N^P^I)+E[2]-995338651|0,D=(D<<23|D>>>9)+N|0,I+=(N^(D|~P))+E[0]-198630844|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+E[7]+1126891415|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+E[14]-1416354905|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+E[5]-57434055|0,D=(D<<21|D>>>11)+N|0,I+=(N^(D|~P))+E[12]+1700485571|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+E[3]-1894986606|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+E[10]-1051523|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+E[1]-2054922799|0,D=(D<<21|D>>>11)+N|0,I+=(N^(D|~P))+E[8]+1873313359|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+E[15]-30611744|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+E[6]-1560198380|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+E[13]+1309151649|0,D=(D<<21|D>>>11)+N|0,I+=(N^(D|~P))+E[4]-145523070|0,I=(I<<6|I>>>26)+D|0,P+=(D^(I|~N))+E[11]-1120210379|0,P=(P<<10|P>>>22)+I|0,N+=(I^(P|~D))+E[2]+718787259|0,N=(N<<15|N>>>17)+P|0,D+=(P^(N|~I))+E[9]-343485551|0,D=(D<<21|D>>>11)+N|0,y[0]=I+y[0]|0,y[1]=D+y[1]|0,y[2]=N+y[2]|0,y[3]=P+y[3]|0}function r(y){var E=[],I;for(I=0;I<64;I+=4)E[I>>2]=y.charCodeAt(I)+(y.charCodeAt(I+1)<<8)+(y.charCodeAt(I+2)<<16)+(y.charCodeAt(I+3)<<24);return E}function a(y){var E=[],I;for(I=0;I<64;I+=4)E[I>>2]=y[I]+(y[I+1]<<8)+(y[I+2]<<16)+(y[I+3]<<24);return E}function c(y){var E=y.length,I=[1732584193,-271733879,-1732584194,271733878],D,N,P,L,re,oe;for(D=64;D<=E;D+=64)o(I,r(y.substring(D-64,D)));for(y=y.substring(D-64),N=y.length,P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],D=0;D>2]|=y.charCodeAt(D)<<(D%4<<3);if(P[D>>2]|=128<<(D%4<<3),D>55)for(o(I,P),D=0;D<16;D+=1)P[D]=0;return L=E*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),re=parseInt(L[2],16),oe=parseInt(L[1],16)||0,P[14]=re,P[15]=oe,o(I,P),I}function p(y){var E=y.length,I=[1732584193,-271733879,-1732584194,271733878],D,N,P,L,re,oe;for(D=64;D<=E;D+=64)o(I,a(y.subarray(D-64,D)));for(y=D-64>2]|=y[D]<<(D%4<<3);if(P[D>>2]|=128<<(D%4<<3),D>55)for(o(I,P),D=0;D<16;D+=1)P[D]=0;return L=E*8,L=L.toString(16).match(/(.*?)(.{0,8})$/),re=parseInt(L[2],16),oe=parseInt(L[1],16)||0,P[14]=re,P[15]=oe,o(I,P),I}function u(y){var E="",I;for(I=0;I<4;I+=1)E+=e[y>>I*8+4&15]+e[y>>I*8&15];return E}function h(y){var E;for(E=0;E>16)+(E>>16)+(I>>16);return D<<16|I&65535}),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&(function(){function y(E,I){return E=E|0||0,E<0?Math.max(E+I,0):Math.min(E,I)}ArrayBuffer.prototype.slice=function(E,I){var D=this.byteLength,N=y(E,D),P=D,L,re,oe,G;return I!==n&&(P=y(I,D)),N>P?new ArrayBuffer(0):(L=P-N,re=new ArrayBuffer(L),oe=new Uint8Array(re),G=new Uint8Array(this,N,L),oe.set(G),re)}})();function _(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function S(y,E){var I=y.length,D=new ArrayBuffer(I),N=new Uint8Array(D),P;for(P=0;P>2]|=E.charCodeAt(D)<<(D%4<<3);return this._finish(N,I),P=h(this._hash),y&&(P=M(P)),this.reset(),P},w.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},w.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},w.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},w.prototype._finish=function(y,E){var I=E,D,N,P;if(y[I>>2]|=128<<(I%4<<3),I>55)for(o(this._hash,y),I=0;I<16;I+=1)y[I]=0;D=this._length*8,D=D.toString(16).match(/(.*?)(.{0,8})$/),N=parseInt(D[2],16),P=parseInt(D[1],16)||0,y[14]=N,y[15]=P,o(this._hash,y)},w.hash=function(y,E){return w.hashBinary(_(y),E)},w.hashBinary=function(y,E){var I=c(y),D=h(I);return E?M(D):D},w.ArrayBuffer=function(){this.reset()},w.ArrayBuffer.prototype.append=function(y){var E=b(this._buff.buffer,y,!0),I=E.length,D;for(this._length+=y.byteLength,D=64;D<=I;D+=64)o(this._hash,a(E.subarray(D-64,D)));return this._buff=D-64>2]|=E[N]<<(N%4<<3);return this._finish(D,I),P=h(this._hash),y&&(P=M(P)),this.reset(),P},w.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.ArrayBuffer.prototype.getState=function(){var y=w.prototype.getState.call(this);return y.buff=x(y.buff),y},w.ArrayBuffer.prototype.setState=function(y){return y.buff=S(y.buff,!0),w.prototype.setState.call(this,y)},w.ArrayBuffer.prototype.destroy=w.prototype.destroy,w.ArrayBuffer.prototype._finish=w.prototype._finish,w.ArrayBuffer.hash=function(y,E){var I=p(new Uint8Array(y)),D=h(I);return E?M(D):D},w})});var f9=Cs(QA=>{"use strict";(function(){var n=typeof QA<"u"&&QA||typeof define<"u"&&{}||this||window;typeof define<"u"&&define("save-svg-as-png",[],function(){return n}),n.default=n;var i="http://www.w3.org/2000/xmlns/",e="http://www.w3.org/1999/xhtml",t="http://www.w3.org/2000/svg",o=']>',r=/url\(["']?(.+?)["']?\)/,a={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},c=function($){return $ instanceof HTMLElement||$ instanceof SVGElement},p=function($){if(!c($))throw new Error("an HTMLElement or SVGElement is required; got "+$)},u=function($){return new Promise(function(ue,be){c($)?ue($):be(new Error("an HTMLElement or SVGElement is required; got "+$))})},h=function($){return $&&$.lastIndexOf("http",0)===0&&$.lastIndexOf(window.location.host)===-1},_=function($){var ue=Object.keys(a).filter(function(be){return $.indexOf("."+be)>0}).map(function(be){return a[be]});return ue?ue[0]:(console.error("Unknown font format for "+$+". Fonts may not be working correctly."),"application/octet-stream")},S=function($){for(var ue="",be=new Uint8Array($),me=0;me"u"||me===null||isNaN(parseFloat(me))?0:me},b=function($,ue,be,me){if($.tagName==="svg")return{width:be||x($,ue,"width"),height:me||x($,ue,"height")};if($.getBBox){var De=$.getBBox(),he=De.x,B=De.y,X=De.width,se=De.height;return{width:he+X,height:B+se}}},M=function($){return decodeURIComponent(encodeURIComponent($).replace(/%([0-9A-F]{2})/g,function(ue,be){var me=String.fromCharCode("0x"+be);return me==="%"?"%25":me}))},w=function($){for(var ue=window.atob($.split(",")[1]),be=$.split(",")[0].split(":")[1].split(";")[0],me=new ArrayBuffer(ue.length),De=new Uint8Array(me),he=0;he"u",ze=B||[];return L().forEach(function(Ke){var Qe=Ke.rules,ye=Ke.href;Qe&&Array.from(Qe).forEach(function(q){if(typeof q.style<"u")if(y($,q.selectorText))ce.push(se(q.selectorText,q.style.cssText));else if(ke&&q.cssText.match(/^@font-face/)){var Oe=E(q,ye);Oe&&ze.push(Oe)}else X||ce.push(q.cssText)})}),N(ze).then(function(Ke){return ce.join(` +`)+Ke})},oe=function(){if(!navigator.msSaveOrOpenBlob&&!("download"in document.createElement("a")))return{popup:window.open()}};n.prepareSvg=function(G,$,ue){p(G);var be=$||{},me=be.left,De=me===void 0?0:me,he=be.top,B=he===void 0?0:he,X=be.width,se=be.height,ce=be.scale,ke=ce===void 0?1:ce,ze=be.responsive,Ke=ze===void 0?!1:ze,Qe=be.excludeCss,ye=Qe===void 0?!1:Qe;return I(G).then(function(){var q=G.cloneNode(!0);q.style.backgroundColor=($||{}).backgroundColor||G.style.backgroundColor;var Oe=b(G,q,X,se),We=Oe.width,ct=Oe.height;if(G.tagName!=="svg")if(G.getBBox){q.getAttribute("transform")!=null&&q.setAttribute("transform",q.getAttribute("transform").replace(/translate\(.*?\)/,""));var Tt=document.createElementNS("http://www.w3.org/2000/svg","svg");Tt.appendChild(q),q=Tt}else{console.error("Attempted to render non-SVG element",G);return}if(q.setAttribute("version","1.1"),q.setAttribute("viewBox",[De,B,We,ct].join(" ")),q.getAttribute("xmlns")||q.setAttributeNS(i,"xmlns",t),q.getAttribute("xmlns:xlink")||q.setAttributeNS(i,"xmlns:xlink","http://www.w3.org/1999/xlink"),Ke?(q.removeAttribute("width"),q.removeAttribute("height"),q.setAttribute("preserveAspectRatio","xMinYMin meet")):(q.setAttribute("width",We*ke),q.setAttribute("height",ct*ke)),Array.from(q.querySelectorAll("foreignObject > *")).forEach(function(_o){_o.setAttributeNS(i,"xmlns",_o.tagName==="svg"?t:e)}),ye){var Xn=document.createElement("div");Xn.appendChild(q);var Io=Xn.innerHTML;if(typeof ue=="function")ue(Io,We,ct);else return{src:Io,width:We,height:ct}}else return re(G,$).then(function(_o){var Br=document.createElement("style");Br.setAttribute("type","text/css"),Br.innerHTML=``;var Rn=document.createElement("defs");Rn.appendChild(Br),q.insertBefore(Rn,q.firstChild);var zd=document.createElement("div");zd.appendChild(q);var Ru=zd.innerHTML.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');if(typeof ue=="function")ue(Ru,We,ct);else return{src:Ru,width:We,height:ct}})})},n.svgAsDataUri=function(G,$,ue){return p(G),n.prepareSvg(G,$).then(function(be){var me=be.src,De=be.width,he=be.height,B="data:image/svg+xml;base64,"+window.btoa(M(o+me));return typeof ue=="function"&&ue(B,De,he),B})},n.svgAsPngUri=function(G,$,ue){p(G);var be=$||{},me=be.encoderType,De=me===void 0?"image/png":me,he=be.encoderOptions,B=he===void 0?.8:he,X=be.canvg,se=function(ke){var ze=ke.src,Ke=ke.width,Qe=ke.height,ye=document.createElement("canvas"),q=ye.getContext("2d"),Oe=window.devicePixelRatio||1;ye.width=Ke*Oe,ye.height=Qe*Oe,ye.style.width=ye.width+"px",ye.style.height=ye.height+"px",q.setTransform(Oe,0,0,Oe,0,0),X?X(ye,ze):q.drawImage(ze,0,0);var We=void 0;try{We=ye.toDataURL(De,B)}catch(ct){if(typeof SecurityError<"u"&&ct instanceof SecurityError||ct.name==="SecurityError"){console.error("Rendered SVG images cannot be downloaded in this browser.");return}else throw ct}return typeof ue=="function"&&ue(We,ye.width,ye.height),Promise.resolve(We)};return X?n.prepareSvg(G,$).then(se):n.svgAsDataUri(G,$).then(function(ce){return new Promise(function(ke,ze){var Ke=new Image;Ke.onload=function(){return ke(se({src:Ke,width:Ke.width,height:Ke.height}))},Ke.onerror=function(){ze(`There was an error loading the data URI as an image on the following SVG +`+window.atob(ce.slice(26))+`Open the following link to see browser's diagnosis +`+ce)},Ke.src=ce})})},n.download=function(G,$,ue){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(w($),G);else{var be=document.createElement("a");if("download"in be){be.download=G,be.style.display="none",document.body.appendChild(be);try{var me=w($),De=URL.createObjectURL(me);be.href=De,be.onclick=function(){return requestAnimationFrame(function(){return URL.revokeObjectURL(De)})}}catch(he){console.error(he),console.warn("Error while getting object URL. Falling back to string URL."),be.href=$}be.click(),document.body.removeChild(be)}else ue&&ue.popup&&(ue.popup.document.title=G,ue.popup.location.replace($))}},n.saveSvg=function(G,$,ue){var be=oe();return u(G).then(function(me){return n.svgAsDataUri(me,ue||{})}).then(function(me){return n.download($,me,be)})},n.saveSvgAsPng=function(G,$,ue){var be=oe();return u(G).then(function(me){return n.svgAsPngUri(me,ue||{})}).then(function(me){return n.download($,me,be)})}})()});var eO=Cs((T2,JA)=>{(function(n,i){if(typeof T2=="object"&&typeof JA=="object")JA.exports=i();else if(typeof define=="function"&&define.amd)define([],i);else{var e=i();for(var t in e)(typeof T2=="object"?T2:n)[t]=e[t]}})(globalThis,()=>(()=>{"use strict";var n={4567:function(o,r,a){var c=this&&this.__decorate||function(w,y,E,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,E):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,E,I);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(y,E,P):D(y,E))||P);return N>3&&P&&Object.defineProperty(y,E,P),P},p=this&&this.__param||function(w,y){return function(E,I){y(E,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;let u=a(9042),h=a(9924),_=a(844),S=a(4725),x=a(2585),b=a(3656),M=r.AccessibilityManager=class extends _.Disposable{constructor(w,y,E,I){super(),this._terminal=w,this._coreBrowserService=E,this._renderService=I,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let D=0;Dthis._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new h.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(D=>this._handleResize(D.rows))),this.register(this._terminal.onRender(D=>this._refreshRows(D.start,D.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(D=>this._handleChar(D))),this.register(this._terminal.onLineFeed(()=>this._handleChar(` +`))),this.register(this._terminal.onA11yTab(D=>this._handleTab(D))),this.register(this._terminal.onKey(D=>this._handleKey(D.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,b.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,_.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(w){for(let y=0;y0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===` +`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(w){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(w)||this._charsToConsume.push(w)}_refreshRows(w,y){this._liveRegionDebouncer.refresh(w,y,this._terminal.rows)}_renderRows(w,y){let E=this._terminal.buffer,I=E.lines.length.toString();for(let D=w;D<=y;D++){let N=E.lines.get(E.ydisp+D),P=[],L=N?.translateToString(!0,void 0,void 0,P)||"",re=(E.ydisp+D+1).toString(),oe=this._rowElements[D];oe&&(L.length===0?(oe.innerText="\xA0",this._rowColumns.set(oe,[0,1])):(oe.textContent=L,this._rowColumns.set(oe,P)),oe.setAttribute("aria-posinset",re),oe.setAttribute("aria-setsize",I))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(w,y){let E=w.target,I=this._rowElements[y===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||w.relatedTarget!==I)return;let D,N;if(y===0?(D=E,N=this._rowElements.pop(),this._rowContainer.removeChild(N)):(D=this._rowElements.shift(),N=E,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),N.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){let P=this._createAccessibilityTreeNode();this._rowElements.unshift(P),this._rowContainer.insertAdjacentElement("afterbegin",P)}else{let P=this._createAccessibilityTreeNode();this._rowElements.push(P),this._rowContainer.appendChild(P)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let w=document.getSelection();if(!w)return;if(w.isCollapsed)return void(this._rowContainer.contains(w.anchorNode)&&this._terminal.clearSelection());if(!w.anchorNode||!w.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:w.anchorNode,offset:w.anchorOffset},E={node:w.focusNode,offset:w.focusOffset};if((y.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===E.node&&y.offset>E.offset)&&([y,E]=[E,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;let I=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(I)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:I,offset:I.textContent?.length??0}),!this._rowContainer.contains(E.node))return;let D=({node:L,offset:re})=>{let oe=L instanceof Text?L.parentNode:L,G=parseInt(oe?.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;let $=this._rowColumns.get(oe);if(!$)return console.warn("columns is null. Race condition?"),null;let ue=re<$.length?$[re]:$.slice(-1)[0]+1;return ue>=this._terminal.cols&&(++G,ue=0),{row:G,column:ue}},N=D(y),P=D(E);if(N&&P){if(N.row>P.row||N.row===P.row&&N.column>=P.column)throw new Error("invalid range");this._terminal.select(N.column,N.row,(P.row-N.row)*this._terminal.cols-N.column+P.column)}}_handleResize(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yw;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let w=this._coreBrowserService.mainDocument.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let w=0;w{function a(h){return h.replace(/\r?\n/g,"\r")}function c(h,_){return _?"\x1B[200~"+h+"\x1B[201~":h}function p(h,_,S,x){h=c(h=a(h),S.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(h,!0),_.value=""}function u(h,_,S){let x=S.getBoundingClientRect(),b=h.clientX-x.left-10,M=h.clientY-x.top-10;_.style.width="20px",_.style.height="20px",_.style.left=`${b}px`,_.style.top=`${M}px`,_.style.zIndex="1000",_.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=a,r.bracketTextForPaste=c,r.copyHandler=function(h,_){h.clipboardData&&h.clipboardData.setData("text/plain",_.selectionText),h.preventDefault()},r.handlePasteEvent=function(h,_,S,x){h.stopPropagation(),h.clipboardData&&p(h.clipboardData.getData("text/plain"),_,S,x)},r.paste=p,r.moveTextAreaUnderMouseCursor=u,r.rightClickHandler=function(h,_,S,x,b){u(h,_,S),b&&x.rightClickSelect(h),_.value=x.selectionText,_.select()}},7239:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;let c=a(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(p,u,h){this._css.set(p,u,h)}getCss(p,u){return this._css.get(p,u)}setColor(p,u,h){this._color.set(p,u,h)}getColor(p,u){return this._color.get(p,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(a,c,p,u){a.addEventListener(c,p,u);let h=!1;return{dispose:()=>{h||(h=!0,a.removeEventListener(c,p,u))}}}},3551:function(o,r,a){var c=this&&this.__decorate||function(M,w,y,E){var I,D=arguments.length,N=D<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,y):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,y,E);else for(var P=M.length-1;P>=0;P--)(I=M[P])&&(N=(D<3?I(N):D>3?I(w,y,N):I(w,y))||N);return D>3&&N&&Object.defineProperty(w,y,N),N},p=this&&this.__param||function(M,w){return function(y,E){w(y,E,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;let u=a(3656),h=a(8460),_=a(844),S=a(2585),x=a(4725),b=r.Linkifier=class extends _.Disposable{get currentLink(){return this._currentLink}constructor(M,w,y,E,I){super(),this._element=M,this._mouseService=w,this._renderService=y,this._bufferService=E,this._linkProviderService=I,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new h.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new h.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,_.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,_.toDisposable)(()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(M){this._lastMouseEvent=M;let w=this._positionFromMouseEvent(M,this._element,this._mouseService);if(!w)return;this._isMouseOut=!1;let y=M.composedPath();for(let E=0;E{E?.forEach(I=>{I.link.dispose&&I.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=M.y);let y=!1;for(let[E,I]of this._linkProviderService.linkProviders.entries())w?this._activeProviderReplies?.get(E)&&(y=this._checkLinkProviderResult(E,M,y)):I.provideLinks(M.y,D=>{if(this._isMouseOut)return;let N=D?.map(P=>({link:P}));this._activeProviderReplies?.set(E,N),y=this._checkLinkProviderResult(E,M,y),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(M.y,this._activeProviderReplies)})}_removeIntersectingLinks(M,w){let y=new Set;for(let E=0;EM?this._bufferService.cols:N.link.range.end.x;for(let re=P;re<=L;re++){if(y.has(re)){I.splice(D--,1);break}y.add(re)}}}}_checkLinkProviderResult(M,w,y){if(!this._activeProviderReplies)return y;let E=this._activeProviderReplies.get(M),I=!1;for(let D=0;Dthis._linkAtPosition(N.link,w));D&&(y=!0,this._handleNewLink(D))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let D=0;Dthis._linkAtPosition(P.link,w));if(N){y=!0,this._handleNewLink(N);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(M){if(!this._currentLink)return;let w=this._positionFromMouseEvent(M,this._element,this._mouseService);w&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(M,this._currentLink.link.text)}_clearCurrentLink(M,w){this._currentLink&&this._lastMouseEvent&&(!M||!w||this._currentLink.link.range.start.y>=M&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,_.disposeArray)(this._linkCacheDisposables))}_handleNewLink(M){if(!this._lastMouseEvent)return;let w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._linkAtPosition(M.link,w)&&(this._currentLink=M,this._currentLink.state={decorations:{underline:M.link.decorations===void 0||M.link.decorations.underline,pointerCursor:M.link.decorations===void 0||M.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,M.link,this._lastMouseEvent),M.link.decorations={},Object.defineProperties(M.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:y=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:y=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(M.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(y=>{if(!this._currentLink)return;let E=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,I=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=I&&(this._clearCurrentLink(E,I),this._lastMouseEvent)){let D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}})))}_linkHover(M,w,y){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&M.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(y,w.text)}_fireUnderlineEvent(M,w){let y=M.range,E=this._bufferService.buffer.ydisp,I=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-E-1,y.end.x,y.end.y-E-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(I)}_linkLeave(M,w,y){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&M.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(y,w.text)}_linkAtPosition(M,w){let y=M.range.start.y*this._bufferService.cols+M.range.start.x,E=M.range.end.y*this._bufferService.cols+M.range.end.x,I=w.y*this._bufferService.cols+w.x;return y<=I&&I<=E}_positionFromMouseEvent(M,w,y){let E=y.getCoords(M,w,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(M,w,y,E,I){return{x1:M,y1:w,x2:y,y2:E,cols:this._bufferService.cols,fg:I}}};r.Linkifier=b=c([p(1,x.IMouseService),p(2,x.IRenderService),p(3,S.IBufferService),p(4,x.ILinkProviderService)],b)},9042:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(o,r,a){var c=this&&this.__decorate||function(x,b,M,w){var y,E=arguments.length,I=E<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(x,b,M,w);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(I=(E<3?y(I):E>3?y(b,M,I):y(b,M))||I);return E>3&&I&&Object.defineProperty(b,M,I),I},p=this&&this.__param||function(x,b){return function(M,w){b(M,w,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;let u=a(511),h=a(2585),_=r.OscLinkProvider=class{constructor(x,b,M){this._bufferService=x,this._optionsService=b,this._oscLinkService=M}provideLinks(x,b){let M=this._bufferService.buffer.lines.get(x-1);if(!M)return void b(void 0);let w=[],y=this._optionsService.rawOptions.linkHandler,E=new u.CellData,I=M.getTrimmedLength(),D=-1,N=-1,P=!1;for(let L=0;Ly?y.activate($,ue,oe):S(0,ue),hover:($,ue)=>y?.hover?.($,ue,oe),leave:($,ue)=>y?.leave?.($,ue,oe)})}P=!1,E.hasExtendedAttrs()&&E.extended.urlId?(N=L,D=E.extended.urlId):(N=-1,D=-1)}}b(w)}};function S(x,b){if(confirm(`Do you want to navigate to ${b}? -WARNING: This link could potentially be dangerous`)){let M=window.open();if(M){try{M.opener=null}catch{}M.location.href=C}else console.warn("Opening link blocked as opener could not be cleared")}}r.OscLinkProvider=g=c([m(0,h.IBufferService),m(1,h.IOptionsService),m(2,h.IOscLinkService)],g)},6193:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderDebouncer=void 0,r.RenderDebouncer=class{constructor(a,c){this._renderCallback=a,this._coreBrowserService=c,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(a){return this._refreshCallbacks.push(a),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(a,c,m){this._rowCount=m,a=a!==void 0?a:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();let a=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,c),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let a of this._refreshCallbacks)a(0);this._refreshCallbacks=[]}}},3236:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Terminal=void 0;let c=a(3614),m=a(3656),u=a(3551),h=a(9042),g=a(3730),S=a(1680),x=a(3107),C=a(5744),M=a(2950),w=a(1296),y=a(428),k=a(4269),I=a(5114),D=a(8934),N=a(3230),P=a(9312),F=a(4725),re=a(6731),ne=a(8055),G=a(8969),j=a(8460),pe=a(844),be=a(6114),me=a(8437),Ee=a(2584),ue=a(7399),V=a(5941),K=a(9074),ae=a(2585),se=a(5435),Me=a(4567),Le=a(779);class Ke extends G.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(xe={}){super(xe),this.browser=be,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new pe.MutableDisposable),this._onCursorMove=this.register(new j.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new j.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new j.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new j.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new j.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new j.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new j.EventEmitter),this._onBlur=this.register(new j.EventEmitter),this._onA11yCharEmitter=this.register(new j.EventEmitter),this._onA11yTabEmitter=this.register(new j.EventEmitter),this._onWillOpen=this.register(new j.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(K.DecorationService),this._instantiationService.setService(ae.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Le.LinkProviderService),this._instantiationService.setService(F.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(g.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((Q,Ae)=>this.refresh(Q,Ae))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(Q=>this._reportWindowsOptions(Q))),this.register(this._inputHandler.onColor(Q=>this._handleColorEvent(Q))),this.register((0,j.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,j.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,j.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,j.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(Q=>this._afterResize(Q.cols,Q.rows))),this.register((0,pe.toDisposable)(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}_handleColorEvent(xe){if(this._themeService)for(let Q of xe){let Ae,qe="";switch(Q.index){case 256:Ae="foreground",qe="10";break;case 257:Ae="background",qe="11";break;case 258:Ae="cursor",qe="12";break;default:Ae="ansi",qe="4;"+Q.index}switch(Q.type){case 0:let ct=ne.color.toColorRGB(Ae==="ansi"?this._themeService.colors.ansi[Q.index]:this._themeService.colors[Ae]);this.coreService.triggerDataEvent(`${Ee.C0.ESC}]${qe};${(0,V.toRgbString)(ct)}${Ee.C1_ESCAPED.ST}`);break;case 1:if(Ae==="ansi")this._themeService.modifyColors(Et=>Et.ansi[Q.index]=ne.channels.toColor(...Q.color));else{let Et=Ae;this._themeService.modifyColors(Yn=>Yn[Et]=ne.channels.toColor(...Q.color))}break;case 2:this._themeService.restoreColor(Q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(xe){xe?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Me.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(xe){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Ee.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Ee.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let xe=this.buffer.ybase+this.buffer.y,Q=this.buffer.lines.get(xe);if(!Q)return;let Ae=Math.min(this.buffer.x,this.cols-1),qe=this._renderService.dimensions.css.cell.height,ct=Q.getWidth(Ae),Et=this._renderService.dimensions.css.cell.width*ct,Yn=this.buffer.y*this._renderService.dimensions.css.cell.height,No=Ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=No+"px",this.textarea.style.top=Yn+"px",this.textarea.style.width=Et+"px",this.textarea.style.height=qe+"px",this.textarea.style.lineHeight=qe+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",Q=>{this.hasSelection()&&(0,c.copyHandler)(Q,this._selectionService)}));let xe=Q=>(0,c.handlePasteEvent)(Q,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",xe)),this.register((0,m.addDisposableDomListener)(this.element,"paste",xe)),be.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",Q=>{Q.button===2&&(0,c.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",Q=>{(0,c.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),be.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",Q=>{Q.button===1&&(0,c.moveTextAreaUnderMouseCursor)(Q,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",xe=>this._keyUp(xe),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",xe=>this._keyDown(xe),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",xe=>this._keyPress(xe),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",xe=>this._compositionHelper.compositionupdate(xe))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,m.addDisposableDomListener)(this.textarea,"input",xe=>this._inputEvent(xe),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(xe){if(!xe)throw new Error("Terminal requires a parent element.");if(xe.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=xe.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),xe.appendChild(this.element);let Q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,m.addDisposableDomListener)(this.screenElement,"mousemove",Ae=>this.updateCursorStyle(Ae))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",h.promptLabel),be.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(I.CoreBrowserService,this.textarea,xe.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(F.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",Ae=>this._handleTextAreaFocus(Ae))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(F.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(re.ThemeService),this._instantiationService.setService(F.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(k.CharacterJoinerService),this._instantiationService.setService(F.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(N.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(F.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(Ae=>this._onRender.fire(Ae))),this.onResize(Ae=>this._renderService.resize(Ae.cols,Ae.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(M.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(F.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(Q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(Ae=>this.scrollLines(Ae.amount,Ae.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(P.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(F.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(Ae=>this.scrollLines(Ae.amount,Ae.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(Ae=>this._renderService.handleSelectionChanged(Ae.start,Ae.end,Ae.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(Ae=>{this.textarea.value=Ae,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(Ae=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",Ae=>this._selectionService.handleMouseDown(Ae))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(Me.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",Ae=>this._handleScreenReaderModeOptionChange(Ae))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(C.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",Ae=>{!this._overviewRulerRenderer&&Ae&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(C.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(w.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let xe=this,Q=this.element;function Ae(Et){let Yn=xe._mouseService.getMouseReportCoords(Et,xe.screenElement);if(!Yn)return!1;let No,xo;switch(Et.overrideType||Et.type){case"mousemove":xo=32,Et.buttons===void 0?(No=3,Et.button!==void 0&&(No=Et.button<3?Et.button:3)):No=1&Et.buttons?0:4&Et.buttons?1:2&Et.buttons?2:3;break;case"mouseup":xo=0,No=Et.button<3?Et.button:3;break;case"mousedown":xo=1,No=Et.button<3?Et.button:3;break;case"wheel":if(xe._customWheelEventHandler&&xe._customWheelEventHandler(Et)===!1||xe.viewport.getLinesScrolled(Et)===0)return!1;xo=Et.deltaY<0?0:1,No=4;break;default:return!1}return!(xo===void 0||No===void 0||No>4)&&xe.coreMouseService.triggerMouseEvent({col:Yn.col,row:Yn.row,x:Yn.x,y:Yn.y,button:No,action:xo,ctrl:Et.ctrlKey,alt:Et.altKey,shift:Et.shiftKey})}let qe={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ct={mouseup:Et=>(Ae(Et),Et.buttons||(this._document.removeEventListener("mouseup",qe.mouseup),qe.mousedrag&&this._document.removeEventListener("mousemove",qe.mousedrag)),this.cancel(Et)),wheel:Et=>(Ae(Et),this.cancel(Et,!0)),mousedrag:Et=>{Et.buttons&&Ae(Et)},mousemove:Et=>{Et.buttons||Ae(Et)}};this.register(this.coreMouseService.onProtocolChange(Et=>{Et?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Et)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&Et?qe.mousemove||(Q.addEventListener("mousemove",ct.mousemove),qe.mousemove=ct.mousemove):(Q.removeEventListener("mousemove",qe.mousemove),qe.mousemove=null),16&Et?qe.wheel||(Q.addEventListener("wheel",ct.wheel,{passive:!1}),qe.wheel=ct.wheel):(Q.removeEventListener("wheel",qe.wheel),qe.wheel=null),2&Et?qe.mouseup||(qe.mouseup=ct.mouseup):(this._document.removeEventListener("mouseup",qe.mouseup),qe.mouseup=null),4&Et?qe.mousedrag||(qe.mousedrag=ct.mousedrag):(this._document.removeEventListener("mousemove",qe.mousedrag),qe.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(Q,"mousedown",Et=>{if(Et.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Et))return Ae(Et),qe.mouseup&&this._document.addEventListener("mouseup",qe.mouseup),qe.mousedrag&&this._document.addEventListener("mousemove",qe.mousedrag),this.cancel(Et)})),this.register((0,m.addDisposableDomListener)(Q,"wheel",Et=>{if(!qe.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Et)===!1)return!1;if(!this.buffer.hasScrollback){let Yn=this.viewport.getLinesScrolled(Et);if(Yn===0)return;let No=Ee.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Et.deltaY<0?"A":"B"),xo="";for(let Hr=0;Hr{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Et),this.cancel(Et)},{passive:!0})),this.register((0,m.addDisposableDomListener)(Q,"touchmove",Et=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Et)?void 0:this.cancel(Et)},{passive:!1}))}refresh(xe,Q){this._renderService?.refreshRows(xe,Q)}updateCursorStyle(xe){this._selectionService?.shouldColumnSelect(xe)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(xe,Q,Ae=0){Ae===1?(super.scrollLines(xe,Q,Ae),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(xe)}paste(xe){(0,c.paste)(xe,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(xe){this._customKeyEventHandler=xe}attachCustomWheelEventHandler(xe){this._customWheelEventHandler=xe}registerLinkProvider(xe){return this._linkProviderService.registerLinkProvider(xe)}registerCharacterJoiner(xe){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let Q=this._characterJoinerService.register(xe);return this.refresh(0,this.rows-1),Q}deregisterCharacterJoiner(xe){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(xe)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(xe){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+xe)}registerDecoration(xe){return this._decorationService.registerDecoration(xe)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(xe,Q,Ae){this._selectionService.setSelection(xe,Q,Ae)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(xe,Q){this._selectionService?.selectLines(xe,Q)}_keyDown(xe){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(xe)===!1)return!1;let Q=this.browser.isMac&&this.options.macOptionIsMeta&&xe.altKey;if(!Q&&!this._compositionHelper.keydown(xe))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;Q||xe.key!=="Dead"&&xe.key!=="AltGraph"||(this._unprocessedDeadKey=!0);let Ae=(0,ue.evaluateKeyboardEvent)(xe,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(xe),Ae.type===3||Ae.type===2){let qe=this.rows-1;return this.scrollLines(Ae.type===2?-qe:qe),this.cancel(xe,!0)}return Ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,xe)||(Ae.cancel&&this.cancel(xe,!0),!Ae.key||!!(xe.key&&!xe.ctrlKey&&!xe.altKey&&!xe.metaKey&&xe.key.length===1&&xe.key.charCodeAt(0)>=65&&xe.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(Ae.key!==Ee.C0.ETX&&Ae.key!==Ee.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Ae.key,domEvent:xe}),this._showCursor(),this.coreService.triggerDataEvent(Ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||xe.altKey||xe.ctrlKey?this.cancel(xe,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(xe,Q){let Ae=xe.isMac&&!this.options.macOptionIsMeta&&Q.altKey&&!Q.ctrlKey&&!Q.metaKey||xe.isWindows&&Q.altKey&&Q.ctrlKey&&!Q.metaKey||xe.isWindows&&Q.getModifierState("AltGraph");return Q.type==="keypress"?Ae:Ae&&(!Q.keyCode||Q.keyCode>47)}_keyUp(xe){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(xe)===!1||((function(Q){return Q.keyCode===16||Q.keyCode===17||Q.keyCode===18})(xe)||this.focus(),this.updateCursorStyle(xe),this._keyPressHandled=!1)}_keyPress(xe){let Q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(xe)===!1)return!1;if(this.cancel(xe),xe.charCode)Q=xe.charCode;else if(xe.which===null||xe.which===void 0)Q=xe.keyCode;else{if(xe.which===0||xe.charCode===0)return!1;Q=xe.which}return!(!Q||(xe.altKey||xe.ctrlKey||xe.metaKey)&&!this._isThirdLevelShift(this.browser,xe)||(Q=String.fromCharCode(Q),this._onKey.fire({key:Q,domEvent:xe}),this._showCursor(),this.coreService.triggerDataEvent(Q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(xe){if(xe.data&&xe.inputType==="insertText"&&(!xe.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let Q=xe.data;return this.coreService.triggerDataEvent(Q,!0),this.cancel(xe),!0}return!1}resize(xe,Q){xe!==this.cols||Q!==this.rows?super.resize(xe,Q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(xe,Q){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let xe=1;xe{Object.defineProperty(r,"__esModule",{value:!0}),r.TimeBasedDebouncer=void 0,r.TimeBasedDebouncer=class{constructor(a,c=1e3){this._renderCallback=a,this._debounceThresholdMS=c,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(a,c,m){this._rowCount=m,a=a!==void 0?a:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c;let u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){let h=u-this._lastRefreshMs,g=this._debounceThresholdMS-h;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},g)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let a=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,c)}}},1680:function(o,r,a){var c=this&&this.__decorate||function(M,w,y,k){var I,D=arguments.length,N=D<3?w:k===null?k=Object.getOwnPropertyDescriptor(w,y):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,y,k);else for(var P=M.length-1;P>=0;P--)(I=M[P])&&(N=(D<3?I(N):D>3?I(w,y,N):I(w,y))||N);return D>3&&N&&Object.defineProperty(w,y,N),N},m=this&&this.__param||function(M,w){return function(y,k){w(y,k,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Viewport=void 0;let u=a(3656),h=a(4725),g=a(8460),S=a(844),x=a(2585),C=r.Viewport=class extends S.Disposable{constructor(M,w,y,k,I,D,N,P){super(),this._viewportElement=M,this._scrollArea=w,this._bufferService=y,this._optionsService=k,this._charSizeService=I,this._renderService=D,this._coreBrowserService=N,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(F=>this._activeBuffer=F.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(F=>this._renderDimensions=F)),this._handleThemeChange(P.colors),this.register(P.onChangeColors(F=>this._handleThemeChange(F))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(M){this._viewportElement.style.backgroundColor=M.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(M){if(M)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;let w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}let M=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==M&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=M),this._refreshAnimationFrame=null}syncScrollArea(M=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(M);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(M)}_handleScroll(M){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});let w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:w,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;let M=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(M*(this._smoothScrollState.target-this._smoothScrollState.origin)),M<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(M,w){let y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&y0&&(y=ne),k=""}}return{bufferElements:I,cursorElement:y}}getLinesScrolled(M){if(M.deltaY===0||M.shiftKey)return 0;let w=this._applyScrollModifier(M.deltaY,M);return M.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):M.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w}_applyScrollModifier(M,w){let y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&w.altKey||y==="ctrl"&&w.ctrlKey||y==="shift"&&w.shiftKey?M*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:M*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(M){this._lastTouchY=M.touches[0].pageY}handleTouchMove(M){let w=this._lastTouchY-M.touches[0].pageY;return this._lastTouchY=M.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(M,w))}};r.Viewport=C=c([m(2,x.IBufferService),m(3,x.IOptionsService),m(4,h.ICharSizeService),m(5,h.IRenderService),m(6,h.ICoreBrowserService),m(7,h.IThemeService)],C)},3107:function(o,r,a){var c=this&&this.__decorate||function(x,C,M,w){var y,k=arguments.length,I=k<3?C:w===null?w=Object.getOwnPropertyDescriptor(C,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(x,C,M,w);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(I=(k<3?y(I):k>3?y(C,M,I):y(C,M))||I);return k>3&&I&&Object.defineProperty(C,M,I),I},m=this&&this.__param||function(x,C){return function(M,w){C(M,w,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferDecorationRenderer=void 0;let u=a(4725),h=a(844),g=a(2585),S=r.BufferDecorationRenderer=class extends h.Disposable{constructor(x,C,M,w,y){super(),this._screenElement=x,this._bufferService=C,this._coreBrowserService=M,this._decorationService=w,this._renderService=y,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(k=>this._removeDecoration(k))),this.register((0,h.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){let C=this._coreBrowserService.mainDocument.createElement("div");C.classList.add("xterm-decoration"),C.classList.toggle("xterm-decoration-top-layer",x?.options?.layer==="top"),C.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,C.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",C.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",C.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let M=x.options.x??0;return M&&M>this._bufferService.cols&&(C.style.display="none"),this._refreshXPosition(x,C),C}_refreshStyle(x){let C=x.marker.line-this._bufferService.buffers.active.ydisp;if(C<0||C>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let M=this._decorationElements.get(x);M||(M=this._createElement(x),x.element=M,this._decorationElements.set(x,M),this._container.appendChild(M),x.onDispose(()=>{this._decorationElements.delete(x),M.remove()})),M.style.top=C*this._renderService.dimensions.css.cell.height+"px",M.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(M)}}_refreshXPosition(x,C=x.element){if(!C)return;let M=x.options.x??0;(x.options.anchor||"left")==="right"?C.style.right=M?M*this._renderService.dimensions.css.cell.width+"px":"":C.style.left=M?M*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){this._decorationElements.get(x)?.remove(),this._decorationElements.delete(x),x.dispose()}};r.BufferDecorationRenderer=S=c([m(1,g.IBufferService),m(2,u.ICoreBrowserService),m(3,g.IDecorationService),m(4,u.IRenderService)],S)},5871:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorZoneStore=void 0,r.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(a){if(a.options.overviewRulerOptions){for(let c of this._zones)if(c.color===a.options.overviewRulerOptions.color&&c.position===a.options.overviewRulerOptions.position){if(this._lineIntersectsZone(c,a.marker.line))return;if(this._lineAdjacentToZone(c,a.marker.line,a.options.overviewRulerOptions.position))return void this._addLineToZone(c,a.marker.line)}if(this._zonePoolIndex=a.startBufferLine&&c<=a.endBufferLine}_lineAdjacentToZone(a,c,m){return c>=a.startBufferLine-this._linePadding[m||"full"]&&c<=a.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(a,c){a.startBufferLine=Math.min(a.startBufferLine,c),a.endBufferLine=Math.max(a.endBufferLine,c)}}},5744:function(o,r,a){var c=this&&this.__decorate||function(y,k,I,D){var N,P=arguments.length,F=P<3?k:D===null?D=Object.getOwnPropertyDescriptor(k,I):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(y,k,I,D);else for(var re=y.length-1;re>=0;re--)(N=y[re])&&(F=(P<3?N(F):P>3?N(k,I,F):N(k,I))||F);return P>3&&F&&Object.defineProperty(k,I,F),F},m=this&&this.__param||function(y,k){return function(I,D){k(I,D,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OverviewRulerRenderer=void 0;let u=a(5871),h=a(4725),g=a(844),S=a(2585),x={full:0,left:0,center:0,right:0},C={full:0,left:0,center:0,right:0},M={full:0,left:0,center:0,right:0},w=r.OverviewRulerRenderer=class extends g.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,k,I,D,N,P,F){super(),this._viewportElement=y,this._screenElement=k,this._bufferService=I,this._decorationService=D,this._renderService=N,this._optionsService=P,this._coreBrowserService=F,this._colorZoneStore=new u.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);let re=this._canvas.getContext("2d");if(!re)throw new Error("Ctx cannot be null");this._ctx=re,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,g.toDisposable)(()=>{this._canvas?.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){let y=Math.floor(this._canvas.width/3),k=Math.ceil(this._canvas.width/3);C.full=this._canvas.width,C.left=y,C.center=k,C.right=y,this._refreshDrawHeightConstants(),M.full=0,M.left=0,M.center=C.left,M.right=C.left+C.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);let y=this._canvas.height/this._bufferService.buffer.lines.length,k=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);x.left=k,x.center=k,x.right=k}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let k of this._decorationService.decorations)this._colorZoneStore.addDecoration(k);this._ctx.lineWidth=1;let y=this._colorZoneStore.zones;for(let k of y)k.position!=="full"&&this._renderColorZone(k);for(let k of y)k.position==="full"&&this._renderColorZone(k);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(M[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-x[y.position||"full"]/2),C[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[y.position||"full"]))}_queueRefresh(y,k){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=k||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};r.OverviewRulerRenderer=w=c([m(2,S.IBufferService),m(3,S.IDecorationService),m(4,h.IRenderService),m(5,S.IOptionsService),m(6,h.ICoreBrowserService)],w)},2950:function(o,r,a){var c=this&&this.__decorate||function(x,C,M,w){var y,k=arguments.length,I=k<3?C:w===null?w=Object.getOwnPropertyDescriptor(C,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(x,C,M,w);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(I=(k<3?y(I):k>3?y(C,M,I):y(C,M))||I);return k>3&&I&&Object.defineProperty(C,M,I),I},m=this&&this.__param||function(x,C){return function(M,w){C(M,w,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CompositionHelper=void 0;let u=a(4725),h=a(2585),g=a(2584),S=r.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,C,M,w,y,k){this._textarea=x,this._compositionView=C,this._bufferService=M,this._optionsService=w,this._coreService=y,this._renderService=k,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){let C={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let M;this._isSendingComposition=!1,C.start+=this._dataAlreadySent.length,M=this._isComposing?this._textarea.value.substring(C.start,C.end):this._textarea.value.substring(C.start),M.length>0&&this._coreService.triggerDataEvent(M,!0)}},0)}else{this._isSendingComposition=!1;let C=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(C,!0)}}_handleAnyTextareaChanges(){let x=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let C=this._textarea.value,M=C.replace(x,"");this._dataAlreadySent=M,C.length>x.length?this._coreService.triggerDataEvent(M,!0):C.lengththis.updateCompositionElements(!0),0)}}};r.CompositionHelper=S=c([m(2,h.IBufferService),m(3,h.IOptionsService),m(4,h.ICoreService),m(5,u.IRenderService)],S)},9806:(o,r)=>{function a(c,m,u){let h=u.getBoundingClientRect(),g=c.getComputedStyle(u),S=parseInt(g.getPropertyValue("padding-left")),x=parseInt(g.getPropertyValue("padding-top"));return[m.clientX-h.left-S,m.clientY-h.top-x]}Object.defineProperty(r,"__esModule",{value:!0}),r.getCoords=r.getCoordsRelativeToElement=void 0,r.getCoordsRelativeToElement=a,r.getCoords=function(c,m,u,h,g,S,x,C,M){if(!S)return;let w=a(c,m,u);return w?(w[0]=Math.ceil((w[0]+(M?x/2:0))/x),w[1]=Math.ceil(w[1]/C),w[0]=Math.min(Math.max(w[0],1),h+(M?1:0)),w[1]=Math.min(Math.max(w[1],1),g),w):void 0}},9504:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.moveToCellSequence=void 0;let c=a(2584);function m(C,M,w,y){let k=C-u(C,w),I=M-u(M,w),D=Math.abs(k-I)-(function(N,P,F){let re=0,ne=N-u(N,F),G=P-u(P,F);for(let j=0;j=0&&CM?"A":"B"}function g(C,M,w,y,k,I){let D=C,N=M,P="";for(;D!==w||N!==y;)D+=k?1:-1,k&&D>I.cols-1?(P+=I.buffer.translateBufferLineToString(N,!1,C,D),D=0,C=0,N++):!k&&D<0&&(P+=I.buffer.translateBufferLineToString(N,!1,0,C+1),D=I.cols-1,C=D,N--);return P+I.buffer.translateBufferLineToString(N,!1,C,D)}function S(C,M){let w=M?"O":"[";return c.C0.ESC+w+C}function x(C,M){C=Math.floor(C);let w="";for(let y=0;y0?ne-u(ne,G):F;let be=ne,me=(function(Ee,ue,V,K,ae,se){let Me;return Me=m(V,K,ae,se).length>0?K-u(K,ae):ue,Ee=V&&MeC?"D":"C",x(Math.abs(k-C),S(D,y));D=I>M?"D":"C";let N=Math.abs(I-M);return x((function(P,F){return F.cols-P})(I>M?C:k,w)+(N-1)*w.cols+1+((I>M?k:C)-1),S(D,y))}},1296:function(o,r,a){var c=this&&this.__decorate||function(j,pe,be,me){var Ee,ue=arguments.length,V=ue<3?pe:me===null?me=Object.getOwnPropertyDescriptor(pe,be):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(j,pe,be,me);else for(var K=j.length-1;K>=0;K--)(Ee=j[K])&&(V=(ue<3?Ee(V):ue>3?Ee(pe,be,V):Ee(pe,be))||V);return ue>3&&V&&Object.defineProperty(pe,be,V),V},m=this&&this.__param||function(j,pe){return function(be,me){pe(be,me,j)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRenderer=void 0;let u=a(3787),h=a(2550),g=a(2223),S=a(6171),x=a(6052),C=a(4725),M=a(8055),w=a(8460),y=a(844),k=a(2585),I="xterm-dom-renderer-owner-",D="xterm-rows",N="xterm-fg-",P="xterm-bg-",F="xterm-focus",re="xterm-selection",ne=1,G=r.DomRenderer=class extends y.Disposable{constructor(j,pe,be,me,Ee,ue,V,K,ae,se,Me,Le,Ke){super(),this._terminal=j,this._document=pe,this._element=be,this._screenElement=me,this._viewportElement=Ee,this._helperContainer=ue,this._linkifier2=V,this._charSizeService=ae,this._optionsService=se,this._bufferService=Me,this._coreBrowserService=Le,this._themeService=Ke,this._terminalClass=ne++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new w.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(D),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(re),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(Xe=>this._injectCss(Xe))),this._injectCss(this._themeService.colors),this._rowFactory=K.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(I+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(Xe=>this._handleLinkHover(Xe))),this.register(this._linkifier2.onHideLinkUnderline(Xe=>this._handleLinkLeave(Xe))),this.register((0,y.toDisposable)(()=>{this._element.classList.remove(I+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new h.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let j=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*j,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*j),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/j),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/j),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let be of this._rowElements)be.style.width=`${this.dimensions.css.canvas.width}px`,be.style.height=`${this.dimensions.css.cell.height}px`,be.style.lineHeight=`${this.dimensions.css.cell.height}px`,be.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let pe=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=pe,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(j){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let pe=`${this._terminalSelector} .${D} { color: ${j.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;pe+=`${this._terminalSelector} .${D} .xterm-dim { color: ${M.color.multiplyOpacity(j.foreground,.5).css};}`,pe+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let be=`blink_underline_${this._terminalClass}`,me=`blink_bar_${this._terminalClass}`,Ee=`blink_block_${this._terminalClass}`;pe+=`@keyframes ${be} { 50% { border-bottom-style: hidden; }}`,pe+=`@keyframes ${me} { 50% { box-shadow: none; }}`,pe+=`@keyframes ${Ee} { 0% { background-color: ${j.cursor.css}; color: ${j.cursorAccent.css}; } 50% { background-color: inherit; color: ${j.cursor.css}; }}`,pe+=`${this._terminalSelector} .${D}.${F} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${be} 1s step-end infinite;}${this._terminalSelector} .${D}.${F} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${me} 1s step-end infinite;}${this._terminalSelector} .${D}.${F} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Ee} 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${j.cursor.css}; color: ${j.cursorAccent.css};}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${j.cursor.css} !important; color: ${j.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${j.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${j.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${j.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,pe+=`${this._terminalSelector} .${re} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${re} div { position: absolute; background-color: ${j.selectionBackgroundOpaque.css};}${this._terminalSelector} .${re} div { position: absolute; background-color: ${j.selectionInactiveBackgroundOpaque.css};}`;for(let[ue,V]of j.ansi.entries())pe+=`${this._terminalSelector} .${N}${ue} { color: ${V.css}; }${this._terminalSelector} .${N}${ue}.xterm-dim { color: ${M.color.multiplyOpacity(V,.5).css}; }${this._terminalSelector} .${P}${ue} { background-color: ${V.css}; }`;pe+=`${this._terminalSelector} .${N}${g.INVERTED_DEFAULT_COLOR} { color: ${M.color.opaque(j.background).css}; }${this._terminalSelector} .${N}${g.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${M.color.multiplyOpacity(M.color.opaque(j.background),.5).css}; }${this._terminalSelector} .${P}${g.INVERTED_DEFAULT_COLOR} { background-color: ${j.foreground.css}; }`,this._themeStyleElement.textContent=pe}_setDefaultSpacing(){let j=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${j}px`,this._rowFactory.defaultSpacing=j}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(j,pe){for(let be=this._rowElements.length;be<=pe;be++){let me=this._document.createElement("div");this._rowContainer.appendChild(me),this._rowElements.push(me)}for(;this._rowElements.length>pe;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(j,pe){this._refreshRowElements(j,pe),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(F),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(F),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(j,pe,be){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(j,pe,be),this.renderRows(0,this._bufferService.rows-1),!j||!pe)return;this._selectionRenderModel.update(this._terminal,j,pe,be);let me=this._selectionRenderModel.viewportStartRow,Ee=this._selectionRenderModel.viewportEndRow,ue=this._selectionRenderModel.viewportCappedStartRow,V=this._selectionRenderModel.viewportCappedEndRow;if(ue>=this._bufferService.rows||V<0)return;let K=this._document.createDocumentFragment();if(be){let ae=j[0]>pe[0];K.appendChild(this._createSelectionElement(ue,ae?pe[0]:j[0],ae?j[0]:pe[0],V-ue+1))}else{let ae=me===ue?j[0]:0,se=ue===Ee?pe[0]:this._bufferService.cols;K.appendChild(this._createSelectionElement(ue,ae,se));let Me=V-ue-1;if(K.appendChild(this._createSelectionElement(ue+1,0,this._bufferService.cols,Me)),ue!==V){let Le=Ee===V?pe[0]:this._bufferService.cols;K.appendChild(this._createSelectionElement(V,0,Le))}}this._selectionContainer.appendChild(K)}_createSelectionElement(j,pe,be,me=1){let Ee=this._document.createElement("div"),ue=pe*this.dimensions.css.cell.width,V=this.dimensions.css.cell.width*(be-pe);return ue+V>this.dimensions.css.canvas.width&&(V=this.dimensions.css.canvas.width-ue),Ee.style.height=me*this.dimensions.css.cell.height+"px",Ee.style.top=j*this.dimensions.css.cell.height+"px",Ee.style.left=`${ue}px`,Ee.style.width=`${V}px`,Ee}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let j of this._rowElements)j.replaceChildren()}renderRows(j,pe){let be=this._bufferService.buffer,me=be.ybase+be.y,Ee=Math.min(be.x,this._bufferService.cols-1),ue=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,K=this._optionsService.rawOptions.cursorInactiveStyle;for(let ae=j;ae<=pe;ae++){let se=ae+be.ydisp,Me=this._rowElements[ae],Le=be.lines.get(se);if(!Me||!Le)break;Me.replaceChildren(...this._rowFactory.createRow(Le,se,se===me,V,K,Ee,ue,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${I}${this._terminalClass}`}_handleLinkHover(j){this._setCellUnderline(j.x1,j.x2,j.y1,j.y2,j.cols,!0)}_handleLinkLeave(j){this._setCellUnderline(j.x1,j.x2,j.y1,j.y2,j.cols,!1)}_setCellUnderline(j,pe,be,me,Ee,ue){be<0&&(j=0),me<0&&(pe=0);let V=this._bufferService.rows-1;be=Math.max(Math.min(be,V),0),me=Math.max(Math.min(me,V),0),Ee=Math.min(Ee,this._bufferService.cols);let K=this._bufferService.buffer,ae=K.ybase+K.y,se=Math.min(K.x,Ee-1),Me=this._optionsService.rawOptions.cursorBlink,Le=this._optionsService.rawOptions.cursorStyle,Ke=this._optionsService.rawOptions.cursorInactiveStyle;for(let Xe=be;Xe<=me;++Xe){let xe=Xe+K.ydisp,Q=this._rowElements[Xe],Ae=K.lines.get(xe);if(!Q||!Ae)break;Q.replaceChildren(...this._rowFactory.createRow(Ae,xe,xe===ae,Le,Ke,se,Me,this.dimensions.css.cell.width,this._widthCache,ue?Xe===be?j:0:-1,ue?(Xe===me?pe:Ee)-1:-1))}}};r.DomRenderer=G=c([m(7,k.IInstantiationService),m(8,C.ICharSizeService),m(9,k.IOptionsService),m(10,k.IBufferService),m(11,C.ICoreBrowserService),m(12,C.IThemeService)],G)},3787:function(o,r,a){var c=this&&this.__decorate||function(D,N,P,F){var re,ne=arguments.length,G=ne<3?N:F===null?F=Object.getOwnPropertyDescriptor(N,P):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(D,N,P,F);else for(var j=D.length-1;j>=0;j--)(re=D[j])&&(G=(ne<3?re(G):ne>3?re(N,P,G):re(N,P))||G);return ne>3&&G&&Object.defineProperty(N,P,G),G},m=this&&this.__param||function(D,N){return function(P,F){N(P,F,D)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRendererRowFactory=void 0;let u=a(2223),h=a(643),g=a(511),S=a(2585),x=a(8055),C=a(4725),M=a(4269),w=a(6171),y=a(3734),k=r.DomRendererRowFactory=class{constructor(D,N,P,F,re,ne,G){this._document=D,this._characterJoinerService=N,this._optionsService=P,this._coreBrowserService=F,this._coreService=re,this._decorationService=ne,this._themeService=G,this._workCell=new g.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(D,N,P){this._selectionStart=D,this._selectionEnd=N,this._columnSelectMode=P}createRow(D,N,P,F,re,ne,G,j,pe,be,me){let Ee=[],ue=this._characterJoinerService.getJoinedCharacters(N),V=this._themeService.colors,K,ae=D.getNoBgTrimmedLength();P&&ae0&&Yn===ue[0][0]){xo=!0;let Go=ue.shift();Tn=new M.JoinedCellData(this._workCell,D.translateToString(!0,Go[0],Go[1]),Go[1]-Go[0]),Hr=Go[1]-1,No=Tn.getWidth()}let tm=this._isCellInSelection(Yn,N),uh=P&&Yn===ne,RT=Et&&Yn>=be&&Yn<=me,FT=!1;this._decorationService.forEachDecorationAtCell(Yn,N,void 0,Go=>{FT=!0});let n1=Tn.getChars()||h.WHITESPACE_CELL_CHAR;if(n1===" "&&(Tn.isUnderline()||Tn.isOverline())&&(n1="\xA0"),qe=No*j-pe.get(n1,Tn.isBold(),Tn.isItalic()),K){if(se&&(tm&&Ae||!tm&&!Ae&&Tn.bg===Le)&&(tm&&Ae&&V.selectionForeground||Tn.fg===Ke)&&Tn.extended.ext===Xe&&RT===xe&&qe===Q&&!uh&&!xo&&!FT){Tn.isInvisible()?Me+=h.WHITESPACE_CELL_CHAR:Me+=n1,se++;continue}se&&(K.textContent=Me),K=this._document.createElement("span"),se=0,Me=""}else K=this._document.createElement("span");if(Le=Tn.bg,Ke=Tn.fg,Xe=Tn.extended.ext,xe=RT,Q=qe,Ae=tm,xo&&ne>=Yn&&ne<=Hr&&(ne=Yn),!this._coreService.isCursorHidden&&uh&&this._coreService.isCursorInitialized){if(ct.push("xterm-cursor"),this._coreBrowserService.isFocused)G&&ct.push("xterm-cursor-blink"),ct.push(F==="bar"?"xterm-cursor-bar":F==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(re)switch(re){case"outline":ct.push("xterm-cursor-outline");break;case"block":ct.push("xterm-cursor-block");break;case"bar":ct.push("xterm-cursor-bar");break;case"underline":ct.push("xterm-cursor-underline")}}if(Tn.isBold()&&ct.push("xterm-bold"),Tn.isItalic()&&ct.push("xterm-italic"),Tn.isDim()&&ct.push("xterm-dim"),Me=Tn.isInvisible()?h.WHITESPACE_CELL_CHAR:Tn.getChars()||h.WHITESPACE_CELL_CHAR,Tn.isUnderline()&&(ct.push(`xterm-underline-${Tn.extended.underlineStyle}`),Me===" "&&(Me="\xA0"),!Tn.isUnderlineColorDefault()))if(Tn.isUnderlineColorRGB())K.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Tn.getUnderlineColor()).join(",")})`;else{let Go=Tn.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Tn.isBold()&&Go<8&&(Go+=8),K.style.textDecorationColor=V.ansi[Go].css}Tn.isOverline()&&(ct.push("xterm-overline"),Me===" "&&(Me="\xA0")),Tn.isStrikethrough()&&ct.push("xterm-strikethrough"),RT&&(K.style.textDecoration="underline");let Qs=Tn.getFgColor(),C_=Tn.getFgColorMode(),mc=Tn.getBgColor(),b_=Tn.getBgColorMode(),LT=!!Tn.isInverse();if(LT){let Go=Qs;Qs=mc,mc=Go;let yG=C_;C_=b_,b_=yG}let nm,i1,im,x_=!1;switch(this._decorationService.forEachDecorationAtCell(Yn,N,void 0,Go=>{Go.options.layer!=="top"&&x_||(Go.backgroundColorRGB&&(b_=50331648,mc=Go.backgroundColorRGB.rgba>>8&16777215,nm=Go.backgroundColorRGB),Go.foregroundColorRGB&&(C_=50331648,Qs=Go.foregroundColorRGB.rgba>>8&16777215,i1=Go.foregroundColorRGB),x_=Go.options.layer==="top")}),!x_&&tm&&(nm=this._coreBrowserService.isFocused?V.selectionBackgroundOpaque:V.selectionInactiveBackgroundOpaque,mc=nm.rgba>>8&16777215,b_=50331648,x_=!0,V.selectionForeground&&(C_=50331648,Qs=V.selectionForeground.rgba>>8&16777215,i1=V.selectionForeground)),x_&&ct.push("xterm-decoration-top"),b_){case 16777216:case 33554432:im=V.ansi[mc],ct.push(`xterm-bg-${mc}`);break;case 50331648:im=x.channels.toColor(mc>>16,mc>>8&255,255&mc),this._addStyle(K,`background-color:#${I((mc>>>0).toString(16),"0",6)}`);break;default:LT?(im=V.foreground,ct.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):im=V.background}switch(nm||Tn.isDim()&&(nm=x.color.multiplyOpacity(im,.5)),C_){case 16777216:case 33554432:Tn.isBold()&&Qs<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Qs+=8),this._applyMinimumContrast(K,im,V.ansi[Qs],Tn,nm,void 0)||ct.push(`xterm-fg-${Qs}`);break;case 50331648:let Go=x.channels.toColor(Qs>>16&255,Qs>>8&255,255&Qs);this._applyMinimumContrast(K,im,Go,Tn,nm,i1)||this._addStyle(K,`color:#${I(Qs.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(K,im,V.foreground,Tn,nm,i1)||LT&&ct.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ct.length&&(K.className=ct.join(" "),ct.length=0),uh||xo||FT?K.textContent=Me:se++,qe!==this.defaultSpacing&&(K.style.letterSpacing=`${qe}px`),Ee.push(K),Yn=Hr}return K&&se&&(K.textContent=Me),Ee}_applyMinimumContrast(D,N,P,F,re,ne){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(F.getCode()))return!1;let G=this._getContrastCache(F),j;if(re||ne||(j=G.getColor(N.rgba,P.rgba)),j===void 0){let pe=this._optionsService.rawOptions.minimumContrastRatio/(F.isDim()?2:1);j=x.color.ensureContrastRatio(re||N,ne||P,pe),G.setColor((re||N).rgba,(ne||P).rgba,j??null)}return!!j&&(this._addStyle(D,`color:${j.css}`),!0)}_getContrastCache(D){return D.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(D,N){D.setAttribute("style",`${D.getAttribute("style")||""}${N};`)}_isCellInSelection(D,N){let P=this._selectionStart,F=this._selectionEnd;return!(!P||!F)&&(this._columnSelectMode?P[0]<=F[0]?D>=P[0]&&N>=P[1]&&D=P[1]&&D>=F[0]&&N<=F[1]:N>P[1]&&N=P[0]&&D=P[0])}};function I(D,N,P){for(;D.length{Object.defineProperty(r,"__esModule",{value:!0}),r.WidthCache=void 0,r.WidthCache=class{constructor(a,c){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=a.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let m=a.createElement("span");m.classList.add("xterm-char-measure-element");let u=a.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";let h=a.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontStyle="italic";let g=a.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[m,u,h,g],this._container.appendChild(m),this._container.appendChild(u),this._container.appendChild(h),this._container.appendChild(g),c.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(a,c,m,u){a===this._font&&c===this._fontSize&&m===this._weight&&u===this._weightBold||(this._font=a,this._fontSize=c,this._weight=m,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(a,c,m){let u=0;if(!c&&!m&&a.length===1&&(u=a.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];let S=this._measure(a,0);return S>0&&(this._flat[u]=S),S}let h=a;c&&(h+="B"),m&&(h+="I");let g=this._holey.get(h);if(g===void 0){let S=0;c&&(S|=1),m&&(S|=2),g=this._measure(a,S),g>0&&this._holey.set(h,g)}return g}_measure(a,c){let m=this._measureElements[c];return m.textContent=a.repeat(32),m.offsetWidth/32}}},2223:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_BASELINE=r.DIM_OPACITY=r.INVERTED_DEFAULT_COLOR=void 0;let c=a(6114);r.INVERTED_DEFAULT_COLOR=257,r.DIM_OPACITY=.5,r.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},6171:(o,r)=>{function a(m){return 57508<=m&&m<=57558}function c(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(r,"__esModule",{value:!0}),r.computeNextVariantOffset=r.createRenderDimensions=r.treatGlyphAsBackgroundColor=r.allowRescaling=r.isEmoji=r.isRestrictedPowerlineGlyph=r.isPowerlineGlyph=r.throwIfFalsy=void 0,r.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},r.isPowerlineGlyph=a,r.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},r.isEmoji=c,r.allowRescaling=function(m,u,h,g){return u===1&&h>Math.ceil(1.5*g)&&m!==void 0&&m>255&&!c(m)&&!a(m)&&!(function(S){return 57344<=S&&S<=63743})(m)},r.treatGlyphAsBackgroundColor=function(m){return a(m)||(function(u){return 9472<=u&&u<=9631})(m)},r.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},r.computeNextVariantOffset=function(m,u,h=0){return(m-(2*Math.round(u)-h))%(2*Math.round(u))}},6052:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createSelectionRenderModel=void 0;class a{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(m,u,h,g=!1){if(this.selectionStart=u,this.selectionEnd=h,!u||!h||u[0]===h[0]&&u[1]===h[1])return void this.clear();let S=m.buffers.active.ydisp,x=u[1]-S,C=h[1]-S,M=Math.max(x,0),w=Math.min(C,m.rows-1);M>=m.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=g,this.viewportStartRow=x,this.viewportEndRow=C,this.viewportCappedStartRow=M,this.viewportCappedEndRow=w,this.startCol=u[0],this.endCol=h[0])}isCellSelected(m,u,h){return!!this.hasSelection&&(h-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&h>=this.viewportCappedStartRow&&u=this.viewportCappedStartRow&&u>=this.endCol&&h<=this.viewportCappedEndRow:h>this.viewportStartRow&&h=this.startCol&&u=this.startCol)}}r.createSelectionRenderModel=function(){return new a}},456:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionModel=void 0,r.SelectionModel=class{constructor(a){this._bufferService=a,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?a%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)-1]:[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[a,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[Math.max(a,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let a=this.selectionStart,c=this.selectionEnd;return!(!a||!c)&&(a[1]>c[1]||a[1]===c[1]&&a[0]>c[0])}handleTrim(a){return this.selectionStart&&(this.selectionStart[1]-=a),this.selectionEnd&&(this.selectionEnd[1]-=a),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(o,r,a){var c=this&&this.__decorate||function(w,y,k,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,k):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,k,I);else for(var F=w.length-1;F>=0;F--)(D=w[F])&&(P=(N<3?D(P):N>3?D(y,k,P):D(y,k))||P);return N>3&&P&&Object.defineProperty(y,k,P),P},m=this&&this.__param||function(w,y){return function(k,I){y(k,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharSizeService=void 0;let u=a(2585),h=a(8460),g=a(844),S=r.CharSizeService=class extends g.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,y,k){super(),this._optionsService=k,this.width=0,this.height=0,this._onCharSizeChange=this.register(new h.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new M(this._optionsService))}catch{this._measureStrategy=this.register(new C(w,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){let w=this._measureStrategy.measure();w.width===this.width&&w.height===this.height||(this.width=w.width,this.height=w.height,this._onCharSizeChange.fire())}};r.CharSizeService=S=c([m(2,u.IOptionsService)],S);class x extends g.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,k){y!==void 0&&y>0&&k!==void 0&&k>0&&(this._result.width=y,this._result.height=k)}}class C extends x{constructor(y,k,I){super(),this._document=y,this._parentElement=k,this._optionsService=I,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class M extends x{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let k=this._ctx.measureText("W");if(!("width"in k&&"fontBoundingBoxAscent"in k&&"fontBoundingBoxDescent"in k))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(o,r,a){var c=this&&this.__decorate||function(M,w,y,k){var I,D=arguments.length,N=D<3?w:k===null?k=Object.getOwnPropertyDescriptor(w,y):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,y,k);else for(var P=M.length-1;P>=0;P--)(I=M[P])&&(N=(D<3?I(N):D>3?I(w,y,N):I(w,y))||N);return D>3&&N&&Object.defineProperty(w,y,N),N},m=this&&this.__param||function(M,w){return function(y,k){w(y,k,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharacterJoinerService=r.JoinedCellData=void 0;let u=a(3734),h=a(643),g=a(511),S=a(2585);class x extends u.AttributeData{constructor(w,y,k){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=y,this._width=k}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(w){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.JoinedCellData=x;let C=r.CharacterJoinerService=class rU{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new g.CellData}register(w){let y={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(y),y.id}deregister(w){for(let y=0;y1){let G=this._getJoinedRanges(I,P,N,y,D);for(let j=0;j1){let ne=this._getJoinedRanges(I,P,N,y,D);for(let G=0;G{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreBrowserService=void 0;let c=a(844),m=a(8460),u=a(3656);class h extends c.Disposable{constructor(x,C,M){super(),this._textarea=x,this._window=C,this.mainDocument=M,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new g(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(w=>this._screenDprMonitor.setWindow(w))),this.register((0,m.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}get window(){return this._window}set window(x){this._window!==x&&(this._window=x,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}r.CoreBrowserService=h;class g extends c.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new c.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,c.toDisposable)(()=>this.clearListener()))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkProviderService=void 0;let c=a(844);class m extends c.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,c.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(h){return this.linkProviders.push(h),{dispose:()=>{let g=this.linkProviders.indexOf(h);g!==-1&&this.linkProviders.splice(g,1)}}}}r.LinkProviderService=m},8934:function(o,r,a){var c=this&&this.__decorate||function(S,x,C,M){var w,y=arguments.length,k=y<3?x:M===null?M=Object.getOwnPropertyDescriptor(x,C):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(S,x,C,M);else for(var I=S.length-1;I>=0;I--)(w=S[I])&&(k=(y<3?w(k):y>3?w(x,C,k):w(x,C))||k);return y>3&&k&&Object.defineProperty(x,C,k),k},m=this&&this.__param||function(S,x){return function(C,M){x(C,M,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.MouseService=void 0;let u=a(4725),h=a(9806),g=r.MouseService=class{constructor(S,x){this._renderService=S,this._charSizeService=x}getCoords(S,x,C,M,w){return(0,h.getCoords)(window,S,x,C,M,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(S,x){let C=(0,h.getCoordsRelativeToElement)(window,S,x);if(this._charSizeService.hasValidSize)return C[0]=Math.min(Math.max(C[0],0),this._renderService.dimensions.css.canvas.width-1),C[1]=Math.min(Math.max(C[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(C[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(C[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(C[0]),y:Math.floor(C[1])}}};r.MouseService=g=c([m(0,u.IRenderService),m(1,u.ICharSizeService)],g)},3230:function(o,r,a){var c=this&&this.__decorate||function(w,y,k,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,k):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,k,I);else for(var F=w.length-1;F>=0;F--)(D=w[F])&&(P=(N<3?D(P):N>3?D(y,k,P):D(y,k))||P);return N>3&&P&&Object.defineProperty(y,k,P),P},m=this&&this.__param||function(w,y){return function(k,I){y(k,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RenderService=void 0;let u=a(6193),h=a(4725),g=a(8460),S=a(844),x=a(7226),C=a(2585),M=r.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,y,k,I,D,N,P,F){super(),this._rowCount=w,this._charSizeService=I,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new S.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new g.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new g.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new g.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new g.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer((re,ne)=>this._renderRows(re,ne),P),this.register(this._renderDebouncer),this.register(P.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(N.onResize(()=>this._fullRefresh())),this.register(N.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this.register(k.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(D.onDecorationRegistered(()=>this._fullRefresh())),this.register(D.onDecorationRemoved(()=>this._fullRefresh())),this.register(k.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(N.cols,N.rows),this._fullRefresh()})),this.register(k.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(N.buffer.y,N.buffer.y,!0))),this.register(F.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(P.window,y),this.register(P.onWindowChange(re=>this._registerIntersectionObserver(re,y)))}_registerIntersectionObserver(w,y){if("IntersectionObserver"in w){let k=new w.IntersectionObserver(I=>this._handleIntersectionChange(I[I.length-1]),{threshold:0});k.observe(y),this._observerDisposable.value=(0,S.toDisposable)(()=>k.disconnect())}}_handleIntersectionChange(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(w,y,k=!1){this._isPaused?this._needsFullRefresh=!0:(k||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,y,this._rowCount))}_renderRows(w,y){this._renderer.value&&(w=Math.min(w,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(w,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:w,end:y}),this._onRender.fire({start:w,end:y}),this._isNextRenderRedrawOnly=!0)}resize(w,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(w){this._renderer.value=w,this._renderer.value&&(this._renderer.value.onRequestRedraw(y=>this.refreshRows(y.start,y.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(w){return this._renderDebouncer.addRefreshCallback(w)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(w,y)):this._renderer.value.handleResize(w,y),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(w,y,k){this._selectionState.start=w,this._selectionState.end=y,this._selectionState.columnSelectMode=k,this._renderer.value?.handleSelectionChanged(w,y,k)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};r.RenderService=M=c([m(2,C.IOptionsService),m(3,h.ICharSizeService),m(4,C.IDecorationService),m(5,C.IBufferService),m(6,h.ICoreBrowserService),m(7,h.IThemeService)],M)},9312:function(o,r,a){var c=this&&this.__decorate||function(P,F,re,ne){var G,j=arguments.length,pe=j<3?F:ne===null?ne=Object.getOwnPropertyDescriptor(F,re):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(P,F,re,ne);else for(var be=P.length-1;be>=0;be--)(G=P[be])&&(pe=(j<3?G(pe):j>3?G(F,re,pe):G(F,re))||pe);return j>3&&pe&&Object.defineProperty(F,re,pe),pe},m=this&&this.__param||function(P,F){return function(re,ne){F(re,ne,P)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionService=void 0;let u=a(9806),h=a(9504),g=a(456),S=a(4725),x=a(8460),C=a(844),M=a(6114),w=a(4841),y=a(511),k=a(2585),I="\xA0",D=new RegExp(I,"g"),N=r.SelectionService=class extends C.Disposable{constructor(P,F,re,ne,G,j,pe,be,me){super(),this._element=P,this._screenElement=F,this._linkifier=re,this._bufferService=ne,this._coreService=G,this._mouseService=j,this._optionsService=pe,this._renderService=be,this._coreBrowserService=me,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Ee=>this._handleMouseMove(Ee),this._mouseUpListener=Ee=>this._handleMouseUp(Ee),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(Ee=>this._handleTrim(Ee)),this.register(this._bufferService.buffers.onBufferActivate(Ee=>this._handleBufferActivate(Ee))),this.enable(),this._model=new g.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,C.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let P=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!P||!F||P[0]===F[0]&&P[1]===F[1])}get selectionText(){let P=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;if(!P||!F)return"";let re=this._bufferService.buffer,ne=[];if(this._activeSelectionMode===3){if(P[0]===F[0])return"";let G=P[0]G.replace(D," ")).join(M.isWindows?`\r +WARNING: This link could potentially be dangerous`)){let M=window.open();if(M){try{M.opener=null}catch{}M.location.href=b}else console.warn("Opening link blocked as opener could not be cleared")}}r.OscLinkProvider=_=c([p(0,h.IBufferService),p(1,h.IOptionsService),p(2,h.IOscLinkService)],_)},6193:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderDebouncer=void 0,r.RenderDebouncer=class{constructor(a,c){this._renderCallback=a,this._coreBrowserService=c,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(a){return this._refreshCallbacks.push(a),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(a,c,p){this._rowCount=p,a=a!==void 0?a:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();let a=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,c),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let a of this._refreshCallbacks)a(0);this._refreshCallbacks=[]}}},3236:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Terminal=void 0;let c=a(3614),p=a(3656),u=a(3551),h=a(9042),_=a(3730),S=a(1680),x=a(3107),b=a(5744),M=a(2950),w=a(1296),y=a(428),E=a(4269),I=a(5114),D=a(8934),N=a(3230),P=a(9312),L=a(4725),re=a(6731),oe=a(8055),G=a(8969),$=a(8460),ue=a(844),be=a(6114),me=a(8437),De=a(2584),he=a(7399),B=a(5941),X=a(9074),se=a(2585),ce=a(5435),ke=a(4567),ze=a(779);class Ke extends G.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(ye={}){super(ye),this.browser=be,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new ue.MutableDisposable),this._onCursorMove=this.register(new $.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new $.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new $.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new $.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new $.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new $.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new $.EventEmitter),this._onBlur=this.register(new $.EventEmitter),this._onA11yCharEmitter=this.register(new $.EventEmitter),this._onA11yTabEmitter=this.register(new $.EventEmitter),this._onWillOpen=this.register(new $.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(X.DecorationService),this._instantiationService.setService(se.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ze.LinkProviderService),this._instantiationService.setService(L.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(_.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((q,Oe)=>this.refresh(q,Oe))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(q=>this._reportWindowsOptions(q))),this.register(this._inputHandler.onColor(q=>this._handleColorEvent(q))),this.register((0,$.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,$.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,$.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,$.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(q=>this._afterResize(q.cols,q.rows))),this.register((0,ue.toDisposable)(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}_handleColorEvent(ye){if(this._themeService)for(let q of ye){let Oe,We="";switch(q.index){case 256:Oe="foreground",We="10";break;case 257:Oe="background",We="11";break;case 258:Oe="cursor",We="12";break;default:Oe="ansi",We="4;"+q.index}switch(q.type){case 0:let ct=oe.color.toColorRGB(Oe==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[Oe]);this.coreService.triggerDataEvent(`${De.C0.ESC}]${We};${(0,B.toRgbString)(ct)}${De.C1_ESCAPED.ST}`);break;case 1:if(Oe==="ansi")this._themeService.modifyColors(Tt=>Tt.ansi[q.index]=oe.channels.toColor(...q.color));else{let Tt=Oe;this._themeService.modifyColors(Xn=>Xn[Tt]=oe.channels.toColor(...q.color))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ye){ye?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(ke.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ye){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(De.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(De.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let ye=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(ye);if(!q)return;let Oe=Math.min(this.buffer.x,this.cols-1),We=this._renderService.dimensions.css.cell.height,ct=q.getWidth(Oe),Tt=this._renderService.dimensions.css.cell.width*ct,Xn=this.buffer.y*this._renderService.dimensions.css.cell.height,Io=Oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Io+"px",this.textarea.style.top=Xn+"px",this.textarea.style.width=Tt+"px",this.textarea.style.height=We+"px",this.textarea.style.lineHeight=We+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",q=>{this.hasSelection()&&(0,c.copyHandler)(q,this._selectionService)}));let ye=q=>(0,c.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",ye)),this.register((0,p.addDisposableDomListener)(this.element,"paste",ye)),be.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",q=>{q.button===2&&(0,c.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",q=>{(0,c.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),be.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",q=>{q.button===1&&(0,c.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",ye=>this._keyUp(ye),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",ye=>this._keyDown(ye),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",ye=>this._keyPress(ye),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",ye=>this._compositionHelper.compositionupdate(ye))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,p.addDisposableDomListener)(this.textarea,"input",ye=>this._inputEvent(ye),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(ye){if(!ye)throw new Error("Terminal requires a parent element.");if(ye.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=ye.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),ye.appendChild(this.element);let q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,p.addDisposableDomListener)(this.screenElement,"mousemove",Oe=>this.updateCursorStyle(Oe))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",h.promptLabel),be.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(I.CoreBrowserService,this.textarea,ye.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(L.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",Oe=>this._handleTextAreaFocus(Oe))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(L.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(re.ThemeService),this._instantiationService.setService(L.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(L.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(N.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(L.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(Oe=>this._onRender.fire(Oe))),this.onResize(Oe=>this._renderService.resize(Oe.cols,Oe.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(M.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(L.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(Oe=>this.scrollLines(Oe.amount,Oe.suppressScrollEvent,1)),this.register(this._inputHandler.onRequestSyncScrollBar(()=>this.viewport.syncScrollArea())),this.register(this.viewport),this.register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this.register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this.register(this.onBlur(()=>this._renderService.handleBlur())),this.register(this.onFocus(()=>this._renderService.handleFocus())),this.register(this._renderService.onDimensionsChange(()=>this.viewport.syncScrollArea())),this._selectionService=this.register(this._instantiationService.createInstance(P.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(L.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(Oe=>this.scrollLines(Oe.amount,Oe.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(Oe=>this._renderService.handleSelectionChanged(Oe.start,Oe.end,Oe.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(Oe=>{this.textarea.value=Oe,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(Oe=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",Oe=>this._selectionService.handleMouseDown(Oe))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(ke.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",Oe=>this._handleScreenReaderModeOptionChange(Oe))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",Oe=>{!this._overviewRulerRenderer&&Oe&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(w.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let ye=this,q=this.element;function Oe(Tt){let Xn=ye._mouseService.getMouseReportCoords(Tt,ye.screenElement);if(!Xn)return!1;let Io,_o;switch(Tt.overrideType||Tt.type){case"mousemove":_o=32,Tt.buttons===void 0?(Io=3,Tt.button!==void 0&&(Io=Tt.button<3?Tt.button:3)):Io=1&Tt.buttons?0:4&Tt.buttons?1:2&Tt.buttons?2:3;break;case"mouseup":_o=0,Io=Tt.button<3?Tt.button:3;break;case"mousedown":_o=1,Io=Tt.button<3?Tt.button:3;break;case"wheel":if(ye._customWheelEventHandler&&ye._customWheelEventHandler(Tt)===!1||ye.viewport.getLinesScrolled(Tt)===0)return!1;_o=Tt.deltaY<0?0:1,Io=4;break;default:return!1}return!(_o===void 0||Io===void 0||Io>4)&&ye.coreMouseService.triggerMouseEvent({col:Xn.col,row:Xn.row,x:Xn.x,y:Xn.y,button:Io,action:_o,ctrl:Tt.ctrlKey,alt:Tt.altKey,shift:Tt.shiftKey})}let We={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ct={mouseup:Tt=>(Oe(Tt),Tt.buttons||(this._document.removeEventListener("mouseup",We.mouseup),We.mousedrag&&this._document.removeEventListener("mousemove",We.mousedrag)),this.cancel(Tt)),wheel:Tt=>(Oe(Tt),this.cancel(Tt,!0)),mousedrag:Tt=>{Tt.buttons&&Oe(Tt)},mousemove:Tt=>{Tt.buttons||Oe(Tt)}};this.register(this.coreMouseService.onProtocolChange(Tt=>{Tt?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Tt)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&Tt?We.mousemove||(q.addEventListener("mousemove",ct.mousemove),We.mousemove=ct.mousemove):(q.removeEventListener("mousemove",We.mousemove),We.mousemove=null),16&Tt?We.wheel||(q.addEventListener("wheel",ct.wheel,{passive:!1}),We.wheel=ct.wheel):(q.removeEventListener("wheel",We.wheel),We.wheel=null),2&Tt?We.mouseup||(We.mouseup=ct.mouseup):(this._document.removeEventListener("mouseup",We.mouseup),We.mouseup=null),4&Tt?We.mousedrag||(We.mousedrag=ct.mousedrag):(this._document.removeEventListener("mousemove",We.mousedrag),We.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(q,"mousedown",Tt=>{if(Tt.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Tt))return Oe(Tt),We.mouseup&&this._document.addEventListener("mouseup",We.mouseup),We.mousedrag&&this._document.addEventListener("mousemove",We.mousedrag),this.cancel(Tt)})),this.register((0,p.addDisposableDomListener)(q,"wheel",Tt=>{if(!We.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Tt)===!1)return!1;if(!this.buffer.hasScrollback){let Xn=this.viewport.getLinesScrolled(Tt);if(Xn===0)return;let Io=De.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Tt.deltaY<0?"A":"B"),_o="";for(let Br=0;Br{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Tt),this.cancel(Tt)},{passive:!0})),this.register((0,p.addDisposableDomListener)(q,"touchmove",Tt=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Tt)?void 0:this.cancel(Tt)},{passive:!1}))}refresh(ye,q){this._renderService?.refreshRows(ye,q)}updateCursorStyle(ye){this._selectionService?.shouldColumnSelect(ye)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(ye,q,Oe=0){Oe===1?(super.scrollLines(ye,q,Oe),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(ye)}paste(ye){(0,c.paste)(ye,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ye){this._customKeyEventHandler=ye}attachCustomWheelEventHandler(ye){this._customWheelEventHandler=ye}registerLinkProvider(ye){return this._linkProviderService.registerLinkProvider(ye)}registerCharacterJoiner(ye){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let q=this._characterJoinerService.register(ye);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(ye){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ye)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ye){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ye)}registerDecoration(ye){return this._decorationService.registerDecoration(ye)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ye,q,Oe){this._selectionService.setSelection(ye,q,Oe)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(ye,q){this._selectionService?.selectLines(ye,q)}_keyDown(ye){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ye)===!1)return!1;let q=this.browser.isMac&&this.options.macOptionIsMeta&&ye.altKey;if(!q&&!this._compositionHelper.keydown(ye))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||ye.key!=="Dead"&&ye.key!=="AltGraph"||(this._unprocessedDeadKey=!0);let Oe=(0,he.evaluateKeyboardEvent)(ye,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ye),Oe.type===3||Oe.type===2){let We=this.rows-1;return this.scrollLines(Oe.type===2?-We:We),this.cancel(ye,!0)}return Oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ye)||(Oe.cancel&&this.cancel(ye,!0),!Oe.key||!!(ye.key&&!ye.ctrlKey&&!ye.altKey&&!ye.metaKey&&ye.key.length===1&&ye.key.charCodeAt(0)>=65&&ye.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(Oe.key!==De.C0.ETX&&Oe.key!==De.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Oe.key,domEvent:ye}),this._showCursor(),this.coreService.triggerDataEvent(Oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||ye.altKey||ye.ctrlKey?this.cancel(ye,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ye,q){let Oe=ye.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||ye.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||ye.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?Oe:Oe&&(!q.keyCode||q.keyCode>47)}_keyUp(ye){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ye)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(ye)||this.focus(),this.updateCursorStyle(ye),this._keyPressHandled=!1)}_keyPress(ye){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ye)===!1)return!1;if(this.cancel(ye),ye.charCode)q=ye.charCode;else if(ye.which===null||ye.which===void 0)q=ye.keyCode;else{if(ye.which===0||ye.charCode===0)return!1;q=ye.which}return!(!q||(ye.altKey||ye.ctrlKey||ye.metaKey)&&!this._isThirdLevelShift(this.browser,ye)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:ye}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ye){if(ye.data&&ye.inputType==="insertText"&&(!ye.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let q=ye.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(ye),!0}return!1}resize(ye,q){ye!==this.cols||q!==this.rows?super.resize(ye,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ye,q){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let ye=1;ye{Object.defineProperty(r,"__esModule",{value:!0}),r.TimeBasedDebouncer=void 0,r.TimeBasedDebouncer=class{constructor(a,c=1e3){this._renderCallback=a,this._debounceThresholdMS=c,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(a,c,p){this._rowCount=p,a=a!==void 0?a:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c;let u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){let h=u-this._lastRefreshMs,_=this._debounceThresholdMS-h;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},_)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let a=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,c)}}},1680:function(o,r,a){var c=this&&this.__decorate||function(M,w,y,E){var I,D=arguments.length,N=D<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,y):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,y,E);else for(var P=M.length-1;P>=0;P--)(I=M[P])&&(N=(D<3?I(N):D>3?I(w,y,N):I(w,y))||N);return D>3&&N&&Object.defineProperty(w,y,N),N},p=this&&this.__param||function(M,w){return function(y,E){w(y,E,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Viewport=void 0;let u=a(3656),h=a(4725),_=a(8460),S=a(844),x=a(2585),b=r.Viewport=class extends S.Disposable{constructor(M,w,y,E,I,D,N,P){super(),this._viewportElement=M,this._scrollArea=w,this._bufferService=y,this._optionsService=E,this._charSizeService=I,this._renderService=D,this._coreBrowserService=N,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new _.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(L=>this._renderDimensions=L)),this._handleThemeChange(P.colors),this.register(P.onChangeColors(L=>this._handleThemeChange(L))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(M){this._viewportElement.style.backgroundColor=M.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(M){if(M)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;let w=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==w&&(this._lastRecordedBufferHeight=w,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}let M=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==M&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=M),this._refreshAnimationFrame=null}syncScrollArea(M=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(M);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(M)}_handleScroll(M){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});let w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:w,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;let M=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(M*(this._smoothScrollState.target-this._smoothScrollState.origin)),M<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(M,w){let y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&y0&&(y=oe),E=""}}return{bufferElements:I,cursorElement:y}}getLinesScrolled(M){if(M.deltaY===0||M.shiftKey)return 0;let w=this._applyScrollModifier(M.deltaY,M);return M.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):M.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w}_applyScrollModifier(M,w){let y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&w.altKey||y==="ctrl"&&w.ctrlKey||y==="shift"&&w.shiftKey?M*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:M*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(M){this._lastTouchY=M.touches[0].pageY}handleTouchMove(M){let w=this._lastTouchY-M.touches[0].pageY;return this._lastTouchY=M.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(M,w))}};r.Viewport=b=c([p(2,x.IBufferService),p(3,x.IOptionsService),p(4,h.ICharSizeService),p(5,h.IRenderService),p(6,h.ICoreBrowserService),p(7,h.IThemeService)],b)},3107:function(o,r,a){var c=this&&this.__decorate||function(x,b,M,w){var y,E=arguments.length,I=E<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(x,b,M,w);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(I=(E<3?y(I):E>3?y(b,M,I):y(b,M))||I);return E>3&&I&&Object.defineProperty(b,M,I),I},p=this&&this.__param||function(x,b){return function(M,w){b(M,w,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferDecorationRenderer=void 0;let u=a(4725),h=a(844),_=a(2585),S=r.BufferDecorationRenderer=class extends h.Disposable{constructor(x,b,M,w,y){super(),this._screenElement=x,this._bufferService=b,this._coreBrowserService=M,this._decorationService=w,this._renderService=y,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(E=>this._removeDecoration(E))),this.register((0,h.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){let b=this._coreBrowserService.mainDocument.createElement("div");b.classList.add("xterm-decoration"),b.classList.toggle("xterm-decoration-top-layer",x?.options?.layer==="top"),b.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,b.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",b.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",b.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let M=x.options.x??0;return M&&M>this._bufferService.cols&&(b.style.display="none"),this._refreshXPosition(x,b),b}_refreshStyle(x){let b=x.marker.line-this._bufferService.buffers.active.ydisp;if(b<0||b>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let M=this._decorationElements.get(x);M||(M=this._createElement(x),x.element=M,this._decorationElements.set(x,M),this._container.appendChild(M),x.onDispose(()=>{this._decorationElements.delete(x),M.remove()})),M.style.top=b*this._renderService.dimensions.css.cell.height+"px",M.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(M)}}_refreshXPosition(x,b=x.element){if(!b)return;let M=x.options.x??0;(x.options.anchor||"left")==="right"?b.style.right=M?M*this._renderService.dimensions.css.cell.width+"px":"":b.style.left=M?M*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){this._decorationElements.get(x)?.remove(),this._decorationElements.delete(x),x.dispose()}};r.BufferDecorationRenderer=S=c([p(1,_.IBufferService),p(2,u.ICoreBrowserService),p(3,_.IDecorationService),p(4,u.IRenderService)],S)},5871:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorZoneStore=void 0,r.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(a){if(a.options.overviewRulerOptions){for(let c of this._zones)if(c.color===a.options.overviewRulerOptions.color&&c.position===a.options.overviewRulerOptions.position){if(this._lineIntersectsZone(c,a.marker.line))return;if(this._lineAdjacentToZone(c,a.marker.line,a.options.overviewRulerOptions.position))return void this._addLineToZone(c,a.marker.line)}if(this._zonePoolIndex=a.startBufferLine&&c<=a.endBufferLine}_lineAdjacentToZone(a,c,p){return c>=a.startBufferLine-this._linePadding[p||"full"]&&c<=a.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(a,c){a.startBufferLine=Math.min(a.startBufferLine,c),a.endBufferLine=Math.max(a.endBufferLine,c)}}},5744:function(o,r,a){var c=this&&this.__decorate||function(y,E,I,D){var N,P=arguments.length,L=P<3?E:D===null?D=Object.getOwnPropertyDescriptor(E,I):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(y,E,I,D);else for(var re=y.length-1;re>=0;re--)(N=y[re])&&(L=(P<3?N(L):P>3?N(E,I,L):N(E,I))||L);return P>3&&L&&Object.defineProperty(E,I,L),L},p=this&&this.__param||function(y,E){return function(I,D){E(I,D,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OverviewRulerRenderer=void 0;let u=a(5871),h=a(4725),_=a(844),S=a(2585),x={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0},M={full:0,left:0,center:0,right:0},w=r.OverviewRulerRenderer=class extends _.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,E,I,D,N,P,L){super(),this._viewportElement=y,this._screenElement=E,this._bufferService=I,this._decorationService=D,this._renderService=N,this._optionsService=P,this._coreBrowserService=L,this._colorZoneStore=new u.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);let re=this._canvas.getContext("2d");if(!re)throw new Error("Ctx cannot be null");this._ctx=re,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,_.toDisposable)(()=>{this._canvas?.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){let y=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);b.full=this._canvas.width,b.left=y,b.center=E,b.right=y,this._refreshDrawHeightConstants(),M.full=0,M.left=0,M.center=b.left,M.right=b.left+b.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);let y=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);x.left=E,x.center=E,x.right=E}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;let y=this._colorZoneStore.zones;for(let E of y)E.position!=="full"&&this._renderColorZone(E);for(let E of y)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(M[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-x[y.position||"full"]/2),b[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[y.position||"full"]))}_queueRefresh(y,E){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};r.OverviewRulerRenderer=w=c([p(2,S.IBufferService),p(3,S.IDecorationService),p(4,h.IRenderService),p(5,S.IOptionsService),p(6,h.ICoreBrowserService)],w)},2950:function(o,r,a){var c=this&&this.__decorate||function(x,b,M,w){var y,E=arguments.length,I=E<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,M):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(x,b,M,w);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(I=(E<3?y(I):E>3?y(b,M,I):y(b,M))||I);return E>3&&I&&Object.defineProperty(b,M,I),I},p=this&&this.__param||function(x,b){return function(M,w){b(M,w,x)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CompositionHelper=void 0;let u=a(4725),h=a(2585),_=a(2584),S=r.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,b,M,w,y,E){this._textarea=x,this._compositionView=b,this._bufferService=M,this._optionsService=w,this._coreService=y,this._renderService=E,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){let b={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let M;this._isSendingComposition=!1,b.start+=this._dataAlreadySent.length,M=this._isComposing?this._textarea.value.substring(b.start,b.end):this._textarea.value.substring(b.start),M.length>0&&this._coreService.triggerDataEvent(M,!0)}},0)}else{this._isSendingComposition=!1;let b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}}_handleAnyTextareaChanges(){let x=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let b=this._textarea.value,M=b.replace(x,"");this._dataAlreadySent=M,b.length>x.length?this._coreService.triggerDataEvent(M,!0):b.lengththis.updateCompositionElements(!0),0)}}};r.CompositionHelper=S=c([p(2,h.IBufferService),p(3,h.IOptionsService),p(4,h.ICoreService),p(5,u.IRenderService)],S)},9806:(o,r)=>{function a(c,p,u){let h=u.getBoundingClientRect(),_=c.getComputedStyle(u),S=parseInt(_.getPropertyValue("padding-left")),x=parseInt(_.getPropertyValue("padding-top"));return[p.clientX-h.left-S,p.clientY-h.top-x]}Object.defineProperty(r,"__esModule",{value:!0}),r.getCoords=r.getCoordsRelativeToElement=void 0,r.getCoordsRelativeToElement=a,r.getCoords=function(c,p,u,h,_,S,x,b,M){if(!S)return;let w=a(c,p,u);return w?(w[0]=Math.ceil((w[0]+(M?x/2:0))/x),w[1]=Math.ceil(w[1]/b),w[0]=Math.min(Math.max(w[0],1),h+(M?1:0)),w[1]=Math.min(Math.max(w[1],1),_),w):void 0}},9504:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.moveToCellSequence=void 0;let c=a(2584);function p(b,M,w,y){let E=b-u(b,w),I=M-u(M,w),D=Math.abs(E-I)-(function(N,P,L){let re=0,oe=N-u(N,L),G=P-u(P,L);for(let $=0;$=0&&bM?"A":"B"}function _(b,M,w,y,E,I){let D=b,N=M,P="";for(;D!==w||N!==y;)D+=E?1:-1,E&&D>I.cols-1?(P+=I.buffer.translateBufferLineToString(N,!1,b,D),D=0,b=0,N++):!E&&D<0&&(P+=I.buffer.translateBufferLineToString(N,!1,0,b+1),D=I.cols-1,b=D,N--);return P+I.buffer.translateBufferLineToString(N,!1,b,D)}function S(b,M){let w=M?"O":"[";return c.C0.ESC+w+b}function x(b,M){b=Math.floor(b);let w="";for(let y=0;y0?oe-u(oe,G):L;let be=oe,me=(function(De,he,B,X,se,ce){let ke;return ke=p(B,X,se,ce).length>0?X-u(X,se):he,De=B&&keb?"D":"C",x(Math.abs(E-b),S(D,y));D=I>M?"D":"C";let N=Math.abs(I-M);return x((function(P,L){return L.cols-P})(I>M?b:E,w)+(N-1)*w.cols+1+((I>M?E:b)-1),S(D,y))}},1296:function(o,r,a){var c=this&&this.__decorate||function($,ue,be,me){var De,he=arguments.length,B=he<3?ue:me===null?me=Object.getOwnPropertyDescriptor(ue,be):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate($,ue,be,me);else for(var X=$.length-1;X>=0;X--)(De=$[X])&&(B=(he<3?De(B):he>3?De(ue,be,B):De(ue,be))||B);return he>3&&B&&Object.defineProperty(ue,be,B),B},p=this&&this.__param||function($,ue){return function(be,me){ue(be,me,$)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRenderer=void 0;let u=a(3787),h=a(2550),_=a(2223),S=a(6171),x=a(6052),b=a(4725),M=a(8055),w=a(8460),y=a(844),E=a(2585),I="xterm-dom-renderer-owner-",D="xterm-rows",N="xterm-fg-",P="xterm-bg-",L="xterm-focus",re="xterm-selection",oe=1,G=r.DomRenderer=class extends y.Disposable{constructor($,ue,be,me,De,he,B,X,se,ce,ke,ze,Ke){super(),this._terminal=$,this._document=ue,this._element=be,this._screenElement=me,this._viewportElement=De,this._helperContainer=he,this._linkifier2=B,this._charSizeService=se,this._optionsService=ce,this._bufferService=ke,this._coreBrowserService=ze,this._themeService=Ke,this._terminalClass=oe++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new w.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(D),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(re),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(Qe=>this._injectCss(Qe))),this._injectCss(this._themeService.colors),this._rowFactory=X.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(I+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(Qe=>this._handleLinkHover(Qe))),this.register(this._linkifier2.onHideLinkUnderline(Qe=>this._handleLinkLeave(Qe))),this.register((0,y.toDisposable)(()=>{this._element.classList.remove(I+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new h.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let $=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*$,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*$),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/$),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/$),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let be of this._rowElements)be.style.width=`${this.dimensions.css.canvas.width}px`,be.style.height=`${this.dimensions.css.cell.height}px`,be.style.lineHeight=`${this.dimensions.css.cell.height}px`,be.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let ue=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=ue,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss($){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let ue=`${this._terminalSelector} .${D} { color: ${$.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;ue+=`${this._terminalSelector} .${D} .xterm-dim { color: ${M.color.multiplyOpacity($.foreground,.5).css};}`,ue+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let be=`blink_underline_${this._terminalClass}`,me=`blink_bar_${this._terminalClass}`,De=`blink_block_${this._terminalClass}`;ue+=`@keyframes ${be} { 50% { border-bottom-style: hidden; }}`,ue+=`@keyframes ${me} { 50% { box-shadow: none; }}`,ue+=`@keyframes ${De} { 0% { background-color: ${$.cursor.css}; color: ${$.cursorAccent.css}; } 50% { background-color: inherit; color: ${$.cursor.css}; }}`,ue+=`${this._terminalSelector} .${D}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${be} 1s step-end infinite;}${this._terminalSelector} .${D}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${me} 1s step-end infinite;}${this._terminalSelector} .${D}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${De} 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${$.cursor.css}; color: ${$.cursorAccent.css};}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${$.cursor.css} !important; color: ${$.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${$.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${$.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${$.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,ue+=`${this._terminalSelector} .${re} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${re} div { position: absolute; background-color: ${$.selectionBackgroundOpaque.css};}${this._terminalSelector} .${re} div { position: absolute; background-color: ${$.selectionInactiveBackgroundOpaque.css};}`;for(let[he,B]of $.ansi.entries())ue+=`${this._terminalSelector} .${N}${he} { color: ${B.css}; }${this._terminalSelector} .${N}${he}.xterm-dim { color: ${M.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${P}${he} { background-color: ${B.css}; }`;ue+=`${this._terminalSelector} .${N}${_.INVERTED_DEFAULT_COLOR} { color: ${M.color.opaque($.background).css}; }${this._terminalSelector} .${N}${_.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${M.color.multiplyOpacity(M.color.opaque($.background),.5).css}; }${this._terminalSelector} .${P}${_.INVERTED_DEFAULT_COLOR} { background-color: ${$.foreground.css}; }`,this._themeStyleElement.textContent=ue}_setDefaultSpacing(){let $=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${$}px`,this._rowFactory.defaultSpacing=$}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements($,ue){for(let be=this._rowElements.length;be<=ue;be++){let me=this._document.createElement("div");this._rowContainer.appendChild(me),this._rowElements.push(me)}for(;this._rowElements.length>ue;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize($,ue){this._refreshRowElements($,ue),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(L),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(L),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged($,ue,be){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged($,ue,be),this.renderRows(0,this._bufferService.rows-1),!$||!ue)return;this._selectionRenderModel.update(this._terminal,$,ue,be);let me=this._selectionRenderModel.viewportStartRow,De=this._selectionRenderModel.viewportEndRow,he=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(he>=this._bufferService.rows||B<0)return;let X=this._document.createDocumentFragment();if(be){let se=$[0]>ue[0];X.appendChild(this._createSelectionElement(he,se?ue[0]:$[0],se?$[0]:ue[0],B-he+1))}else{let se=me===he?$[0]:0,ce=he===De?ue[0]:this._bufferService.cols;X.appendChild(this._createSelectionElement(he,se,ce));let ke=B-he-1;if(X.appendChild(this._createSelectionElement(he+1,0,this._bufferService.cols,ke)),he!==B){let ze=De===B?ue[0]:this._bufferService.cols;X.appendChild(this._createSelectionElement(B,0,ze))}}this._selectionContainer.appendChild(X)}_createSelectionElement($,ue,be,me=1){let De=this._document.createElement("div"),he=ue*this.dimensions.css.cell.width,B=this.dimensions.css.cell.width*(be-ue);return he+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-he),De.style.height=me*this.dimensions.css.cell.height+"px",De.style.top=$*this.dimensions.css.cell.height+"px",De.style.left=`${he}px`,De.style.width=`${B}px`,De}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let $ of this._rowElements)$.replaceChildren()}renderRows($,ue){let be=this._bufferService.buffer,me=be.ybase+be.y,De=Math.min(be.x,this._bufferService.cols-1),he=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,X=this._optionsService.rawOptions.cursorInactiveStyle;for(let se=$;se<=ue;se++){let ce=se+be.ydisp,ke=this._rowElements[se],ze=be.lines.get(ce);if(!ke||!ze)break;ke.replaceChildren(...this._rowFactory.createRow(ze,ce,ce===me,B,X,De,he,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${I}${this._terminalClass}`}_handleLinkHover($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!0)}_handleLinkLeave($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!1)}_setCellUnderline($,ue,be,me,De,he){be<0&&($=0),me<0&&(ue=0);let B=this._bufferService.rows-1;be=Math.max(Math.min(be,B),0),me=Math.max(Math.min(me,B),0),De=Math.min(De,this._bufferService.cols);let X=this._bufferService.buffer,se=X.ybase+X.y,ce=Math.min(X.x,De-1),ke=this._optionsService.rawOptions.cursorBlink,ze=this._optionsService.rawOptions.cursorStyle,Ke=this._optionsService.rawOptions.cursorInactiveStyle;for(let Qe=be;Qe<=me;++Qe){let ye=Qe+X.ydisp,q=this._rowElements[Qe],Oe=X.lines.get(ye);if(!q||!Oe)break;q.replaceChildren(...this._rowFactory.createRow(Oe,ye,ye===se,ze,Ke,ce,ke,this.dimensions.css.cell.width,this._widthCache,he?Qe===be?$:0:-1,he?(Qe===me?ue:De)-1:-1))}}};r.DomRenderer=G=c([p(7,E.IInstantiationService),p(8,b.ICharSizeService),p(9,E.IOptionsService),p(10,E.IBufferService),p(11,b.ICoreBrowserService),p(12,b.IThemeService)],G)},3787:function(o,r,a){var c=this&&this.__decorate||function(D,N,P,L){var re,oe=arguments.length,G=oe<3?N:L===null?L=Object.getOwnPropertyDescriptor(N,P):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(D,N,P,L);else for(var $=D.length-1;$>=0;$--)(re=D[$])&&(G=(oe<3?re(G):oe>3?re(N,P,G):re(N,P))||G);return oe>3&&G&&Object.defineProperty(N,P,G),G},p=this&&this.__param||function(D,N){return function(P,L){N(P,L,D)}};Object.defineProperty(r,"__esModule",{value:!0}),r.DomRendererRowFactory=void 0;let u=a(2223),h=a(643),_=a(511),S=a(2585),x=a(8055),b=a(4725),M=a(4269),w=a(6171),y=a(3734),E=r.DomRendererRowFactory=class{constructor(D,N,P,L,re,oe,G){this._document=D,this._characterJoinerService=N,this._optionsService=P,this._coreBrowserService=L,this._coreService=re,this._decorationService=oe,this._themeService=G,this._workCell=new _.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(D,N,P){this._selectionStart=D,this._selectionEnd=N,this._columnSelectMode=P}createRow(D,N,P,L,re,oe,G,$,ue,be,me){let De=[],he=this._characterJoinerService.getJoinedCharacters(N),B=this._themeService.colors,X,se=D.getNoBgTrimmedLength();P&&se0&&Xn===he[0][0]){_o=!0;let Go=he.shift();Rn=new M.JoinedCellData(this._workCell,D.translateToString(!0,Go[0],Go[1]),Go[1]-Go[0]),Br=Go[1]-1,Io=Rn.getWidth()}let zd=this._isCellInSelection(Xn,N),Ru=P&&Xn===oe,ek=Tt&&Xn>=be&&Xn<=me,tk=!1;this._decorationService.forEachDecorationAtCell(Xn,N,void 0,Go=>{tk=!0});let Qv=Rn.getChars()||h.WHITESPACE_CELL_CHAR;if(Qv===" "&&(Rn.isUnderline()||Rn.isOverline())&&(Qv="\xA0"),We=Io*$-ue.get(Qv,Rn.isBold(),Rn.isItalic()),X){if(ce&&(zd&&Oe||!zd&&!Oe&&Rn.bg===ze)&&(zd&&Oe&&B.selectionForeground||Rn.fg===Ke)&&Rn.extended.ext===Qe&&ek===ye&&We===q&&!Ru&&!_o&&!tk){Rn.isInvisible()?ke+=h.WHITESPACE_CELL_CHAR:ke+=Qv,ce++;continue}ce&&(X.textContent=ke),X=this._document.createElement("span"),ce=0,ke=""}else X=this._document.createElement("span");if(ze=Rn.bg,Ke=Rn.fg,Qe=Rn.extended.ext,ye=ek,q=We,Oe=zd,_o&&oe>=Xn&&oe<=Br&&(oe=Xn),!this._coreService.isCursorHidden&&Ru&&this._coreService.isCursorInitialized){if(ct.push("xterm-cursor"),this._coreBrowserService.isFocused)G&&ct.push("xterm-cursor-blink"),ct.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(re)switch(re){case"outline":ct.push("xterm-cursor-outline");break;case"block":ct.push("xterm-cursor-block");break;case"bar":ct.push("xterm-cursor-bar");break;case"underline":ct.push("xterm-cursor-underline")}}if(Rn.isBold()&&ct.push("xterm-bold"),Rn.isItalic()&&ct.push("xterm-italic"),Rn.isDim()&&ct.push("xterm-dim"),ke=Rn.isInvisible()?h.WHITESPACE_CELL_CHAR:Rn.getChars()||h.WHITESPACE_CELL_CHAR,Rn.isUnderline()&&(ct.push(`xterm-underline-${Rn.extended.underlineStyle}`),ke===" "&&(ke="\xA0"),!Rn.isUnderlineColorDefault()))if(Rn.isUnderlineColorRGB())X.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Rn.getUnderlineColor()).join(",")})`;else{let Go=Rn.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Rn.isBold()&&Go<8&&(Go+=8),X.style.textDecorationColor=B.ansi[Go].css}Rn.isOverline()&&(ct.push("xterm-overline"),ke===" "&&(ke="\xA0")),Rn.isStrikethrough()&&ct.push("xterm-strikethrough"),ek&&(X.style.textDecoration="underline");let Vs=Rn.getFgColor(),Ig=Rn.getFgColorMode(),tc=Rn.getBgColor(),Ag=Rn.getBgColorMode(),nk=!!Rn.isInverse();if(nk){let Go=Vs;Vs=tc,tc=Go;let e$=Ig;Ig=Ag,Ag=e$}let jd,Xv,$d,Og=!1;switch(this._decorationService.forEachDecorationAtCell(Xn,N,void 0,Go=>{Go.options.layer!=="top"&&Og||(Go.backgroundColorRGB&&(Ag=50331648,tc=Go.backgroundColorRGB.rgba>>8&16777215,jd=Go.backgroundColorRGB),Go.foregroundColorRGB&&(Ig=50331648,Vs=Go.foregroundColorRGB.rgba>>8&16777215,Xv=Go.foregroundColorRGB),Og=Go.options.layer==="top")}),!Og&&zd&&(jd=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,tc=jd.rgba>>8&16777215,Ag=50331648,Og=!0,B.selectionForeground&&(Ig=50331648,Vs=B.selectionForeground.rgba>>8&16777215,Xv=B.selectionForeground)),Og&&ct.push("xterm-decoration-top"),Ag){case 16777216:case 33554432:$d=B.ansi[tc],ct.push(`xterm-bg-${tc}`);break;case 50331648:$d=x.channels.toColor(tc>>16,tc>>8&255,255&tc),this._addStyle(X,`background-color:#${I((tc>>>0).toString(16),"0",6)}`);break;default:nk?($d=B.foreground,ct.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):$d=B.background}switch(jd||Rn.isDim()&&(jd=x.color.multiplyOpacity($d,.5)),Ig){case 16777216:case 33554432:Rn.isBold()&&Vs<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Vs+=8),this._applyMinimumContrast(X,$d,B.ansi[Vs],Rn,jd,void 0)||ct.push(`xterm-fg-${Vs}`);break;case 50331648:let Go=x.channels.toColor(Vs>>16&255,Vs>>8&255,255&Vs);this._applyMinimumContrast(X,$d,Go,Rn,jd,Xv)||this._addStyle(X,`color:#${I(Vs.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(X,$d,B.foreground,Rn,jd,Xv)||nk&&ct.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ct.length&&(X.className=ct.join(" "),ct.length=0),Ru||_o||tk?X.textContent=ke:ce++,We!==this.defaultSpacing&&(X.style.letterSpacing=`${We}px`),De.push(X),Xn=Br}return X&&ce&&(X.textContent=ke),De}_applyMinimumContrast(D,N,P,L,re,oe){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,w.treatGlyphAsBackgroundColor)(L.getCode()))return!1;let G=this._getContrastCache(L),$;if(re||oe||($=G.getColor(N.rgba,P.rgba)),$===void 0){let ue=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);$=x.color.ensureContrastRatio(re||N,oe||P,ue),G.setColor((re||N).rgba,(oe||P).rgba,$??null)}return!!$&&(this._addStyle(D,`color:${$.css}`),!0)}_getContrastCache(D){return D.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(D,N){D.setAttribute("style",`${D.getAttribute("style")||""}${N};`)}_isCellInSelection(D,N){let P=this._selectionStart,L=this._selectionEnd;return!(!P||!L)&&(this._columnSelectMode?P[0]<=L[0]?D>=P[0]&&N>=P[1]&&D=P[1]&&D>=L[0]&&N<=L[1]:N>P[1]&&N=P[0]&&D=P[0])}};function I(D,N,P){for(;D.length{Object.defineProperty(r,"__esModule",{value:!0}),r.WidthCache=void 0,r.WidthCache=class{constructor(a,c){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=a.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let p=a.createElement("span");p.classList.add("xterm-char-measure-element");let u=a.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";let h=a.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontStyle="italic";let _=a.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold",_.style.fontStyle="italic",this._measureElements=[p,u,h,_],this._container.appendChild(p),this._container.appendChild(u),this._container.appendChild(h),this._container.appendChild(_),c.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(a,c,p,u){a===this._font&&c===this._fontSize&&p===this._weight&&u===this._weightBold||(this._font=a,this._fontSize=c,this._weight=p,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(a,c,p){let u=0;if(!c&&!p&&a.length===1&&(u=a.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];let S=this._measure(a,0);return S>0&&(this._flat[u]=S),S}let h=a;c&&(h+="B"),p&&(h+="I");let _=this._holey.get(h);if(_===void 0){let S=0;c&&(S|=1),p&&(S|=2),_=this._measure(a,S),_>0&&this._holey.set(h,_)}return _}_measure(a,c){let p=this._measureElements[c];return p.textContent=a.repeat(32),p.offsetWidth/32}}},2223:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.TEXT_BASELINE=r.DIM_OPACITY=r.INVERTED_DEFAULT_COLOR=void 0;let c=a(6114);r.INVERTED_DEFAULT_COLOR=257,r.DIM_OPACITY=.5,r.TEXT_BASELINE=c.isFirefox||c.isLegacyEdge?"bottom":"ideographic"},6171:(o,r)=>{function a(p){return 57508<=p&&p<=57558}function c(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(r,"__esModule",{value:!0}),r.computeNextVariantOffset=r.createRenderDimensions=r.treatGlyphAsBackgroundColor=r.allowRescaling=r.isEmoji=r.isRestrictedPowerlineGlyph=r.isPowerlineGlyph=r.throwIfFalsy=void 0,r.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},r.isPowerlineGlyph=a,r.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},r.isEmoji=c,r.allowRescaling=function(p,u,h,_){return u===1&&h>Math.ceil(1.5*_)&&p!==void 0&&p>255&&!c(p)&&!a(p)&&!(function(S){return 57344<=S&&S<=63743})(p)},r.treatGlyphAsBackgroundColor=function(p){return a(p)||(function(u){return 9472<=u&&u<=9631})(p)},r.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},r.computeNextVariantOffset=function(p,u,h=0){return(p-(2*Math.round(u)-h))%(2*Math.round(u))}},6052:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createSelectionRenderModel=void 0;class a{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,u,h,_=!1){if(this.selectionStart=u,this.selectionEnd=h,!u||!h||u[0]===h[0]&&u[1]===h[1])return void this.clear();let S=p.buffers.active.ydisp,x=u[1]-S,b=h[1]-S,M=Math.max(x,0),w=Math.min(b,p.rows-1);M>=p.rows||w<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=_,this.viewportStartRow=x,this.viewportEndRow=b,this.viewportCappedStartRow=M,this.viewportCappedEndRow=w,this.startCol=u[0],this.endCol=h[0])}isCellSelected(p,u,h){return!!this.hasSelection&&(h-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&h>=this.viewportCappedStartRow&&u=this.viewportCappedStartRow&&u>=this.endCol&&h<=this.viewportCappedEndRow:h>this.viewportStartRow&&h=this.startCol&&u=this.startCol)}}r.createSelectionRenderModel=function(){return new a}},456:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionModel=void 0,r.SelectionModel=class{constructor(a){this._bufferService=a,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?a%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)-1]:[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[a,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let a=this.selectionStart[0]+this.selectionStartLength;return a>this._bufferService.cols?[a%this._bufferService.cols,this.selectionStart[1]+Math.floor(a/this._bufferService.cols)]:[Math.max(a,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let a=this.selectionStart,c=this.selectionEnd;return!(!a||!c)&&(a[1]>c[1]||a[1]===c[1]&&a[0]>c[0])}handleTrim(a){return this.selectionStart&&(this.selectionStart[1]-=a),this.selectionEnd&&(this.selectionEnd[1]-=a),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(o,r,a){var c=this&&this.__decorate||function(w,y,E,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,E):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,E,I);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(y,E,P):D(y,E))||P);return N>3&&P&&Object.defineProperty(y,E,P),P},p=this&&this.__param||function(w,y){return function(E,I){y(E,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharSizeService=void 0;let u=a(2585),h=a(8460),_=a(844),S=r.CharSizeService=class extends _.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(w,y,E){super(),this._optionsService=E,this.width=0,this.height=0,this._onCharSizeChange=this.register(new h.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new M(this._optionsService))}catch{this._measureStrategy=this.register(new b(w,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){let w=this._measureStrategy.measure();w.width===this.width&&w.height===this.height||(this.width=w.width,this.height=w.height,this._onCharSizeChange.fire())}};r.CharSizeService=S=c([p(2,u.IOptionsService)],S);class x extends _.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,E){y!==void 0&&y>0&&E!==void 0&&E>0&&(this._result.width=y,this._result.height=E)}}class b extends x{constructor(y,E,I){super(),this._document=y,this._parentElement=E,this._optionsService=I,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class M extends x{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(o,r,a){var c=this&&this.__decorate||function(M,w,y,E){var I,D=arguments.length,N=D<3?w:E===null?E=Object.getOwnPropertyDescriptor(w,y):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(M,w,y,E);else for(var P=M.length-1;P>=0;P--)(I=M[P])&&(N=(D<3?I(N):D>3?I(w,y,N):I(w,y))||N);return D>3&&N&&Object.defineProperty(w,y,N),N},p=this&&this.__param||function(M,w){return function(y,E){w(y,E,M)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CharacterJoinerService=r.JoinedCellData=void 0;let u=a(3734),h=a(643),_=a(511),S=a(2585);class x extends u.AttributeData{constructor(w,y,E){super(),this.content=0,this.combinedData="",this.fg=w.fg,this.bg=w.bg,this.combinedData=y,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(w){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.JoinedCellData=x;let b=r.CharacterJoinerService=class A9{constructor(w){this._bufferService=w,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new _.CellData}register(w){let y={id:this._nextCharacterJoinerId++,handler:w};return this._characterJoiners.push(y),y.id}deregister(w){for(let y=0;y1){let G=this._getJoinedRanges(I,P,N,y,D);for(let $=0;$1){let oe=this._getJoinedRanges(I,P,N,y,D);for(let G=0;G{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreBrowserService=void 0;let c=a(844),p=a(8460),u=a(3656);class h extends c.Disposable{constructor(x,b,M){super(),this._textarea=x,this._window=b,this.mainDocument=M,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new _(this._window),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(w=>this._screenDprMonitor.setWindow(w))),this.register((0,p.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",()=>this._isFocused=!0),this._textarea.addEventListener("blur",()=>this._isFocused=!1)}get window(){return this._window}set window(x){this._window!==x&&(this._window=x,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}}r.CoreBrowserService=h;class _ extends c.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new c.MutableDisposable),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,c.toDisposable)(()=>this.clearListener()))}setWindow(x){this._parentWindow=x,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.LinkProviderService=void 0;let c=a(844);class p extends c.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,c.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(h){return this.linkProviders.push(h),{dispose:()=>{let _=this.linkProviders.indexOf(h);_!==-1&&this.linkProviders.splice(_,1)}}}}r.LinkProviderService=p},8934:function(o,r,a){var c=this&&this.__decorate||function(S,x,b,M){var w,y=arguments.length,E=y<3?x:M===null?M=Object.getOwnPropertyDescriptor(x,b):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(S,x,b,M);else for(var I=S.length-1;I>=0;I--)(w=S[I])&&(E=(y<3?w(E):y>3?w(x,b,E):w(x,b))||E);return y>3&&E&&Object.defineProperty(x,b,E),E},p=this&&this.__param||function(S,x){return function(b,M){x(b,M,S)}};Object.defineProperty(r,"__esModule",{value:!0}),r.MouseService=void 0;let u=a(4725),h=a(9806),_=r.MouseService=class{constructor(S,x){this._renderService=S,this._charSizeService=x}getCoords(S,x,b,M,w){return(0,h.getCoords)(window,S,x,b,M,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,w)}getMouseReportCoords(S,x){let b=(0,h.getCoordsRelativeToElement)(window,S,x);if(this._charSizeService.hasValidSize)return b[0]=Math.min(Math.max(b[0],0),this._renderService.dimensions.css.canvas.width-1),b[1]=Math.min(Math.max(b[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(b[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(b[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(b[0]),y:Math.floor(b[1])}}};r.MouseService=_=c([p(0,u.IRenderService),p(1,u.ICharSizeService)],_)},3230:function(o,r,a){var c=this&&this.__decorate||function(w,y,E,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,E):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,E,I);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(y,E,P):D(y,E))||P);return N>3&&P&&Object.defineProperty(y,E,P),P},p=this&&this.__param||function(w,y){return function(E,I){y(E,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.RenderService=void 0;let u=a(6193),h=a(4725),_=a(8460),S=a(844),x=a(7226),b=a(2585),M=r.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(w,y,E,I,D,N,P,L){super(),this._rowCount=w,this._charSizeService=I,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new S.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new _.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new _.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new _.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new _.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer((re,oe)=>this._renderRows(re,oe),P),this.register(this._renderDebouncer),this.register(P.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(N.onResize(()=>this._fullRefresh())),this.register(N.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this.register(E.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(D.onDecorationRegistered(()=>this._fullRefresh())),this.register(D.onDecorationRemoved(()=>this._fullRefresh())),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(N.cols,N.rows),this._fullRefresh()})),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(N.buffer.y,N.buffer.y,!0))),this.register(L.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(P.window,y),this.register(P.onWindowChange(re=>this._registerIntersectionObserver(re,y)))}_registerIntersectionObserver(w,y){if("IntersectionObserver"in w){let E=new w.IntersectionObserver(I=>this._handleIntersectionChange(I[I.length-1]),{threshold:0});E.observe(y),this._observerDisposable.value=(0,S.toDisposable)(()=>E.disconnect())}}_handleIntersectionChange(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(w,y,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,y,this._rowCount))}_renderRows(w,y){this._renderer.value&&(w=Math.min(w,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(w,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:w,end:y}),this._onRender.fire({start:w,end:y}),this._isNextRenderRedrawOnly=!0)}resize(w,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(w){this._renderer.value=w,this._renderer.value&&(this._renderer.value.onRequestRedraw(y=>this.refreshRows(y.start,y.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(w){return this._renderDebouncer.addRefreshCallback(w)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(w,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(w,y)):this._renderer.value.handleResize(w,y),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(w,y,E){this._selectionState.start=w,this._selectionState.end=y,this._selectionState.columnSelectMode=E,this._renderer.value?.handleSelectionChanged(w,y,E)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};r.RenderService=M=c([p(2,b.IOptionsService),p(3,h.ICharSizeService),p(4,b.IDecorationService),p(5,b.IBufferService),p(6,h.ICoreBrowserService),p(7,h.IThemeService)],M)},9312:function(o,r,a){var c=this&&this.__decorate||function(P,L,re,oe){var G,$=arguments.length,ue=$<3?L:oe===null?oe=Object.getOwnPropertyDescriptor(L,re):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(P,L,re,oe);else for(var be=P.length-1;be>=0;be--)(G=P[be])&&(ue=($<3?G(ue):$>3?G(L,re,ue):G(L,re))||ue);return $>3&&ue&&Object.defineProperty(L,re,ue),ue},p=this&&this.__param||function(P,L){return function(re,oe){L(re,oe,P)}};Object.defineProperty(r,"__esModule",{value:!0}),r.SelectionService=void 0;let u=a(9806),h=a(9504),_=a(456),S=a(4725),x=a(8460),b=a(844),M=a(6114),w=a(4841),y=a(511),E=a(2585),I="\xA0",D=new RegExp(I,"g"),N=r.SelectionService=class extends b.Disposable{constructor(P,L,re,oe,G,$,ue,be,me){super(),this._element=P,this._screenElement=L,this._linkifier=re,this._bufferService=oe,this._coreService=G,this._mouseService=$,this._optionsService=ue,this._renderService=be,this._coreBrowserService=me,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=De=>this._handleMouseMove(De),this._mouseUpListener=De=>this._handleMouseUp(De),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(De=>this._handleTrim(De)),this.register(this._bufferService.buffers.onBufferActivate(De=>this._handleBufferActivate(De))),this.enable(),this._model=new _.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,b.toDisposable)(()=>{this._removeMouseDownListeners()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let P=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!P||!L||P[0]===L[0]&&P[1]===L[1])}get selectionText(){let P=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;if(!P||!L)return"";let re=this._bufferService.buffer,oe=[];if(this._activeSelectionMode===3){if(P[0]===L[0])return"";let G=P[0]G.replace(D," ")).join(M.isWindows?`\r `:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(P){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),M.isLinux&&P&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(P){let F=this._getMouseBufferCoords(P),re=this._model.finalSelectionStart,ne=this._model.finalSelectionEnd;return!!(re&&ne&&F)&&this._areCoordsInSelection(F,re,ne)}isCellInSelection(P,F){let re=this._model.finalSelectionStart,ne=this._model.finalSelectionEnd;return!(!re||!ne)&&this._areCoordsInSelection([P,F],re,ne)}_areCoordsInSelection(P,F,re){return P[1]>F[1]&&P[1]=F[0]&&P[0]=F[0]}_selectWordAtCursor(P,F){let re=this._linkifier.currentLink?.link?.range;if(re)return this._model.selectionStart=[re.start.x-1,re.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)(re,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let ne=this._getMouseBufferCoords(P);return!!ne&&(this._selectWordAt(ne,F),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(P,F){this._model.clearSelection(),P=Math.max(P,0),F=Math.min(F,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,P],this._model.selectionEnd=[this._bufferService.cols,F],this.refresh(),this._onSelectionChange.fire()}_handleTrim(P){this._model.handleTrim(P)&&this.refresh()}_getMouseBufferCoords(P){let F=this._mouseService.getCoords(P,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(F)return F[0]--,F[1]--,F[1]+=this._bufferService.buffer.ydisp,F}_getMouseEventScrollAmount(P){let F=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,P,this._screenElement)[1],re=this._renderService.dimensions.css.canvas.height;return F>=0&&F<=re?0:(F>re&&(F-=re),F=Math.min(Math.max(F,-50),50),F/=50,F/Math.abs(F)+Math.round(14*F))}shouldForceSelection(P){return M.isMac?P.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:P.shiftKey}handleMouseDown(P){if(this._mouseDownTimeStamp=P.timeStamp,(P.button!==2||!this.hasSelection)&&P.button===0){if(!this._enabled){if(!this.shouldForceSelection(P))return;P.stopPropagation()}P.preventDefault(),this._dragScrollAmount=0,this._enabled&&P.shiftKey?this._handleIncrementalClick(P):P.detail===1?this._handleSingleClick(P):P.detail===2?this._handleDoubleClick(P):P.detail===3&&this._handleTripleClick(P),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(P){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(P))}_handleSingleClick(P){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(P)?3:0,this._model.selectionStart=this._getMouseBufferCoords(P),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let F=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);F&&F.length!==this._model.selectionStart[0]&&F.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(P){this._selectWordAtCursor(P,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(P){let F=this._getMouseBufferCoords(P);F&&(this._activeSelectionMode=2,this._selectLineAt(F[1]))}shouldColumnSelect(P){return P.altKey&&!(M.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(P){if(P.stopImmediatePropagation(),!this._model.selectionStart)return;let F=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(P),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let re=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(P.ydisp+this._bufferService.rows,P.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=P.ydisp),this.refresh()}}_handleMouseUp(P){let F=P.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&F<500&&P.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let re=this._mouseService.getCoords(P,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(re&&re[0]!==void 0&&re[1]!==void 0){let ne=(0,h.moveToCellSequence)(re[0]-1,re[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(ne,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let P=this._model.finalSelectionStart,F=this._model.finalSelectionEnd,re=!(!P||!F||P[0]===F[0]&&P[1]===F[1]);re?P&&F&&(this._oldSelectionStart&&this._oldSelectionEnd&&P[0]===this._oldSelectionStart[0]&&P[1]===this._oldSelectionStart[1]&&F[0]===this._oldSelectionEnd[0]&&F[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(P,F,re)):this._oldHasSelection&&this._fireOnSelectionChange(P,F,re)}_fireOnSelectionChange(P,F,re){this._oldSelectionStart=P,this._oldSelectionEnd=F,this._oldHasSelection=re,this._onSelectionChange.fire()}_handleBufferActivate(P){this.clearSelection(),this._trimListener.dispose(),this._trimListener=P.activeBuffer.lines.onTrim(F=>this._handleTrim(F))}_convertViewportColToCharacterIndex(P,F){let re=F;for(let ne=0;F>=ne;ne++){let G=P.loadCell(ne,this._workCell).getChars().length;this._workCell.getWidth()===0?re--:G>1&&F!==ne&&(re+=G-1)}return re}setSelection(P,F,re){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[P,F],this._model.selectionStartLength=re,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(P){this._isClickInSelection(P)||(this._selectWordAtCursor(P,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(P,F,re=!0,ne=!0){if(P[0]>=this._bufferService.cols)return;let G=this._bufferService.buffer,j=G.lines.get(P[1]);if(!j)return;let pe=G.translateBufferLineToString(P[1],!1),be=this._convertViewportColToCharacterIndex(j,P[0]),me=be,Ee=P[0]-be,ue=0,V=0,K=0,ae=0;if(pe.charAt(be)===" "){for(;be>0&&pe.charAt(be-1)===" ";)be--;for(;me1&&(ae+=Xe-1,me+=Xe-1);Le>0&&be>0&&!this._isCharWordSeparator(j.loadCell(Le-1,this._workCell));){j.loadCell(Le-1,this._workCell);let xe=this._workCell.getChars().length;this._workCell.getWidth()===0?(ue++,Le--):xe>1&&(K+=xe-1,be-=xe-1),be--,Le--}for(;Ke1&&(ae+=xe-1,me+=xe-1),me++,Ke++}}me++;let se=be+Ee-ue+K,Me=Math.min(this._bufferService.cols,me-be+ue+V-K-ae);if(F||pe.slice(be,me).trim()!==""){if(re&&se===0&&j.getCodePoint(0)!==32){let Le=G.lines.get(P[1]-1);if(Le&&j.isWrapped&&Le.getCodePoint(this._bufferService.cols-1)!==32){let Ke=this._getWordAt([this._bufferService.cols-1,P[1]-1],!1,!0,!1);if(Ke){let Xe=this._bufferService.cols-Ke.start;se-=Xe,Me+=Xe}}}if(ne&&se+Me===this._bufferService.cols&&j.getCodePoint(this._bufferService.cols-1)!==32){let Le=G.lines.get(P[1]+1);if(Le?.isWrapped&&Le.getCodePoint(0)!==32){let Ke=this._getWordAt([0,P[1]+1],!1,!1,!0);Ke&&(Me+=Ke.length)}}return{start:se,length:Me}}}_selectWordAt(P,F){let re=this._getWordAt(P,F);if(re){for(;re.start<0;)re.start+=this._bufferService.cols,P[1]--;this._model.selectionStart=[re.start,P[1]],this._model.selectionStartLength=re.length}}_selectToWordAt(P){let F=this._getWordAt(P,!0);if(F){let re=P[1];for(;F.start<0;)F.start+=this._bufferService.cols,re--;if(!this._model.areSelectionValuesReversed())for(;F.start+F.length>this._bufferService.cols;)F.length-=this._bufferService.cols,re++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?F.start:F.start+F.length,re]}}_isCharWordSeparator(P){return P.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(P.getChars())>=0}_selectLineAt(P){let F=this._bufferService.buffer.getWrappedRangeForLine(P),re={start:{x:0,y:F.first},end:{x:this._bufferService.cols-1,y:F.last}};this._model.selectionStart=[0,F.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,w.getRangeLength)(re,this._bufferService.cols)}};r.SelectionService=N=c([m(3,k.IBufferService),m(4,k.ICoreService),m(5,S.IMouseService),m(6,k.IOptionsService),m(7,S.IRenderService),m(8,S.ICoreBrowserService)],N)},4725:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ILinkProviderService=r.IThemeService=r.ICharacterJoinerService=r.ISelectionService=r.IRenderService=r.IMouseService=r.ICoreBrowserService=r.ICharSizeService=void 0;let c=a(8343);r.ICharSizeService=(0,c.createDecorator)("CharSizeService"),r.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),r.IMouseService=(0,c.createDecorator)("MouseService"),r.IRenderService=(0,c.createDecorator)("RenderService"),r.ISelectionService=(0,c.createDecorator)("SelectionService"),r.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService"),r.IThemeService=(0,c.createDecorator)("ThemeService"),r.ILinkProviderService=(0,c.createDecorator)("LinkProviderService")},6731:function(o,r,a){var c=this&&this.__decorate||function(N,P,F,re){var ne,G=arguments.length,j=G<3?P:re===null?re=Object.getOwnPropertyDescriptor(P,F):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(N,P,F,re);else for(var pe=N.length-1;pe>=0;pe--)(ne=N[pe])&&(j=(G<3?ne(j):G>3?ne(P,F,j):ne(P,F))||j);return G>3&&j&&Object.defineProperty(P,F,j),j},m=this&&this.__param||function(N,P){return function(F,re){P(F,re,N)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;let u=a(7239),h=a(8055),g=a(8460),S=a(844),x=a(2585),C=h.css.toColor("#ffffff"),M=h.css.toColor("#000000"),w=h.css.toColor("#ffffff"),y=h.css.toColor("#000000"),k={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};r.DEFAULT_ANSI_COLORS=Object.freeze((()=>{let N=[h.css.toColor("#2e3436"),h.css.toColor("#cc0000"),h.css.toColor("#4e9a06"),h.css.toColor("#c4a000"),h.css.toColor("#3465a4"),h.css.toColor("#75507b"),h.css.toColor("#06989a"),h.css.toColor("#d3d7cf"),h.css.toColor("#555753"),h.css.toColor("#ef2929"),h.css.toColor("#8ae234"),h.css.toColor("#fce94f"),h.css.toColor("#729fcf"),h.css.toColor("#ad7fa8"),h.css.toColor("#34e2e2"),h.css.toColor("#eeeeec")],P=[0,95,135,175,215,255];for(let F=0;F<216;F++){let re=P[F/36%6|0],ne=P[F/6%6|0],G=P[F%6];N.push({css:h.channels.toCss(re,ne,G),rgba:h.channels.toRgba(re,ne,G)})}for(let F=0;F<24;F++){let re=8+10*F;N.push({css:h.channels.toCss(re,re,re),rgba:h.channels.toRgba(re,re,re)})}return N})());let I=r.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(N){super(),this._optionsService=N,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new g.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:C,background:M,cursor:w,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:k,selectionBackgroundOpaque:h.color.blend(M,k),selectionInactiveBackgroundTransparent:k,selectionInactiveBackgroundOpaque:h.color.blend(M,k),ansi:r.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(N={}){let P=this._colors;if(P.foreground=D(N.foreground,C),P.background=D(N.background,M),P.cursor=D(N.cursor,w),P.cursorAccent=D(N.cursorAccent,y),P.selectionBackgroundTransparent=D(N.selectionBackground,k),P.selectionBackgroundOpaque=h.color.blend(P.background,P.selectionBackgroundTransparent),P.selectionInactiveBackgroundTransparent=D(N.selectionInactiveBackground,P.selectionBackgroundTransparent),P.selectionInactiveBackgroundOpaque=h.color.blend(P.background,P.selectionInactiveBackgroundTransparent),P.selectionForeground=N.selectionForeground?D(N.selectionForeground,h.NULL_COLOR):void 0,P.selectionForeground===h.NULL_COLOR&&(P.selectionForeground=void 0),h.color.isOpaque(P.selectionBackgroundTransparent)&&(P.selectionBackgroundTransparent=h.color.opacity(P.selectionBackgroundTransparent,.3)),h.color.isOpaque(P.selectionInactiveBackgroundTransparent)&&(P.selectionInactiveBackgroundTransparent=h.color.opacity(P.selectionInactiveBackgroundTransparent,.3)),P.ansi=r.DEFAULT_ANSI_COLORS.slice(),P.ansi[0]=D(N.black,r.DEFAULT_ANSI_COLORS[0]),P.ansi[1]=D(N.red,r.DEFAULT_ANSI_COLORS[1]),P.ansi[2]=D(N.green,r.DEFAULT_ANSI_COLORS[2]),P.ansi[3]=D(N.yellow,r.DEFAULT_ANSI_COLORS[3]),P.ansi[4]=D(N.blue,r.DEFAULT_ANSI_COLORS[4]),P.ansi[5]=D(N.magenta,r.DEFAULT_ANSI_COLORS[5]),P.ansi[6]=D(N.cyan,r.DEFAULT_ANSI_COLORS[6]),P.ansi[7]=D(N.white,r.DEFAULT_ANSI_COLORS[7]),P.ansi[8]=D(N.brightBlack,r.DEFAULT_ANSI_COLORS[8]),P.ansi[9]=D(N.brightRed,r.DEFAULT_ANSI_COLORS[9]),P.ansi[10]=D(N.brightGreen,r.DEFAULT_ANSI_COLORS[10]),P.ansi[11]=D(N.brightYellow,r.DEFAULT_ANSI_COLORS[11]),P.ansi[12]=D(N.brightBlue,r.DEFAULT_ANSI_COLORS[12]),P.ansi[13]=D(N.brightMagenta,r.DEFAULT_ANSI_COLORS[13]),P.ansi[14]=D(N.brightCyan,r.DEFAULT_ANSI_COLORS[14]),P.ansi[15]=D(N.brightWhite,r.DEFAULT_ANSI_COLORS[15]),N.extendedAnsi){let F=Math.min(P.ansi.length-16,N.extendedAnsi.length);for(let re=0;re{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;let c=a(8460),m=a(844);class u extends m.Disposable{constructor(g){super(),this._maxLength=g,this.onDeleteEmitter=this.register(new c.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new c.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new c.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(g){if(this._maxLength===g)return;let S=new Array(g);for(let x=0;xthis._length)for(let S=this._length;S=g;C--)this._array[this._getCyclicIndex(C+x.length)]=this._array[this._getCyclicIndex(C)];for(let C=0;Cthis._maxLength){let C=this._length+x.length-this._maxLength;this._startIndex+=C,this._length=this._maxLength,this.onTrimEmitter.fire(C)}else this._length+=x.length}trimStart(g){g>this._length&&(g=this._length),this._startIndex+=g,this._length-=g,this.onTrimEmitter.fire(g)}shiftElements(g,S,x){if(!(S<=0)){if(g<0||g>=this._length)throw new Error("start argument out of range");if(g+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let M=S-1;M>=0;M--)this.set(g+M+x,this.get(g+M));let C=g+S+x-this._length;if(C>0)for(this._length+=C;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let C=0;C{Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0,r.clone=function a(c,m=5){if(typeof c!="object")return c;let u=Array.isArray(c)?[]:{};for(let h in c)u[h]=m<=1?c[h]:c[h]&&a(c[h],m-1);return u}},8055:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;let a=0,c=0,m=0,u=0;var h,g,S,x,C;function M(y){let k=y.toString(16);return k.length<2?"0"+k:k}function w(y,k){return y>>0},y.toColor=function(k,I,D,N){return{css:y.toCss(k,I,D,N),rgba:y.toRgba(k,I,D,N)}}})(h||(r.channels=h={})),(function(y){function k(I,D){return u=Math.round(255*D),[a,c,m]=C.toChannels(I.rgba),{css:h.toCss(a,c,m,u),rgba:h.toRgba(a,c,m,u)}}y.blend=function(I,D){if(u=(255&D.rgba)/255,u===1)return{css:D.css,rgba:D.rgba};let N=D.rgba>>24&255,P=D.rgba>>16&255,F=D.rgba>>8&255,re=I.rgba>>24&255,ne=I.rgba>>16&255,G=I.rgba>>8&255;return a=re+Math.round((N-re)*u),c=ne+Math.round((P-ne)*u),m=G+Math.round((F-G)*u),{css:h.toCss(a,c,m),rgba:h.toRgba(a,c,m)}},y.isOpaque=function(I){return(255&I.rgba)==255},y.ensureContrastRatio=function(I,D,N){let P=C.ensureContrastRatio(I.rgba,D.rgba,N);if(P)return h.toColor(P>>24&255,P>>16&255,P>>8&255)},y.opaque=function(I){let D=(255|I.rgba)>>>0;return[a,c,m]=C.toChannels(D),{css:h.toCss(a,c,m),rgba:D}},y.opacity=k,y.multiplyOpacity=function(I,D){return u=255&I.rgba,k(I,u*D/255)},y.toColorRGB=function(I){return[I.rgba>>24&255,I.rgba>>16&255,I.rgba>>8&255]}})(g||(r.color=g={})),(function(y){let k,I;try{let D=document.createElement("canvas");D.width=1,D.height=1;let N=D.getContext("2d",{willReadFrequently:!0});N&&(k=N,k.globalCompositeOperation="copy",I=k.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(D){if(D.match(/#[\da-f]{3,8}/i))switch(D.length){case 4:return a=parseInt(D.slice(1,2).repeat(2),16),c=parseInt(D.slice(2,3).repeat(2),16),m=parseInt(D.slice(3,4).repeat(2),16),h.toColor(a,c,m);case 5:return a=parseInt(D.slice(1,2).repeat(2),16),c=parseInt(D.slice(2,3).repeat(2),16),m=parseInt(D.slice(3,4).repeat(2),16),u=parseInt(D.slice(4,5).repeat(2),16),h.toColor(a,c,m,u);case 7:return{css:D,rgba:(parseInt(D.slice(1),16)<<8|255)>>>0};case 9:return{css:D,rgba:parseInt(D.slice(1),16)>>>0}}let N=D.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(N)return a=parseInt(N[1]),c=parseInt(N[2]),m=parseInt(N[3]),u=Math.round(255*(N[5]===void 0?1:parseFloat(N[5]))),h.toColor(a,c,m,u);if(!k||!I)throw new Error("css.toColor: Unsupported css format");if(k.fillStyle=I,k.fillStyle=D,typeof k.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(k.fillRect(0,0,1,1),[a,c,m,u]=k.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:h.toRgba(a,c,m,u),css:D}}})(S||(r.css=S={})),(function(y){function k(I,D,N){let P=I/255,F=D/255,re=N/255;return .2126*(P<=.03928?P/12.92:Math.pow((P+.055)/1.055,2.4))+.7152*(F<=.03928?F/12.92:Math.pow((F+.055)/1.055,2.4))+.0722*(re<=.03928?re/12.92:Math.pow((re+.055)/1.055,2.4))}y.relativeLuminance=function(I){return k(I>>16&255,I>>8&255,255&I)},y.relativeLuminance2=k})(x||(r.rgb=x={})),(function(y){function k(D,N,P){let F=D>>24&255,re=D>>16&255,ne=D>>8&255,G=N>>24&255,j=N>>16&255,pe=N>>8&255,be=w(x.relativeLuminance2(G,j,pe),x.relativeLuminance2(F,re,ne));for(;be0||j>0||pe>0);)G-=Math.max(0,Math.ceil(.1*G)),j-=Math.max(0,Math.ceil(.1*j)),pe-=Math.max(0,Math.ceil(.1*pe)),be=w(x.relativeLuminance2(G,j,pe),x.relativeLuminance2(F,re,ne));return(G<<24|j<<16|pe<<8|255)>>>0}function I(D,N,P){let F=D>>24&255,re=D>>16&255,ne=D>>8&255,G=N>>24&255,j=N>>16&255,pe=N>>8&255,be=w(x.relativeLuminance2(G,j,pe),x.relativeLuminance2(F,re,ne));for(;be>>0}y.blend=function(D,N){if(u=(255&N)/255,u===1)return N;let P=N>>24&255,F=N>>16&255,re=N>>8&255,ne=D>>24&255,G=D>>16&255,j=D>>8&255;return a=ne+Math.round((P-ne)*u),c=G+Math.round((F-G)*u),m=j+Math.round((re-j)*u),h.toRgba(a,c,m)},y.ensureContrastRatio=function(D,N,P){let F=x.relativeLuminance(D>>8),re=x.relativeLuminance(N>>8);if(w(F,re)>8));if(pew(F,x.relativeLuminance(be>>8))?j:be}return j}let ne=I(D,N,P),G=w(F,x.relativeLuminance(ne>>8));if(Gw(F,x.relativeLuminance(j>>8))?ne:j}return ne}},y.reduceLuminance=k,y.increaseLuminance=I,y.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(C||(r.rgba=C={})),r.toPaddedHex=M,r.contrastRatio=w},8969:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreTerminal=void 0;let c=a(844),m=a(2585),u=a(4348),h=a(7866),g=a(744),S=a(7302),x=a(6975),C=a(8460),M=a(1753),w=a(1480),y=a(7994),k=a(9282),I=a(5435),D=a(5981),N=a(2660),P=!1;class F extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new C.EventEmitter),this._onScroll.event(ne=>{this._onScrollApi?.fire(ne.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(ne){for(let G in ne)this.optionsService.options[G]=ne[G]}constructor(ne){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new C.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new C.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new C.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new C.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new C.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new C.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new S.OptionsService(ne)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(g.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(h.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(M.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(N.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new I.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,C.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,C.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,C.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,C.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(G=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(G=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new D.WriteBuffer((G,j)=>this._inputHandler.parse(G,j))),this.register((0,C.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(ne,G){this._writeBuffer.write(ne,G)}writeSync(ne,G){this._logService.logLevel<=m.LogLevelEnum.WARN&&!P&&(this._logService.warn("writeSync is unreliable and will be removed soon."),P=!0),this._writeBuffer.writeSync(ne,G)}input(ne,G=!0){this.coreService.triggerDataEvent(ne,G)}resize(ne,G){isNaN(ne)||isNaN(G)||(ne=Math.max(ne,g.MINIMUM_COLS),G=Math.max(G,g.MINIMUM_ROWS),this._bufferService.resize(ne,G))}scroll(ne,G=!1){this._bufferService.scroll(ne,G)}scrollLines(ne,G,j){this._bufferService.scrollLines(ne,G,j)}scrollPages(ne){this.scrollLines(ne*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(ne){let G=ne-this._bufferService.buffer.ydisp;G!==0&&this.scrollLines(G)}registerEscHandler(ne,G){return this._inputHandler.registerEscHandler(ne,G)}registerDcsHandler(ne,G){return this._inputHandler.registerDcsHandler(ne,G)}registerCsiHandler(ne,G){return this._inputHandler.registerCsiHandler(ne,G)}registerOscHandler(ne,G){return this._inputHandler.registerOscHandler(ne,G)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let ne=!1,G=this.optionsService.rawOptions.windowsPty;G&&G.buildNumber!==void 0&&G.buildNumber!==void 0?ne=G.backend==="conpty"&&G.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(ne=!0),ne?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let ne=[];ne.push(this.onLineFeed(k.updateWindowsModeWrappedState.bind(null,this._bufferService))),ne.push(this.registerCsiHandler({final:"H"},()=>((0,k.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)(()=>{for(let G of ne)G.dispose()})}}}r.CoreTerminal=F},8460:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let c=0;cc.fire(m))},r.runAndSubscribe=function(a,c){return c(void 0),a(m=>c(m))}},5435:function(o,r,a){var c=this&&this.__decorate||function(ue,V,K,ae){var se,Me=arguments.length,Le=Me<3?V:ae===null?ae=Object.getOwnPropertyDescriptor(V,K):ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Le=Reflect.decorate(ue,V,K,ae);else for(var Ke=ue.length-1;Ke>=0;Ke--)(se=ue[Ke])&&(Le=(Me<3?se(Le):Me>3?se(V,K,Le):se(V,K))||Le);return Me>3&&Le&&Object.defineProperty(V,K,Le),Le},m=this&&this.__param||function(ue,V){return function(K,ae){V(K,ae,ue)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;let u=a(2584),h=a(7116),g=a(2015),S=a(844),x=a(482),C=a(8437),M=a(8460),w=a(643),y=a(511),k=a(3734),I=a(2585),D=a(1480),N=a(6242),P=a(6351),F=a(5941),re={"(":0,")":1,"*":2,"+":3,"-":1,".":2},ne=131072;function G(ue,V){if(ue>24)return V.setWinLines||!1;switch(ue){case 1:return!!V.restoreWin;case 2:return!!V.minimizeWin;case 3:return!!V.setWinPosition;case 4:return!!V.setWinSizePixels;case 5:return!!V.raiseWin;case 6:return!!V.lowerWin;case 7:return!!V.refreshWin;case 8:return!!V.setWinSizeChars;case 9:return!!V.maximizeWin;case 10:return!!V.fullscreenWin;case 11:return!!V.getWinState;case 13:return!!V.getWinPosition;case 14:return!!V.getWinSizePixels;case 15:return!!V.getScreenSizePixels;case 16:return!!V.getCellSizePixels;case 18:return!!V.getWinSizeChars;case 19:return!!V.getScreenSizeChars;case 20:return!!V.getIconTitle;case 21:return!!V.getWinTitle;case 22:return!!V.pushTitle;case 23:return!!V.popTitle;case 24:return!!V.setWinLines}return!1}var j;(function(ue){ue[ue.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ue[ue.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(j||(r.WindowsOptionsReportType=j={}));let pe=0;class be extends S.Disposable{getAttrData(){return this._curAttrData}constructor(V,K,ae,se,Me,Le,Ke,Xe,xe=new g.EscapeSequenceParser){super(),this._bufferService=V,this._charsetService=K,this._coreService=ae,this._logService=se,this._optionsService=Me,this._oscLinkService=Le,this._coreMouseService=Ke,this._unicodeService=Xe,this._parser=xe,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=C.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=C.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new M.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new M.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new M.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new M.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new M.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new M.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new M.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new M.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new M.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new M.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new M.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new me(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(Q=>this._activeBuffer=Q.activeBuffer)),this._parser.setCsiHandlerFallback((Q,Ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(Q),params:Ae.toArray()})}),this._parser.setEscHandlerFallback(Q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(Q)})}),this._parser.setExecuteHandlerFallback(Q=>{this._logService.debug("Unknown EXECUTE code: ",{code:Q})}),this._parser.setOscHandlerFallback((Q,Ae,qe)=>{this._logService.debug("Unknown OSC code: ",{identifier:Q,action:Ae,data:qe})}),this._parser.setDcsHandlerFallback((Q,Ae,qe)=>{Ae==="HOOK"&&(qe=qe.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(Q),action:Ae,payload:qe})}),this._parser.setPrintHandler((Q,Ae,qe)=>this.print(Q,Ae,qe)),this._parser.registerCsiHandler({final:"@"},Q=>this.insertChars(Q)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},Q=>this.scrollLeft(Q)),this._parser.registerCsiHandler({final:"A"},Q=>this.cursorUp(Q)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},Q=>this.scrollRight(Q)),this._parser.registerCsiHandler({final:"B"},Q=>this.cursorDown(Q)),this._parser.registerCsiHandler({final:"C"},Q=>this.cursorForward(Q)),this._parser.registerCsiHandler({final:"D"},Q=>this.cursorBackward(Q)),this._parser.registerCsiHandler({final:"E"},Q=>this.cursorNextLine(Q)),this._parser.registerCsiHandler({final:"F"},Q=>this.cursorPrecedingLine(Q)),this._parser.registerCsiHandler({final:"G"},Q=>this.cursorCharAbsolute(Q)),this._parser.registerCsiHandler({final:"H"},Q=>this.cursorPosition(Q)),this._parser.registerCsiHandler({final:"I"},Q=>this.cursorForwardTab(Q)),this._parser.registerCsiHandler({final:"J"},Q=>this.eraseInDisplay(Q,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},Q=>this.eraseInDisplay(Q,!0)),this._parser.registerCsiHandler({final:"K"},Q=>this.eraseInLine(Q,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},Q=>this.eraseInLine(Q,!0)),this._parser.registerCsiHandler({final:"L"},Q=>this.insertLines(Q)),this._parser.registerCsiHandler({final:"M"},Q=>this.deleteLines(Q)),this._parser.registerCsiHandler({final:"P"},Q=>this.deleteChars(Q)),this._parser.registerCsiHandler({final:"S"},Q=>this.scrollUp(Q)),this._parser.registerCsiHandler({final:"T"},Q=>this.scrollDown(Q)),this._parser.registerCsiHandler({final:"X"},Q=>this.eraseChars(Q)),this._parser.registerCsiHandler({final:"Z"},Q=>this.cursorBackwardTab(Q)),this._parser.registerCsiHandler({final:"`"},Q=>this.charPosAbsolute(Q)),this._parser.registerCsiHandler({final:"a"},Q=>this.hPositionRelative(Q)),this._parser.registerCsiHandler({final:"b"},Q=>this.repeatPrecedingCharacter(Q)),this._parser.registerCsiHandler({final:"c"},Q=>this.sendDeviceAttributesPrimary(Q)),this._parser.registerCsiHandler({prefix:">",final:"c"},Q=>this.sendDeviceAttributesSecondary(Q)),this._parser.registerCsiHandler({final:"d"},Q=>this.linePosAbsolute(Q)),this._parser.registerCsiHandler({final:"e"},Q=>this.vPositionRelative(Q)),this._parser.registerCsiHandler({final:"f"},Q=>this.hVPosition(Q)),this._parser.registerCsiHandler({final:"g"},Q=>this.tabClear(Q)),this._parser.registerCsiHandler({final:"h"},Q=>this.setMode(Q)),this._parser.registerCsiHandler({prefix:"?",final:"h"},Q=>this.setModePrivate(Q)),this._parser.registerCsiHandler({final:"l"},Q=>this.resetMode(Q)),this._parser.registerCsiHandler({prefix:"?",final:"l"},Q=>this.resetModePrivate(Q)),this._parser.registerCsiHandler({final:"m"},Q=>this.charAttributes(Q)),this._parser.registerCsiHandler({final:"n"},Q=>this.deviceStatus(Q)),this._parser.registerCsiHandler({prefix:"?",final:"n"},Q=>this.deviceStatusPrivate(Q)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},Q=>this.softReset(Q)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},Q=>this.setCursorStyle(Q)),this._parser.registerCsiHandler({final:"r"},Q=>this.setScrollRegion(Q)),this._parser.registerCsiHandler({final:"s"},Q=>this.saveCursor(Q)),this._parser.registerCsiHandler({final:"t"},Q=>this.windowOptions(Q)),this._parser.registerCsiHandler({final:"u"},Q=>this.restoreCursor(Q)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},Q=>this.insertColumns(Q)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},Q=>this.deleteColumns(Q)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},Q=>this.selectProtected(Q)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},Q=>this.requestMode(Q,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},Q=>this.requestMode(Q,!1)),this._parser.setExecuteHandler(u.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(u.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(u.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(u.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(u.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(u.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(u.C1.IND,()=>this.index()),this._parser.setExecuteHandler(u.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(u.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new N.OscHandler(Q=>(this.setTitle(Q),this.setIconName(Q),!0))),this._parser.registerOscHandler(1,new N.OscHandler(Q=>this.setIconName(Q))),this._parser.registerOscHandler(2,new N.OscHandler(Q=>this.setTitle(Q))),this._parser.registerOscHandler(4,new N.OscHandler(Q=>this.setOrReportIndexedColor(Q))),this._parser.registerOscHandler(8,new N.OscHandler(Q=>this.setHyperlink(Q))),this._parser.registerOscHandler(10,new N.OscHandler(Q=>this.setOrReportFgColor(Q))),this._parser.registerOscHandler(11,new N.OscHandler(Q=>this.setOrReportBgColor(Q))),this._parser.registerOscHandler(12,new N.OscHandler(Q=>this.setOrReportCursorColor(Q))),this._parser.registerOscHandler(104,new N.OscHandler(Q=>this.restoreIndexedColor(Q))),this._parser.registerOscHandler(110,new N.OscHandler(Q=>this.restoreFgColor(Q))),this._parser.registerOscHandler(111,new N.OscHandler(Q=>this.restoreBgColor(Q))),this._parser.registerOscHandler(112,new N.OscHandler(Q=>this.restoreCursorColor(Q))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let Q in h.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:Q},()=>this.selectCharset("("+Q)),this._parser.registerEscHandler({intermediates:")",final:Q},()=>this.selectCharset(")"+Q)),this._parser.registerEscHandler({intermediates:"*",final:Q},()=>this.selectCharset("*"+Q)),this._parser.registerEscHandler({intermediates:"+",final:Q},()=>this.selectCharset("+"+Q)),this._parser.registerEscHandler({intermediates:"-",final:Q},()=>this.selectCharset("-"+Q)),this._parser.registerEscHandler({intermediates:".",final:Q},()=>this.selectCharset("."+Q)),this._parser.registerEscHandler({intermediates:"/",final:Q},()=>this.selectCharset("/"+Q));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(Q=>(this._logService.error("Parsing error: ",Q),Q)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new P.DcsHandler((Q,Ae)=>this.requestStatusString(Q,Ae)))}_preserveStack(V,K,ae,se){this._parseStack.paused=!0,this._parseStack.cursorStartX=V,this._parseStack.cursorStartY=K,this._parseStack.decodedLength=ae,this._parseStack.position=se}_logSlowResolvingAsync(V){this._logService.logLevel<=I.LogLevelEnum.WARN&&Promise.race([V,new Promise((K,ae)=>setTimeout(()=>ae("#SLOW_TIMEOUT"),5e3))]).catch(K=>{if(K!=="#SLOW_TIMEOUT")throw K;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(V,K){let ae,se=this._activeBuffer.x,Me=this._activeBuffer.y,Le=0,Ke=this._parseStack.paused;if(Ke){if(ae=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,K))return this._logSlowResolvingAsync(ae),ae;se=this._parseStack.cursorStartX,Me=this._parseStack.cursorStartY,this._parseStack.paused=!1,V.length>ne&&(Le=this._parseStack.position+ne)}if(this._logService.logLevel<=I.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof V=="string"?` "${V}"`:` "${Array.prototype.map.call(V,Q=>String.fromCharCode(Q)).join("")}"`),typeof V=="string"?V.split("").map(Q=>Q.charCodeAt(0)):V),this._parseBuffer.lengthne)for(let Q=Le;Q0&&qe.getWidth(this._activeBuffer.x-1)===2&&qe.setCellFromCodepoint(this._activeBuffer.x-1,0,1,Ae);let ct=this._parser.precedingJoinState;for(let Et=K;EtXe){if(xe){let Hr=qe,Tn=this._activeBuffer.x-xo;for(this._activeBuffer.x=xo,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),qe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),xo>0&&qe instanceof C.BufferLine&&qe.copyCellsFrom(Hr,Tn,0,xo,!1);Tn=0;)qe.setCellFromCodepoint(this._activeBuffer.x++,0,0,Ae)}else if(Q&&(qe.insertCells(this._activeBuffer.x,Me-xo,this._activeBuffer.getNullCell(Ae)),qe.getWidth(Xe-1)===2&&qe.setCellFromCodepoint(Xe-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,Ae)),qe.setCellFromCodepoint(this._activeBuffer.x++,se,Me,Ae),Me>0)for(;--Me;)qe.setCellFromCodepoint(this._activeBuffer.x++,0,0,Ae)}this._parser.precedingJoinState=ct,this._activeBuffer.x0&&qe.getWidth(this._activeBuffer.x)===0&&!qe.hasContent(this._activeBuffer.x)&&qe.setCellFromCodepoint(this._activeBuffer.x,0,1,Ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(V,K){return V.final!=="t"||V.prefix||V.intermediates?this._parser.registerCsiHandler(V,K):this._parser.registerCsiHandler(V,ae=>!G(ae.params[0],this._optionsService.rawOptions.windowOptions)||K(ae))}registerDcsHandler(V,K){return this._parser.registerDcsHandler(V,new P.DcsHandler(K))}registerEscHandler(V,K){return this._parser.registerEscHandler(V,K)}registerOscHandler(V,K){return this._parser.registerOscHandler(V,new N.OscHandler(K))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);V.hasWidth(this._activeBuffer.x)&&!V.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let V=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-V),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(V=this._bufferService.cols-1){this._activeBuffer.x=Math.min(V,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(V,K){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=V,this._activeBuffer.y=this._activeBuffer.scrollTop+K):(this._activeBuffer.x=V,this._activeBuffer.y=K),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(V,K){this._restrictCursor(),this._setCursor(this._activeBuffer.x+V,this._activeBuffer.y+K)}cursorUp(V){let K=this._activeBuffer.y-this._activeBuffer.scrollTop;return K>=0?this._moveCursor(0,-Math.min(K,V.params[0]||1)):this._moveCursor(0,-(V.params[0]||1)),!0}cursorDown(V){let K=this._activeBuffer.scrollBottom-this._activeBuffer.y;return K>=0?this._moveCursor(0,Math.min(K,V.params[0]||1)):this._moveCursor(0,V.params[0]||1),!0}cursorForward(V){return this._moveCursor(V.params[0]||1,0),!0}cursorBackward(V){return this._moveCursor(-(V.params[0]||1),0),!0}cursorNextLine(V){return this.cursorDown(V),this._activeBuffer.x=0,!0}cursorPrecedingLine(V){return this.cursorUp(V),this._activeBuffer.x=0,!0}cursorCharAbsolute(V){return this._setCursor((V.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(V){return this._setCursor(V.length>=2?(V.params[1]||1)-1:0,(V.params[0]||1)-1),!0}charPosAbsolute(V){return this._setCursor((V.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(V){return this._moveCursor(V.params[0]||1,0),!0}linePosAbsolute(V){return this._setCursor(this._activeBuffer.x,(V.params[0]||1)-1),!0}vPositionRelative(V){return this._moveCursor(0,V.params[0]||1),!0}hVPosition(V){return this.cursorPosition(V),!0}tabClear(V){let K=V.params[0];return K===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:K===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(V){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let K=V.params[0]||1;for(;K--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(V){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let K=V.params[0]||1;for(;K--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(V){let K=V.params[0];return K===1&&(this._curAttrData.bg|=536870912),K!==2&&K!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(V,K,ae,se=!1,Me=!1){let Le=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);Le.replaceCells(K,ae,this._activeBuffer.getNullCell(this._eraseAttrData()),Me),se&&(Le.isWrapped=!1)}_resetBufferLine(V,K=!1){let ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);ae&&(ae.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),K),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+V),ae.isWrapped=!1)}eraseInDisplay(V,K=!1){let ae;switch(this._restrictCursor(this._bufferService.cols),V.params[0]){case 0:for(ae=this._activeBuffer.y,this._dirtyRowTracker.markDirty(ae),this._eraseInBufferLine(ae++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,K);ae=this._bufferService.cols&&(this._activeBuffer.lines.get(ae+1).isWrapped=!1);ae--;)this._resetBufferLine(ae,K);this._dirtyRowTracker.markDirty(0);break;case 2:for(ae=this._bufferService.rows,this._dirtyRowTracker.markDirty(ae-1);ae--;)this._resetBufferLine(ae,K);this._dirtyRowTracker.markDirty(0);break;case 3:let se=this._activeBuffer.lines.length-this._bufferService.rows;se>0&&(this._activeBuffer.lines.trimStart(se),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-se,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-se,0),this._onScroll.fire(0))}return!0}eraseInLine(V,K=!1){switch(this._restrictCursor(this._bufferService.cols),V.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,K);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,K);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,K)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(V){this._restrictCursor();let K=V.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let xe=Xe;for(let Q=1;Q0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(V){return V.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(V.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(V){return(this._optionsService.rawOptions.termName+"").indexOf(V)===0}setMode(V){for(let K=0;KNo?1:2,ct=V.params[0];return Et=ct,Yn=K?ct===2?4:ct===4?qe(Le.modes.insertMode):ct===12?3:ct===20?qe(Ae.convertEol):0:ct===1?qe(ae.applicationCursorKeys):ct===3?Ae.windowOptions.setWinLines?Xe===80?2:Xe===132?1:0:0:ct===6?qe(ae.origin):ct===7?qe(ae.wraparound):ct===8?3:ct===9?qe(se==="X10"):ct===12?qe(Ae.cursorBlink):ct===25?qe(!Le.isCursorHidden):ct===45?qe(ae.reverseWraparound):ct===66?qe(ae.applicationKeypad):ct===67?4:ct===1e3?qe(se==="VT200"):ct===1002?qe(se==="DRAG"):ct===1003?qe(se==="ANY"):ct===1004?qe(ae.sendFocus):ct===1005?4:ct===1006?qe(Me==="SGR"):ct===1015?4:ct===1016?qe(Me==="SGR_PIXELS"):ct===1048?1:ct===47||ct===1047||ct===1049?qe(xe===Q):ct===2004?qe(ae.bracketedPasteMode):0,Le.triggerDataEvent(`${u.C0.ESC}[${K?"":"?"}${Et};${Yn}$y`),!0;var Et,Yn}_updateAttrColor(V,K,ae,se,Me){return K===2?(V|=50331648,V&=-16777216,V|=k.AttributeData.fromColorRGB([ae,se,Me])):K===5&&(V&=-50331904,V|=33554432|255&ae),V}_extractColor(V,K,ae){let se=[0,0,-1,0,0,0],Me=0,Le=0;do{if(se[Le+Me]=V.params[K+Le],V.hasSubParams(K+Le)){let Ke=V.getSubParams(K+Le),Xe=0;do se[1]===5&&(Me=1),se[Le+Xe+1+Me]=Ke[Xe];while(++Xe=2||se[1]===2&&Le+Me>=5)break;se[1]&&(Me=1)}while(++Le+K5)&&(V=1),K.extended.underlineStyle=V,K.fg|=268435456,V===0&&(K.fg&=-268435457),K.updateExtended()}_processSGR0(V){V.fg=C.DEFAULT_ATTR_DATA.fg,V.bg=C.DEFAULT_ATTR_DATA.bg,V.extended=V.extended.clone(),V.extended.underlineStyle=0,V.extended.underlineColor&=-67108864,V.updateExtended()}charAttributes(V){if(V.length===1&&V.params[0]===0)return this._processSGR0(this._curAttrData),!0;let K=V.length,ae,se=this._curAttrData;for(let Me=0;Me=30&&ae<=37?(se.fg&=-50331904,se.fg|=16777216|ae-30):ae>=40&&ae<=47?(se.bg&=-50331904,se.bg|=16777216|ae-40):ae>=90&&ae<=97?(se.fg&=-50331904,se.fg|=16777224|ae-90):ae>=100&&ae<=107?(se.bg&=-50331904,se.bg|=16777224|ae-100):ae===0?this._processSGR0(se):ae===1?se.fg|=134217728:ae===3?se.bg|=67108864:ae===4?(se.fg|=268435456,this._processUnderline(V.hasSubParams(Me)?V.getSubParams(Me)[0]:1,se)):ae===5?se.fg|=536870912:ae===7?se.fg|=67108864:ae===8?se.fg|=1073741824:ae===9?se.fg|=2147483648:ae===2?se.bg|=134217728:ae===21?this._processUnderline(2,se):ae===22?(se.fg&=-134217729,se.bg&=-134217729):ae===23?se.bg&=-67108865:ae===24?(se.fg&=-268435457,this._processUnderline(0,se)):ae===25?se.fg&=-536870913:ae===27?se.fg&=-67108865:ae===28?se.fg&=-1073741825:ae===29?se.fg&=2147483647:ae===39?(se.fg&=-67108864,se.fg|=16777215&C.DEFAULT_ATTR_DATA.fg):ae===49?(se.bg&=-67108864,se.bg|=16777215&C.DEFAULT_ATTR_DATA.bg):ae===38||ae===48||ae===58?Me+=this._extractColor(V,Me,se):ae===53?se.bg|=1073741824:ae===55?se.bg&=-1073741825:ae===59?(se.extended=se.extended.clone(),se.extended.underlineColor=-1,se.updateExtended()):ae===100?(se.fg&=-67108864,se.fg|=16777215&C.DEFAULT_ATTR_DATA.fg,se.bg&=-67108864,se.bg|=16777215&C.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",ae);return!0}deviceStatus(V){switch(V.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:let K=this._activeBuffer.y+1,ae=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${K};${ae}R`)}return!0}deviceStatusPrivate(V){if(V.params[0]===6){let K=this._activeBuffer.y+1,ae=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${K};${ae}R`)}return!0}softReset(V){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=C.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(V){let K=V.params[0]||1;switch(K){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}let ae=K%2==1;return this._optionsService.options.cursorBlink=ae,!0}setScrollRegion(V){let K=V.params[0]||1,ae;return(V.length<2||(ae=V.params[1])>this._bufferService.rows||ae===0)&&(ae=this._bufferService.rows),ae>K&&(this._activeBuffer.scrollTop=K-1,this._activeBuffer.scrollBottom=ae-1,this._setCursor(0,0)),!0}windowOptions(V){if(!G(V.params[0],this._optionsService.rawOptions.windowOptions))return!0;let K=V.length>1?V.params[1]:0;switch(V.params[0]){case 14:K!==2&&this._onRequestWindowsOptionsReport.fire(j.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(j.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:K!==0&&K!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),K!==0&&K!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:K!==0&&K!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),K!==0&&K!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(V){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(V){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(V){return this._windowTitle=V,this._onTitleChange.fire(V),!0}setIconName(V){return this._iconName=V,!0}setOrReportIndexedColor(V){let K=[],ae=V.split(";");for(;ae.length>1;){let se=ae.shift(),Me=ae.shift();if(/^\d+$/.exec(se)){let Le=parseInt(se);if(Ee(Le))if(Me==="?")K.push({type:0,index:Le});else{let Ke=(0,F.parseColor)(Me);Ke&&K.push({type:1,index:Le,color:Ke})}}}return K.length&&this._onColor.fire(K),!0}setHyperlink(V){let K=V.split(";");return!(K.length<2)&&(K[1]?this._createHyperlink(K[0],K[1]):!K[0]&&this._finishHyperlink())}_createHyperlink(V,K){this._getCurrentLinkId()&&this._finishHyperlink();let ae=V.split(":"),se,Me=ae.findIndex(Le=>Le.startsWith("id="));return Me!==-1&&(se=ae[Me].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:se,uri:K}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(V,K){let ae=V.split(";");for(let se=0;se=this._specialColors.length);++se,++K)if(ae[se]==="?")this._onColor.fire([{type:0,index:this._specialColors[K]}]);else{let Me=(0,F.parseColor)(ae[se]);Me&&this._onColor.fire([{type:1,index:this._specialColors[K],color:Me}])}return!0}setOrReportFgColor(V){return this._setOrReportSpecialColor(V,0)}setOrReportBgColor(V){return this._setOrReportSpecialColor(V,1)}setOrReportCursorColor(V){return this._setOrReportSpecialColor(V,2)}restoreIndexedColor(V){if(!V)return this._onColor.fire([{type:2}]),!0;let K=[],ae=V.split(";");for(let se=0;se=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let V=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,V,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=C.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=C.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(V){return this._charsetService.setgLevel(V),!0}screenAlignmentPattern(){let V=new y.CellData;V.content=4194373,V.fg=this._curAttrData.fg,V.bg=this._curAttrData.bg,this._setCursor(0,0);for(let K=0;K(this._coreService.triggerDataEvent(`${u.C0.ESC}${Me}${u.C0.ESC}\\`),!0))(V==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:V==='"p'?'P1$r61;1"p':V==="r"?`P1$r${ae.scrollTop+1};${ae.scrollBottom+1}r`:V==="m"?"P1$r0m":V===" q"?`P1$r${{block:2,underline:4,bar:6}[se.cursorStyle]-(se.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(V,K){this._dirtyRowTracker.markRangeDirty(V,K)}}r.InputHandler=be;let me=class{constructor(ue){this._bufferService=ue,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ue){uethis.end&&(this.end=ue)}markRangeDirty(ue,V){ue>V&&(pe=ue,ue=V,V=pe),uethis.end&&(this.end=V)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Ee(ue){return 0<=ue&&ue<256}me=c([m(0,I.IBufferService)],me)},844:(o,r)=>{function a(c){for(let m of c)m.dispose();c.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(let c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){let m=this._disposables.indexOf(c);m!==-1&&this._disposables.splice(m,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){this._isDisposed||c===this._value||(this._value?.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},r.toDisposable=function(c){return{dispose:c}},r.disposeArray=a,r.getDisposeArrayDisposable=function(c){return{dispose:()=>a(c)}}},1505:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(m,u,h){this._data[m]||(this._data[m]={}),this._data[m][u]=h}get(m,u){return this._data[m]?this._data[m][u]:void 0}clear(){this._data={}}}r.TwoKeyMap=a,r.FourKeyMap=class{constructor(){this._data=new a}set(c,m,u,h,g){this._data.get(c,m)||this._data.set(c,m,new a),this._data.get(c,m).set(u,h,g)}get(c,m,u,h){return this._data.get(c,m)?.get(u,h)}clear(){this._data.clear()}}},6114:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof process<"u"&&"title"in process;let a=r.isNode?"node":navigator.userAgent,c=r.isNode?"node":navigator.platform;r.isFirefox=a.includes("Firefox"),r.isLegacyEdge=a.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(a),r.getSafariVersion=function(){if(!r.isSafari)return 0;let m=a.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),r.isIpad=c==="iPad",r.isIphone=c==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),r.isLinux=c.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(a)},6106:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SortedList=void 0;let a=0;r.SortedList=class{constructor(c){this._getKey=c,this._array=[]}clear(){this._array.length=0}insert(c){this._array.length!==0?(a=this._search(this._getKey(c)),this._array.splice(a,0,c)):this._array.push(c)}delete(c){if(this._array.length===0)return!1;let m=this._getKey(c);if(m===void 0||(a=this._search(m),a===-1)||this._getKey(this._array[a])!==m)return!1;do if(this._array[a]===c)return this._array.splice(a,1),!0;while(++a=this._array.length)&&this._getKey(this._array[a])===c))do yield this._array[a];while(++a=this._array.length)&&this._getKey(this._array[a])===c))do m(this._array[a]);while(++a=m;){let h=m+u>>1,g=this._getKey(this._array[h]);if(g>c)u=h-1;else{if(!(g0&&this._getKey(this._array[h-1])===c;)h--;return h}m=h+1}}return m}}},7226:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;let c=a(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(g){this._tasks.push(g),this._start()}flush(){for(;this._iM)return C-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(C-S))}ms`),void this._start();C=M}this.clear()}}class u extends m{_requestCallback(g){return setTimeout(()=>g(this._createDeadline(16)))}_cancelCallback(g){clearTimeout(g)}_createDeadline(g){let S=Date.now()+g;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}r.PriorityTaskQueue=u,r.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(h){return requestIdleCallback(h)}_cancelCallback(h){cancelIdleCallback(h)}}:u,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(h){this._queue.clear(),this._queue.enqueue(h)}flush(){this._queue.flush()}}},9282:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.updateWindowsModeWrappedState=void 0;let c=a(643);r.updateWindowsModeWrappedState=function(m){let u=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),h=u?.get(m.cols-1),g=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);g&&h&&(g.isWrapped=h[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&h[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){let u=new a;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}r.AttributeData=a;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){let u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,h=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=h}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=c},9092:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Buffer=r.MAX_BUFFER_SIZE=void 0;let c=a(6349),m=a(7226),u=a(3734),h=a(8437),g=a(4634),S=a(511),x=a(643),C=a(4863),M=a(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(w,y,k){this._hasScrollback=w,this._optionsService=y,this._bufferService=k,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=h.DEFAULT_ATTR_DATA.clone(),this.savedCharset=M.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(w){return w?(this._nullCell.fg=w.fg,this._nullCell.bg=w.bg,this._nullCell.extended=w.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(w){return w?(this._whitespaceCell.fg=w.fg,this._whitespaceCell.bg=w.bg,this._whitespaceCell.extended=w.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,y){return new h.BufferLine(this._bufferService.cols,this.getNullCell(w),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let w=this.ybase+this.y-this.ydisp;return w>=0&&wr.MAX_BUFFER_SIZE?r.MAX_BUFFER_SIZE:y}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=h.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(w))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(w,y){let k=this.getNullCell(h.DEFAULT_ATTR_DATA),I=0,D=this._getCorrectBufferLength(y);if(D>this.lines.maxLength&&(this.lines.maxLength=D),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+N+1?(this.ybase--,N++,this.ydisp>0&&this.ydisp--):this.lines.push(new h.BufferLine(w,k)));else for(let P=this._rows;P>y;P--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(D0&&(this.lines.trimStart(P),this.ybase=Math.max(this.ybase-P,0),this.ydisp=Math.max(this.ydisp-P,0),this.savedY=Math.max(this.savedY-P,0)),this.lines.maxLength=D}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,y-1),N&&(this.y+=N),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(w,y),this._cols>w))for(let N=0;N.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let w=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,w=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return w}get _isReflowEnabled(){let w=this._optionsService.rawOptions.windowsPty;return w&&w.buildNumber?this._hasScrollback&&w.backend==="conpty"&&w.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(w,y){this._cols!==w&&(w>this._cols?this._reflowLarger(w,y):this._reflowSmaller(w,y))}_reflowLarger(w,y){let k=(0,g.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,this.ybase+this.y,this.getNullCell(h.DEFAULT_ATTR_DATA));if(k.length>0){let I=(0,g.reflowLargerCreateNewLayout)(this.lines,k);(0,g.reflowLargerApplyNewLayout)(this.lines,I.layout),this._reflowLargerAdjustViewport(w,y,I.countRemoved)}}_reflowLargerAdjustViewport(w,y,k){let I=this.getNullCell(h.DEFAULT_ATTR_DATA),D=k;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;N--){let P=this.lines.get(N);if(!P||!P.isWrapped&&P.getTrimmedLength()<=w)continue;let F=[P];for(;P.isWrapped&&N>0;)P=this.lines.get(--N),F.unshift(P);let re=this.ybase+this.y;if(re>=N&&re0&&(I.push({start:N+F.length+D,newLines:be}),D+=be.length),F.push(...be);let me=G.length-1,Ee=G[me];Ee===0&&(me--,Ee=G[me]);let ue=F.length-j-1,V=ne;for(;ue>=0;){let ae=Math.min(V,Ee);if(F[me]===void 0)break;if(F[me].copyCellsFrom(F[ue],V-ae,Ee-ae,ae,!0),Ee-=ae,Ee===0&&(me--,Ee=G[me]),V-=ae,V===0){ue--;let se=Math.max(ue,0);V=(0,g.getWrappedLineTrimmedLength)(F,se,this._cols)}}for(let ae=0;ae0;)this.ybase===0?this.y0){let N=[],P=[];for(let me=0;me=0;me--)if(G&&G.start>re+j){for(let Ee=G.newLines.length-1;Ee>=0;Ee--)this.lines.set(me--,G.newLines[Ee]);me++,N.push({index:re+1,amount:G.newLines.length}),j+=G.newLines.length,G=I[++ne]}else this.lines.set(me,P[re--]);let pe=0;for(let me=N.length-1;me>=0;me--)N[me].index+=pe,this.lines.onInsertEmitter.fire(N[me]),pe+=N[me].amount;let be=Math.max(0,F+D-this.lines.maxLength);be>0&&this.lines.onTrimEmitter.fire(be)}}translateBufferLineToString(w,y,k=0,I){let D=this.lines.get(w);return D?D.translateToString(y,k,I):""}getWrappedRangeForLine(w){let y=w,k=w;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;k+10;);return w>=this._cols?this._cols-1:w<0?0:w}nextStop(w){for(w==null&&(w=this.x);!this.tabs[++w]&&w=this._cols?this._cols-1:w<0?0:w}clearMarkers(w){this._isClearing=!0;for(let y=0;y{y.line-=k,y.line<0&&y.dispose()})),y.register(this.lines.onInsert(k=>{y.line>=k.index&&(y.line+=k.amount)})),y.register(this.lines.onDelete(k=>{y.line>=k.index&&y.linek.index&&(y.line-=k.amount)})),y.register(y.onDispose(()=>this._removeMarker(y))),y}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLine=r.DEFAULT_ATTR_DATA=void 0;let c=a(3734),m=a(511),u=a(643),h=a(482);r.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);let g=0;class S{constructor(C,M,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*C);let y=M||m.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let k=0;k>22,2097152&M?this._combined[C].charCodeAt(this._combined[C].length-1):w]}set(C,M){this._data[3*C+1]=M[u.CHAR_DATA_ATTR_INDEX],M[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[C]=M[1],this._data[3*C+0]=2097152|C|M[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*C+0]=M[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|M[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(C){return this._data[3*C+0]>>22}hasWidth(C){return 12582912&this._data[3*C+0]}getFg(C){return this._data[3*C+1]}getBg(C){return this._data[3*C+2]}hasContent(C){return 4194303&this._data[3*C+0]}getCodePoint(C){let M=this._data[3*C+0];return 2097152&M?this._combined[C].charCodeAt(this._combined[C].length-1):2097151&M}isCombined(C){return 2097152&this._data[3*C+0]}getString(C){let M=this._data[3*C+0];return 2097152&M?this._combined[C]:2097151&M?(0,h.stringFromCodePoint)(2097151&M):""}isProtected(C){return 536870912&this._data[3*C+2]}loadCell(C,M){return g=3*C,M.content=this._data[g+0],M.fg=this._data[g+1],M.bg=this._data[g+2],2097152&M.content&&(M.combinedData=this._combined[C]),268435456&M.bg&&(M.extended=this._extendedAttrs[C]),M}setCell(C,M){2097152&M.content&&(this._combined[C]=M.combinedData),268435456&M.bg&&(this._extendedAttrs[C]=M.extended),this._data[3*C+0]=M.content,this._data[3*C+1]=M.fg,this._data[3*C+2]=M.bg}setCellFromCodepoint(C,M,w,y){268435456&y.bg&&(this._extendedAttrs[C]=y.extended),this._data[3*C+0]=M|w<<22,this._data[3*C+1]=y.fg,this._data[3*C+2]=y.bg}addCodepointToCell(C,M,w){let y=this._data[3*C+0];2097152&y?this._combined[C]+=(0,h.stringFromCodePoint)(M):2097151&y?(this._combined[C]=(0,h.stringFromCodePoint)(2097151&y)+(0,h.stringFromCodePoint)(M),y&=-2097152,y|=2097152):y=M|4194304,w&&(y&=-12582913,y|=w<<22),this._data[3*C+0]=y}insertCells(C,M,w){if((C%=this.length)&&this.getWidth(C-1)===2&&this.setCellFromCodepoint(C-1,0,1,w),M=0;--k)this.setCell(C+M+k,this.loadCell(C+k,y));for(let k=0;kthis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{let y=new Uint32Array(w);y.set(this._data),this._data=y}for(let y=this.length;y=C&&delete this._combined[D]}let k=Object.keys(this._extendedAttrs);for(let I=0;I=C&&delete this._extendedAttrs[D]}}return this.length=C,4*w*2=0;--C)if(4194303&this._data[3*C+0])return C+(this._data[3*C+0]>>22);return 0}getNoBgTrimmedLength(){for(let C=this.length-1;C>=0;--C)if(4194303&this._data[3*C+0]||50331648&this._data[3*C+2])return C+(this._data[3*C+0]>>22);return 0}copyCellsFrom(C,M,w,y,k){let I=C._data;if(k)for(let N=y-1;N>=0;N--){for(let P=0;P<3;P++)this._data[3*(w+N)+P]=I[3*(M+N)+P];268435456&I[3*(M+N)+2]&&(this._extendedAttrs[w+N]=C._extendedAttrs[M+N])}else for(let N=0;N=M&&(this._combined[P-M+w]=C._combined[P])}}translateToString(C,M,w,y){M=M??0,w=w??this.length,C&&(w=Math.min(w,this.getTrimmedLength())),y&&(y.length=0);let k="";for(;M>22||1}return y&&y.push(M),k}}r.BufferLine=S},4841:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getRangeLength=void 0,r.getRangeLength=function(a,c){if(a.start.y>a.end.y)throw new Error(`Buffer range end (${a.end.x}, ${a.end.y}) cannot be before start (${a.start.x}, ${a.start.y})`);return c*(a.end.y-a.start.y)+(a.end.x-a.start.x+1)}},4634:(o,r)=>{function a(c,m,u){if(m===c.length-1)return c[m].getTrimmedLength();let h=!c[m].hasContent(u-1)&&c[m].getWidth(u-1)===1,g=c[m+1].getWidth(0)===2;return h&&g?u-1:u}Object.defineProperty(r,"__esModule",{value:!0}),r.getWrappedLineTrimmedLength=r.reflowSmallerGetNewLineLengths=r.reflowLargerApplyNewLayout=r.reflowLargerCreateNewLayout=r.reflowLargerGetLinesToRemove=void 0,r.reflowLargerGetLinesToRemove=function(c,m,u,h,g){let S=[];for(let x=0;x=x&&h0&&(P>y||w[P].getTrimmedLength()===0);P--)N++;N>0&&(S.push(x+w.length-N),S.push(N)),x+=w.length-1}return S},r.reflowLargerCreateNewLayout=function(c,m){let u=[],h=0,g=m[h],S=0;for(let x=0;xa(c,w,m)).reduce((M,w)=>M+w),S=0,x=0,C=0;for(;CM&&(S-=M,x++);let w=c[x].getWidth(S-1)===2;w&&S--;let y=w?u-1:u;h.push(y),C+=y}return h},r.getWrappedLineTrimmedLength=a},5295:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferSet=void 0;let c=a(8460),m=a(844),u=a(9092);class h extends m.Disposable{constructor(S,x){super(),this._optionsService=S,this._bufferService=x,this._onBufferActivate=this.register(new c.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(S,x){this._normal.resize(S,x),this._alt.resize(S,x),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}r.BufferSet=h},511:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;let c=a(482),m=a(643),u=a(3734);class h extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(S){let x=new h;return x.setFromCharData(S),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(S[m.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(S[m.CHAR_DATA_CHAR_INDEX].length===2){let C=S[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=C&&C<=56319){let M=S[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=M&&M<=57343?this.content=1024*(C-55296)+M-56320+65536|S[m.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=S[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[m.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=S[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=h},643:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},4863:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Marker=void 0;let c=a(8460),m=a(844);class u{get id(){return this._id}constructor(g){this.line=g,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(g){return this._disposables.push(g),g}}r.Marker=u,u._nextId=1},7116:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CHARSET=r.CHARSETS=void 0,r.CHARSETS={},r.DEFAULT_CHARSET=r.CHARSETS.B,r.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},r.CHARSETS.A={"#":"\xA3"},r.CHARSETS.B=void 0,r.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},r.CHARSETS.C=r.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},r.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},r.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},r.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},r.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},r.CHARSETS.E=r.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},r.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},r.CHARSETS.H=r.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},r.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(o,r)=>{var a,c,m;Object.defineProperty(r,"__esModule",{value:!0}),r.C1_ESCAPED=r.C1=r.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=` -`,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL="\x7F"})(a||(r.C0=a={})),(function(u){u.PAD="\x80",u.HOP="\x81",u.BPH="\x82",u.NBH="\x83",u.IND="\x84",u.NEL="\x85",u.SSA="\x86",u.ESA="\x87",u.HTS="\x88",u.HTJ="\x89",u.VTS="\x8A",u.PLD="\x8B",u.PLU="\x8C",u.RI="\x8D",u.SS2="\x8E",u.SS3="\x8F",u.DCS="\x90",u.PU1="\x91",u.PU2="\x92",u.STS="\x93",u.CCH="\x94",u.MW="\x95",u.SPA="\x96",u.EPA="\x97",u.SOS="\x98",u.SGCI="\x99",u.SCI="\x9A",u.CSI="\x9B",u.ST="\x9C",u.OSC="\x9D",u.PM="\x9E",u.APC="\x9F"})(c||(r.C1=c={})),(function(u){u.ST=`${a.ESC}\\`})(m||(r.C1_ESCAPED=m={}))},7399:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;let c=a(2584),m={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};r.evaluateKeyboardEvent=function(u,h,g,S){let x={type:0,cancel:!1,key:void 0},C=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?x.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?x.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?x.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(x.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:x.key=u.ctrlKey?"\b":c.C0.DEL,u.altKey&&(x.key=c.C0.ESC+x.key);break;case 9:if(u.shiftKey){x.key=c.C0.ESC+"[Z";break}x.key=c.C0.HT,x.cancel=!0;break;case 13:x.key=u.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,x.cancel=!0;break;case 27:x.key=c.C0.ESC,u.altKey&&(x.key=c.C0.ESC+c.C0.ESC),x.cancel=!0;break;case 37:if(u.metaKey)break;C?(x.key=c.C0.ESC+"[1;"+(C+1)+"D",x.key===c.C0.ESC+"[1;3D"&&(x.key=c.C0.ESC+(g?"b":"[1;5D"))):x.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(u.metaKey)break;C?(x.key=c.C0.ESC+"[1;"+(C+1)+"C",x.key===c.C0.ESC+"[1;3C"&&(x.key=c.C0.ESC+(g?"f":"[1;5C"))):x.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(u.metaKey)break;C?(x.key=c.C0.ESC+"[1;"+(C+1)+"A",g||x.key!==c.C0.ESC+"[1;3A"||(x.key=c.C0.ESC+"[1;5A")):x.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(u.metaKey)break;C?(x.key=c.C0.ESC+"[1;"+(C+1)+"B",g||x.key!==c.C0.ESC+"[1;3B"||(x.key=c.C0.ESC+"[1;5B")):x.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(x.key=c.C0.ESC+"[2~");break;case 46:x.key=C?c.C0.ESC+"[3;"+(C+1)+"~":c.C0.ESC+"[3~";break;case 36:x.key=C?c.C0.ESC+"[1;"+(C+1)+"H":h?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:x.key=C?c.C0.ESC+"[1;"+(C+1)+"F":h?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:u.shiftKey?x.type=2:u.ctrlKey?x.key=c.C0.ESC+"[5;"+(C+1)+"~":x.key=c.C0.ESC+"[5~";break;case 34:u.shiftKey?x.type=3:u.ctrlKey?x.key=c.C0.ESC+"[6;"+(C+1)+"~":x.key=c.C0.ESC+"[6~";break;case 112:x.key=C?c.C0.ESC+"[1;"+(C+1)+"P":c.C0.ESC+"OP";break;case 113:x.key=C?c.C0.ESC+"[1;"+(C+1)+"Q":c.C0.ESC+"OQ";break;case 114:x.key=C?c.C0.ESC+"[1;"+(C+1)+"R":c.C0.ESC+"OR";break;case 115:x.key=C?c.C0.ESC+"[1;"+(C+1)+"S":c.C0.ESC+"OS";break;case 116:x.key=C?c.C0.ESC+"[15;"+(C+1)+"~":c.C0.ESC+"[15~";break;case 117:x.key=C?c.C0.ESC+"[17;"+(C+1)+"~":c.C0.ESC+"[17~";break;case 118:x.key=C?c.C0.ESC+"[18;"+(C+1)+"~":c.C0.ESC+"[18~";break;case 119:x.key=C?c.C0.ESC+"[19;"+(C+1)+"~":c.C0.ESC+"[19~";break;case 120:x.key=C?c.C0.ESC+"[20;"+(C+1)+"~":c.C0.ESC+"[20~";break;case 121:x.key=C?c.C0.ESC+"[21;"+(C+1)+"~":c.C0.ESC+"[21~";break;case 122:x.key=C?c.C0.ESC+"[23;"+(C+1)+"~":c.C0.ESC+"[23~";break;case 123:x.key=C?c.C0.ESC+"[24;"+(C+1)+"~":c.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(g&&!S||!u.altKey||u.metaKey)!g||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?x.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(x.key=c.C0.US),u.key==="@"&&(x.key=c.C0.NUL)):u.keyCode===65&&(x.type=1);else{let M=m[u.keyCode],w=M?.[u.shiftKey?1:0];if(w)x.key=c.C0.ESC+w;else if(u.keyCode>=65&&u.keyCode<=90){let y=u.ctrlKey?u.keyCode-64:u.keyCode+32,k=String.fromCharCode(y);u.shiftKey&&(k=k.toUpperCase()),x.key=c.C0.ESC+k}else if(u.keyCode===32)x.key=c.C0.ESC+(u.ctrlKey?c.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let y=u.code.slice(3,4);u.shiftKey||(y=y.toLowerCase()),x.key=c.C0.ESC+y,x.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?x.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?x.key=c.C0.NUL:u.keyCode>=51&&u.keyCode<=55?x.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?x.key=c.C0.DEL:u.keyCode===219?x.key=c.C0.ESC:u.keyCode===220?x.key=c.C0.FS:u.keyCode===221&&(x.key=c.C0.GS)}return x}},482:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},r.utf32ToString=function(a,c=0,m=a.length){let u="";for(let h=c;h65535?(g-=65536,u+=String.fromCharCode(55296+(g>>10))+String.fromCharCode(g%1024+56320)):u+=String.fromCharCode(g)}return u},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,c){let m=a.length;if(!m)return 0;let u=0,h=0;if(this._interim){let g=a.charCodeAt(h++);56320<=g&&g<=57343?c[u++]=1024*(this._interim-55296)+g-56320+65536:(c[u++]=this._interim,c[u++]=g),this._interim=0}for(let g=h;g=m)return this._interim=S,u;let x=a.charCodeAt(g);56320<=x&&x<=57343?c[u++]=1024*(S-55296)+x-56320+65536:(c[u++]=S,c[u++]=x)}else S!==65279&&(c[u++]=S)}return u}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,c){let m=a.length;if(!m)return 0;let u,h,g,S,x=0,C=0,M=0;if(this.interim[0]){let k=!1,I=this.interim[0];I&=(224&I)==192?31:(240&I)==224?15:7;let D,N=0;for(;(D=63&this.interim[++N])&&N<4;)I<<=6,I|=D;let P=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,F=P-N;for(;M=m)return 0;if(D=a[M++],(192&D)!=128){M--,k=!0;break}this.interim[N++]=D,I<<=6,I|=63&D}k||(P===2?I<128?M--:c[x++]=I:P===3?I<2048||I>=55296&&I<=57343||I===65279||(c[x++]=I):I<65536||I>1114111||(c[x++]=I)),this.interim.fill(0)}let w=m-4,y=M;for(;y=m)return this.interim[0]=u,x;if(h=a[y++],(192&h)!=128){y--;continue}if(C=(31&u)<<6|63&h,C<128){y--;continue}c[x++]=C}else if((240&u)==224){if(y>=m)return this.interim[0]=u,x;if(h=a[y++],(192&h)!=128){y--;continue}if(y>=m)return this.interim[0]=u,this.interim[1]=h,x;if(g=a[y++],(192&g)!=128){y--;continue}if(C=(15&u)<<12|(63&h)<<6|63&g,C<2048||C>=55296&&C<=57343||C===65279)continue;c[x++]=C}else if((248&u)==240){if(y>=m)return this.interim[0]=u,x;if(h=a[y++],(192&h)!=128){y--;continue}if(y>=m)return this.interim[0]=u,this.interim[1]=h,x;if(g=a[y++],(192&g)!=128){y--;continue}if(y>=m)return this.interim[0]=u,this.interim[1]=h,this.interim[2]=g,x;if(S=a[y++],(192&S)!=128){y--;continue}if(C=(7&u)<<18|(63&h)<<12|(63&g)<<6|63&S,C<65536||C>1114111)continue;c[x++]=C}}return x}}},225:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;let c=a(1480),m=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],h;r.UnicodeV6=class{constructor(){if(this.version="6",!h){h=new Uint8Array(65536),h.fill(1),h[0]=0,h.fill(0,1,32),h.fill(0,127,160),h.fill(2,4352,4448),h[9001]=2,h[9002]=2,h.fill(2,11904,42192),h[12351]=1,h.fill(2,44032,55204),h.fill(2,63744,64256),h.fill(2,65040,65050),h.fill(2,65072,65136),h.fill(2,65280,65377),h.fill(2,65504,65511);for(let g=0;gx[w][1])return!1;for(;w>=M;)if(C=M+w>>1,S>x[C][1])M=C+1;else{if(!(S=131072&&g<=196605||g>=196608&&g<=262141?2:1}charProperties(g,S){let x=this.wcwidth(g),C=x===0&&S!==0;if(C){let M=c.UnicodeService.extractWidth(S);M===0?C=!1:M>x&&(x=M)}return c.UnicodeService.createPropertyValue(0,x,C)}}},5981:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WriteBuffer=void 0;let c=a(8460),m=a(844);class u extends m.Disposable{constructor(g){super(),this._action=g,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(g,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);let C=this._callbacks.shift();C&&C()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(g,S){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(S),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(S)}_innerWrite(g=0,S=!0){let x=g||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){let C=this._writeBuffer[this._bufferOffset],M=this._action(C,S);if(M){let y=k=>Date.now()-x>=12?setTimeout(()=>this._innerWrite(0,k)):this._innerWrite(x,k);return void M.catch(k=>(queueMicrotask(()=>{throw k}),Promise.resolve(!1))).then(y)}let w=this._callbacks[this._bufferOffset];if(w&&w(),this._bufferOffset++,this._pendingData-=C.length,Date.now()-x>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}r.WriteBuffer=u},5941:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.toRgbString=r.parseColor=void 0;let a=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,c=/^[\da-f]+$/;function m(u,h){let g=u.toString(16),S=g.length<2?"0"+g:g;switch(h){case 4:return g[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}r.parseColor=function(u){if(!u)return;let h=u.toLowerCase();if(h.indexOf("rgb:")===0){h=h.slice(4);let g=a.exec(h);if(g){let S=g[1]?15:g[4]?255:g[7]?4095:65535;return[Math.round(parseInt(g[1]||g[4]||g[7]||g[10],16)/S*255),Math.round(parseInt(g[2]||g[5]||g[8]||g[11],16)/S*255),Math.round(parseInt(g[3]||g[6]||g[9]||g[12],16)/S*255)]}}else if(h.indexOf("#")===0&&(h=h.slice(1),c.exec(h)&&[3,6,9,12].includes(h.length))){let g=h.length/3,S=[0,0,0];for(let x=0;x<3;++x){let C=parseInt(h.slice(g*x,g*x+g),16);S[x]=g===1?C<<4:g===2?C:g===3?C>>4:C>>8}return S}},r.toRgbString=function(u,h=16){let[g,S,x]=u;return`rgb:${m(g,h)}/${m(S,h)}/${m(x,h)}`}},5770:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DcsHandler=r.DcsParser=void 0;let c=a(482),m=a(8742),u=a(5770),h=[];r.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=h,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}registerHandler(S,x){this._handlers[S]===void 0&&(this._handlers[S]=[]);let C=this._handlers[S];return C.push(x),{dispose:()=>{let M=C.indexOf(x);M!==-1&&C.splice(M,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=h,this._ident=0}hook(S,x){if(this.reset(),this._ident=S,this._active=this._handlers[S]||h,this._active.length)for(let C=this._active.length-1;C>=0;C--)this._active[C].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(S,x,C){if(this._active.length)for(let M=this._active.length-1;M>=0;M--)this._active[M].put(S,x,C);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(S,x,C))}unhook(S,x=!0){if(this._active.length){let C=!1,M=this._active.length-1,w=!1;if(this._stack.paused&&(M=this._stack.loopPosition-1,C=x,w=this._stack.fallThrough,this._stack.paused=!1),!w&&C===!1){for(;M>=0&&(C=this._active[M].unhook(S),C!==!0);M--)if(C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=M,this._stack.fallThrough=!1,C;M--}for(;M>=0;M--)if(C=this._active[M].unhook(!1),C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=M,this._stack.fallThrough=!0,C}else this._handlerFb(this._ident,"UNHOOK",S);this._active=h,this._ident=0}};let g=new m.Params;g.addParam(0),r.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=g,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():g,this._data="",this._hitLimit=!1}put(S,x,C){this._hitLimit||(this._data+=(0,c.utf32ToString)(S,x,C),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let x=!1;if(this._hitLimit)x=!1;else if(S&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then(C=>(this._params=g,this._data="",this._hitLimit=!1,C));return this._params=g,this._data="",this._hitLimit=!1,x}}},2015:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.EscapeSequenceParser=r.VT500_TRANSITION_TABLE=r.TransitionTable=void 0;let c=a(844),m=a(8742),u=a(6242),h=a(6351);class g{constructor(M){this.table=new Uint8Array(M)}setDefault(M,w){this.table.fill(M<<4|w)}add(M,w,y,k){this.table[w<<8|M]=y<<4|k}addMany(M,w,y,k){for(let I=0;IP),w=(N,P)=>M.slice(N,P),y=w(32,127),k=w(0,24);k.push(25),k.push.apply(k,w(28,32));let I=w(0,14),D;for(D in C.setDefault(1,0),C.addMany(y,0,2,0),I)C.addMany([24,26,153,154],D,3,0),C.addMany(w(128,144),D,3,0),C.addMany(w(144,152),D,3,0),C.add(156,D,0,0),C.add(27,D,11,1),C.add(157,D,4,8),C.addMany([152,158,159],D,0,7),C.add(155,D,11,3),C.add(144,D,11,9);return C.addMany(k,0,3,0),C.addMany(k,1,3,1),C.add(127,1,0,1),C.addMany(k,8,0,8),C.addMany(k,3,3,3),C.add(127,3,0,3),C.addMany(k,4,3,4),C.add(127,4,0,4),C.addMany(k,6,3,6),C.addMany(k,5,3,5),C.add(127,5,0,5),C.addMany(k,2,3,2),C.add(127,2,0,2),C.add(93,1,4,8),C.addMany(y,8,5,8),C.add(127,8,5,8),C.addMany([156,27,24,26,7],8,6,0),C.addMany(w(28,32),8,0,8),C.addMany([88,94,95],1,0,7),C.addMany(y,7,0,7),C.addMany(k,7,0,7),C.add(156,7,0,0),C.add(127,7,0,7),C.add(91,1,11,3),C.addMany(w(64,127),3,7,0),C.addMany(w(48,60),3,8,4),C.addMany([60,61,62,63],3,9,4),C.addMany(w(48,60),4,8,4),C.addMany(w(64,127),4,7,0),C.addMany([60,61,62,63],4,0,6),C.addMany(w(32,64),6,0,6),C.add(127,6,0,6),C.addMany(w(64,127),6,0,0),C.addMany(w(32,48),3,9,5),C.addMany(w(32,48),5,9,5),C.addMany(w(48,64),5,0,6),C.addMany(w(64,127),5,7,0),C.addMany(w(32,48),4,9,5),C.addMany(w(32,48),1,9,2),C.addMany(w(32,48),2,9,2),C.addMany(w(48,127),2,10,0),C.addMany(w(48,80),1,10,0),C.addMany(w(81,88),1,10,0),C.addMany([89,90,92],1,10,0),C.addMany(w(96,127),1,10,0),C.add(80,1,11,9),C.addMany(k,9,0,9),C.add(127,9,0,9),C.addMany(w(28,32),9,0,9),C.addMany(w(32,48),9,9,12),C.addMany(w(48,60),9,8,10),C.addMany([60,61,62,63],9,9,10),C.addMany(k,11,0,11),C.addMany(w(32,128),11,0,11),C.addMany(w(28,32),11,0,11),C.addMany(k,10,0,10),C.add(127,10,0,10),C.addMany(w(28,32),10,0,10),C.addMany(w(48,60),10,8,10),C.addMany([60,61,62,63],10,0,11),C.addMany(w(32,48),10,9,12),C.addMany(k,12,0,12),C.add(127,12,0,12),C.addMany(w(28,32),12,0,12),C.addMany(w(32,48),12,9,12),C.addMany(w(48,64),12,0,11),C.addMany(w(64,127),12,12,13),C.addMany(w(64,127),10,12,13),C.addMany(w(64,127),9,12,13),C.addMany(k,13,13,13),C.addMany(y,13,13,13),C.add(127,13,0,13),C.addMany([27,156,24,26],13,14,0),C.add(S,0,2,0),C.add(S,8,5,8),C.add(S,6,0,6),C.add(S,11,0,11),C.add(S,13,13,13),C})();class x extends c.Disposable{constructor(M=r.VT500_TRANSITION_TABLE){super(),this._transitions=M,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(w,y,k)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,y)=>{},this._escHandlerFb=w=>{},this._errorHandlerFb=w=>w,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,c.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new h.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(M,w=[64,126]){let y=0;if(M.prefix){if(M.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=M.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(M.intermediates){if(M.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let I=0;ID||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=D}}if(M.final.length!==1)throw new Error("final must be a single byte");let k=M.final.charCodeAt(0);if(w[0]>k||k>w[1])throw new Error(`final must be in range ${w[0]} .. ${w[1]}`);return y<<=8,y|=k,y}identToString(M){let w=[];for(;M;)w.push(String.fromCharCode(255&M)),M>>=8;return w.reverse().join("")}setPrintHandler(M){this._printHandler=M}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(M,w){let y=this._identifier(M,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);let k=this._escHandlers[y];return k.push(w),{dispose:()=>{let I=k.indexOf(w);I!==-1&&k.splice(I,1)}}}clearEscHandler(M){this._escHandlers[this._identifier(M,[48,126])]&&delete this._escHandlers[this._identifier(M,[48,126])]}setEscHandlerFallback(M){this._escHandlerFb=M}setExecuteHandler(M,w){this._executeHandlers[M.charCodeAt(0)]=w}clearExecuteHandler(M){this._executeHandlers[M.charCodeAt(0)]&&delete this._executeHandlers[M.charCodeAt(0)]}setExecuteHandlerFallback(M){this._executeHandlerFb=M}registerCsiHandler(M,w){let y=this._identifier(M);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);let k=this._csiHandlers[y];return k.push(w),{dispose:()=>{let I=k.indexOf(w);I!==-1&&k.splice(I,1)}}}clearCsiHandler(M){this._csiHandlers[this._identifier(M)]&&delete this._csiHandlers[this._identifier(M)]}setCsiHandlerFallback(M){this._csiHandlerFb=M}registerDcsHandler(M,w){return this._dcsParser.registerHandler(this._identifier(M),w)}clearDcsHandler(M){this._dcsParser.clearHandler(this._identifier(M))}setDcsHandlerFallback(M){this._dcsParser.setHandlerFallback(M)}registerOscHandler(M,w){return this._oscParser.registerHandler(M,w)}clearOscHandler(M){this._oscParser.clearHandler(M)}setOscHandlerFallback(M){this._oscParser.setHandlerFallback(M)}setErrorHandler(M){this._errorHandler=M}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(M,w,y,k,I){this._parseStack.state=M,this._parseStack.handlers=w,this._parseStack.handlerPos=y,this._parseStack.transition=k,this._parseStack.chunkPos=I}parse(M,w,y){let k,I=0,D=0,N=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,N=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let P=this._parseStack.handlers,F=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&F>-1){for(;F>=0&&(k=P[F](this._params),k!==!0);F--)if(k instanceof Promise)return this._parseStack.handlerPos=F,k}this._parseStack.handlers=[];break;case 4:if(y===!1&&F>-1){for(;F>=0&&(k=P[F](),k!==!0);F--)if(k instanceof Promise)return this._parseStack.handlerPos=F,k}this._parseStack.handlers=[];break;case 6:if(I=M[this._parseStack.chunkPos],k=this._dcsParser.unhook(I!==24&&I!==26,y),k)return k;I===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(I=M[this._parseStack.chunkPos],k=this._oscParser.end(I!==24&&I!==26,y),k)return k;I===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,N=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let P=N;P>4){case 2:for(let j=P+1;;++j){if(j>=w||(I=M[j])<32||I>126&&I=w||(I=M[j])<32||I>126&&I=w||(I=M[j])<32||I>126&&I=w||(I=M[j])<32||I>126&&I=0&&(k=F[re](this._params),k!==!0);re--)if(k instanceof Promise)return this._preserveStack(3,F,re,D,P),k;re<0&&this._csiHandlerFb(this._collect<<8|I,this._params),this.precedingJoinState=0;break;case 8:do switch(I){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(I-48)}while(++P47&&I<60);P--;break;case 9:this._collect<<=8,this._collect|=I;break;case 10:let ne=this._escHandlers[this._collect<<8|I],G=ne?ne.length-1:-1;for(;G>=0&&(k=ne[G](),k!==!0);G--)if(k instanceof Promise)return this._preserveStack(4,ne,G,D,P),k;G<0&&this._escHandlerFb(this._collect<<8|I),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|I,this._params);break;case 13:for(let j=P+1;;++j)if(j>=w||(I=M[j])===24||I===26||I===27||I>127&&I=w||(I=M[j])<32||I>127&&I{Object.defineProperty(r,"__esModule",{value:!0}),r.OscHandler=r.OscParser=void 0;let c=a(5770),m=a(482),u=[];r.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(h,g){this._handlers[h]===void 0&&(this._handlers[h]=[]);let S=this._handlers[h];return S.push(g),{dispose:()=>{let x=S.indexOf(g);x!==-1&&S.splice(x,1)}}}clearHandler(h){this._handlers[h]&&delete this._handlers[h]}setHandlerFallback(h){this._handlerFb=h}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let h=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;h>=0;--h)this._active[h].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].start();else this._handlerFb(this._id,"START")}_put(h,g,S){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(h,g,S);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(h,g,S))}start(){this.reset(),this._state=1}put(h,g,S){if(this._state!==3){if(this._state===1)for(;g0&&this._put(h,g,S)}}end(h,g=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,x=this._active.length-1,C=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,S=g,C=this._stack.fallThrough,this._stack.paused=!1),!C&&S===!1){for(;x>=0&&(S=this._active[x].end(h),S!==!0);x--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,S;x--}for(;x>=0;x--)if(S=this._active[x].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",h);this._active=u,this._id=-1,this._state=0}}},r.OscHandler=class{constructor(h){this._handler=h,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(h,g,S){this._hitLimit||(this._data+=(0,m.utf32ToString)(h,g,S),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(h){let g=!1;if(this._hitLimit)g=!1;else if(h&&(g=this._handler(this._data),g instanceof Promise))return g.then(S=>(this._data="",this._hitLimit=!1,S));return this._data="",this._hitLimit=!1,g}}},8742:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Params=void 0;let a=2147483647;class c{static fromArray(u){let h=new c;if(!u.length)return h;for(let g=Array.isArray(u[0])?1:0;g256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(h),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){let u=new c(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){let u=[];for(let h=0;h>8,S=255&this._subParamsIdx[h];S-g>0&&u.push(Array.prototype.slice.call(this._subParams,g,S))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>a?a:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>a?a:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){let h=this._subParamsIdx[u]>>8,g=255&this._subParamsIdx[u];return g-h>0?this._subParams.subarray(h,g):null}getSubParamsAll(){let u={};for(let h=0;h>8,S=255&this._subParamsIdx[h];S-g>0&&(u[h]=this._subParams.slice(g,S))}return u}addDigit(u){let h;if(this._rejectDigits||!(h=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let g=this._digitIsSub?this._subParams:this.params,S=g[h-1];g[h-1]=~S?Math.min(10*S+u,a):u}}r.Params=c},5741:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.AddonManager=void 0,r.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let a=this._addons.length-1;a>=0;a--)this._addons[a].instance.dispose()}loadAddon(a,c){let m={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(m),c.dispose=()=>this._wrappedAddonDispose(m),c.activate(a)}_wrappedAddonDispose(a){if(a.isDisposed)return;let c=-1;for(let m=0;m{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferApiView=void 0;let c=a(3785),m=a(511);r.BufferApiView=class{constructor(u,h){this._buffer=u,this.type=h}init(u){return this._buffer=u,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(u){let h=this._buffer.lines.get(u);if(h)return new c.BufferLineApiView(h)}getNullCell(){return new m.CellData}}},3785:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLineApiView=void 0;let c=a(511);r.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,u){if(!(m<0||m>=this._line.length))return u?(this._line.loadCell(m,u),u):this._line.loadCell(m,new c.CellData)}translateToString(m,u,h){return this._line.translateToString(m,u,h)}}},8285:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferNamespaceApi=void 0;let c=a(8771),m=a(8460),u=a(844);class h extends u.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}r.BufferNamespaceApi=h},7975:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ParserApi=void 0,r.ParserApi=class{constructor(a){this._core=a}registerCsiHandler(a,c){return this._core.registerCsiHandler(a,m=>c(m.toArray()))}addCsiHandler(a,c){return this.registerCsiHandler(a,c)}registerDcsHandler(a,c){return this._core.registerDcsHandler(a,(m,u)=>c(m,u.toArray()))}addDcsHandler(a,c){return this.registerDcsHandler(a,c)}registerEscHandler(a,c){return this._core.registerEscHandler(a,c)}addEscHandler(a,c){return this.registerEscHandler(a,c)}registerOscHandler(a,c){return this._core.registerOscHandler(a,c)}addOscHandler(a,c){return this.registerOscHandler(a,c)}}},7090:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeApi=void 0,r.UnicodeApi=class{constructor(a){this._core=a}register(a){this._core.unicodeService.register(a)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(a){this._core.unicodeService.activeVersion=a}}},744:function(o,r,a){var c=this&&this.__decorate||function(C,M,w,y){var k,I=arguments.length,D=I<3?M:y===null?y=Object.getOwnPropertyDescriptor(M,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(C,M,w,y);else for(var N=C.length-1;N>=0;N--)(k=C[N])&&(D=(I<3?k(D):I>3?k(M,w,D):k(M,w))||D);return I>3&&D&&Object.defineProperty(M,w,D),D},m=this&&this.__param||function(C,M){return function(w,y){M(w,y,C)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;let u=a(8460),h=a(844),g=a(5295),S=a(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let x=r.BufferService=class extends h.Disposable{get buffer(){return this.buffers.active}constructor(C){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(C.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(C.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new g.BufferSet(C,this))}resize(C,M){this.cols=C,this.rows=M,this.buffers.resize(C,M),this._onResize.fire({cols:C,rows:M})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(C,M=!1){let w=this.buffer,y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===C.fg&&y.getBg(0)===C.bg||(y=w.getBlankLine(C,M),this._cachedBlankLine=y),y.isWrapped=M;let k=w.ybase+w.scrollTop,I=w.ybase+w.scrollBottom;if(w.scrollTop===0){let D=w.lines.isFull;I===w.lines.length-1?D?w.lines.recycle().copyFrom(y):w.lines.push(y.clone()):w.lines.splice(I+1,0,y.clone()),D?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{let D=I-k+1;w.lines.shiftElements(k+1,D-1,-1),w.lines.set(I,y.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(C,M,w){let y=this.buffer;if(C<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else C+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);let k=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+C,y.ybase),0),k!==y.ydisp&&(M||this._onScroll.fire(y.ydisp))}};r.BufferService=x=c([m(0,S.IOptionsService)],x)},7994:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CharsetService=void 0,r.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(a){this.glevel=a,this.charset=this._charsets[a]}setgCharset(a,c){this._charsets[a]=c,this.glevel===a&&(this.charset=c)}}},1753:function(o,r,a){var c=this&&this.__decorate||function(y,k,I,D){var N,P=arguments.length,F=P<3?k:D===null?D=Object.getOwnPropertyDescriptor(k,I):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(y,k,I,D);else for(var re=y.length-1;re>=0;re--)(N=y[re])&&(F=(P<3?N(F):P>3?N(k,I,F):N(k,I))||F);return P>3&&F&&Object.defineProperty(k,I,F),F},m=this&&this.__param||function(y,k){return function(I,D){k(I,D,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;let u=a(2585),h=a(8460),g=a(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function x(y,k){let I=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(I|=64,I|=y.action):(I|=3&y.button,4&y.button&&(I|=64),8&y.button&&(I|=128),y.action===32?I|=32:y.action!==0||k||(I|=3)),I}let C=String.fromCharCode,M={DEFAULT:y=>{let k=[x(y,!1)+32,y.col+32,y.row+32];return k[0]>255||k[1]>255||k[2]>255?"":`\x1B[M${C(k[0])}${C(k[1])}${C(k[2])}`},SGR:y=>{let k=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.col};${y.row}${k}`},SGR_PIXELS:y=>{let k=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.x};${y.y}${k}`}},w=r.CoreMouseService=class extends g.Disposable{constructor(y,k){super(),this._bufferService=y,this._coreService=k,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new h.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(let I of Object.keys(S))this.addProtocol(I,S[I]);for(let I of Object.keys(M))this.addEncoding(I,M[I]);this.reset()}addProtocol(y,k){this._protocols[y]=k}addEncoding(y,k){this._encodings[y]=k}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;let k=this._encodings[this._activeEncoding](y);return k&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(k):this._coreService.triggerDataEvent(k,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,k,I){if(I){if(y.x!==k.x||y.y!==k.y)return!1}else if(y.col!==k.col||y.row!==k.row)return!1;return y.button===k.button&&y.action===k.action&&y.ctrl===k.ctrl&&y.alt===k.alt&&y.shift===k.shift}};r.CoreMouseService=w=c([m(0,u.IBufferService),m(1,u.ICoreService)],w)},6975:function(o,r,a){var c=this&&this.__decorate||function(w,y,k,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,k):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,k,I);else for(var F=w.length-1;F>=0;F--)(D=w[F])&&(P=(N<3?D(P):N>3?D(y,k,P):D(y,k))||P);return N>3&&P&&Object.defineProperty(y,k,P),P},m=this&&this.__param||function(w,y){return function(k,I){y(k,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;let u=a(1439),h=a(8460),g=a(844),S=a(2585),x=Object.freeze({insertMode:!1}),C=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),M=r.CoreService=class extends g.Disposable{constructor(w,y,k){super(),this._bufferService=w,this._logService=y,this._optionsService=k,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new h.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new h.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new h.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new h.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(C)}reset(){this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(C)}triggerDataEvent(w,y=!1){if(this._optionsService.rawOptions.disableStdin)return;let k=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&k.ybase!==k.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,()=>w.split("").map(I=>I.charCodeAt(0))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,()=>w.split("").map(y=>y.charCodeAt(0))),this._onBinary.fire(w))}};r.CoreService=M=c([m(0,S.IBufferService),m(1,S.ILogService),m(2,S.IOptionsService)],M)},9074:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DecorationService=void 0;let c=a(8055),m=a(8460),u=a(844),h=a(6106),g=0,S=0;class x extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new h.SortedList(w=>w?.marker.line),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)(()=>this.reset()))}registerDecoration(w){if(w.marker.isDisposed)return;let y=new C(w);if(y){let k=y.marker.onDispose(()=>y.dispose());y.onDispose(()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),k.dispose())}),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(let w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,y,k){let I=0,D=0;for(let N of this._decorations.getKeyIterator(y))I=N.options.x??0,D=I+(N.options.width??1),w>=I&&w{g=D.options.x??0,S=g+(D.options.width??1),w>=g&&w{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;let c=a(2585),m=a(8343);class u{constructor(...g){this._entries=new Map;for(let[S,x]of g)this.set(S,x)}set(g,S){let x=this._entries.get(g);return this._entries.set(g,S),x}forEach(g){for(let[S,x]of this._entries.entries())g(S,x)}has(g){return this._entries.has(g)}get(g){return this._entries.get(g)}}r.ServiceCollection=u,r.InstantiationService=class{constructor(){this._services=new u,this._services.set(c.IInstantiationService,this)}setService(h,g){this._services.set(h,g)}getService(h){return this._services.get(h)}createInstance(h,...g){let S=(0,m.getServiceDependencies)(h).sort((M,w)=>M.index-w.index),x=[];for(let M of S){let w=this._services.get(M.id);if(!w)throw new Error(`[createInstance] ${h.name} depends on UNKNOWN service ${M.id}.`);x.push(w)}let C=S.length>0?S[0].index:g.length;if(g.length!==C)throw new Error(`[createInstance] First service dependency of ${h.name} at position ${C+1} conflicts with ${g.length} static arguments`);return new h(...g,...x)}}},7866:function(o,r,a){var c=this&&this.__decorate||function(C,M,w,y){var k,I=arguments.length,D=I<3?M:y===null?y=Object.getOwnPropertyDescriptor(M,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(C,M,w,y);else for(var N=C.length-1;N>=0;N--)(k=C[N])&&(D=(I<3?k(D):I>3?k(M,w,D):k(M,w))||D);return I>3&&D&&Object.defineProperty(M,w,D),D},m=this&&this.__param||function(C,M){return function(w,y){M(w,y,C)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;let u=a(844),h=a(2585),g={trace:h.LogLevelEnum.TRACE,debug:h.LogLevelEnum.DEBUG,info:h.LogLevelEnum.INFO,warn:h.LogLevelEnum.WARN,error:h.LogLevelEnum.ERROR,off:h.LogLevelEnum.OFF},S,x=r.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(C){super(),this._optionsService=C,this._logLevel=h.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),S=this}_updateLogLevel(){this._logLevel=g[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(C){for(let M=0;MJSON.stringify(D)).join(", ")})`);let I=y.apply(this,k);return S.trace(`GlyphRenderer#${y.name} return`,I),I}}},7302:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsService=r.DEFAULT_OPTIONS=void 0;let c=a(8460),m=a(844),u=a(6114);r.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};let h=["normal","bold","100","200","300","400","500","600","700","800","900"];class g extends m.Disposable{constructor(x){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;let C=q({},r.DEFAULT_OPTIONS);for(let M in x)if(M in C)try{let w=x[M];C[M]=this._sanitizeAndValidateOption(M,w)}catch(w){console.error(w)}this.rawOptions=C,this.options=q({},C),this._setupOptions(),this.register((0,m.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(x,C){return this.onOptionChange(M=>{M===x&&C(this.rawOptions[x])})}onMultipleOptionChange(x,C){return this.onOptionChange(M=>{x.indexOf(M)!==-1&&C()})}_setupOptions(){let x=M=>{if(!(M in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${M}"`);return this.rawOptions[M]},C=(M,w)=>{if(!(M in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${M}"`);w=this._sanitizeAndValidateOption(M,w),this.rawOptions[M]!==w&&(this.rawOptions[M]=w,this._onOptionChange.fire(M))};for(let M in this.rawOptions){let w={get:x.bind(this,M),set:C.bind(this,M)};Object.defineProperty(this.options,M,w)}}_sanitizeAndValidateOption(x,C){switch(x){case"cursorStyle":if(C||(C=r.DEFAULT_OPTIONS[x]),!(function(M){return M==="block"||M==="underline"||M==="bar"})(C))throw new Error(`"${C}" is not a valid value for ${x}`);break;case"wordSeparator":C||(C=r.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof C=="number"&&1<=C&&C<=1e3)break;C=h.includes(C)?C:r.DEFAULT_OPTIONS[x];break;case"cursorWidth":C=Math.floor(C);case"lineHeight":case"tabStopWidth":if(C<1)throw new Error(`${x} cannot be less than 1, value: ${C}`);break;case"minimumContrastRatio":C=Math.max(1,Math.min(21,Math.round(10*C)/10));break;case"scrollback":if((C=Math.min(C,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${C}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(C<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${C}`);break;case"rows":case"cols":if(!C&&C!==0)throw new Error(`${x} must be numeric, value: ${C}`);break;case"windowsPty":C=C??{}}return C}}r.OptionsService=g},2660:function(o,r,a){var c=this&&this.__decorate||function(g,S,x,C){var M,w=arguments.length,y=w<3?S:C===null?C=Object.getOwnPropertyDescriptor(S,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(g,S,x,C);else for(var k=g.length-1;k>=0;k--)(M=g[k])&&(y=(w<3?M(y):w>3?M(S,x,y):M(S,x))||y);return w>3&&y&&Object.defineProperty(S,x,y),y},m=this&&this.__param||function(g,S){return function(x,C){S(x,C,g)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;let u=a(2585),h=r.OscLinkService=class{constructor(g){this._bufferService=g,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(g){let S=this._bufferService.buffer;if(g.id===void 0){let k=S.addMarker(S.ybase+S.y),I={data:g,id:this._nextId++,lines:[k]};return k.onDispose(()=>this._removeMarkerFromLink(I,k)),this._dataByLinkId.set(I.id,I),I.id}let x=g,C=this._getEntryIdKey(x),M=this._entriesWithId.get(C);if(M)return this.addLineToLink(M.id,S.ybase+S.y),M.id;let w=S.addMarker(S.ybase+S.y),y={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[w]};return w.onDispose(()=>this._removeMarkerFromLink(y,w)),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(g,S){let x=this._dataByLinkId.get(g);if(x&&x.lines.every(C=>C.line!==S)){let C=this._bufferService.buffer.addMarker(S);x.lines.push(C),C.onDispose(()=>this._removeMarkerFromLink(x,C))}}getLinkData(g){return this._dataByLinkId.get(g)?.data}_getEntryIdKey(g){return`${g.id};;${g.uri}`}_removeMarkerFromLink(g,S){let x=g.lines.indexOf(S);x!==-1&&(g.lines.splice(x,1),g.lines.length===0&&(g.data.id!==void 0&&this._entriesWithId.delete(g.key),this._dataByLinkId.delete(g.id)))}};r.OscLinkService=h=c([m(0,u.IBufferService)],h)},8343:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;let a="di$target",c="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(m){return m[c]||[]},r.createDecorator=function(m){if(r.serviceRegistry.has(m))return r.serviceRegistry.get(m);let u=function(h,g,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,C,M){C[a]===C?C[c].push({id:x,index:M}):(C[c]=[{id:x,index:M}],C[a]=C)})(u,h,S)};return u.toString=()=>m,r.serviceRegistry.set(m,u),u}},2585:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;let c=a(8343);var m;r.IBufferService=(0,c.createDecorator)("BufferService"),r.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),r.ICoreService=(0,c.createDecorator)("CoreService"),r.ICharsetService=(0,c.createDecorator)("CharsetService"),r.IInstantiationService=(0,c.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(m||(r.LogLevelEnum=m={})),r.ILogService=(0,c.createDecorator)("LogService"),r.IOptionsService=(0,c.createDecorator)("OptionsService"),r.IOscLinkService=(0,c.createDecorator)("OscLinkService"),r.IUnicodeService=(0,c.createDecorator)("UnicodeService"),r.IDecorationService=(0,c.createDecorator)("DecorationService")},1480:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;let c=a(8460),m=a(225);class u{static extractShouldJoin(g){return(1&g)!=0}static extractWidth(g){return g>>1&3}static extractCharKind(g){return g>>3}static createPropertyValue(g,S,x=!1){return(16777215&g)<<3|(3&S)<<1|(x?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;let g=new m.UnicodeV6;this.register(g),this._active=g.version,this._activeProvider=g}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(g){if(!this._providers[g])throw new Error(`unknown Unicode version "${g}"`);this._active=g,this._activeProvider=this._providers[g],this._onChange.fire(g)}register(g){this._providers[g.version]=g}wcwidth(g){return this._activeProvider.wcwidth(g)}getStringCellWidth(g){let S=0,x=0,C=g.length;for(let M=0;M=C)return S+this.wcwidth(w);let I=g.charCodeAt(M);56320<=I&&I<=57343?w=1024*(w-55296)+I-56320+65536:S+=this.wcwidth(I)}let y=this.charProperties(w,x),k=u.extractWidth(y);u.extractShouldJoin(y)&&(k-=u.extractWidth(x)),S+=k,x=y}return S}charProperties(g,S){return this._activeProvider.charProperties(g,S)}}r.UnicodeService=u}},i={};function e(o){var r=i[o];if(r!==void 0)return r.exports;var a=i[o]={exports:{}};return n[o].call(a.exports,a,a.exports,e),a.exports}var t={};return(()=>{var o=t;Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;let r=e(9042),a=e(3236),c=e(844),m=e(5741),u=e(8285),h=e(7975),g=e(7090),S=["cols","rows"];class x extends c.Disposable{constructor(M){super(),this._core=this.register(new a.Terminal(M)),this._addonManager=this.register(new m.AddonManager),this._publicOptions=q({},this._core.options);let w=k=>this._core.options[k],y=(k,I)=>{this._checkReadonlyOptions(k),this._core.options[k]=I};for(let k in this._core.options){let I={get:w.bind(this,k),set:y.bind(this,k)};Object.defineProperty(this._publicOptions,k,I)}}_checkReadonlyOptions(M){if(S.includes(M))throw new Error(`Option "${M}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new h.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new g.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let M=this._core.coreService.decPrivateModes,w="none";switch(this._core.coreMouseService.activeProtocol){case"X10":w="x10";break;case"VT200":w="vt200";break;case"DRAG":w="drag";break;case"ANY":w="any"}return{applicationCursorKeysMode:M.applicationCursorKeys,applicationKeypadMode:M.applicationKeypad,bracketedPasteMode:M.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:w,originMode:M.origin,reverseWraparoundMode:M.reverseWraparound,sendFocusMode:M.sendFocus,wraparoundMode:M.wraparound}}get options(){return this._publicOptions}set options(M){for(let w in M)this._publicOptions[w]=M[w]}blur(){this._core.blur()}focus(){this._core.focus()}input(M,w=!0){this._core.input(M,w)}resize(M,w){this._verifyIntegers(M,w),this._core.resize(M,w)}open(M){this._core.open(M)}attachCustomKeyEventHandler(M){this._core.attachCustomKeyEventHandler(M)}attachCustomWheelEventHandler(M){this._core.attachCustomWheelEventHandler(M)}registerLinkProvider(M){return this._core.registerLinkProvider(M)}registerCharacterJoiner(M){return this._checkProposedApi(),this._core.registerCharacterJoiner(M)}deregisterCharacterJoiner(M){this._checkProposedApi(),this._core.deregisterCharacterJoiner(M)}registerMarker(M=0){return this._verifyIntegers(M),this._core.registerMarker(M)}registerDecoration(M){return this._checkProposedApi(),this._verifyPositiveIntegers(M.x??0,M.width??0,M.height??0),this._core.registerDecoration(M)}hasSelection(){return this._core.hasSelection()}select(M,w,y){this._verifyIntegers(M,w,y),this._core.select(M,w,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(M,w){this._verifyIntegers(M,w),this._core.selectLines(M,w)}dispose(){super.dispose()}scrollLines(M){this._verifyIntegers(M),this._core.scrollLines(M)}scrollPages(M){this._verifyIntegers(M),this._core.scrollPages(M)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(M){this._verifyIntegers(M),this._core.scrollToLine(M)}clear(){this._core.clear()}write(M,w){this._core.write(M,w)}writeln(M,w){this._core.write(M),this._core.write(`\r -`,w)}paste(M){this._core.paste(M)}refresh(M,w){this._verifyIntegers(M,w),this._core.refresh(M,w)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(M){this._addonManager.loadAddon(this,M)}static get strings(){return r}_verifyIntegers(...M){for(let w of M)if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...M){for(let w of M)if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}}o.Terminal=x})(),t})())});var CN=Ts((pk,vN)=>{(function(n,i){typeof pk=="object"&&typeof vN=="object"?vN.exports=i():typeof define=="function"&&define.amd?define([],i):typeof pk=="object"?pk.AttachAddon=i():n.AttachAddon=i()})(self,()=>(()=>{"use strict";var n={};return(()=>{var i=n;function e(t,o,r){return t.addEventListener(o,r),{dispose:()=>{r&&t.removeEventListener(o,r)}}}Object.defineProperty(i,"__esModule",{value:!0}),i.AttachAddon=void 0,i.AttachAddon=class{constructor(t,o){this._disposables=[],this._socket=t,this._socket.binaryType="arraybuffer",this._bidirectional=!(o&&o.bidirectional===!1)}activate(t){this._disposables.push(e(this._socket,"message",o=>{let r=o.data;t.write(typeof r=="string"?r:new Uint8Array(r))})),this._bidirectional&&(this._disposables.push(t.onData(o=>this._sendData(o))),this._disposables.push(t.onBinary(o=>this._sendBinary(o)))),this._disposables.push(e(this._socket,"close",()=>this.dispose())),this._disposables.push(e(this._socket,"error",()=>this.dispose()))}dispose(){for(let t of this._disposables)t.dispose()}_sendData(t){this._checkOpenSocket()&&this._socket.send(t)}_sendBinary(t){if(!this._checkOpenSocket())return;let o=new Uint8Array(t.length);for(let r=0;r{(function(n,i){typeof uk=="object"&&typeof bN=="object"?bN.exports=i():typeof define=="function"&&define.amd?define([],i):typeof uk=="object"?uk.FitAddon=i():n.FitAddon=i()})(self,()=>(()=>{"use strict";var n={};return(()=>{var i=n;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core,t=e._renderService.dimensions;if(t.css.cell.width===0||t.css.cell.height===0)return;let o=this._terminal.options.scrollback===0?0:e.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(r.getPropertyValue("height")),c=Math.max(0,parseInt(r.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),u=a-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),h=c-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-o;return{cols:Math.max(2,Math.floor(h/t.css.cell.width)),rows:Math.max(1,Math.floor(u/t.css.cell.height))}}}})(),n})())});var vR=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g"),qh=class n{element=null;classNames=[];attrs=[];notSelectors=[];static parse(i){let e=[],t=(m,u)=>{u.notSelectors.length>0&&!u.element&&u.classNames.length==0&&u.attrs.length==0&&(u.element="*"),m.push(u)},o=new n,r,a=o,c=!1;for(vR.lastIndex=0;r=vR.exec(i);){if(r[1]){if(c)throw new Error("Nesting :not in a selector is not allowed");c=!0,a=new n,o.notSelectors.push(a)}let m=r[2];if(m){let h=r[3];h==="#"?a.addAttribute("id",m.slice(1)):h==="."?a.addClassName(m.slice(1)):a.setElement(m)}let u=r[4];if(u&&a.addAttribute(a.unescapeAttribute(u),r[6]),r[7]&&(c=!1,a=o),r[8]){if(c)throw new Error("Multiple selectors in :not are not supported");t(e,o),o=a=new n}}return t(e,o),e}unescapeAttribute(i){let e="",t=!1;for(let o=0;o0&&i.push("class",this.classNames.join(" ")),i.concat(this.attrs)}addAttribute(i,e=""){this.attrs.push(i,e&&e.toLowerCase()||"")}addClassName(i){this.classNames.push(i.toLowerCase())}toString(){let i=this.element||"";if(this.classNames&&this.classNames.forEach(e=>i+=`.${e}`),this.attrs)for(let e=0;ei+=`:not(${e})`),i}},ib=class n{static createNotMatcher(i){let e=new n;return e.addSelectables(i,null),e}_elementMap=new Map;_elementPartialMap=new Map;_classMap=new Map;_classPartialMap=new Map;_attrValueMap=new Map;_attrValuePartialMap=new Map;_listContexts=[];addSelectables(i,e){let t=null;i.length>1&&(t=new vE(i),this._listContexts.push(t));for(let o=0;o0&&(!this.listContext||!this.listContext.alreadyMatched)&&(t=!ib.createNotMatcher(this.notSelectors).match(i,null)),t&&e&&(!this.listContext||!this.listContext.alreadyMatched)&&(this.listContext&&(this.listContext.alreadyMatched=!0),e(this.selector,this.cbContext)),t}},ob=class{registry;constructor(i){this.registry=i}match(i){return this.registry.has(i)?this.registry.get(i):[]}};var Xp=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n[n.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",n})(Xp||{}),QD=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n[n.Eager=1]="Eager",n})(QD||{}),B_=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(B_||{}),CR={name:"custom-elements"},bR={name:"no-errors-schema"};var ro=(function(n){return n[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",n[n.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",n})(ro||{});function SG(n){let i=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return[n.element&&n.element!=="*"?n.element:"",...n.attrs,...i]}function wG(n){let i=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return n.element?[5,n.element,...n.attrs,...i]:n.attrs.length?[3,...n.attrs,...i]:n.classNames&&n.classNames.length?[9,...n.classNames]:[]}function MG(n){let i=SG(n),e=n.notSelectors&&n.notSelectors.length?n.notSelectors.map(t=>wG(t)):[];return i.concat(...e)}function XD(n){return n?qh.parse(n).map(MG):[]}var Md=(function(n){return n[n.Directive=0]="Directive",n[n.Component=1]="Component",n[n.Injectable=2]="Injectable",n[n.Pipe=3]="Pipe",n[n.NgModule=4]="NgModule",n})(Md||{});var rb;function kG(n){return PG(DG(n.nodes).join("")+`[${n.meaning}]`)}function TG(n){return n.id||u6(n)}function u6(n){let i=new bE,e=n.nodes.map(t=>t.visit(i,null));return h6(e.join(""),n.meaning)}var ab=class{visitText(i,e){return i.value}visitContainer(i,e){return`[${i.children.map(t=>t.visit(this)).join(", ")}]`}visitIcu(i,e){let t=Object.keys(i.cases).map(o=>`${o} {${i.cases[o].visit(this)}}`);return`{${i.expression}, ${i.type}, ${t.join(", ")}}`}visitTagPlaceholder(i,e){return i.isVoid?``:`${i.children.map(t=>t.visit(this)).join(", ")}`}visitPlaceholder(i,e){return i.value?`${i.value}`:``}visitIcuPlaceholder(i,e){return`${i.value.visit(this)}`}visitBlockPlaceholder(i,e){return`${i.children.map(t=>t.visit(this)).join(", ")}`}},EG=new ab;function DG(n){return n.map(i=>i.visit(EG,null))}var bE=class extends ab{visitIcu(i){let e=Object.keys(i.cases).map(t=>`${t} {${i.cases[t].visit(this)}}`);return`{${i.type}, ${e.join(", ")}}`}};function PG(n){rb??=new TextEncoder;let i=[...rb.encode(n)],e=OG(i,YD.Big),t=i.length*8,o=new Uint32Array(80),r=1732584193,a=4023233417,c=2562383102,m=271733878,u=3285377520;e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(let h=0;h>>0).toString(16).padStart(8,"0")}function IG(n,i,e,t){return n<20?[i&e|~i&t,1518500249]:n<40?[i^e^t,1859775393]:n<60?[i&e|i&t|e&t,2400959708]:[i^e^t,3395469782]}function xR(n){rb??=new TextEncoder;let i=rb.encode(n),e=new DataView(i.buffer,i.byteOffset,i.byteLength),t=yR(e,i.length,0),o=yR(e,i.length,102072);return t==0&&(o==0||o==1)&&(t=t^319790063,o=o^-1801410264),BigInt.asUintN(32,BigInt(t))<>BigInt(63)&BigInt(1),e+=xR(i)),BigInt.asUintN(63,e).toString()}function yR(n,i,e){let t=2654435769,o=2654435769,r=0,a=i-12;for(;r<=a;r+=12){t+=n.getUint32(r,!0),o+=n.getUint32(r+4,!0),e+=n.getUint32(r+8,!0);let m=SR(t,o,e);t=m[0],o=m[1],e=m[2]}let c=i-r;return e+=i,c>=4?(t+=n.getUint32(r,!0),r+=4,c>=8?(o+=n.getUint32(r,!0),r+=4,c>=9&&(e+=n.getUint8(r++)<<8),c>=10&&(e+=n.getUint8(r++)<<16),c===11&&(e+=n.getUint8(r++)<<24)):(c>=5&&(o+=n.getUint8(r++)),c>=6&&(o+=n.getUint8(r++)<<8),c===7&&(o+=n.getUint8(r++)<<16))):(c>=1&&(t+=n.getUint8(r++)),c>=2&&(t+=n.getUint8(r++)<<8),c===3&&(t+=n.getUint8(r++)<<16)),SR(t,o,e)[2]}function SR(n,i,e){return n-=i,n-=e,n^=e>>>13,i-=e,i-=n,i^=n<<8,e-=n,e-=i,e^=i>>>13,n-=i,n-=e,n^=e>>>12,i-=e,i-=n,i^=n<<16,e-=n,e-=i,e^=i>>>5,n-=i,n-=e,n^=e>>>3,i-=e,i-=n,i^=n<<10,e-=n,e-=i,e^=i>>>15,[n,i,e]}var YD=(function(n){return n[n.Little=0]="Little",n[n.Big=1]="Big",n})(YD||{});function Ph(n,i){return AG(n,i)[1]}function AG(n,i){let e=(n&65535)+(i&65535),t=(n>>>16)+(i>>>16)+(e>>>16);return[t>>>16,t<<16|e&65535]}function YT(n,i){return n<>>32-i}function OG(n,i){let e=n.length+3>>>2,t=[];for(let o=0;o=n.length?0:n[i]}function NG(n,i,e){let t=0;if(e===YD.Big)for(let o=0;o<4;o++)t+=wR(n,i+o)<<24-8*o;else for(let o=0;o<4;o++)t+=wR(n,i+o)<<8*o;return t}var f6=(function(n){return n[n.None=0]="None",n[n.Const=1]="Const",n})(f6||{}),sb=class{modifiers;constructor(i=f6.None){this.modifiers=i}hasModifier(i){return(this.modifiers&i)!==0}},Od=(function(n){return n[n.Dynamic=0]="Dynamic",n[n.Bool=1]="Bool",n[n.String=2]="String",n[n.Int=3]="Int",n[n.Number=4]="Number",n[n.Function=5]="Function",n[n.Inferred=6]="Inferred",n[n.None=7]="None",n})(Od||{}),Pc=class extends sb{name;constructor(i,e){super(e),this.name=i}visitType(i,e){return i.visitBuiltinType(this,e)}},ml=class extends sb{value;typeParams;constructor(i,e,t=null){super(e),this.value=i,this.typeParams=t}visitType(i,e){return i.visitExpressionType(this,e)}};var ms=new Pc(Od.Dynamic),Gl=new Pc(Od.Inferred),RG=new Pc(Od.Bool),r6e=new Pc(Od.Int),mu=new Pc(Od.Number),KD=new Pc(Od.String),a6e=new Pc(Od.Function),Ic=new Pc(Od.None),J_=(function(n){return n[n.Minus=0]="Minus",n[n.Plus=1]="Plus",n})(J_||{}),lt=(function(n){return n[n.Equals=0]="Equals",n[n.NotEquals=1]="NotEquals",n[n.Assign=2]="Assign",n[n.Identical=3]="Identical",n[n.NotIdentical=4]="NotIdentical",n[n.Minus=5]="Minus",n[n.Plus=6]="Plus",n[n.Divide=7]="Divide",n[n.Multiply=8]="Multiply",n[n.Modulo=9]="Modulo",n[n.And=10]="And",n[n.Or=11]="Or",n[n.BitwiseOr=12]="BitwiseOr",n[n.BitwiseAnd=13]="BitwiseAnd",n[n.Lower=14]="Lower",n[n.LowerEquals=15]="LowerEquals",n[n.Bigger=16]="Bigger",n[n.BiggerEquals=17]="BiggerEquals",n[n.NullishCoalesce=18]="NullishCoalesce",n[n.Exponentiation=19]="Exponentiation",n[n.In=20]="In",n[n.InstanceOf=21]="InstanceOf",n[n.AdditionAssignment=22]="AdditionAssignment",n[n.SubtractionAssignment=23]="SubtractionAssignment",n[n.MultiplicationAssignment=24]="MultiplicationAssignment",n[n.DivisionAssignment=25]="DivisionAssignment",n[n.RemainderAssignment=26]="RemainderAssignment",n[n.ExponentiationAssignment=27]="ExponentiationAssignment",n[n.AndAssignment=28]="AndAssignment",n[n.OrAssignment=29]="OrAssignment",n[n.NullishCoalesceAssignment=30]="NullishCoalesceAssignment",n})(lt||{});function FG(n,i){return n==null||i==null?n==i:n.isEquivalent(i)}function g6(n,i,e){let t=n.length;if(t!==i.length)return!1;for(let o=0;oe.isEquivalent(t))}var ji=class{type;sourceSpan;constructor(i,e){this.type=i||null,this.sourceSpan=e||null}prop(i,e){return new Bs(this,i,null,e)}key(i,e,t){return new Pd(this,i,e,t)}callFn(i,e,t){return new ps(this,i,null,e,t)}instantiate(i,e,t){return new t0(this,i,e,t)}conditional(i,e=null,t){return new Ac(this,i,e,null,t)}equals(i,e){return new Ci(lt.Equals,this,i,null,e)}notEquals(i,e){return new Ci(lt.NotEquals,this,i,null,e)}identical(i,e){return new Ci(lt.Identical,this,i,null,e)}notIdentical(i,e){return new Ci(lt.NotIdentical,this,i,null,e)}minus(i,e){return new Ci(lt.Minus,this,i,null,e)}plus(i,e){return new Ci(lt.Plus,this,i,null,e)}divide(i,e){return new Ci(lt.Divide,this,i,null,e)}multiply(i,e){return new Ci(lt.Multiply,this,i,null,e)}modulo(i,e){return new Ci(lt.Modulo,this,i,null,e)}power(i,e){return new Ci(lt.Exponentiation,this,i,null,e)}and(i,e){return new Ci(lt.And,this,i,null,e)}bitwiseOr(i,e){return new Ci(lt.BitwiseOr,this,i,null,e)}bitwiseAnd(i,e){return new Ci(lt.BitwiseAnd,this,i,null,e)}or(i,e){return new Ci(lt.Or,this,i,null,e)}lower(i,e){return new Ci(lt.Lower,this,i,null,e)}lowerEquals(i,e){return new Ci(lt.LowerEquals,this,i,null,e)}bigger(i,e){return new Ci(lt.Bigger,this,i,null,e)}biggerEquals(i,e){return new Ci(lt.BiggerEquals,this,i,null,e)}isBlank(i){return this.equals(jG,i)}nullishCoalesce(i,e){return new Ci(lt.NullishCoalesce,this,i,null,e)}toStmt(){return new ha(this,null)}},Wl=class n extends ji{name;constructor(i,e,t){super(e,t),this.name=i}isEquivalent(i){return i instanceof n&&this.name===i.name}isConstant(){return!1}visitExpression(i,e){return i.visitReadVarExpr(this,e)}clone(){return new n(this.name,this.type,this.sourceSpan)}set(i){return new Ci(lt.Assign,this,i,null,this.sourceSpan)}},Qh=class n extends ji{expr;constructor(i,e,t){super(e,t),this.expr=i}visitExpression(i,e){return i.visitTypeofExpr(this,e)}isEquivalent(i){return i instanceof n&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},lb=class n extends ji{expr;constructor(i,e,t){super(e,t),this.expr=i}visitExpression(i,e){return i.visitVoidExpr(this,e)}isEquivalent(i){return i instanceof n&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},ai=class n extends ji{node;constructor(i,e,t){super(e,t),this.node=i}isEquivalent(i){return i instanceof n&&this.node===i.node}isConstant(){return!1}visitExpression(i,e){return i.visitWrappedNodeExpr(this,e)}clone(){return new n(this.node,this.type,this.sourceSpan)}},ps=class n extends ji{fn;args;pure;constructor(i,e,t,o,r=!1){super(t,o),this.fn=i,this.args=e,this.pure=r}get receiver(){return this.fn}isEquivalent(i){return i instanceof n&&this.fn.isEquivalent(i.fn)&&Ls(this.args,i.args)&&this.pure===i.pure}isConstant(){return!1}visitExpression(i,e){return i.visitInvokeFunctionExpr(this,e)}clone(){return new n(this.fn.clone(),this.args.map(i=>i.clone()),this.type,this.sourceSpan,this.pure)}},e0=class n extends ji{tag;template;constructor(i,e,t,o){super(t,o),this.tag=i,this.template=e}isEquivalent(i){return i instanceof n&&this.tag.isEquivalent(i.tag)&&this.template.isEquivalent(i.template)}isConstant(){return!1}visitExpression(i,e){return i.visitTaggedTemplateLiteralExpr(this,e)}clone(){return new n(this.tag.clone(),this.template.clone(),this.type,this.sourceSpan)}},t0=class n extends ji{classExpr;args;constructor(i,e,t,o){super(t,o),this.classExpr=i,this.args=e}isEquivalent(i){return i instanceof n&&this.classExpr.isEquivalent(i.classExpr)&&Ls(this.args,i.args)}isConstant(){return!1}visitExpression(i,e){return i.visitInstantiateExpr(this,e)}clone(){return new n(this.classExpr.clone(),this.args.map(i=>i.clone()),this.type,this.sourceSpan)}},Xh=class n extends ji{body;flags;constructor(i,e,t){super(null,t),this.body=i,this.flags=e}isEquivalent(i){return i instanceof n&&this.body===i.body&&this.flags===i.flags}isConstant(){return!0}visitExpression(i,e){return i.visitRegularExpressionLiteral(this,e)}clone(){return new n(this.body,this.flags,this.sourceSpan)}},ua=class n extends ji{value;constructor(i,e,t){super(e,t),this.value=i}isEquivalent(i){return i instanceof n&&this.value===i.value}isConstant(){return!0}visitExpression(i,e){return i.visitLiteralExpr(this,e)}clone(){return new n(this.value,this.type,this.sourceSpan)}},n0=class n extends ji{elements;expressions;constructor(i,e,t){super(null,t),this.elements=i,this.expressions=e}isEquivalent(i){return i instanceof n&&g6(this.elements,i.elements,(e,t)=>e.text===t.text)&&Ls(this.expressions,i.expressions)}isConstant(){return!1}visitExpression(i,e){return i.visitTemplateLiteralExpr(this,e)}clone(){return new n(this.elements.map(i=>i.clone()),this.expressions.map(i=>i.clone()))}},cb=class n extends ji{text;rawText;constructor(i,e,t){super(KD,e),this.text=i,this.rawText=t??xE(Z1(i))}visitExpression(i,e){return i.visitTemplateLiteralElementExpr(this,e)}isEquivalent(i){return i instanceof n&&i.text===this.text&&i.rawText===this.rawText}isConstant(){return!0}clone(){return new n(this.text,this.sourceSpan,this.rawText)}},iu=class{text;sourceSpan;constructor(i,e){this.text=i,this.sourceSpan=e}},Uh=class{text;sourceSpan;associatedMessage;constructor(i,e,t){this.text=i,this.sourceSpan=e,this.associatedMessage=t}},LG="|",MR="@@",BG="\u241F",db=class n extends ji{metaBlock;messageParts;placeHolderNames;expressions;constructor(i,e,t,o,r){super(KD,r),this.metaBlock=i,this.messageParts=e,this.placeHolderNames=t,this.expressions=o}isEquivalent(i){return!1}isConstant(){return!1}visitExpression(i,e){return i.visitLocalizedString(this,e)}clone(){return new n(this.metaBlock,this.messageParts,this.placeHolderNames,this.expressions.map(i=>i.clone()),this.sourceSpan)}serializeI18nHead(){let i=this.metaBlock.description||"";return this.metaBlock.meaning&&(i=`${this.metaBlock.meaning}${LG}${i}`),this.metaBlock.customId&&(i=`${i}${MR}${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(e=>{i=`${i}${BG}${e}`}),kR(i,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(i){return this.messageParts[i]?.sourceSpan??this.sourceSpan}getPlaceholderSourceSpan(i){return this.placeHolderNames[i]?.sourceSpan??this.expressions[i]?.sourceSpan??this.sourceSpan}serializeI18nTemplatePart(i){let e=this.placeHolderNames[i-1],t=this.messageParts[i],o=e.text;return e.associatedMessage?.legacyIds.length===0&&(o+=`${MR}${h6(e.associatedMessage.messageString,e.associatedMessage.meaning)}`),kR(o,t.text,this.getMessagePartSourceSpan(i))}},Z1=n=>n.replace(/\\/g,"\\\\"),VG=n=>n.replace(/^:/,"\\:"),zG=n=>n.replace(/:/g,"\\:"),xE=n=>n.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function kR(n,i,e){return n===""?{cooked:i,raw:xE(VG(Z1(i))),range:e}:{cooked:`:${n}:${i}`,raw:xE(`:${zG(Z1(n))}:${Z1(i)}`),range:e}}var pu=class n extends ji{value;typeParams;constructor(i,e,t=null,o){super(e,o),this.value=i,this.typeParams=t}isEquivalent(i){return i instanceof n&&this.value.name===i.value.name&&this.value.moduleName===i.value.moduleName}isConstant(){return!1}visitExpression(i,e){return i.visitExternalExpr(this,e)}clone(){return new n(this.value,this.type,this.typeParams,this.sourceSpan)}};var Ac=class n extends ji{condition;falseCase;trueCase;constructor(i,e,t=null,o,r){super(o||e.type,r),this.condition=i,this.falseCase=t,this.trueCase=e}isEquivalent(i){return i instanceof n&&this.condition.isEquivalent(i.condition)&&this.trueCase.isEquivalent(i.trueCase)&&FG(this.falseCase,i.falseCase)}isConstant(){return!1}visitExpression(i,e){return i.visitConditionalExpr(this,e)}clone(){return new n(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}};var i0=class n extends ji{condition;constructor(i,e){super(RG,e),this.condition=i}isEquivalent(i){return i instanceof n&&this.condition.isEquivalent(i.condition)}isConstant(){return!1}visitExpression(i,e){return i.visitNotExpr(this,e)}clone(){return new n(this.condition.clone(),this.sourceSpan)}},wr=class n{name;type;constructor(i,e=null){this.name=i,this.type=e}isEquivalent(i){return this.name===i.name}clone(){return new n(this.name,this.type)}},wm=class n extends ji{params;statements;name;constructor(i,e,t,o,r){super(t,o),this.params=i,this.statements=e,this.name=r}isEquivalent(i){return(i instanceof n||i instanceof o0)&&Ls(this.params,i.params)&&Ls(this.statements,i.statements)}isConstant(){return!1}visitExpression(i,e){return i.visitFunctionExpr(this,e)}toDeclStmt(i,e){return new o0(i,this.params,this.statements,this.type,e,this.sourceSpan)}clone(){return new n(this.params.map(i=>i.clone()),this.statements,this.type,this.sourceSpan,this.name)}},ku=class yE extends ji{params;body;constructor(i,e,t,o){super(t,o),this.params=i,this.body=e}isEquivalent(i){return!(i instanceof yE)||!Ls(this.params,i.params)?!1:this.body instanceof ji&&i.body instanceof ji?this.body.isEquivalent(i.body):Array.isArray(this.body)&&Array.isArray(i.body)?Ls(this.body,i.body):!1}isConstant(){return!1}visitExpression(i,e){return i.visitArrowFunctionExpr(this,e)}clone(){return new yE(this.params.map(i=>i.clone()),Array.isArray(this.body)?this.body:this.body.clone(),this.type,this.sourceSpan)}toDeclStmt(i,e){return new zr(i,this,Gl,e,this.sourceSpan)}},uu=class n extends ji{operator;expr;parens;constructor(i,e,t,o,r=!0){super(t||mu,o),this.operator=i,this.expr=e,this.parens=r}isEquivalent(i){return i instanceof n&&this.operator===i.operator&&this.expr.isEquivalent(i.expr)}isConstant(){return!1}visitExpression(i,e){return i.visitUnaryOperatorExpr(this,e)}clone(){return new n(this.operator,this.expr.clone(),this.type,this.sourceSpan,this.parens)}},ql=class n extends ji{expr;constructor(i,e,t){super(e,t),this.expr=i}visitExpression(i,e){return i.visitParenthesizedExpr(this,e)}isEquivalent(i){return i instanceof n&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},Ci=class n extends ji{operator;rhs;lhs;constructor(i,e,t,o,r){super(o||e.type,r),this.operator=i,this.rhs=t,this.lhs=e}isEquivalent(i){return i instanceof n&&this.operator===i.operator&&this.lhs.isEquivalent(i.lhs)&&this.rhs.isEquivalent(i.rhs)}isConstant(){return!1}visitExpression(i,e){return i.visitBinaryOperatorExpr(this,e)}clone(){return new n(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}isAssignment(){let i=this.operator;return i===lt.Assign||i===lt.AdditionAssignment||i===lt.SubtractionAssignment||i===lt.MultiplicationAssignment||i===lt.DivisionAssignment||i===lt.RemainderAssignment||i===lt.ExponentiationAssignment||i===lt.AndAssignment||i===lt.OrAssignment||i===lt.NullishCoalesceAssignment}},Bs=class n extends ji{receiver;name;constructor(i,e,t,o){super(t,o),this.receiver=i,this.name=e}get index(){return this.name}isEquivalent(i){return i instanceof n&&this.receiver.isEquivalent(i.receiver)&&this.name===i.name}isConstant(){return!1}visitExpression(i,e){return i.visitReadPropExpr(this,e)}set(i){return new Ci(lt.Assign,this.receiver.prop(this.name),i,null,this.sourceSpan)}clone(){return new n(this.receiver.clone(),this.name,this.type,this.sourceSpan)}},Pd=class n extends ji{receiver;index;constructor(i,e,t,o){super(t,o),this.receiver=i,this.index=e}isEquivalent(i){return i instanceof n&&this.receiver.isEquivalent(i.receiver)&&this.index.isEquivalent(i.index)}isConstant(){return!1}visitExpression(i,e){return i.visitReadKeyExpr(this,e)}set(i){return new Ci(lt.Assign,this.receiver.key(this.index),i,null,this.sourceSpan)}clone(){return new n(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}},Oc=class n extends ji{entries;constructor(i,e,t){super(e,t),this.entries=i}isConstant(){return this.entries.every(i=>i.isConstant())}isEquivalent(i){return i instanceof n&&Ls(this.entries,i.entries)}visitExpression(i,e){return i.visitLiteralArrayExpr(this,e)}clone(){return new n(this.entries.map(i=>i.clone()),this.type,this.sourceSpan)}},Yh=class n{key;value;quoted;constructor(i,e,t){this.key=i,this.value=e,this.quoted=t}isEquivalent(i){return this.key===i.key&&this.value.isEquivalent(i.value)}clone(){return new n(this.key,this.value.clone(),this.quoted)}isConstant(){return this.value.isConstant()}},Mm=class n{expression;constructor(i){this.expression=i}isEquivalent(i){return i instanceof n&&this.expression.isEquivalent(i.expression)}clone(){return new n(this.expression.clone())}isConstant(){return this.expression.isConstant()}},Ql=class n extends ji{entries;valueType=null;constructor(i,e,t){super(e,t),this.entries=i,e&&(this.valueType=e.valueType)}isEquivalent(i){return i instanceof n&&Ls(this.entries,i.entries)}isConstant(){return this.entries.every(i=>i.isConstant())}visitExpression(i,e){return i.visitLiteralMapExpr(this,e)}clone(){let i=this.entries.map(e=>e.clone());return new n(i,this.type,this.sourceSpan)}};var hu=class n extends ji{expression;constructor(i,e){super(null,e),this.expression=i}isEquivalent(i){return i instanceof n&&this.expression.isEquivalent(i.expression)}isConstant(){return this.expression.isConstant()}visitExpression(i,e){return i.visitSpreadElementExpr(this,e)}clone(){return new n(this.expression.clone(),this.sourceSpan)}},Kh=new ua(null,null,null),jG=new ua(null,Gl,null),ma=(function(n){return n[n.None=0]="None",n[n.Final=1]="Final",n[n.Private=2]="Private",n[n.Exported=4]="Exported",n[n.Static=8]="Static",n})(ma||{}),SE=class{text;multiline;trailingNewline;constructor(i,e,t){this.text=i,this.multiline=e,this.trailingNewline=t}toString(){return this.multiline?` ${this.text} `:this.text}},mb=class extends SE{tags;constructor(i){super("",!0,!0),this.tags=i}toString(){return WG(this.tags)}},fu=class{modifiers;sourceSpan;leadingComments;constructor(i=ma.None,e=null,t){this.modifiers=i,this.sourceSpan=e,this.leadingComments=t}hasModifier(i){return(this.modifiers&i)!==0}addLeadingComment(i){this.leadingComments=this.leadingComments??[],this.leadingComments.push(i)}},zr=class n extends fu{name;value;type;constructor(i,e,t,o,r,a){super(o,r,a),this.name=i,this.value=e,this.type=t||e&&e.type||null}isEquivalent(i){return i instanceof n&&this.name===i.name&&(this.value?!!i.value&&this.value.isEquivalent(i.value):!i.value)}visitStatement(i,e){return i.visitDeclareVarStmt(this,e)}},o0=class n extends fu{name;params;statements;type;constructor(i,e,t,o,r,a,c){super(r,a,c),this.name=i,this.params=e,this.statements=t,this.type=o||null}isEquivalent(i){return i instanceof n&&Ls(this.params,i.params)&&Ls(this.statements,i.statements)}visitStatement(i,e){return i.visitDeclareFunctionStmt(this,e)}},ha=class n extends fu{expr;constructor(i,e,t){super(ma.None,e,t),this.expr=i}isEquivalent(i){return i instanceof n&&this.expr.isEquivalent(i.expr)}visitStatement(i,e){return i.visitExpressionStmt(this,e)}},Mr=class n extends fu{value;constructor(i,e=null,t){super(ma.None,e,t),this.value=i}isEquivalent(i){return i instanceof n&&this.value.isEquivalent(i.value)}visitStatement(i,e){return i.visitReturnStmt(this,e)}},pb=class n extends fu{condition;trueCase;falseCase;constructor(i,e,t=[],o,r){super(ma.None,o,r),this.condition=i,this.trueCase=e,this.falseCase=t}isEquivalent(i){return i instanceof n&&this.condition.isEquivalent(i.condition)&&Ls(this.trueCase,i.trueCase)&&Ls(this.falseCase,i.falseCase)}visitStatement(i,e){return i.visitIfStmt(this,e)}};function $G(n=[]){return new mb(n)}function Jn(n,i,e){return new Wl(n,i,e)}function qt(n,i=null,e){return new pu(n,null,i,e)}function pa(n,i,e){return new ml(n,i,e)}function Y0(n){return new Qh(n)}function Yi(n,i,e){return new Oc(n,i,e)}function pl(n,i=null){return new Ql(n.map(e=>new Yh(e.key,e.value,e.quoted)),i,null)}function HG(n,i){return new i0(n,i)}function km(n,i,e,t,o){return new wm(n,i,e,t,o)}function Vs(n,i,e,t){return new ku(n,i,e,t)}function mx(n,i,e,t,o){return new pb(n,i,e,t,o)}function UG(n,i,e,t){return new e0(n,i,e,t)}function ke(n,i,e){return new ua(n,i,e)}function GG(n,i,e,t,o){return new db(n,i,e,t,o)}function TR(n){let i="";if(n.tagName&&(i+=` @${n.tagName}`),n.text){if(n.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');i+=" "+n.text.replace(/@/g,"\\@")}return i}function WG(n){if(n.length===0)return"";if(n.length===1&&n[0].tagName&&!n[0].text)return`*${TR(n[0])} `;let i=`* -`;for(let e of n)i+=" *",i+=TR(e).replace(/\n/g,` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(P){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),M.isLinux&&P&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(P){let L=this._getMouseBufferCoords(P),re=this._model.finalSelectionStart,oe=this._model.finalSelectionEnd;return!!(re&&oe&&L)&&this._areCoordsInSelection(L,re,oe)}isCellInSelection(P,L){let re=this._model.finalSelectionStart,oe=this._model.finalSelectionEnd;return!(!re||!oe)&&this._areCoordsInSelection([P,L],re,oe)}_areCoordsInSelection(P,L,re){return P[1]>L[1]&&P[1]=L[0]&&P[0]=L[0]}_selectWordAtCursor(P,L){let re=this._linkifier.currentLink?.link?.range;if(re)return this._model.selectionStart=[re.start.x-1,re.start.y-1],this._model.selectionStartLength=(0,w.getRangeLength)(re,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let oe=this._getMouseBufferCoords(P);return!!oe&&(this._selectWordAt(oe,L),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(P,L){this._model.clearSelection(),P=Math.max(P,0),L=Math.min(L,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,P],this._model.selectionEnd=[this._bufferService.cols,L],this.refresh(),this._onSelectionChange.fire()}_handleTrim(P){this._model.handleTrim(P)&&this.refresh()}_getMouseBufferCoords(P){let L=this._mouseService.getCoords(P,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(L)return L[0]--,L[1]--,L[1]+=this._bufferService.buffer.ydisp,L}_getMouseEventScrollAmount(P){let L=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,P,this._screenElement)[1],re=this._renderService.dimensions.css.canvas.height;return L>=0&&L<=re?0:(L>re&&(L-=re),L=Math.min(Math.max(L,-50),50),L/=50,L/Math.abs(L)+Math.round(14*L))}shouldForceSelection(P){return M.isMac?P.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:P.shiftKey}handleMouseDown(P){if(this._mouseDownTimeStamp=P.timeStamp,(P.button!==2||!this.hasSelection)&&P.button===0){if(!this._enabled){if(!this.shouldForceSelection(P))return;P.stopPropagation()}P.preventDefault(),this._dragScrollAmount=0,this._enabled&&P.shiftKey?this._handleIncrementalClick(P):P.detail===1?this._handleSingleClick(P):P.detail===2?this._handleDoubleClick(P):P.detail===3&&this._handleTripleClick(P),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(P){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(P))}_handleSingleClick(P){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(P)?3:0,this._model.selectionStart=this._getMouseBufferCoords(P),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let L=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);L&&L.length!==this._model.selectionStart[0]&&L.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(P){this._selectWordAtCursor(P,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(P){let L=this._getMouseBufferCoords(P);L&&(this._activeSelectionMode=2,this._selectLineAt(L[1]))}shouldColumnSelect(P){return P.altKey&&!(M.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(P){if(P.stopImmediatePropagation(),!this._model.selectionStart)return;let L=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(P),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let re=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(P.ydisp+this._bufferService.rows,P.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=P.ydisp),this.refresh()}}_handleMouseUp(P){let L=P.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&L<500&&P.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let re=this._mouseService.getCoords(P,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(re&&re[0]!==void 0&&re[1]!==void 0){let oe=(0,h.moveToCellSequence)(re[0]-1,re[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(oe,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let P=this._model.finalSelectionStart,L=this._model.finalSelectionEnd,re=!(!P||!L||P[0]===L[0]&&P[1]===L[1]);re?P&&L&&(this._oldSelectionStart&&this._oldSelectionEnd&&P[0]===this._oldSelectionStart[0]&&P[1]===this._oldSelectionStart[1]&&L[0]===this._oldSelectionEnd[0]&&L[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(P,L,re)):this._oldHasSelection&&this._fireOnSelectionChange(P,L,re)}_fireOnSelectionChange(P,L,re){this._oldSelectionStart=P,this._oldSelectionEnd=L,this._oldHasSelection=re,this._onSelectionChange.fire()}_handleBufferActivate(P){this.clearSelection(),this._trimListener.dispose(),this._trimListener=P.activeBuffer.lines.onTrim(L=>this._handleTrim(L))}_convertViewportColToCharacterIndex(P,L){let re=L;for(let oe=0;L>=oe;oe++){let G=P.loadCell(oe,this._workCell).getChars().length;this._workCell.getWidth()===0?re--:G>1&&L!==oe&&(re+=G-1)}return re}setSelection(P,L,re){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[P,L],this._model.selectionStartLength=re,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(P){this._isClickInSelection(P)||(this._selectWordAtCursor(P,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(P,L,re=!0,oe=!0){if(P[0]>=this._bufferService.cols)return;let G=this._bufferService.buffer,$=G.lines.get(P[1]);if(!$)return;let ue=G.translateBufferLineToString(P[1],!1),be=this._convertViewportColToCharacterIndex($,P[0]),me=be,De=P[0]-be,he=0,B=0,X=0,se=0;if(ue.charAt(be)===" "){for(;be>0&&ue.charAt(be-1)===" ";)be--;for(;me1&&(se+=Qe-1,me+=Qe-1);ze>0&&be>0&&!this._isCharWordSeparator($.loadCell(ze-1,this._workCell));){$.loadCell(ze-1,this._workCell);let ye=this._workCell.getChars().length;this._workCell.getWidth()===0?(he++,ze--):ye>1&&(X+=ye-1,be-=ye-1),be--,ze--}for(;Ke<$.length&&me+11&&(se+=ye-1,me+=ye-1),me++,Ke++}}me++;let ce=be+De-he+X,ke=Math.min(this._bufferService.cols,me-be+he+B-X-se);if(L||ue.slice(be,me).trim()!==""){if(re&&ce===0&&$.getCodePoint(0)!==32){let ze=G.lines.get(P[1]-1);if(ze&&$.isWrapped&&ze.getCodePoint(this._bufferService.cols-1)!==32){let Ke=this._getWordAt([this._bufferService.cols-1,P[1]-1],!1,!0,!1);if(Ke){let Qe=this._bufferService.cols-Ke.start;ce-=Qe,ke+=Qe}}}if(oe&&ce+ke===this._bufferService.cols&&$.getCodePoint(this._bufferService.cols-1)!==32){let ze=G.lines.get(P[1]+1);if(ze?.isWrapped&&ze.getCodePoint(0)!==32){let Ke=this._getWordAt([0,P[1]+1],!1,!1,!0);Ke&&(ke+=Ke.length)}}return{start:ce,length:ke}}}_selectWordAt(P,L){let re=this._getWordAt(P,L);if(re){for(;re.start<0;)re.start+=this._bufferService.cols,P[1]--;this._model.selectionStart=[re.start,P[1]],this._model.selectionStartLength=re.length}}_selectToWordAt(P){let L=this._getWordAt(P,!0);if(L){let re=P[1];for(;L.start<0;)L.start+=this._bufferService.cols,re--;if(!this._model.areSelectionValuesReversed())for(;L.start+L.length>this._bufferService.cols;)L.length-=this._bufferService.cols,re++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?L.start:L.start+L.length,re]}}_isCharWordSeparator(P){return P.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(P.getChars())>=0}_selectLineAt(P){let L=this._bufferService.buffer.getWrappedRangeForLine(P),re={start:{x:0,y:L.first},end:{x:this._bufferService.cols-1,y:L.last}};this._model.selectionStart=[0,L.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,w.getRangeLength)(re,this._bufferService.cols)}};r.SelectionService=N=c([p(3,E.IBufferService),p(4,E.ICoreService),p(5,S.IMouseService),p(6,E.IOptionsService),p(7,S.IRenderService),p(8,S.ICoreBrowserService)],N)},4725:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ILinkProviderService=r.IThemeService=r.ICharacterJoinerService=r.ISelectionService=r.IRenderService=r.IMouseService=r.ICoreBrowserService=r.ICharSizeService=void 0;let c=a(8343);r.ICharSizeService=(0,c.createDecorator)("CharSizeService"),r.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),r.IMouseService=(0,c.createDecorator)("MouseService"),r.IRenderService=(0,c.createDecorator)("RenderService"),r.ISelectionService=(0,c.createDecorator)("SelectionService"),r.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService"),r.IThemeService=(0,c.createDecorator)("ThemeService"),r.ILinkProviderService=(0,c.createDecorator)("LinkProviderService")},6731:function(o,r,a){var c=this&&this.__decorate||function(N,P,L,re){var oe,G=arguments.length,$=G<3?P:re===null?re=Object.getOwnPropertyDescriptor(P,L):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(N,P,L,re);else for(var ue=N.length-1;ue>=0;ue--)(oe=N[ue])&&($=(G<3?oe($):G>3?oe(P,L,$):oe(P,L))||$);return G>3&&$&&Object.defineProperty(P,L,$),$},p=this&&this.__param||function(N,P){return function(L,re){P(L,re,N)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;let u=a(7239),h=a(8055),_=a(8460),S=a(844),x=a(2585),b=h.css.toColor("#ffffff"),M=h.css.toColor("#000000"),w=h.css.toColor("#ffffff"),y=h.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};r.DEFAULT_ANSI_COLORS=Object.freeze((()=>{let N=[h.css.toColor("#2e3436"),h.css.toColor("#cc0000"),h.css.toColor("#4e9a06"),h.css.toColor("#c4a000"),h.css.toColor("#3465a4"),h.css.toColor("#75507b"),h.css.toColor("#06989a"),h.css.toColor("#d3d7cf"),h.css.toColor("#555753"),h.css.toColor("#ef2929"),h.css.toColor("#8ae234"),h.css.toColor("#fce94f"),h.css.toColor("#729fcf"),h.css.toColor("#ad7fa8"),h.css.toColor("#34e2e2"),h.css.toColor("#eeeeec")],P=[0,95,135,175,215,255];for(let L=0;L<216;L++){let re=P[L/36%6|0],oe=P[L/6%6|0],G=P[L%6];N.push({css:h.channels.toCss(re,oe,G),rgba:h.channels.toRgba(re,oe,G)})}for(let L=0;L<24;L++){let re=8+10*L;N.push({css:h.channels.toCss(re,re,re),rgba:h.channels.toRgba(re,re,re)})}return N})());let I=r.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(N){super(),this._optionsService=N,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new _.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:b,background:M,cursor:w,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:h.color.blend(M,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:h.color.blend(M,E),ansi:r.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}_setTheme(N={}){let P=this._colors;if(P.foreground=D(N.foreground,b),P.background=D(N.background,M),P.cursor=D(N.cursor,w),P.cursorAccent=D(N.cursorAccent,y),P.selectionBackgroundTransparent=D(N.selectionBackground,E),P.selectionBackgroundOpaque=h.color.blend(P.background,P.selectionBackgroundTransparent),P.selectionInactiveBackgroundTransparent=D(N.selectionInactiveBackground,P.selectionBackgroundTransparent),P.selectionInactiveBackgroundOpaque=h.color.blend(P.background,P.selectionInactiveBackgroundTransparent),P.selectionForeground=N.selectionForeground?D(N.selectionForeground,h.NULL_COLOR):void 0,P.selectionForeground===h.NULL_COLOR&&(P.selectionForeground=void 0),h.color.isOpaque(P.selectionBackgroundTransparent)&&(P.selectionBackgroundTransparent=h.color.opacity(P.selectionBackgroundTransparent,.3)),h.color.isOpaque(P.selectionInactiveBackgroundTransparent)&&(P.selectionInactiveBackgroundTransparent=h.color.opacity(P.selectionInactiveBackgroundTransparent,.3)),P.ansi=r.DEFAULT_ANSI_COLORS.slice(),P.ansi[0]=D(N.black,r.DEFAULT_ANSI_COLORS[0]),P.ansi[1]=D(N.red,r.DEFAULT_ANSI_COLORS[1]),P.ansi[2]=D(N.green,r.DEFAULT_ANSI_COLORS[2]),P.ansi[3]=D(N.yellow,r.DEFAULT_ANSI_COLORS[3]),P.ansi[4]=D(N.blue,r.DEFAULT_ANSI_COLORS[4]),P.ansi[5]=D(N.magenta,r.DEFAULT_ANSI_COLORS[5]),P.ansi[6]=D(N.cyan,r.DEFAULT_ANSI_COLORS[6]),P.ansi[7]=D(N.white,r.DEFAULT_ANSI_COLORS[7]),P.ansi[8]=D(N.brightBlack,r.DEFAULT_ANSI_COLORS[8]),P.ansi[9]=D(N.brightRed,r.DEFAULT_ANSI_COLORS[9]),P.ansi[10]=D(N.brightGreen,r.DEFAULT_ANSI_COLORS[10]),P.ansi[11]=D(N.brightYellow,r.DEFAULT_ANSI_COLORS[11]),P.ansi[12]=D(N.brightBlue,r.DEFAULT_ANSI_COLORS[12]),P.ansi[13]=D(N.brightMagenta,r.DEFAULT_ANSI_COLORS[13]),P.ansi[14]=D(N.brightCyan,r.DEFAULT_ANSI_COLORS[14]),P.ansi[15]=D(N.brightWhite,r.DEFAULT_ANSI_COLORS[15]),N.extendedAnsi){let L=Math.min(P.ansi.length-16,N.extendedAnsi.length);for(let re=0;re{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;let c=a(8460),p=a(844);class u extends p.Disposable{constructor(_){super(),this._maxLength=_,this.onDeleteEmitter=this.register(new c.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new c.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new c.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(_){if(this._maxLength===_)return;let S=new Array(_);for(let x=0;xthis._length)for(let S=this._length;S<_;S++)this._array[S]=void 0;this._length=_}get(_){return this._array[this._getCyclicIndex(_)]}set(_,S){this._array[this._getCyclicIndex(_)]=S}push(_){this._array[this._getCyclicIndex(this._length)]=_,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(_,S,...x){if(S){for(let b=_;b=_;b--)this._array[this._getCyclicIndex(b+x.length)]=this._array[this._getCyclicIndex(b)];for(let b=0;bthis._maxLength){let b=this._length+x.length-this._maxLength;this._startIndex+=b,this._length=this._maxLength,this.onTrimEmitter.fire(b)}else this._length+=x.length}trimStart(_){_>this._length&&(_=this._length),this._startIndex+=_,this._length-=_,this.onTrimEmitter.fire(_)}shiftElements(_,S,x){if(!(S<=0)){if(_<0||_>=this._length)throw new Error("start argument out of range");if(_+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let M=S-1;M>=0;M--)this.set(_+M+x,this.get(_+M));let b=_+S+x-this._length;if(b>0)for(this._length+=b;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let b=0;b{Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0,r.clone=function a(c,p=5){if(typeof c!="object")return c;let u=Array.isArray(c)?[]:{};for(let h in c)u[h]=p<=1?c[h]:c[h]&&a(c[h],p-1);return u}},8055:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;let a=0,c=0,p=0,u=0;var h,_,S,x,b;function M(y){let E=y.toString(16);return E.length<2?"0"+E:E}function w(y,E){return y>>0},y.toColor=function(E,I,D,N){return{css:y.toCss(E,I,D,N),rgba:y.toRgba(E,I,D,N)}}})(h||(r.channels=h={})),(function(y){function E(I,D){return u=Math.round(255*D),[a,c,p]=b.toChannels(I.rgba),{css:h.toCss(a,c,p,u),rgba:h.toRgba(a,c,p,u)}}y.blend=function(I,D){if(u=(255&D.rgba)/255,u===1)return{css:D.css,rgba:D.rgba};let N=D.rgba>>24&255,P=D.rgba>>16&255,L=D.rgba>>8&255,re=I.rgba>>24&255,oe=I.rgba>>16&255,G=I.rgba>>8&255;return a=re+Math.round((N-re)*u),c=oe+Math.round((P-oe)*u),p=G+Math.round((L-G)*u),{css:h.toCss(a,c,p),rgba:h.toRgba(a,c,p)}},y.isOpaque=function(I){return(255&I.rgba)==255},y.ensureContrastRatio=function(I,D,N){let P=b.ensureContrastRatio(I.rgba,D.rgba,N);if(P)return h.toColor(P>>24&255,P>>16&255,P>>8&255)},y.opaque=function(I){let D=(255|I.rgba)>>>0;return[a,c,p]=b.toChannels(D),{css:h.toCss(a,c,p),rgba:D}},y.opacity=E,y.multiplyOpacity=function(I,D){return u=255&I.rgba,E(I,u*D/255)},y.toColorRGB=function(I){return[I.rgba>>24&255,I.rgba>>16&255,I.rgba>>8&255]}})(_||(r.color=_={})),(function(y){let E,I;try{let D=document.createElement("canvas");D.width=1,D.height=1;let N=D.getContext("2d",{willReadFrequently:!0});N&&(E=N,E.globalCompositeOperation="copy",I=E.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(D){if(D.match(/#[\da-f]{3,8}/i))switch(D.length){case 4:return a=parseInt(D.slice(1,2).repeat(2),16),c=parseInt(D.slice(2,3).repeat(2),16),p=parseInt(D.slice(3,4).repeat(2),16),h.toColor(a,c,p);case 5:return a=parseInt(D.slice(1,2).repeat(2),16),c=parseInt(D.slice(2,3).repeat(2),16),p=parseInt(D.slice(3,4).repeat(2),16),u=parseInt(D.slice(4,5).repeat(2),16),h.toColor(a,c,p,u);case 7:return{css:D,rgba:(parseInt(D.slice(1),16)<<8|255)>>>0};case 9:return{css:D,rgba:parseInt(D.slice(1),16)>>>0}}let N=D.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(N)return a=parseInt(N[1]),c=parseInt(N[2]),p=parseInt(N[3]),u=Math.round(255*(N[5]===void 0?1:parseFloat(N[5]))),h.toColor(a,c,p,u);if(!E||!I)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=I,E.fillStyle=D,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[a,c,p,u]=E.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:h.toRgba(a,c,p,u),css:D}}})(S||(r.css=S={})),(function(y){function E(I,D,N){let P=I/255,L=D/255,re=N/255;return .2126*(P<=.03928?P/12.92:Math.pow((P+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(re<=.03928?re/12.92:Math.pow((re+.055)/1.055,2.4))}y.relativeLuminance=function(I){return E(I>>16&255,I>>8&255,255&I)},y.relativeLuminance2=E})(x||(r.rgb=x={})),(function(y){function E(D,N,P){let L=D>>24&255,re=D>>16&255,oe=D>>8&255,G=N>>24&255,$=N>>16&255,ue=N>>8&255,be=w(x.relativeLuminance2(G,$,ue),x.relativeLuminance2(L,re,oe));for(;be0||$>0||ue>0);)G-=Math.max(0,Math.ceil(.1*G)),$-=Math.max(0,Math.ceil(.1*$)),ue-=Math.max(0,Math.ceil(.1*ue)),be=w(x.relativeLuminance2(G,$,ue),x.relativeLuminance2(L,re,oe));return(G<<24|$<<16|ue<<8|255)>>>0}function I(D,N,P){let L=D>>24&255,re=D>>16&255,oe=D>>8&255,G=N>>24&255,$=N>>16&255,ue=N>>8&255,be=w(x.relativeLuminance2(G,$,ue),x.relativeLuminance2(L,re,oe));for(;be>>0}y.blend=function(D,N){if(u=(255&N)/255,u===1)return N;let P=N>>24&255,L=N>>16&255,re=N>>8&255,oe=D>>24&255,G=D>>16&255,$=D>>8&255;return a=oe+Math.round((P-oe)*u),c=G+Math.round((L-G)*u),p=$+Math.round((re-$)*u),h.toRgba(a,c,p)},y.ensureContrastRatio=function(D,N,P){let L=x.relativeLuminance(D>>8),re=x.relativeLuminance(N>>8);if(w(L,re)>8));if(uew(L,x.relativeLuminance(be>>8))?$:be}return $}let oe=I(D,N,P),G=w(L,x.relativeLuminance(oe>>8));if(Gw(L,x.relativeLuminance($>>8))?oe:$}return oe}},y.reduceLuminance=E,y.increaseLuminance=I,y.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(b||(r.rgba=b={})),r.toPaddedHex=M,r.contrastRatio=w},8969:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreTerminal=void 0;let c=a(844),p=a(2585),u=a(4348),h=a(7866),_=a(744),S=a(7302),x=a(6975),b=a(8460),M=a(1753),w=a(1480),y=a(7994),E=a(9282),I=a(5435),D=a(5981),N=a(2660),P=!1;class L extends c.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new b.EventEmitter),this._onScroll.event(oe=>{this._onScrollApi?.fire(oe.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(oe){for(let G in oe)this.optionsService.options[G]=oe[G]}constructor(oe){super(),this._windowsWrappingHeuristics=this.register(new c.MutableDisposable),this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new b.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new b.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new b.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new S.OptionsService(oe)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(_.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(h.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(M.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(w.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(N.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new I.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,b.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,b.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,b.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,b.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(G=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(G=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new D.WriteBuffer((G,$)=>this._inputHandler.parse(G,$))),this.register((0,b.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(oe,G){this._writeBuffer.write(oe,G)}writeSync(oe,G){this._logService.logLevel<=p.LogLevelEnum.WARN&&!P&&(this._logService.warn("writeSync is unreliable and will be removed soon."),P=!0),this._writeBuffer.writeSync(oe,G)}input(oe,G=!0){this.coreService.triggerDataEvent(oe,G)}resize(oe,G){isNaN(oe)||isNaN(G)||(oe=Math.max(oe,_.MINIMUM_COLS),G=Math.max(G,_.MINIMUM_ROWS),this._bufferService.resize(oe,G))}scroll(oe,G=!1){this._bufferService.scroll(oe,G)}scrollLines(oe,G,$){this._bufferService.scrollLines(oe,G,$)}scrollPages(oe){this.scrollLines(oe*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(oe){let G=oe-this._bufferService.buffer.ydisp;G!==0&&this.scrollLines(G)}registerEscHandler(oe,G){return this._inputHandler.registerEscHandler(oe,G)}registerDcsHandler(oe,G){return this._inputHandler.registerDcsHandler(oe,G)}registerCsiHandler(oe,G){return this._inputHandler.registerCsiHandler(oe,G)}registerOscHandler(oe,G){return this._inputHandler.registerOscHandler(oe,G)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let oe=!1,G=this.optionsService.rawOptions.windowsPty;G&&G.buildNumber!==void 0&&G.buildNumber!==void 0?oe=G.backend==="conpty"&&G.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(oe=!0),oe?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let oe=[];oe.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),oe.push(this.registerCsiHandler({final:"H"},()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,c.toDisposable)(()=>{for(let G of oe)G.dispose()})}}}r.CoreTerminal=L},8460:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let c=0;cc.fire(p))},r.runAndSubscribe=function(a,c){return c(void 0),a(p=>c(p))}},5435:function(o,r,a){var c=this&&this.__decorate||function(he,B,X,se){var ce,ke=arguments.length,ze=ke<3?B:se===null?se=Object.getOwnPropertyDescriptor(B,X):se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ze=Reflect.decorate(he,B,X,se);else for(var Ke=he.length-1;Ke>=0;Ke--)(ce=he[Ke])&&(ze=(ke<3?ce(ze):ke>3?ce(B,X,ze):ce(B,X))||ze);return ke>3&&ze&&Object.defineProperty(B,X,ze),ze},p=this&&this.__param||function(he,B){return function(X,se){B(X,se,he)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;let u=a(2584),h=a(7116),_=a(2015),S=a(844),x=a(482),b=a(8437),M=a(8460),w=a(643),y=a(511),E=a(3734),I=a(2585),D=a(1480),N=a(6242),P=a(6351),L=a(5941),re={"(":0,")":1,"*":2,"+":3,"-":1,".":2},oe=131072;function G(he,B){if(he>24)return B.setWinLines||!1;switch(he){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var $;(function(he){he[he.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",he[he.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})($||(r.WindowsOptionsReportType=$={}));let ue=0;class be extends S.Disposable{getAttrData(){return this._curAttrData}constructor(B,X,se,ce,ke,ze,Ke,Qe,ye=new _.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=X,this._coreService=se,this._logService=ce,this._optionsService=ke,this._oscLinkService=ze,this._coreMouseService=Ke,this._unicodeService=Qe,this._parser=ye,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new M.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new M.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new M.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new M.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new M.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new M.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new M.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new M.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new M.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new M.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new M.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new me(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(q=>this._activeBuffer=q.activeBuffer)),this._parser.setCsiHandlerFallback((q,Oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:Oe.toArray()})}),this._parser.setEscHandlerFallback(q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})}),this._parser.setExecuteHandlerFallback(q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})}),this._parser.setOscHandlerFallback((q,Oe,We)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:Oe,data:We})}),this._parser.setDcsHandlerFallback((q,Oe,We)=>{Oe==="HOOK"&&(We=We.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:Oe,payload:We})}),this._parser.setPrintHandler((q,Oe,We)=>this.print(q,Oe,We)),this._parser.registerCsiHandler({final:"@"},q=>this.insertChars(q)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},q=>this.scrollLeft(q)),this._parser.registerCsiHandler({final:"A"},q=>this.cursorUp(q)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},q=>this.scrollRight(q)),this._parser.registerCsiHandler({final:"B"},q=>this.cursorDown(q)),this._parser.registerCsiHandler({final:"C"},q=>this.cursorForward(q)),this._parser.registerCsiHandler({final:"D"},q=>this.cursorBackward(q)),this._parser.registerCsiHandler({final:"E"},q=>this.cursorNextLine(q)),this._parser.registerCsiHandler({final:"F"},q=>this.cursorPrecedingLine(q)),this._parser.registerCsiHandler({final:"G"},q=>this.cursorCharAbsolute(q)),this._parser.registerCsiHandler({final:"H"},q=>this.cursorPosition(q)),this._parser.registerCsiHandler({final:"I"},q=>this.cursorForwardTab(q)),this._parser.registerCsiHandler({final:"J"},q=>this.eraseInDisplay(q,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},q=>this.eraseInDisplay(q,!0)),this._parser.registerCsiHandler({final:"K"},q=>this.eraseInLine(q,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},q=>this.eraseInLine(q,!0)),this._parser.registerCsiHandler({final:"L"},q=>this.insertLines(q)),this._parser.registerCsiHandler({final:"M"},q=>this.deleteLines(q)),this._parser.registerCsiHandler({final:"P"},q=>this.deleteChars(q)),this._parser.registerCsiHandler({final:"S"},q=>this.scrollUp(q)),this._parser.registerCsiHandler({final:"T"},q=>this.scrollDown(q)),this._parser.registerCsiHandler({final:"X"},q=>this.eraseChars(q)),this._parser.registerCsiHandler({final:"Z"},q=>this.cursorBackwardTab(q)),this._parser.registerCsiHandler({final:"`"},q=>this.charPosAbsolute(q)),this._parser.registerCsiHandler({final:"a"},q=>this.hPositionRelative(q)),this._parser.registerCsiHandler({final:"b"},q=>this.repeatPrecedingCharacter(q)),this._parser.registerCsiHandler({final:"c"},q=>this.sendDeviceAttributesPrimary(q)),this._parser.registerCsiHandler({prefix:">",final:"c"},q=>this.sendDeviceAttributesSecondary(q)),this._parser.registerCsiHandler({final:"d"},q=>this.linePosAbsolute(q)),this._parser.registerCsiHandler({final:"e"},q=>this.vPositionRelative(q)),this._parser.registerCsiHandler({final:"f"},q=>this.hVPosition(q)),this._parser.registerCsiHandler({final:"g"},q=>this.tabClear(q)),this._parser.registerCsiHandler({final:"h"},q=>this.setMode(q)),this._parser.registerCsiHandler({prefix:"?",final:"h"},q=>this.setModePrivate(q)),this._parser.registerCsiHandler({final:"l"},q=>this.resetMode(q)),this._parser.registerCsiHandler({prefix:"?",final:"l"},q=>this.resetModePrivate(q)),this._parser.registerCsiHandler({final:"m"},q=>this.charAttributes(q)),this._parser.registerCsiHandler({final:"n"},q=>this.deviceStatus(q)),this._parser.registerCsiHandler({prefix:"?",final:"n"},q=>this.deviceStatusPrivate(q)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},q=>this.softReset(q)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},q=>this.setCursorStyle(q)),this._parser.registerCsiHandler({final:"r"},q=>this.setScrollRegion(q)),this._parser.registerCsiHandler({final:"s"},q=>this.saveCursor(q)),this._parser.registerCsiHandler({final:"t"},q=>this.windowOptions(q)),this._parser.registerCsiHandler({final:"u"},q=>this.restoreCursor(q)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},q=>this.insertColumns(q)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},q=>this.deleteColumns(q)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},q=>this.selectProtected(q)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},q=>this.requestMode(q,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},q=>this.requestMode(q,!1)),this._parser.setExecuteHandler(u.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(u.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(u.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(u.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(u.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(u.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(u.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(u.C1.IND,()=>this.index()),this._parser.setExecuteHandler(u.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(u.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new N.OscHandler(q=>(this.setTitle(q),this.setIconName(q),!0))),this._parser.registerOscHandler(1,new N.OscHandler(q=>this.setIconName(q))),this._parser.registerOscHandler(2,new N.OscHandler(q=>this.setTitle(q))),this._parser.registerOscHandler(4,new N.OscHandler(q=>this.setOrReportIndexedColor(q))),this._parser.registerOscHandler(8,new N.OscHandler(q=>this.setHyperlink(q))),this._parser.registerOscHandler(10,new N.OscHandler(q=>this.setOrReportFgColor(q))),this._parser.registerOscHandler(11,new N.OscHandler(q=>this.setOrReportBgColor(q))),this._parser.registerOscHandler(12,new N.OscHandler(q=>this.setOrReportCursorColor(q))),this._parser.registerOscHandler(104,new N.OscHandler(q=>this.restoreIndexedColor(q))),this._parser.registerOscHandler(110,new N.OscHandler(q=>this.restoreFgColor(q))),this._parser.registerOscHandler(111,new N.OscHandler(q=>this.restoreBgColor(q))),this._parser.registerOscHandler(112,new N.OscHandler(q=>this.restoreCursorColor(q))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let q in h.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},()=>this.selectCharset("("+q)),this._parser.registerEscHandler({intermediates:")",final:q},()=>this.selectCharset(")"+q)),this._parser.registerEscHandler({intermediates:"*",final:q},()=>this.selectCharset("*"+q)),this._parser.registerEscHandler({intermediates:"+",final:q},()=>this.selectCharset("+"+q)),this._parser.registerEscHandler({intermediates:"-",final:q},()=>this.selectCharset("-"+q)),this._parser.registerEscHandler({intermediates:".",final:q},()=>this.selectCharset("."+q)),this._parser.registerEscHandler({intermediates:"/",final:q},()=>this.selectCharset("/"+q));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(q=>(this._logService.error("Parsing error: ",q),q)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new P.DcsHandler((q,Oe)=>this.requestStatusString(q,Oe)))}_preserveStack(B,X,se,ce){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=X,this._parseStack.decodedLength=se,this._parseStack.position=ce}_logSlowResolvingAsync(B){this._logService.logLevel<=I.LogLevelEnum.WARN&&Promise.race([B,new Promise((X,se)=>setTimeout(()=>se("#SLOW_TIMEOUT"),5e3))]).catch(X=>{if(X!=="#SLOW_TIMEOUT")throw X;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(B,X){let se,ce=this._activeBuffer.x,ke=this._activeBuffer.y,ze=0,Ke=this._parseStack.paused;if(Ke){if(se=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,X))return this._logSlowResolvingAsync(se),se;ce=this._parseStack.cursorStartX,ke=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>oe&&(ze=this._parseStack.position+oe)}if(this._logService.logLevel<=I.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,q=>String.fromCharCode(q)).join("")}"`),typeof B=="string"?B.split("").map(q=>q.charCodeAt(0)):B),this._parseBuffer.lengthoe)for(let q=ze;q0&&We.getWidth(this._activeBuffer.x-1)===2&&We.setCellFromCodepoint(this._activeBuffer.x-1,0,1,Oe);let ct=this._parser.precedingJoinState;for(let Tt=X;TtQe){if(ye){let Br=We,Rn=this._activeBuffer.x-_o;for(this._activeBuffer.x=_o,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),We=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),_o>0&&We instanceof b.BufferLine&&We.copyCellsFrom(Br,Rn,0,_o,!1);Rn=0;)We.setCellFromCodepoint(this._activeBuffer.x++,0,0,Oe)}else if(q&&(We.insertCells(this._activeBuffer.x,ke-_o,this._activeBuffer.getNullCell(Oe)),We.getWidth(Qe-1)===2&&We.setCellFromCodepoint(Qe-1,w.NULL_CELL_CODE,w.NULL_CELL_WIDTH,Oe)),We.setCellFromCodepoint(this._activeBuffer.x++,ce,ke,Oe),ke>0)for(;--ke;)We.setCellFromCodepoint(this._activeBuffer.x++,0,0,Oe)}this._parser.precedingJoinState=ct,this._activeBuffer.x0&&We.getWidth(this._activeBuffer.x)===0&&!We.hasContent(this._activeBuffer.x)&&We.setCellFromCodepoint(this._activeBuffer.x,0,1,Oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,X){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,X):this._parser.registerCsiHandler(B,se=>!G(se.params[0],this._optionsService.rawOptions.windowOptions)||X(se))}registerDcsHandler(B,X){return this._parser.registerDcsHandler(B,new P.DcsHandler(X))}registerEscHandler(B,X){return this._parser.registerEscHandler(B,X)}registerOscHandler(B,X){return this._parser.registerOscHandler(B,new N.OscHandler(X))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(B,X){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+X):(this._activeBuffer.x=B,this._activeBuffer.y=X),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,X){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+X)}cursorUp(B){let X=this._activeBuffer.y-this._activeBuffer.scrollTop;return X>=0?this._moveCursor(0,-Math.min(X,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){let X=this._activeBuffer.scrollBottom-this._activeBuffer.y;return X>=0?this._moveCursor(0,Math.min(X,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){let X=B.params[0];return X===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:X===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let X=B.params[0]||1;for(;X--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let X=B.params[0]||1;for(;X--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){let X=B.params[0];return X===1&&(this._curAttrData.bg|=536870912),X!==2&&X!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,X,se,ce=!1,ke=!1){let ze=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);ze.replaceCells(X,se,this._activeBuffer.getNullCell(this._eraseAttrData()),ke),ce&&(ze.isWrapped=!1)}_resetBufferLine(B,X=!1){let se=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);se&&(se.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),X),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),se.isWrapped=!1)}eraseInDisplay(B,X=!1){let se;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for(se=this._activeBuffer.y,this._dirtyRowTracker.markDirty(se),this._eraseInBufferLine(se++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,X);se=this._bufferService.cols&&(this._activeBuffer.lines.get(se+1).isWrapped=!1);se--;)this._resetBufferLine(se,X);this._dirtyRowTracker.markDirty(0);break;case 2:for(se=this._bufferService.rows,this._dirtyRowTracker.markDirty(se-1);se--;)this._resetBufferLine(se,X);this._dirtyRowTracker.markDirty(0);break;case 3:let ce=this._activeBuffer.lines.length-this._bufferService.rows;ce>0&&(this._activeBuffer.lines.trimStart(ce),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-ce,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-ce,0),this._onScroll.fire(0))}return!0}eraseInLine(B,X=!1){switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,X);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,X);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,X)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(B){this._restrictCursor();let X=B.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let ye=Qe;for(let q=1;q0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(B){return B.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let X=0;XIo?1:2,ct=B.params[0];return Tt=ct,Xn=X?ct===2?4:ct===4?We(ze.modes.insertMode):ct===12?3:ct===20?We(Oe.convertEol):0:ct===1?We(se.applicationCursorKeys):ct===3?Oe.windowOptions.setWinLines?Qe===80?2:Qe===132?1:0:0:ct===6?We(se.origin):ct===7?We(se.wraparound):ct===8?3:ct===9?We(ce==="X10"):ct===12?We(Oe.cursorBlink):ct===25?We(!ze.isCursorHidden):ct===45?We(se.reverseWraparound):ct===66?We(se.applicationKeypad):ct===67?4:ct===1e3?We(ce==="VT200"):ct===1002?We(ce==="DRAG"):ct===1003?We(ce==="ANY"):ct===1004?We(se.sendFocus):ct===1005?4:ct===1006?We(ke==="SGR"):ct===1015?4:ct===1016?We(ke==="SGR_PIXELS"):ct===1048?1:ct===47||ct===1047||ct===1049?We(ye===q):ct===2004?We(se.bracketedPasteMode):0,ze.triggerDataEvent(`${u.C0.ESC}[${X?"":"?"}${Tt};${Xn}$y`),!0;var Tt,Xn}_updateAttrColor(B,X,se,ce,ke){return X===2?(B|=50331648,B&=-16777216,B|=E.AttributeData.fromColorRGB([se,ce,ke])):X===5&&(B&=-50331904,B|=33554432|255&se),B}_extractColor(B,X,se){let ce=[0,0,-1,0,0,0],ke=0,ze=0;do{if(ce[ze+ke]=B.params[X+ze],B.hasSubParams(X+ze)){let Ke=B.getSubParams(X+ze),Qe=0;do ce[1]===5&&(ke=1),ce[ze+Qe+1+ke]=Ke[Qe];while(++Qe=2||ce[1]===2&&ze+ke>=5)break;ce[1]&&(ke=1)}while(++ze+X5)&&(B=1),X.extended.underlineStyle=B,X.fg|=268435456,B===0&&(X.fg&=-268435457),X.updateExtended()}_processSGR0(B){B.fg=b.DEFAULT_ATTR_DATA.fg,B.bg=b.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;let X=B.length,se,ce=this._curAttrData;for(let ke=0;ke=30&&se<=37?(ce.fg&=-50331904,ce.fg|=16777216|se-30):se>=40&&se<=47?(ce.bg&=-50331904,ce.bg|=16777216|se-40):se>=90&&se<=97?(ce.fg&=-50331904,ce.fg|=16777224|se-90):se>=100&&se<=107?(ce.bg&=-50331904,ce.bg|=16777224|se-100):se===0?this._processSGR0(ce):se===1?ce.fg|=134217728:se===3?ce.bg|=67108864:se===4?(ce.fg|=268435456,this._processUnderline(B.hasSubParams(ke)?B.getSubParams(ke)[0]:1,ce)):se===5?ce.fg|=536870912:se===7?ce.fg|=67108864:se===8?ce.fg|=1073741824:se===9?ce.fg|=2147483648:se===2?ce.bg|=134217728:se===21?this._processUnderline(2,ce):se===22?(ce.fg&=-134217729,ce.bg&=-134217729):se===23?ce.bg&=-67108865:se===24?(ce.fg&=-268435457,this._processUnderline(0,ce)):se===25?ce.fg&=-536870913:se===27?ce.fg&=-67108865:se===28?ce.fg&=-1073741825:se===29?ce.fg&=2147483647:se===39?(ce.fg&=-67108864,ce.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):se===49?(ce.bg&=-67108864,ce.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):se===38||se===48||se===58?ke+=this._extractColor(B,ke,ce):se===53?ce.bg|=1073741824:se===55?ce.bg&=-1073741825:se===59?(ce.extended=ce.extended.clone(),ce.extended.underlineColor=-1,ce.updateExtended()):se===100?(ce.fg&=-67108864,ce.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,ce.bg&=-67108864,ce.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",se);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:let X=this._activeBuffer.y+1,se=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${X};${se}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){let X=this._activeBuffer.y+1,se=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${X};${se}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(B){let X=B.params[0]||1;switch(X){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}let se=X%2==1;return this._optionsService.options.cursorBlink=se,!0}setScrollRegion(B){let X=B.params[0]||1,se;return(B.length<2||(se=B.params[1])>this._bufferService.rows||se===0)&&(se=this._bufferService.rows),se>X&&(this._activeBuffer.scrollTop=X-1,this._activeBuffer.scrollBottom=se-1,this._setCursor(0,0)),!0}windowOptions(B){if(!G(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;let X=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:X!==2&&this._onRequestWindowsOptionsReport.fire($.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire($.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:X!==0&&X!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),X!==0&&X!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:X!==0&&X!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),X!==0&&X!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(B){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(B){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){let X=[],se=B.split(";");for(;se.length>1;){let ce=se.shift(),ke=se.shift();if(/^\d+$/.exec(ce)){let ze=parseInt(ce);if(De(ze))if(ke==="?")X.push({type:0,index:ze});else{let Ke=(0,L.parseColor)(ke);Ke&&X.push({type:1,index:ze,color:Ke})}}}return X.length&&this._onColor.fire(X),!0}setHyperlink(B){let X=B.split(";");return!(X.length<2)&&(X[1]?this._createHyperlink(X[0],X[1]):!X[0]&&this._finishHyperlink())}_createHyperlink(B,X){this._getCurrentLinkId()&&this._finishHyperlink();let se=B.split(":"),ce,ke=se.findIndex(ze=>ze.startsWith("id="));return ke!==-1&&(ce=se[ke].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:ce,uri:X}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(B,X){let se=B.split(";");for(let ce=0;ce=this._specialColors.length);++ce,++X)if(se[ce]==="?")this._onColor.fire([{type:0,index:this._specialColors[X]}]);else{let ke=(0,L.parseColor)(se[ce]);ke&&this._onColor.fire([{type:1,index:this._specialColors[X],color:ke}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;let X=[],se=B.split(";");for(let ce=0;ce=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){let B=new y.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let X=0;X(this._coreService.triggerDataEvent(`${u.C0.ESC}${ke}${u.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${se.scrollTop+1};${se.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[ce.cursorStyle]-(ce.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,X){this._dirtyRowTracker.markRangeDirty(B,X)}}r.InputHandler=be;let me=class{constructor(he){this._bufferService=he,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(he){hethis.end&&(this.end=he)}markRangeDirty(he,B){he>B&&(ue=he,he=B,B=ue),hethis.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function De(he){return 0<=he&&he<256}me=c([p(0,I.IBufferService)],me)},844:(o,r)=>{function a(c){for(let p of c)p.dispose();c.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(let c of this._disposables)c.dispose();this._disposables.length=0}register(c){return this._disposables.push(c),c}unregister(c){let p=this._disposables.indexOf(c);p!==-1&&this._disposables.splice(p,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(c){this._isDisposed||c===this._value||(this._value?.dispose(),this._value=c)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},r.toDisposable=function(c){return{dispose:c}},r.disposeArray=a,r.getDisposeArrayDisposable=function(c){return{dispose:()=>a(c)}}},1505:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(p,u,h){this._data[p]||(this._data[p]={}),this._data[p][u]=h}get(p,u){return this._data[p]?this._data[p][u]:void 0}clear(){this._data={}}}r.TwoKeyMap=a,r.FourKeyMap=class{constructor(){this._data=new a}set(c,p,u,h,_){this._data.get(c,p)||this._data.set(c,p,new a),this._data.get(c,p).set(u,h,_)}get(c,p,u,h){return this._data.get(c,p)?.get(u,h)}clear(){this._data.clear()}}},6114:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof process<"u"&&"title"in process;let a=r.isNode?"node":navigator.userAgent,c=r.isNode?"node":navigator.platform;r.isFirefox=a.includes("Firefox"),r.isLegacyEdge=a.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(a),r.getSafariVersion=function(){if(!r.isSafari)return 0;let p=a.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(c),r.isIpad=c==="iPad",r.isIphone=c==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(c),r.isLinux=c.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(a)},6106:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SortedList=void 0;let a=0;r.SortedList=class{constructor(c){this._getKey=c,this._array=[]}clear(){this._array.length=0}insert(c){this._array.length!==0?(a=this._search(this._getKey(c)),this._array.splice(a,0,c)):this._array.push(c)}delete(c){if(this._array.length===0)return!1;let p=this._getKey(c);if(p===void 0||(a=this._search(p),a===-1)||this._getKey(this._array[a])!==p)return!1;do if(this._array[a]===c)return this._array.splice(a,1),!0;while(++a=this._array.length)&&this._getKey(this._array[a])===c))do yield this._array[a];while(++a=this._array.length)&&this._getKey(this._array[a])===c))do p(this._array[a]);while(++a=p;){let h=p+u>>1,_=this._getKey(this._array[h]);if(_>c)u=h-1;else{if(!(_0&&this._getKey(this._array[h-1])===c;)h--;return h}p=h+1}}return p}}},7226:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;let c=a(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(_){this._tasks.push(_),this._start()}flush(){for(;this._iM)return b-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(b-S))}ms`),void this._start();b=M}this.clear()}}class u extends p{_requestCallback(_){return setTimeout(()=>_(this._createDeadline(16)))}_cancelCallback(_){clearTimeout(_)}_createDeadline(_){let S=Date.now()+_;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}r.PriorityTaskQueue=u,r.IdleTaskQueue=!c.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(h){return requestIdleCallback(h)}_cancelCallback(h){cancelIdleCallback(h)}}:u,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(h){this._queue.clear(),this._queue.enqueue(h)}flush(){this._queue.flush()}}},9282:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.updateWindowsModeWrappedState=void 0;let c=a(643);r.updateWindowsModeWrappedState=function(p){let u=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),h=u?.get(p.cols-1),_=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);_&&h&&(_.isWrapped=h[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&h[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new c}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){let u=new a;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}r.AttributeData=a;class c{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){let u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,h=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=h}clone(){return new c(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=c},9092:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Buffer=r.MAX_BUFFER_SIZE=void 0;let c=a(6349),p=a(7226),u=a(3734),h=a(8437),_=a(4634),S=a(511),x=a(643),b=a(4863),M=a(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(w,y,E){this._hasScrollback=w,this._optionsService=y,this._bufferService=E,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=h.DEFAULT_ATTR_DATA.clone(),this.savedCharset=M.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(w){return w?(this._nullCell.fg=w.fg,this._nullCell.bg=w.bg,this._nullCell.extended=w.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(w){return w?(this._whitespaceCell.fg=w.fg,this._whitespaceCell.bg=w.bg,this._whitespaceCell.extended=w.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(w,y){return new h.BufferLine(this._bufferService.cols,this.getNullCell(w),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let w=this.ybase+this.y-this.ydisp;return w>=0&&wr.MAX_BUFFER_SIZE?r.MAX_BUFFER_SIZE:y}fillViewportRows(w){if(this.lines.length===0){w===void 0&&(w=h.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(w))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(w,y){let E=this.getNullCell(h.DEFAULT_ATTR_DATA),I=0,D=this._getCorrectBufferLength(y);if(D>this.lines.maxLength&&(this.lines.maxLength=D),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+N+1?(this.ybase--,N++,this.ydisp>0&&this.ydisp--):this.lines.push(new h.BufferLine(w,E)));else for(let P=this._rows;P>y;P--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(D0&&(this.lines.trimStart(P),this.ybase=Math.max(this.ybase-P,0),this.ydisp=Math.max(this.ydisp-P,0),this.savedY=Math.max(this.savedY-P,0)),this.lines.maxLength=D}this.x=Math.min(this.x,w-1),this.y=Math.min(this.y,y-1),N&&(this.y+=N),this.savedX=Math.min(this.savedX,w-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(w,y),this._cols>w))for(let N=0;N.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let w=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,w=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return w}get _isReflowEnabled(){let w=this._optionsService.rawOptions.windowsPty;return w&&w.buildNumber?this._hasScrollback&&w.backend==="conpty"&&w.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(w,y){this._cols!==w&&(w>this._cols?this._reflowLarger(w,y):this._reflowSmaller(w,y))}_reflowLarger(w,y){let E=(0,_.reflowLargerGetLinesToRemove)(this.lines,this._cols,w,this.ybase+this.y,this.getNullCell(h.DEFAULT_ATTR_DATA));if(E.length>0){let I=(0,_.reflowLargerCreateNewLayout)(this.lines,E);(0,_.reflowLargerApplyNewLayout)(this.lines,I.layout),this._reflowLargerAdjustViewport(w,y,I.countRemoved)}}_reflowLargerAdjustViewport(w,y,E){let I=this.getNullCell(h.DEFAULT_ATTR_DATA),D=E;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;N--){let P=this.lines.get(N);if(!P||!P.isWrapped&&P.getTrimmedLength()<=w)continue;let L=[P];for(;P.isWrapped&&N>0;)P=this.lines.get(--N),L.unshift(P);let re=this.ybase+this.y;if(re>=N&&re0&&(I.push({start:N+L.length+D,newLines:be}),D+=be.length),L.push(...be);let me=G.length-1,De=G[me];De===0&&(me--,De=G[me]);let he=L.length-$-1,B=oe;for(;he>=0;){let se=Math.min(B,De);if(L[me]===void 0)break;if(L[me].copyCellsFrom(L[he],B-se,De-se,se,!0),De-=se,De===0&&(me--,De=G[me]),B-=se,B===0){he--;let ce=Math.max(he,0);B=(0,_.getWrappedLineTrimmedLength)(L,ce,this._cols)}}for(let se=0;se0;)this.ybase===0?this.y0){let N=[],P=[];for(let me=0;me=0;me--)if(G&&G.start>re+$){for(let De=G.newLines.length-1;De>=0;De--)this.lines.set(me--,G.newLines[De]);me++,N.push({index:re+1,amount:G.newLines.length}),$+=G.newLines.length,G=I[++oe]}else this.lines.set(me,P[re--]);let ue=0;for(let me=N.length-1;me>=0;me--)N[me].index+=ue,this.lines.onInsertEmitter.fire(N[me]),ue+=N[me].amount;let be=Math.max(0,L+D-this.lines.maxLength);be>0&&this.lines.onTrimEmitter.fire(be)}}translateBufferLineToString(w,y,E=0,I){let D=this.lines.get(w);return D?D.translateToString(y,E,I):""}getWrappedRangeForLine(w){let y=w,E=w;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;E+10;);return w>=this._cols?this._cols-1:w<0?0:w}nextStop(w){for(w==null&&(w=this.x);!this.tabs[++w]&&w=this._cols?this._cols-1:w<0?0:w}clearMarkers(w){this._isClearing=!0;for(let y=0;y{y.line-=E,y.line<0&&y.dispose()})),y.register(this.lines.onInsert(E=>{y.line>=E.index&&(y.line+=E.amount)})),y.register(this.lines.onDelete(E=>{y.line>=E.index&&y.lineE.index&&(y.line-=E.amount)})),y.register(y.onDispose(()=>this._removeMarker(y))),y}_removeMarker(w){this._isClearing||this.markers.splice(this.markers.indexOf(w),1)}}},8437:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLine=r.DEFAULT_ATTR_DATA=void 0;let c=a(3734),p=a(511),u=a(643),h=a(482);r.DEFAULT_ATTR_DATA=Object.freeze(new c.AttributeData);let _=0;class S{constructor(b,M,w=!1){this.isWrapped=w,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*b);let y=M||p.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let E=0;E>22,2097152&M?this._combined[b].charCodeAt(this._combined[b].length-1):w]}set(b,M){this._data[3*b+1]=M[u.CHAR_DATA_ATTR_INDEX],M[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[b]=M[1],this._data[3*b+0]=2097152|b|M[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*b+0]=M[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|M[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(b){return this._data[3*b+0]>>22}hasWidth(b){return 12582912&this._data[3*b+0]}getFg(b){return this._data[3*b+1]}getBg(b){return this._data[3*b+2]}hasContent(b){return 4194303&this._data[3*b+0]}getCodePoint(b){let M=this._data[3*b+0];return 2097152&M?this._combined[b].charCodeAt(this._combined[b].length-1):2097151&M}isCombined(b){return 2097152&this._data[3*b+0]}getString(b){let M=this._data[3*b+0];return 2097152&M?this._combined[b]:2097151&M?(0,h.stringFromCodePoint)(2097151&M):""}isProtected(b){return 536870912&this._data[3*b+2]}loadCell(b,M){return _=3*b,M.content=this._data[_+0],M.fg=this._data[_+1],M.bg=this._data[_+2],2097152&M.content&&(M.combinedData=this._combined[b]),268435456&M.bg&&(M.extended=this._extendedAttrs[b]),M}setCell(b,M){2097152&M.content&&(this._combined[b]=M.combinedData),268435456&M.bg&&(this._extendedAttrs[b]=M.extended),this._data[3*b+0]=M.content,this._data[3*b+1]=M.fg,this._data[3*b+2]=M.bg}setCellFromCodepoint(b,M,w,y){268435456&y.bg&&(this._extendedAttrs[b]=y.extended),this._data[3*b+0]=M|w<<22,this._data[3*b+1]=y.fg,this._data[3*b+2]=y.bg}addCodepointToCell(b,M,w){let y=this._data[3*b+0];2097152&y?this._combined[b]+=(0,h.stringFromCodePoint)(M):2097151&y?(this._combined[b]=(0,h.stringFromCodePoint)(2097151&y)+(0,h.stringFromCodePoint)(M),y&=-2097152,y|=2097152):y=M|4194304,w&&(y&=-12582913,y|=w<<22),this._data[3*b+0]=y}insertCells(b,M,w){if((b%=this.length)&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,w),M=0;--E)this.setCell(b+M+E,this.loadCell(b+E,y));for(let E=0;Ethis.length){if(this._data.buffer.byteLength>=4*w)this._data=new Uint32Array(this._data.buffer,0,w);else{let y=new Uint32Array(w);y.set(this._data),this._data=y}for(let y=this.length;y=b&&delete this._combined[D]}let E=Object.keys(this._extendedAttrs);for(let I=0;I=b&&delete this._extendedAttrs[D]}}return this.length=b,4*w*2=0;--b)if(4194303&this._data[3*b+0])return b+(this._data[3*b+0]>>22);return 0}getNoBgTrimmedLength(){for(let b=this.length-1;b>=0;--b)if(4194303&this._data[3*b+0]||50331648&this._data[3*b+2])return b+(this._data[3*b+0]>>22);return 0}copyCellsFrom(b,M,w,y,E){let I=b._data;if(E)for(let N=y-1;N>=0;N--){for(let P=0;P<3;P++)this._data[3*(w+N)+P]=I[3*(M+N)+P];268435456&I[3*(M+N)+2]&&(this._extendedAttrs[w+N]=b._extendedAttrs[M+N])}else for(let N=0;N=M&&(this._combined[P-M+w]=b._combined[P])}}translateToString(b,M,w,y){M=M??0,w=w??this.length,b&&(w=Math.min(w,this.getTrimmedLength())),y&&(y.length=0);let E="";for(;M>22||1}return y&&y.push(M),E}}r.BufferLine=S},4841:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getRangeLength=void 0,r.getRangeLength=function(a,c){if(a.start.y>a.end.y)throw new Error(`Buffer range end (${a.end.x}, ${a.end.y}) cannot be before start (${a.start.x}, ${a.start.y})`);return c*(a.end.y-a.start.y)+(a.end.x-a.start.x+1)}},4634:(o,r)=>{function a(c,p,u){if(p===c.length-1)return c[p].getTrimmedLength();let h=!c[p].hasContent(u-1)&&c[p].getWidth(u-1)===1,_=c[p+1].getWidth(0)===2;return h&&_?u-1:u}Object.defineProperty(r,"__esModule",{value:!0}),r.getWrappedLineTrimmedLength=r.reflowSmallerGetNewLineLengths=r.reflowLargerApplyNewLayout=r.reflowLargerCreateNewLayout=r.reflowLargerGetLinesToRemove=void 0,r.reflowLargerGetLinesToRemove=function(c,p,u,h,_){let S=[];for(let x=0;x=x&&h0&&(P>y||w[P].getTrimmedLength()===0);P--)N++;N>0&&(S.push(x+w.length-N),S.push(N)),x+=w.length-1}return S},r.reflowLargerCreateNewLayout=function(c,p){let u=[],h=0,_=p[h],S=0;for(let x=0;xa(c,w,p)).reduce((M,w)=>M+w),S=0,x=0,b=0;for(;b<_;){if(_-bM&&(S-=M,x++);let w=c[x].getWidth(S-1)===2;w&&S--;let y=w?u-1:u;h.push(y),b+=y}return h},r.getWrappedLineTrimmedLength=a},5295:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferSet=void 0;let c=a(8460),p=a(844),u=a(9092);class h extends p.Disposable{constructor(S,x){super(),this._optionsService=S,this._bufferService=x,this._onBufferActivate=this.register(new c.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(S,x){this._normal.resize(S,x),this._alt.resize(S,x),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}r.BufferSet=h},511:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;let c=a(482),p=a(643),u=a(3734);class h extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(S){let x=new h;return x.setFromCharData(S),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(S[p.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(S[p.CHAR_DATA_CHAR_INDEX].length===2){let b=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=b&&b<=56319){let M=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=M&&M<=57343?this.content=1024*(b-55296)+M-56320+65536|S[p.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=S[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[p.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=S[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=h},643:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},4863:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Marker=void 0;let c=a(8460),p=a(844);class u{get id(){return this._id}constructor(_){this.line=_,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new c.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(_){return this._disposables.push(_),_}}r.Marker=u,u._nextId=1},7116:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CHARSET=r.CHARSETS=void 0,r.CHARSETS={},r.DEFAULT_CHARSET=r.CHARSETS.B,r.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},r.CHARSETS.A={"#":"\xA3"},r.CHARSETS.B=void 0,r.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},r.CHARSETS.C=r.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},r.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},r.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},r.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},r.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},r.CHARSETS.E=r.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},r.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},r.CHARSETS.H=r.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},r.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(o,r)=>{var a,c,p;Object.defineProperty(r,"__esModule",{value:!0}),r.C1_ESCAPED=r.C1=r.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=` +`,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL="\x7F"})(a||(r.C0=a={})),(function(u){u.PAD="\x80",u.HOP="\x81",u.BPH="\x82",u.NBH="\x83",u.IND="\x84",u.NEL="\x85",u.SSA="\x86",u.ESA="\x87",u.HTS="\x88",u.HTJ="\x89",u.VTS="\x8A",u.PLD="\x8B",u.PLU="\x8C",u.RI="\x8D",u.SS2="\x8E",u.SS3="\x8F",u.DCS="\x90",u.PU1="\x91",u.PU2="\x92",u.STS="\x93",u.CCH="\x94",u.MW="\x95",u.SPA="\x96",u.EPA="\x97",u.SOS="\x98",u.SGCI="\x99",u.SCI="\x9A",u.CSI="\x9B",u.ST="\x9C",u.OSC="\x9D",u.PM="\x9E",u.APC="\x9F"})(c||(r.C1=c={})),(function(u){u.ST=`${a.ESC}\\`})(p||(r.C1_ESCAPED=p={}))},7399:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;let c=a(2584),p={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};r.evaluateKeyboardEvent=function(u,h,_,S){let x={type:0,cancel:!1,key:void 0},b=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?x.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?x.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?x.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(x.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:x.key=u.ctrlKey?"\b":c.C0.DEL,u.altKey&&(x.key=c.C0.ESC+x.key);break;case 9:if(u.shiftKey){x.key=c.C0.ESC+"[Z";break}x.key=c.C0.HT,x.cancel=!0;break;case 13:x.key=u.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,x.cancel=!0;break;case 27:x.key=c.C0.ESC,u.altKey&&(x.key=c.C0.ESC+c.C0.ESC),x.cancel=!0;break;case 37:if(u.metaKey)break;b?(x.key=c.C0.ESC+"[1;"+(b+1)+"D",x.key===c.C0.ESC+"[1;3D"&&(x.key=c.C0.ESC+(_?"b":"[1;5D"))):x.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(u.metaKey)break;b?(x.key=c.C0.ESC+"[1;"+(b+1)+"C",x.key===c.C0.ESC+"[1;3C"&&(x.key=c.C0.ESC+(_?"f":"[1;5C"))):x.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(u.metaKey)break;b?(x.key=c.C0.ESC+"[1;"+(b+1)+"A",_||x.key!==c.C0.ESC+"[1;3A"||(x.key=c.C0.ESC+"[1;5A")):x.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(u.metaKey)break;b?(x.key=c.C0.ESC+"[1;"+(b+1)+"B",_||x.key!==c.C0.ESC+"[1;3B"||(x.key=c.C0.ESC+"[1;5B")):x.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(x.key=c.C0.ESC+"[2~");break;case 46:x.key=b?c.C0.ESC+"[3;"+(b+1)+"~":c.C0.ESC+"[3~";break;case 36:x.key=b?c.C0.ESC+"[1;"+(b+1)+"H":h?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:x.key=b?c.C0.ESC+"[1;"+(b+1)+"F":h?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:u.shiftKey?x.type=2:u.ctrlKey?x.key=c.C0.ESC+"[5;"+(b+1)+"~":x.key=c.C0.ESC+"[5~";break;case 34:u.shiftKey?x.type=3:u.ctrlKey?x.key=c.C0.ESC+"[6;"+(b+1)+"~":x.key=c.C0.ESC+"[6~";break;case 112:x.key=b?c.C0.ESC+"[1;"+(b+1)+"P":c.C0.ESC+"OP";break;case 113:x.key=b?c.C0.ESC+"[1;"+(b+1)+"Q":c.C0.ESC+"OQ";break;case 114:x.key=b?c.C0.ESC+"[1;"+(b+1)+"R":c.C0.ESC+"OR";break;case 115:x.key=b?c.C0.ESC+"[1;"+(b+1)+"S":c.C0.ESC+"OS";break;case 116:x.key=b?c.C0.ESC+"[15;"+(b+1)+"~":c.C0.ESC+"[15~";break;case 117:x.key=b?c.C0.ESC+"[17;"+(b+1)+"~":c.C0.ESC+"[17~";break;case 118:x.key=b?c.C0.ESC+"[18;"+(b+1)+"~":c.C0.ESC+"[18~";break;case 119:x.key=b?c.C0.ESC+"[19;"+(b+1)+"~":c.C0.ESC+"[19~";break;case 120:x.key=b?c.C0.ESC+"[20;"+(b+1)+"~":c.C0.ESC+"[20~";break;case 121:x.key=b?c.C0.ESC+"[21;"+(b+1)+"~":c.C0.ESC+"[21~";break;case 122:x.key=b?c.C0.ESC+"[23;"+(b+1)+"~":c.C0.ESC+"[23~";break;case 123:x.key=b?c.C0.ESC+"[24;"+(b+1)+"~":c.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(_&&!S||!u.altKey||u.metaKey)!_||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?x.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(x.key=c.C0.US),u.key==="@"&&(x.key=c.C0.NUL)):u.keyCode===65&&(x.type=1);else{let M=p[u.keyCode],w=M?.[u.shiftKey?1:0];if(w)x.key=c.C0.ESC+w;else if(u.keyCode>=65&&u.keyCode<=90){let y=u.ctrlKey?u.keyCode-64:u.keyCode+32,E=String.fromCharCode(y);u.shiftKey&&(E=E.toUpperCase()),x.key=c.C0.ESC+E}else if(u.keyCode===32)x.key=c.C0.ESC+(u.ctrlKey?c.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let y=u.code.slice(3,4);u.shiftKey||(y=y.toLowerCase()),x.key=c.C0.ESC+y,x.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?x.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?x.key=c.C0.NUL:u.keyCode>=51&&u.keyCode<=55?x.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?x.key=c.C0.DEL:u.keyCode===219?x.key=c.C0.ESC:u.keyCode===220?x.key=c.C0.FS:u.keyCode===221&&(x.key=c.C0.GS)}return x}},482:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},r.utf32ToString=function(a,c=0,p=a.length){let u="";for(let h=c;h65535?(_-=65536,u+=String.fromCharCode(55296+(_>>10))+String.fromCharCode(_%1024+56320)):u+=String.fromCharCode(_)}return u},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,c){let p=a.length;if(!p)return 0;let u=0,h=0;if(this._interim){let _=a.charCodeAt(h++);56320<=_&&_<=57343?c[u++]=1024*(this._interim-55296)+_-56320+65536:(c[u++]=this._interim,c[u++]=_),this._interim=0}for(let _=h;_=p)return this._interim=S,u;let x=a.charCodeAt(_);56320<=x&&x<=57343?c[u++]=1024*(S-55296)+x-56320+65536:(c[u++]=S,c[u++]=x)}else S!==65279&&(c[u++]=S)}return u}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,c){let p=a.length;if(!p)return 0;let u,h,_,S,x=0,b=0,M=0;if(this.interim[0]){let E=!1,I=this.interim[0];I&=(224&I)==192?31:(240&I)==224?15:7;let D,N=0;for(;(D=63&this.interim[++N])&&N<4;)I<<=6,I|=D;let P=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=P-N;for(;M=p)return 0;if(D=a[M++],(192&D)!=128){M--,E=!0;break}this.interim[N++]=D,I<<=6,I|=63&D}E||(P===2?I<128?M--:c[x++]=I:P===3?I<2048||I>=55296&&I<=57343||I===65279||(c[x++]=I):I<65536||I>1114111||(c[x++]=I)),this.interim.fill(0)}let w=p-4,y=M;for(;y=p)return this.interim[0]=u,x;if(h=a[y++],(192&h)!=128){y--;continue}if(b=(31&u)<<6|63&h,b<128){y--;continue}c[x++]=b}else if((240&u)==224){if(y>=p)return this.interim[0]=u,x;if(h=a[y++],(192&h)!=128){y--;continue}if(y>=p)return this.interim[0]=u,this.interim[1]=h,x;if(_=a[y++],(192&_)!=128){y--;continue}if(b=(15&u)<<12|(63&h)<<6|63&_,b<2048||b>=55296&&b<=57343||b===65279)continue;c[x++]=b}else if((248&u)==240){if(y>=p)return this.interim[0]=u,x;if(h=a[y++],(192&h)!=128){y--;continue}if(y>=p)return this.interim[0]=u,this.interim[1]=h,x;if(_=a[y++],(192&_)!=128){y--;continue}if(y>=p)return this.interim[0]=u,this.interim[1]=h,this.interim[2]=_,x;if(S=a[y++],(192&S)!=128){y--;continue}if(b=(7&u)<<18|(63&h)<<12|(63&_)<<6|63&S,b<65536||b>1114111)continue;c[x++]=b}}return x}}},225:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;let c=a(1480),p=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],h;r.UnicodeV6=class{constructor(){if(this.version="6",!h){h=new Uint8Array(65536),h.fill(1),h[0]=0,h.fill(0,1,32),h.fill(0,127,160),h.fill(2,4352,4448),h[9001]=2,h[9002]=2,h.fill(2,11904,42192),h[12351]=1,h.fill(2,44032,55204),h.fill(2,63744,64256),h.fill(2,65040,65050),h.fill(2,65072,65136),h.fill(2,65280,65377),h.fill(2,65504,65511);for(let _=0;_x[w][1])return!1;for(;w>=M;)if(b=M+w>>1,S>x[b][1])M=b+1;else{if(!(S=131072&&_<=196605||_>=196608&&_<=262141?2:1}charProperties(_,S){let x=this.wcwidth(_),b=x===0&&S!==0;if(b){let M=c.UnicodeService.extractWidth(S);M===0?b=!1:M>x&&(x=M)}return c.UnicodeService.createPropertyValue(0,x,b)}}},5981:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WriteBuffer=void 0;let c=a(8460),p=a(844);class u extends p.Disposable{constructor(_){super(),this._action=_,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new c.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(_,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);let b=this._callbacks.shift();b&&b()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(_,S){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(S),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(S)}_innerWrite(_=0,S=!0){let x=_||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){let b=this._writeBuffer[this._bufferOffset],M=this._action(b,S);if(M){let y=E=>Date.now()-x>=12?setTimeout(()=>this._innerWrite(0,E)):this._innerWrite(x,E);return void M.catch(E=>(queueMicrotask(()=>{throw E}),Promise.resolve(!1))).then(y)}let w=this._callbacks[this._bufferOffset];if(w&&w(),this._bufferOffset++,this._pendingData-=b.length,Date.now()-x>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}r.WriteBuffer=u},5941:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.toRgbString=r.parseColor=void 0;let a=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,c=/^[\da-f]+$/;function p(u,h){let _=u.toString(16),S=_.length<2?"0"+_:_;switch(h){case 4:return _[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}r.parseColor=function(u){if(!u)return;let h=u.toLowerCase();if(h.indexOf("rgb:")===0){h=h.slice(4);let _=a.exec(h);if(_){let S=_[1]?15:_[4]?255:_[7]?4095:65535;return[Math.round(parseInt(_[1]||_[4]||_[7]||_[10],16)/S*255),Math.round(parseInt(_[2]||_[5]||_[8]||_[11],16)/S*255),Math.round(parseInt(_[3]||_[6]||_[9]||_[12],16)/S*255)]}}else if(h.indexOf("#")===0&&(h=h.slice(1),c.exec(h)&&[3,6,9,12].includes(h.length))){let _=h.length/3,S=[0,0,0];for(let x=0;x<3;++x){let b=parseInt(h.slice(_*x,_*x+_),16);S[x]=_===1?b<<4:_===2?b:_===3?b>>4:b>>8}return S}},r.toRgbString=function(u,h=16){let[_,S,x]=u;return`rgb:${p(_,h)}/${p(S,h)}/${p(x,h)}`}},5770:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DcsHandler=r.DcsParser=void 0;let c=a(482),p=a(8742),u=a(5770),h=[];r.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=h,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}registerHandler(S,x){this._handlers[S]===void 0&&(this._handlers[S]=[]);let b=this._handlers[S];return b.push(x),{dispose:()=>{let M=b.indexOf(x);M!==-1&&b.splice(M,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=h,this._ident=0}hook(S,x){if(this.reset(),this._ident=S,this._active=this._handlers[S]||h,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(S,x,b){if(this._active.length)for(let M=this._active.length-1;M>=0;M--)this._active[M].put(S,x,b);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(S,x,b))}unhook(S,x=!0){if(this._active.length){let b=!1,M=this._active.length-1,w=!1;if(this._stack.paused&&(M=this._stack.loopPosition-1,b=x,w=this._stack.fallThrough,this._stack.paused=!1),!w&&b===!1){for(;M>=0&&(b=this._active[M].unhook(S),b!==!0);M--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=M,this._stack.fallThrough=!1,b;M--}for(;M>=0;M--)if(b=this._active[M].unhook(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=M,this._stack.fallThrough=!0,b}else this._handlerFb(this._ident,"UNHOOK",S);this._active=h,this._ident=0}};let _=new p.Params;_.addParam(0),r.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=_,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():_,this._data="",this._hitLimit=!1}put(S,x,b){this._hitLimit||(this._data+=(0,c.utf32ToString)(S,x,b),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let x=!1;if(this._hitLimit)x=!1;else if(S&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then(b=>(this._params=_,this._data="",this._hitLimit=!1,b));return this._params=_,this._data="",this._hitLimit=!1,x}}},2015:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.EscapeSequenceParser=r.VT500_TRANSITION_TABLE=r.TransitionTable=void 0;let c=a(844),p=a(8742),u=a(6242),h=a(6351);class _{constructor(M){this.table=new Uint8Array(M)}setDefault(M,w){this.table.fill(M<<4|w)}add(M,w,y,E){this.table[w<<8|M]=y<<4|E}addMany(M,w,y,E){for(let I=0;IP),w=(N,P)=>M.slice(N,P),y=w(32,127),E=w(0,24);E.push(25),E.push.apply(E,w(28,32));let I=w(0,14),D;for(D in b.setDefault(1,0),b.addMany(y,0,2,0),I)b.addMany([24,26,153,154],D,3,0),b.addMany(w(128,144),D,3,0),b.addMany(w(144,152),D,3,0),b.add(156,D,0,0),b.add(27,D,11,1),b.add(157,D,4,8),b.addMany([152,158,159],D,0,7),b.add(155,D,11,3),b.add(144,D,11,9);return b.addMany(E,0,3,0),b.addMany(E,1,3,1),b.add(127,1,0,1),b.addMany(E,8,0,8),b.addMany(E,3,3,3),b.add(127,3,0,3),b.addMany(E,4,3,4),b.add(127,4,0,4),b.addMany(E,6,3,6),b.addMany(E,5,3,5),b.add(127,5,0,5),b.addMany(E,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(y,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(w(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(y,7,0,7),b.addMany(E,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(w(64,127),3,7,0),b.addMany(w(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(w(48,60),4,8,4),b.addMany(w(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(w(32,64),6,0,6),b.add(127,6,0,6),b.addMany(w(64,127),6,0,0),b.addMany(w(32,48),3,9,5),b.addMany(w(32,48),5,9,5),b.addMany(w(48,64),5,0,6),b.addMany(w(64,127),5,7,0),b.addMany(w(32,48),4,9,5),b.addMany(w(32,48),1,9,2),b.addMany(w(32,48),2,9,2),b.addMany(w(48,127),2,10,0),b.addMany(w(48,80),1,10,0),b.addMany(w(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(w(96,127),1,10,0),b.add(80,1,11,9),b.addMany(E,9,0,9),b.add(127,9,0,9),b.addMany(w(28,32),9,0,9),b.addMany(w(32,48),9,9,12),b.addMany(w(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(E,11,0,11),b.addMany(w(32,128),11,0,11),b.addMany(w(28,32),11,0,11),b.addMany(E,10,0,10),b.add(127,10,0,10),b.addMany(w(28,32),10,0,10),b.addMany(w(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(w(32,48),10,9,12),b.addMany(E,12,0,12),b.add(127,12,0,12),b.addMany(w(28,32),12,0,12),b.addMany(w(32,48),12,9,12),b.addMany(w(48,64),12,0,11),b.addMany(w(64,127),12,12,13),b.addMany(w(64,127),10,12,13),b.addMany(w(64,127),9,12,13),b.addMany(E,13,13,13),b.addMany(y,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(S,0,2,0),b.add(S,8,5,8),b.add(S,6,0,6),b.add(S,11,0,11),b.add(S,13,13,13),b})();class x extends c.Disposable{constructor(M=r.VT500_TRANSITION_TABLE){super(),this._transitions=M,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(w,y,E)=>{},this._executeHandlerFb=w=>{},this._csiHandlerFb=(w,y)=>{},this._escHandlerFb=w=>{},this._errorHandlerFb=w=>w,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,c.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new h.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(M,w=[64,126]){let y=0;if(M.prefix){if(M.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=M.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(M.intermediates){if(M.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let I=0;ID||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=D}}if(M.final.length!==1)throw new Error("final must be a single byte");let E=M.final.charCodeAt(0);if(w[0]>E||E>w[1])throw new Error(`final must be in range ${w[0]} .. ${w[1]}`);return y<<=8,y|=E,y}identToString(M){let w=[];for(;M;)w.push(String.fromCharCode(255&M)),M>>=8;return w.reverse().join("")}setPrintHandler(M){this._printHandler=M}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(M,w){let y=this._identifier(M,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);let E=this._escHandlers[y];return E.push(w),{dispose:()=>{let I=E.indexOf(w);I!==-1&&E.splice(I,1)}}}clearEscHandler(M){this._escHandlers[this._identifier(M,[48,126])]&&delete this._escHandlers[this._identifier(M,[48,126])]}setEscHandlerFallback(M){this._escHandlerFb=M}setExecuteHandler(M,w){this._executeHandlers[M.charCodeAt(0)]=w}clearExecuteHandler(M){this._executeHandlers[M.charCodeAt(0)]&&delete this._executeHandlers[M.charCodeAt(0)]}setExecuteHandlerFallback(M){this._executeHandlerFb=M}registerCsiHandler(M,w){let y=this._identifier(M);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);let E=this._csiHandlers[y];return E.push(w),{dispose:()=>{let I=E.indexOf(w);I!==-1&&E.splice(I,1)}}}clearCsiHandler(M){this._csiHandlers[this._identifier(M)]&&delete this._csiHandlers[this._identifier(M)]}setCsiHandlerFallback(M){this._csiHandlerFb=M}registerDcsHandler(M,w){return this._dcsParser.registerHandler(this._identifier(M),w)}clearDcsHandler(M){this._dcsParser.clearHandler(this._identifier(M))}setDcsHandlerFallback(M){this._dcsParser.setHandlerFallback(M)}registerOscHandler(M,w){return this._oscParser.registerHandler(M,w)}clearOscHandler(M){this._oscParser.clearHandler(M)}setOscHandlerFallback(M){this._oscParser.setHandlerFallback(M)}setErrorHandler(M){this._errorHandler=M}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(M,w,y,E,I){this._parseStack.state=M,this._parseStack.handlers=w,this._parseStack.handlerPos=y,this._parseStack.transition=E,this._parseStack.chunkPos=I}parse(M,w,y){let E,I=0,D=0,N=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,N=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let P=this._parseStack.handlers,L=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&L>-1){for(;L>=0&&(E=P[L](this._params),E!==!0);L--)if(E instanceof Promise)return this._parseStack.handlerPos=L,E}this._parseStack.handlers=[];break;case 4:if(y===!1&&L>-1){for(;L>=0&&(E=P[L](),E!==!0);L--)if(E instanceof Promise)return this._parseStack.handlerPos=L,E}this._parseStack.handlers=[];break;case 6:if(I=M[this._parseStack.chunkPos],E=this._dcsParser.unhook(I!==24&&I!==26,y),E)return E;I===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(I=M[this._parseStack.chunkPos],E=this._oscParser.end(I!==24&&I!==26,y),E)return E;I===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,N=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let P=N;P>4){case 2:for(let $=P+1;;++$){if($>=w||(I=M[$])<32||I>126&&I=w||(I=M[$])<32||I>126&&I=w||(I=M[$])<32||I>126&&I=w||(I=M[$])<32||I>126&&I=0&&(E=L[re](this._params),E!==!0);re--)if(E instanceof Promise)return this._preserveStack(3,L,re,D,P),E;re<0&&this._csiHandlerFb(this._collect<<8|I,this._params),this.precedingJoinState=0;break;case 8:do switch(I){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(I-48)}while(++P47&&I<60);P--;break;case 9:this._collect<<=8,this._collect|=I;break;case 10:let oe=this._escHandlers[this._collect<<8|I],G=oe?oe.length-1:-1;for(;G>=0&&(E=oe[G](),E!==!0);G--)if(E instanceof Promise)return this._preserveStack(4,oe,G,D,P),E;G<0&&this._escHandlerFb(this._collect<<8|I),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|I,this._params);break;case 13:for(let $=P+1;;++$)if($>=w||(I=M[$])===24||I===26||I===27||I>127&&I=w||(I=M[$])<32||I>127&&I{Object.defineProperty(r,"__esModule",{value:!0}),r.OscHandler=r.OscParser=void 0;let c=a(5770),p=a(482),u=[];r.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(h,_){this._handlers[h]===void 0&&(this._handlers[h]=[]);let S=this._handlers[h];return S.push(_),{dispose:()=>{let x=S.indexOf(_);x!==-1&&S.splice(x,1)}}}clearHandler(h){this._handlers[h]&&delete this._handlers[h]}setHandlerFallback(h){this._handlerFb=h}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let h=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;h>=0;--h)this._active[h].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].start();else this._handlerFb(this._id,"START")}_put(h,_,S){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(h,_,S);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(h,_,S))}start(){this.reset(),this._state=1}put(h,_,S){if(this._state!==3){if(this._state===1)for(;_0&&this._put(h,_,S)}}end(h,_=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,x=this._active.length-1,b=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,S=_,b=this._stack.fallThrough,this._stack.paused=!1),!b&&S===!1){for(;x>=0&&(S=this._active[x].end(h),S!==!0);x--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,S;x--}for(;x>=0;x--)if(S=this._active[x].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",h);this._active=u,this._id=-1,this._state=0}}},r.OscHandler=class{constructor(h){this._handler=h,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(h,_,S){this._hitLimit||(this._data+=(0,p.utf32ToString)(h,_,S),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(h){let _=!1;if(this._hitLimit)_=!1;else if(h&&(_=this._handler(this._data),_ instanceof Promise))return _.then(S=>(this._data="",this._hitLimit=!1,S));return this._data="",this._hitLimit=!1,_}}},8742:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Params=void 0;let a=2147483647;class c{static fromArray(u){let h=new c;if(!u.length)return h;for(let _=Array.isArray(u[0])?1:0;_256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(h),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){let u=new c(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){let u=[];for(let h=0;h>8,S=255&this._subParamsIdx[h];S-_>0&&u.push(Array.prototype.slice.call(this._subParams,_,S))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>a?a:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>a?a:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){let h=this._subParamsIdx[u]>>8,_=255&this._subParamsIdx[u];return _-h>0?this._subParams.subarray(h,_):null}getSubParamsAll(){let u={};for(let h=0;h>8,S=255&this._subParamsIdx[h];S-_>0&&(u[h]=this._subParams.slice(_,S))}return u}addDigit(u){let h;if(this._rejectDigits||!(h=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let _=this._digitIsSub?this._subParams:this.params,S=_[h-1];_[h-1]=~S?Math.min(10*S+u,a):u}}r.Params=c},5741:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.AddonManager=void 0,r.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let a=this._addons.length-1;a>=0;a--)this._addons[a].instance.dispose()}loadAddon(a,c){let p={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(p),c.dispose=()=>this._wrappedAddonDispose(p),c.activate(a)}_wrappedAddonDispose(a){if(a.isDisposed)return;let c=-1;for(let p=0;p{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferApiView=void 0;let c=a(3785),p=a(511);r.BufferApiView=class{constructor(u,h){this._buffer=u,this.type=h}init(u){return this._buffer=u,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(u){let h=this._buffer.lines.get(u);if(h)return new c.BufferLineApiView(h)}getNullCell(){return new p.CellData}}},3785:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLineApiView=void 0;let c=a(511);r.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,u){if(!(p<0||p>=this._line.length))return u?(this._line.loadCell(p,u),u):this._line.loadCell(p,new c.CellData)}translateToString(p,u,h){return this._line.translateToString(p,u,h)}}},8285:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferNamespaceApi=void 0;let c=a(8771),p=a(8460),u=a(844);class h extends u.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new p.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}r.BufferNamespaceApi=h},7975:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ParserApi=void 0,r.ParserApi=class{constructor(a){this._core=a}registerCsiHandler(a,c){return this._core.registerCsiHandler(a,p=>c(p.toArray()))}addCsiHandler(a,c){return this.registerCsiHandler(a,c)}registerDcsHandler(a,c){return this._core.registerDcsHandler(a,(p,u)=>c(p,u.toArray()))}addDcsHandler(a,c){return this.registerDcsHandler(a,c)}registerEscHandler(a,c){return this._core.registerEscHandler(a,c)}addEscHandler(a,c){return this.registerEscHandler(a,c)}registerOscHandler(a,c){return this._core.registerOscHandler(a,c)}addOscHandler(a,c){return this.registerOscHandler(a,c)}}},7090:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeApi=void 0,r.UnicodeApi=class{constructor(a){this._core=a}register(a){this._core.unicodeService.register(a)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(a){this._core.unicodeService.activeVersion=a}}},744:function(o,r,a){var c=this&&this.__decorate||function(b,M,w,y){var E,I=arguments.length,D=I<3?M:y===null?y=Object.getOwnPropertyDescriptor(M,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,M,w,y);else for(var N=b.length-1;N>=0;N--)(E=b[N])&&(D=(I<3?E(D):I>3?E(M,w,D):E(M,w))||D);return I>3&&D&&Object.defineProperty(M,w,D),D},p=this&&this.__param||function(b,M){return function(w,y){M(w,y,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;let u=a(8460),h=a(844),_=a(5295),S=a(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let x=r.BufferService=class extends h.Disposable{get buffer(){return this.buffers.active}constructor(b){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(b.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(b.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new _.BufferSet(b,this))}resize(b,M){this.cols=b,this.rows=M,this.buffers.resize(b,M),this._onResize.fire({cols:b,rows:M})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(b,M=!1){let w=this.buffer,y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===b.fg&&y.getBg(0)===b.bg||(y=w.getBlankLine(b,M),this._cachedBlankLine=y),y.isWrapped=M;let E=w.ybase+w.scrollTop,I=w.ybase+w.scrollBottom;if(w.scrollTop===0){let D=w.lines.isFull;I===w.lines.length-1?D?w.lines.recycle().copyFrom(y):w.lines.push(y.clone()):w.lines.splice(I+1,0,y.clone()),D?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{let D=I-E+1;w.lines.shiftElements(E+1,D-1,-1),w.lines.set(I,y.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)}scrollLines(b,M,w){let y=this.buffer;if(b<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else b+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);let E=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+b,y.ybase),0),E!==y.ydisp&&(M||this._onScroll.fire(y.ydisp))}};r.BufferService=x=c([p(0,S.IOptionsService)],x)},7994:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CharsetService=void 0,r.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(a){this.glevel=a,this.charset=this._charsets[a]}setgCharset(a,c){this._charsets[a]=c,this.glevel===a&&(this.charset=c)}}},1753:function(o,r,a){var c=this&&this.__decorate||function(y,E,I,D){var N,P=arguments.length,L=P<3?E:D===null?D=Object.getOwnPropertyDescriptor(E,I):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(y,E,I,D);else for(var re=y.length-1;re>=0;re--)(N=y[re])&&(L=(P<3?N(L):P>3?N(E,I,L):N(E,I))||L);return P>3&&L&&Object.defineProperty(E,I,L),L},p=this&&this.__param||function(y,E){return function(I,D){E(I,D,y)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;let u=a(2585),h=a(8460),_=a(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function x(y,E){let I=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(I|=64,I|=y.action):(I|=3&y.button,4&y.button&&(I|=64),8&y.button&&(I|=128),y.action===32?I|=32:y.action!==0||E||(I|=3)),I}let b=String.fromCharCode,M={DEFAULT:y=>{let E=[x(y,!1)+32,y.col+32,y.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${b(E[0])}${b(E[1])}${b(E[2])}`},SGR:y=>{let E=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.col};${y.row}${E}`},SGR_PIXELS:y=>{let E=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.x};${y.y}${E}`}},w=r.CoreMouseService=class extends _.Disposable{constructor(y,E){super(),this._bufferService=y,this._coreService=E,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new h.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(let I of Object.keys(S))this.addProtocol(I,S[I]);for(let I of Object.keys(M))this.addEncoding(I,M[I]);this.reset()}addProtocol(y,E){this._protocols[y]=E}addEncoding(y,E){this._encodings[y]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;let E=this._encodings[this._activeEncoding](y);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,E,I){if(I){if(y.x!==E.x||y.y!==E.y)return!1}else if(y.col!==E.col||y.row!==E.row)return!1;return y.button===E.button&&y.action===E.action&&y.ctrl===E.ctrl&&y.alt===E.alt&&y.shift===E.shift}};r.CoreMouseService=w=c([p(0,u.IBufferService),p(1,u.ICoreService)],w)},6975:function(o,r,a){var c=this&&this.__decorate||function(w,y,E,I){var D,N=arguments.length,P=N<3?y:I===null?I=Object.getOwnPropertyDescriptor(y,E):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,y,E,I);else for(var L=w.length-1;L>=0;L--)(D=w[L])&&(P=(N<3?D(P):N>3?D(y,E,P):D(y,E))||P);return N>3&&P&&Object.defineProperty(y,E,P),P},p=this&&this.__param||function(w,y){return function(E,I){y(E,I,w)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;let u=a(1439),h=a(8460),_=a(844),S=a(2585),x=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),M=r.CoreService=class extends _.Disposable{constructor(w,y,E){super(),this._bufferService=w,this._logService=y,this._optionsService=E,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new h.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new h.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new h.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new h.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(b)}reset(){this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(b)}triggerDataEvent(w,y=!1){if(this._optionsService.rawOptions.disableStdin)return;let E=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${w}"`,()=>w.split("").map(I=>I.charCodeAt(0))),this._onData.fire(w)}triggerBinaryEvent(w){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${w}"`,()=>w.split("").map(y=>y.charCodeAt(0))),this._onBinary.fire(w))}};r.CoreService=M=c([p(0,S.IBufferService),p(1,S.ILogService),p(2,S.IOptionsService)],M)},9074:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DecorationService=void 0;let c=a(8055),p=a(8460),u=a(844),h=a(6106),_=0,S=0;class x extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new h.SortedList(w=>w?.marker.line),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)(()=>this.reset()))}registerDecoration(w){if(w.marker.isDisposed)return;let y=new b(w);if(y){let E=y.marker.onDispose(()=>y.dispose());y.onDispose(()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),E.dispose())}),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(let w of this._decorations.values())w.dispose();this._decorations.clear()}*getDecorationsAtCell(w,y,E){let I=0,D=0;for(let N of this._decorations.getKeyIterator(y))I=N.options.x??0,D=I+(N.options.width??1),w>=I&&w{_=D.options.x??0,S=_+(D.options.width??1),w>=_&&w{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;let c=a(2585),p=a(8343);class u{constructor(..._){this._entries=new Map;for(let[S,x]of _)this.set(S,x)}set(_,S){let x=this._entries.get(_);return this._entries.set(_,S),x}forEach(_){for(let[S,x]of this._entries.entries())_(S,x)}has(_){return this._entries.has(_)}get(_){return this._entries.get(_)}}r.ServiceCollection=u,r.InstantiationService=class{constructor(){this._services=new u,this._services.set(c.IInstantiationService,this)}setService(h,_){this._services.set(h,_)}getService(h){return this._services.get(h)}createInstance(h,..._){let S=(0,p.getServiceDependencies)(h).sort((M,w)=>M.index-w.index),x=[];for(let M of S){let w=this._services.get(M.id);if(!w)throw new Error(`[createInstance] ${h.name} depends on UNKNOWN service ${M.id}.`);x.push(w)}let b=S.length>0?S[0].index:_.length;if(_.length!==b)throw new Error(`[createInstance] First service dependency of ${h.name} at position ${b+1} conflicts with ${_.length} static arguments`);return new h(..._,...x)}}},7866:function(o,r,a){var c=this&&this.__decorate||function(b,M,w,y){var E,I=arguments.length,D=I<3?M:y===null?y=Object.getOwnPropertyDescriptor(M,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,M,w,y);else for(var N=b.length-1;N>=0;N--)(E=b[N])&&(D=(I<3?E(D):I>3?E(M,w,D):E(M,w))||D);return I>3&&D&&Object.defineProperty(M,w,D),D},p=this&&this.__param||function(b,M){return function(w,y){M(w,y,b)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;let u=a(844),h=a(2585),_={trace:h.LogLevelEnum.TRACE,debug:h.LogLevelEnum.DEBUG,info:h.LogLevelEnum.INFO,warn:h.LogLevelEnum.WARN,error:h.LogLevelEnum.ERROR,off:h.LogLevelEnum.OFF},S,x=r.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(b){super(),this._optionsService=b,this._logLevel=h.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),S=this}_updateLogLevel(){this._logLevel=_[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(b){for(let M=0;MJSON.stringify(D)).join(", ")})`);let I=y.apply(this,E);return S.trace(`GlyphRenderer#${y.name} return`,I),I}}},7302:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsService=r.DEFAULT_OPTIONS=void 0;let c=a(8460),p=a(844),u=a(6114);r.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};let h=["normal","bold","100","200","300","400","500","600","700","800","900"];class _ extends p.Disposable{constructor(x){super(),this._onOptionChange=this.register(new c.EventEmitter),this.onOptionChange=this._onOptionChange.event;let b=K({},r.DEFAULT_OPTIONS);for(let M in x)if(M in b)try{let w=x[M];b[M]=this._sanitizeAndValidateOption(M,w)}catch(w){console.error(w)}this.rawOptions=b,this.options=K({},b),this._setupOptions(),this.register((0,p.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(x,b){return this.onOptionChange(M=>{M===x&&b(this.rawOptions[x])})}onMultipleOptionChange(x,b){return this.onOptionChange(M=>{x.indexOf(M)!==-1&&b()})}_setupOptions(){let x=M=>{if(!(M in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${M}"`);return this.rawOptions[M]},b=(M,w)=>{if(!(M in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${M}"`);w=this._sanitizeAndValidateOption(M,w),this.rawOptions[M]!==w&&(this.rawOptions[M]=w,this._onOptionChange.fire(M))};for(let M in this.rawOptions){let w={get:x.bind(this,M),set:b.bind(this,M)};Object.defineProperty(this.options,M,w)}}_sanitizeAndValidateOption(x,b){switch(x){case"cursorStyle":if(b||(b=r.DEFAULT_OPTIONS[x]),!(function(M){return M==="block"||M==="underline"||M==="bar"})(b))throw new Error(`"${b}" is not a valid value for ${x}`);break;case"wordSeparator":b||(b=r.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof b=="number"&&1<=b&&b<=1e3)break;b=h.includes(b)?b:r.DEFAULT_OPTIONS[x];break;case"cursorWidth":b=Math.floor(b);case"lineHeight":case"tabStopWidth":if(b<1)throw new Error(`${x} cannot be less than 1, value: ${b}`);break;case"minimumContrastRatio":b=Math.max(1,Math.min(21,Math.round(10*b)/10));break;case"scrollback":if((b=Math.min(b,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${b}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(b<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${b}`);break;case"rows":case"cols":if(!b&&b!==0)throw new Error(`${x} must be numeric, value: ${b}`);break;case"windowsPty":b=b??{}}return b}}r.OptionsService=_},2660:function(o,r,a){var c=this&&this.__decorate||function(_,S,x,b){var M,w=arguments.length,y=w<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,x):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(_,S,x,b);else for(var E=_.length-1;E>=0;E--)(M=_[E])&&(y=(w<3?M(y):w>3?M(S,x,y):M(S,x))||y);return w>3&&y&&Object.defineProperty(S,x,y),y},p=this&&this.__param||function(_,S){return function(x,b){S(x,b,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;let u=a(2585),h=r.OscLinkService=class{constructor(_){this._bufferService=_,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(_){let S=this._bufferService.buffer;if(_.id===void 0){let E=S.addMarker(S.ybase+S.y),I={data:_,id:this._nextId++,lines:[E]};return E.onDispose(()=>this._removeMarkerFromLink(I,E)),this._dataByLinkId.set(I.id,I),I.id}let x=_,b=this._getEntryIdKey(x),M=this._entriesWithId.get(b);if(M)return this.addLineToLink(M.id,S.ybase+S.y),M.id;let w=S.addMarker(S.ybase+S.y),y={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[w]};return w.onDispose(()=>this._removeMarkerFromLink(y,w)),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(_,S){let x=this._dataByLinkId.get(_);if(x&&x.lines.every(b=>b.line!==S)){let b=this._bufferService.buffer.addMarker(S);x.lines.push(b),b.onDispose(()=>this._removeMarkerFromLink(x,b))}}getLinkData(_){return this._dataByLinkId.get(_)?.data}_getEntryIdKey(_){return`${_.id};;${_.uri}`}_removeMarkerFromLink(_,S){let x=_.lines.indexOf(S);x!==-1&&(_.lines.splice(x,1),_.lines.length===0&&(_.data.id!==void 0&&this._entriesWithId.delete(_.key),this._dataByLinkId.delete(_.id)))}};r.OscLinkService=h=c([p(0,u.IBufferService)],h)},8343:(o,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;let a="di$target",c="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(p){return p[c]||[]},r.createDecorator=function(p){if(r.serviceRegistry.has(p))return r.serviceRegistry.get(p);let u=function(h,_,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,b,M){b[a]===b?b[c].push({id:x,index:M}):(b[c]=[{id:x,index:M}],b[a]=b)})(u,h,S)};return u.toString=()=>p,r.serviceRegistry.set(p,u),u}},2585:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;let c=a(8343);var p;r.IBufferService=(0,c.createDecorator)("BufferService"),r.ICoreMouseService=(0,c.createDecorator)("CoreMouseService"),r.ICoreService=(0,c.createDecorator)("CoreService"),r.ICharsetService=(0,c.createDecorator)("CharsetService"),r.IInstantiationService=(0,c.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(p||(r.LogLevelEnum=p={})),r.ILogService=(0,c.createDecorator)("LogService"),r.IOptionsService=(0,c.createDecorator)("OptionsService"),r.IOscLinkService=(0,c.createDecorator)("OscLinkService"),r.IUnicodeService=(0,c.createDecorator)("UnicodeService"),r.IDecorationService=(0,c.createDecorator)("DecorationService")},1480:(o,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;let c=a(8460),p=a(225);class u{static extractShouldJoin(_){return(1&_)!=0}static extractWidth(_){return _>>1&3}static extractCharKind(_){return _>>3}static createPropertyValue(_,S,x=!1){return(16777215&_)<<3|(3&S)<<1|(x?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter,this.onChange=this._onChange.event;let _=new p.UnicodeV6;this.register(_),this._active=_.version,this._activeProvider=_}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(_){if(!this._providers[_])throw new Error(`unknown Unicode version "${_}"`);this._active=_,this._activeProvider=this._providers[_],this._onChange.fire(_)}register(_){this._providers[_.version]=_}wcwidth(_){return this._activeProvider.wcwidth(_)}getStringCellWidth(_){let S=0,x=0,b=_.length;for(let M=0;M=b)return S+this.wcwidth(w);let I=_.charCodeAt(M);56320<=I&&I<=57343?w=1024*(w-55296)+I-56320+65536:S+=this.wcwidth(I)}let y=this.charProperties(w,x),E=u.extractWidth(y);u.extractShouldJoin(y)&&(E-=u.extractWidth(x)),S+=E,x=y}return S}charProperties(_,S){return this._activeProvider.charProperties(_,S)}}r.UnicodeService=u}},i={};function e(o){var r=i[o];if(r!==void 0)return r.exports;var a=i[o]={exports:{}};return n[o].call(a.exports,a,a.exports,e),a.exports}var t={};return(()=>{var o=t;Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;let r=e(9042),a=e(3236),c=e(844),p=e(5741),u=e(8285),h=e(7975),_=e(7090),S=["cols","rows"];class x extends c.Disposable{constructor(M){super(),this._core=this.register(new a.Terminal(M)),this._addonManager=this.register(new p.AddonManager),this._publicOptions=K({},this._core.options);let w=E=>this._core.options[E],y=(E,I)=>{this._checkReadonlyOptions(E),this._core.options[E]=I};for(let E in this._core.options){let I={get:w.bind(this,E),set:y.bind(this,E)};Object.defineProperty(this._publicOptions,E,I)}}_checkReadonlyOptions(M){if(S.includes(M))throw new Error(`Option "${M}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new h.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new _.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let M=this._core.coreService.decPrivateModes,w="none";switch(this._core.coreMouseService.activeProtocol){case"X10":w="x10";break;case"VT200":w="vt200";break;case"DRAG":w="drag";break;case"ANY":w="any"}return{applicationCursorKeysMode:M.applicationCursorKeys,applicationKeypadMode:M.applicationKeypad,bracketedPasteMode:M.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:w,originMode:M.origin,reverseWraparoundMode:M.reverseWraparound,sendFocusMode:M.sendFocus,wraparoundMode:M.wraparound}}get options(){return this._publicOptions}set options(M){for(let w in M)this._publicOptions[w]=M[w]}blur(){this._core.blur()}focus(){this._core.focus()}input(M,w=!0){this._core.input(M,w)}resize(M,w){this._verifyIntegers(M,w),this._core.resize(M,w)}open(M){this._core.open(M)}attachCustomKeyEventHandler(M){this._core.attachCustomKeyEventHandler(M)}attachCustomWheelEventHandler(M){this._core.attachCustomWheelEventHandler(M)}registerLinkProvider(M){return this._core.registerLinkProvider(M)}registerCharacterJoiner(M){return this._checkProposedApi(),this._core.registerCharacterJoiner(M)}deregisterCharacterJoiner(M){this._checkProposedApi(),this._core.deregisterCharacterJoiner(M)}registerMarker(M=0){return this._verifyIntegers(M),this._core.registerMarker(M)}registerDecoration(M){return this._checkProposedApi(),this._verifyPositiveIntegers(M.x??0,M.width??0,M.height??0),this._core.registerDecoration(M)}hasSelection(){return this._core.hasSelection()}select(M,w,y){this._verifyIntegers(M,w,y),this._core.select(M,w,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(M,w){this._verifyIntegers(M,w),this._core.selectLines(M,w)}dispose(){super.dispose()}scrollLines(M){this._verifyIntegers(M),this._core.scrollLines(M)}scrollPages(M){this._verifyIntegers(M),this._core.scrollPages(M)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(M){this._verifyIntegers(M),this._core.scrollToLine(M)}clear(){this._core.clear()}write(M,w){this._core.write(M,w)}writeln(M,w){this._core.write(M),this._core.write(`\r +`,w)}paste(M){this._core.paste(M)}refresh(M,w){this._verifyIntegers(M,w),this._core.refresh(M,w)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(M){this._addonManager.loadAddon(this,M)}static get strings(){return r}_verifyIntegers(...M){for(let w of M)if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...M){for(let w of M)if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}}o.Terminal=x})(),t})())});var nO=Cs((E2,tO)=>{(function(n,i){typeof E2=="object"&&typeof tO=="object"?tO.exports=i():typeof define=="function"&&define.amd?define([],i):typeof E2=="object"?E2.AttachAddon=i():n.AttachAddon=i()})(self,()=>(()=>{"use strict";var n={};return(()=>{var i=n;function e(t,o,r){return t.addEventListener(o,r),{dispose:()=>{r&&t.removeEventListener(o,r)}}}Object.defineProperty(i,"__esModule",{value:!0}),i.AttachAddon=void 0,i.AttachAddon=class{constructor(t,o){this._disposables=[],this._socket=t,this._socket.binaryType="arraybuffer",this._bidirectional=!(o&&o.bidirectional===!1)}activate(t){this._disposables.push(e(this._socket,"message",o=>{let r=o.data;t.write(typeof r=="string"?r:new Uint8Array(r))})),this._bidirectional&&(this._disposables.push(t.onData(o=>this._sendData(o))),this._disposables.push(t.onBinary(o=>this._sendBinary(o)))),this._disposables.push(e(this._socket,"close",()=>this.dispose())),this._disposables.push(e(this._socket,"error",()=>this.dispose()))}dispose(){for(let t of this._disposables)t.dispose()}_sendData(t){this._checkOpenSocket()&&this._socket.send(t)}_sendBinary(t){if(!this._checkOpenSocket())return;let o=new Uint8Array(t.length);for(let r=0;r{(function(n,i){typeof D2=="object"&&typeof iO=="object"?iO.exports=i():typeof define=="function"&&define.amd?define([],i):typeof D2=="object"?D2.FitAddon=i():n.FitAddon=i()})(self,()=>(()=>{"use strict";var n={};return(()=>{var i=n;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core,t=e._renderService.dimensions;if(t.css.cell.width===0||t.css.cell.height===0)return;let o=this._terminal.options.scrollback===0?0:e.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(r.getPropertyValue("height")),c=Math.max(0,parseInt(r.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),u=a-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),h=c-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-o;return{cols:Math.max(2,Math.floor(h/t.css.cell.width)),rows:Math.max(1,Math.floor(u/t.css.cell.height))}}}})(),n})())});var W4=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g"),vh=class n{element=null;classNames=[];attrs=[];notSelectors=[];static parse(i){let e=[],t=(p,u)=>{u.notSelectors.length>0&&!u.element&&u.classNames.length==0&&u.attrs.length==0&&(u.element="*"),p.push(u)},o=new n,r,a=o,c=!1;for(W4.lastIndex=0;r=W4.exec(i);){if(r[1]){if(c)throw new Error("Nesting :not in a selector is not allowed");c=!0,a=new n,o.notSelectors.push(a)}let p=r[2];if(p){let h=r[3];h==="#"?a.addAttribute("id",p.slice(1)):h==="."?a.addClassName(p.slice(1)):a.setElement(p)}let u=r[4];if(u&&a.addAttribute(a.unescapeAttribute(u),r[6]),r[7]&&(c=!1,a=o),r[8]){if(c)throw new Error("Multiple selectors in :not are not supported");t(e,o),o=a=new n}}return t(e,o),e}unescapeAttribute(i){let e="",t=!1;for(let o=0;o0&&i.push("class",this.classNames.join(" ")),i.concat(this.attrs)}addAttribute(i,e=""){this.attrs.push(i,e&&e.toLowerCase()||"")}addClassName(i){this.classNames.push(i.toLowerCase())}toString(){let i=this.element||"";if(this.classNames&&this.classNames.forEach(e=>i+=`.${e}`),this.attrs)for(let e=0;ei+=`:not(${e})`),i}},qC=class n{static createNotMatcher(i){let e=new n;return e.addSelectables(i,null),e}_elementMap=new Map;_elementPartialMap=new Map;_classMap=new Map;_classPartialMap=new Map;_attrValueMap=new Map;_attrValuePartialMap=new Map;_listContexts=[];addSelectables(i,e){let t=null;i.length>1&&(t=new Fk(i),this._listContexts.push(t));for(let o=0;o0&&(!this.listContext||!this.listContext.alreadyMatched)&&(t=!qC.createNotMatcher(this.notSelectors).match(i,null)),t&&e&&(!this.listContext||!this.listContext.alreadyMatched)&&(this.listContext&&(this.listContext.alreadyMatched=!0),e(this.selector,this.cbContext)),t}},QC=class{registry;constructor(i){this.registry=i}match(i){return this.registry.has(i)?this.registry.get(i):[]}};var Sp=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n[n.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",n})(Sp||{}),mE=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n[n.Eager=1]="Eager",n})(mE||{}),qg=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(qg||{}),q4={name:"custom-elements"},Q4={name:"no-errors-schema"};var eo=(function(n){return n[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",n[n.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",n})(eo||{});function t$(n){let i=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return[n.element&&n.element!=="*"?n.element:"",...n.attrs,...i]}function n$(n){let i=n.classNames&&n.classNames.length?[8,...n.classNames]:[];return n.element?[5,n.element,...n.attrs,...i]:n.attrs.length?[3,...n.attrs,...i]:n.classNames&&n.classNames.length?[9,...n.classNames]:[]}function i$(n){let i=t$(n),e=n.notSelectors&&n.notSelectors.length?n.notSelectors.map(t=>n$(t)):[];return i.concat(...e)}function pE(n){return n?vh.parse(n).map(i$):[]}var gd=(function(n){return n[n.Directive=0]="Directive",n[n.Component=1]="Component",n[n.Injectable=2]="Injectable",n[n.Pipe=3]="Pipe",n[n.NgModule=4]="NgModule",n})(gd||{});var XC;function o$(n){return l$(s$(n.nodes).join("")+`[${n.meaning}]`)}function r$(n){return n.id||jN(n)}function jN(n){let i=new Lk,e=n.nodes.map(t=>t.visit(i,null));return $N(e.join(""),n.meaning)}var KC=class{visitText(i,e){return i.value}visitContainer(i,e){return`[${i.children.map(t=>t.visit(this)).join(", ")}]`}visitIcu(i,e){let t=Object.keys(i.cases).map(o=>`${o} {${i.cases[o].visit(this)}}`);return`{${i.expression}, ${i.type}, ${t.join(", ")}}`}visitTagPlaceholder(i,e){return i.isVoid?``:`${i.children.map(t=>t.visit(this)).join(", ")}`}visitPlaceholder(i,e){return i.value?`${i.value}`:``}visitIcuPlaceholder(i,e){return`${i.value.visit(this)}`}visitBlockPlaceholder(i,e){return`${i.children.map(t=>t.visit(this)).join(", ")}`}},a$=new KC;function s$(n){return n.map(i=>i.visit(a$,null))}var Lk=class extends KC{visitIcu(i){let e=Object.keys(i.cases).map(t=>`${t} {${i.cases[t].visit(this)}}`);return`{${i.type}, ${e.join(", ")}}`}};function l$(n){XC??=new TextEncoder;let i=[...XC.encode(n)],e=m$(i,uE.Big),t=i.length*8,o=new Uint32Array(80),r=1732584193,a=4023233417,c=2562383102,p=271733878,u=3285377520;e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(let h=0;h>>0).toString(16).padStart(8,"0")}function c$(n,i,e,t){return n<20?[i&e|~i&t,1518500249]:n<40?[i^e^t,1859775393]:n<60?[i&e|i&t|e&t,2400959708]:[i^e^t,3395469782]}function X4(n){XC??=new TextEncoder;let i=XC.encode(n),e=new DataView(i.buffer,i.byteOffset,i.byteLength),t=K4(e,i.length,0),o=K4(e,i.length,102072);return t==0&&(o==0||o==1)&&(t=t^319790063,o=o^-1801410264),BigInt.asUintN(32,BigInt(t))<>BigInt(63)&BigInt(1),e+=X4(i)),BigInt.asUintN(63,e).toString()}function K4(n,i,e){let t=2654435769,o=2654435769,r=0,a=i-12;for(;r<=a;r+=12){t+=n.getUint32(r,!0),o+=n.getUint32(r+4,!0),e+=n.getUint32(r+8,!0);let p=Y4(t,o,e);t=p[0],o=p[1],e=p[2]}let c=i-r;return e+=i,c>=4?(t+=n.getUint32(r,!0),r+=4,c>=8?(o+=n.getUint32(r,!0),r+=4,c>=9&&(e+=n.getUint8(r++)<<8),c>=10&&(e+=n.getUint8(r++)<<16),c===11&&(e+=n.getUint8(r++)<<24)):(c>=5&&(o+=n.getUint8(r++)),c>=6&&(o+=n.getUint8(r++)<<8),c===7&&(o+=n.getUint8(r++)<<16))):(c>=1&&(t+=n.getUint8(r++)),c>=2&&(t+=n.getUint8(r++)<<8),c===3&&(t+=n.getUint8(r++)<<16)),Y4(t,o,e)[2]}function Y4(n,i,e){return n-=i,n-=e,n^=e>>>13,i-=e,i-=n,i^=n<<8,e-=n,e-=i,e^=i>>>13,n-=i,n-=e,n^=e>>>12,i-=e,i-=n,i^=n<<16,e-=n,e-=i,e^=i>>>5,n-=i,n-=e,n^=e>>>3,i-=e,i-=n,i^=n<<10,e-=n,e-=i,e^=i>>>15,[n,i,e]}var uE=(function(n){return n[n.Little=0]="Little",n[n.Big=1]="Big",n})(uE||{});function th(n,i){return d$(n,i)[1]}function d$(n,i){let e=(n&65535)+(i&65535),t=(n>>>16)+(i>>>16)+(e>>>16);return[t>>>16,t<<16|e&65535]}function uk(n,i){return n<>>32-i}function m$(n,i){let e=n.length+3>>>2,t=[];for(let o=0;o=n.length?0:n[i]}function p$(n,i,e){let t=0;if(e===uE.Big)for(let o=0;o<4;o++)t+=Z4(n,i+o)<<24-8*o;else for(let o=0;o<4;o++)t+=Z4(n,i+o)<<8*o;return t}var HN=(function(n){return n[n.None=0]="None",n[n.Const=1]="Const",n})(HN||{}),YC=class{modifiers;constructor(i=HN.None){this.modifiers=i}hasModifier(i){return(this.modifiers&i)!==0}},wd=(function(n){return n[n.Dynamic=0]="Dynamic",n[n.Bool=1]="Bool",n[n.String=2]="String",n[n.Int=3]="Int",n[n.Number=4]="Number",n[n.Function=5]="Function",n[n.Inferred=6]="Inferred",n[n.None=7]="None",n})(wd||{}),xc=class extends YC{name;constructor(i,e){super(e),this.name=i}visitType(i,e){return i.visitBuiltinType(this,e)}},tl=class extends YC{value;typeParams;constructor(i,e,t=null){super(e),this.value=i,this.typeParams=t}visitType(i,e){return i.visitExpressionType(this,e)}};var is=new xc(wd.Dynamic),Ol=new xc(wd.Inferred),u$=new xc(wd.Bool),t5e=new xc(wd.Int),Bp=new xc(wd.Number),hE=new xc(wd.String),n5e=new xc(wd.Function),yc=new xc(wd.None),l_=(function(n){return n[n.Minus=0]="Minus",n[n.Plus=1]="Plus",n})(l_||{}),st=(function(n){return n[n.Equals=0]="Equals",n[n.NotEquals=1]="NotEquals",n[n.Assign=2]="Assign",n[n.Identical=3]="Identical",n[n.NotIdentical=4]="NotIdentical",n[n.Minus=5]="Minus",n[n.Plus=6]="Plus",n[n.Divide=7]="Divide",n[n.Multiply=8]="Multiply",n[n.Modulo=9]="Modulo",n[n.And=10]="And",n[n.Or=11]="Or",n[n.BitwiseOr=12]="BitwiseOr",n[n.BitwiseAnd=13]="BitwiseAnd",n[n.Lower=14]="Lower",n[n.LowerEquals=15]="LowerEquals",n[n.Bigger=16]="Bigger",n[n.BiggerEquals=17]="BiggerEquals",n[n.NullishCoalesce=18]="NullishCoalesce",n[n.Exponentiation=19]="Exponentiation",n[n.In=20]="In",n[n.InstanceOf=21]="InstanceOf",n[n.AdditionAssignment=22]="AdditionAssignment",n[n.SubtractionAssignment=23]="SubtractionAssignment",n[n.MultiplicationAssignment=24]="MultiplicationAssignment",n[n.DivisionAssignment=25]="DivisionAssignment",n[n.RemainderAssignment=26]="RemainderAssignment",n[n.ExponentiationAssignment=27]="ExponentiationAssignment",n[n.AndAssignment=28]="AndAssignment",n[n.OrAssignment=29]="OrAssignment",n[n.NullishCoalesceAssignment=30]="NullishCoalesceAssignment",n})(st||{});function h$(n,i){return n==null||i==null?n==i:n.isEquivalent(i)}function UN(n,i,e){let t=n.length;if(t!==i.length)return!1;for(let o=0;oe.isEquivalent(t))}var Bi=class{type;sourceSpan;constructor(i,e){this.type=i||null,this.sourceSpan=e||null}prop(i,e){return new Es(this,i,null,e)}key(i,e,t){return new xd(this,i,e,t)}callFn(i,e,t){return new os(this,i,null,e,t)}instantiate(i,e,t){return new d_(this,i,e,t)}conditional(i,e=null,t){return new Sc(this,i,e,null,t)}equals(i,e){return new gi(st.Equals,this,i,null,e)}notEquals(i,e){return new gi(st.NotEquals,this,i,null,e)}identical(i,e){return new gi(st.Identical,this,i,null,e)}notIdentical(i,e){return new gi(st.NotIdentical,this,i,null,e)}minus(i,e){return new gi(st.Minus,this,i,null,e)}plus(i,e){return new gi(st.Plus,this,i,null,e)}divide(i,e){return new gi(st.Divide,this,i,null,e)}multiply(i,e){return new gi(st.Multiply,this,i,null,e)}modulo(i,e){return new gi(st.Modulo,this,i,null,e)}power(i,e){return new gi(st.Exponentiation,this,i,null,e)}and(i,e){return new gi(st.And,this,i,null,e)}bitwiseOr(i,e){return new gi(st.BitwiseOr,this,i,null,e)}bitwiseAnd(i,e){return new gi(st.BitwiseAnd,this,i,null,e)}or(i,e){return new gi(st.Or,this,i,null,e)}lower(i,e){return new gi(st.Lower,this,i,null,e)}lowerEquals(i,e){return new gi(st.LowerEquals,this,i,null,e)}bigger(i,e){return new gi(st.Bigger,this,i,null,e)}biggerEquals(i,e){return new gi(st.BiggerEquals,this,i,null,e)}isBlank(i){return this.equals(C$,i)}nullishCoalesce(i,e){return new gi(st.NullishCoalesce,this,i,null,e)}toStmt(){return new sa(this,null)}},Nl=class n extends Bi{name;constructor(i,e,t){super(e,t),this.name=i}isEquivalent(i){return i instanceof n&&this.name===i.name}isConstant(){return!1}visitExpression(i,e){return i.visitReadVarExpr(this,e)}clone(){return new n(this.name,this.type,this.sourceSpan)}set(i){return new gi(st.Assign,this,i,null,this.sourceSpan)}},Ch=class n extends Bi{expr;constructor(i,e,t){super(e,t),this.expr=i}visitExpression(i,e){return i.visitTypeofExpr(this,e)}isEquivalent(i){return i instanceof n&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},ZC=class n extends Bi{expr;constructor(i,e,t){super(e,t),this.expr=i}visitExpression(i,e){return i.visitVoidExpr(this,e)}isEquivalent(i){return i instanceof n&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},oi=class n extends Bi{node;constructor(i,e,t){super(e,t),this.node=i}isEquivalent(i){return i instanceof n&&this.node===i.node}isConstant(){return!1}visitExpression(i,e){return i.visitWrappedNodeExpr(this,e)}clone(){return new n(this.node,this.type,this.sourceSpan)}},os=class n extends Bi{fn;args;pure;constructor(i,e,t,o,r=!1){super(t,o),this.fn=i,this.args=e,this.pure=r}get receiver(){return this.fn}isEquivalent(i){return i instanceof n&&this.fn.isEquivalent(i.fn)&&Ts(this.args,i.args)&&this.pure===i.pure}isConstant(){return!1}visitExpression(i,e){return i.visitInvokeFunctionExpr(this,e)}clone(){return new n(this.fn.clone(),this.args.map(i=>i.clone()),this.type,this.sourceSpan,this.pure)}},c_=class n extends Bi{tag;template;constructor(i,e,t,o){super(t,o),this.tag=i,this.template=e}isEquivalent(i){return i instanceof n&&this.tag.isEquivalent(i.tag)&&this.template.isEquivalent(i.template)}isConstant(){return!1}visitExpression(i,e){return i.visitTaggedTemplateLiteralExpr(this,e)}clone(){return new n(this.tag.clone(),this.template.clone(),this.type,this.sourceSpan)}},d_=class n extends Bi{classExpr;args;constructor(i,e,t,o){super(t,o),this.classExpr=i,this.args=e}isEquivalent(i){return i instanceof n&&this.classExpr.isEquivalent(i.classExpr)&&Ts(this.args,i.args)}isConstant(){return!1}visitExpression(i,e){return i.visitInstantiateExpr(this,e)}clone(){return new n(this.classExpr.clone(),this.args.map(i=>i.clone()),this.type,this.sourceSpan)}},bh=class n extends Bi{body;flags;constructor(i,e,t){super(null,t),this.body=i,this.flags=e}isEquivalent(i){return i instanceof n&&this.body===i.body&&this.flags===i.flags}isConstant(){return!0}visitExpression(i,e){return i.visitRegularExpressionLiteral(this,e)}clone(){return new n(this.body,this.flags,this.sourceSpan)}},aa=class n extends Bi{value;constructor(i,e,t){super(e,t),this.value=i}isEquivalent(i){return i instanceof n&&this.value===i.value}isConstant(){return!0}visitExpression(i,e){return i.visitLiteralExpr(this,e)}clone(){return new n(this.value,this.type,this.sourceSpan)}},m_=class n extends Bi{elements;expressions;constructor(i,e,t){super(null,t),this.elements=i,this.expressions=e}isEquivalent(i){return i instanceof n&&UN(this.elements,i.elements,(e,t)=>e.text===t.text)&&Ts(this.expressions,i.expressions)}isConstant(){return!1}visitExpression(i,e){return i.visitTemplateLiteralExpr(this,e)}clone(){return new n(this.elements.map(i=>i.clone()),this.expressions.map(i=>i.clone()))}},JC=class n extends Bi{text;rawText;constructor(i,e,t){super(hE,e),this.text=i,this.rawText=t??Vk($C(i))}visitExpression(i,e){return i.visitTemplateLiteralElementExpr(this,e)}isEquivalent(i){return i instanceof n&&i.text===this.text&&i.rawText===this.rawText}isConstant(){return!0}clone(){return new n(this.text,this.sourceSpan,this.rawText)}},Ip=class{text;sourceSpan;constructor(i,e){this.text=i,this.sourceSpan=e}},fh=class{text;sourceSpan;associatedMessage;constructor(i,e,t){this.text=i,this.sourceSpan=e,this.associatedMessage=t}},f$="|",J4="@@",g$="\u241F",e1=class n extends Bi{metaBlock;messageParts;placeHolderNames;expressions;constructor(i,e,t,o,r){super(hE,r),this.metaBlock=i,this.messageParts=e,this.placeHolderNames=t,this.expressions=o}isEquivalent(i){return!1}isConstant(){return!1}visitExpression(i,e){return i.visitLocalizedString(this,e)}clone(){return new n(this.metaBlock,this.messageParts,this.placeHolderNames,this.expressions.map(i=>i.clone()),this.sourceSpan)}serializeI18nHead(){let i=this.metaBlock.description||"";return this.metaBlock.meaning&&(i=`${this.metaBlock.meaning}${f$}${i}`),this.metaBlock.customId&&(i=`${i}${J4}${this.metaBlock.customId}`),this.metaBlock.legacyIds&&this.metaBlock.legacyIds.forEach(e=>{i=`${i}${g$}${e}`}),e5(i,this.messageParts[0].text,this.getMessagePartSourceSpan(0))}getMessagePartSourceSpan(i){return this.messageParts[i]?.sourceSpan??this.sourceSpan}getPlaceholderSourceSpan(i){return this.placeHolderNames[i]?.sourceSpan??this.expressions[i]?.sourceSpan??this.sourceSpan}serializeI18nTemplatePart(i){let e=this.placeHolderNames[i-1],t=this.messageParts[i],o=e.text;return e.associatedMessage?.legacyIds.length===0&&(o+=`${J4}${$N(e.associatedMessage.messageString,e.associatedMessage.meaning)}`),e5(o,t.text,this.getMessagePartSourceSpan(i))}},$C=n=>n.replace(/\\/g,"\\\\"),_$=n=>n.replace(/^:/,"\\:"),v$=n=>n.replace(/:/g,"\\:"),Vk=n=>n.replace(/`/g,"\\`").replace(/\${/g,"$\\{");function e5(n,i,e){return n===""?{cooked:i,raw:Vk(_$($C(i))),range:e}:{cooked:`:${n}:${i}`,raw:Vk(`:${v$($C(n))}:${$C(i)}`),range:e}}var zp=class n extends Bi{value;typeParams;constructor(i,e,t=null,o){super(e,o),this.value=i,this.typeParams=t}isEquivalent(i){return i instanceof n&&this.value.name===i.value.name&&this.value.moduleName===i.value.moduleName}isConstant(){return!1}visitExpression(i,e){return i.visitExternalExpr(this,e)}clone(){return new n(this.value,this.type,this.typeParams,this.sourceSpan)}};var Sc=class n extends Bi{condition;falseCase;trueCase;constructor(i,e,t=null,o,r){super(o||e.type,r),this.condition=i,this.falseCase=t,this.trueCase=e}isEquivalent(i){return i instanceof n&&this.condition.isEquivalent(i.condition)&&this.trueCase.isEquivalent(i.trueCase)&&h$(this.falseCase,i.falseCase)}isConstant(){return!1}visitExpression(i,e){return i.visitConditionalExpr(this,e)}clone(){return new n(this.condition.clone(),this.trueCase.clone(),this.falseCase?.clone(),this.type,this.sourceSpan)}};var p_=class n extends Bi{condition;constructor(i,e){super(u$,e),this.condition=i}isEquivalent(i){return i instanceof n&&this.condition.isEquivalent(i.condition)}isConstant(){return!1}visitExpression(i,e){return i.visitNotExpr(this,e)}clone(){return new n(this.condition.clone(),this.sourceSpan)}},br=class n{name;type;constructor(i,e=null){this.name=i,this.type=e}isEquivalent(i){return this.name===i.name}clone(){return new n(this.name,this.type)}},om=class n extends Bi{params;statements;name;constructor(i,e,t,o,r){super(t,o),this.params=i,this.statements=e,this.name=r}isEquivalent(i){return(i instanceof n||i instanceof u_)&&Ts(this.params,i.params)&&Ts(this.statements,i.statements)}isConstant(){return!1}visitExpression(i,e){return i.visitFunctionExpr(this,e)}toDeclStmt(i,e){return new u_(i,this.params,this.statements,this.type,e,this.sourceSpan)}clone(){return new n(this.params.map(i=>i.clone()),this.statements,this.type,this.sourceSpan,this.name)}},eu=class Bk extends Bi{params;body;constructor(i,e,t,o){super(t,o),this.params=i,this.body=e}isEquivalent(i){return!(i instanceof Bk)||!Ts(this.params,i.params)?!1:this.body instanceof Bi&&i.body instanceof Bi?this.body.isEquivalent(i.body):Array.isArray(this.body)&&Array.isArray(i.body)?Ts(this.body,i.body):!1}isConstant(){return!1}visitExpression(i,e){return i.visitArrowFunctionExpr(this,e)}clone(){return new Bk(this.params.map(i=>i.clone()),Array.isArray(this.body)?this.body:this.body.clone(),this.type,this.sourceSpan)}toDeclStmt(i,e){return new Rr(i,this,Ol,e,this.sourceSpan)}},jp=class n extends Bi{operator;expr;parens;constructor(i,e,t,o,r=!0){super(t||Bp,o),this.operator=i,this.expr=e,this.parens=r}isEquivalent(i){return i instanceof n&&this.operator===i.operator&&this.expr.isEquivalent(i.expr)}isConstant(){return!1}visitExpression(i,e){return i.visitUnaryOperatorExpr(this,e)}clone(){return new n(this.operator,this.expr.clone(),this.type,this.sourceSpan,this.parens)}},Fl=class n extends Bi{expr;constructor(i,e,t){super(e,t),this.expr=i}visitExpression(i,e){return i.visitParenthesizedExpr(this,e)}isEquivalent(i){return i instanceof n&&i.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr.clone())}},gi=class n extends Bi{operator;rhs;lhs;constructor(i,e,t,o,r){super(o||e.type,r),this.operator=i,this.rhs=t,this.lhs=e}isEquivalent(i){return i instanceof n&&this.operator===i.operator&&this.lhs.isEquivalent(i.lhs)&&this.rhs.isEquivalent(i.rhs)}isConstant(){return!1}visitExpression(i,e){return i.visitBinaryOperatorExpr(this,e)}clone(){return new n(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}isAssignment(){let i=this.operator;return i===st.Assign||i===st.AdditionAssignment||i===st.SubtractionAssignment||i===st.MultiplicationAssignment||i===st.DivisionAssignment||i===st.RemainderAssignment||i===st.ExponentiationAssignment||i===st.AndAssignment||i===st.OrAssignment||i===st.NullishCoalesceAssignment}},Es=class n extends Bi{receiver;name;constructor(i,e,t,o){super(t,o),this.receiver=i,this.name=e}get index(){return this.name}isEquivalent(i){return i instanceof n&&this.receiver.isEquivalent(i.receiver)&&this.name===i.name}isConstant(){return!1}visitExpression(i,e){return i.visitReadPropExpr(this,e)}set(i){return new gi(st.Assign,this.receiver.prop(this.name),i,null,this.sourceSpan)}clone(){return new n(this.receiver.clone(),this.name,this.type,this.sourceSpan)}},xd=class n extends Bi{receiver;index;constructor(i,e,t,o){super(t,o),this.receiver=i,this.index=e}isEquivalent(i){return i instanceof n&&this.receiver.isEquivalent(i.receiver)&&this.index.isEquivalent(i.index)}isConstant(){return!1}visitExpression(i,e){return i.visitReadKeyExpr(this,e)}set(i){return new gi(st.Assign,this.receiver.key(this.index),i,null,this.sourceSpan)}clone(){return new n(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}},wc=class n extends Bi{entries;constructor(i,e,t){super(e,t),this.entries=i}isConstant(){return this.entries.every(i=>i.isConstant())}isEquivalent(i){return i instanceof n&&Ts(this.entries,i.entries)}visitExpression(i,e){return i.visitLiteralArrayExpr(this,e)}clone(){return new n(this.entries.map(i=>i.clone()),this.type,this.sourceSpan)}},xh=class n{key;value;quoted;constructor(i,e,t){this.key=i,this.value=e,this.quoted=t}isEquivalent(i){return this.key===i.key&&this.value.isEquivalent(i.value)}clone(){return new n(this.key,this.value.clone(),this.quoted)}isConstant(){return this.value.isConstant()}},rm=class n{expression;constructor(i){this.expression=i}isEquivalent(i){return i instanceof n&&this.expression.isEquivalent(i.expression)}clone(){return new n(this.expression.clone())}isConstant(){return this.expression.isConstant()}},Rl=class n extends Bi{entries;valueType=null;constructor(i,e,t){super(e,t),this.entries=i,e&&(this.valueType=e.valueType)}isEquivalent(i){return i instanceof n&&Ts(this.entries,i.entries)}isConstant(){return this.entries.every(i=>i.isConstant())}visitExpression(i,e){return i.visitLiteralMapExpr(this,e)}clone(){let i=this.entries.map(e=>e.clone());return new n(i,this.type,this.sourceSpan)}};var $p=class n extends Bi{expression;constructor(i,e){super(null,e),this.expression=i}isEquivalent(i){return i instanceof n&&this.expression.isEquivalent(i.expression)}isConstant(){return this.expression.isConstant()}visitExpression(i,e){return i.visitSpreadElementExpr(this,e)}clone(){return new n(this.expression.clone(),this.sourceSpan)}},yh=new aa(null,null,null),C$=new aa(null,Ol,null),oa=(function(n){return n[n.None=0]="None",n[n.Final=1]="Final",n[n.Private=2]="Private",n[n.Exported=4]="Exported",n[n.Static=8]="Static",n})(oa||{}),zk=class{text;multiline;trailingNewline;constructor(i,e,t){this.text=i,this.multiline=e,this.trailingNewline=t}toString(){return this.multiline?` ${this.text} `:this.text}},t1=class extends zk{tags;constructor(i){super("",!0,!0),this.tags=i}toString(){return w$(this.tags)}},Hp=class{modifiers;sourceSpan;leadingComments;constructor(i=oa.None,e=null,t){this.modifiers=i,this.sourceSpan=e,this.leadingComments=t}hasModifier(i){return(this.modifiers&i)!==0}addLeadingComment(i){this.leadingComments=this.leadingComments??[],this.leadingComments.push(i)}},Rr=class n extends Hp{name;value;type;constructor(i,e,t,o,r,a){super(o,r,a),this.name=i,this.value=e,this.type=t||e&&e.type||null}isEquivalent(i){return i instanceof n&&this.name===i.name&&(this.value?!!i.value&&this.value.isEquivalent(i.value):!i.value)}visitStatement(i,e){return i.visitDeclareVarStmt(this,e)}},u_=class n extends Hp{name;params;statements;type;constructor(i,e,t,o,r,a,c){super(r,a,c),this.name=i,this.params=e,this.statements=t,this.type=o||null}isEquivalent(i){return i instanceof n&&Ts(this.params,i.params)&&Ts(this.statements,i.statements)}visitStatement(i,e){return i.visitDeclareFunctionStmt(this,e)}},sa=class n extends Hp{expr;constructor(i,e,t){super(oa.None,e,t),this.expr=i}isEquivalent(i){return i instanceof n&&this.expr.isEquivalent(i.expr)}visitStatement(i,e){return i.visitExpressionStmt(this,e)}},xr=class n extends Hp{value;constructor(i,e=null,t){super(oa.None,e,t),this.value=i}isEquivalent(i){return i instanceof n&&this.value.isEquivalent(i.value)}visitStatement(i,e){return i.visitReturnStmt(this,e)}},n1=class n extends Hp{condition;trueCase;falseCase;constructor(i,e,t=[],o,r){super(oa.None,o,r),this.condition=i,this.trueCase=e,this.falseCase=t}isEquivalent(i){return i instanceof n&&this.condition.isEquivalent(i.condition)&&Ts(this.trueCase,i.trueCase)&&Ts(this.falseCase,i.falseCase)}visitStatement(i,e){return i.visitIfStmt(this,e)}};function b$(n=[]){return new t1(n)}function Yn(n,i,e){return new Nl(n,i,e)}function Ut(n,i=null,e){return new zp(n,null,i,e)}function ra(n,i,e){return new tl(n,i,e)}function r0(n){return new Ch(n)}function Gi(n,i,e){return new wc(n,i,e)}function nl(n,i=null){return new Rl(n.map(e=>new xh(e.key,e.value,e.quoted)),i,null)}function x$(n,i){return new p_(n,i)}function am(n,i,e,t,o){return new om(n,i,e,t,o)}function Ds(n,i,e,t){return new eu(n,i,e,t)}function tb(n,i,e,t,o){return new n1(n,i,e,t,o)}function y$(n,i,e,t){return new c_(n,i,e,t)}function Te(n,i,e){return new aa(n,i,e)}function S$(n,i,e,t,o){return new e1(n,i,e,t,o)}function t5(n){let i="";if(n.tagName&&(i+=` @${n.tagName}`),n.text){if(n.text.match(/\/\*|\*\//))throw new Error('JSDoc text cannot contain "/*" and "*/"');i+=" "+n.text.replace(/@/g,"\\@")}return i}function w$(n){if(n.length===0)return"";if(n.length===1&&n[0].tagName&&!n[0].text)return`*${t5(n[0])} `;let i=`* +`;for(let e of n)i+=" *",i+=t5(e).replace(/\n/g,` * `),i+=` -`;return i+=" ",i}var qG="_c",QG={},XG=50,ub=class n extends ji{resolved;original;shared=!1;constructor(i){super(i.type),this.resolved=i,this.original=i}visitExpression(i,e){return e===QG?this.original.visitExpression(i,e):this.resolved.visitExpression(i,e)}isEquivalent(i){return i instanceof n&&this.resolved.isEquivalent(i.resolved)}isConstant(){return!0}clone(){throw new Error("Not supported.")}fixup(i){this.resolved=i,this.shared=!0}},hb=class{isClosureCompilerEnabled;statements=[];literals=new Map;literalFactories=new Map;sharedConstants=new Map;_claimedNames=new Map;nextNameIndex=0;constructor(i=!1){this.isClosureCompilerEnabled=i}getConstLiteral(i,e){if(i instanceof ua&&!ER(i)||i instanceof ub)return i;let t=r0.INSTANCE.keyOf(i),o=this.literals.get(t),r=!1;if(o||(o=new ub(i),this.literals.set(t,o),r=!0),!r&&!o.shared||r&&e){let a=this.freshName(),c,m;this.isClosureCompilerEnabled&&ER(i)?(c=new wm([],[new Mr(i)]),m=Jn(a).callFn([])):(c=i,m=Jn(a)),this.statements.push(new zr(a,c,Gl,ma.Final)),o.fixup(m)}return o}getSharedConstant(i,e){let t=i.keyOf(e);if(!this.sharedConstants.has(t)){let o=this.freshName();this.sharedConstants.set(t,Jn(o)),this.statements.push(i.toSharedConstantDeclaration(o,e))}return this.sharedConstants.get(t)}getSharedFunctionReference(i,e,t=!0){let o=i instanceof ku;for(let a of this.statements)if(o&&a instanceof zr&&a.value?.isEquivalent(i)||!o&&a instanceof o0&&i instanceof wm&&i.isEquivalent(a))return Jn(a.name);let r=t?this.uniqueName(e):e;return this.statements.push(i instanceof wm?i.toDeclStmt(r,ma.Final):new zr(r,i,Gl,ma.Final,i.sourceSpan)),Jn(r)}uniqueName(i,e=!0){let t=this._claimedNames.get(i)??0,o=t===0&&!e?`${i}`:`${i}${t}`;return this._claimedNames.set(i,t+1),o}freshName(){return this.uniqueName(qG)}},r0=class n{static INSTANCE=new n;keyOf(i){if(i instanceof ua&&typeof i.value=="string")return`"${i.value}"`;if(i instanceof ua)return String(i.value);if(i instanceof Xh)return`/${i.body}/${i.flags??""}`;if(i instanceof Oc){let e=[];for(let t of i.entries)e.push(this.keyOf(t));return`[${e.join(",")}]`}else if(i instanceof Ql){let e=[];for(let t of i.entries)if(t instanceof Mm)e.push("..."+this.keyOf(t.expression));else{let o=t.key;t.quoted&&(o=`"${o}"`),e.push(o+":"+this.keyOf(t.value))}return`{${e.join(",")}}`}else{if(i instanceof pu)return`import("${i.value.moduleName}", ${i.value.name})`;if(i instanceof Wl)return`read(${i.name})`;if(i instanceof Qh)return`typeof(${this.keyOf(i.expr)})`;if(i instanceof hu)return`...${this.keyOf(i.expression)}`;throw new Error(`${this.constructor.name} does not handle expressions of type ${i.constructor.name}`)}}};function ER(n){return n instanceof ua&&typeof n.value=="string"&&n.value.length>=XG}var Ce="@angular/core",fe=(()=>{class n{static core={name:null,moduleName:Ce};static namespaceHTML={name:"\u0275\u0275namespaceHTML",moduleName:Ce};static namespaceMathML={name:"\u0275\u0275namespaceMathML",moduleName:Ce};static namespaceSVG={name:"\u0275\u0275namespaceSVG",moduleName:Ce};static element={name:"\u0275\u0275element",moduleName:Ce};static elementStart={name:"\u0275\u0275elementStart",moduleName:Ce};static elementEnd={name:"\u0275\u0275elementEnd",moduleName:Ce};static domElement={name:"\u0275\u0275domElement",moduleName:Ce};static domElementStart={name:"\u0275\u0275domElementStart",moduleName:Ce};static domElementEnd={name:"\u0275\u0275domElementEnd",moduleName:Ce};static domElementContainer={name:"\u0275\u0275domElementContainer",moduleName:Ce};static domElementContainerStart={name:"\u0275\u0275domElementContainerStart",moduleName:Ce};static domElementContainerEnd={name:"\u0275\u0275domElementContainerEnd",moduleName:Ce};static domTemplate={name:"\u0275\u0275domTemplate",moduleName:Ce};static domListener={name:"\u0275\u0275domListener",moduleName:Ce};static advance={name:"\u0275\u0275advance",moduleName:Ce};static syntheticHostProperty={name:"\u0275\u0275syntheticHostProperty",moduleName:Ce};static syntheticHostListener={name:"\u0275\u0275syntheticHostListener",moduleName:Ce};static attribute={name:"\u0275\u0275attribute",moduleName:Ce};static classProp={name:"\u0275\u0275classProp",moduleName:Ce};static elementContainerStart={name:"\u0275\u0275elementContainerStart",moduleName:Ce};static elementContainerEnd={name:"\u0275\u0275elementContainerEnd",moduleName:Ce};static elementContainer={name:"\u0275\u0275elementContainer",moduleName:Ce};static styleMap={name:"\u0275\u0275styleMap",moduleName:Ce};static classMap={name:"\u0275\u0275classMap",moduleName:Ce};static styleProp={name:"\u0275\u0275styleProp",moduleName:Ce};static interpolate={name:"\u0275\u0275interpolate",moduleName:Ce};static interpolate1={name:"\u0275\u0275interpolate1",moduleName:Ce};static interpolate2={name:"\u0275\u0275interpolate2",moduleName:Ce};static interpolate3={name:"\u0275\u0275interpolate3",moduleName:Ce};static interpolate4={name:"\u0275\u0275interpolate4",moduleName:Ce};static interpolate5={name:"\u0275\u0275interpolate5",moduleName:Ce};static interpolate6={name:"\u0275\u0275interpolate6",moduleName:Ce};static interpolate7={name:"\u0275\u0275interpolate7",moduleName:Ce};static interpolate8={name:"\u0275\u0275interpolate8",moduleName:Ce};static interpolateV={name:"\u0275\u0275interpolateV",moduleName:Ce};static nextContext={name:"\u0275\u0275nextContext",moduleName:Ce};static resetView={name:"\u0275\u0275resetView",moduleName:Ce};static templateCreate={name:"\u0275\u0275template",moduleName:Ce};static defer={name:"\u0275\u0275defer",moduleName:Ce};static deferWhen={name:"\u0275\u0275deferWhen",moduleName:Ce};static deferOnIdle={name:"\u0275\u0275deferOnIdle",moduleName:Ce};static deferOnImmediate={name:"\u0275\u0275deferOnImmediate",moduleName:Ce};static deferOnTimer={name:"\u0275\u0275deferOnTimer",moduleName:Ce};static deferOnHover={name:"\u0275\u0275deferOnHover",moduleName:Ce};static deferOnInteraction={name:"\u0275\u0275deferOnInteraction",moduleName:Ce};static deferOnViewport={name:"\u0275\u0275deferOnViewport",moduleName:Ce};static deferPrefetchWhen={name:"\u0275\u0275deferPrefetchWhen",moduleName:Ce};static deferPrefetchOnIdle={name:"\u0275\u0275deferPrefetchOnIdle",moduleName:Ce};static deferPrefetchOnImmediate={name:"\u0275\u0275deferPrefetchOnImmediate",moduleName:Ce};static deferPrefetchOnTimer={name:"\u0275\u0275deferPrefetchOnTimer",moduleName:Ce};static deferPrefetchOnHover={name:"\u0275\u0275deferPrefetchOnHover",moduleName:Ce};static deferPrefetchOnInteraction={name:"\u0275\u0275deferPrefetchOnInteraction",moduleName:Ce};static deferPrefetchOnViewport={name:"\u0275\u0275deferPrefetchOnViewport",moduleName:Ce};static deferHydrateWhen={name:"\u0275\u0275deferHydrateWhen",moduleName:Ce};static deferHydrateNever={name:"\u0275\u0275deferHydrateNever",moduleName:Ce};static deferHydrateOnIdle={name:"\u0275\u0275deferHydrateOnIdle",moduleName:Ce};static deferHydrateOnImmediate={name:"\u0275\u0275deferHydrateOnImmediate",moduleName:Ce};static deferHydrateOnTimer={name:"\u0275\u0275deferHydrateOnTimer",moduleName:Ce};static deferHydrateOnHover={name:"\u0275\u0275deferHydrateOnHover",moduleName:Ce};static deferHydrateOnInteraction={name:"\u0275\u0275deferHydrateOnInteraction",moduleName:Ce};static deferHydrateOnViewport={name:"\u0275\u0275deferHydrateOnViewport",moduleName:Ce};static deferEnableTimerScheduling={name:"\u0275\u0275deferEnableTimerScheduling",moduleName:Ce};static conditionalCreate={name:"\u0275\u0275conditionalCreate",moduleName:Ce};static conditionalBranchCreate={name:"\u0275\u0275conditionalBranchCreate",moduleName:Ce};static conditional={name:"\u0275\u0275conditional",moduleName:Ce};static repeater={name:"\u0275\u0275repeater",moduleName:Ce};static repeaterCreate={name:"\u0275\u0275repeaterCreate",moduleName:Ce};static repeaterTrackByIndex={name:"\u0275\u0275repeaterTrackByIndex",moduleName:Ce};static repeaterTrackByIdentity={name:"\u0275\u0275repeaterTrackByIdentity",moduleName:Ce};static componentInstance={name:"\u0275\u0275componentInstance",moduleName:Ce};static text={name:"\u0275\u0275text",moduleName:Ce};static enableBindings={name:"\u0275\u0275enableBindings",moduleName:Ce};static disableBindings={name:"\u0275\u0275disableBindings",moduleName:Ce};static getCurrentView={name:"\u0275\u0275getCurrentView",moduleName:Ce};static textInterpolate={name:"\u0275\u0275textInterpolate",moduleName:Ce};static textInterpolate1={name:"\u0275\u0275textInterpolate1",moduleName:Ce};static textInterpolate2={name:"\u0275\u0275textInterpolate2",moduleName:Ce};static textInterpolate3={name:"\u0275\u0275textInterpolate3",moduleName:Ce};static textInterpolate4={name:"\u0275\u0275textInterpolate4",moduleName:Ce};static textInterpolate5={name:"\u0275\u0275textInterpolate5",moduleName:Ce};static textInterpolate6={name:"\u0275\u0275textInterpolate6",moduleName:Ce};static textInterpolate7={name:"\u0275\u0275textInterpolate7",moduleName:Ce};static textInterpolate8={name:"\u0275\u0275textInterpolate8",moduleName:Ce};static textInterpolateV={name:"\u0275\u0275textInterpolateV",moduleName:Ce};static restoreView={name:"\u0275\u0275restoreView",moduleName:Ce};static pureFunction0={name:"\u0275\u0275pureFunction0",moduleName:Ce};static pureFunction1={name:"\u0275\u0275pureFunction1",moduleName:Ce};static pureFunction2={name:"\u0275\u0275pureFunction2",moduleName:Ce};static pureFunction3={name:"\u0275\u0275pureFunction3",moduleName:Ce};static pureFunction4={name:"\u0275\u0275pureFunction4",moduleName:Ce};static pureFunction5={name:"\u0275\u0275pureFunction5",moduleName:Ce};static pureFunction6={name:"\u0275\u0275pureFunction6",moduleName:Ce};static pureFunction7={name:"\u0275\u0275pureFunction7",moduleName:Ce};static pureFunction8={name:"\u0275\u0275pureFunction8",moduleName:Ce};static pureFunctionV={name:"\u0275\u0275pureFunctionV",moduleName:Ce};static pipeBind1={name:"\u0275\u0275pipeBind1",moduleName:Ce};static pipeBind2={name:"\u0275\u0275pipeBind2",moduleName:Ce};static pipeBind3={name:"\u0275\u0275pipeBind3",moduleName:Ce};static pipeBind4={name:"\u0275\u0275pipeBind4",moduleName:Ce};static pipeBindV={name:"\u0275\u0275pipeBindV",moduleName:Ce};static domProperty={name:"\u0275\u0275domProperty",moduleName:Ce};static ariaProperty={name:"\u0275\u0275ariaProperty",moduleName:Ce};static property={name:"\u0275\u0275property",moduleName:Ce};static control={name:"\u0275\u0275control",moduleName:Ce};static controlCreate={name:"\u0275\u0275controlCreate",moduleName:Ce};static animationEnterListener={name:"\u0275\u0275animateEnterListener",moduleName:Ce};static animationLeaveListener={name:"\u0275\u0275animateLeaveListener",moduleName:Ce};static animationEnter={name:"\u0275\u0275animateEnter",moduleName:Ce};static animationLeave={name:"\u0275\u0275animateLeave",moduleName:Ce};static i18n={name:"\u0275\u0275i18n",moduleName:Ce};static i18nAttributes={name:"\u0275\u0275i18nAttributes",moduleName:Ce};static i18nExp={name:"\u0275\u0275i18nExp",moduleName:Ce};static i18nStart={name:"\u0275\u0275i18nStart",moduleName:Ce};static i18nEnd={name:"\u0275\u0275i18nEnd",moduleName:Ce};static i18nApply={name:"\u0275\u0275i18nApply",moduleName:Ce};static i18nPostprocess={name:"\u0275\u0275i18nPostprocess",moduleName:Ce};static pipe={name:"\u0275\u0275pipe",moduleName:Ce};static projection={name:"\u0275\u0275projection",moduleName:Ce};static projectionDef={name:"\u0275\u0275projectionDef",moduleName:Ce};static reference={name:"\u0275\u0275reference",moduleName:Ce};static inject={name:"\u0275\u0275inject",moduleName:Ce};static injectAttribute={name:"\u0275\u0275injectAttribute",moduleName:Ce};static directiveInject={name:"\u0275\u0275directiveInject",moduleName:Ce};static invalidFactory={name:"\u0275\u0275invalidFactory",moduleName:Ce};static invalidFactoryDep={name:"\u0275\u0275invalidFactoryDep",moduleName:Ce};static templateRefExtractor={name:"\u0275\u0275templateRefExtractor",moduleName:Ce};static forwardRef={name:"forwardRef",moduleName:Ce};static resolveForwardRef={name:"resolveForwardRef",moduleName:Ce};static replaceMetadata={name:"\u0275\u0275replaceMetadata",moduleName:Ce};static getReplaceMetadataURL={name:"\u0275\u0275getReplaceMetadataURL",moduleName:Ce};static \u0275\u0275defineInjectable={name:"\u0275\u0275defineInjectable",moduleName:Ce};static declareInjectable={name:"\u0275\u0275ngDeclareInjectable",moduleName:Ce};static InjectableDeclaration={name:"\u0275\u0275InjectableDeclaration",moduleName:Ce};static resolveWindow={name:"\u0275\u0275resolveWindow",moduleName:Ce};static resolveDocument={name:"\u0275\u0275resolveDocument",moduleName:Ce};static resolveBody={name:"\u0275\u0275resolveBody",moduleName:Ce};static getComponentDepsFactory={name:"\u0275\u0275getComponentDepsFactory",moduleName:Ce};static defineComponent={name:"\u0275\u0275defineComponent",moduleName:Ce};static declareComponent={name:"\u0275\u0275ngDeclareComponent",moduleName:Ce};static setComponentScope={name:"\u0275\u0275setComponentScope",moduleName:Ce};static ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:Ce};static ViewEncapsulation={name:"ViewEncapsulation",moduleName:Ce};static ComponentDeclaration={name:"\u0275\u0275ComponentDeclaration",moduleName:Ce};static FactoryDeclaration={name:"\u0275\u0275FactoryDeclaration",moduleName:Ce};static declareFactory={name:"\u0275\u0275ngDeclareFactory",moduleName:Ce};static FactoryTarget={name:"\u0275\u0275FactoryTarget",moduleName:Ce};static defineDirective={name:"\u0275\u0275defineDirective",moduleName:Ce};static declareDirective={name:"\u0275\u0275ngDeclareDirective",moduleName:Ce};static DirectiveDeclaration={name:"\u0275\u0275DirectiveDeclaration",moduleName:Ce};static InjectorDef={name:"\u0275\u0275InjectorDef",moduleName:Ce};static InjectorDeclaration={name:"\u0275\u0275InjectorDeclaration",moduleName:Ce};static defineInjector={name:"\u0275\u0275defineInjector",moduleName:Ce};static declareInjector={name:"\u0275\u0275ngDeclareInjector",moduleName:Ce};static NgModuleDeclaration={name:"\u0275\u0275NgModuleDeclaration",moduleName:Ce};static ModuleWithProviders={name:"ModuleWithProviders",moduleName:Ce};static defineNgModule={name:"\u0275\u0275defineNgModule",moduleName:Ce};static declareNgModule={name:"\u0275\u0275ngDeclareNgModule",moduleName:Ce};static setNgModuleScope={name:"\u0275\u0275setNgModuleScope",moduleName:Ce};static registerNgModuleType={name:"\u0275\u0275registerNgModuleType",moduleName:Ce};static PipeDeclaration={name:"\u0275\u0275PipeDeclaration",moduleName:Ce};static definePipe={name:"\u0275\u0275definePipe",moduleName:Ce};static declarePipe={name:"\u0275\u0275ngDeclarePipe",moduleName:Ce};static declareClassMetadata={name:"\u0275\u0275ngDeclareClassMetadata",moduleName:Ce};static declareClassMetadataAsync={name:"\u0275\u0275ngDeclareClassMetadataAsync",moduleName:Ce};static setClassMetadata={name:"\u0275setClassMetadata",moduleName:Ce};static setClassMetadataAsync={name:"\u0275setClassMetadataAsync",moduleName:Ce};static setClassDebugInfo={name:"\u0275setClassDebugInfo",moduleName:Ce};static queryRefresh={name:"\u0275\u0275queryRefresh",moduleName:Ce};static viewQuery={name:"\u0275\u0275viewQuery",moduleName:Ce};static loadQuery={name:"\u0275\u0275loadQuery",moduleName:Ce};static contentQuery={name:"\u0275\u0275contentQuery",moduleName:Ce};static viewQuerySignal={name:"\u0275\u0275viewQuerySignal",moduleName:Ce};static contentQuerySignal={name:"\u0275\u0275contentQuerySignal",moduleName:Ce};static queryAdvance={name:"\u0275\u0275queryAdvance",moduleName:Ce};static twoWayProperty={name:"\u0275\u0275twoWayProperty",moduleName:Ce};static twoWayBindingSet={name:"\u0275\u0275twoWayBindingSet",moduleName:Ce};static twoWayListener={name:"\u0275\u0275twoWayListener",moduleName:Ce};static declareLet={name:"\u0275\u0275declareLet",moduleName:Ce};static storeLet={name:"\u0275\u0275storeLet",moduleName:Ce};static readContextLet={name:"\u0275\u0275readContextLet",moduleName:Ce};static arrowFunction={name:"\u0275\u0275arrowFunction",moduleName:Ce};static attachSourceLocations={name:"\u0275\u0275attachSourceLocations",moduleName:Ce};static NgOnChangesFeature={name:"\u0275\u0275NgOnChangesFeature",moduleName:Ce};static ControlFeature={name:"\u0275\u0275ControlFeature",moduleName:Ce};static InheritDefinitionFeature={name:"\u0275\u0275InheritDefinitionFeature",moduleName:Ce};static ProvidersFeature={name:"\u0275\u0275ProvidersFeature",moduleName:Ce};static HostDirectivesFeature={name:"\u0275\u0275HostDirectivesFeature",moduleName:Ce};static ExternalStylesFeature={name:"\u0275\u0275ExternalStylesFeature",moduleName:Ce};static listener={name:"\u0275\u0275listener",moduleName:Ce};static getInheritedFactory={name:"\u0275\u0275getInheritedFactory",moduleName:Ce};static sanitizeHtml={name:"\u0275\u0275sanitizeHtml",moduleName:Ce};static sanitizeStyle={name:"\u0275\u0275sanitizeStyle",moduleName:Ce};static validateAttribute={name:"\u0275\u0275validateAttribute",moduleName:Ce};static sanitizeResourceUrl={name:"\u0275\u0275sanitizeResourceUrl",moduleName:Ce};static sanitizeScript={name:"\u0275\u0275sanitizeScript",moduleName:Ce};static sanitizeUrl={name:"\u0275\u0275sanitizeUrl",moduleName:Ce};static sanitizeUrlOrResourceUrl={name:"\u0275\u0275sanitizeUrlOrResourceUrl",moduleName:Ce};static trustConstantHtml={name:"\u0275\u0275trustConstantHtml",moduleName:Ce};static trustConstantResourceUrl={name:"\u0275\u0275trustConstantResourceUrl",moduleName:Ce};static inputDecorator={name:"Input",moduleName:Ce};static outputDecorator={name:"Output",moduleName:Ce};static viewChildDecorator={name:"ViewChild",moduleName:Ce};static viewChildrenDecorator={name:"ViewChildren",moduleName:Ce};static contentChildDecorator={name:"ContentChild",moduleName:Ce};static contentChildrenDecorator={name:"ContentChildren",moduleName:Ce};static InputSignalBrandWriteType={name:"\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE",moduleName:Ce};static UnwrapDirectiveSignalInputs={name:"\u0275UnwrapDirectiveSignalInputs",moduleName:Ce};static unwrapWritableSignal={name:"\u0275unwrapWritableSignal",moduleName:Ce};static assertType={name:"\u0275assertType",moduleName:Ce}}return n})(),YG=/-+([a-z0-9])/g;function KG(n){return n.replace(YG,(...i)=>i[1].toUpperCase())}function ZG(n,i){return _6(n,":",i)}function JG(n,i){return _6(n,".",i)}function _6(n,i,e){let t=n.indexOf(i);return t==-1?e:[n.slice(0,t).trim(),n.slice(t+1).trim()]}function eW(n){let i=[];for(let e=0;e=55296&&t<=56319&&n.length>e+1){let o=n.charCodeAt(e+1);o>=56320&&o<=57343&&(e++,t=(t-55296<<10)+o-56320+65536)}t<=127?i.push(t):t<=2047?i.push(t>>6&31|192,t&63|128):t<=65535?i.push(t>>12|224,t>>6&63|128,t&63|128):t<=2097151&&i.push(t>>18&7|240,t>>12&63|128,t>>6&63|128,t&63|128)}return i}function v6(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(v6).join(", ")}]`;if(n==null)return""+n;let i=n.overriddenName||n.name;if(i)return`${i}`;if(!n.toString)return"object";let e=n.toString();if(e==null)return""+e;let t=e.indexOf(` -`);return t>=0?e.slice(0,t):e}var wE=class{full;major;minor;patch;constructor(i){this.full=i;let e=i.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}},U_=globalThis,tW=/^([1-9]|1[0-8])\./;function C6(n){return n.startsWith("0.")?!0:!tW.test(n)}var nW=3,iW="# sourceMappingURL=data:application/json;base64,",ME=class{file;sourcesContent=new Map;lines=[];lastCol0=0;hasMappings=!1;constructor(i=null){this.file=i}addSource(i,e=null){return this.sourcesContent.has(i)||this.sourcesContent.set(i,e),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(i,e,t,o){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(e!=null&&!this.sourcesContent.has(e))throw new Error(`Unknown source file "${e}"`);if(i==null)throw new Error("The column in the generated code must be provided");if(i{i.set(u,h),e.push(u),t.push(this.sourcesContent.get(u)||null)});let o="",r=0,a=0,c=0,m=0;return this.lines.forEach(u=>{r=0,o+=u.map(h=>{let g=z1(h.col0-r);return r=h.col0,h.sourceUrl!=null&&(g+=z1(i.get(h.sourceUrl)-a),a=i.get(h.sourceUrl),g+=z1(h.sourceLine0-c),c=h.sourceLine0,g+=z1(h.sourceCol0-m),m=h.sourceCol0),g}).join(","),o+=";"}),o=o.slice(0,-1),{file:this.file||"",version:nW,sourceRoot:"",sources:e,sourcesContent:t,mappings:o}}toJsComment(){return this.hasMappings?"//"+iW+oW(JSON.stringify(this,null,0)):""}};function oW(n){let i="",e=eW(n);for(let t=0;t>2),i+=V_((o&3)<<4|(r===null?0:r>>4)),i+=r===null?"=":V_((r&15)<<2|(a===null?0:a>>6)),i+=r===null||a===null?"=":V_(a&63)}return i}function z1(n){n=n<0?(-n<<1)+1:n<<1;let i="";do{let e=n&31;n=n>>5,n>0&&(e=e|32),i+=V_(e)}while(n>0);return i}var rW="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function V_(n){if(n<0||n>=64)throw new Error("Can only encode value in the range [0, 63]");return rW[n]}var aW=/'|\\|\n|\r|\$/g,sW=/^[$A-Z_][0-9A-Z_$]*$/i,kE=" ",fb=class{indent;partsLength=0;parts=[];srcSpans=[];constructor(i){this.indent=i}},lW=new Map([[lt.And,"&&"],[lt.Bigger,">"],[lt.BiggerEquals,">="],[lt.BitwiseOr,"|"],[lt.BitwiseAnd,"&"],[lt.Divide,"/"],[lt.Assign,"="],[lt.Equals,"=="],[lt.Identical,"==="],[lt.Lower,"<"],[lt.LowerEquals,"<="],[lt.Minus,"-"],[lt.Modulo,"%"],[lt.Exponentiation,"**"],[lt.Multiply,"*"],[lt.NotEquals,"!="],[lt.NotIdentical,"!=="],[lt.NullishCoalesce,"??"],[lt.Or,"||"],[lt.Plus,"+"],[lt.In,"in"],[lt.InstanceOf,"instanceof"],[lt.AdditionAssignment,"+="],[lt.SubtractionAssignment,"-="],[lt.MultiplicationAssignment,"*="],[lt.DivisionAssignment,"/="],[lt.RemainderAssignment,"%="],[lt.ExponentiationAssignment,"**="],[lt.AndAssignment,"&&="],[lt.OrAssignment,"||="],[lt.NullishCoalesceAssignment,"??="]]),TE=class n{_indent;static createRoot(){return new n(0)}_lines;constructor(i){this._indent=i,this._lines=[new fb(i)]}get _currentLine(){return this._lines[this._lines.length-1]}println(i,e=""){this.print(i||null,e,!0)}lineIsEmpty(){return this._currentLine.parts.length===0}lineLength(){return this._currentLine.indent*kE.length+this._currentLine.partsLength}print(i,e,t=!1){e.length>0&&(this._currentLine.parts.push(e),this._currentLine.partsLength+=e.length,this._currentLine.srcSpans.push(i&&i.sourceSpan||null)),t&&this._lines.push(new fb(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}toSource(){return this.sourceLines.map(i=>i.parts.length>0?DR(i.indent)+i.parts.join(""):"").join(` -`)}toSourceMapGenerator(i,e=0){let t=new ME(i),o=!1,r=()=>{o||(t.addSource(i," ").addMapping(0,i,0,0),o=!0)};for(let a=0;a{t.addLine();let m=a.srcSpans,u=a.parts,h=a.indent*kE.length,g=0;for(;go)return t.srcSpans[r];o-=a.length}}return null}get sourceLines(){return this._lines.length&&this._lines[this._lines.length-1].parts.length===0?this._lines.slice(0,-1):this._lines}},EE=class{_escapeDollarInStrings;lastIfCondition=null;constructor(i){this._escapeDollarInStrings=i}printLeadingComments(i,e){if(i.leadingComments!==void 0)for(let t of i.leadingComments)t instanceof mb?e.print(i,`/*${t.toString()}*/`,t.trailingNewline):t.multiline?e.print(i,`/* ${t.text} */`,t.trailingNewline):t.text.split(` -`).forEach(o=>{e.println(i,`// ${o}`)})}visitExpressionStmt(i,e){return this.printLeadingComments(i,e),i.expr.visitExpression(this,e),e.println(i,";"),null}visitReturnStmt(i,e){return this.printLeadingComments(i,e),e.print(i,"return "),i.value.visitExpression(this,e),e.println(i,";"),null}visitIfStmt(i,e){this.printLeadingComments(i,e),e.print(i,"if ("),this.lastIfCondition=i.condition,i.condition.visitExpression(this,e),this.lastIfCondition=null,e.print(i,") {");let t=i.falseCase!=null&&i.falseCase.length>0;return i.trueCase.length<=1&&!t?(e.print(i," "),this.visitAllStatements(i.trueCase,e),e.removeEmptyLastLine(),e.print(i," ")):(e.println(),e.incIndent(),this.visitAllStatements(i.trueCase,e),e.decIndent(),t&&(e.println(i,"} else {"),e.incIndent(),this.visitAllStatements(i.falseCase,e),e.decIndent())),e.println(i,"}"),null}visitInvokeFunctionExpr(i,e){let t=i.fn instanceof ku;return t&&e.print(i.fn,"("),i.fn.visitExpression(this,e),t&&e.print(i.fn,")"),e.print(i,"("),this.visitAllExpressions(i.args,e,","),e.print(i,")"),null}visitTaggedTemplateLiteralExpr(i,e){return i.tag.visitExpression(this,e),i.template.visitExpression(this,e),null}visitTemplateLiteralExpr(i,e){e.print(i,"`");for(let t=0;t{t instanceof Mm?(e.print(i,"..."),t.expression.visitExpression(this,e)):(e.print(i,`${Jp(t.key,this._escapeDollarInStrings,t.quoted)}:`),t.value.visitExpression(this,e))},i.entries,e,","),e.print(i,"}"),null}visitCommaExpr(i,e){return e.print(i,"("),this.visitAllExpressions(i.parts,e,","),e.print(i,")"),null}visitParenthesizedExpr(i,e){i.expr.visitExpression(this,e)}visitSpreadElementExpr(i,e){e.print(i,"..."),i.expression.visitExpression(this,e)}visitAllExpressions(i,e,t){this.visitAllObjects(o=>o.visitExpression(this,e),i,e,t)}visitAllObjects(i,e,t,o){let r=!1;for(let a=0;a0&&(t.lineLength()>80?(t.print(null,o,!0),r||(t.incIndent(),t.incIndent(),r=!0)):t.print(null,o,!1)),i(e[a]);r&&(t.decIndent(),t.decIndent())}visitAllStatements(i,e){i.forEach(t=>t.visitStatement(this,e))}};function Jp(n,i,e=!0){if(n==null)return null;let t=n.replace(aW,(...r)=>r[0]=="$"?i?"\\$":"$":r[0]==` -`?"\\n":r[0]=="\r"?"\\r":`\\${r[0]}`);return e||!sW.test(t)?`'${t}'`:t}function DR(n){let i="";for(let e=0;et.value));return i?Vs([],e):e}function ZD(n,i){return{expression:n,forwardRef:i}}function pW({expression:n,forwardRef:i}){switch(i){case 0:case 1:return n;case 2:return uW(n)}}function uW(n){return qt(fe.forwardRef).callFn([Vs([],n)])}var gb=(function(n){return n[n.Class=0]="Class",n[n.Function=1]="Function",n})(gb||{});function Yp(n){let i=Jn("__ngFactoryType__"),e=null,t=IR(n)?i:new Ci(lt.Or,i,n.type.value),o=null;n.deps!==null?n.deps!=="invalid"&&(o=new t0(t,PR(n.deps,n.target))):(e=Jn(`\u0275${n.name}_BaseFactory`),o=e.callFn([t]));let r=[],a=null;function c(u){let h=Jn("__ngConditionalFactory__");r.push(new zr(h.name,Kh,Gl));let g=o!==null?h.set(o).toStmt():qt(fe.invalidFactory).callFn([]).toStmt();return r.push(mx(i,[g],[h.set(u).toStmt()])),h}if(IR(n)){let u=PR(n.delegateDeps,n.target),h=new(n.delegateType===gb.Class?t0:ps)(n.delegate,u);a=c(h)}else vW(n)?a=c(n.expression):a=o;if(a===null)r.push(qt(fe.invalidFactory).callFn([]).toStmt());else if(e!==null){let u=qt(fe.getInheritedFactory).callFn([n.type.value]),h=new Ci(lt.Or,e,e.set(u));r.push(new Mr(h.callFn([t])))}else r.push(new Mr(a));let m=km([new wr(i.name,ms)],r,Gl,void 0,`${n.name}_Factory`);return e!==null&&(m=Vs([],[new zr(e.name),new Mr(m)]).callFn([],void 0,!0)),{expression:m,statements:[],type:hW(n)}}function hW(n){let i=n.deps!==null&&n.deps!=="invalid"?gW(n.deps):Ic;return pa(qt(fe.FactoryDeclaration,[px(n.type.type,n.typeArgumentCount),i]))}function PR(n,i){return n.map((e,t)=>fW(e,i,t))}function fW(n,i,e){if(n.token===null)return qt(fe.invalidFactoryDep).callFn([ke(e)]);if(n.attributeNameType===null){let t=0|(n.self?2:0)|(n.skipSelf?4:0)|(n.host?1:0)|(n.optional?8:0)|(i===Md.Pipe?16:0),o=t!==0||n.optional?ke(t):null,r=[n.token];o&&r.push(o);let a=CW(i);return qt(a).callFn(r)}else return qt(fe.injectAttribute).callFn([n.token])}function gW(n){let i=!1,e=n.map(t=>{let o=_W(t);return o!==null?(i=!0,o):ke(null)});return i?pa(Yi(e)):Ic}function _W(n){let i=[];return n.attributeNameType!==null&&i.push({key:"attribute",value:n.attributeNameType,quoted:!1}),n.optional&&i.push({key:"optional",value:ke(!0),quoted:!1}),n.host&&i.push({key:"host",value:ke(!0),quoted:!1}),n.self&&i.push({key:"self",value:ke(!0),quoted:!1}),n.skipSelf&&i.push({key:"skipSelf",value:ke(!0),quoted:!1}),i.length>0?pl(i):null}function IR(n){return n.delegateType!==void 0}function vW(n){return n.expression!==void 0}function CW(n){switch(n){case Md.Component:case Md.Directive:case Md.Pipe:return fe.directiveInject;case Md.NgModule:case Md.Injectable:default:return fe.inject}}var gu=class{start;end;constructor(i,e){this.start=i,this.end=e}toAbsolute(i){return new Rs(i+this.start,i+this.end)}},ao=class{span;sourceSpan;constructor(i,e){this.span=i,this.sourceSpan=e}toString(){return"AST"}},a0=class extends ao{nameSpan;constructor(i,e,t){super(i,e),this.nameSpan=t}},wa=class extends ao{visit(i,e=null){return i.visitEmptyExpr?.(this,e)}},Nc=class extends ao{visit(i,e=null){return i.visitImplicitReceiver(this,e)}},s0=class extends ao{visit(i,e=null){return i.visitThisReceiver?.(this,e)}},Zh=class extends ao{expressions;constructor(i,e,t){super(i,e),this.expressions=t}visit(i,e=null){return i.visitChain(this,e)}},_b=class extends ao{condition;trueExp;falseExp;constructor(i,e,t,o,r){super(i,e),this.condition=t,this.trueExp=o,this.falseExp=r}visit(i,e=null){return i.visitConditional(this,e)}},Ec=class extends a0{receiver;name;constructor(i,e,t,o,r){super(i,e,t),this.receiver=o,this.name=r}visit(i,e=null){return i.visitPropertyRead(this,e)}},l0=class extends a0{receiver;name;constructor(i,e,t,o,r){super(i,e,t),this.receiver=o,this.name=r}visit(i,e=null){return i.visitSafePropertyRead(this,e)}},_u=class extends ao{receiver;key;constructor(i,e,t,o){super(i,e),this.receiver=t,this.key=o}visit(i,e=null){return i.visitKeyedRead(this,e)}},c0=class extends ao{receiver;key;constructor(i,e,t,o){super(i,e),this.receiver=t,this.key=o}visit(i,e=null){return i.visitSafeKeyedRead(this,e)}},J1=(function(n){return n[n.ReferencedByName=0]="ReferencedByName",n[n.ReferencedDirectly=1]="ReferencedDirectly",n})(J1||{}),vb=class extends a0{exp;name;args;type;constructor(i,e,t,o,r,a,c){super(i,e,c),this.exp=t,this.name=o,this.args=r,this.type=a}visit(i,e=null){return i.visitPipe(this,e)}},ss=class extends ao{value;constructor(i,e,t){super(i,e),this.value=t}visit(i,e=null){return i.visitLiteralPrimitive(this,e)}},d0=class extends ao{expressions;constructor(i,e,t){super(i,e),this.expressions=t}visit(i,e=null){return i.visitLiteralArray(this,e)}},Cb=class extends ao{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitSpreadElement(this,e)}},vu=class extends ao{keys;values;constructor(i,e,t,o){super(i,e),this.keys=t,this.values=o}visit(i,e=null){return i.visitLiteralMap(this,e)}},K0=class extends ao{strings;expressions;constructor(i,e,t,o){super(i,e),this.strings=t,this.expressions=o}visit(i,e=null){return i.visitInterpolation(this,e)}},$a=class extends ao{operation;left;right;constructor(i,e,t,o,r){super(i,e),this.operation=t,this.left=o,this.right=r}visit(i,e=null){return i.visitBinary(this,e)}static isAssignmentOperation(i){return i==="="||i==="+="||i==="-="||i==="*="||i==="/="||i==="%="||i==="**="||i==="&&="||i==="||="||i==="??="}},Gh=class n extends $a{operator;expr;left=null;right=null;operation=null;static createMinus(i,e,t){return new n(i,e,"-",t,"-",new ss(i,e,0),t)}static createPlus(i,e,t){return new n(i,e,"+",t,"-",t,new ss(i,e,0))}constructor(i,e,t,o,r,a,c){super(i,e,r,a,c),this.operator=t,this.expr=o}visit(i,e=null){return i.visitUnary!==void 0?i.visitUnary(this,e):i.visitBinary(this,e)}},m0=class extends ao{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitPrefixNot(this,e)}},p0=class extends ao{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitTypeofExpression(this,e)}},u0=class extends ao{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitVoidExpression(this,e)}},h0=class extends ao{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitNonNullAssert(this,e)}},Jh=class extends ao{receiver;args;argumentSpan;constructor(i,e,t,o,r){super(i,e),this.receiver=t,this.args=o,this.argumentSpan=r}visit(i,e=null){return i.visitCall(this,e)}},bb=class extends ao{receiver;args;argumentSpan;constructor(i,e,t,o,r){super(i,e),this.receiver=t,this.args=o,this.argumentSpan=r}visit(i,e=null){return i.visitSafeCall(this,e)}},f0=class extends ao{tag;template;constructor(i,e,t,o){super(i,e),this.tag=t,this.template=o}visit(i,e){return i.visitTaggedTemplateLiteral(this,e)}},g0=class extends ao{elements;expressions;constructor(i,e,t,o){super(i,e),this.elements=t,this.expressions=o}visit(i,e){return i.visitTemplateLiteral(this,e)}},xb=class extends ao{text;constructor(i,e,t){super(i,e),this.text=t}visit(i,e){return i.visitTemplateLiteralElement(this,e)}},_0=class extends ao{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e){return i.visitParenthesizedExpression(this,e)}},DE=class{name;span;sourceSpan;constructor(i,e,t){this.name=i,this.span=e,this.sourceSpan=t}},yb=class extends ao{parameters;body;constructor(i,e,t,o){super(i,e),this.parameters=t,this.body=o}visit(i,e){return i.visitArrowFunction(this,e)}},Sb=class extends ao{body;flags;constructor(i,e,t,o){super(i,e),this.body=t,this.flags=o}visit(i,e){return i.visitRegularExpressionLiteral(this,e)}},Rs=class{start;end;constructor(i,e){this.start=i,this.end=e}},cs=class extends ao{ast;source;location;errors;constructor(i,e,t,o,r){super(new gu(0,e===null?0:e.length),new Rs(o,e===null?o:o+e.length)),this.ast=i,this.source=e,this.location=t,this.errors=r}visit(i,e=null){return i.visitASTWithSource?i.visitASTWithSource(this,e):this.ast.visit(i,e)}toString(){return`${this.source} in ${this.location}`}},v0=class{sourceSpan;key;value;constructor(i,e,t){this.sourceSpan=i,this.key=e,this.value=t}},PE=class{sourceSpan;key;value;constructor(i,e,t){this.sourceSpan=i,this.key=e,this.value=t}},ef=class{visit(i,e){i.visit(this,e)}visitUnary(i,e){this.visit(i.expr,e)}visitBinary(i,e){this.visit(i.left,e),this.visit(i.right,e)}visitChain(i,e){this.visitAll(i.expressions,e)}visitConditional(i,e){this.visit(i.condition,e),this.visit(i.trueExp,e),this.visit(i.falseExp,e)}visitPipe(i,e){this.visit(i.exp,e),this.visitAll(i.args,e)}visitImplicitReceiver(i,e){}visitThisReceiver(i,e){}visitInterpolation(i,e){this.visitAll(i.expressions,e)}visitKeyedRead(i,e){this.visit(i.receiver,e),this.visit(i.key,e)}visitLiteralArray(i,e){this.visitAll(i.expressions,e)}visitLiteralMap(i,e){this.visitAll(i.values,e)}visitLiteralPrimitive(i,e){}visitPrefixNot(i,e){this.visit(i.expression,e)}visitTypeofExpression(i,e){this.visit(i.expression,e)}visitVoidExpression(i,e){this.visit(i.expression,e)}visitNonNullAssert(i,e){this.visit(i.expression,e)}visitPropertyRead(i,e){this.visit(i.receiver,e)}visitSafePropertyRead(i,e){this.visit(i.receiver,e)}visitSafeKeyedRead(i,e){this.visit(i.receiver,e),this.visit(i.key,e)}visitCall(i,e){this.visit(i.receiver,e),this.visitAll(i.args,e)}visitSafeCall(i,e){this.visit(i.receiver,e),this.visitAll(i.args,e)}visitTemplateLiteral(i,e){for(let t=0;tt!==null);KT(i,e)}visitTriggers(i,e,t){KT(t,i.map(o=>e[o]))}},Db=class extends us{expression;groups;unknownBlocks;exhaustiveCheck;constructor(i,e,t,o,r,a,c,m){super(m,r,a,c),this.expression=i,this.groups=e,this.unknownBlocks=t,this.exhaustiveCheck=o}visit(i){return i.visitSwitchBlock(this)}},zE=class extends us{expression;constructor(i,e,t,o,r){super(r,e,t,o),this.expression=i}visit(i){return i.visitSwitchBlockCase(this)}},S0=class extends us{cases;children;i18n;constructor(i,e,t,o,r,a,c){super(a,t,o,r),this.cases=i,this.children=e,this.i18n=c}visit(i){return i.visitSwitchBlockCaseGroup(this)}},jE=class extends us{constructor(i,e,t,o){super(o,i,e,t)}visit(i){return i.visitSwitchExhaustiveCheck(this)}},of=class extends us{item;expression;trackBy;trackKeywordSpan;contextVariables;children;empty;mainBlockSpan;i18n;constructor(i,e,t,o,r,a,c,m,u,h,g,S,x){super(S,m,h,g),this.item=i,this.expression=e,this.trackBy=t,this.trackKeywordSpan=o,this.contextVariables=r,this.children=a,this.empty=c,this.mainBlockSpan=u,this.i18n=x}visit(i){return i.visitForLoopBlock(this)}},w0=class extends us{children;i18n;constructor(i,e,t,o,r,a){super(r,e,t,o),this.children=i,this.i18n=a}visit(i){return i.visitForLoopBlockEmpty(this)}},Pb=class extends us{branches;constructor(i,e,t,o,r){super(r,e,t,o),this.branches=i}visit(i){return i.visitIfBlock(this)}},ou=class extends us{expression;children;expressionAlias;i18n;constructor(i,e,t,o,r,a,c,m){super(c,o,r,a),this.expression=i,this.children=e,this.expressionAlias=t,this.i18n=m}visit(i){return i.visitIfBlockBranch(this)}},Ib=class{name;sourceSpan;nameSpan;constructor(i,e,t){this.name=i,this.sourceSpan=e,this.nameSpan=t}visit(i){return i.visitUnknownBlock(this)}},JD=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.nameSpan=o,this.valueSpan=r}visit(i){return i.visitLetDeclaration(this)}},G_=class{componentName;tagName;fullName;attributes;inputs;outputs;directives;children;references;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,t,o,r,a,c,m,u,h,g,S,x,C){this.componentName=i,this.tagName=e,this.fullName=t,this.attributes=o,this.inputs=r,this.outputs=a,this.directives=c,this.children=m,this.references=u,this.isSelfClosing=h,this.sourceSpan=g,this.startSourceSpan=S,this.endSourceSpan=x,this.i18n=C}visit(i){return i.visitComponent(this)}},b6=class{name;attributes;inputs;outputs;references;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,t,o,r,a,c,m,u){this.name=i,this.attributes=e,this.inputs=t,this.outputs=o,this.references=r,this.sourceSpan=a,this.startSourceSpan=c,this.endSourceSpan=m,this.i18n=u}visit(i){return i.visitDirective(this)}},Fs=class{tagName;attributes;inputs;outputs;directives;templateAttrs;children;references;variables;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,t,o,r,a,c,m,u,h,g,S,x,C){this.tagName=i,this.attributes=e,this.inputs=t,this.outputs=o,this.directives=r,this.templateAttrs=a,this.children=c,this.references=m,this.variables=u,this.isSelfClosing=h,this.sourceSpan=g,this.startSourceSpan=S,this.endSourceSpan=x,this.i18n=C}visit(i){return i.visitTemplate(this)}},rf=class{selector;attributes;children;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;name="ng-content";constructor(i,e,t,o,r,a,c,m){this.selector=i,this.attributes=e,this.children=t,this.isSelfClosing=o,this.sourceSpan=r,this.startSourceSpan=a,this.endSourceSpan=c,this.i18n=m}visit(i){return i.visitContent(this)}},Tm=class{name;value;sourceSpan;keySpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.keySpan=o,this.valueSpan=r}visit(i){return i.visitVariable(this)}},M0=class{name;value;sourceSpan;keySpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.keySpan=o,this.valueSpan=r}visit(i){return i.visitReference(this)}},x6=class{vars;placeholders;sourceSpan;i18n;constructor(i,e,t,o){this.vars=i,this.placeholders=e,this.sourceSpan=t,this.i18n=o}visit(i){return i.visitIcu(this)}},k0=class{tagNames;bindings;listeners;sourceSpan;constructor(i,e,t,o){if(this.tagNames=i,this.bindings=e,this.listeners=t,this.sourceSpan=o,i.length===0)throw new Error("HostElement must have at least one tag name.")}visit(){throw new Error("HostElement cannot be visited")}};function KT(n,i){let e=[];if(n.visit)for(let t of i)n.visit(t);else for(let t of i){let o=t.visit(n);o&&e.push(o)}return e}var Qa=class{nodes;placeholders;placeholderToMessage;meaning;description;customId;sources;id;legacyIds=[];messageString;constructor(i,e,t,o,r,a){this.nodes=i,this.placeholders=e,this.placeholderToMessage=t,this.meaning=o,this.description=r,this.customId=a,this.id=this.customId,this.messageString=xW(this.nodes),i.length?this.sources=[{filePath:i[0].sourceSpan.start.file.url,startLine:i[0].sourceSpan.start.line+1,startCol:i[0].sourceSpan.start.col+1,endLine:i[i.length-1].sourceSpan.end.line+1,endCol:i[0].sourceSpan.start.col+1}]:this.sources=[]}},D_=class{value;sourceSpan;constructor(i,e){this.value=i,this.sourceSpan=e}visit(i,e){return i.visitText(this,e)}},Ed=class{children;sourceSpan;constructor(i,e){this.children=i,this.sourceSpan=e}visit(i,e){return i.visitContainer(this,e)}},Ab=class{expression;type;cases;sourceSpan;expressionPlaceholder;constructor(i,e,t,o,r){this.expression=i,this.type=e,this.cases=t,this.sourceSpan=o,this.expressionPlaceholder=r}visit(i,e){return i.visitIcu(this,e)}},Em=class{tag;attrs;startName;closeName;children;isVoid;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c,m,u){this.tag=i,this.attrs=e,this.startName=t,this.closeName=o,this.children=r,this.isVoid=a,this.sourceSpan=c,this.startSourceSpan=m,this.endSourceSpan=u}visit(i,e){return i.visitTagPlaceholder(this,e)}},T0=class{value;name;sourceSpan;constructor(i,e,t){this.value=i,this.name=e,this.sourceSpan=t}visit(i,e){return i.visitPlaceholder(this,e)}},af=class{value;name;sourceSpan;previousMessage;constructor(i,e,t){this.value=i,this.name=e,this.sourceSpan=t}visit(i,e){return i.visitIcuPlaceholder(this,e)}},Dm=class{name;parameters;startName;closeName;children;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c,m){this.name=i,this.parameters=e,this.startName=t,this.closeName=o,this.children=r,this.sourceSpan=a,this.startSourceSpan=c,this.endSourceSpan=m}visit(i,e){return i.visitBlockPlaceholder(this,e)}};function xW(n){let i=new $E;return n.map(t=>t.visit(i)).join("")}var $E=class{visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){let e=Object.keys(i.cases).map(t=>`${t} {${i.cases[t].visit(this)}}`);return`{${i.expressionPlaceholder}, ${i.type}, ${e.join(" ")}}`}visitTagPlaceholder(i){let e=i.children.map(t=>t.visit(this)).join("");return`{$${i.startName}}${e}{$${i.closeName}}`}visitPlaceholder(i){return`{$${i.name}}`}visitIcuPlaceholder(i){return`{$${i.name}}`}visitBlockPlaceholder(i){let e=i.children.map(t=>t.visit(this)).join("");return`{$${i.startName}}${e}{$${i.closeName}}`}};var yW=class{visitTag(i){let e=this._serializeAttributes(i.attrs);if(i.children.length==0)return`<${i.name}${e}/>`;let t=i.children.map(o=>o.visit(this));return`<${i.name}${e}>${t.join("")}`}visitText(i){return i.value}visitDeclaration(i){return``}_serializeAttributes(i){let e=Object.keys(i).map(t=>`${t}="${i[t]}"`).join(" ");return e.length>0?" "+e:""}visitDoctype(i){return`=T$}var Ce="@angular/core",fe=(()=>{class n{static core={name:null,moduleName:Ce};static namespaceHTML={name:"\u0275\u0275namespaceHTML",moduleName:Ce};static namespaceMathML={name:"\u0275\u0275namespaceMathML",moduleName:Ce};static namespaceSVG={name:"\u0275\u0275namespaceSVG",moduleName:Ce};static element={name:"\u0275\u0275element",moduleName:Ce};static elementStart={name:"\u0275\u0275elementStart",moduleName:Ce};static elementEnd={name:"\u0275\u0275elementEnd",moduleName:Ce};static domElement={name:"\u0275\u0275domElement",moduleName:Ce};static domElementStart={name:"\u0275\u0275domElementStart",moduleName:Ce};static domElementEnd={name:"\u0275\u0275domElementEnd",moduleName:Ce};static domElementContainer={name:"\u0275\u0275domElementContainer",moduleName:Ce};static domElementContainerStart={name:"\u0275\u0275domElementContainerStart",moduleName:Ce};static domElementContainerEnd={name:"\u0275\u0275domElementContainerEnd",moduleName:Ce};static domTemplate={name:"\u0275\u0275domTemplate",moduleName:Ce};static domListener={name:"\u0275\u0275domListener",moduleName:Ce};static advance={name:"\u0275\u0275advance",moduleName:Ce};static syntheticHostProperty={name:"\u0275\u0275syntheticHostProperty",moduleName:Ce};static syntheticHostListener={name:"\u0275\u0275syntheticHostListener",moduleName:Ce};static attribute={name:"\u0275\u0275attribute",moduleName:Ce};static classProp={name:"\u0275\u0275classProp",moduleName:Ce};static elementContainerStart={name:"\u0275\u0275elementContainerStart",moduleName:Ce};static elementContainerEnd={name:"\u0275\u0275elementContainerEnd",moduleName:Ce};static elementContainer={name:"\u0275\u0275elementContainer",moduleName:Ce};static styleMap={name:"\u0275\u0275styleMap",moduleName:Ce};static classMap={name:"\u0275\u0275classMap",moduleName:Ce};static styleProp={name:"\u0275\u0275styleProp",moduleName:Ce};static interpolate={name:"\u0275\u0275interpolate",moduleName:Ce};static interpolate1={name:"\u0275\u0275interpolate1",moduleName:Ce};static interpolate2={name:"\u0275\u0275interpolate2",moduleName:Ce};static interpolate3={name:"\u0275\u0275interpolate3",moduleName:Ce};static interpolate4={name:"\u0275\u0275interpolate4",moduleName:Ce};static interpolate5={name:"\u0275\u0275interpolate5",moduleName:Ce};static interpolate6={name:"\u0275\u0275interpolate6",moduleName:Ce};static interpolate7={name:"\u0275\u0275interpolate7",moduleName:Ce};static interpolate8={name:"\u0275\u0275interpolate8",moduleName:Ce};static interpolateV={name:"\u0275\u0275interpolateV",moduleName:Ce};static nextContext={name:"\u0275\u0275nextContext",moduleName:Ce};static resetView={name:"\u0275\u0275resetView",moduleName:Ce};static templateCreate={name:"\u0275\u0275template",moduleName:Ce};static defer={name:"\u0275\u0275defer",moduleName:Ce};static deferWhen={name:"\u0275\u0275deferWhen",moduleName:Ce};static deferOnIdle={name:"\u0275\u0275deferOnIdle",moduleName:Ce};static deferOnImmediate={name:"\u0275\u0275deferOnImmediate",moduleName:Ce};static deferOnTimer={name:"\u0275\u0275deferOnTimer",moduleName:Ce};static deferOnHover={name:"\u0275\u0275deferOnHover",moduleName:Ce};static deferOnInteraction={name:"\u0275\u0275deferOnInteraction",moduleName:Ce};static deferOnViewport={name:"\u0275\u0275deferOnViewport",moduleName:Ce};static deferPrefetchWhen={name:"\u0275\u0275deferPrefetchWhen",moduleName:Ce};static deferPrefetchOnIdle={name:"\u0275\u0275deferPrefetchOnIdle",moduleName:Ce};static deferPrefetchOnImmediate={name:"\u0275\u0275deferPrefetchOnImmediate",moduleName:Ce};static deferPrefetchOnTimer={name:"\u0275\u0275deferPrefetchOnTimer",moduleName:Ce};static deferPrefetchOnHover={name:"\u0275\u0275deferPrefetchOnHover",moduleName:Ce};static deferPrefetchOnInteraction={name:"\u0275\u0275deferPrefetchOnInteraction",moduleName:Ce};static deferPrefetchOnViewport={name:"\u0275\u0275deferPrefetchOnViewport",moduleName:Ce};static deferHydrateWhen={name:"\u0275\u0275deferHydrateWhen",moduleName:Ce};static deferHydrateNever={name:"\u0275\u0275deferHydrateNever",moduleName:Ce};static deferHydrateOnIdle={name:"\u0275\u0275deferHydrateOnIdle",moduleName:Ce};static deferHydrateOnImmediate={name:"\u0275\u0275deferHydrateOnImmediate",moduleName:Ce};static deferHydrateOnTimer={name:"\u0275\u0275deferHydrateOnTimer",moduleName:Ce};static deferHydrateOnHover={name:"\u0275\u0275deferHydrateOnHover",moduleName:Ce};static deferHydrateOnInteraction={name:"\u0275\u0275deferHydrateOnInteraction",moduleName:Ce};static deferHydrateOnViewport={name:"\u0275\u0275deferHydrateOnViewport",moduleName:Ce};static deferEnableTimerScheduling={name:"\u0275\u0275deferEnableTimerScheduling",moduleName:Ce};static conditionalCreate={name:"\u0275\u0275conditionalCreate",moduleName:Ce};static conditionalBranchCreate={name:"\u0275\u0275conditionalBranchCreate",moduleName:Ce};static conditional={name:"\u0275\u0275conditional",moduleName:Ce};static repeater={name:"\u0275\u0275repeater",moduleName:Ce};static repeaterCreate={name:"\u0275\u0275repeaterCreate",moduleName:Ce};static repeaterTrackByIndex={name:"\u0275\u0275repeaterTrackByIndex",moduleName:Ce};static repeaterTrackByIdentity={name:"\u0275\u0275repeaterTrackByIdentity",moduleName:Ce};static componentInstance={name:"\u0275\u0275componentInstance",moduleName:Ce};static text={name:"\u0275\u0275text",moduleName:Ce};static enableBindings={name:"\u0275\u0275enableBindings",moduleName:Ce};static disableBindings={name:"\u0275\u0275disableBindings",moduleName:Ce};static getCurrentView={name:"\u0275\u0275getCurrentView",moduleName:Ce};static textInterpolate={name:"\u0275\u0275textInterpolate",moduleName:Ce};static textInterpolate1={name:"\u0275\u0275textInterpolate1",moduleName:Ce};static textInterpolate2={name:"\u0275\u0275textInterpolate2",moduleName:Ce};static textInterpolate3={name:"\u0275\u0275textInterpolate3",moduleName:Ce};static textInterpolate4={name:"\u0275\u0275textInterpolate4",moduleName:Ce};static textInterpolate5={name:"\u0275\u0275textInterpolate5",moduleName:Ce};static textInterpolate6={name:"\u0275\u0275textInterpolate6",moduleName:Ce};static textInterpolate7={name:"\u0275\u0275textInterpolate7",moduleName:Ce};static textInterpolate8={name:"\u0275\u0275textInterpolate8",moduleName:Ce};static textInterpolateV={name:"\u0275\u0275textInterpolateV",moduleName:Ce};static restoreView={name:"\u0275\u0275restoreView",moduleName:Ce};static pureFunction0={name:"\u0275\u0275pureFunction0",moduleName:Ce};static pureFunction1={name:"\u0275\u0275pureFunction1",moduleName:Ce};static pureFunction2={name:"\u0275\u0275pureFunction2",moduleName:Ce};static pureFunction3={name:"\u0275\u0275pureFunction3",moduleName:Ce};static pureFunction4={name:"\u0275\u0275pureFunction4",moduleName:Ce};static pureFunction5={name:"\u0275\u0275pureFunction5",moduleName:Ce};static pureFunction6={name:"\u0275\u0275pureFunction6",moduleName:Ce};static pureFunction7={name:"\u0275\u0275pureFunction7",moduleName:Ce};static pureFunction8={name:"\u0275\u0275pureFunction8",moduleName:Ce};static pureFunctionV={name:"\u0275\u0275pureFunctionV",moduleName:Ce};static pipeBind1={name:"\u0275\u0275pipeBind1",moduleName:Ce};static pipeBind2={name:"\u0275\u0275pipeBind2",moduleName:Ce};static pipeBind3={name:"\u0275\u0275pipeBind3",moduleName:Ce};static pipeBind4={name:"\u0275\u0275pipeBind4",moduleName:Ce};static pipeBindV={name:"\u0275\u0275pipeBindV",moduleName:Ce};static domProperty={name:"\u0275\u0275domProperty",moduleName:Ce};static ariaProperty={name:"\u0275\u0275ariaProperty",moduleName:Ce};static property={name:"\u0275\u0275property",moduleName:Ce};static control={name:"\u0275\u0275control",moduleName:Ce};static controlCreate={name:"\u0275\u0275controlCreate",moduleName:Ce};static animationEnterListener={name:"\u0275\u0275animateEnterListener",moduleName:Ce};static animationLeaveListener={name:"\u0275\u0275animateLeaveListener",moduleName:Ce};static animationEnter={name:"\u0275\u0275animateEnter",moduleName:Ce};static animationLeave={name:"\u0275\u0275animateLeave",moduleName:Ce};static i18n={name:"\u0275\u0275i18n",moduleName:Ce};static i18nAttributes={name:"\u0275\u0275i18nAttributes",moduleName:Ce};static i18nExp={name:"\u0275\u0275i18nExp",moduleName:Ce};static i18nStart={name:"\u0275\u0275i18nStart",moduleName:Ce};static i18nEnd={name:"\u0275\u0275i18nEnd",moduleName:Ce};static i18nApply={name:"\u0275\u0275i18nApply",moduleName:Ce};static i18nPostprocess={name:"\u0275\u0275i18nPostprocess",moduleName:Ce};static pipe={name:"\u0275\u0275pipe",moduleName:Ce};static projection={name:"\u0275\u0275projection",moduleName:Ce};static projectionDef={name:"\u0275\u0275projectionDef",moduleName:Ce};static reference={name:"\u0275\u0275reference",moduleName:Ce};static inject={name:"\u0275\u0275inject",moduleName:Ce};static injectAttribute={name:"\u0275\u0275injectAttribute",moduleName:Ce};static directiveInject={name:"\u0275\u0275directiveInject",moduleName:Ce};static invalidFactory={name:"\u0275\u0275invalidFactory",moduleName:Ce};static invalidFactoryDep={name:"\u0275\u0275invalidFactoryDep",moduleName:Ce};static templateRefExtractor={name:"\u0275\u0275templateRefExtractor",moduleName:Ce};static forwardRef={name:"forwardRef",moduleName:Ce};static resolveForwardRef={name:"resolveForwardRef",moduleName:Ce};static replaceMetadata={name:"\u0275\u0275replaceMetadata",moduleName:Ce};static getReplaceMetadataURL={name:"\u0275\u0275getReplaceMetadataURL",moduleName:Ce};static \u0275\u0275defineInjectable={name:"\u0275\u0275defineInjectable",moduleName:Ce};static declareInjectable={name:"\u0275\u0275ngDeclareInjectable",moduleName:Ce};static InjectableDeclaration={name:"\u0275\u0275InjectableDeclaration",moduleName:Ce};static resolveWindow={name:"\u0275\u0275resolveWindow",moduleName:Ce};static resolveDocument={name:"\u0275\u0275resolveDocument",moduleName:Ce};static resolveBody={name:"\u0275\u0275resolveBody",moduleName:Ce};static getComponentDepsFactory={name:"\u0275\u0275getComponentDepsFactory",moduleName:Ce};static defineComponent={name:"\u0275\u0275defineComponent",moduleName:Ce};static declareComponent={name:"\u0275\u0275ngDeclareComponent",moduleName:Ce};static setComponentScope={name:"\u0275\u0275setComponentScope",moduleName:Ce};static ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:Ce};static ViewEncapsulation={name:"ViewEncapsulation",moduleName:Ce};static ComponentDeclaration={name:"\u0275\u0275ComponentDeclaration",moduleName:Ce};static FactoryDeclaration={name:"\u0275\u0275FactoryDeclaration",moduleName:Ce};static declareFactory={name:"\u0275\u0275ngDeclareFactory",moduleName:Ce};static FactoryTarget={name:"\u0275\u0275FactoryTarget",moduleName:Ce};static defineDirective={name:"\u0275\u0275defineDirective",moduleName:Ce};static declareDirective={name:"\u0275\u0275ngDeclareDirective",moduleName:Ce};static DirectiveDeclaration={name:"\u0275\u0275DirectiveDeclaration",moduleName:Ce};static InjectorDef={name:"\u0275\u0275InjectorDef",moduleName:Ce};static InjectorDeclaration={name:"\u0275\u0275InjectorDeclaration",moduleName:Ce};static defineInjector={name:"\u0275\u0275defineInjector",moduleName:Ce};static declareInjector={name:"\u0275\u0275ngDeclareInjector",moduleName:Ce};static NgModuleDeclaration={name:"\u0275\u0275NgModuleDeclaration",moduleName:Ce};static ModuleWithProviders={name:"ModuleWithProviders",moduleName:Ce};static defineNgModule={name:"\u0275\u0275defineNgModule",moduleName:Ce};static declareNgModule={name:"\u0275\u0275ngDeclareNgModule",moduleName:Ce};static setNgModuleScope={name:"\u0275\u0275setNgModuleScope",moduleName:Ce};static registerNgModuleType={name:"\u0275\u0275registerNgModuleType",moduleName:Ce};static PipeDeclaration={name:"\u0275\u0275PipeDeclaration",moduleName:Ce};static definePipe={name:"\u0275\u0275definePipe",moduleName:Ce};static declarePipe={name:"\u0275\u0275ngDeclarePipe",moduleName:Ce};static declareClassMetadata={name:"\u0275\u0275ngDeclareClassMetadata",moduleName:Ce};static declareClassMetadataAsync={name:"\u0275\u0275ngDeclareClassMetadataAsync",moduleName:Ce};static setClassMetadata={name:"\u0275setClassMetadata",moduleName:Ce};static setClassMetadataAsync={name:"\u0275setClassMetadataAsync",moduleName:Ce};static setClassDebugInfo={name:"\u0275setClassDebugInfo",moduleName:Ce};static queryRefresh={name:"\u0275\u0275queryRefresh",moduleName:Ce};static viewQuery={name:"\u0275\u0275viewQuery",moduleName:Ce};static loadQuery={name:"\u0275\u0275loadQuery",moduleName:Ce};static contentQuery={name:"\u0275\u0275contentQuery",moduleName:Ce};static viewQuerySignal={name:"\u0275\u0275viewQuerySignal",moduleName:Ce};static contentQuerySignal={name:"\u0275\u0275contentQuerySignal",moduleName:Ce};static queryAdvance={name:"\u0275\u0275queryAdvance",moduleName:Ce};static twoWayProperty={name:"\u0275\u0275twoWayProperty",moduleName:Ce};static twoWayBindingSet={name:"\u0275\u0275twoWayBindingSet",moduleName:Ce};static twoWayListener={name:"\u0275\u0275twoWayListener",moduleName:Ce};static declareLet={name:"\u0275\u0275declareLet",moduleName:Ce};static storeLet={name:"\u0275\u0275storeLet",moduleName:Ce};static readContextLet={name:"\u0275\u0275readContextLet",moduleName:Ce};static arrowFunction={name:"\u0275\u0275arrowFunction",moduleName:Ce};static attachSourceLocations={name:"\u0275\u0275attachSourceLocations",moduleName:Ce};static NgOnChangesFeature={name:"\u0275\u0275NgOnChangesFeature",moduleName:Ce};static ControlFeature={name:"\u0275\u0275ControlFeature",moduleName:Ce};static InheritDefinitionFeature={name:"\u0275\u0275InheritDefinitionFeature",moduleName:Ce};static ProvidersFeature={name:"\u0275\u0275ProvidersFeature",moduleName:Ce};static HostDirectivesFeature={name:"\u0275\u0275HostDirectivesFeature",moduleName:Ce};static ExternalStylesFeature={name:"\u0275\u0275ExternalStylesFeature",moduleName:Ce};static listener={name:"\u0275\u0275listener",moduleName:Ce};static getInheritedFactory={name:"\u0275\u0275getInheritedFactory",moduleName:Ce};static sanitizeHtml={name:"\u0275\u0275sanitizeHtml",moduleName:Ce};static sanitizeStyle={name:"\u0275\u0275sanitizeStyle",moduleName:Ce};static validateAttribute={name:"\u0275\u0275validateAttribute",moduleName:Ce};static sanitizeResourceUrl={name:"\u0275\u0275sanitizeResourceUrl",moduleName:Ce};static sanitizeScript={name:"\u0275\u0275sanitizeScript",moduleName:Ce};static sanitizeUrl={name:"\u0275\u0275sanitizeUrl",moduleName:Ce};static sanitizeUrlOrResourceUrl={name:"\u0275\u0275sanitizeUrlOrResourceUrl",moduleName:Ce};static trustConstantHtml={name:"\u0275\u0275trustConstantHtml",moduleName:Ce};static trustConstantResourceUrl={name:"\u0275\u0275trustConstantResourceUrl",moduleName:Ce};static inputDecorator={name:"Input",moduleName:Ce};static outputDecorator={name:"Output",moduleName:Ce};static viewChildDecorator={name:"ViewChild",moduleName:Ce};static viewChildrenDecorator={name:"ViewChildren",moduleName:Ce};static contentChildDecorator={name:"ContentChild",moduleName:Ce};static contentChildrenDecorator={name:"ContentChildren",moduleName:Ce};static InputSignalBrandWriteType={name:"\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE",moduleName:Ce};static UnwrapDirectiveSignalInputs={name:"\u0275UnwrapDirectiveSignalInputs",moduleName:Ce};static unwrapWritableSignal={name:"\u0275unwrapWritableSignal",moduleName:Ce};static assertType={name:"\u0275assertType",moduleName:Ce}}return n})(),E$=/-+([a-z0-9])/g;function D$(n){return n.replace(E$,(...i)=>i[1].toUpperCase())}function P$(n,i){return GN(n,":",i)}function I$(n,i){return GN(n,".",i)}function GN(n,i,e){let t=n.indexOf(i);return t==-1?e:[n.slice(0,t).trim(),n.slice(t+1).trim()]}function A$(n){let i=[];for(let e=0;e=55296&&t<=56319&&n.length>e+1){let o=n.charCodeAt(e+1);o>=56320&&o<=57343&&(e++,t=(t-55296<<10)+o-56320+65536)}t<=127?i.push(t):t<=2047?i.push(t>>6&31|192,t&63|128):t<=65535?i.push(t>>12|224,t>>6&63|128,t&63|128):t<=2097151&&i.push(t>>18&7|240,t>>12&63|128,t>>6&63|128,t&63|128)}return i}function WN(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(WN).join(", ")}]`;if(n==null)return""+n;let i=n.overriddenName||n.name;if(i)return`${i}`;if(!n.toString)return"object";let e=n.toString();if(e==null)return""+e;let t=e.indexOf(` +`);return t>=0?e.slice(0,t):e}var jk=class{full;major;minor;patch;constructor(i){this.full=i;let e=i.split(".");this.major=e[0],this.minor=e[1],this.patch=e.slice(2).join(".")}},Jg=globalThis,O$=/^([1-9]|1[0-8])\./;function qN(n){return n.startsWith("0.")?!0:!O$.test(n)}var N$=3,F$="# sourceMappingURL=data:application/json;base64,",$k=class{file;sourcesContent=new Map;lines=[];lastCol0=0;hasMappings=!1;constructor(i=null){this.file=i}addSource(i,e=null){return this.sourcesContent.has(i)||this.sourcesContent.set(i,e),this}addLine(){return this.lines.push([]),this.lastCol0=0,this}addMapping(i,e,t,o){if(!this.currentLine)throw new Error("A line must be added before mappings can be added");if(e!=null&&!this.sourcesContent.has(e))throw new Error(`Unknown source file "${e}"`);if(i==null)throw new Error("The column in the generated code must be provided");if(i{i.set(u,h),e.push(u),t.push(this.sourcesContent.get(u)||null)});let o="",r=0,a=0,c=0,p=0;return this.lines.forEach(u=>{r=0,o+=u.map(h=>{let _=PC(h.col0-r);return r=h.col0,h.sourceUrl!=null&&(_+=PC(i.get(h.sourceUrl)-a),a=i.get(h.sourceUrl),_+=PC(h.sourceLine0-c),c=h.sourceLine0,_+=PC(h.sourceCol0-p),p=h.sourceCol0),_}).join(","),o+=";"}),o=o.slice(0,-1),{file:this.file||"",version:N$,sourceRoot:"",sources:e,sourcesContent:t,mappings:o}}toJsComment(){return this.hasMappings?"//"+F$+R$(JSON.stringify(this,null,0)):""}};function R$(n){let i="",e=A$(n);for(let t=0;t>2),i+=Qg((o&3)<<4|(r===null?0:r>>4)),i+=r===null?"=":Qg((r&15)<<2|(a===null?0:a>>6)),i+=r===null||a===null?"=":Qg(a&63)}return i}function PC(n){n=n<0?(-n<<1)+1:n<<1;let i="";do{let e=n&31;n=n>>5,n>0&&(e=e|32),i+=Qg(e)}while(n>0);return i}var L$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Qg(n){if(n<0||n>=64)throw new Error("Can only encode value in the range [0, 63]");return L$[n]}var V$=/'|\\|\n|\r|\$/g,B$=/^[$A-Z_][0-9A-Z_$]*$/i,Hk=" ",r1=class{indent;partsLength=0;parts=[];srcSpans=[];constructor(i){this.indent=i}},z$=new Map([[st.And,"&&"],[st.Bigger,">"],[st.BiggerEquals,">="],[st.BitwiseOr,"|"],[st.BitwiseAnd,"&"],[st.Divide,"/"],[st.Assign,"="],[st.Equals,"=="],[st.Identical,"==="],[st.Lower,"<"],[st.LowerEquals,"<="],[st.Minus,"-"],[st.Modulo,"%"],[st.Exponentiation,"**"],[st.Multiply,"*"],[st.NotEquals,"!="],[st.NotIdentical,"!=="],[st.NullishCoalesce,"??"],[st.Or,"||"],[st.Plus,"+"],[st.In,"in"],[st.InstanceOf,"instanceof"],[st.AdditionAssignment,"+="],[st.SubtractionAssignment,"-="],[st.MultiplicationAssignment,"*="],[st.DivisionAssignment,"/="],[st.RemainderAssignment,"%="],[st.ExponentiationAssignment,"**="],[st.AndAssignment,"&&="],[st.OrAssignment,"||="],[st.NullishCoalesceAssignment,"??="]]),Uk=class n{_indent;static createRoot(){return new n(0)}_lines;constructor(i){this._indent=i,this._lines=[new r1(i)]}get _currentLine(){return this._lines[this._lines.length-1]}println(i,e=""){this.print(i||null,e,!0)}lineIsEmpty(){return this._currentLine.parts.length===0}lineLength(){return this._currentLine.indent*Hk.length+this._currentLine.partsLength}print(i,e,t=!1){e.length>0&&(this._currentLine.parts.push(e),this._currentLine.partsLength+=e.length,this._currentLine.srcSpans.push(i&&i.sourceSpan||null)),t&&this._lines.push(new r1(this._indent))}removeEmptyLastLine(){this.lineIsEmpty()&&this._lines.pop()}incIndent(){this._indent++,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}decIndent(){this._indent--,this.lineIsEmpty()&&(this._currentLine.indent=this._indent)}toSource(){return this.sourceLines.map(i=>i.parts.length>0?i5(i.indent)+i.parts.join(""):"").join(` +`)}toSourceMapGenerator(i,e=0){let t=new $k(i),o=!1,r=()=>{o||(t.addSource(i," ").addMapping(0,i,0,0),o=!0)};for(let a=0;a{t.addLine();let p=a.srcSpans,u=a.parts,h=a.indent*Hk.length,_=0;for(;_o)return t.srcSpans[r];o-=a.length}}return null}get sourceLines(){return this._lines.length&&this._lines[this._lines.length-1].parts.length===0?this._lines.slice(0,-1):this._lines}},Gk=class{_escapeDollarInStrings;lastIfCondition=null;constructor(i){this._escapeDollarInStrings=i}printLeadingComments(i,e){if(i.leadingComments!==void 0)for(let t of i.leadingComments)t instanceof t1?e.print(i,`/*${t.toString()}*/`,t.trailingNewline):t.multiline?e.print(i,`/* ${t.text} */`,t.trailingNewline):t.text.split(` +`).forEach(o=>{e.println(i,`// ${o}`)})}visitExpressionStmt(i,e){return this.printLeadingComments(i,e),i.expr.visitExpression(this,e),e.println(i,";"),null}visitReturnStmt(i,e){return this.printLeadingComments(i,e),e.print(i,"return "),i.value.visitExpression(this,e),e.println(i,";"),null}visitIfStmt(i,e){this.printLeadingComments(i,e),e.print(i,"if ("),this.lastIfCondition=i.condition,i.condition.visitExpression(this,e),this.lastIfCondition=null,e.print(i,") {");let t=i.falseCase!=null&&i.falseCase.length>0;return i.trueCase.length<=1&&!t?(e.print(i," "),this.visitAllStatements(i.trueCase,e),e.removeEmptyLastLine(),e.print(i," ")):(e.println(),e.incIndent(),this.visitAllStatements(i.trueCase,e),e.decIndent(),t&&(e.println(i,"} else {"),e.incIndent(),this.visitAllStatements(i.falseCase,e),e.decIndent())),e.println(i,"}"),null}visitInvokeFunctionExpr(i,e){let t=i.fn instanceof eu;return t&&e.print(i.fn,"("),i.fn.visitExpression(this,e),t&&e.print(i.fn,")"),e.print(i,"("),this.visitAllExpressions(i.args,e,","),e.print(i,")"),null}visitTaggedTemplateLiteralExpr(i,e){return i.tag.visitExpression(this,e),i.template.visitExpression(this,e),null}visitTemplateLiteralExpr(i,e){e.print(i,"`");for(let t=0;t{t instanceof rm?(e.print(i,"..."),t.expression.visitExpression(this,e)):(e.print(i,`${Tp(t.key,this._escapeDollarInStrings,t.quoted)}:`),t.value.visitExpression(this,e))},i.entries,e,","),e.print(i,"}"),null}visitCommaExpr(i,e){return e.print(i,"("),this.visitAllExpressions(i.parts,e,","),e.print(i,")"),null}visitParenthesizedExpr(i,e){i.expr.visitExpression(this,e)}visitSpreadElementExpr(i,e){e.print(i,"..."),i.expression.visitExpression(this,e)}visitAllExpressions(i,e,t){this.visitAllObjects(o=>o.visitExpression(this,e),i,e,t)}visitAllObjects(i,e,t,o){let r=!1;for(let a=0;a0&&(t.lineLength()>80?(t.print(null,o,!0),r||(t.incIndent(),t.incIndent(),r=!0)):t.print(null,o,!1)),i(e[a]);r&&(t.decIndent(),t.decIndent())}visitAllStatements(i,e){i.forEach(t=>t.visitStatement(this,e))}};function Tp(n,i,e=!0){if(n==null)return null;let t=n.replace(V$,(...r)=>r[0]=="$"?i?"\\$":"$":r[0]==` +`?"\\n":r[0]=="\r"?"\\r":`\\${r[0]}`);return e||!B$.test(t)?`'${t}'`:t}function i5(n){let i="";for(let e=0;et.value));return i?Ds([],e):e}function fE(n,i){return{expression:n,forwardRef:i}}function U$({expression:n,forwardRef:i}){switch(i){case 0:case 1:return n;case 2:return G$(n)}}function G$(n){return Ut(fe.forwardRef).callFn([Ds([],n)])}var a1=(function(n){return n[n.Class=0]="Class",n[n.Function=1]="Function",n})(a1||{});function wp(n){let i=Yn("__ngFactoryType__"),e=null,t=r5(n)?i:new gi(st.Or,i,n.type.value),o=null;n.deps!==null?n.deps!=="invalid"&&(o=new d_(t,o5(n.deps,n.target))):(e=Yn(`\u0275${n.name}_BaseFactory`),o=e.callFn([t]));let r=[],a=null;function c(u){let h=Yn("__ngConditionalFactory__");r.push(new Rr(h.name,yh,Ol));let _=o!==null?h.set(o).toStmt():Ut(fe.invalidFactory).callFn([]).toStmt();return r.push(tb(i,[_],[h.set(u).toStmt()])),h}if(r5(n)){let u=o5(n.delegateDeps,n.target),h=new(n.delegateType===a1.Class?d_:os)(n.delegate,u);a=c(h)}else K$(n)?a=c(n.expression):a=o;if(a===null)r.push(Ut(fe.invalidFactory).callFn([]).toStmt());else if(e!==null){let u=Ut(fe.getInheritedFactory).callFn([n.type.value]),h=new gi(st.Or,e,e.set(u));r.push(new xr(h.callFn([t])))}else r.push(new xr(a));let p=am([new br(i.name,is)],r,Ol,void 0,`${n.name}_Factory`);return e!==null&&(p=Ds([],[new Rr(e.name),new xr(p)]).callFn([],void 0,!0)),{expression:p,statements:[],type:W$(n)}}function W$(n){let i=n.deps!==null&&n.deps!=="invalid"?Q$(n.deps):yc;return ra(Ut(fe.FactoryDeclaration,[nb(n.type.type,n.typeArgumentCount),i]))}function o5(n,i){return n.map((e,t)=>q$(e,i,t))}function q$(n,i,e){if(n.token===null)return Ut(fe.invalidFactoryDep).callFn([Te(e)]);if(n.attributeNameType===null){let t=0|(n.self?2:0)|(n.skipSelf?4:0)|(n.host?1:0)|(n.optional?8:0)|(i===gd.Pipe?16:0),o=t!==0||n.optional?Te(t):null,r=[n.token];o&&r.push(o);let a=Y$(i);return Ut(a).callFn(r)}else return Ut(fe.injectAttribute).callFn([n.token])}function Q$(n){let i=!1,e=n.map(t=>{let o=X$(t);return o!==null?(i=!0,o):Te(null)});return i?ra(Gi(e)):yc}function X$(n){let i=[];return n.attributeNameType!==null&&i.push({key:"attribute",value:n.attributeNameType,quoted:!1}),n.optional&&i.push({key:"optional",value:Te(!0),quoted:!1}),n.host&&i.push({key:"host",value:Te(!0),quoted:!1}),n.self&&i.push({key:"self",value:Te(!0),quoted:!1}),n.skipSelf&&i.push({key:"skipSelf",value:Te(!0),quoted:!1}),i.length>0?nl(i):null}function r5(n){return n.delegateType!==void 0}function K$(n){return n.expression!==void 0}function Y$(n){switch(n){case gd.Component:case gd.Directive:case gd.Pipe:return fe.directiveInject;case gd.NgModule:case gd.Injectable:default:return fe.inject}}var Up=class{start;end;constructor(i,e){this.start=i,this.end=e}toAbsolute(i){return new Ms(i+this.start,i+this.end)}},to=class{span;sourceSpan;constructor(i,e){this.span=i,this.sourceSpan=e}toString(){return"AST"}},f_=class extends to{nameSpan;constructor(i,e,t){super(i,e),this.nameSpan=t}},_a=class extends to{visit(i,e=null){return i.visitEmptyExpr?.(this,e)}},Mc=class extends to{visit(i,e=null){return i.visitImplicitReceiver(this,e)}},g_=class extends to{visit(i,e=null){return i.visitThisReceiver?.(this,e)}},Sh=class extends to{expressions;constructor(i,e,t){super(i,e),this.expressions=t}visit(i,e=null){return i.visitChain(this,e)}},s1=class extends to{condition;trueExp;falseExp;constructor(i,e,t,o,r){super(i,e),this.condition=t,this.trueExp=o,this.falseExp=r}visit(i,e=null){return i.visitConditional(this,e)}},Cc=class extends f_{receiver;name;constructor(i,e,t,o,r){super(i,e,t),this.receiver=o,this.name=r}visit(i,e=null){return i.visitPropertyRead(this,e)}},__=class extends f_{receiver;name;constructor(i,e,t,o,r){super(i,e,t),this.receiver=o,this.name=r}visit(i,e=null){return i.visitSafePropertyRead(this,e)}},Gp=class extends to{receiver;key;constructor(i,e,t,o){super(i,e),this.receiver=t,this.key=o}visit(i,e=null){return i.visitKeyedRead(this,e)}},v_=class extends to{receiver;key;constructor(i,e,t,o){super(i,e),this.receiver=t,this.key=o}visit(i,e=null){return i.visitSafeKeyedRead(this,e)}},HC=(function(n){return n[n.ReferencedByName=0]="ReferencedByName",n[n.ReferencedDirectly=1]="ReferencedDirectly",n})(HC||{}),l1=class extends f_{exp;name;args;type;constructor(i,e,t,o,r,a,c){super(i,e,c),this.exp=t,this.name=o,this.args=r,this.type=a}visit(i,e=null){return i.visitPipe(this,e)}},Ja=class extends to{value;constructor(i,e,t){super(i,e),this.value=t}visit(i,e=null){return i.visitLiteralPrimitive(this,e)}},C_=class extends to{expressions;constructor(i,e,t){super(i,e),this.expressions=t}visit(i,e=null){return i.visitLiteralArray(this,e)}},c1=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitSpreadElement(this,e)}},Wp=class extends to{keys;values;constructor(i,e,t,o){super(i,e),this.keys=t,this.values=o}visit(i,e=null){return i.visitLiteralMap(this,e)}},a0=class extends to{strings;expressions;constructor(i,e,t,o){super(i,e),this.strings=t,this.expressions=o}visit(i,e=null){return i.visitInterpolation(this,e)}},Na=class extends to{operation;left;right;constructor(i,e,t,o,r){super(i,e),this.operation=t,this.left=o,this.right=r}visit(i,e=null){return i.visitBinary(this,e)}static isAssignmentOperation(i){return i==="="||i==="+="||i==="-="||i==="*="||i==="/="||i==="%="||i==="**="||i==="&&="||i==="||="||i==="??="}},gh=class n extends Na{operator;expr;left=null;right=null;operation=null;static createMinus(i,e,t){return new n(i,e,"-",t,"-",new Ja(i,e,0),t)}static createPlus(i,e,t){return new n(i,e,"+",t,"-",t,new Ja(i,e,0))}constructor(i,e,t,o,r,a,c){super(i,e,r,a,c),this.operator=t,this.expr=o}visit(i,e=null){return i.visitUnary!==void 0?i.visitUnary(this,e):i.visitBinary(this,e)}},b_=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitPrefixNot(this,e)}},x_=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitTypeofExpression(this,e)}},y_=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitVoidExpression(this,e)}},S_=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e=null){return i.visitNonNullAssert(this,e)}},wh=class extends to{receiver;args;argumentSpan;constructor(i,e,t,o,r){super(i,e),this.receiver=t,this.args=o,this.argumentSpan=r}visit(i,e=null){return i.visitCall(this,e)}},d1=class extends to{receiver;args;argumentSpan;constructor(i,e,t,o,r){super(i,e),this.receiver=t,this.args=o,this.argumentSpan=r}visit(i,e=null){return i.visitSafeCall(this,e)}},w_=class extends to{tag;template;constructor(i,e,t,o){super(i,e),this.tag=t,this.template=o}visit(i,e){return i.visitTaggedTemplateLiteral(this,e)}},M_=class extends to{elements;expressions;constructor(i,e,t,o){super(i,e),this.elements=t,this.expressions=o}visit(i,e){return i.visitTemplateLiteral(this,e)}},m1=class extends to{text;constructor(i,e,t){super(i,e),this.text=t}visit(i,e){return i.visitTemplateLiteralElement(this,e)}},k_=class extends to{expression;constructor(i,e,t){super(i,e),this.expression=t}visit(i,e){return i.visitParenthesizedExpression(this,e)}},Wk=class{name;span;sourceSpan;constructor(i,e,t){this.name=i,this.span=e,this.sourceSpan=t}},p1=class extends to{parameters;body;constructor(i,e,t,o){super(i,e),this.parameters=t,this.body=o}visit(i,e){return i.visitArrowFunction(this,e)}},u1=class extends to{body;flags;constructor(i,e,t,o){super(i,e),this.body=t,this.flags=o}visit(i,e){return i.visitRegularExpressionLiteral(this,e)}},Ms=class{start;end;constructor(i,e){this.start=i,this.end=e}},ts=class extends to{ast;source;location;errors;constructor(i,e,t,o,r){super(new Up(0,e===null?0:e.length),new Ms(o,e===null?o:o+e.length)),this.ast=i,this.source=e,this.location=t,this.errors=r}visit(i,e=null){return i.visitASTWithSource?i.visitASTWithSource(this,e):this.ast.visit(i,e)}toString(){return`${this.source} in ${this.location}`}},T_=class{sourceSpan;key;value;constructor(i,e,t){this.sourceSpan=i,this.key=e,this.value=t}},qk=class{sourceSpan;key;value;constructor(i,e,t){this.sourceSpan=i,this.key=e,this.value=t}},Mh=class{visit(i,e){i.visit(this,e)}visitUnary(i,e){this.visit(i.expr,e)}visitBinary(i,e){this.visit(i.left,e),this.visit(i.right,e)}visitChain(i,e){this.visitAll(i.expressions,e)}visitConditional(i,e){this.visit(i.condition,e),this.visit(i.trueExp,e),this.visit(i.falseExp,e)}visitPipe(i,e){this.visit(i.exp,e),this.visitAll(i.args,e)}visitImplicitReceiver(i,e){}visitThisReceiver(i,e){}visitInterpolation(i,e){this.visitAll(i.expressions,e)}visitKeyedRead(i,e){this.visit(i.receiver,e),this.visit(i.key,e)}visitLiteralArray(i,e){this.visitAll(i.expressions,e)}visitLiteralMap(i,e){this.visitAll(i.values,e)}visitLiteralPrimitive(i,e){}visitPrefixNot(i,e){this.visit(i.expression,e)}visitTypeofExpression(i,e){this.visit(i.expression,e)}visitVoidExpression(i,e){this.visit(i.expression,e)}visitNonNullAssert(i,e){this.visit(i.expression,e)}visitPropertyRead(i,e){this.visit(i.receiver,e)}visitSafePropertyRead(i,e){this.visit(i.receiver,e)}visitSafeKeyedRead(i,e){this.visit(i.receiver,e),this.visit(i.key,e)}visitCall(i,e){this.visit(i.receiver,e),this.visitAll(i.args,e)}visitSafeCall(i,e){this.visit(i.receiver,e),this.visitAll(i.args,e)}visitTemplateLiteral(i,e){for(let t=0;tt!==null);hk(i,e)}visitTriggers(i,e,t){hk(t,i.map(o=>e[o]))}},C1=class extends rs{expression;groups;unknownBlocks;exhaustiveCheck;constructor(i,e,t,o,r,a,c,p){super(p,r,a,c),this.expression=i,this.groups=e,this.unknownBlocks=t,this.exhaustiveCheck=o}visit(i){return i.visitSwitchBlock(this)}},iT=class extends rs{expression;constructor(i,e,t,o,r){super(r,e,t,o),this.expression=i}visit(i){return i.visitSwitchBlockCase(this)}},A_=class extends rs{cases;children;i18n;constructor(i,e,t,o,r,a,c){super(a,t,o,r),this.cases=i,this.children=e,this.i18n=c}visit(i){return i.visitSwitchBlockCaseGroup(this)}},oT=class extends rs{constructor(i,e,t,o){super(o,i,e,t)}visit(i){return i.visitSwitchExhaustiveCheck(this)}},Eh=class extends rs{item;expression;trackBy;trackKeywordSpan;contextVariables;children;empty;mainBlockSpan;i18n;constructor(i,e,t,o,r,a,c,p,u,h,_,S,x){super(S,p,h,_),this.item=i,this.expression=e,this.trackBy=t,this.trackKeywordSpan=o,this.contextVariables=r,this.children=a,this.empty=c,this.mainBlockSpan=u,this.i18n=x}visit(i){return i.visitForLoopBlock(this)}},O_=class extends rs{children;i18n;constructor(i,e,t,o,r,a){super(r,e,t,o),this.children=i,this.i18n=a}visit(i){return i.visitForLoopBlockEmpty(this)}},b1=class extends rs{branches;constructor(i,e,t,o,r){super(r,e,t,o),this.branches=i}visit(i){return i.visitIfBlock(this)}},Ap=class extends rs{expression;children;expressionAlias;i18n;constructor(i,e,t,o,r,a,c,p){super(c,o,r,a),this.expression=i,this.children=e,this.expressionAlias=t,this.i18n=p}visit(i){return i.visitIfBlockBranch(this)}},x1=class{name;sourceSpan;nameSpan;constructor(i,e,t){this.name=i,this.sourceSpan=e,this.nameSpan=t}visit(i){return i.visitUnknownBlock(this)}},gE=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.nameSpan=o,this.valueSpan=r}visit(i){return i.visitLetDeclaration(this)}},e_=class{componentName;tagName;fullName;attributes;inputs;outputs;directives;children;references;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,t,o,r,a,c,p,u,h,_,S,x,b){this.componentName=i,this.tagName=e,this.fullName=t,this.attributes=o,this.inputs=r,this.outputs=a,this.directives=c,this.children=p,this.references=u,this.isSelfClosing=h,this.sourceSpan=_,this.startSourceSpan=S,this.endSourceSpan=x,this.i18n=b}visit(i){return i.visitComponent(this)}},QN=class{name;attributes;inputs;outputs;references;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,t,o,r,a,c,p,u){this.name=i,this.attributes=e,this.inputs=t,this.outputs=o,this.references=r,this.sourceSpan=a,this.startSourceSpan=c,this.endSourceSpan=p,this.i18n=u}visit(i){return i.visitDirective(this)}},ks=class{tagName;attributes;inputs;outputs;directives;templateAttrs;children;references;variables;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;constructor(i,e,t,o,r,a,c,p,u,h,_,S,x,b){this.tagName=i,this.attributes=e,this.inputs=t,this.outputs=o,this.directives=r,this.templateAttrs=a,this.children=c,this.references=p,this.variables=u,this.isSelfClosing=h,this.sourceSpan=_,this.startSourceSpan=S,this.endSourceSpan=x,this.i18n=b}visit(i){return i.visitTemplate(this)}},Dh=class{selector;attributes;children;isSelfClosing;sourceSpan;startSourceSpan;endSourceSpan;i18n;name="ng-content";constructor(i,e,t,o,r,a,c,p){this.selector=i,this.attributes=e,this.children=t,this.isSelfClosing=o,this.sourceSpan=r,this.startSourceSpan=a,this.endSourceSpan=c,this.i18n=p}visit(i){return i.visitContent(this)}},sm=class{name;value;sourceSpan;keySpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.keySpan=o,this.valueSpan=r}visit(i){return i.visitVariable(this)}},N_=class{name;value;sourceSpan;keySpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.keySpan=o,this.valueSpan=r}visit(i){return i.visitReference(this)}},XN=class{vars;placeholders;sourceSpan;i18n;constructor(i,e,t,o){this.vars=i,this.placeholders=e,this.sourceSpan=t,this.i18n=o}visit(i){return i.visitIcu(this)}},F_=class{tagNames;bindings;listeners;sourceSpan;constructor(i,e,t,o){if(this.tagNames=i,this.bindings=e,this.listeners=t,this.sourceSpan=o,i.length===0)throw new Error("HostElement must have at least one tag name.")}visit(){throw new Error("HostElement cannot be visited")}};function hk(n,i){let e=[];if(n.visit)for(let t of i)n.visit(t);else for(let t of i){let o=t.visit(n);o&&e.push(o)}return e}var za=class{nodes;placeholders;placeholderToMessage;meaning;description;customId;sources;id;legacyIds=[];messageString;constructor(i,e,t,o,r,a){this.nodes=i,this.placeholders=e,this.placeholderToMessage=t,this.meaning=o,this.description=r,this.customId=a,this.id=this.customId,this.messageString=J$(this.nodes),i.length?this.sources=[{filePath:i[0].sourceSpan.start.file.url,startLine:i[0].sourceSpan.start.line+1,startCol:i[0].sourceSpan.start.col+1,endLine:i[i.length-1].sourceSpan.end.line+1,endCol:i[0].sourceSpan.start.col+1}]:this.sources=[]}},Vg=class{value;sourceSpan;constructor(i,e){this.value=i,this.sourceSpan=e}visit(i,e){return i.visitText(this,e)}},Cd=class{children;sourceSpan;constructor(i,e){this.children=i,this.sourceSpan=e}visit(i,e){return i.visitContainer(this,e)}},y1=class{expression;type;cases;sourceSpan;expressionPlaceholder;constructor(i,e,t,o,r){this.expression=i,this.type=e,this.cases=t,this.sourceSpan=o,this.expressionPlaceholder=r}visit(i,e){return i.visitIcu(this,e)}},lm=class{tag;attrs;startName;closeName;children;isVoid;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c,p,u){this.tag=i,this.attrs=e,this.startName=t,this.closeName=o,this.children=r,this.isVoid=a,this.sourceSpan=c,this.startSourceSpan=p,this.endSourceSpan=u}visit(i,e){return i.visitTagPlaceholder(this,e)}},R_=class{value;name;sourceSpan;constructor(i,e,t){this.value=i,this.name=e,this.sourceSpan=t}visit(i,e){return i.visitPlaceholder(this,e)}},Ph=class{value;name;sourceSpan;previousMessage;constructor(i,e,t){this.value=i,this.name=e,this.sourceSpan=t}visit(i,e){return i.visitIcuPlaceholder(this,e)}},cm=class{name;parameters;startName;closeName;children;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c,p){this.name=i,this.parameters=e,this.startName=t,this.closeName=o,this.children=r,this.sourceSpan=a,this.startSourceSpan=c,this.endSourceSpan=p}visit(i,e){return i.visitBlockPlaceholder(this,e)}};function J$(n){let i=new rT;return n.map(t=>t.visit(i)).join("")}var rT=class{visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){let e=Object.keys(i.cases).map(t=>`${t} {${i.cases[t].visit(this)}}`);return`{${i.expressionPlaceholder}, ${i.type}, ${e.join(" ")}}`}visitTagPlaceholder(i){let e=i.children.map(t=>t.visit(this)).join("");return`{$${i.startName}}${e}{$${i.closeName}}`}visitPlaceholder(i){return`{$${i.name}}`}visitIcuPlaceholder(i){return`{$${i.name}}`}visitBlockPlaceholder(i){let e=i.children.map(t=>t.visit(this)).join("");return`{$${i.startName}}${e}{$${i.closeName}}`}};var eH=class{visitTag(i){let e=this._serializeAttributes(i.attrs);if(i.children.length==0)return`<${i.name}${e}/>`;let t=i.children.map(o=>o.visit(this));return`<${i.name}${e}>${t.join("")}`}visitText(i){return i.value}visitDeclaration(i){return``}_serializeAttributes(i){let e=Object.keys(i).map(t=>`${t}="${i[t]}"`).join(" ");return e.length>0?" "+e:""}visitDoctype(i){return``}},v6e=new yW;function SW(n){return n.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}var y6="i18n",HE="i18n-",wW="VAR_";function S6(n){return n===y6||n.startsWith(HE)}function MW(n){return n.attrs.some(i=>S6(i.name))}function w6(n){return n.nodes[0]}function eP(n={},i){let e={};return n&&Object.keys(n).length&&Object.keys(n).forEach(t=>e[Z0(t,i)]=n[t]),e}function Z0(n,i=!0){let e=SW(n);if(!i)return e;let t=e.split("_");if(t.length===1)return n.toLowerCase();let o;/^\d+$/.test(t[t.length-1])&&(o=t.pop());let r=t.shift().toLowerCase();return t.length&&(r+=t.map(a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join("")),o?`${r}_${o}`:r}var kW=/[-.]/,tP="_t",zs="ctx",hf="rf";function M6(n,i){let e=null;return()=>(e||(n(new zr(tP,void 0,ms)),e=Jn(i)),e)}function zh(n){return Array.isArray(n)?Yi(n.map(zh)):ke(n,Gl)}function OR(n,i){let e=Object.getOwnPropertyNames(n);return e.length===0?null:pl(e.map(t=>{let o=n[t],r,a,c,m;if(typeof o=="string")r=t,c=t,a=o,m=zh(a);else{c=t,r=o.classPropertyName,a=o.bindingPropertyName;let u=a!==r,h=o.transformFunction!==null,g=B_.None;if(o.isSignal&&(g|=B_.SignalBased),h&&(g|=B_.HasDecoratorInputTransform),i&&(u||h||g!==B_.None)){let S=[ke(g),zh(a)];(u||h)&&(S.push(zh(r)),h&&S.push(o.transformFunction)),m=Yi(S)}else m=zh(a)}return{key:c,quoted:kW.test(c),value:m}}))}var Pm=class{values=[];set(i,e){if(e){let t=this.values.find(o=>o.key===i);t?t.value=e:this.values.push({key:i,value:e,quoted:!1})}}toLiteralMap(){return pl(this.values)}};function TW(n){let i=n instanceof Rc?n.name:"ng-template",e=EW(n),t=new qh,o=Xl(i)[1];return t.setElement(o),Object.getOwnPropertyNames(e).forEach(r=>{let a=Xl(r)[1],c=e[r];t.addAttribute(a,c),r.toLowerCase()==="class"&&c.trim().split(/\s+/).forEach(u=>t.addClassName(u))}),t}function EW(n){let i={};return n instanceof Fs&&n.tagName!=="ng-template"?n.templateAttrs.forEach(e=>i[e.name]=""):(n.attributes.forEach(e=>{S6(e.name)||(i[e.name]=e.value)}),n.inputs.forEach(e=>{(e.type===Di.Property||e.type===Di.TwoWay)&&(i[e.name]="")}),n.outputs.forEach(e=>{i[e.name]=""})),i}function NR(n,i){let e=null,t={name:n.name,type:n.type,typeArgumentCount:n.typeArgumentCount,deps:[],target:Md.Injectable};if(n.useClass!==void 0){let c=n.useClass.expression.isEquivalent(n.type.value),m;n.deps!==void 0&&(m=n.deps),m!==void 0?e=Yp(We(q({},t),{delegate:n.useClass.expression,delegateDeps:m,delegateType:gb.Class})):c?e=Yp(t):e={statements:[],expression:RR(n.type.value,n.useClass.expression,i)}}else n.useFactory!==void 0?n.deps!==void 0?e=Yp(We(q({},t),{delegate:n.useFactory,delegateDeps:n.deps||[],delegateType:gb.Function})):e={statements:[],expression:Vs([],n.useFactory.callFn([]))}:n.useValue!==void 0?e=Yp(We(q({},t),{expression:n.useValue.expression})):n.useExisting!==void 0?e=Yp(We(q({},t),{expression:qt(fe.inject).callFn([n.useExisting.expression])})):e={statements:[],expression:RR(n.type.value,n.type.value,i)};let o=n.type.value,r=new Pm;return r.set("token",o),r.set("factory",e.expression),n.providedIn.expression.value!==null&&r.set("providedIn",pW(n.providedIn)),{expression:qt(fe.\u0275\u0275defineInjectable).callFn([r.toLiteralMap()],void 0,!0),type:DW(n),statements:e.statements}}function DW(n){return new ml(qt(fe.InjectableDeclaration,[px(n.type.type,n.typeArgumentCount)]))}function RR(n,i,e){if(n.node===i.node)return i.prop("\u0275fac");if(!e)return FR(i);let t=qt(fe.resolveForwardRef).callFn([i]);return FR(t)}function FR(n){let i=new wr("__ngFactoryType__",ms);return Vs([i],n.prop("\u0275fac").callFn([Jn(i.name)]))}var Yr=0,PW=8,nP=9,ru=10,k6=11,T6=12,iP=13,E6=32,UE=33,E0=34,D6=35,hx=36,IW=37,Ob=38,D0=39,Wa=40,Sr=41,LR=42,P6=43,Ma=44,Nb=45,Qp=46,ol=47,kc=58,ls=59,Wh=60,Qr=61,Os=62,BR=63,oP=48,AW=55,I6=57,Fm=65,OW=69,NW=70,RW=88,ff=90,Dc=91,au=92,kd=93,FW=94,Lm=95,bu=97,LW=98,BW=101,rP=102,A6=110,O6=114,N6=116,R6=117,F6=118,L6=120,J0=122,sl=123,VR=124,Ua=125,B6=160,Ih=64,GE=96;function P0(n){return n>=nP&&n<=E6||n==B6}function rl(n){return oP<=n&&n<=I6}function Im(n){return n>=bu&&n<=J0||n>=Fm&&n<=ff}function VW(n){return n>=bu&&n<=rP||n>=Fm&&n<=NW||rl(n)}function Rb(n){return n===ru||n===iP}function zR(n){return oP<=n&&n<=AW}function W_(n){return n===D0||n===E0||n===GE}var I0=class n{file;offset;line;col;constructor(i,e,t,o){this.file=i,this.offset=e,this.line=t,this.col=o}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(i){let e=this.file.content,t=e.length,o=this.offset,r=this.line,a=this.col;for(;o>0&&i<0;)if(o--,i++,e.charCodeAt(o)==ru){r--;let m=e.substring(0,o-1).lastIndexOf(String.fromCharCode(ru));a=m>0?o-m:o}else a--;for(;o0;){let c=e.charCodeAt(o);o++,i--,c==ru?(r++,a=0):a++}return new n(this.file,o,r,a)}getContext(i,e){let t=this.file.content,o=this.offset;if(o!=null){o>t.length-1&&(o=t.length-1);let r=o,a=0,c=0;for(;a0&&(o--,a++,!(t[o]==` +]>`}},h5e=new eH;function tH(n){return n.toUpperCase().replace(/[^A-Z0-9_]/g,"_")}var KN="i18n",aT="i18n-",nH="VAR_";function YN(n){return n===KN||n.startsWith(aT)}function iH(n){return n.attrs.some(i=>YN(i.name))}function ZN(n){return n.nodes[0]}function _E(n={},i){let e={};return n&&Object.keys(n).length&&Object.keys(n).forEach(t=>e[s0(t,i)]=n[t]),e}function s0(n,i=!0){let e=tH(n);if(!i)return e;let t=e.split("_");if(t.length===1)return n.toLowerCase();let o;/^\d+$/.test(t[t.length-1])&&(o=t.pop());let r=t.shift().toLowerCase();return t.length&&(r+=t.map(a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join("")),o?`${r}_${o}`:r}var oH=/[-.]/,vE="_t",Ps="ctx",Vh="rf";function JN(n,i){let e=null;return()=>(e||(n(new Rr(vE,void 0,is)),e=Yn(i)),e)}function mh(n){return Array.isArray(n)?Gi(n.map(mh)):Te(n,Ol)}function s5(n,i){let e=Object.getOwnPropertyNames(n);return e.length===0?null:nl(e.map(t=>{let o=n[t],r,a,c,p;if(typeof o=="string")r=t,c=t,a=o,p=mh(a);else{c=t,r=o.classPropertyName,a=o.bindingPropertyName;let u=a!==r,h=o.transformFunction!==null,_=qg.None;if(o.isSignal&&(_|=qg.SignalBased),h&&(_|=qg.HasDecoratorInputTransform),i&&(u||h||_!==qg.None)){let S=[Te(_),mh(a)];(u||h)&&(S.push(mh(r)),h&&S.push(o.transformFunction)),p=Gi(S)}else p=mh(a)}return{key:c,quoted:oH.test(c),value:p}}))}var dm=class{values=[];set(i,e){if(e){let t=this.values.find(o=>o.key===i);t?t.value=e:this.values.push({key:i,value:e,quoted:!1})}}toLiteralMap(){return nl(this.values)}};function rH(n){let i=n instanceof kc?n.name:"ng-template",e=aH(n),t=new vh,o=Ll(i)[1];return t.setElement(o),Object.getOwnPropertyNames(e).forEach(r=>{let a=Ll(r)[1],c=e[r];t.addAttribute(a,c),r.toLowerCase()==="class"&&c.trim().split(/\s+/).forEach(u=>t.addClassName(u))}),t}function aH(n){let i={};return n instanceof ks&&n.tagName!=="ng-template"?n.templateAttrs.forEach(e=>i[e.name]=""):(n.attributes.forEach(e=>{YN(e.name)||(i[e.name]=e.value)}),n.inputs.forEach(e=>{(e.type===Ti.Property||e.type===Ti.TwoWay)&&(i[e.name]="")}),n.outputs.forEach(e=>{i[e.name]=""})),i}function l5(n,i){let e=null,t={name:n.name,type:n.type,typeArgumentCount:n.typeArgumentCount,deps:[],target:gd.Injectable};if(n.useClass!==void 0){let c=n.useClass.expression.isEquivalent(n.type.value),p;n.deps!==void 0&&(p=n.deps),p!==void 0?e=wp(it(K({},t),{delegate:n.useClass.expression,delegateDeps:p,delegateType:a1.Class})):c?e=wp(t):e={statements:[],expression:c5(n.type.value,n.useClass.expression,i)}}else n.useFactory!==void 0?n.deps!==void 0?e=wp(it(K({},t),{delegate:n.useFactory,delegateDeps:n.deps||[],delegateType:a1.Function})):e={statements:[],expression:Ds([],n.useFactory.callFn([]))}:n.useValue!==void 0?e=wp(it(K({},t),{expression:n.useValue.expression})):n.useExisting!==void 0?e=wp(it(K({},t),{expression:Ut(fe.inject).callFn([n.useExisting.expression])})):e={statements:[],expression:c5(n.type.value,n.type.value,i)};let o=n.type.value,r=new dm;return r.set("token",o),r.set("factory",e.expression),n.providedIn.expression.value!==null&&r.set("providedIn",U$(n.providedIn)),{expression:Ut(fe.\u0275\u0275defineInjectable).callFn([r.toLiteralMap()],void 0,!0),type:sH(n),statements:e.statements}}function sH(n){return new tl(Ut(fe.InjectableDeclaration,[nb(n.type.type,n.typeArgumentCount)]))}function c5(n,i,e){if(n.node===i.node)return i.prop("\u0275fac");if(!e)return d5(i);let t=Ut(fe.resolveForwardRef).callFn([i]);return d5(t)}function d5(n){let i=new br("__ngFactoryType__",is);return Ds([i],n.prop("\u0275fac").callFn([Yn(i.name)]))}var Gr=0,lH=8,CE=9,Op=10,eF=11,tF=12,bE=13,nF=32,sT=33,L_=34,iF=35,ob=36,cH=37,S1=38,V_=39,Va=40,Cr=41,m5=42,oF=43,va=44,w1=45,yp=46,Qs=47,_c=58,es=59,_h=60,Hr=61,Ss=62,p5=63,xE=48,dH=55,rF=57,gm=65,mH=69,pH=70,uH=88,Bh=90,bc=91,Np=92,_d=93,hH=94,_m=95,Qp=97,fH=98,gH=101,yE=102,aF=110,sF=114,lF=116,cF=117,dF=118,mF=120,l0=122,Ys=123,u5=124,Ra=125,pF=160,nh=64,lT=96;function B_(n){return n>=CE&&n<=nF||n==pF}function Xs(n){return xE<=n&&n<=rF}function mm(n){return n>=Qp&&n<=l0||n>=gm&&n<=Bh}function _H(n){return n>=Qp&&n<=yE||n>=gm&&n<=pH||Xs(n)}function M1(n){return n===Op||n===bE}function h5(n){return xE<=n&&n<=dH}function t_(n){return n===V_||n===L_||n===lT}var z_=class n{file;offset;line;col;constructor(i,e,t,o){this.file=i,this.offset=e,this.line=t,this.col=o}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(i){let e=this.file.content,t=e.length,o=this.offset,r=this.line,a=this.col;for(;o>0&&i<0;)if(o--,i++,e.charCodeAt(o)==Op){r--;let p=e.substring(0,o-1).lastIndexOf(String.fromCharCode(Op));a=p>0?o-p:o}else a--;for(;o0;){let c=e.charCodeAt(o);o++,i--,c==Op?(r++,a=0):a++}return new n(this.file,o,r,a)}getContext(i,e){let t=this.file.content,o=this.offset;if(o!=null){o>t.length-1&&(o=t.length-1);let r=o,a=0,c=0;for(;a0&&(o--,a++,!(t[o]==` `&&++c==e)););for(a=0,c=0;a]${i.after}")`:this.msg}toString(){let i=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${i}`}};function zW(n,i,e){let t=`in ${n} ${i} in ${e}`,o=new Fb("",t);return new _n(new I0(o,-1,-1,-1),new I0(o,-1,-1,-1))}var jW=0;function $W(n){if(!n||!n.reference)return null;let i=n.reference;if(i.__anonymousType)return i.__anonymousType;if(i.__forward_ref__)return"__forward_ref__";let e=v6(i);return e.indexOf("(")>=0?(e=`anonymous_${jW++}`,i.__anonymousType=e):e=Kp(e),e}function Kp(n){return n.replace(/\W/g,"_")}var jR='(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})',WE=class extends EE{constructor(){super(!1)}visitWrappedNodeExpr(i,e){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitDeclareVarStmt(i,e){return e.print(i,`var ${i.name}`),i.value&&(e.print(i," = "),i.value.visitExpression(this,e)),e.println(i,";"),null}visitTaggedTemplateLiteralExpr(i,e){let t=i.template.elements;return i.tag.visitExpression(this,e),e.print(i,`(${jR}(`),e.print(i,`[${t.map(o=>Jp(o.text,!1)).join(", ")}], `),e.print(i,`[${t.map(o=>Jp(o.rawText,!1)).join(", ")}])`),i.template.expressions.forEach(o=>{e.print(i,", "),o.visitExpression(this,e)}),e.print(i,")"),null}visitTemplateLiteralExpr(i,e){e.print(i,"`");for(let t=0;t"),Array.isArray(i.body))e.println(i,"{"),e.incIndent(),this.visitAllStatements(i.body,e),e.decIndent(),e.print(i,"}");else{let t=i.body instanceof Ql;t&&e.print(i,"("),i.body.visitExpression(this,e),t&&e.print(i,")")}return null}visitDeclareFunctionStmt(i,e){return e.print(i,`function ${i.name}(`),this._visitParams(i.params,e),e.println(i,") {"),e.incIndent(),this.visitAllStatements(i.statements,e),e.decIndent(),e.println(i,"}"),null}visitLocalizedString(i,e){e.print(i,`$localize(${jR}(`);let t=[i.serializeI18nHead()];for(let o=1;oJp(o.cooked,!1)).join(", ")}], `),e.print(i,`[${t.map(o=>Jp(o.raw,!1)).join(", ")}])`),i.expressions.forEach(o=>{e.print(i,", "),o.visitExpression(this,e)}),e.print(i,")"),null}_visitParams(i,e){this.visitAllObjects(t=>e.print(null,t.name),i,e,",")}},j1;function HW(){if(j1===void 0){let n=U_.trustedTypes;if(j1=null,n)try{j1=n.createPolicy("angular#unsafe-jit",{createScript:i=>i})}catch{}}return j1}function UW(n){return HW()?.createScript(n)||n}function $R(...n){if(!U_.trustedTypes)return new Function(...n);let i=n.slice(0,-1).join(","),e=n[n.length-1],t=`(function anonymous(${i} +`&&++c==e)););return{before:t.substring(o,this.offset),after:t.substring(this.offset,r+1)}}return null}},k1=class{content;url;constructor(i,e){this.content=i,this.url=e}},gn=class{start;end;fullStart;details;constructor(i,e,t=i,o=null){this.start=i,this.end=e,this.fullStart=t,this.details=o}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},nm=(function(n){return n[n.WARNING=0]="WARNING",n[n.ERROR=1]="ERROR",n})(nm||{}),sn=class extends Error{span;msg;level;relatedError;constructor(i,e,t=nm.ERROR,o){super(e),this.span=i,this.msg=e,this.level=t,this.relatedError=o,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let i=this.span.start.getContext(100,3);return i?`${this.msg} ("${i.before}[${nm[this.level]} ->]${i.after}")`:this.msg}toString(){let i=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${i}`}};function vH(n,i,e){let t=`in ${n} ${i} in ${e}`,o=new k1("",t);return new gn(new z_(o,-1,-1,-1),new z_(o,-1,-1,-1))}var CH=0;function bH(n){if(!n||!n.reference)return null;let i=n.reference;if(i.__anonymousType)return i.__anonymousType;if(i.__forward_ref__)return"__forward_ref__";let e=WN(i);return e.indexOf("(")>=0?(e=`anonymous_${CH++}`,i.__anonymousType=e):e=Mp(e),e}function Mp(n){return n.replace(/\W/g,"_")}var f5='(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})',cT=class extends Gk{constructor(){super(!1)}visitWrappedNodeExpr(i,e){throw new Error("Cannot emit a WrappedNodeExpr in Javascript.")}visitDeclareVarStmt(i,e){return e.print(i,`var ${i.name}`),i.value&&(e.print(i," = "),i.value.visitExpression(this,e)),e.println(i,";"),null}visitTaggedTemplateLiteralExpr(i,e){let t=i.template.elements;return i.tag.visitExpression(this,e),e.print(i,`(${f5}(`),e.print(i,`[${t.map(o=>Tp(o.text,!1)).join(", ")}], `),e.print(i,`[${t.map(o=>Tp(o.rawText,!1)).join(", ")}])`),i.template.expressions.forEach(o=>{e.print(i,", "),o.visitExpression(this,e)}),e.print(i,")"),null}visitTemplateLiteralExpr(i,e){e.print(i,"`");for(let t=0;t"),Array.isArray(i.body))e.println(i,"{"),e.incIndent(),this.visitAllStatements(i.body,e),e.decIndent(),e.print(i,"}");else{let t=i.body instanceof Rl;t&&e.print(i,"("),i.body.visitExpression(this,e),t&&e.print(i,")")}return null}visitDeclareFunctionStmt(i,e){return e.print(i,`function ${i.name}(`),this._visitParams(i.params,e),e.println(i,") {"),e.incIndent(),this.visitAllStatements(i.statements,e),e.decIndent(),e.println(i,"}"),null}visitLocalizedString(i,e){e.print(i,`$localize(${f5}(`);let t=[i.serializeI18nHead()];for(let o=1;oTp(o.cooked,!1)).join(", ")}], `),e.print(i,`[${t.map(o=>Tp(o.raw,!1)).join(", ")}])`),i.expressions.forEach(o=>{e.print(i,", "),o.visitExpression(this,e)}),e.print(i,")"),null}_visitParams(i,e){this.visitAllObjects(t=>e.print(null,t.name),i,e,",")}},IC;function xH(){if(IC===void 0){let n=Jg.trustedTypes;if(IC=null,n)try{IC=n.createPolicy("angular#unsafe-jit",{createScript:i=>i})}catch{}}return IC}function yH(n){return xH()?.createScript(n)||n}function g5(...n){if(!Jg.trustedTypes)return new Function(...n);let i=n.slice(0,-1).join(","),e=n[n.length-1],t=`(function anonymous(${i} ) { ${e} -})`,o=U_.eval(UW(t));return o.bind===void 0?new Function(...n):(o.toString=()=>t,o.bind(U_))}var qE=class{evaluateStatements(i,e,t,o){let r=new QE(t),a=TE.createRoot();return e.length>0&&!GW(e[0])&&(e=[ke("use strict").toStmt(),...e]),r.visitAllStatements(e,a),r.createReturnStmt(a),this.evaluateCode(i,a,r.getArgs(),o)}evaluateCode(i,e,t,o){let r=`"use strict";${e.toSource()} -//# sourceURL=${i}`,a=[],c=[];for(let u in t)c.push(t[u]),a.push(u);if(o){let u=$R(...a.concat("return null;")).toString(),h=u.slice(0,u.indexOf("return null;")).split(` +})`,o=Jg.eval(yH(t));return o.bind===void 0?new Function(...n):(o.toString=()=>t,o.bind(Jg))}var dT=class{evaluateStatements(i,e,t,o){let r=new mT(t),a=Uk.createRoot();return e.length>0&&!SH(e[0])&&(e=[Te("use strict").toStmt(),...e]),r.visitAllStatements(e,a),r.createReturnStmt(a),this.evaluateCode(i,a,r.getArgs(),o)}evaluateCode(i,e,t,o){let r=`"use strict";${e.toSource()} +//# sourceURL=${i}`,a=[],c=[];for(let u in t)c.push(t[u]),a.push(u);if(o){let u=g5(...a.concat("return null;")).toString(),h=u.slice(0,u.indexOf("return null;")).split(` `).length-1;r+=` -${e.toSourceMapGenerator(i,h).toJsComment()}`}let m=$R(...a.concat(r));return this.executeFunction(m,c)}executeFunction(i,e){return i(...e)}},QE=class extends WE{refResolver;_evalArgNames=[];_evalArgValues=[];_evalExportedVars=[];constructor(i){super(),this.refResolver=i}createReturnStmt(i){new Mr(new Ql(this._evalExportedVars.map(t=>new Yh(t,Jn(t),!1)))).visitStatement(this,i)}getArgs(){let i={};for(let e=0;e0&&i.set("imports",Yi(n.imports));let e=qt(fe.defineInjector).callFn([i.toLiteralMap()],void 0,!0),t=WW(n);return{expression:e,type:t,statements:[]}}function WW(n){return new ml(qt(fe.InjectorDeclaration,[new ml(n.type.type)]))}var XE=class{context;constructor(i){this.context=i}resolveExternalReference(i){if(i.moduleName!=="@angular/core")throw new Error(`Cannot resolve external reference to ${i.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(i.name))throw new Error(`No value provided for @angular/core symbol '${i.name}'.`);return this.context[i.name]}},Lb=(function(n){return n[n.Inline=0]="Inline",n[n.SideEffect=1]="SideEffect",n[n.Omit=2]="Omit",n})(Lb||{}),Sm=(function(n){return n[n.Global=0]="Global",n[n.Local=1]="Local",n})(Sm||{});function qW(n){let i=[],e=new Pm;if(e.set("type",n.type.value),n.kind===Sm.Global&&n.bootstrap.length>0&&e.set("bootstrap",eu(n.bootstrap,n.containsForwardDecls)),n.selectorScopeMode===Lb.Inline)n.declarations.length>0&&e.set("declarations",eu(n.declarations,n.containsForwardDecls)),n.imports.length>0&&e.set("imports",eu(n.imports,n.containsForwardDecls)),n.exports.length>0&&e.set("exports",eu(n.exports,n.containsForwardDecls));else if(n.selectorScopeMode===Lb.SideEffect){let r=YW(n);r!==null&&i.push(r)}n.schemas!==null&&n.schemas.length>0&&e.set("schemas",Yi(n.schemas.map(r=>r.value))),n.id!==null&&(e.set("id",n.id),i.push(qt(fe.registerNgModuleType).callFn([n.type.value,n.id]).toStmt()));let t=qt(fe.defineNgModule).callFn([e.toLiteralMap()],void 0,!0),o=XW(n);return{expression:t,type:o,statements:i}}function QW(n){let i=new Pm;return i.set("type",new ai(n.type)),n.bootstrap!==void 0&&i.set("bootstrap",new ai(n.bootstrap)),n.declarations!==void 0&&i.set("declarations",new ai(n.declarations)),n.imports!==void 0&&i.set("imports",new ai(n.imports)),n.exports!==void 0&&i.set("exports",new ai(n.exports)),n.schemas!==void 0&&i.set("schemas",new ai(n.schemas)),n.id!==void 0&&i.set("id",new ai(n.id)),qt(fe.defineNgModule).callFn([i.toLiteralMap()])}function XW(n){if(n.kind===Sm.Local)return new ml(n.type.value);let{type:i,declarations:e,exports:t,imports:o,includeImportTypes:r,publicDeclarationTypes:a}=n;return new ml(qt(fe.NgModuleDeclaration,[new ml(i.type),a===null?ZT(e):KW(a),r?ZT(o):Ic,ZT(t)]))}function YW(n){let i=new Pm;if(n.kind===Sm.Global?n.declarations.length>0&&i.set("declarations",eu(n.declarations,n.containsForwardDecls)):n.declarationsExpression&&i.set("declarations",n.declarationsExpression),n.kind===Sm.Global?n.imports.length>0&&i.set("imports",eu(n.imports,n.containsForwardDecls)):n.importsExpression&&i.set("imports",n.importsExpression),n.kind===Sm.Global?n.exports.length>0&&i.set("exports",eu(n.exports,n.containsForwardDecls)):n.exportsExpression&&i.set("exports",n.exportsExpression),n.kind===Sm.Local&&n.bootstrapExpression&&i.set("bootstrap",n.bootstrapExpression),Object.keys(i.values).length===0)return null;let e=new ps(qt(fe.setNgModuleScope),[n.type.value,i.toLiteralMap()]),t=dW(e),o=new wm([],[t.toStmt()]);return new ps(o,[]).toStmt()}function ZT(n){let i=n.map(e=>Y0(e.type));return n.length>0?pa(Yi(i)):Ic}function KW(n){let i=n.map(e=>Y0(e));return n.length>0?pa(Yi(i)):Ic}function UR(n){let i=[];i.push({key:"name",value:ke(n.pipeName??n.name),quoted:!1}),i.push({key:"type",value:n.type.value,quoted:!1}),i.push({key:"pure",value:ke(n.pure),quoted:!1}),n.isStandalone===!1&&i.push({key:"standalone",value:ke(!1),quoted:!1});let e=qt(fe.definePipe).callFn([pl(i)],void 0,!0),t=ZW(n);return{expression:e,type:t,statements:[]}}function ZW(n){return new ml(qt(fe.PipeDeclaration,[px(n.type.type,n.typeArgumentCount),new ml(new ua(n.pipeName)),new ml(new ua(n.isStandalone))]))}var sf=(function(n){return n[n.Directive=0]="Directive",n[n.Pipe=1]="Pipe",n[n.NgModule=2]="NgModule",n})(sf||{}),JW=new Set(["inherit","initial","revert","unset","alternate","alternate-reverse","normal","reverse","backwards","both","forwards","none","paused","running","ease","ease-in","ease-in-out","ease-out","linear","step-start","step-end","end","jump-both","jump-end","jump-none","jump-start","start"]),eq=["@media","@supports","@document","@layer","@container","@scope","@starting-style"],YE=class{shimCssText(i,e,t=""){let o=[];i=i.replace(gq,c=>{if(c.match(_q))o.push(c);else{let m=c.match(fq);o.push(m?.join("")??"")}return sP}),i=this._insertDirectives(i);let r=this._scopeCssText(i,e,t),a=0;return r.replace(vq,()=>o[a++])}_insertDirectives(i){return i=this._insertPolyfillDirectivesInCssText(i),this._insertPolyfillRulesInCssText(i)}_scopeKeyframesRelatedCss(i,e){let t=new Set,o=$1(i,r=>this._scopeLocalKeyframeDeclarations(r,e,t));return $1(o,r=>this._scopeAnimationRule(r,e,t))}_scopeLocalKeyframeDeclarations(i,e,t){return We(q({},i),{selector:i.selector.replace(/(^@(?:-webkit-)?keyframes(?:\s+))(['"]?)(.+)\2(\s*)$/,(o,r,a,c,m)=>(t.add(qR(c,a)),`${r}${a}${e}_${c}${a}${m}`))})}_scopeAnimationKeyframe(i,e,t){return i.replace(/^(\s*)(['"]?)(.+?)\2(\s*)$/,(o,r,a,c,m)=>(c=`${t.has(qR(c,a))?e+"_":""}${c}`,`${r}${a}${c}${a}${m}`))}_animationDeclarationKeyframesRe=/(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;_scopeAnimationRule(i,e,t){let o=i.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation\s*:\s*),*([^;]+)/g,(r,a,c)=>a+c.replace(this._animationDeclarationKeyframesRe,(m,u,h="",g,S)=>g?`${u}${this._scopeAnimationKeyframe(`${h}${g}${h}`,e,t)}`:JW.has(S)?m:`${u}${this._scopeAnimationKeyframe(S,e,t)}`));return o=o.replace(/((?:^|\s+|;)(?:-webkit-)?animation-name(?:\s*):(?:\s*))([^;]+)/g,(r,a,c)=>`${a}${c.split(",").map(m=>this._scopeAnimationKeyframe(m,e,t)).join(",")}`),We(q({},i),{content:o})}_insertPolyfillDirectivesInCssText(i){return i.replace(nq,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(i){return i.replace(iq,(...e)=>{let t=e[0].replace(e[1],"").replace(e[2],"");return e[4]+t})}_scopeCssText(i,e,t){let o=this._extractUnscopedRulesFromCssText(i);return i=this._insertPolyfillHostInCssText(i),i=this._convertColonHost(i),i=this._convertColonHostContext(i),i=this._convertShadowDOMSelectors(i),e&&(i=this._scopeKeyframesRelatedCss(i,e),i=this._scopeSelectors(i,e,t)),i=i+` -`+o,i.trim()}_extractUnscopedRulesFromCssText(i){let e="",t;for(GR.lastIndex=0;(t=GR.exec(i))!==null;){let o=t[0].replace(t[2],"").replace(t[1],t[4]);e+=o+` +${e.toSourceMapGenerator(i,h).toJsComment()}`}let p=g5(...a.concat(r));return this.executeFunction(p,c)}executeFunction(i,e){return i(...e)}},mT=class extends cT{refResolver;_evalArgNames=[];_evalArgValues=[];_evalExportedVars=[];constructor(i){super(),this.refResolver=i}createReturnStmt(i){new xr(new Rl(this._evalExportedVars.map(t=>new xh(t,Yn(t),!1)))).visitStatement(this,i)}getArgs(){let i={};for(let e=0;e0&&i.set("imports",Gi(n.imports));let e=Ut(fe.defineInjector).callFn([i.toLiteralMap()],void 0,!0),t=wH(n);return{expression:e,type:t,statements:[]}}function wH(n){return new tl(Ut(fe.InjectorDeclaration,[new tl(n.type.type)]))}var pT=class{context;constructor(i){this.context=i}resolveExternalReference(i){if(i.moduleName!=="@angular/core")throw new Error(`Cannot resolve external reference to ${i.moduleName}, only references to @angular/core are supported.`);if(!this.context.hasOwnProperty(i.name))throw new Error(`No value provided for @angular/core symbol '${i.name}'.`);return this.context[i.name]}},T1=(function(n){return n[n.Inline=0]="Inline",n[n.SideEffect=1]="SideEffect",n[n.Omit=2]="Omit",n})(T1||{}),im=(function(n){return n[n.Global=0]="Global",n[n.Local=1]="Local",n})(im||{});function MH(n){let i=[],e=new dm;if(e.set("type",n.type.value),n.kind===im.Global&&n.bootstrap.length>0&&e.set("bootstrap",Ep(n.bootstrap,n.containsForwardDecls)),n.selectorScopeMode===T1.Inline)n.declarations.length>0&&e.set("declarations",Ep(n.declarations,n.containsForwardDecls)),n.imports.length>0&&e.set("imports",Ep(n.imports,n.containsForwardDecls)),n.exports.length>0&&e.set("exports",Ep(n.exports,n.containsForwardDecls));else if(n.selectorScopeMode===T1.SideEffect){let r=EH(n);r!==null&&i.push(r)}n.schemas!==null&&n.schemas.length>0&&e.set("schemas",Gi(n.schemas.map(r=>r.value))),n.id!==null&&(e.set("id",n.id),i.push(Ut(fe.registerNgModuleType).callFn([n.type.value,n.id]).toStmt()));let t=Ut(fe.defineNgModule).callFn([e.toLiteralMap()],void 0,!0),o=TH(n);return{expression:t,type:o,statements:i}}function kH(n){let i=new dm;return i.set("type",new oi(n.type)),n.bootstrap!==void 0&&i.set("bootstrap",new oi(n.bootstrap)),n.declarations!==void 0&&i.set("declarations",new oi(n.declarations)),n.imports!==void 0&&i.set("imports",new oi(n.imports)),n.exports!==void 0&&i.set("exports",new oi(n.exports)),n.schemas!==void 0&&i.set("schemas",new oi(n.schemas)),n.id!==void 0&&i.set("id",new oi(n.id)),Ut(fe.defineNgModule).callFn([i.toLiteralMap()])}function TH(n){if(n.kind===im.Local)return new tl(n.type.value);let{type:i,declarations:e,exports:t,imports:o,includeImportTypes:r,publicDeclarationTypes:a}=n;return new tl(Ut(fe.NgModuleDeclaration,[new tl(i.type),a===null?fk(e):DH(a),r?fk(o):yc,fk(t)]))}function EH(n){let i=new dm;if(n.kind===im.Global?n.declarations.length>0&&i.set("declarations",Ep(n.declarations,n.containsForwardDecls)):n.declarationsExpression&&i.set("declarations",n.declarationsExpression),n.kind===im.Global?n.imports.length>0&&i.set("imports",Ep(n.imports,n.containsForwardDecls)):n.importsExpression&&i.set("imports",n.importsExpression),n.kind===im.Global?n.exports.length>0&&i.set("exports",Ep(n.exports,n.containsForwardDecls)):n.exportsExpression&&i.set("exports",n.exportsExpression),n.kind===im.Local&&n.bootstrapExpression&&i.set("bootstrap",n.bootstrapExpression),Object.keys(i.values).length===0)return null;let e=new os(Ut(fe.setNgModuleScope),[n.type.value,i.toLiteralMap()]),t=$$(e),o=new om([],[t.toStmt()]);return new os(o,[]).toStmt()}function fk(n){let i=n.map(e=>r0(e.type));return n.length>0?ra(Gi(i)):yc}function DH(n){let i=n.map(e=>r0(e));return n.length>0?ra(Gi(i)):yc}function v5(n){let i=[];i.push({key:"name",value:Te(n.pipeName??n.name),quoted:!1}),i.push({key:"type",value:n.type.value,quoted:!1}),i.push({key:"pure",value:Te(n.pure),quoted:!1}),n.isStandalone===!1&&i.push({key:"standalone",value:Te(!1),quoted:!1});let e=Ut(fe.definePipe).callFn([nl(i)],void 0,!0),t=PH(n);return{expression:e,type:t,statements:[]}}function PH(n){return new tl(Ut(fe.PipeDeclaration,[nb(n.type.type,n.typeArgumentCount),new tl(new aa(n.pipeName)),new tl(new aa(n.isStandalone))]))}var Ih=(function(n){return n[n.Directive=0]="Directive",n[n.Pipe=1]="Pipe",n[n.NgModule=2]="NgModule",n})(Ih||{}),IH=new Set(["inherit","initial","revert","unset","alternate","alternate-reverse","normal","reverse","backwards","both","forwards","none","paused","running","ease","ease-in","ease-in-out","ease-out","linear","step-start","step-end","end","jump-both","jump-end","jump-none","jump-start","start"]),AH=["@media","@supports","@document","@layer","@container","@scope","@starting-style"],uT=class{shimCssText(i,e,t=""){let o=[];i=i.replace(QH,c=>{if(c.match(XH))o.push(c);else{let p=c.match(qH);o.push(p?.join("")??"")}return wE}),i=this._insertDirectives(i);let r=this._scopeCssText(i,e,t),a=0;return r.replace(KH,()=>o[a++])}_insertDirectives(i){return i=this._insertPolyfillDirectivesInCssText(i),this._insertPolyfillRulesInCssText(i)}_scopeKeyframesRelatedCss(i,e){let t=new Set,o=AC(i,r=>this._scopeLocalKeyframeDeclarations(r,e,t));return AC(o,r=>this._scopeAnimationRule(r,e,t))}_scopeLocalKeyframeDeclarations(i,e,t){return it(K({},i),{selector:i.selector.replace(/(^@(?:-webkit-)?keyframes(?:\s+))(['"]?)(.+)\2(\s*)$/,(o,r,a,c,p)=>(t.add(x5(c,a)),`${r}${a}${e}_${c}${a}${p}`))})}_scopeAnimationKeyframe(i,e,t){return i.replace(/^(\s*)(['"]?)(.+?)\2(\s*)$/,(o,r,a,c,p)=>(c=`${t.has(x5(c,a))?e+"_":""}${c}`,`${r}${a}${c}${a}${p}`))}_animationDeclarationKeyframesRe=/(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;_scopeAnimationRule(i,e,t){let o=i.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation\s*:\s*),*([^;]+)/g,(r,a,c)=>a+c.replace(this._animationDeclarationKeyframesRe,(p,u,h="",_,S)=>_?`${u}${this._scopeAnimationKeyframe(`${h}${_}${h}`,e,t)}`:IH.has(S)?p:`${u}${this._scopeAnimationKeyframe(S,e,t)}`));return o=o.replace(/((?:^|\s+|;)(?:-webkit-)?animation-name(?:\s*):(?:\s*))([^;]+)/g,(r,a,c)=>`${a}${c.split(",").map(p=>this._scopeAnimationKeyframe(p,e,t)).join(",")}`),it(K({},i),{content:o})}_insertPolyfillDirectivesInCssText(i){return i.replace(NH,function(...e){return e[2]+"{"})}_insertPolyfillRulesInCssText(i){return i.replace(FH,(...e)=>{let t=e[0].replace(e[1],"").replace(e[2],"");return e[4]+t})}_scopeCssText(i,e,t){let o=this._extractUnscopedRulesFromCssText(i);return i=this._insertPolyfillHostInCssText(i),i=this._convertColonHost(i),i=this._convertColonHostContext(i),i=this._convertShadowDOMSelectors(i),e&&(i=this._scopeKeyframesRelatedCss(i,e),i=this._scopeSelectors(i,e,t)),i=i+` +`+o,i.trim()}_extractUnscopedRulesFromCssText(i){let e="",t;for(C5.lastIndex=0;(t=C5.exec(i))!==null;){let o=t[0].replace(t[2],"").replace(t[1],t[4]);e+=o+` -`}return e}_convertColonHost(i){return i.replace(sq,(e,t,o)=>{if(t){let r=[];for(let a of this._splitOnTopLevelCommas(t,!0)){let c=a.trim();if(!c)break;let m=Cm+c.replace(Bb,"")+o;r.push(m)}return r.join(",")}else return Cm+o})}*_splitOnTopLevelCommas(i,e){let t=i.length,o=0,r=0;for(let a=0;a{let o=[[]],r=e.indexOf(Lh);for(;r!==-1;){let a=e.substring(r+Lh.length);if(!a||a[0]!=="("){e=a,r=e.indexOf(Lh);continue}let c=[],m=0;for(let h of this._splitOnTopLevelCommas(a.substring(1),!0)){m=m+h.length+1;let g=h.trim();g&&c.push(g)}let u=o.length;Dq(o,c.length);for(let h=0;hEq(a,e,t)).join(", ")})}_convertShadowDOMSelectors(i){return mq.reduce((e,t)=>e.replace(t," "),i)}_scopeSelectors(i,e,t){return $1(i,o=>{let r=o.selector,a=o.content;return o.selector[0]!=="@"?r=this._scopeSelector({selector:r,scopeSelector:e,hostSelector:t,isParentSelector:!0}):eq.some(c=>o.selector.startsWith(c))?a=this._scopeSelectors(o.content,e,t):(o.selector.startsWith("@font-face")||o.selector.startsWith("@page"))&&(a=this._stripScopingSelectors(o.content)),new A0(r,a)})}_stripScopingSelectors(i){return $1(i,e=>{let t=e.selector.replace(WR," ").replace(JT," ");return new A0(t,e.content)})}_safeSelector;_shouldScopeIndicator;_scopeSelector({selector:i,scopeSelector:e,hostSelector:t,isParentSelector:o=!1}){let r=/ ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;return i.split(r).map(a=>a.split(WR)).map(a=>{let[c,...m]=a;return[(h=>this._selectorNeedsScoping(h,e)?this._applySelectorScope({selector:h,scopeSelector:e,hostSelector:t,isParentSelector:o}):h)(c),...m].join(" ")}).join(", ")}_selectorNeedsScoping(i,e){return!this._makeScopeMatcher(e).test(i)}_makeScopeMatcher(i){let e=/\[/g,t=/\]/g;return i=i.replace(e,"\\[").replace(t,"\\]"),new RegExp("^("+i+")"+pq,"m")}_applySimpleSelectorScope(i,e,t){if(jh.lastIndex=0,jh.test(i)){let o=`[${t}]`,r=i;for(;r.match(JT);)r=r.replace(JT,(a,c)=>c.replace(/([^:\)]*)(:*)(.*)/,(m,u,h,g)=>u+o+h+g));return r.replace(jh,o)}return e+" "+i}_applySelectorScope({selector:i,scopeSelector:e,hostSelector:t,isParentSelector:o}){let r=/\[is=([^\]]*)\]/g;e=e.replace(r,(M,...w)=>w[0]);let a=`[${e}]`,c=M=>{let w=M.trim();if(!w)return M;if(M.includes(Cm)){if(w=this._applySimpleSelectorScope(M,e,t),!M.match(dq)){let[y,k,I,D]=w.match(/([^:]*)(:*)([\s\S]*)/);w=k+a+I+D}}else{let y=M.replace(jh,"");if(y.length>0){let k=y.match(/([^:]*)(:*)([\s\S]*)/);k&&(w=k[1]+a+k[2]+k[3])}}return w},m=M=>{let w="",y=[],k;for(;(k=P_.exec(M))!==null;){let I=1,D=P_.lastIndex;for(;D{let[D]=I.match(P_)??[],N=I.slice(D?.length,-1);N.includes(Cm)&&(this._shouldScopeIndicator=!0);let P=this._scopeSelector({selector:N,scopeSelector:e,hostSelector:t});return`${D}${P})`}).join(""):(this._shouldScopeIndicator=this._shouldScopeIndicator||M.includes(Cm),w=this._shouldScopeIndicator?c(M):M),w};o&&(this._safeSelector=new KE(i),i=this._safeSelector.content());let u="",h=0,g,S=/( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g,x=i.includes(Cm);for((o||this._shouldScopeIndicator)&&(this._shouldScopeIndicator=!x);(g=S.exec(i))!==null;){let M=g[1],w=i.slice(h,g.index);if(w.match(/__esc-ph-(\d+)__/)&&i[g.index+1]?.match(/[a-fA-F\d]/))continue;let y=m(w);u+=`${y} ${M} `,h=S.lastIndex}let C=i.substring(h);return u+=m(C),this._safeSelector.restore(u)}_insertPolyfillHostInCssText(i){return i.replace(hq,Lh).replace(uq,Bb)}},KE=class{placeholders=[];index=0;_content;constructor(i){i=this._escapeRegexMatches(i,/(\[[^\]]*\])/g),i=i.replace(/(\\.)/g,(e,t)=>{let o=`__esc-ph-${this.index}__`;return this.placeholders.push(t),this.index++,o}),this._content=i.replace(aq,(e,t,o)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(`(${o})`),this.index++,t+r})}restore(i){return i.replace(/__(?:ph|esc-ph)-(\d+)__/g,(e,t)=>this.placeholders[+t])}content(){return this._content}_escapeRegexMatches(i,e){return i.replace(e,(t,o)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(o),this.index++,r})}},tq="(:(where|is)\\()?",P_=/:(where|is)\(/gi,nq=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,iq=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,GR=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,Bb="-shadowcsshost",Lh="-shadowcsscontext",ZE="[^)(]*",oq=String.raw`(?:\(${ZE}\)|${ZE})+?`,rq=String.raw`(?:\(${oq}\)|${ZE})+?`,aP=String.raw`(?:\((${rq})\))`,aq=new RegExp(String.raw`(:nth-[-\w]+)`+aP,"g"),sq=new RegExp(Bb+aP+"?([^,{]*)","gim"),lq=Lh+aP+"?([^{]*)",cq=new RegExp(`${tq}(${lq})`,"gim"),Cm=Bb+"-no-combinator",dq=new RegExp(`${Cm}(?![^(]*\\))`,"g"),JT=/-shadowcsshost-no-combinator([^\s,]*)/,mq=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],WR=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,pq="([>\\s~+[.,{:][\\s\\S]*)?$",jh=/-shadowcsshost/gim,uq=/:host/gim,hq=/:host-context/gim,fq=/\r?\n/g,gq=/\/\*[\s\S]*?\*\//g,_q=/\/\*\s*#\s*source(Mapping)?URL=/g,sP="%COMMENT%",vq=new RegExp(sP,"g"),eE="%BLOCK%",Cq=new RegExp(`(\\s*(?:${sP}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g"),bq=new Map([["{","}"]]),V6="%COMMA_IN_PLACEHOLDER%",z6="%SEMI_IN_PLACEHOLDER%",j6="%COLON_IN_PLACEHOLDER%",xq=new RegExp(V6,"g"),yq=new RegExp(z6,"g"),Sq=new RegExp(j6,"g"),A0=class{selector;content;constructor(i,e){this.selector=i,this.content=e}};function $1(n,i){let e=kq(n),t=wq(e,bq,eE),o=0,r=t.escapedString.replace(Cq,(...a)=>{let c=a[2],m="",u=a[4],h="";u&&u.startsWith("{"+eE)&&(m=t.blocks[o++],u=u.substring(eE.length+1),h="{");let g=i(new A0(c,m));return`${a[1]}${g.selector}${a[3]}${h}${g.content}${u}`});return Tq(r)}var JE=class{escapedString;blocks;constructor(i,e){this.escapedString=i,this.blocks=e}};function wq(n,i,e){let t=[],o=[],r=0,a=0,c=-1,m,u;for(let h=0;h0;){let a=r.length,c=n.pop();for(let m=0;mo?`${e}${a}${i}`:`${e}${a}${t}${i}, ${e}${a} ${t}${i}`).join(",")}function Dq(n,i){let e=n.length;for(let t=1;t{class n{static nextListId=0;debugListId=n.nextListId++;head={kind:B.ListEnd,next:null,prev:null,debugListId:this.debugListId};tail={kind:B.ListEnd,next:null,prev:null,debugListId:this.debugListId};constructor(){this.head.next=this.tail,this.tail.prev=this.head}push(e){if(Array.isArray(e)){for(let o of e)this.push(o);return}n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=this.debugListId;let t=this.tail.prev;e.prev=t,t.next=e,e.next=this.tail,this.tail.prev=e}prepend(e){if(e.length===0)return;for(let r of e)n.assertIsNotEnd(r),n.assertIsUnowned(r),r.debugListId=this.debugListId;let t=this.head.next,o=this.head;for(let r of e)o.next=r,r.prev=o,o=r;o.next=t,t.prev=o}*[Symbol.iterator](){let e=this.head.next;for(;e!==this.tail;){n.assertIsOwned(e,this.debugListId);let t=e.next;yield e,e=t}}*reversed(){let e=this.tail.prev;for(;e!==this.head;){n.assertIsOwned(e,this.debugListId);let t=e.prev;yield e,e=t}}static replace(e,t){n.assertIsNotEnd(e),n.assertIsNotEnd(t),n.assertIsOwned(e),n.assertIsUnowned(t),t.debugListId=e.debugListId,e.prev!==null&&(e.prev.next=t,t.prev=e.prev),e.next!==null&&(e.next.prev=t,t.next=e.next),e.debugListId=null,e.prev=null,e.next=null}static replaceWithMany(e,t){if(t.length===0){n.remove(e);return}n.assertIsNotEnd(e),n.assertIsOwned(e);let o=e.debugListId;e.debugListId=null;for(let h of t)n.assertIsNotEnd(h),n.assertIsUnowned(h);let{prev:r,next:a}=e;e.prev=null,e.next=null;let c=r;for(let h of t)n.assertIsUnowned(h),h.debugListId=o,c.next=h,h.prev=c,h.next=null,c=h;let m=t[0],u=c;r!==null&&(r.next=m,m.prev=r),a!==null&&(a.prev=u,u.next=a)}static remove(e){n.assertIsNotEnd(e),n.assertIsOwned(e),e.prev.next=e.next,e.next.prev=e.prev,e.debugListId=null,e.prev=null,e.next=null}static insertBefore(e,t){if(Array.isArray(e)){for(let o of e)n.insertBefore(o,t);return}if(n.assertIsOwned(t),t.prev===null)throw new Error("AssertionError: illegal operation on list start");n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=t.debugListId,e.prev=null,t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e}static insertAfter(e,t){if(n.assertIsOwned(t),t.next===null)throw new Error("AssertionError: illegal operation on list end");n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=t.debugListId,t.next.prev=e,e.next=t.next,e.prev=t,t.next=e}static assertIsUnowned(e){if(e.debugListId!==null)throw new Error(`AssertionError: illegal operation on owned node: ${B[e.kind]}`)}static assertIsOwned(e,t){if(e.debugListId===null)throw new Error(`AssertionError: illegal operation on unowned node: ${B[e.kind]}`);if(t!==void 0&&e.debugListId!==t)throw new Error(`AssertionError: node belongs to the wrong list (expected ${t}, actual ${e.debugListId})`)}static assertIsNotEnd(e){if(e.kind===B.ListEnd)throw new Error("AssertionError: illegal operation on list head or tail")}}return n})();function js(n){return q({kind:B.Statement,statement:n},vn)}function xm(n,i,e,t){return q({kind:B.Variable,xref:n,variable:i,initializer:e,flags:t},vn)}var vn={debugListId:null,prev:null,next:null},$6=Symbol("ConsumesSlot"),lP=Symbol("DependsOnSlotContext"),Tu=Symbol("ConsumesVars"),ev=Symbol("UsesVarOffset"),ul={[$6]:!0,numSlotsUsed:1},hs={[lP]:!0},fs={[Tu]:!0};function _f(n){return n[$6]===!0}function N0(n){return n[lP]===!0}function tE(n){return n[Tu]===!0}function QR(n){return n[ev]===!0}function Pq(n,i,e){return q(q(q({kind:B.InterpolateText,target:n,interpolation:i,sourceSpan:e},hs),fs),vn)}var Xo=class{strings;expressions;i18nPlaceholders;constructor(i,e,t){if(this.strings=i,this.expressions=e,this.i18nPlaceholders=t,t.length!==0&&t.length!==e.length)throw new Error(`Expected ${e.length} placeholders to match interpolation expression count, but got ${t.length}`)}};function xu(n,i,e,t,o,r,a,c,m,u,h){return q({kind:B.Binding,bindingKind:i,target:n,name:e,expression:t,unit:o,securityContext:r,isTextAttribute:a,isStructuralTemplateAttribute:c,templateKind:m,i18nContext:null,i18nMessage:u,sourceSpan:h},vn)}function Iq(n,i,e,t,o,r,a,c,m,u){return q(q(q({kind:B.Property,target:n,name:i,expression:e,bindingKind:t,securityContext:o,sanitizer:null,isStructuralTemplateAttribute:r,templateKind:a,i18nContext:c,i18nMessage:m,sourceSpan:u},hs),fs),vn)}function Aq(n,i,e,t,o,r,a,c,m){return q(q(q({kind:B.TwoWayProperty,target:n,name:i,expression:e,securityContext:t,sanitizer:null,isStructuralTemplateAttribute:o,templateKind:r,i18nContext:a,i18nMessage:c,sourceSpan:m},hs),fs),vn)}function Oq(n,i,e,t,o){return q(q(q({kind:B.StyleProp,target:n,name:i,expression:e,unit:t,sourceSpan:o},hs),fs),vn)}function Nq(n,i,e,t){return q(q(q({kind:B.ClassProp,target:n,name:i,expression:e,sourceSpan:t},hs),fs),vn)}function Rq(n,i,e){return q(q(q({kind:B.StyleMap,target:n,expression:i,sourceSpan:e},hs),fs),vn)}function Fq(n,i,e){return q(q(q({kind:B.ClassMap,target:n,expression:i,sourceSpan:e},hs),fs),vn)}function XR(n,i,e,t,o,r,a,c,m,u){return q(q(q({kind:B.Attribute,target:n,namespace:i,name:e,expression:t,securityContext:o,sanitizer:null,isTextAttribute:r,isStructuralTemplateAttribute:a,templateKind:c,i18nContext:null,i18nMessage:m,sourceSpan:u},hs),fs),vn)}function Lq(n,i){return q({kind:B.Advance,delta:n,sourceSpan:i},vn)}function H6(n,i,e,t){return q(q(q({kind:B.Conditional,target:n,test:i,conditions:e,processed:null,sourceSpan:t,contextValue:null},vn),hs),fs)}function Bq(n,i,e,t){return q(q({kind:B.Repeater,target:n,targetSlot:i,collection:e,sourceSpan:t},vn),hs)}function YR(n,i,e,t,o,r,a){return q({kind:B.AnimationBinding,name:n,target:i,animationKind:e,expression:t,i18nMessage:null,securityContext:o,sanitizer:null,sourceSpan:r,animationBindingKind:a},vn)}function Vq(n,i,e,t){return q(q(q({kind:B.DeferWhen,target:n,expr:i,modifier:e,sourceSpan:t},vn),hs),fs)}function U6(n,i,e,t,o,r,a,c,m,u,h){return q(q(q({kind:B.I18nExpression,context:n,target:i,i18nOwner:e,handle:t,expression:o,icuPlaceholder:r,i18nPlaceholder:a,resolutionTime:c,usage:m,name:u,sourceSpan:h},vn),fs),hs)}function zq(n,i,e){return q({kind:B.I18nApply,owner:n,handle:i,sourceSpan:e},vn)}function jq(n,i,e,t){return q(q(q({kind:B.StoreLet,target:n,declaredName:i,value:e,sourceSpan:t},hs),fs),vn)}function $q(n,i){return q(q({kind:B.Control,sourceSpan:i,target:n},hs),vn)}function Lc(n){return n instanceof Ki}var Ki=class extends ji{constructor(i=null){super(null,i)}},Xr=class n extends Ki{name;kind=Kt.LexicalRead;constructor(i){super(),this.name=i}visitExpression(i,e){}isEquivalent(i){return this.name===i.name}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.name)}},Vb=class n extends Ki{target;targetSlot;offset;kind=Kt.Reference;constructor(i,e,t){super(),this.target=i,this.targetSlot=e,this.offset=t}visitExpression(){}isEquivalent(i){return i instanceof n&&i.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.target,this.targetSlot,this.offset)}},R0=class n extends Ki{target;value;sourceSpan;kind=Kt.StoreLet;[Tu]=!0;[lP]=!0;constructor(i,e,t){super(),this.target=i,this.value=e,this.sourceSpan=t}visitExpression(){}isEquivalent(i){return i instanceof n&&i.target===this.target&&i.value.isEquivalent(this.value)}isConstant(){return!1}transformInternalExpressions(i,e){this.value=Bt(this.value,i,e)}clone(){return new n(this.target,this.value,this.sourceSpan)}},F0=class n extends Ki{target;targetSlot;kind=Kt.ContextLetReference;constructor(i,e){super(),this.target=i,this.targetSlot=e}visitExpression(){}isEquivalent(i){return i instanceof n&&i.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.target,this.targetSlot)}},Am=class n extends Ki{view;kind=Kt.Context;constructor(i){super(),this.view=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.view)}},eD=class n extends Ki{view;kind=Kt.TrackContext;constructor(i){super(),this.view=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.view)}},zb=class n extends Ki{kind=Kt.NextContext;steps=1;visitExpression(){}isEquivalent(i){return i instanceof n&&i.steps===this.steps}isConstant(){return!1}transformInternalExpressions(){}clone(){let i=new n;return i.steps=this.steps,i}},tD=class n extends Ki{kind=Kt.GetCurrentView;constructor(){super()}visitExpression(){}isEquivalent(i){return i instanceof n}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n}},L0=class n extends Ki{view;kind=Kt.RestoreView;constructor(i){super(),this.view=i}visitExpression(i,e){typeof this.view!="number"&&this.view.visitExpression(i,e)}isEquivalent(i){return!(i instanceof n)||typeof i.view!=typeof this.view?!1:typeof this.view=="number"?this.view===i.view:this.view.isEquivalent(i.view)}isConstant(){return!1}transformInternalExpressions(i,e){typeof this.view!="number"&&(this.view=Bt(this.view,i,e))}clone(){return new n(this.view instanceof ji?this.view.clone():this.view)}},jb=class n extends Ki{expr;kind=Kt.ResetView;constructor(i){super(),this.expr=i}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof n&&this.expr.isEquivalent(i.expr)}isConstant(){return!1}transformInternalExpressions(i,e){this.expr=Bt(this.expr,i,e)}clone(){return new n(this.expr.clone())}},$b=class n extends Ki{target;value;kind=Kt.TwoWayBindingSet;constructor(i,e){super(),this.target=i,this.value=e}visitExpression(i,e){this.target.visitExpression(i,e),this.value.visitExpression(i,e)}isEquivalent(i){return this.target.isEquivalent(i.target)&&this.value.isEquivalent(i.value)}isConstant(){return!1}transformInternalExpressions(i,e){this.target=Bt(this.target,i,e),this.value=Bt(this.value,i,e)}clone(){return new n(this.target,this.value)}},Dd=class n extends Ki{xref;kind=Kt.ReadVariable;name=null;constructor(i){super(),this.xref=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.xref===this.xref}isConstant(){return!1}transformInternalExpressions(){}clone(){let i=new n(this.xref);return i.name=this.name,i}},yu=class n extends Ki{kind=Kt.PureFunctionExpr;[Tu]=!0;[ev]=!0;varOffset=null;body;args;fn=null;constructor(i,e){super(),this.body=i,this.args=e}visitExpression(i,e){this.body?.visitExpression(i,e);for(let t of this.args)t.visitExpression(i,e)}isEquivalent(i){return!(i instanceof n)||i.args.length!==this.args.length?!1:i.body!==null&&this.body!==null&&i.body.isEquivalent(this.body)&&i.args.every((e,t)=>e.isEquivalent(this.args[t]))}isConstant(){return!1}transformInternalExpressions(i,e){this.body!==null?this.body=Bt(this.body,i,e|qn.InChildOperation):this.fn!==null&&(this.fn=Bt(this.fn,i,e));for(let t=0;te.clone()));return i.fn=this.fn?.clone()??null,i.varOffset=this.varOffset,i}},Om=class n extends Ki{index;kind=Kt.PureFunctionParameterExpr;constructor(i){super(),this.index=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.index===this.index}isConstant(){return!0}transformInternalExpressions(){}clone(){return new n(this.index)}},Su=class n extends Ki{target;targetSlot;name;args;kind=Kt.PipeBinding;[Tu]=!0;[ev]=!0;varOffset=null;constructor(i,e,t,o){super(),this.target=i,this.targetSlot=e,this.name=t,this.args=o}visitExpression(i,e){for(let t of this.args)t.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){for(let t=0;te.clone()));return i.varOffset=this.varOffset,i}},B0=class n extends Ki{target;targetSlot;name;args;numArgs;kind=Kt.PipeBindingVariadic;[Tu]=!0;[ev]=!0;varOffset=null;constructor(i,e,t,o,r){super(),this.target=i,this.targetSlot=e,this.name=t,this.args=o,this.numArgs=r}visitExpression(i,e){this.args.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.args=Bt(this.args,i,e)}clone(){let i=new n(this.target,this.targetSlot,this.name,this.args.clone(),this.numArgs);return i.varOffset=this.varOffset,i}},lf=class n extends Ki{receiver;name;kind=Kt.SafePropertyRead;constructor(i,e){super(),this.receiver=i,this.name=e}get index(){return this.name}visitExpression(i,e){this.receiver.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=Bt(this.receiver,i,e)}clone(){return new n(this.receiver.clone(),this.name)}},cf=class n extends Ki{receiver;index;kind=Kt.SafeKeyedRead;constructor(i,e,t){super(t),this.receiver=i,this.index=e}visitExpression(i,e){this.receiver.visitExpression(i,e),this.index.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=Bt(this.receiver,i,e),this.index=Bt(this.index,i,e)}clone(){return new n(this.receiver.clone(),this.index.clone(),this.sourceSpan)}},wu=class n extends Ki{receiver;args;kind=Kt.SafeInvokeFunction;constructor(i,e){super(),this.receiver=i,this.args=e}visitExpression(i,e){this.receiver.visitExpression(i,e);for(let t of this.args)t.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=Bt(this.receiver,i,e);for(let t=0;ti.clone()))}},df=class n extends Ki{guard;expr;kind=Kt.SafeTernaryExpr;constructor(i,e){super(),this.guard=i,this.expr=e}visitExpression(i,e){this.guard.visitExpression(i,e),this.expr.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.guard=Bt(this.guard,i,e),this.expr=Bt(this.expr,i,e)}clone(){return new n(this.guard.clone(),this.expr.clone())}},V0=class n extends Ki{kind=Kt.EmptyExpr;visitExpression(i,e){}isEquivalent(i){return i instanceof n}isConstant(){return!0}clone(){return new n}transformInternalExpressions(){}},Bc=class n extends Ki{expr;xref;kind=Kt.AssignTemporaryExpr;name=null;constructor(i,e){super(),this.expr=i,this.xref=e}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.expr=Bt(this.expr,i,e)}clone(){let i=new n(this.expr.clone(),this.xref);return i.name=this.name,i}},Nm=class n extends Ki{xref;kind=Kt.ReadTemporaryExpr;name=null;constructor(i){super(),this.xref=i}visitExpression(i,e){}isEquivalent(){return this.xref===this.xref}isConstant(){return!1}transformInternalExpressions(i,e){}clone(){let i=new n(this.xref);return i.name=this.name,i}},Hb=class n extends Ki{slot;kind=Kt.SlotLiteralExpr;constructor(i){super(),this.slot=i}visitExpression(i,e){}isEquivalent(i){return i instanceof n&&i.slot===this.slot}isConstant(){return!0}clone(){return new n(this.slot)}transformInternalExpressions(){}},Ub=class n extends Ki{expr;target;targetSlot;alias;kind=Kt.ConditionalCase;constructor(i,e,t,o=null){super(),this.expr=i,this.target=e,this.targetSlot=t,this.alias=o}visitExpression(i,e){this.expr!==null&&this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof n&&i.expr===this.expr}isConstant(){return!0}clone(){return new n(this.expr,this.target,this.targetSlot)}transformInternalExpressions(i,e){this.expr!==null&&(this.expr=Bt(this.expr,i,e))}},z0=class n extends Ki{expr;kind=Kt.ConstCollected;constructor(i){super(),this.expr=i}transformInternalExpressions(i,e){this.expr=i(this.expr,e)}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof n?this.expr.isEquivalent(i.expr):!1}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr)}},nD=class n extends Ki{parameters;body;kind=Kt.ArrowFunction;[Tu]=!0;[ev]=!0;contextName=zs;currentViewName="view";varOffset=null;ops;constructor(i,e){super(),this.parameters=i,this.body=e,this.ops=new Qe,this.ops.push([js(new Mr(e,e.sourceSpan))])}visitExpression(i,e){for(let t of this.ops)fr(t,o=>{o.visitExpression(i,e)})}isEquivalent(i){return i instanceof n&&i.parameters.length===this.parameters.length&&i.parameters.every((e,t)=>e.isEquivalent(this.parameters[t]))&&i.body.isEquivalent(this.body)}isConstant(){return!1}transformInternalExpressions(i,e){for(let t of this.ops)Yo(t,i,e|(qn.InChildOperation|qn.InArrowFunctionOperation))}clone(){let i=new n(this.parameters,this.body);return i.varOffset=this.varOffset,i.ops=this.ops,i}};function fr(n,i){Yo(n,(e,t)=>(i(e,t),e),qn.None)}var qn=(function(n){return n[n.None=0]="None",n[n.InChildOperation=1]="InChildOperation",n[n.InArrowFunctionOperation=2]="InArrowFunctionOperation",n})(qn||{});function nE(n,i,e){for(let t=0;tBt(t,i,e));else if(n instanceof ku)if(Array.isArray(n.body))for(let t=0;t{!a&&N0(c)&&c.target!==r.xref&&(a=!0)}),a)break;e=e.next}}}}function fQ(n){if(!(!n.enableDebugLocations||n.relativeTemplatePath===null))for(let i of n.units){let e=[];for(let t of i.create)if(t.kind===B.ElementStart||t.kind===B.Element){let o=t.startSourceSpan.start;e.push({targetSlot:t.handle,offset:o.offset,line:o.line,column:o.col})}e.length>0&&i.create.push(sQ(n.relativeTemplatePath,e))}}function e8(n){let i=new Map;for(let e of n.create)_f(e)&&(i.set(e.xref,e),e.kind===B.RepeaterCreate&&e.emptyView!==null&&i.set(e.emptyView,e));return i}function gQ(n){for(let i of n.units){let e=e8(i);for(let t of i.ops())switch(t.kind){case B.Attribute:_Q(i,t,e);break;case B.Property:if(t.bindingKind!==Gt.LegacyAnimation&&t.bindingKind!==Gt.Animation){let o;t.i18nMessage!==null&&t.templateKind===null?o=Gt.I18n:t.isStructuralTemplateAttribute?o=Gt.Template:o=Gt.Property,Qe.insertBefore(cl(t.target,o,null,t.name,null,null,null,t.securityContext),Bh(e,t.target))}break;case B.TwoWayProperty:Qe.insertBefore(cl(t.target,Gt.TwoWayProperty,null,t.name,null,null,null,t.securityContext),Bh(e,t.target));break;case B.StyleProp:case B.ClassProp:t.expression instanceof V0&&Qe.insertBefore(cl(t.target,Gt.Property,null,t.name,null,null,null,ro.STYLE),Bh(e,t.target));break;case B.Listener:if(!t.isLegacyAnimationListener){let o=cl(t.target,Gt.Property,null,t.name,null,null,null,ro.NONE);if(n.kind===Dt.Host)break;Qe.insertBefore(o,Bh(e,t.target))}break;case B.TwoWayListener:if(n.kind!==Dt.Host){let o=cl(t.target,Gt.Property,null,t.name,null,null,null,ro.NONE);Qe.insertBefore(o,Bh(e,t.target))}break}}}function Bh(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function _Q(n,i,e){if(!(i.expression instanceof Xo)&&i.isTextAttribute){let t=cl(i.target,i.isStructuralTemplateAttribute?Gt.Template:Gt.Attribute,i.namespace,i.name,i.expression,i.i18nContext,i.i18nMessage,i.securityContext);if(n.job.kind===Dt.Host)n.create.push(t);else{let o=Bh(e,i.target);Qe.insertBefore(t,o)}Qe.remove(i)}}var KR="aria-";function t8(n){return n.startsWith(KR)&&n.length>KR.length}function vQ(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function CQ(n){let i=new Map;for(let e of n.units)for(let t of e.create)Rm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.ops())if(t.kind===B.Binding)switch(t.bindingKind){case Gt.Attribute:if(t.name==="ngNonBindable"){Qe.remove(t);let o=vQ(i,t.target);o.nonBindable=!0}else if(t.name.startsWith("animate."))Qe.replace(t,YR(t.name,t.target,t.name==="animate.enter"?"enter":"leave",t.expression,t.securityContext,t.sourceSpan,0));else{let[o,r]=Xl(t.name);Qe.replace(t,XR(t.target,o,r,t.expression,t.securityContext,t.isTextAttribute,t.isStructuralTemplateAttribute,t.templateKind,t.i18nMessage,t.sourceSpan))}break;case Gt.Animation:Qe.replace(t,YR(t.name,t.target,t.name==="animate.enter"?"enter":"leave",t.expression,t.securityContext,t.sourceSpan,1));break;case Gt.Property:case Gt.LegacyAnimation:n.mode===as.DomOnly&&t8(t.name)?Qe.replace(t,XR(t.target,null,t.name,t.expression,t.securityContext,!1,t.isStructuralTemplateAttribute,t.templateKind,t.i18nMessage,t.sourceSpan)):n.kind===Dt.Host?Qe.replace(t,cQ(t.name,t.expression,t.bindingKind,t.i18nContext,t.securityContext,t.sourceSpan)):Qe.replace(t,Iq(t.target,t.name,t.expression,t.bindingKind,t.securityContext,t.isStructuralTemplateAttribute,t.templateKind,t.i18nContext,t.i18nMessage,t.sourceSpan));break;case Gt.TwoWayProperty:if(!(t.expression instanceof ji))throw new Error(`Expected value of two-way property binding "${t.name}" to be an expression`);Qe.replace(t,Aq(t.target,t.name,t.expression,t.securityContext,t.isStructuralTemplateAttribute,t.templateKind,t.i18nContext,t.i18nMessage,t.sourceSpan));break;case Gt.I18n:case Gt.ClassName:case Gt.StyleProperty:throw new Error(`Unhandled binding of kind ${Gt[t.bindingKind]}`)}}var ZR=new Map([[fe.ariaProperty,fe.ariaProperty],[fe.attribute,fe.attribute],[fe.classProp,fe.classProp],[fe.element,fe.element],[fe.elementContainer,fe.elementContainer],[fe.elementContainerEnd,fe.elementContainerEnd],[fe.elementContainerStart,fe.elementContainerStart],[fe.elementEnd,fe.elementEnd],[fe.elementStart,fe.elementStart],[fe.domProperty,fe.domProperty],[fe.i18nExp,fe.i18nExp],[fe.listener,fe.listener],[fe.listener,fe.listener],[fe.property,fe.property],[fe.styleProp,fe.styleProp],[fe.syntheticHostListener,fe.syntheticHostListener],[fe.syntheticHostProperty,fe.syntheticHostProperty],[fe.templateCreate,fe.templateCreate],[fe.twoWayProperty,fe.twoWayProperty],[fe.twoWayListener,fe.twoWayListener],[fe.declareLet,fe.declareLet],[fe.conditionalCreate,fe.conditionalBranchCreate],[fe.conditionalBranchCreate,fe.conditionalBranchCreate],[fe.domElement,fe.domElement],[fe.domElementStart,fe.domElementStart],[fe.domElementEnd,fe.domElementEnd],[fe.domElementContainer,fe.domElementContainer],[fe.domElementContainerStart,fe.domElementContainerStart],[fe.domElementContainerEnd,fe.domElementContainerEnd],[fe.domListener,fe.domListener],[fe.domTemplate,fe.domTemplate],[fe.animationEnter,fe.animationEnter],[fe.animationLeave,fe.animationLeave],[fe.animationEnterListener,fe.animationEnterListener],[fe.animationLeaveListener,fe.animationLeaveListener]]),bQ=256;function xQ(n){for(let i of n.units)JR(i.create),JR(i.update)}function JR(n){let i=null;for(let e of n){if(e.kind!==B.Statement||!(e.statement instanceof ha)){i=null;continue}if(!(e.statement.expr instanceof ps)||!(e.statement.expr.fn instanceof pu)){i=null;continue}let t=e.statement.expr.fn.value;if(!ZR.has(t)){i=null;continue}if(i!==null&&ZR.get(i.instruction)===t&&i.lengtho==="")&&(e.expression=e.expression.expressions[0])}function SQ(n){for(let i of n.units)for(let e of i.ops()){if(e.kind!==B.Conditional)continue;let t,o=e.conditions.findIndex(c=>c.expr===null);if(o>=0){let c=e.conditions.splice(o,1)[0].targetSlot;t=new Hb(c)}else t=ke(-1);let r=e.test==null?null:new Bc(e.test,n.allocateXrefId()),a=null;for(let c=e.conditions.length-1;c>=0;c--){let m=e.conditions[c];if(m.expr!==null){if(r!==null){let u=c===0?r:new Nm(r.xref);m.expr=new Ci(lt.Identical,u,m.expr)}else m.alias!==null&&(a??=n.allocateXrefId(),m.expr=new Bc(m.expr,a),e.contextValue=new Nm(a));t=new Ac(m.expr,new Hb(m.targetSlot),t)}}e.processed=t,e.conditions=[]}}var wQ=new Map([["&&",lt.And],[">",lt.Bigger],[">=",lt.BiggerEquals],["|",lt.BitwiseOr],["&",lt.BitwiseAnd],["/",lt.Divide],["=",lt.Assign],["==",lt.Equals],["===",lt.Identical],["<",lt.Lower],["<=",lt.LowerEquals],["-",lt.Minus],["%",lt.Modulo],["**",lt.Exponentiation],["*",lt.Multiply],["!=",lt.NotEquals],["!==",lt.NotIdentical],["??",lt.NullishCoalesce],["||",lt.Or],["+",lt.Plus],["in",lt.In],["instanceof",lt.InstanceOf],["+=",lt.AdditionAssignment],["-=",lt.SubtractionAssignment],["*=",lt.MultiplicationAssignment],["/=",lt.DivisionAssignment],["%=",lt.RemainderAssignment],["**=",lt.ExponentiationAssignment],["&&=",lt.AndAssignment],["||=",lt.OrAssignment],["??=",lt.NullishCoalesceAssignment]]);function n8(n){let i=new Map([["svg",ka.SVG],["math",ka.Math]]);return n===null?ka.HTML:i.get(n)??ka.HTML}function MQ(n){let i=new Map([["svg",ka.SVG],["math",ka.Math]]);for(let[e,t]of i.entries())if(t===n)return e;return null}function kQ(n,i){return i===ka.HTML?n:`:${MQ(i)}:${n}`}function mf(n){return Array.isArray(n)?Yi(n.map(mf)):ke(n)}function TQ(n){let i=new Map;for(let e of n.units)for(let t of e.create)if(t.kind===B.ExtractedAttribute){let o=i.get(t.target)||new oD;i.set(t.target,o),o.add(t.bindingKind,t.name,t.expression,t.namespace,t.trustedValueFn),Qe.remove(t)}if(n instanceof j0)for(let e of n.units)for(let t of e.create)if(t.kind==B.Projection){let o=i.get(t.xref);if(o!==void 0){let r=rD(o);r.entries.length>0&&(t.attributes=r)}}else Rm(t)&&(t.attributes=eF(n,i,t.xref),t.kind===B.RepeaterCreate&&t.emptyView!==null&&(t.emptyAttributes=eF(n,i,t.emptyView)));else if(n instanceof Qb)for(let[e,t]of i.entries()){if(e!==n.root.xref)throw new Error("An attribute would be const collected into the host binding's template function, but is not associated with the root xref.");let o=rD(t);o.entries.length>0&&(n.root.attributes=o)}}function eF(n,i,e){let t=i.get(e);if(t!==void 0){let o=rD(t);if(o.entries.length>0)return n.addConst(o)}return null}var Ah=Object.freeze([]),oD=class{known=new Map;byKind=new Map;propertyBindings=null;projectAs=null;get attributes(){return this.byKind.get(Gt.Attribute)??Ah}get classes(){return this.byKind.get(Gt.ClassName)??Ah}get styles(){return this.byKind.get(Gt.StyleProperty)??Ah}get bindings(){return this.propertyBindings??Ah}get template(){return this.byKind.get(Gt.Template)??Ah}get i18n(){return this.byKind.get(Gt.I18n)??Ah}isKnown(i,e){let t=this.known.get(i)??new Set;return this.known.set(i,t),t.has(e)?!0:(t.add(e),!1)}add(i,e,t,o,r){if(!(i===Gt.Attribute||i===Gt.ClassName||i===Gt.StyleProperty)&&this.isKnown(i,e))return;if(e==="ngProjectAs"){if(t===null||!(t instanceof ua)||t.value==null||typeof t.value?.toString()!="string")throw Error("ngProjectAs must have a string literal value");this.projectAs=t.value.toString()}let c=this.arrayFor(i);if(c.push(...EQ(o,e)),i===Gt.Attribute||i===Gt.StyleProperty){if(t===null)throw Error("Attribute, i18n attribute, & style element attributes must have a value");if(r!==null){if(!G6(t))throw Error("AssertionError: extracted attribute value should be string literal");c.push(UG(r,new n0([new cb(t.value)],[]),void 0,t.sourceSpan))}else c.push(t)}}arrayFor(i){return i===Gt.Property||i===Gt.TwoWayProperty?(this.propertyBindings??=[],this.propertyBindings):(this.byKind.has(i)||this.byKind.set(i,[]),this.byKind.get(i))}};function EQ(n,i){let e=ke(i);return n?[ke(0),ke(n),e]:[e]}function rD({attributes:n,bindings:i,classes:e,i18n:t,projectAs:o,styles:r,template:a}){let c=[...n];if(o!==null){let m=XD(o)[0];c.push(ke(5),mf(m))}return e.length>0&&c.push(ke(1),...e),r.length>0&&c.push(ke(2),...r),i.length>0&&c.push(ke(3),...i),a.length>0&&c.push(ke(4),...a),t.length>0&&c.push(ke(6),...t),Yi(c)}function DQ(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function PQ(n){let i=new Map;for(let e of n.units)for(let t of e.create)Rm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.ops())if(t.kind===B.AnimationBinding){let o=IQ(t);n.kind===Dt.Host?e.create.push(o):Qe.insertAfter(o,DQ(i,t.target)),Qe.remove(t)}}function IQ(n){if(n.animationBindingKind===0)return Xq(n.name,n.target,n.name==="animate.enter"?"enter":"leave",n.expression,n.securityContext,n.sourceSpan);{let i=n.expression;return Yq(n.name,n.target,n.name==="animate.enter"?"enter":"leave",[js(new Mr(i,i.sourceSpan))],n.securityContext,n.sourceSpan)}}function AQ(n){let i=new Map;for(let e of n.units){for(let t of e.create)t.kind===B.I18nAttributes&&i.set(t.target,t);for(let t of e.update)switch(t.kind){case B.Property:case B.Attribute:if(t.i18nContext===null||!(t.expression instanceof Xo))continue;let o=i.get(t.target);if(o===void 0)throw new Error("AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction");if(o.target!==t.target)throw new Error("AssertionError: Expected i18nAttributes target element to match binding target element");let r=[];for(let a=0;aqQ(t,{job:n}),qn.None),Yo(e,QQ,qn.None)}function As(n){return n instanceof uu?As(n.expr):n instanceof Ci?As(n.lhs)||As(n.rhs):n instanceof Ac?n.falseCase&&As(n.falseCase)?!0:As(n.condition)||As(n.trueCase):n instanceof i0?As(n.condition):n instanceof Bc?As(n.expr):n instanceof Bs?As(n.receiver):n instanceof Pd?As(n.receiver)||As(n.index):n instanceof ql?As(n.expr):n instanceof ps||n instanceof Oc||n instanceof Ql||n instanceof wu||n instanceof Su}function $Q(n){let i=new Set;return Bt(n,e=>(e instanceof Bc&&i.add(e.xref),e),qn.None),i}function HQ(n,i,e){return Bt(n,t=>{if(t instanceof Bc&&i.has(t.xref)){let o=new Nm(t.xref);return new Bc(o,o.xref)}return t},qn.None),n}function Oh(n,i,e){let t;if(As(n)){let o=e.job.allocateXrefId();t=[new Bc(n,o),new Nm(o)]}else t=[n,n.clone()],HQ(t[1],$Q(t[0]));return new df(t[0],i(t[1]))}function UQ(n){return n instanceof lf||n instanceof cf||n instanceof wu}function GQ(n){return n instanceof Bs||n instanceof Pd||n instanceof ps}function i8(n){return UQ(n)||GQ(n)}function WQ(n){if(i8(n)&&n.receiver instanceof df){let i=n.receiver;for(;i.expr instanceof df;)i=i.expr;return i}return null}function qQ(n,i){if(!i8(n))return n;let e=WQ(n);if(e){if(n instanceof ps)return e.expr=e.expr.callFn(n.args),n.receiver;if(n instanceof Bs)return e.expr=e.expr.prop(n.name),n.receiver;if(n instanceof Pd)return e.expr=e.expr.key(n.index),n.receiver;if(n instanceof wu)return e.expr=Oh(e.expr,t=>t.callFn(n.args),i),n.receiver;if(n instanceof lf)return e.expr=Oh(e.expr,t=>t.prop(n.name),i),n.receiver;if(n instanceof cf)return e.expr=Oh(e.expr,t=>t.key(n.index),i),n.receiver}else{if(n instanceof wu)return Oh(n.receiver,t=>t.callFn(n.args),i);if(n instanceof lf)return Oh(n.receiver,t=>t.prop(n.name),i);if(n instanceof cf)return Oh(n.receiver,t=>t.key(n.index),i)}return n}function QQ(n){return n instanceof df?new ql(new Ac(new Ci(lt.Equals,n.guard,Kh),Kh,n.expr)):n}var tF="\uFFFD",XQ="#",YQ="*",KQ="/",ZQ=":",JQ="[",eX="]",tX="|";function nX(n){let i=new Map,e=new Map,t=new Map;for(let r of n.units)for(let a of r.create)switch(a.kind){case B.I18nContext:let c=iX(n,a);r.create.push(c),i.set(a.xref,c),t.set(a.xref,a);break;case B.I18nStart:e.set(a.xref,a);break}let o=null;for(let r of n.units)for(let a of r.create)switch(a.kind){case B.IcuStart:o=a,Qe.remove(a);let c=t.get(a.context);if(c.contextKind!==nu.Icu)continue;let m=e.get(c.i18nBlock);if(m.context===c.xref)continue;let u=e.get(m.root),h=i.get(u.context);if(h===void 0)throw Error("AssertionError: ICU sub-message should belong to a root message.");let g=i.get(c.xref);g.messagePlaceholder=a.messagePlaceholder,h.subMessages.push(g.xref);break;case B.IcuEnd:o=null,Qe.remove(a);break;case B.IcuPlaceholder:if(o===null||o.context==null)throw Error("AssertionError: Unexpected ICU placeholder outside of i18n context");i.get(o.context).postprocessingParams.set(a.name,ke(oX(a))),Qe.remove(a);break}}function iX(n,i,e){let t=nF(i.params),o=nF(i.postprocessingParams),r=[...i.params.values()].some(a=>a.length>1);return iQ(n.allocateXrefId(),i.xref,i.i18nBlock,i.message,null,t,o,r)}function oX(n){if(n.strings.length!==n.expressionPlaceholders.length+1)throw Error(`AssertionError: Invalid ICU placeholder with ${n.strings.length} strings and ${n.expressionPlaceholders.length} expressions`);let i=n.expressionPlaceholders.map($h);return n.strings.flatMap((e,t)=>[e,i[t]||""]).join("")}function nF(n){let i=new Map;for(let[e,t]of n){let o=rX(t);o!==null&&i.set(e,ke(o))}return i}function rX(n){if(n.length===0)return null;let i=n.map(e=>$h(e));return i.length===1?i[0]:`${JQ}${i.join(tX)}${eX}`}function $h(n){if(n.flags&mo.ElementTag&&n.flags&mo.TemplateTag){if(typeof n.value!="object")throw Error("AssertionError: Expected i18n param value to have an element and template slot");let o=$h(We(q({},n),{value:n.value.element,flags:n.flags&~mo.TemplateTag})),r=$h(We(q({},n),{value:n.value.template,flags:n.flags&~mo.ElementTag}));return n.flags&mo.OpenTag&&n.flags&mo.CloseTag?`${r}${o}${r}`:n.flags&mo.CloseTag?`${o}${r}`:`${r}${o}`}if(n.flags&mo.OpenTag&&n.flags&mo.CloseTag)return`${$h(We(q({},n),{flags:n.flags&~mo.CloseTag}))}${$h(We(q({},n),{flags:n.flags&~mo.OpenTag}))}`;if(n.flags===mo.None)return`${n.value}`;let i="",e="";n.flags&mo.ElementTag?i=XQ:n.flags&mo.TemplateTag&&(i=YQ),i!==""&&(e=n.flags&mo.CloseTag?KQ:"");let t=n.subTemplateIndex===null?"":`${ZQ}${n.subTemplateIndex}`;return`${tF}${e}${i}${n.value}${t}${tF}`}function aX(n){for(let i of n.units){let e=new Map;for(let o of i.create){if(_f(o)){if(o.handle.slot===null)throw new Error("AssertionError: expected slots to have been allocated before generating advance() calls")}else continue;e.set(o.xref,o.handle.slot)}let t=0;for(let o of i.update){let r=null;if(N0(o)?r=o:fr(o,c=>{r===null&&N0(c)&&(r=c)}),r===null)continue;if(!e.has(r.target))throw new Error(`AssertionError: reference to unknown slot for target ${r.target}`);let a=e.get(r.target);if(t!==a){let c=a-t;if(c<0)throw new Error("AssertionError: slot counter should never need to move backwards");Qe.insertBefore(Lq(c,r.sourceSpan),o),t=a}}}}function sX(n){for(let i of n.units)for(let e of i.update){if(e.kind!==B.StoreLet)continue;let t={kind:Kr.Identifier,name:null,identifier:e.declaredName,local:!0};Qe.replace(e,xm(n.allocateXrefId(),t,new R0(e.target,e.value,e.sourceSpan),ll.None))}}function lX(n){let e=[],t=0;for(let o of n.units)for(let r of o.create)r.kind===B.Projection&&(e.push(r.selector),r.projectionSlotIndex=t++);if(e.length>0){let o=null;if(e.length>1||e[0]!=="*"){let r=e.map(a=>a==="*"?a:XD(a));o=n.pool.getConstLiteral(mf(r),!0)}n.contentSelectors=n.pool.getConstLiteral(mf(e),!0),n.root.create.prepend([Jq(o)])}}function cX(n){z_(n.root,null)}function z_(n,i){let e=iF(n,i);for(let t of n.create)switch(t.kind){case B.ConditionalCreate:case B.ConditionalBranchCreate:case B.Template:z_(n.job.views.get(t.xref),e);break;case B.Projection:t.fallbackView!==null&&z_(n.job.views.get(t.fallbackView),e);break;case B.RepeaterCreate:z_(n.job.views.get(t.xref),e),t.emptyView&&z_(n.job.views.get(t.emptyView),e),t.trackByOps!==null&&t.trackByOps.prepend(j_(n,e,!1));break;case B.Animation:case B.AnimationListener:case B.Listener:case B.TwoWayListener:t.handlerOps.prepend(j_(n,e,!0));break}n.update.prepend(j_(n,e,!1));for(let t of n.functions)t.ops.prepend(j_(n,iF(n,i),!0))}function iF(n,i){let e={view:n.xref,viewContextVariable:{kind:Kr.Context,name:null,view:n.xref},contextVariables:new Map,aliases:n.aliases,references:[],letDeclarations:[],parent:i};for(let t of n.contextVariables.keys())e.contextVariables.set(t,{kind:Kr.Identifier,name:null,identifier:t,local:!1});for(let t of n.create)switch(t.kind){case B.ElementStart:case B.ConditionalCreate:case B.ConditionalBranchCreate:case B.Template:if(!Array.isArray(t.localRefs))throw new Error("AssertionError: expected localRefs to be an array");for(let o=0;ot instanceof z0?ke(n.addConst(t.expr)):t,qn.None)}var oF="style.",rF="class.",mX="style!",aF="class!",sF="!important";function pX(n){for(let i of n.root.update)if(i.kind===B.Binding&&i.bindingKind===Gt.Property)if(i.name.endsWith(sF)&&(i.name=i.name.substring(0,i.name.length-sF.length)),i.name.startsWith(oF)){i.bindingKind=Gt.StyleProperty,i.name=i.name.substring(oF.length),uX(i.name)||(i.name=hX(i.name));let{property:e,suffix:t}=oE(i.name);i.name=e,i.unit=t}else i.name.startsWith(mX)?(i.bindingKind=Gt.StyleProperty,i.name="style"):i.name.startsWith(rF)?(i.bindingKind=Gt.ClassName,i.name=oE(i.name.substring(rF.length)).property):i.name.startsWith(aF)&&(i.bindingKind=Gt.ClassName,i.name=oE(i.name.substring(aF.length)).property)}function uX(n){return n.startsWith("--")}function hX(n){return n.replace(/[a-z][A-Z]/g,i=>i.charAt(0)+"-"+i.charAt(1)).toLowerCase()}function oE(n){let i=n.indexOf("!important");i!==-1&&(n=i>0?n.substring(0,i):"");let e=null,t=n,o=n.lastIndexOf(".");return o>0&&(e=n.slice(o+1),t=n.substring(0,o)),{property:t,suffix:e}}function aD(n,i=!1){return pl(Object.keys(n).map(e=>({key:e,quoted:i,value:n[e]})))}var sD=class{visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){let e=Object.keys(i.cases).map(o=>`${o} {${i.cases[o].visit(this)}}`);return`{${i.expressionPlaceholder}, ${i.type}, ${e.join(" ")}}`}visitTagPlaceholder(i){return i.isVoid?this.formatPh(i.startName):`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitPlaceholder(i){return this.formatPh(i.name)}visitBlockPlaceholder(i){return`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitIcuPlaceholder(i,e){return this.formatPh(i.name)}formatPh(i){return`{${Z0(i,!1)}}`}},fX=new sD;function o8(n){return n.visit(fX)}var Id=class{sourceSpan;i18n;constructor(i,e){this.sourceSpan=i,this.i18n=e}},Mu=class extends Id{value;tokens;constructor(i,e,t,o){super(e,o),this.value=i,this.tokens=t}visit(i,e){return i.visitText(this,e)}},su=class extends Id{switchValue;type;cases;switchValueSourceSpan;constructor(i,e,t,o,r,a){super(o,a),this.switchValue=i,this.type=e,this.cases=t,this.switchValueSourceSpan=r}visit(i,e){return i.visitExpansion(this,e)}},Xb=class{value;expression;sourceSpan;valueSourceSpan;expSourceSpan;constructor(i,e,t,o,r){this.value=i,this.expression=e,this.sourceSpan=t,this.valueSourceSpan=o,this.expSourceSpan=r}visit(i,e){return i.visitExpansionCase(this,e)}},lD=class extends Id{name;value;keySpan;valueSpan;valueTokens;constructor(i,e,t,o,r,a,c){super(t,c),this.name=i,this.value=e,this.keySpan=o,this.valueSpan=r,this.valueTokens=a}visit(i,e){return i.visitAttribute(this,e)}},il=class extends Id{name;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;isVoid;constructor(i,e,t,o,r,a,c,m=null,u,h){super(a,h),this.name=i,this.attrs=e,this.directives=t,this.children=o,this.isSelfClosing=r,this.startSourceSpan=c,this.endSourceSpan=m,this.isVoid=u}visit(i,e){return i.visitElement(this,e)}},$0=class{value;sourceSpan;constructor(i,e){this.value=i,this.sourceSpan=e}visit(i,e){return i.visitComment(this,e)}},al=class extends Id{name;parameters;children;nameSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c=null,m){super(o,m),this.name=i,this.parameters=e,this.children=t,this.nameSpan=r,this.startSourceSpan=a,this.endSourceSpan=c}visit(i,e){return i.visitBlock(this,e)}},Ha=class extends Id{componentName;tagName;fullName;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c,m,u,h=null,g){super(m,g),this.componentName=i,this.tagName=e,this.fullName=t,this.attrs=o,this.directives=r,this.children=a,this.isSelfClosing=c,this.startSourceSpan=u,this.endSourceSpan=h}visit(i,e){return i.visitComponent(this,e)}},cD=class{name;attrs;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r=null){this.name=i,this.attrs=e,this.sourceSpan=t,this.startSourceSpan=o,this.endSourceSpan=r}visit(i,e){return i.visitDirective(this,e)}},Yb=class{expression;sourceSpan;constructor(i,e){this.expression=i,this.sourceSpan=e}visit(i,e){return i.visitBlockParameter(this,e)}},Kb=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.nameSpan=o,this.valueSpan=r}visit(i,e){return i.visitLetDeclaration(this,e)}};function So(n,i,e=null){let t=[],o=n.visit?r=>n.visit(r,e)||r.visit(n,e):r=>r.visit(n,e);return i.forEach(r=>{let a=o(r);a&&t.push(a)}),t}var H0={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\u224E",HumpDownHump:"\u224E",bump:"\u224E",CHcy:"\u0427",COPY:"\xA9",copy:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212D",Cfr:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",cedil:"\xB8",CenterDot:"\xB7",centerdot:"\xB7",middot:"\xB7",Chi:"\u03A7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201D",rdquo:"\u201D",rdquor:"\u201D",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2A74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222F",DoubleContourIntegral:"\u222F",ContourIntegral:"\u222E",conint:"\u222E",oint:"\u222E",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",asympeq:"\u224D",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",DoubleLeftTee:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",acute:"\xB4",DiacriticalDot:"\u02D9",dot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",dblac:"\u02DD",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02DC",tilde:"\u02DC",Diamond:"\u22C4",diam:"\u22C4",diamond:"\u22C4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DoubleDot:"\xA8",die:"\xA8",uml:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21D3",Downarrow:"\u21D3",dArr:"\u21D3",DoubleLeftArrow:"\u21D0",Leftarrow:"\u21D0",lArr:"\u21D0",DoubleLeftRightArrow:"\u21D4",Leftrightarrow:"\u21D4",hArr:"\u21D4",iff:"\u21D4",DoubleLongLeftArrow:"\u27F8",Longleftarrow:"\u27F8",xlArr:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",Longleftrightarrow:"\u27FA",xhArr:"\u27FA",DoubleLongRightArrow:"\u27F9",Longrightarrow:"\u27F9",xrArr:"\u27F9",DoubleRightArrow:"\u21D2",Implies:"\u21D2",Rightarrow:"\u21D2",rArr:"\u21D2",DoubleRightTee:"\u22A8",vDash:"\u22A8",DoubleUpArrow:"\u21D1",Uparrow:"\u21D1",uArr:"\u21D1",DoubleUpDownArrow:"\u21D5",Updownarrow:"\u21D5",vArr:"\u21D5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",duarr:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",leftharpoondown:"\u21BD",lhard:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",rhard:"\u21C1",rightharpoondown:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",top:"\u22A4",DownTeeArrow:"\u21A7",mapstodown:"\u21A7",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21CC",rightleftharpoons:"\u21CC",rlhar:"\u21CC",Escr:"\u2130",expectation:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",blacksquare:"\u25AA",squarf:"\u25AA",squf:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",ggg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22DB",gel:"\u22DB",gtreqless:"\u22DB",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2A7E",geqslant:"\u2A7E",ges:"\u2A7E",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",NestedGreaterGreater:"\u226B",gg:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",caron:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",Poincareplane:"\u210C",HilbertSpace:"\u210B",Hscr:"\u210B",hamilt:"\u210B",Hopf:"\u210D",quaternions:"\u210D",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224F",bumpe:"\u224F",bumpeq:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xCC",Imacr:"\u012A",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222C",Integral:"\u222B",int:"\u222B",Intersection:"\u22C2",bigcap:"\u22C2",xcap:"\u22C2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219E",twoheadleftarrow:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",lang:"\u27E8",langle:"\u27E8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21E4",larrb:"\u21E4",LeftArrowRightArrow:"\u21C6",leftrightarrows:"\u21C6",lrarr:"\u21C6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27E6",lobrk:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",dharl:"\u21C3",downharpoonleft:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",lfloor:"\u230A",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",dashv:"\u22A3",LeftTeeArrow:"\u21A4",mapstoleft:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",vartriangleleft:"\u22B2",vltri:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",ltrie:"\u22B4",trianglelefteq:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",uharl:"\u21BF",upharpoonleft:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",leftharpoonup:"\u21BC",lharu:"\u21BC",LeftVectorBar:"\u2952",LessEqualGreater:"\u22DA",leg:"\u22DA",lesseqgtr:"\u22DA",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",leqslant:"\u2A7D",les:"\u2A7D",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",lAarr:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",longleftarrow:"\u27F5",xlarr:"\u27F5",LongLeftRightArrow:"\u27F7",longleftrightarrow:"\u27F7",xharr:"\u27F7",LongRightArrow:"\u27F6",longrightarrow:"\u27F6",xrarr:"\u27F6",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21B0",lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",NestedLessLess:"\u226A",ll:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1D544}",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",ZeroWidthSpace:"\u200B",NewLine:` -`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vrtri:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",rtrie:"\u22B5",trianglerighteq:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",uharr:"\u21BE",upharpoonright:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",rharu:"\u21C0",rightharpoonup:"\u21C0",RightVectorBar:"\u2953",Ropf:"\u211D",reals:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",rAarr:"\u21DB",Rscr:"\u211B",realine:"\u211B",Rsh:"\u21B1",rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",radic:"\u221A",Square:"\u25A1",squ:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228F",sqsub:"\u228F",sqsubset:"\u228F",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",sstarf:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227B",sc:"\u227B",succ:"\u227B",SucceedsEqual:"\u2AB0",sce:"\u2AB0",succeq:"\u2AB0",SucceedsSlantEqual:"\u227D",sccue:"\u227D",succcurlyeq:"\u227D",SucceedsTilde:"\u227F",scsim:"\u227F",succsim:"\u227F",Sum:"\u2211",sum:"\u2211",Sup:"\u22D1",Supset:"\u22D1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xDE",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223C",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",tdot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",lowbar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",bbrk:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",bigcup:"\u22C3",xcup:"\u22C3",UnionPlus:"\u228E",uplus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",udarr:"\u21C5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296E",udhar:"\u296E",UpTee:"\u22A5",bot:"\u22A5",bottom:"\u22A5",perp:"\u22A5",UpTeeArrow:"\u21A5",mapstoup:"\u21A5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",bigvee:"\u22C1",xvee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200A",hairsp:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",bigwedge:"\u22C0",xwedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",mstpos:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acy:"\u0430",aelig:"\xE6",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",and:"\u2227",wedge:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",angle:"\u2220",ange:"\u29A4",angmsd:"\u2221",measuredangle:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",approxeq:"\u224A",apid:"\u224B",apos:"'",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",midast:"*",atilde:"\xE3",auml:"\xE4",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",bcong:"\u224C",backepsilon:"\u03F6",bepsi:"\u03F6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223D",bsim:"\u223D",backsimeq:"\u22CD",bsime:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23B6",bcy:"\u0431",bdquo:"\u201E",ldquor:"\u201E",bemptyv:"\u29B0",beta:"\u03B2",beth:"\u2136",between:"\u226C",twixt:"\u226C",bfr:"\u{1D51F}",bigcirc:"\u25EF",xcirc:"\u25EF",bigodot:"\u2A00",xodot:"\u2A00",bigoplus:"\u2A01",xoplus:"\u2A01",bigotimes:"\u2A02",xotime:"\u2A02",bigsqcup:"\u2A06",xsqcup:"\u2A06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25BD",xdtri:"\u25BD",bigtriangleup:"\u25B3",xutri:"\u25B3",biguplus:"\u2A04",xuplus:"\u2A04",bkarow:"\u290D",rbarr:"\u290D",blacklozenge:"\u29EB",lozf:"\u29EB",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",minusb:"\u229F",boxplus:"\u229E",plusb:"\u229E",boxtimes:"\u22A0",timesb:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2AAE",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cemptyv:"\u29B2",cent:"\xA2",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21BA",olarr:"\u21BA",circlearrowright:"\u21BB",orarr:"\u21BB",circledS:"\u24C8",oS:"\u24C8",circledast:"\u229B",oast:"\u229B",circledcirc:"\u229A",ocir:"\u229A",circleddash:"\u229D",odash:"\u229D",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2A6D",copf:"\u{1D554}",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",curlyeqprec:"\u22DE",cuesc:"\u22DF",curlyeqsucc:"\u22DF",cularr:"\u21B6",curvearrowleft:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curvearrowright:"\u21B7",curarrm:"\u293C",curlyvee:"\u22CE",cuvee:"\u22CE",curlywedge:"\u22CF",cuwed:"\u22CF",curren:"\xA4",cwint:"\u2231",cylcty:"\u232D",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290F",rBarr:"\u290F",dcaron:"\u010F",dcy:"\u0434",ddarr:"\u21CA",downdownarrows:"\u21CA",ddotseq:"\u2A77",eDDot:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03DD",gammad:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",llcorner:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22A1",sdotb:"\u22A1",drcorn:"\u231F",lrcorner:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",triangledown:"\u25BF",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xEA",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044D",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",eqslantgtr:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",eqslantless:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",straightepsilon:"\u03F5",varepsilon:"\u03F5",equals:"=",equest:"\u225F",questeq:"\u225F",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212F",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",fork:"\u22D4",pitchfork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1D4BB}",gEl:"\u2A8C",gtreqqless:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gap:"\u2A86",gtrapprox:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gnsim:"\u22E7",gopf:"\u{1D558}",gscr:"\u210A",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtrdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrarr:"\u2978",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hardcy:"\u044A",harrcir:"\u2948",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",hbar:"\u210F",hslash:"\u210F",planck:"\u210F",plankv:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",larrhk:"\u21A9",hookrightarrow:"\u21AA",rarrhk:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xED",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",ifr:"\u{1D526}",igrave:"\xEC",iiiint:"\u2A0C",qint:"\u2A0C",iiint:"\u222D",tint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",imath:"\u0131",inodot:"\u0131",imof:"\u22B7",imped:"\u01B5",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",intcal:"\u22BA",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iquest:"\xBF",iscr:"\u{1D4BE}",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAtail:"\u291B",lBarr:"\u290E",lEg:"\u2A8B",lesseqqgtr:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lambda:"\u03BB",langd:"\u2991",lap:"\u2A85",lessapprox:"\u2A85",laquo:"\xAB",larrbfs:"\u291F",larrfs:"\u291D",larrlp:"\u21AB",looparrowleft:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",leftarrowtail:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lcy:"\u043B",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21C7",llarr:"\u21C7",leftthreetimes:"\u22CB",lthree:"\u22CB",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessdot:"\u22D6",ltdot:"\u22D6",lfisht:"\u297C",lfr:"\u{1D529}",lgE:"\u2A91",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",longmapsto:"\u27FC",xmap:"\u27FC",looparrowright:"\u21AC",rarrlp:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",loz:"\u25CA",lozenge:"\u25CA",lpar:"(",lparlt:"\u2993",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsime:"\u2A8D",lsimg:"\u2A8F",lsquor:"\u201A",sbquo:"\u201A",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",triangleleft:"\u25C3",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",strns:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midcir:"\u2AF0",minus:"\u2212",minusdu:"\u2A2A",mlcp:"\u2ADB",models:"\u22A7",mopf:"\u{1D55E}",mscr:"\u{1D4C2}",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nLeftarrow:"\u21CD",nlArr:"\u21CD",nLeftrightarrow:"\u21CE",nhArr:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nRightarrow:"\u21CF",nrArr:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nacute:"\u0144",nang:"\u2220\u20D2",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",natur:"\u266E",natural:"\u266E",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",neArr:"\u21D7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1D52B}",nharr:"\u21AE",nleftrightarrow:"\u21AE",nhpar:"\u2AF2",nis:"\u22FC",nisd:"\u22FA",njcy:"\u045A",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219A",nleftarrow:"\u219A",nldr:"\u2025",nopf:"\u{1D55F}",not:"\xAC",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinvb:"\u22F7",notinvc:"\u22F6",notnivb:"\u22FE",notnivc:"\u22FD",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",nrarr:"\u219B",nrightarrow:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nscr:"\u{1D4C3}",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsubseteqq:"\u2AC5\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupseteqq:"\u2AC6\u0338",ntilde:"\xF1",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwnear:"\u2927",oacute:"\xF3",ocirc:"\xF4",ocy:"\u043E",odblac:"\u0151",odiv:"\u2A38",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",olcir:"\u29BE",olcross:"\u29BB",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",or:"\u2228",vee:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",para:"\xB6",parsim:"\u2AF3",parsl:"\u2AFD",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",straightphi:"\u03D5",varphi:"\u03D5",phone:"\u260E",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",planckh:"\u210E",plus:"+",plusacir:"\u2A23",pluscir:"\u2A22",plusdu:"\u2A25",pluse:"\u2A72",plussim:"\u2A26",plustwo:"\u2A27",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",prE:"\u2AB3",prap:"\u2AB7",precapprox:"\u2AB7",precnapprox:"\u2AB9",prnap:"\u2AB9",precneqq:"\u2AB5",prnE:"\u2AB5",precnsim:"\u22E8",prnsim:"\u22E8",prime:"\u2032",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quatint:"\u2A16",quest:"?",rAtail:"\u291C",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",raemptyv:"\u29B3",rangd:"\u2992",range:"\u29A5",raquo:"\xBB",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rightarrowtail:"\u21A3",rarrw:"\u219D",rightsquigarrow:"\u219D",ratail:"\u291A",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21B3",rect:"\u25AD",rfisht:"\u297D",rfr:"\u{1D52F}",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",rightrightarrows:"\u21C9",rrarr:"\u21C9",rightthreetimes:"\u22CC",rthree:"\u22CC",ring:"\u02DA",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rsaquo:"\u203A",rscr:"\u{1D4C7}",rtimes:"\u22CA",rtri:"\u25B9",triangleright:"\u25B9",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",scE:"\u2AB4",scap:"\u2AB8",succapprox:"\u2AB8",scaron:"\u0161",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",succneqq:"\u2AB6",scnap:"\u2ABA",succnapprox:"\u2ABA",scnsim:"\u22E9",succnsim:"\u22E9",scpolint:"\u2A13",scy:"\u0441",sdot:"\u22C5",sdote:"\u2A66",seArr:"\u21D8",sect:"\xA7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1D530}",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",simdot:"\u2A6A",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",smashp:"\u2A33",smeparsl:"\u29E4",smile:"\u2323",ssmile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\uFE00",sqcups:"\u2294\uFE00",sscr:"\u{1D4C8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2AC5",subseteqq:"\u2AC5",subdot:"\u2ABD",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subsetneqq:"\u2ACB",subne:"\u228A",subsetneq:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supseteqq:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supsetneqq:"\u2ACC",supne:"\u228B",supsetneq:"\u228B",supplus:"\u2AC0",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1D531}",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",vartheta:"\u03D1",thorn:"\xFE",times:"\xD7",timesbar:"\u2A31",timesd:"\u2A30",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tprime:"\u2034",triangle:"\u25B5",utri:"\u25B5",triangleq:"\u225C",trie:"\u225C",tridot:"\u25EC",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",uHar:"\u2963",uacute:"\xFA",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uogon:"\u0173",uopf:"\u{1D566}",upsi:"\u03C5",upsilon:"\u03C5",upuparrows:"\u21C8",uuarr:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",uuml:"\xFC",uwangle:"\u29A7",vBar:"\u2AE8",vBarv:"\u2AE9",vangrt:"\u299C",varsubsetneq:"\u228A\uFE00",vsubne:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",vsubnE:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",vsupne:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vsupnE:"\u2ACC\uFE00",vcy:"\u0432",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",vfr:"\u{1D533}",vopf:"\u{1D567}",vscr:"\u{1D4CB}",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wscr:"\u{1D4CC}",xfr:"\u{1D535}",xi:"\u03BE",xnis:"\u22FB",xopf:"\u{1D569}",xscr:"\u{1D4CD}",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},r8="\uE500";H0.ngsp=r8;var dD=class{tokens;errors;nonNormalizedIcuExpressions;constructor(i,e,t){this.tokens=i,this.errors=e,this.nonNormalizedIcuExpressions=t}};function gX(n,i,e,t={}){let o=new pD(new Fb(n,i),e,t);return o.tokenize(),new dD(kX(o.tokens),o.errors,o.nonNormalizedIcuExpressions)}var _X=/\r\n?/g;function Nh(n){return`Unexpected character "${n===Yr?"EOF":String.fromCharCode(n)}"`}function lF(n){return`Unknown entity "${n}" - use the "&#;" or "&#x;" syntax`}function vX(n,i){return`Unable to parse entity "${i}" - ${n} character reference entities must end with ";"`}var mD=(function(n){return n.HEX="hexadecimal",n.DEC="decimal",n})(mD||{}),CX=["@if","@else","@for","@switch","@case","@default","@empty","@defer","@placeholder","@loading","@error"],I_={start:"{{",end:"}}"},pD=class{_getTagDefinition;_cursor;_tokenizeIcu;_leadingTriviaCodePoints;_currentTokenStart=null;_currentTokenType=null;_expansionCaseStack=[];_openDirectiveCount=0;_inInterpolation=!1;_preserveLineEndings;_i18nNormalizeLineEndingsInICUs;_tokenizeBlocks;_tokenizeLet;_selectorlessEnabled;tokens=[];errors=[];nonNormalizedIcuExpressions=[];constructor(i,e,t){this._getTagDefinition=e,this._tokenizeIcu=t.tokenizeExpansionForms||!1,this._leadingTriviaCodePoints=t.leadingTriviaChars&&t.leadingTriviaChars.map(r=>r.codePointAt(0)||0);let o=t.range||{endPos:i.content.length,startPos:0,startLine:0,startCol:0};this._cursor=t.escapedString?new uD(i,o):new Zb(i,o),this._preserveLineEndings=t.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=t.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=t.tokenizeBlocks??!0,this._tokenizeLet=t.tokenizeLet??!0,this._selectorlessEnabled=t.selectorlessEnabled??!1;try{this._cursor.init()}catch(r){this.handleError(r)}}_processCarriageReturns(i){return this._preserveLineEndings?i:i.replace(_X,` -`)}tokenize(){for(;this._cursor.peek()!==Yr;){let i=this._cursor.clone();try{this._attemptCharCode(Wh)?this._attemptCharCode(UE)?this._attemptCharCode(Dc)?this._consumeCdata(i):this._attemptCharCode(Nb)?this._consumeComment(i):this._consumeDocType(i):this._attemptCharCode(ol)?this._consumeTagClose(i):this._consumeTagOpen(i):this._tokenizeLet&&this._cursor.peek()===Ih&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(i):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(i):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(Ua)?this._consumeBlockEnd(i):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(e){this.handleError(e)}}this._beginToken(41),this._endToken([])}_getBlockName(){let i=!1,e=this._cursor.clone();return this._attemptCharCodeUntilFn(t=>P0(t)?!i:MX(t)?(i=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeBlockStart(i){this._requireCharCode(Ih),this._beginToken(24,i);let e=this._endToken([this._getBlockName()]);if(e.parts[0]==="default never"&&this._attemptCharCode(ls)){this._beginToken(25),this._endToken([]),this._beginToken(26),this._endToken([]);return}if(this._cursor.peek()===Wa)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(Lo),this._attemptCharCode(Sr))this._attemptCharCodeUntilFn(Lo);else{e.type=28;return}this._attemptCharCode(sl)?(this._beginToken(25),this._endToken([])):this._isBlockStart()&&(e.parts[0]==="case"||e.parts[0]==="default")?(this._beginToken(25),this._endToken([]),this._beginToken(26),this._endToken([])):e.type=28}_consumeBlockEnd(i){this._beginToken(26,i),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(dF);this._cursor.peek()!==Sr&&this._cursor.peek()!==Yr;){this._beginToken(27);let i=this._cursor.clone(),e=null,t=0;for(;this._cursor.peek()!==ls&&this._cursor.peek()!==Yr||e!==null;){let o=this._cursor.peek();if(o===au)this._cursor.advance();else if(o===e)e=null;else if(e===null&&W_(o))e=o;else if(o===Wa&&e===null)t++;else if(o===Sr&&e===null){if(t===0)break;t>0&&t--}this._cursor.advance()}this._endToken([this._cursor.getChars(i)]),this._attemptCharCodeUntilFn(dF)}}_consumeLetDeclaration(i){if(this._requireStr("@let"),this._beginToken(29,i),P0(this._cursor.peek()))this._attemptCharCodeUntilFn(Lo);else{let o=this._endToken([this._cursor.getChars(i)]);o.type=32;return}let e=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(Lo),!this._attemptCharCode(Qr)){e.type=32;return}this._attemptCharCodeUntilFn(o=>Lo(o)&&!Rb(o)),this._consumeLetDeclarationValue(),this._cursor.peek()===ls?(this._beginToken(31),this._endToken([]),this._cursor.advance()):(e.type=32,e.sourceSpan=this._cursor.getSpan(i))}_getLetDeclarationName(){let i=this._cursor.clone(),e=!1;return this._attemptCharCodeUntilFn(t=>Im(t)||t===hx||t===Lm||e&&rl(t)?(e=!0,!1):!0),this._cursor.getChars(i).trim()}_consumeLetDeclarationValue(){let i=this._cursor.clone();for(this._beginToken(30,i);this._cursor.peek()!==Yr;){let e=this._cursor.peek();if(e===ls)break;W_(e)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(t=>t===au?(this._cursor.advance(),!1):t===e)),this._cursor.advance()}this._endToken([this._cursor.getChars(i)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(SX(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===Ua){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(i,e=this._cursor.clone()){this._currentTokenStart=e,this._currentTokenType=i}_endToken(i,e){if(this._currentTokenStart===null)throw new ln(this._cursor.getSpan(e),"Programming error - attempted to end a token when there was no start to the token");if(this._currentTokenType===null)throw new ln(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let t={type:this._currentTokenType,parts:i,sourceSpan:(e??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(t),this._currentTokenStart=null,this._currentTokenType=null,t}_createError(i,e){this._isInExpansionForm()&&(i+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let t=new ln(e,i);return this._currentTokenStart=null,this._currentTokenType=null,t}handleError(i){if(i instanceof U0&&(i=this._createError(i.msg,this._cursor.getSpan(i.cursor))),i instanceof ln)this.errors.push(i);else throw i}_attemptCharCode(i){return this._cursor.peek()===i?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(i){return wX(this._cursor.peek(),i)?(this._cursor.advance(),!0):!1}_requireCharCode(i){let e=this._cursor.clone();if(!this._attemptCharCode(i))throw this._createError(Nh(this._cursor.peek()),this._cursor.getSpan(e))}_attemptStr(i){let e=i.length;if(this._cursor.charsLeft()this._peekStr(i))}_isLetStart(){return this._cursor.peek()===Ih&&this._peekStr("@let")}_consumeEntity(i){this._beginToken(9);let e=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(D6)){let t=this._attemptCharCode(L6)||this._attemptCharCode(RW),o=this._cursor.clone();if(this._attemptCharCodeUntilFn(xX),this._cursor.peek()!=ls){this._cursor.advance();let a=t?mD.HEX:mD.DEC;throw this._createError(vX(a,this._cursor.getChars(e)),this._cursor.getSpan())}let r=this._cursor.getChars(o);this._cursor.advance();try{let a=parseInt(r,t?16:10);this._endToken([String.fromCodePoint(a),this._cursor.getChars(e)])}catch{throw this._createError(lF(this._cursor.getChars(e)),this._cursor.getSpan())}}else{let t=this._cursor.clone();if(this._attemptCharCodeUntilFn(yX),this._cursor.peek()!=ls)this._beginToken(i,e),this._cursor=t,this._endToken(["&"]);else{let o=this._cursor.getChars(t);this._cursor.advance();let r=H0.hasOwnProperty(o)&&H0[o];if(!r)throw this._createError(lF(o),this._cursor.getSpan(e));this._endToken([r,`&${o};`])}}}_consumeRawText(i,e){this._beginToken(i?6:7);let t=[];for(;;){let o=this._cursor.clone(),r=e();if(this._cursor=o,r)break;i&&this._cursor.peek()===Ob?(this._endToken([this._processCarriageReturns(t.join(""))]),t.length=0,this._consumeEntity(6),this._beginToken(6)):t.push(this._readChar())}this._endToken([this._processCarriageReturns(t.join(""))])}_consumeComment(i){this._beginToken(10,i),this._requireCharCode(Nb),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeCdata(i){this._beginToken(12,i),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(i){this._beginToken(18,i);let e=this._cursor.clone();this._attemptUntilChar(Os);let t=this._cursor.getChars(e);this._cursor.advance(),this._endToken([t])}_consumePrefixAndName(i){let e=this._cursor.clone(),t="";for(;this._cursor.peek()!==kc&&!bX(this._cursor.peek());)this._cursor.advance();let o;this._cursor.peek()===kc?(t=this._cursor.getChars(e),this._cursor.advance(),o=this._cursor.clone()):o=e,this._requireCharCodeUntilFn(i,t===""?0:1);let r=this._cursor.getChars(o);return[t,r]}_consumeTagOpen(i){let e,t,o,r;try{if(this._selectorlessEnabled&&H1(this._cursor.peek()))r=this._consumeComponentOpenStart(i),[o,t,e]=r.parts,t&&(o+=`:${t}`),e&&(o+=`:${e}`),this._attemptCharCodeUntilFn(Lo);else{if(!Im(this._cursor.peek()))throw this._createError(Nh(this._cursor.peek()),this._cursor.getSpan(i));r=this._consumeTagOpenStart(i),t=r.parts[0],e=o=r.parts[1],this._attemptCharCodeUntilFn(Lo)}for(;!pF(this._cursor.peek());)if(this._selectorlessEnabled&&this._cursor.peek()===Ih){let c=this._cursor.clone(),m=c.clone();m.advance(),H1(m.peek())&&this._consumeDirective(c,m)}else this._consumeAttribute();r.type===33?this._consumeComponentOpenEnd():this._consumeTagOpenEnd()}catch(c){if(c instanceof ln){r?r.type=r.type===33?37:4:(this._beginToken(5,i),this._endToken(["<"]));return}throw c}let a=this._getTagDefinition(e).getContentType(t);a===Mc.RAW_TEXT?this._consumeRawTextWithTagClose(r,o,!1):a===Mc.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,o,!0)}_consumeRawTextWithTagClose(i,e,t){this._consumeRawText(t,()=>!this._attemptCharCode(Wh)||!this._attemptCharCode(ol)||(this._attemptCharCodeUntilFn(Lo),!this._attemptStrCaseInsensitive(e))?!1:(this._attemptCharCodeUntilFn(Lo),this._attemptCharCode(Os))),this._beginToken(i.type===33?36:3),this._requireCharCodeUntilFn(o=>o===Os,3),this._cursor.advance(),this._endToken(i.parts)}_consumeTagOpenStart(i){this._beginToken(0,i);let e=this._consumePrefixAndName(qp);return this._endToken(e)}_consumeComponentOpenStart(i){this._beginToken(33,i);let e=this._consumeComponentName();return this._endToken(e)}_consumeComponentName(){let i=this._cursor.clone();for(;mF(this._cursor.peek());)this._cursor.advance();let e=this._cursor.getChars(i),t="",o="";return this._cursor.peek()===kc&&(this._cursor.advance(),[t,o]=this._consumePrefixAndName(qp)),[e,t,o]}_consumeAttribute(){this._consumeAttributeName(),this._attemptCharCodeUntilFn(Lo),this._attemptCharCode(Qr)&&(this._attemptCharCodeUntilFn(Lo),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(Lo)}_consumeAttributeName(){let i=this._cursor.peek();if(i===D0||i===E0)throw this._createError(Nh(i),this._cursor.getSpan());this._beginToken(14);let e;if(this._openDirectiveCount>0){let o=0;e=r=>{if(this._openDirectiveCount>0){if(r===Wa)o++;else if(r===Sr){if(o===0)return!0;o--}}return qp(r)}}else if(i===Dc){let o=0;e=r=>(r===Dc?o++:r===kd&&o--,o<=0?qp(r):Rb(r))}else e=qp;let t=this._consumePrefixAndName(e);this._endToken(t)}_consumeAttributeValue(){if(this._cursor.peek()===D0||this._cursor.peek()===E0){let i=this._cursor.peek();this._consumeQuote(i);let e=()=>this._cursor.peek()===i;this._consumeWithInterpolation(16,17,e,e),this._consumeQuote(i)}else{let i=()=>qp(this._cursor.peek());this._consumeWithInterpolation(16,17,i,i)}}_consumeQuote(i){this._beginToken(15),this._requireCharCode(i),this._endToken([String.fromCodePoint(i)])}_consumeTagOpenEnd(){let i=this._attemptCharCode(ol)?2:1;this._beginToken(i),this._requireCharCode(Os),this._endToken([])}_consumeComponentOpenEnd(){let i=this._attemptCharCode(ol)?35:34;this._beginToken(i),this._requireCharCode(Os),this._endToken([])}_consumeTagClose(i){if(this._selectorlessEnabled){let t=i.clone();for(;t.peek()!==Os&&!H1(t.peek());)t.advance();if(H1(t.peek())){this._beginToken(36,i);let o=this._consumeComponentName();this._attemptCharCodeUntilFn(Lo),this._requireCharCode(Os),this._endToken(o);return}}this._beginToken(3,i),this._attemptCharCodeUntilFn(Lo);let e=this._consumePrefixAndName(qp);this._attemptCharCodeUntilFn(Lo),this._requireCharCode(Os),this._endToken(e)}_consumeExpansionFormStart(){this._beginToken(19),this._requireCharCode(sl),this._endToken([]),this._expansionCaseStack.push(19),this._beginToken(7);let i=this._readUntil(Ma),e=this._processCarriageReturns(i);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([e]);else{let o=this._endToken([i]);e!==i&&this.nonNormalizedIcuExpressions.push(o)}this._requireCharCode(Ma),this._attemptCharCodeUntilFn(Lo),this._beginToken(7);let t=this._readUntil(Ma);this._endToken([t]),this._requireCharCode(Ma),this._attemptCharCodeUntilFn(Lo)}_consumeExpansionCaseStart(){this._beginToken(20);let i=this._readUntil(sl).trim();this._endToken([i]),this._attemptCharCodeUntilFn(Lo),this._beginToken(21),this._requireCharCode(sl),this._endToken([]),this._attemptCharCodeUntilFn(Lo),this._expansionCaseStack.push(21)}_consumeExpansionCaseEnd(){this._beginToken(22),this._requireCharCode(Ua),this._endToken([]),this._attemptCharCodeUntilFn(Lo),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(23),this._requireCharCode(Ua),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(i,e,t,o){this._beginToken(i);let r=[];for(;!t();){let a=this._cursor.clone();this._attemptStr(I_.start)?(this._endToken([this._processCarriageReturns(r.join(""))],a),r.length=0,this._consumeInterpolation(e,a,o),this._beginToken(i)):this._cursor.peek()===Ob?(this._endToken([this._processCarriageReturns(r.join(""))]),r.length=0,this._consumeEntity(i),this._beginToken(i)):r.push(this._readChar())}this._inInterpolation=!1,this._endToken([this._processCarriageReturns(r.join(""))])}_consumeInterpolation(i,e,t){let o=[];this._beginToken(i,e),o.push(I_.start);let r=this._cursor.clone(),a=null,c=!1;for(;this._cursor.peek()!==Yr&&(t===null||!t());){let m=this._cursor.clone();if(this._isTagStart()){this._cursor=m,o.push(this._getProcessedChars(r,m)),this._endToken(o);return}if(a===null)if(this._attemptStr(I_.end)){o.push(this._getProcessedChars(r,m)),o.push(I_.end),this._endToken(o);return}else this._attemptStr("//")&&(c=!0);let u=this._cursor.peek();this._cursor.advance(),u===au?this._cursor.advance():u===a?a=null:!c&&a===null&&W_(u)&&(a=u)}o.push(this._getProcessedChars(r,this._cursor)),this._endToken(o)}_consumeDirective(i,e){for(this._requireCharCode(Ih),this._cursor.advance();mF(this._cursor.peek());)this._cursor.advance();this._beginToken(38,i);let t=this._cursor.getChars(e);if(this._endToken([t]),this._attemptCharCodeUntilFn(Lo),this._cursor.peek()===Wa){for(this._openDirectiveCount++,this._beginToken(39),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Lo);!pF(this._cursor.peek())&&this._cursor.peek()!==Sr;)this._consumeAttribute();if(this._attemptCharCodeUntilFn(Lo),this._openDirectiveCount--,this._cursor.peek()!==Sr){if(this._cursor.peek()===Os||this._cursor.peek()===ol)return;throw this._createError(Nh(this._cursor.peek()),this._cursor.getSpan(i))}this._beginToken(40),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Lo)}}_getProcessedChars(i,e){return this._processCarriageReturns(e.getChars(i))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===Yr||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===Ua&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._isLetStart()||this._cursor.peek()===Ua))}_isTagStart(){if(this._cursor.peek()===Wh){let i=this._cursor.clone();i.advance();let e=i.peek();if(bu<=e&&e<=J0||Fm<=e&&e<=ff||e===ol||e===UE)return!0}return!1}_readUntil(i){let e=this._cursor.clone();return this._attemptUntilChar(i),this._cursor.getChars(e)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===21}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===19}isExpansionFormStart(){if(this._cursor.peek()!==sl)return!1;let i=this._cursor.clone(),e=this._attemptStr(I_.start);return this._cursor=i,!e}};function Lo(n){return!P0(n)||n===Yr}function qp(n){return P0(n)||n===Os||n===Wh||n===ol||n===D0||n===E0||n===Qr||n===Yr}function bX(n){return(nI6)}function xX(n){return n===ls||n===Yr||!VW(n)}function yX(n){return n===ls||n===Yr||!(Im(n)||rl(n))}function SX(n){return n!==Ua}function wX(n,i){return cF(n)===cF(i)}function cF(n){return n>=bu&&n<=J0?n-bu+Fm:n}function MX(n){return Im(n)||rl(n)||n===Lm}function dF(n){return n!==ls&&Lo(n)}function H1(n){return n===Lm||n>=Fm&&n<=ff}function mF(n){return Im(n)||rl(n)||n===Lm}function pF(n){return n===ol||n===Os||n===Wh||n===Yr}function kX(n){let i=[],e;for(let t=0;t0&&e.indexOf(i.peek())!==-1;)t===i&&(i=i.clone()),i.advance();let o=this.locationFromCursor(i),r=this.locationFromCursor(this),a=t!==i?this.locationFromCursor(t):o;return new _n(o,r,a)}getChars(i){return this.input.substring(i.state.offset,this.state.offset)}charAt(i){return this.input.charCodeAt(i)}advanceState(i){if(i.offset>=this.end)throw this.state=i,new U0('Unexpected character "EOF"',this);let e=this.charAt(i.offset);e===ru?(i.line++,i.column=0):Rb(e)||i.column++,i.offset++,this.updatePeek(i)}updatePeek(i){i.peek=i.offset>=this.end?Yr:this.charAt(i.offset)}locationFromCursor(i){return new I0(i.file,i.state.offset,i.state.line,i.state.column)}},uD=class n extends Zb{internalState;constructor(i,e){i instanceof n?(super(i),this.internalState=q({},i.internalState)):(super(i,e),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new n(this)}getChars(i){let e=i.clone(),t="";for(;e.internalState.offsetthis.internalState.peek;if(i()===au)if(this.internalState=q({},this.state),this.advanceState(this.internalState),i()===A6)this.state.peek=ru;else if(i()===O6)this.state.peek=iP;else if(i()===F6)this.state.peek=k6;else if(i()===N6)this.state.peek=nP;else if(i()===LW)this.state.peek=PW;else if(i()===rP)this.state.peek=T6;else if(i()===R6)if(this.advanceState(this.internalState),i()===sl){this.advanceState(this.internalState);let e=this.clone(),t=0;for(;i()!==Ua;)this.advanceState(this.internalState),t++;this.state.peek=this.decodeHexDigits(e,t)}else{let e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(i()===L6){this.advanceState(this.internalState);let e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(zR(i())){let e="",t=0,o=this.clone();for(;zR(i())&&t<3;)o=this.clone(),e+=String.fromCodePoint(i()),this.advanceState(this.internalState),t++;this.state.peek=parseInt(e,8),this.internalState=o.internalState}else Rb(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(i,e){let t=this.input.slice(i.internalState.offset,i.internalState.offset+e),o=parseInt(t,16);if(isNaN(o))throw i.state=i.internalState,new U0("Invalid hexadecimal escape sequence",i);return o}},U0=class extends Error{msg;cursor;constructor(i,e){super(i),this.msg=i,this.cursor=e,Object.setPrototypeOf(this,new.target.prototype)}},hr=class n extends ln{elementName;static create(i,e,t){return new n(i,e,t)}constructor(i,e,t){super(e,t),this.elementName=i}},Jb=class{rootNodes;errors;constructor(i,e){this.rootNodes=i,this.errors=e}},TX=class{getTagDefinition;constructor(i){this.getTagDefinition=i}parse(i,e,t){let o=gX(i,e,this.getTagDefinition,t),r=new hD(o.tokens,this.getTagDefinition);return r.build(),new Jb(r.rootNodes,[...o.errors,...r.errors])}},hD=class n{tokens;tagDefinitionResolver;_index=-1;_peek;_containerStack=[];rootNodes=[];errors=[];constructor(i,e){this.tokens=i,this.tagDefinitionResolver=e,this._advance()}build(){for(;this._peek.type!==41;)this._peek.type===0||this._peek.type===4?this._consumeElementStartTag(this._advance()):this._peek.type===3?this._consumeElementEndTag(this._advance()):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===19?this._consumeExpansion(this._advance()):this._peek.type===24?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===26?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===28?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===32?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._peek.type===33||this._peek.type===37?this._consumeComponentStartTag(this._advance()):this._peek.type===36?this._consumeComponentEndTag(this._advance()):this._advance();for(let i of this._containerStack)i instanceof al&&this.errors.push(hr.create(i.name,i.sourceSpan,`Unclosed block "${i.name}"`))}_advance(){let i=this._peek;return this._index0)return this.errors=this.errors.concat(r.errors),null;let a=new _n(i.sourceSpan.start,o.sourceSpan.end,i.sourceSpan.fullStart),c=new _n(e.sourceSpan.start,o.sourceSpan.end,e.sourceSpan.fullStart);return new Xb(i.parts[0],r.rootNodes,a,i.sourceSpan,c)}_collectExpansionExpTokens(i){let e=[],t=[21];for(;;){if((this._peek.type===19||this._peek.type===21)&&t.push(this._peek.type),this._peek.type===22)if(uF(t,21)){if(t.pop(),t.length===0)return e}else return this.errors.push(hr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===23)if(uF(t,19))t.pop();else return this.errors.push(hr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===41)return this.errors.push(hr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;e.push(this._advance())}}_consumeText(i){let e=[i],t=i.sourceSpan,o=i.parts[0];if(o.length>0&&o[0]===` -`){let r=this._getContainer();r!=null&&r.children.length===0&&this._getTagDefinition(r)?.ignoreFirstLf&&(o=o.substring(1),e[0]={type:i.type,sourceSpan:i.sourceSpan,parts:[o]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)i=this._advance(),e.push(i),i.type===8?o+=i.parts.join("").replace(/&([^;]+);/g,hF):i.type===9?o+=i.parts[0]:o+=i.parts.join("");if(o.length>0){let r=i.sourceSpan;this._addToParent(new Mu(o,new _n(t.start,r.end,t.fullStart,t.details),e))}}_closeVoidElement(){let i=this._getContainer();i!==null&&this._getTagDefinition(i)?.isVoid&&this._containerStack.pop()}_consumeElementStartTag(i){let e=[],t=[];this._consumeAttributesAndDirectives(e,t);let o=this._getElementFullName(i,this._getClosestElementLikeParent()),r=this._getTagDefinition(o),a=!1;this._peek.type===2?(this._advance(),a=!0,r?.canSelfClose||OE(o)!==null||r?.isVoid||this.errors.push(hr.create(o,i.sourceSpan,`Only void, custom and foreign elements can be self closed "${i.parts[1]}"`))):this._peek.type===1&&(this._advance(),a=!1);let c=this._peek.sourceSpan.fullStart,m=new _n(i.sourceSpan.start,c,i.sourceSpan.fullStart),u=new _n(i.sourceSpan.start,c,i.sourceSpan.fullStart),h=new il(o,e,t,[],a,m,u,void 0,r?.isVoid??!1),g=this._getContainer(),S=g!==null&&!!this._getTagDefinition(g)?.isClosedByChild(h.name);this._pushContainer(h,S),a?this._popContainer(o,il,m):i.type===4&&(this._popContainer(o,il,null),this.errors.push(hr.create(o,m,`Opening tag "${o}" not terminated.`)))}_consumeComponentStartTag(i){let e=i.parts[0],t=[],o=[];this._consumeAttributesAndDirectives(t,o);let r=this._getClosestElementLikeParent(),a=this._getComponentTagName(i,r),c=this._getComponentFullName(i,r),m=this._peek.type===35;this._advance();let u=this._peek.sourceSpan.fullStart,h=new _n(i.sourceSpan.start,u,i.sourceSpan.fullStart),g=new _n(i.sourceSpan.start,u,i.sourceSpan.fullStart),S=new Ha(e,a,c,t,o,[],m,h,g,void 0),x=this._getContainer(),C=x!==null&&S.tagName!==null&&!!this._getTagDefinition(x)?.isClosedByChild(S.tagName);this._pushContainer(S,C),m?this._popContainer(c,Ha,h):i.type===37&&(this._popContainer(c,Ha,null),this.errors.push(hr.create(c,h,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(i,e){for(;this._peek.type===14||this._peek.type===38;)this._peek.type===38?e.push(this._consumeDirective(this._peek)):i.push(this._consumeAttr(this._advance()))}_consumeComponentEndTag(i){let e=this._getComponentFullName(i,this._getClosestElementLikeParent());if(!this._popContainer(e,Ha,i.sourceSpan)){let t=this._containerStack[this._containerStack.length-1],o;t instanceof Ha&&t.componentName===i.parts[0]?o=`, did you mean "${t.fullName}"?`:o=". It may happen when the tag has already been closed by another tag.";let r=`Unexpected closing tag "${e}"${o}`;this.errors.push(hr.create(e,i.sourceSpan,r))}}_getTagDefinition(i){return typeof i=="string"?this.tagDefinitionResolver(i):i instanceof il?this.tagDefinitionResolver(i.name):i instanceof Ha&&i.tagName!==null?this.tagDefinitionResolver(i.tagName):null}_pushContainer(i,e){e&&this._containerStack.pop(),this._addToParent(i),this._containerStack.push(i)}_consumeElementEndTag(i){let e=this._getElementFullName(i,this._getClosestElementLikeParent());if(this._getTagDefinition(e)?.isVoid)this.errors.push(hr.create(e,i.sourceSpan,`Void elements do not have end tags "${i.parts[1]}"`));else if(!this._popContainer(e,il,i.sourceSpan)){let t=`Unexpected closing tag "${e}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(hr.create(e,i.sourceSpan,t))}}_popContainer(i,e,t){let o=!1;for(let r=this._containerStack.length-1;r>=0;r--){let a=this._containerStack[r];if(((a instanceof Ha?a.fullName:a.name)===i||i===null)&&a instanceof e)return a.endSourceSpan=t,a.sourceSpan.end=t!==null?t.end:a.sourceSpan.end,this._containerStack.splice(r,this._containerStack.length-r),!o;(a instanceof al||!this._getTagDefinition(a)?.closedByParent)&&(o=!0)}return!1}_consumeAttr(i){let e=eb(i.parts[0],i.parts[1]),t=i.sourceSpan.end;this._peek.type===15&&this._advance();let o="",r=[],a,c;if(this._peek.type===16)for(a=this._peek.sourceSpan,c=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let h=this._advance();r.push(h),h.type===17?o+=h.parts.join("").replace(/&([^;]+);/g,hF):h.type===9?o+=h.parts[0]:o+=h.parts.join(""),c=t=h.sourceSpan.end}this._peek.type===15&&(t=this._advance().sourceSpan.end);let u=a&&c&&new _n(a.start,c,a.fullStart);return new lD(e,o,new _n(i.sourceSpan.start,t,i.sourceSpan.fullStart),i.sourceSpan,u,r.length>0?r:void 0,void 0)}_consumeDirective(i){let e=[],t=i.sourceSpan.end,o=null;if(this._advance(),this._peek.type===39){for(t=this._peek.sourceSpan.end,this._advance();this._peek.type===14;)e.push(this._consumeAttr(this._advance()));this._peek.type===40?(o=this._peek.sourceSpan,this._advance()):this.errors.push(hr.create(null,i.sourceSpan,"Unterminated directive definition"))}let r=new _n(i.sourceSpan.start,t,i.sourceSpan.fullStart),a=new _n(r.start,o===null?i.sourceSpan.end:o.end,r.fullStart);return new cD(i.parts[0],e,a,r,o)}_consumeBlockOpen(i){let e=[];for(;this._peek.type===27;){let c=this._advance();e.push(new Yb(c.parts[0],c.sourceSpan))}this._peek.type===25&&this._advance();let t=this._peek.sourceSpan.fullStart,o=new _n(i.sourceSpan.start,t,i.sourceSpan.fullStart),r=new _n(i.sourceSpan.start,t,i.sourceSpan.fullStart),a=new al(i.parts[0],e,[],o,i.sourceSpan,r);this._pushContainer(a,!1)}_consumeBlockClose(i){let e=this._containerStack.length,t=this._containerStack[e-1];if(!this._popContainer(null,al,i.sourceSpan)){if(this._containerStack.length element? If you meant to write the \`}\` character, you should use the "}" HTML entity instead.`));return}this.errors.push(hr.create(null,i.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the `}` character, you should use the "}" HTML entity instead.'))}}_consumeIncompleteBlock(i){let e=[];for(;this._peek.type===27;){let c=this._advance();e.push(new Yb(c.parts[0],c.sourceSpan))}let t=this._peek.sourceSpan.fullStart,o=new _n(i.sourceSpan.start,t,i.sourceSpan.fullStart),r=new _n(i.sourceSpan.start,t,i.sourceSpan.fullStart),a=new al(i.parts[0],e,[],o,i.sourceSpan,r);this._pushContainer(a,!1),this._popContainer(null,al,null),this.errors.push(hr.create(i.parts[0],o,`Incomplete block "${i.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(i){let e=i.parts[0],t,o;if(this._peek.type!==30){this.errors.push(hr.create(i.parts[0],i.sourceSpan,`Invalid @let declaration "${e}". Declaration must have a value.`));return}else t=this._advance();if(this._peek.type!==31){this.errors.push(hr.create(i.parts[0],i.sourceSpan,`Unterminated @let declaration "${e}". Declaration must be terminated with a semicolon.`));return}else o=this._advance();let r=o.sourceSpan.fullStart,a=new _n(i.sourceSpan.start,r,i.sourceSpan.fullStart),c=i.sourceSpan.toString().lastIndexOf(e),m=i.sourceSpan.start.moveBy(c),u=new _n(m,i.sourceSpan.end),h=new Kb(e,t.parts[0],a,u,t.sourceSpan);this._addToParent(h)}_consumeIncompleteLet(i){let e=i.parts[0]??"",t=e?` "${e}"`:"";if(e.length>0){let o=i.sourceSpan.toString().lastIndexOf(e),r=i.sourceSpan.start.moveBy(o),a=new _n(r,i.sourceSpan.end),c=new _n(i.sourceSpan.start,i.sourceSpan.start.moveBy(0)),m=new Kb(e,"",i.sourceSpan,a,c);this._addToParent(m)}this.errors.push(hr.create(i.parts[0],i.sourceSpan,`Incomplete @let declaration${t}. @let declarations must be written as \`@let = ;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestElementLikeParent(){for(let i=this._containerStack.length-1;i>-1;i--){let e=this._containerStack[i];if(e instanceof il||e instanceof Ha)return e}return null}_addToParent(i){let e=this._getContainer();e===null?this.rootNodes.push(i):e.children.push(i)}_getElementFullName(i,e){let t=this._getPrefix(i,e);return eb(t,i.parts[1])}_getComponentFullName(i,e){let t=i.parts[0],o=this._getComponentTagName(i,e);return o===null?t:o.startsWith(":")?t+o:`${t}:${o}`}_getComponentTagName(i,e){let t=this._getPrefix(i,e),o=i.parts[2];return!t&&!o?null:!t&&o?o:eb(t,o||"ng-component")}_getPrefix(i,e){let t,o;if(i.type===33||i.type===37||i.type===36?(t=i.parts[1],o=i.parts[2]):(t=i.parts[0],o=i.parts[1]),t=t||this._getTagDefinition(o)?.implicitNamespacePrefix||"",!t&&e){let r=e instanceof il?e.name:e.tagName;if(r!==null){let a=Xl(r)[1],c=this._getTagDefinition(a);c!==null&&!c.preventNamespaceInheritance&&(t=OE(r))}}return t}};function uF(n,i){return n.length>0&&n[n.length-1]===i}function hF(n,i){return H0[i]!==void 0?H0[i]||n:/^#x[a-f0-9]+$/i.test(i)?String.fromCodePoint(parseInt(i.slice(2),16)):/^#\d+$/.test(i)?String.fromCodePoint(parseInt(i.slice(1),10)):n}var a8="ngPreserveWhitespaces",fF=new Set(["pre","template","textarea","script","style"]),s8=` \f -\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,EX=new RegExp(`[^${s8}]`),DX=new RegExp(`[${s8}]{2,}`,"g");function gF(n){return n.some(i=>i.name===a8)}function l8(n){return n.replace(new RegExp(r8,"g")," ")}var ex=class{preserveSignificantWhitespace;originalNodeMap;requireContext;icuExpansionDepth=0;constructor(i,e,t=!0){this.preserveSignificantWhitespace=i,this.originalNodeMap=e,this.requireContext=t}visitElement(i,e){if(fF.has(i.name)||gF(i.attrs)){let o=new il(i.name,yc(this,i.attrs),yc(this,i.directives),i.children,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n);return this.originalNodeMap?.set(o,i),o}let t=new il(i.name,i.attrs,i.directives,yc(this,i.children),i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n);return this.originalNodeMap?.set(t,i),t}visitAttribute(i,e){return i.name!==a8?i:null}visitText(i,e){let t=i.value.match(EX),o=e&&(e.prev instanceof su||e.next instanceof su);if(this.icuExpansionDepth>0&&this.preserveSignificantWhitespace)return i;if(t||o){let a=i.tokens.map(h=>h.type===5?OX(h):h);if(!this.preserveSignificantWhitespace&&a.length>0){let h=a[0];a.splice(0,1,PX(h,e));let g=a[a.length-1];a.splice(a.length-1,1,IX(g,e))}let c=d8(i.value),m=this.preserveSignificantWhitespace?c:AX(c,e),u=new Mu(m,i.sourceSpan,a,i.i18n);return this.originalNodeMap?.set(u,i),u}return null}visitComment(i,e){return i}visitExpansion(i,e){this.icuExpansionDepth++;let t;try{t=new su(i.switchValue,i.type,yc(this,i.cases),i.sourceSpan,i.switchValueSourceSpan,i.i18n)}finally{this.icuExpansionDepth--}return this.originalNodeMap?.set(t,i),t}visitExpansionCase(i,e){let t=new Xb(i.value,yc(this,i.expression),i.sourceSpan,i.valueSourceSpan,i.expSourceSpan);return this.originalNodeMap?.set(t,i),t}visitBlock(i,e){let t=new al(i.name,i.parameters,yc(this,i.children),i.sourceSpan,i.nameSpan,i.startSourceSpan,i.endSourceSpan);return this.originalNodeMap?.set(t,i),t}visitBlockParameter(i,e){return i}visitLetDeclaration(i,e){return i}visitComponent(i,e){if(i.tagName&&fF.has(i.tagName)||gF(i.attrs)){let o=new Ha(i.componentName,i.tagName,i.fullName,yc(this,i.attrs),yc(this,i.directives),i.children,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return this.originalNodeMap?.set(o,i),o}let t=new Ha(i.componentName,i.tagName,i.fullName,i.attrs,i.directives,yc(this,i.children),i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return this.originalNodeMap?.set(t,i),t}visitDirective(i,e){return i}visit(i,e){if(this.requireContext&&!e)throw new Error("WhitespaceVisitor requires context. Visit via `visitAllWithSiblings` to get this context.");return!1}};function PX(n,i){return n.type!==5||!!i?.prev?n:c8(n,t=>t.trimStart())}function IX(n,i){return n.type!==5||!!i?.next?n:c8(n,t=>t.trimEnd())}function AX(n,i){let e=!i?.prev,t=!i?.next,o=e?n.trimStart():n;return t?o.trimEnd():o}function OX({type:n,parts:i,sourceSpan:e}){return{type:n,parts:[d8(i[0])],sourceSpan:e}}function c8({type:n,parts:i,sourceSpan:e},t){return{type:n,parts:[t(i[0])],sourceSpan:e}}function d8(n){return l8(n).replace(DX," ")}function yc(n,i){let e=[];return i.forEach((t,o)=>{let r={prev:i[o-1],next:i[o+1]},a=t.visit(n,r);a&&e.push(a)}),e}var un=(function(n){return n[n.Character=0]="Character",n[n.Identifier=1]="Identifier",n[n.PrivateIdentifier=2]="PrivateIdentifier",n[n.Keyword=3]="Keyword",n[n.String=4]="String",n[n.Operator=5]="Operator",n[n.Number=6]="Number",n[n.RegExpBody=7]="RegExpBody",n[n.RegExpFlags=8]="RegExpFlags",n[n.Error=9]="Error",n})(un||{}),lu=(function(n){return n[n.Plain=0]="Plain",n[n.TemplateLiteralPart=1]="TemplateLiteralPart",n[n.TemplateLiteralEnd=2]="TemplateLiteralEnd",n})(lu||{}),NX=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in","instanceof"],G0=class{tokenize(i){return new fD(i).scan()}},$s=class{index;end;type;numValue;strValue;constructor(i,e,t,o,r){this.index=i,this.end=e,this.type=t,this.numValue=o,this.strValue=r}isCharacter(i){return this.type===un.Character&&this.numValue===i}isNumber(){return this.type===un.Number}isString(){return this.type===un.String}isOperator(i){return this.type===un.Operator&&this.strValue===i}isIdentifier(){return this.type===un.Identifier}isPrivateIdentifier(){return this.type===un.PrivateIdentifier}isKeyword(){return this.type===un.Keyword}isKeywordLet(){return this.type===un.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===un.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===un.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===un.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===un.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===un.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===un.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===un.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===un.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===un.Keyword&&this.strValue==="in"}isKeywordInstanceOf(){return this.type===un.Keyword&&this.strValue==="instanceof"}isError(){return this.type===un.Error}isRegExpBody(){return this.type===un.RegExpBody}isRegExpFlags(){return this.type===un.RegExpFlags}toNumber(){return this.type===un.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===lu.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===lu.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}toString(){switch(this.type){case un.Character:case un.Identifier:case un.Keyword:case un.Operator:case un.PrivateIdentifier:case un.String:case un.Error:case un.RegExpBody:case un.RegExpFlags:return this.strValue;case un.Number:return this.numValue.toString();default:return null}}},q_=class extends $s{kind;constructor(i,e,t,o){super(i,e,un.String,0,t),this.kind=o}};function A_(n,i,e){return new $s(n,i,un.Character,e,String.fromCharCode(e))}function RX(n,i,e){return new $s(n,i,un.Identifier,0,e)}function FX(n,i,e){return new $s(n,i,un.PrivateIdentifier,0,e)}function LX(n,i,e){return new $s(n,i,un.Keyword,0,e)}function fm(n,i,e){return new $s(n,i,un.Operator,0,e)}function BX(n,i,e){return new $s(n,i,un.Number,e,"")}function VX(n,i,e){return new $s(n,i,un.Error,0,e)}function zX(n,i,e){return new $s(n,i,un.RegExpBody,0,e)}function jX(n,i,e){return new $s(n,i,un.RegExpFlags,0,e)}var O_=new $s(-1,-1,un.Character,0,""),fD=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(i){this.input=i,this.length=i.length,this.advance()}scan(){let i=this.scanToken();for(;i!==null;)this.tokens.push(i),i=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?Yr:this.input.charCodeAt(this.index)}scanToken(){let i=this.input,e=this.length,t=this.peek,o=this.index;for(;t<=E6;)if(++o>=e){t=Yr;break}else t=i.charCodeAt(o);if(this.peek=t,this.index=o,o>=e)return null;if(_F(t))return this.scanIdentifier();if(rl(t))return this.scanNumber(o);let r=o;switch(t){case Qp:return this.advance(),rl(this.peek)?this.scanNumber(r):this.peek!==Qp?A_(r,this.index,Qp):(this.advance(),this.peek===Qp?(this.advance(),fm(r,this.index,"...")):this.error(`Unexpected character [${String.fromCharCode(t)}]`,0));case Wa:case Sr:case Dc:case kd:case Ma:case kc:case ls:return this.scanCharacter(r,t);case sl:return this.scanOpenBrace(r,t);case Ua:return this.scanCloseBrace(r,t);case D0:case E0:return this.scanString();case GE:return this.advance(),this.scanTemplateLiteralPart(r);case D6:return this.scanPrivateIdentifier();case P6:return this.scanComplexOperator(r,"+",Qr,"=");case Nb:return this.scanComplexOperator(r,"-",Qr,"=");case ol:return this.isStartOfRegex()?this.scanRegex(o):this.scanComplexOperator(r,"/",Qr,"=");case IW:return this.scanComplexOperator(r,"%",Qr,"=");case FW:return this.scanOperator(r,"^");case LR:return this.scanStar(r);case BR:return this.scanQuestion(r);case Wh:case Os:return this.scanComplexOperator(r,String.fromCharCode(t),Qr,"=");case UE:return this.scanComplexOperator(r,"!",Qr,"=",Qr,"=");case Qr:return this.scanEquals(r);case Ob:return this.scanComplexOperator(r,"&",Ob,"&",Qr,"=");case VR:return this.scanComplexOperator(r,"|",VR,"|",Qr,"=");case B6:for(;P0(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(t)}]`,0)}scanCharacter(i,e){return this.advance(),A_(i,this.index,e)}scanOperator(i,e){return this.advance(),fm(i,this.index,e)}scanOpenBrace(i,e){return this.braceStack.push("expression"),this.advance(),A_(i,this.index,e)}scanCloseBrace(i,e){return this.advance(),this.braceStack.pop()==="interpolation"?(this.tokens.push(A_(i,this.index,Ua)),this.scanTemplateLiteralPart(this.index)):A_(i,this.index,e)}scanComplexOperator(i,e,t,o,r,a){this.advance();let c=e;return this.peek==t&&(this.advance(),c+=o),r!=null&&this.peek==r&&(this.advance(),c+=a),fm(i,this.index,c)}scanEquals(i){this.advance();let e="=";if(this.peek===Qr)this.advance(),e+="=";else if(this.peek===Os)return this.advance(),e+=">",fm(i,this.index,e);return this.peek===Qr&&(this.advance(),e+="="),fm(i,this.index,e)}scanIdentifier(){let i=this.index;for(this.advance();vF(this.peek);)this.advance();let e=this.input.substring(i,this.index);return NX.indexOf(e)>-1?LX(i,this.index,e):RX(i,this.index,e)}scanPrivateIdentifier(){let i=this.index;if(this.advance(),!_F(this.peek))return this.error("Invalid character [#]",-1);for(;vF(this.peek);)this.advance();let e=this.input.substring(i,this.index);return FX(i,this.index,e)}scanNumber(i){let e=this.index===i,t=!1;for(this.advance();;){if(!rl(this.peek))if(this.peek===Lm){if(!rl(this.input.charCodeAt(this.index-1))||!rl(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);t=!0}else if(this.peek===Qp)e=!1;else if($X(this.peek)){if(this.advance(),HX(this.peek)&&this.advance(),!rl(this.peek))return this.error("Invalid exponent",-1);e=!1}else break;this.advance()}let o=this.input.substring(i,this.index);t&&(o=o.replace(/_/g,""));let r=e?GX(o):parseFloat(o);return BX(i,this.index,r)}scanString(){let i=this.index,e=this.peek;this.advance();let t="",o=this.index,r=this.input;for(;this.peek!=e;)if(this.peek==au){let c=this.scanStringBackslash(t,o);if(typeof c!="string")return c;t=c,o=this.index}else{if(this.peek==Yr)return this.error("Unterminated quote",0);this.advance()}let a=r.substring(o,this.index);return this.advance(),new q_(i,this.index,t+a,lu.Plain)}scanQuestion(i){this.advance();let e="?";return this.peek===BR?(e+="?",this.advance(),this.peek===Qr&&(e+="=",this.advance())):this.peek===Qp&&(e+=".",this.advance()),fm(i,this.index,e)}scanTemplateLiteralPart(i){let e="",t=this.index;for(;this.peek!==GE;)if(this.peek===au){let r=this.scanStringBackslash(e,t);if(typeof r!="string")return r;e=r,t=this.index}else if(this.peek===hx){let r=this.index;if(this.advance(),this.peek===sl)return this.braceStack.push("interpolation"),this.tokens.push(new q_(i,r,e+this.input.substring(t,r),lu.TemplateLiteralPart)),this.advance(),fm(r,this.index,this.input.substring(r,this.index))}else{if(this.peek===Yr)return this.error("Unterminated template literal",0);this.advance()}let o=this.input.substring(t,this.index);return this.advance(),new q_(i,this.index,e+o,lu.TemplateLiteralEnd)}error(i,e){let t=this.index+e;return VX(t,this.index,`Lexer Error: ${i} at column ${t} in expression [${this.input}]`)}scanStringBackslash(i,e){i+=this.input.substring(e,this.index);let t;if(this.advance(),this.peek===R6){let o=this.input.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(o))t=parseInt(o,16);else return this.error(`Invalid unicode escape [\\u${o}]`,0);for(let r=0;r<5;r++)this.advance()}else t=UX(this.peek),this.advance();return i+=String.fromCharCode(t),i}scanStar(i){this.advance();let e="*";return this.peek===LR?(e+="*",this.advance(),this.peek===Qr&&(e+="=",this.advance())):this.peek===Qr&&(e+="=",this.advance()),fm(i,this.index,e)}isStartOfRegex(){if(this.tokens.length===0)return!0;let i=this.tokens[this.tokens.length-1];if(i.isOperator("!")){let e=this.tokens.length>1?this.tokens[this.tokens.length-2]:null;return e===null||e.type!==un.Identifier&&!e.isCharacter(Sr)&&!e.isCharacter(kd)}return i.type===un.Operator||i.isCharacter(Wa)||i.isCharacter(Dc)||i.isCharacter(Ma)||i.isCharacter(kc)}scanRegex(i){this.advance();let e=this.index,t=!1,o=!1;for(;;){let m=this.peek;if(m===Yr)return this.error("Unterminated regular expression",0);if(t)t=!1;else if(m===au)t=!0;else if(m===Dc)o=!0;else if(m===kd)o=!1;else if(m===ol&&!o)break;this.advance()}let r=this.input.substring(e,this.index);this.advance();let a=zX(i,this.index,r),c=this.scanRegexFlags(this.index);return c!==null?(this.tokens.push(a),c):a}scanRegexFlags(i){if(!Im(this.peek))return null;for(;Im(this.peek);)this.advance();return jX(i,this.index,this.input.substring(i,this.index))}};function _F(n){return bu<=n&&n<=J0||Fm<=n&&n<=ff||n==Lm||n==hx}function vF(n){return Im(n)||rl(n)||n==Lm||n==hx}function $X(n){return n==BW||n==OW}function HX(n){return n==Nb||n==P6}function UX(n){switch(n){case A6:return ru;case rP:return T6;case O6:return iP;case N6:return nP;case F6:return k6;default:return n}}function GX(n){let i=parseInt(n);if(isNaN(i))throw new Error("Invalid integer literal when parsing "+n);return i}var gD=class{strings;expressions;offsets;constructor(i,e,t){this.strings=i,this.expressions=e,this.offsets=t}},_D=class{templateBindings;warnings;errors;constructor(i,e,t){this.templateBindings=i,this.warnings=e,this.errors=t}};function bm(n){return n.start.toString()||"(unknown)"}var tx=class{_lexer;_supportsDirectPipeReferences;constructor(i,e=!1){this._lexer=i,this._supportsDirectPipeReferences=e}parseAction(i,e,t){let o=[];this._checkNoInterpolation(o,i,e);let{stripped:r}=this._stripComments(i),a=this._lexer.tokenize(r),c=new Zp(i,e,t,a,1,o,0,this._supportsDirectPipeReferences).parseChain();return new cs(c,i,bm(e),t,o)}parseBinding(i,e,t){let o=[],r=this._parseBindingAst(i,e,t,o);return new cs(r,i,bm(e),t,o)}checkSimpleExpression(i){let e=new vD;return i.visit(e),e.errors}parseSimpleBinding(i,e,t){let o=[],r=this._parseBindingAst(i,e,t,o),a=this.checkSimpleExpression(r);return a.length>0&&o.push(Hh(`Host binding expression cannot contain ${a.join(" ")}`,i,"",e)),new cs(r,i,bm(e),t,o)}_parseBindingAst(i,e,t,o){this._checkNoInterpolation(o,i,e);let{stripped:r}=this._stripComments(i),a=this._lexer.tokenize(r);return new Zp(i,e,t,a,0,o,0,this._supportsDirectPipeReferences).parseChain()}parseTemplateBindings(i,e,t,o,r){let a=this._lexer.tokenize(e),c=[];return new Zp(e,t,r,a,0,c,0,this._supportsDirectPipeReferences).parseTemplateBindings({source:i,span:new Rs(o,o+i.length)})}parseInterpolation(i,e,t,o){let r=[],{strings:a,expressions:c,offsets:m}=this.splitInterpolation(i,e,r,o);if(c.length===0)return null;let u=[];for(let h=0;hh.text),u,i,bm(e),t,r)}parseInterpolationExpression(i,e,t){let{stripped:o}=this._stripComments(i),r=this._lexer.tokenize(o),a=[],c=new Zp(i,e,t,r,0,a,0,this._supportsDirectPipeReferences).parseChain(),m=["",""];return this.createInterpolationAst(m,[c],i,bm(e),t,a)}createInterpolationAst(i,e,t,o,r,a){let c=new gu(0,t.length),m=new K0(c,c.toAbsolute(r),i,e);return new cs(m,t,o,r,a)}splitInterpolation(i,e,t,o){let r=[],a=[],c=[],m=o?WX(o):null,u=0,h=!1,g=!1,S="{{",x="}}";for(;u-1)break;o>-1&&r>-1&&i.push(Hh("Got interpolation ({{}}) where expression was expected",e,`at column ${o} in`,t))}_getInterpolationEndIndex(i,e,t){for(let o of this._forEachUnquotedChar(i,t)){if(i.startsWith(e,o))return o;if(i.startsWith("//",o))return i.indexOf(e,o)}return-1}*_forEachUnquotedChar(i,e){let t=null,o=0;for(let r=e;r=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(i,e){let t=this.currentEndIndex;if(e!==void 0&&e>this.currentEndIndex&&(t=e),i>t){let o=t;t=i,i=o}return new gu(i,t)}sourceSpan(i,e){let t=`${i}@${this.inputIndex}:${e}`;return this.sourceSpanCache.has(t)||this.sourceSpanCache.set(t,this.span(i,e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(t)}advance(){this.index++}withContext(i,e){this.context|=i;let t=e();return this.context^=i,t}consumeOptionalCharacter(i){return this.next.isCharacter(i)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(i){this.consumeOptionalCharacter(i)||this.error(`Missing expected ${String.fromCharCode(i)}`)}consumeOptionalOperator(i){return this.next.isOperator(i)?(this.advance(),!0):!1}isAssignmentOperator(i){return i.type===un.Operator&&$a.isAssignmentOperation(i.strValue)}expectOperator(i){this.consumeOptionalOperator(i)||this.error(`Missing expected operator ${i}`)}prettyPrintToken(i){return i===O_?"end of input":`token ${i}`}expectIdentifierOrKeyword(){let i=this.next;return!i.isIdentifier()&&!i.isKeyword()?(i.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(i,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(i)}, expected identifier or keyword`),null):(this.advance(),i.toString())}expectIdentifierOrKeywordOrString(){let i=this.next;return!i.isIdentifier()&&!i.isKeyword()&&!i.isString()?(i.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(i,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(i)}, expected identifier, keyword, or string`),""):(this.advance(),i.toString())}parseChain(){let i=[],e=this.inputIndex;for(;this.index=Fm&&u<=ff?J1.ReferencedDirectly:J1.ReferencedByName}else m=J1.ReferencedByName;e=new vb(this.span(i),this.sourceSpan(i,a),e,o,c,m,r)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){let i=this.inputIndex,e=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let t=this.parsePipe(),o;if(this.consumeOptionalCharacter(kc))o=this.parsePipe();else{let r=this.inputIndex,a=this.input.substring(i,r);this.error(`Conditional expression ${a} requires all 3 expressions`),o=new wa(this.span(i),this.sourceSpan(i))}return new _b(this.span(i),this.sourceSpan(i),e,t,o)}else return e}parseLogicalOr(){let i=this.inputIndex,e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let t=this.parseLogicalAnd();e=new $a(this.span(i),this.sourceSpan(i),"||",e,t)}return e}parseLogicalAnd(){let i=this.inputIndex,e=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let t=this.parseNullishCoalescing();e=new $a(this.span(i),this.sourceSpan(i),"&&",e,t)}return e}parseNullishCoalescing(){let i=this.inputIndex,e=this.parseEquality();for(;this.consumeOptionalOperator("??");){let t=this.parseEquality();e=new $a(this.span(i),this.sourceSpan(i),"??",e,t)}return e}parseEquality(){let i=this.inputIndex,e=this.parseRelational();for(;this.next.type==un.Operator;){let t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();let o=this.parseRelational();e=new $a(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseRelational(){let i=this.inputIndex,e=this.parseAdditive();for(;this.next.type==un.Operator||this.next.isKeywordIn()||this.next.isKeywordInstanceOf();){let t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":case"in":case"instanceof":this.advance();let o=this.parseAdditive();e=new $a(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseAdditive(){let i=this.inputIndex,e=this.parseMultiplicative();for(;this.next.type==un.Operator;){let t=this.next.strValue;switch(t){case"+":case"-":this.advance();let o=this.parseMultiplicative();e=new $a(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseMultiplicative(){let i=this.inputIndex,e=this.parseExponentiation();for(;this.next.type==un.Operator;){let t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();let o=this.parseExponentiation();e=new $a(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseExponentiation(){let i=this.inputIndex,e=this.parsePrefix();for(;this.next.type==un.Operator&&this.next.strValue==="**";){(e instanceof Gh||e instanceof m0||e instanceof p0||e instanceof u0)&&this.error("Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence"),this.advance();let t=this.parseExponentiation();e=new $a(this.span(i),this.sourceSpan(i),"**",e,t)}return e}parsePrefix(){if(this.next.type==un.Operator){let i=this.inputIndex,e=this.next.strValue,t;switch(e){case"+":return this.advance(),t=this.parsePrefix(),Gh.createPlus(this.span(i),this.sourceSpan(i),t);case"-":return this.advance(),t=this.parsePrefix(),Gh.createMinus(this.span(i),this.sourceSpan(i),t);case"!":return this.advance(),t=this.parsePrefix(),new m0(this.span(i),this.sourceSpan(i),t)}}else if(this.next.isKeywordTypeof()){let i=this.inputIndex;this.advance();let e=this.parsePrefix();return new p0(this.span(i),this.sourceSpan(i),e)}else if(this.next.isKeywordVoid()){let i=this.inputIndex;this.advance();let e=this.parsePrefix();return new u0(this.span(i),this.sourceSpan(i),e)}return this.parseCallChain()}parseCallChain(){let i=this.inputIndex,e=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(Qp))e=this.parseAccessMember(e,i,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(Wa)?e=this.parseCall(e,i,!0):e=this.consumeOptionalCharacter(Dc)?this.parseKeyedReadOrWrite(e,i,!0):this.parseAccessMember(e,i,!0);else if(this.consumeOptionalCharacter(Dc))e=this.parseKeyedReadOrWrite(e,i,!1);else if(this.consumeOptionalCharacter(Wa))e=this.parseCall(e,i,!1);else if(this.consumeOptionalOperator("!"))e=new h0(this.span(i),this.sourceSpan(i),e);else if(this.next.isTemplateLiteralEnd())e=this.parseNoInterpolationTaggedTemplateLiteral(e,i);else if(this.next.isTemplateLiteralPart())e=this.parseTaggedTemplateLiteral(e,i);else return e}parsePrimary(){let i=this.inputIndex;if(this.isArrowFunction())return this.parseArrowFunction(i);if(this.consumeOptionalCharacter(Wa)){this.rparensExpected++;let e=this.parsePipe();return this.consumeOptionalCharacter(Sr)||(this.error("Missing closing parentheses"),this.consumeOptionalCharacter(Sr)),this.rparensExpected--,new _0(this.span(i),this.sourceSpan(i),e)}else{if(this.next.isKeywordNull())return this.advance(),new ss(this.span(i),this.sourceSpan(i),null);if(this.next.isKeywordUndefined())return this.advance(),new ss(this.span(i),this.sourceSpan(i),void 0);if(this.next.isKeywordTrue())return this.advance(),new ss(this.span(i),this.sourceSpan(i),!0);if(this.next.isKeywordFalse())return this.advance(),new ss(this.span(i),this.sourceSpan(i),!1);if(this.next.isKeywordIn())return this.advance(),new ss(this.span(i),this.sourceSpan(i),"in");if(this.next.isKeywordThis())return this.advance(),new s0(this.span(i),this.sourceSpan(i));if(this.consumeOptionalCharacter(Dc))return this.parseLiteralArray(i);if(this.next.isCharacter(sl))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new Nc(this.span(i),this.sourceSpan(i)),i,!1);if(this.next.isNumber()){let e=this.next.toNumber();return this.advance(),new ss(this.span(i),this.sourceSpan(i),e)}else{if(this.next.isTemplateLiteralEnd())return this.parseNoInterpolationTemplateLiteral();if(this.next.isTemplateLiteralPart())return this.parseTemplateLiteral();if(this.next.isString()&&this.next.kind===lu.Plain){let e=this.next.toString();return this.advance(),new ss(this.span(i),this.sourceSpan(i),e)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new wa(this.span(i),this.sourceSpan(i))):this.next.isRegExpBody()?this.parseRegularExpressionLiteral():this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new wa(this.span(i),this.sourceSpan(i))):(this.error(`Unexpected token ${this.next}`),new wa(this.span(i),this.sourceSpan(i)))}}}parseLiteralArray(i){this.rbracketsExpected++;let e=[];do if(this.next.isOperator("..."))e.push(this.parseSpreadElement());else if(!this.next.isCharacter(kd))e.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(Ma));return this.rbracketsExpected--,this.expectCharacter(kd),new d0(this.span(i),this.sourceSpan(i),e)}parseLiteralMap(){let i=[],e=[],t=this.inputIndex;if(this.expectCharacter(sl),!this.consumeOptionalCharacter(Ua)){this.rbracesExpected++;do{let o=this.inputIndex;if(this.next.isOperator("...")){this.advance(),i.push({kind:"spread",span:this.span(o),sourceSpan:this.sourceSpan(o)}),e.push(this.parsePipe());continue}let r=this.next.isString(),a=this.expectIdentifierOrKeywordOrString(),c=this.span(o),m=this.sourceSpan(o),u={kind:"property",key:a,quoted:r,span:c,sourceSpan:m};i.push(u),r?(this.expectCharacter(kc),e.push(this.parsePipe())):this.consumeOptionalCharacter(kc)?e.push(this.parsePipe()):(u.isShorthandInitialized=!0,e.push(new Ec(c,m,m,new Nc(c,m),a)))}while(this.consumeOptionalCharacter(Ma)&&!this.next.isCharacter(Ua));this.rbracesExpected--,this.expectCharacter(Ua)}return new vu(this.span(t),this.sourceSpan(t),i,e)}parseAccessMember(i,e,t){let o=this.inputIndex,r=this.withContext($_.Writable,()=>{let c=this.expectIdentifierOrKeyword()??"";return c.length===0&&this.error("Expected identifier for property access",i.span.end),c}),a=this.sourceSpan(o);if(t)return this.isAssignmentOperator(this.next)?(this.advance(),this.error("The '?.' operator cannot be used in the assignment"),new wa(this.span(e),this.sourceSpan(e))):new l0(this.span(e),this.sourceSpan(e),a,i,r);if(this.isAssignmentOperator(this.next)){let c=this.next.strValue;if(!(this.parseFlags&1))return this.advance(),this.error("Bindings cannot contain assignments"),new wa(this.span(e),this.sourceSpan(e));let m=new Ec(this.span(e),this.sourceSpan(e),a,i,r);this.advance();let u=this.parseConditional();return new $a(this.span(e),this.sourceSpan(e),c,m,u)}else return new Ec(this.span(e),this.sourceSpan(e),a,i,r)}parseCall(i,e,t){let o=this.inputIndex;this.rparensExpected++;let r=this.parseCallArguments(),a=this.span(o,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(Sr),this.rparensExpected--;let c=this.span(e),m=this.sourceSpan(e);return t?new bb(c,m,i,r,a):new Jh(c,m,i,r,a)}parseCallArguments(){if(this.next.isCharacter(Sr))return[];let i=[];do i.push(this.next.isOperator("...")?this.parseSpreadElement():this.parsePipe());while(this.consumeOptionalCharacter(Ma));return i}parseSpreadElement(){this.next.isOperator("...")||this.error("Spread element must start with '...' operator");let i=this.inputIndex;this.advance();let e=this.parsePipe(),t=this.span(i),o=this.sourceSpan(i);return new Cb(t,o,e)}expectTemplateBindingKey(){let i="",e=!1,t=this.currentAbsoluteOffset;do i+=this.expectIdentifierOrKeywordOrString(),e=this.consumeOptionalOperator("-"),e&&(i+="-");while(e);return{source:i,span:new Rs(t,t+i.length)}}parseTemplateBindings(i){let e=[];for(e.push(...this.parseDirectiveKeywordBindings(i));this.index{this.rbracketsExpected++;let o=this.parsePipe();if(o instanceof wa&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(kd),this.isAssignmentOperator(this.next)){let r=this.next.strValue;if(t)this.advance(),this.error("The '?.' operator cannot be used in the assignment");else{let a=new _u(this.span(e),this.sourceSpan(e),i,o);this.advance();let c=this.parseConditional();return new $a(this.span(e),this.sourceSpan(e),r,a,c)}}else return t?new c0(this.span(e),this.sourceSpan(e),i,o):new _u(this.span(e),this.sourceSpan(e),i,o);return new wa(this.span(e),this.sourceSpan(e))})}parseDirectiveKeywordBindings(i){let e=[];this.consumeOptionalCharacter(kc);let t=this.getDirectiveBoundTarget(),o=this.currentAbsoluteOffset,r=this.parseAsBinding(i);r||(this.consumeStatementTerminator(),o=this.currentAbsoluteOffset);let a=new Rs(i.span.start,o);return e.push(new PE(a,i,t)),r&&e.push(r),e}getDirectiveBoundTarget(){if(this.next===O_||this.peekKeywordAs()||this.peekKeywordLet())return null;let i=this.parsePipe(),{start:e,end:t}=i.span,o=this.input.substring(e,t);return new cs(i,o,bm(this.parseSourceSpan),this.absoluteOffset+e,this.errors)}parseAsBinding(i){if(!this.peekKeywordAs())return null;this.advance();let e=this.expectTemplateBindingKey();this.consumeStatementTerminator();let t=new Rs(i.span.start,this.currentAbsoluteOffset);return new v0(t,e,i)}parseLetBinding(){if(!this.peekKeywordLet())return null;let i=this.currentAbsoluteOffset;this.advance();let e=this.expectTemplateBindingKey(),t=null;this.consumeOptionalOperator("=")&&(t=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let o=new Rs(i,this.currentAbsoluteOffset);return new v0(o,e,t)}parseNoInterpolationTaggedTemplateLiteral(i,e){let t=this.parseNoInterpolationTemplateLiteral();return new f0(this.span(e),this.sourceSpan(e),i,t)}parseNoInterpolationTemplateLiteral(){let i=this.next.strValue,e=this.inputIndex;this.advance();let t=this.span(e),o=this.sourceSpan(e);return new g0(t,o,[new xb(t,o,i)],[])}parseTaggedTemplateLiteral(i,e){let t=this.parseTemplateLiteral();return new f0(this.span(e),this.sourceSpan(e),i,t)}parseTemplateLiteral(){let i=[],e=[],t=this.inputIndex;for(;this.next!==O_;){let o=this.next;if(o.isTemplateLiteralPart()||o.isTemplateLiteralEnd()){let r=this.inputIndex;if(this.advance(),i.push(new xb(this.span(r),this.sourceSpan(r),o.strValue)),o.isTemplateLiteralEnd())break}else if(o.isTemplateLiteralInterpolationStart()){this.advance(),this.rbracesExpected++;let r=this.parsePipe();r instanceof wa?this.error("Template literal interpolation cannot be empty"):e.push(r),this.rbracesExpected--}else this.advance()}return new g0(this.span(t),this.sourceSpan(t),i,e)}parseRegularExpressionLiteral(){let i=this.next;if(this.advance(),!i.isRegExpBody())return new wa(this.span(this.inputIndex),this.sourceSpan(this.inputIndex));let e=null;if(this.next.isRegExpFlags()){e=this.next,this.advance();let r=new Set;for(let a=0;a`"${m}"`).join(", "),e.index+a)}}let t=i.index,o=e?e.end:i.end;return new Sb(this.span(t,o),this.sourceSpan(t,o),i.strValue,e?e.strValue:null)}parseArrowFunction(i){let e;if(this.next.isIdentifier()){let o=this.next;this.advance(),e=[this.getArrowFunctionIdentifierArg(o)]}else this.next.isCharacter(Wa)?(this.rparensExpected++,this.advance(),e=this.parseArrowFunctionParameters(),this.rparensExpected--):(e=[],this.error(`Unexpected token ${this.next}`));this.expectOperator("=>");let t;if(this.next.isCharacter(sl))this.error("Multi-line arrow functions are not supported. If you meant to return an object literal, wrap it with parentheses."),t=new wa(this.span(i),this.sourceSpan(i));else{let o=this.parseFlags;this.parseFlags=1,t=this.parseExpression(),this.parseFlags=o}return new yb(this.span(i),this.sourceSpan(i),e,t)}parseArrowFunctionParameters(){let i=[];if(!this.consumeOptionalCharacter(Sr))for(;this.next!==O_;)if(this.next.isIdentifier()){let e=this.next;if(this.advance(),i.push(this.getArrowFunctionIdentifierArg(e)),this.consumeOptionalCharacter(Sr))break;this.expectCharacter(Ma)}else{this.error(`Unexpected token ${this.next}`);break}return i}getArrowFunctionIdentifierArg(i){return new DE(i.strValue,this.span(i.index),this.sourceSpan(i.index))}isArrowFunction(){let i=this.index,e=this.tokens;if(i>e.length-2)return!1;if(e[i].isIdentifier()&&e[i+1].isOperator("=>"))return!0;if(e[i].isCharacter(Wa)){let t=i+1;for(t;t")}return!1}consumeStatementTerminator(){this.consumeOptionalCharacter(ls)||this.consumeOptionalCharacter(Ma)}error(i,e=this.index){this.errors.push(Hh(i,this.input,this.getErrorLocationText(e),this.parseSourceSpan)),this.skip()}getErrorLocationText(i){return i0&&(e=` ${e} `);let o=bm(t),r=`Parser Error: ${n}${e}[${i}] in ${o}`;return new ln(t,r)}var vD=class extends ef{errors=[];visitPipe(){this.errors.push("pipes")}};function WX(n){let i=new Map,e=0,t=0,o=0;for(;oc+m.length,0);t+=a,e+=a}i.set(t,e),o++}return i}function qX(n){return n.visit(new CD)}var CD=class{visitUnary(i,e){return`${i.operator}${i.expr.visit(this,e)}`}visitBinary(i,e){return`${i.left.visit(this,e)} ${i.operation} ${i.right.visit(this,e)}`}visitChain(i,e){return i.expressions.map(t=>t.visit(this,e)).join("; ")}visitConditional(i,e){return`${i.condition.visit(this,e)} ? ${i.trueExp.visit(this,e)} : ${i.falseExp.visit(this,e)}`}visitThisReceiver(){return"this"}visitImplicitReceiver(){return""}visitInterpolation(i,e){return XX(i.strings,i.expressions.map(t=>t.visit(this,e))).join("")}visitKeyedRead(i,e){return`${i.receiver.visit(this,e)}[${i.key.visit(this,e)}]`}visitLiteralArray(i,e){return`[${i.expressions.map(t=>t.visit(this,e)).join(", ")}]`}visitLiteralMap(i,e){return`{${QX(i.keys.map(t=>t.kind==="spread"?"...":t.quoted?`'${t.key}'`:t.key),i.values.map(t=>t.visit(this,e))).map(([t,o])=>`${t}: ${o}`).join(", ")}}`}visitLiteralPrimitive(i){if(i.value===null)return"null";switch(typeof i.value){case"number":case"boolean":return i.value.toString();case"undefined":return"undefined";case"string":return`'${i.value.replace(/'/g,"\\'")}'`;default:throw new Error(`Unsupported primitive type: ${i.value}`)}}visitPipe(i,e){return`${i.exp.visit(this,e)} | ${i.name}`}visitPrefixNot(i,e){return`!${i.expression.visit(this,e)}`}visitNonNullAssert(i,e){return`${i.expression.visit(this,e)}!`}visitPropertyRead(i,e){return i.receiver instanceof Nc||i.receiver instanceof s0?i.name:`${i.receiver.visit(this,e)}.${i.name}`}visitSafePropertyRead(i,e){return`${i.receiver.visit(this,e)}?.${i.name}`}visitSafeKeyedRead(i,e){return`${i.receiver.visit(this,e)}?.[${i.key.visit(this,e)}]`}visitCall(i,e){return`${i.receiver.visit(this,e)}(${i.args.map(t=>t.visit(this,e)).join(", ")})`}visitSafeCall(i,e){return`${i.receiver.visit(this,e)}?.(${i.args.map(t=>t.visit(this,e)).join(", ")})`}visitTypeofExpression(i,e){return`typeof ${i.expression.visit(this,e)}`}visitVoidExpression(i,e){return`void ${i.expression.visit(this,e)}`}visitRegularExpressionLiteral(i,e){return`/${i.body}/${i.flags||""}`}visitArrowFunction(i,e){let t;return i.parameters.length===1?t=i.parameters[0].name:t=`(${i.parameters.map(o=>o.name).join(", ")})`,`${t} => ${i.body.visit(this,e)}`}visitASTWithSource(i,e){return i.ast.visit(this,e)}visitTemplateLiteral(i,e){let t="";for(let o=0;o[e,i[t]])}function XX(n,i){let e=[];for(let t=0;t(n.set(i,e),n),new Map),pf=class extends bD{_schema=new Map;_eventSchema=new Map;constructor(){super(),eY.forEach(i=>{let e=new Map,t=new Set,[o,r]=i.split("|"),a=r.split(","),[c,m]=o.split("^");c.split(",").forEach(h=>{this._schema.set(h.toLowerCase(),e),this._eventSchema.set(h.toLowerCase(),t)});let u=m&&this._schema.get(m.toLowerCase());if(u){for(let[h,g]of u)e.set(h,g);for(let h of this._eventSchema.get(m.toLowerCase()))t.add(h)}a.forEach(h=>{if(h.length>0)switch(h[0]){case"*":t.add(h.substring(1));break;case"!":e.set(h.substring(1),YX);break;case"#":e.set(h.substring(1),KX);break;case"%":e.set(h.substring(1),JX);break;default:e.set(h,ZX)}})})}hasProperty(i,e,t){if(t.some(r=>r.name===bR.name))return!0;if(i.indexOf("-")>-1){if(AR(i)||AE(i))return!1;if(t.some(r=>r.name===CR.name))return!0}return(this._schema.get(i.toLowerCase())||this._schema.get("unknown")).has(e)}hasElement(i,e){return e.some(t=>t.name===bR.name)||i.indexOf("-")>-1&&(AR(i)||AE(i)||e.some(t=>t.name===CR.name))?!0:this._schema.has(i.toLowerCase())}securityContext(i,e,t){t&&(e=this.getMappedPropName(e)),i=i.toLowerCase(),e=e.toLowerCase();let o=bF()[i+"|"+e];return o||(o=bF()["*|"+e],o||ro.NONE)}getMappedPropName(i){return m8.get(i)??i}getDefaultComponentElementName(){return"ng-component"}validateProperty(i){return i.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${i}' is disallowed for security reasons, please use (${i.slice(2)})=... -If '${i}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(i){return i.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${i}' is disallowed for security reasons, please use (${i.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(i){let e=this._schema.get(i.toLowerCase())||this._schema.get("unknown");return Array.from(e.keys()).map(t=>tY.get(t)??t)}allKnownEventsOfElement(i){return Array.from(this._eventSchema.get(i.toLowerCase())??[])}normalizeAnimationStyleProperty(i){return KG(i)}normalizeAnimationStyleValue(i,e,t){let o="",r=t.toString().trim(),a=null;if(nY(i)&&t!==0&&t!=="0")if(typeof t=="number")o="px";else{let c=t.match(/^[+-]?[\d\.]+([a-z]*)$/);c&&c[1].length==0&&(a=`Please provide a CSS unit value for ${e}:${t}`)}return{error:a,value:r+o}}};function nY(n){switch(n){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var Zn=class{closedByChildren={};contentType;closedByParent=!1;implicitNamespacePrefix;isVoid;ignoreFirstLf;canSelfClose;preventNamespaceInheritance;constructor({closedByChildren:i,implicitNamespacePrefix:e,contentType:t=Mc.PARSABLE_DATA,closedByParent:o=!1,isVoid:r=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:c=!1,canSelfClose:m=!1}={}){i&&i.length>0&&i.forEach(u=>this.closedByChildren[u]=!0),this.isVoid=r,this.closedByParent=o||r,this.implicitNamespacePrefix=e||null,this.contentType=t,this.ignoreFirstLf=a,this.preventNamespaceInheritance=c,this.canSelfClose=m??r}isClosedByChild(i){return this.isVoid||i.toLowerCase()in this.closedByChildren}getContentType(i){return typeof this.contentType=="object"?(i===void 0?void 0:this.contentType[i])??this.contentType.default:this.contentType}},xF,Rh;function xD(n){return Rh||(xF=new Zn({canSelfClose:!0}),Rh=Object.assign(Object.create(null),{base:new Zn({isVoid:!0}),meta:new Zn({isVoid:!0}),area:new Zn({isVoid:!0}),embed:new Zn({isVoid:!0}),link:new Zn({isVoid:!0}),img:new Zn({isVoid:!0}),input:new Zn({isVoid:!0}),param:new Zn({isVoid:!0}),hr:new Zn({isVoid:!0}),br:new Zn({isVoid:!0}),source:new Zn({isVoid:!0}),track:new Zn({isVoid:!0}),wbr:new Zn({isVoid:!0}),p:new Zn({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new Zn({closedByChildren:["tbody","tfoot"]}),tbody:new Zn({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new Zn({closedByChildren:["tbody"],closedByParent:!0}),tr:new Zn({closedByChildren:["tr"],closedByParent:!0}),td:new Zn({closedByChildren:["td","th"],closedByParent:!0}),th:new Zn({closedByChildren:["td","th"],closedByParent:!0}),col:new Zn({isVoid:!0}),svg:new Zn({implicitNamespacePrefix:"svg"}),foreignObject:new Zn({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new Zn({implicitNamespacePrefix:"math"}),li:new Zn({closedByChildren:["li"],closedByParent:!0}),dt:new Zn({closedByChildren:["dt","dd"]}),dd:new Zn({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new Zn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new Zn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new Zn({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new Zn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new Zn({closedByChildren:["optgroup"],closedByParent:!0}),option:new Zn({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new Zn({ignoreFirstLf:!0}),listing:new Zn({ignoreFirstLf:!0}),style:new Zn({contentType:Mc.RAW_TEXT}),script:new Zn({contentType:Mc.RAW_TEXT}),title:new Zn({contentType:{default:Mc.ESCAPABLE_RAW_TEXT,svg:Mc.PARSABLE_DATA}}),textarea:new Zn({contentType:Mc.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new pf().allKnownElementNames().forEach(i=>{!Rh[i]&&OE(i)===null&&(Rh[i]=new Zn({canSelfClose:!1}))})),Rh[n]??Rh[n.toLowerCase()]??xF}var yF={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"},yD=class{_placeHolderNameCounts={};_signatureToName={};getStartTagPlaceholderName(i,e,t){let o=this._hashTag(i,e,t);if(this._signatureToName[o])return this._signatureToName[o];let r=i.toUpperCase(),a=yF[r]||`TAG_${r}`,c=this._generateUniqueName(t?a:`START_${a}`);return this._signatureToName[o]=c,c}getCloseTagPlaceholderName(i){let e=this._hashClosingTag(i);if(this._signatureToName[e])return this._signatureToName[e];let t=i.toUpperCase(),o=yF[t]||`TAG_${t}`,r=this._generateUniqueName(`CLOSE_${o}`);return this._signatureToName[e]=r,r}getPlaceholderName(i,e){let t=i.toUpperCase(),o=`PH: ${t}=${e}`;if(this._signatureToName[o])return this._signatureToName[o];let r=this._generateUniqueName(t);return this._signatureToName[o]=r,r}getUniquePlaceholder(i){return this._generateUniqueName(i.toUpperCase())}getStartBlockPlaceholderName(i,e){let t=this._hashBlock(i,e);if(this._signatureToName[t])return this._signatureToName[t];let o=this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(i)}`);return this._signatureToName[t]=o,o}getCloseBlockPlaceholderName(i){let e=this._hashClosingBlock(i);if(this._signatureToName[e])return this._signatureToName[e];let t=this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(i)}`);return this._signatureToName[e]=t,t}_hashTag(i,e,t){let o=`<${i}`,r=Object.keys(e).sort().map(c=>` ${c}=${e[c]}`).join(""),a=t?"/>":`>`;return o+r+a}_hashClosingTag(i){return this._hashTag(`/${i}`,{},!1)}_hashBlock(i,e){let t=e.length===0?"":` (${e.sort().join("; ")})`;return`@${i}${t} {}`}_hashClosingBlock(i){return this._hashBlock(`close_${i}`,[])}_toSnakeCase(i){return i.toUpperCase().replace(/[^A-Z0-9]/g,"_")}_generateUniqueName(i){if(!this._placeHolderNameCounts.hasOwnProperty(i))return this._placeHolderNameCounts[i]=1,i;let t=this._placeHolderNameCounts[i];return this._placeHolderNameCounts[i]=t+1,`${i}_${t}`}},iY=new tx(new G0);function oY(n,i){let e=new SD(iY,n,i);return(t,o,r,a,c)=>e.toI18nMessage(t,o,r,a,c)}function rY(n,i){return i}var SD=class{_expressionParser;_retainEmptyTokens;_preserveExpressionWhitespace;constructor(i,e,t){this._expressionParser=i,this._retainEmptyTokens=e,this._preserveExpressionWhitespace=t}toI18nMessage(i,e="",t="",o="",r){let a={isIcu:i.length==1&&i[0]instanceof su,icuDepth:0,placeholderRegistry:new yD,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||rY},c=So(this,i,a);return new Qa(c,a.placeholderToContent,a.placeholderToMessage,e,t,o)}visitElement(i,e){return this._visitElementLike(i,e)}visitComponent(i,e){return this._visitElementLike(i,e)}visitDirective(i,e){throw new Error("Unreachable code")}visitAttribute(i,e){let t=i.valueTokens===void 0||i.valueTokens.length===1?new D_(i.value,i.valueSpan||i.sourceSpan):this._visitTextWithInterpolation(i.valueTokens,i.valueSpan||i.sourceSpan,e,i.i18n);return e.visitNodeFn(i,t)}visitText(i,e){let t=i.tokens.length===1?new D_(i.value,i.sourceSpan):this._visitTextWithInterpolation(i.tokens,i.sourceSpan,e,i.i18n);return e.visitNodeFn(i,t)}visitComment(i,e){return null}visitExpansion(i,e){e.icuDepth++;let t={},o=new Ab(i.switchValue,i.type,t,i.sourceSpan);if(i.cases.forEach(c=>{t[c.value]=new Ed(c.expression.map(m=>m.visit(this,e)),c.expSourceSpan)}),e.icuDepth--,e.isIcu||e.icuDepth>0){let c=e.placeholderRegistry.getUniquePlaceholder(`VAR_${i.type}`);return o.expressionPlaceholder=c,e.placeholderToContent[c]={text:i.switchValue,sourceSpan:i.switchValueSourceSpan},e.visitNodeFn(i,o)}let r=e.placeholderRegistry.getPlaceholderName("ICU",i.sourceSpan.toString());e.placeholderToMessage[r]=this.toI18nMessage([i],"","","",void 0);let a=new af(o,r,i.sourceSpan);return e.visitNodeFn(i,a)}visitExpansionCase(i,e){throw new Error("Unreachable code")}visitBlock(i,e){let t=So(this,i.children,e);if(i.name==="switch")return new Ed(t,i.sourceSpan);let o=i.parameters.map(m=>m.expression),r=e.placeholderRegistry.getStartBlockPlaceholderName(i.name,o),a=e.placeholderRegistry.getCloseBlockPlaceholderName(i.name);e.placeholderToContent[r]={text:i.startSourceSpan.toString(),sourceSpan:i.startSourceSpan},e.placeholderToContent[a]={text:i.endSourceSpan?i.endSourceSpan.toString():"}",sourceSpan:i.endSourceSpan??i.sourceSpan};let c=new Dm(i.name,o,r,a,t,i.sourceSpan,i.startSourceSpan,i.endSourceSpan);return e.visitNodeFn(i,c)}visitBlockParameter(i,e){throw new Error("Unreachable code")}visitLetDeclaration(i,e){return null}_visitElementLike(i,e){let t=So(this,i.children,e),o={},r=g=>{o[g.name]=g.value},a,c;i instanceof il?(a=i.name,c=xD(i.name).isVoid):(a=i.fullName,c=i.tagName?xD(i.tagName).isVoid:!1),i.attrs.forEach(r),i.directives.forEach(g=>g.attrs.forEach(r));let m=e.placeholderRegistry.getStartTagPlaceholderName(a,o,c);e.placeholderToContent[m]={text:i.startSourceSpan.toString(),sourceSpan:i.startSourceSpan};let u="";c||(u=e.placeholderRegistry.getCloseTagPlaceholderName(a),e.placeholderToContent[u]={text:``,sourceSpan:i.endSourceSpan??i.sourceSpan});let h=new Em(a,o,m,u,t,c,i.sourceSpan,i.startSourceSpan,i.endSourceSpan);return e.visitNodeFn(i,h)}_visitTextWithInterpolation(i,e,t,o){let r=[],a=!1;for(let c of i)switch(c.type){case 8:case 17:a=!0;let[m,u,h]=c.parts,g=dY(u)||"INTERPOLATION",S=t.placeholderRegistry.getPlaceholderName(g,u);if(this._preserveExpressionWhitespace)t.placeholderToContent[S]={text:c.parts.join(""),sourceSpan:c.sourceSpan},r.push(new T0(u,S,c.sourceSpan));else{let x=this.normalizeExpression(c);t.placeholderToContent[S]={text:`${m}${x}${h}`,sourceSpan:c.sourceSpan},r.push(new T0(x,S,c.sourceSpan))}break;default:if(c.parts[0].length>0||this._retainEmptyTokens){let x=r[r.length-1];x instanceof D_?(x.value+=c.parts[0],x.sourceSpan=new _n(x.sourceSpan.start,c.sourceSpan.end,x.sourceSpan.fullStart,x.sourceSpan.details)):r.push(new D_(c.parts[0],c.sourceSpan))}else this._retainEmptyTokens&&r.push(new D_(c.parts[0],c.sourceSpan));break}return a?(aY(r,o),new Ed(r,e)):r[0]}normalizeExpression(i){let e=i.parts[1],t=this._expressionParser.parseBinding(e,i.sourceSpan,i.sourceSpan.start.offset);return qX(t)}};function aY(n,i){if(i instanceof Qa&&(sY(i),i=i.nodes[0]),i instanceof Ed){lY(i.children,n);for(let e=0;e{if(t){let r=[];for(let a of this._splitOnTopLevelCommas(t,!0)){let c=a.trim();if(!c)break;let p=Jd+c.replace(E1,"")+o;r.push(p)}return r.join(",")}else return Jd+o})}*_splitOnTopLevelCommas(i,e){let t=i.length,o=0,r=0;for(let a=0;a{let o=[[]],r=e.indexOf(lh);for(;r!==-1;){let a=e.substring(r+lh.length);if(!a||a[0]!=="("){e=a,r=e.indexOf(lh);continue}let c=[],p=0;for(let h of this._splitOnTopLevelCommas(a.substring(1),!0)){p=p+h.length+1;let _=h.trim();_&&c.push(_)}let u=o.length;sU(o,c.length);for(let h=0;haU(a,e,t)).join(", ")})}_convertShadowDOMSelectors(i){return HH.reduce((e,t)=>e.replace(t," "),i)}_scopeSelectors(i,e,t){return AC(i,o=>{let r=o.selector,a=o.content;return o.selector[0]!=="@"?r=this._scopeSelector({selector:r,scopeSelector:e,hostSelector:t,isParentSelector:!0}):AH.some(c=>o.selector.startsWith(c))?a=this._scopeSelectors(o.content,e,t):(o.selector.startsWith("@font-face")||o.selector.startsWith("@page"))&&(a=this._stripScopingSelectors(o.content)),new j_(r,a)})}_stripScopingSelectors(i){return AC(i,e=>{let t=e.selector.replace(b5," ").replace(gk," ");return new j_(t,e.content)})}_safeSelector;_shouldScopeIndicator;_scopeSelector({selector:i,scopeSelector:e,hostSelector:t,isParentSelector:o=!1}){let r=/ ?,(?!(?:[^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\))) ?/;return i.split(r).map(a=>a.split(b5)).map(a=>{let[c,...p]=a;return[(h=>this._selectorNeedsScoping(h,e)?this._applySelectorScope({selector:h,scopeSelector:e,hostSelector:t,isParentSelector:o}):h)(c),...p].join(" ")}).join(", ")}_selectorNeedsScoping(i,e){return!this._makeScopeMatcher(e).test(i)}_makeScopeMatcher(i){let e=/\[/g,t=/\]/g;return i=i.replace(e,"\\[").replace(t,"\\]"),new RegExp("^("+i+")"+UH,"m")}_applySimpleSelectorScope(i,e,t){if(ph.lastIndex=0,ph.test(i)){let o=`[${t}]`,r=i;for(;r.match(gk);)r=r.replace(gk,(a,c)=>c.replace(/([^:\)]*)(:*)(.*)/,(p,u,h,_)=>u+o+h+_));return r.replace(ph,o)}return e+" "+i}_applySelectorScope({selector:i,scopeSelector:e,hostSelector:t,isParentSelector:o}){let r=/\[is=([^\]]*)\]/g;e=e.replace(r,(M,...w)=>w[0]);let a=`[${e}]`,c=M=>{let w=M.trim();if(!w)return M;if(M.includes(Jd)){if(w=this._applySimpleSelectorScope(M,e,t),!M.match($H)){let[y,E,I,D]=w.match(/([^:]*)(:*)([\s\S]*)/);w=E+a+I+D}}else{let y=M.replace(ph,"");if(y.length>0){let E=y.match(/([^:]*)(:*)([\s\S]*)/);E&&(w=E[1]+a+E[2]+E[3])}}return w},p=M=>{let w="",y=[],E;for(;(E=Bg.exec(M))!==null;){let I=1,D=Bg.lastIndex;for(;D{let[D]=I.match(Bg)??[],N=I.slice(D?.length,-1);N.includes(Jd)&&(this._shouldScopeIndicator=!0);let P=this._scopeSelector({selector:N,scopeSelector:e,hostSelector:t});return`${D}${P})`}).join(""):(this._shouldScopeIndicator=this._shouldScopeIndicator||M.includes(Jd),w=this._shouldScopeIndicator?c(M):M),w};o&&(this._safeSelector=new hT(i),i=this._safeSelector.content());let u="",h=0,_,S=/( |>|\+|~(?!=))(?!([^)(]*(?:\([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*\)[^)(]*)*\)))\s*/g,x=i.includes(Jd);for((o||this._shouldScopeIndicator)&&(this._shouldScopeIndicator=!x);(_=S.exec(i))!==null;){let M=_[1],w=i.slice(h,_.index);if(w.match(/__esc-ph-(\d+)__/)&&i[_.index+1]?.match(/[a-fA-F\d]/))continue;let y=p(w);u+=`${y} ${M} `,h=S.lastIndex}let b=i.substring(h);return u+=p(b),this._safeSelector.restore(u)}_insertPolyfillHostInCssText(i){return i.replace(WH,lh).replace(GH,E1)}},hT=class{placeholders=[];index=0;_content;constructor(i){i=this._escapeRegexMatches(i,/(\[[^\]]*\])/g),i=i.replace(/(\\.)/g,(e,t)=>{let o=`__esc-ph-${this.index}__`;return this.placeholders.push(t),this.index++,o}),this._content=i.replace(VH,(e,t,o)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(`(${o})`),this.index++,t+r})}restore(i){return i.replace(/__(?:ph|esc-ph)-(\d+)__/g,(e,t)=>this.placeholders[+t])}content(){return this._content}_escapeRegexMatches(i,e){return i.replace(e,(t,o)=>{let r=`__ph-${this.index}__`;return this.placeholders.push(o),this.index++,r})}},OH="(:(where|is)\\()?",Bg=/:(where|is)\(/gi,NH=/polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim,FH=/(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,C5=/(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim,E1="-shadowcsshost",lh="-shadowcsscontext",fT="[^)(]*",RH=String.raw`(?:\(${fT}\)|${fT})+?`,LH=String.raw`(?:\(${RH}\)|${fT})+?`,SE=String.raw`(?:\((${LH})\))`,VH=new RegExp(String.raw`(:nth-[-\w]+)`+SE,"g"),BH=new RegExp(E1+SE+"?([^,{]*)","gim"),zH=lh+SE+"?([^{]*)",jH=new RegExp(`${OH}(${zH})`,"gim"),Jd=E1+"-no-combinator",$H=new RegExp(`${Jd}(?![^(]*\\))`,"g"),gk=/-shadowcsshost-no-combinator([^\s,]*)/,HH=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],b5=/(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g,UH="([>\\s~+[.,{:][\\s\\S]*)?$",ph=/-shadowcsshost/gim,GH=/:host/gim,WH=/:host-context/gim,qH=/\r?\n/g,QH=/\/\*[\s\S]*?\*\//g,XH=/\/\*\s*#\s*source(Mapping)?URL=/g,wE="%COMMENT%",KH=new RegExp(wE,"g"),_k="%BLOCK%",YH=new RegExp(`(\\s*(?:${wE}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g"),ZH=new Map([["{","}"]]),uF="%COMMA_IN_PLACEHOLDER%",hF="%SEMI_IN_PLACEHOLDER%",fF="%COLON_IN_PLACEHOLDER%",JH=new RegExp(uF,"g"),eU=new RegExp(hF,"g"),tU=new RegExp(fF,"g"),j_=class{selector;content;constructor(i,e){this.selector=i,this.content=e}};function AC(n,i){let e=oU(n),t=nU(e,ZH,_k),o=0,r=t.escapedString.replace(YH,(...a)=>{let c=a[2],p="",u=a[4],h="";u&&u.startsWith("{"+_k)&&(p=t.blocks[o++],u=u.substring(_k.length+1),h="{");let _=i(new j_(c,p));return`${a[1]}${_.selector}${a[3]}${h}${_.content}${u}`});return rU(r)}var gT=class{escapedString;blocks;constructor(i,e){this.escapedString=i,this.blocks=e}};function nU(n,i,e){let t=[],o=[],r=0,a=0,c=-1,p,u;for(let h=0;h0;){let a=r.length,c=n.pop();for(let p=0;po?`${e}${a}${i}`:`${e}${a}${t}${i}, ${e}${a} ${t}${i}`).join(",")}function sU(n,i){let e=n.length;for(let t=1;t{class n{static nextListId=0;debugListId=n.nextListId++;head={kind:V.ListEnd,next:null,prev:null,debugListId:this.debugListId};tail={kind:V.ListEnd,next:null,prev:null,debugListId:this.debugListId};constructor(){this.head.next=this.tail,this.tail.prev=this.head}push(e){if(Array.isArray(e)){for(let o of e)this.push(o);return}n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=this.debugListId;let t=this.tail.prev;e.prev=t,t.next=e,e.next=this.tail,this.tail.prev=e}prepend(e){if(e.length===0)return;for(let r of e)n.assertIsNotEnd(r),n.assertIsUnowned(r),r.debugListId=this.debugListId;let t=this.head.next,o=this.head;for(let r of e)o.next=r,r.prev=o,o=r;o.next=t,t.prev=o}*[Symbol.iterator](){let e=this.head.next;for(;e!==this.tail;){n.assertIsOwned(e,this.debugListId);let t=e.next;yield e,e=t}}*reversed(){let e=this.tail.prev;for(;e!==this.head;){n.assertIsOwned(e,this.debugListId);let t=e.prev;yield e,e=t}}static replace(e,t){n.assertIsNotEnd(e),n.assertIsNotEnd(t),n.assertIsOwned(e),n.assertIsUnowned(t),t.debugListId=e.debugListId,e.prev!==null&&(e.prev.next=t,t.prev=e.prev),e.next!==null&&(e.next.prev=t,t.next=e.next),e.debugListId=null,e.prev=null,e.next=null}static replaceWithMany(e,t){if(t.length===0){n.remove(e);return}n.assertIsNotEnd(e),n.assertIsOwned(e);let o=e.debugListId;e.debugListId=null;for(let h of t)n.assertIsNotEnd(h),n.assertIsUnowned(h);let{prev:r,next:a}=e;e.prev=null,e.next=null;let c=r;for(let h of t)n.assertIsUnowned(h),h.debugListId=o,c.next=h,h.prev=c,h.next=null,c=h;let p=t[0],u=c;r!==null&&(r.next=p,p.prev=r),a!==null&&(a.prev=u,u.next=a)}static remove(e){n.assertIsNotEnd(e),n.assertIsOwned(e),e.prev.next=e.next,e.next.prev=e.prev,e.debugListId=null,e.prev=null,e.next=null}static insertBefore(e,t){if(Array.isArray(e)){for(let o of e)n.insertBefore(o,t);return}if(n.assertIsOwned(t),t.prev===null)throw new Error("AssertionError: illegal operation on list start");n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=t.debugListId,e.prev=null,t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e}static insertAfter(e,t){if(n.assertIsOwned(t),t.next===null)throw new Error("AssertionError: illegal operation on list end");n.assertIsNotEnd(e),n.assertIsUnowned(e),e.debugListId=t.debugListId,t.next.prev=e,e.next=t.next,e.prev=t,t.next=e}static assertIsUnowned(e){if(e.debugListId!==null)throw new Error(`AssertionError: illegal operation on owned node: ${V[e.kind]}`)}static assertIsOwned(e,t){if(e.debugListId===null)throw new Error(`AssertionError: illegal operation on unowned node: ${V[e.kind]}`);if(t!==void 0&&e.debugListId!==t)throw new Error(`AssertionError: node belongs to the wrong list (expected ${t}, actual ${e.debugListId})`)}static assertIsNotEnd(e){if(e.kind===V.ListEnd)throw new Error("AssertionError: illegal operation on list head or tail")}}return n})();function Is(n){return K({kind:V.Statement,statement:n},_n)}function tm(n,i,e,t){return K({kind:V.Variable,xref:n,variable:i,initializer:e,flags:t},_n)}var _n={debugListId:null,prev:null,next:null},gF=Symbol("ConsumesSlot"),ME=Symbol("DependsOnSlotContext"),tu=Symbol("ConsumesVars"),c0=Symbol("UsesVarOffset"),il={[gF]:!0,numSlotsUsed:1},as={[ME]:!0},ss={[tu]:!0};function jh(n){return n[gF]===!0}function H_(n){return n[ME]===!0}function vk(n){return n[tu]===!0}function y5(n){return n[c0]===!0}function lU(n,i,e){return K(K(K({kind:V.InterpolateText,target:n,interpolation:i,sourceSpan:e},as),ss),_n)}var Qo=class{strings;expressions;i18nPlaceholders;constructor(i,e,t){if(this.strings=i,this.expressions=e,this.i18nPlaceholders=t,t.length!==0&&t.length!==e.length)throw new Error(`Expected ${e.length} placeholders to match interpolation expression count, but got ${t.length}`)}};function Xp(n,i,e,t,o,r,a,c,p,u,h){return K({kind:V.Binding,bindingKind:i,target:n,name:e,expression:t,unit:o,securityContext:r,isTextAttribute:a,isStructuralTemplateAttribute:c,templateKind:p,i18nContext:null,i18nMessage:u,sourceSpan:h},_n)}function cU(n,i,e,t,o,r,a,c,p,u){return K(K(K({kind:V.Property,target:n,name:i,expression:e,bindingKind:t,securityContext:o,sanitizer:null,isStructuralTemplateAttribute:r,templateKind:a,i18nContext:c,i18nMessage:p,sourceSpan:u},as),ss),_n)}function dU(n,i,e,t,o,r,a,c,p){return K(K(K({kind:V.TwoWayProperty,target:n,name:i,expression:e,securityContext:t,sanitizer:null,isStructuralTemplateAttribute:o,templateKind:r,i18nContext:a,i18nMessage:c,sourceSpan:p},as),ss),_n)}function mU(n,i,e,t,o){return K(K(K({kind:V.StyleProp,target:n,name:i,expression:e,unit:t,sourceSpan:o},as),ss),_n)}function pU(n,i,e,t){return K(K(K({kind:V.ClassProp,target:n,name:i,expression:e,sourceSpan:t},as),ss),_n)}function uU(n,i,e){return K(K(K({kind:V.StyleMap,target:n,expression:i,sourceSpan:e},as),ss),_n)}function hU(n,i,e){return K(K(K({kind:V.ClassMap,target:n,expression:i,sourceSpan:e},as),ss),_n)}function S5(n,i,e,t,o,r,a,c,p,u){return K(K(K({kind:V.Attribute,target:n,namespace:i,name:e,expression:t,securityContext:o,sanitizer:null,isTextAttribute:r,isStructuralTemplateAttribute:a,templateKind:c,i18nContext:null,i18nMessage:p,sourceSpan:u},as),ss),_n)}function fU(n,i){return K({kind:V.Advance,delta:n,sourceSpan:i},_n)}function _F(n,i,e,t){return K(K(K({kind:V.Conditional,target:n,test:i,conditions:e,processed:null,sourceSpan:t,contextValue:null},_n),as),ss)}function gU(n,i,e,t){return K(K({kind:V.Repeater,target:n,targetSlot:i,collection:e,sourceSpan:t},_n),as)}function w5(n,i,e,t,o,r,a){return K({kind:V.AnimationBinding,name:n,target:i,animationKind:e,expression:t,i18nMessage:null,securityContext:o,sanitizer:null,sourceSpan:r,animationBindingKind:a},_n)}function _U(n,i,e,t){return K(K(K({kind:V.DeferWhen,target:n,expr:i,modifier:e,sourceSpan:t},_n),as),ss)}function vF(n,i,e,t,o,r,a,c,p,u,h){return K(K(K({kind:V.I18nExpression,context:n,target:i,i18nOwner:e,handle:t,expression:o,icuPlaceholder:r,i18nPlaceholder:a,resolutionTime:c,usage:p,name:u,sourceSpan:h},_n),ss),as)}function vU(n,i,e){return K({kind:V.I18nApply,owner:n,handle:i,sourceSpan:e},_n)}function CU(n,i,e,t){return K(K(K({kind:V.StoreLet,target:n,declaredName:i,value:e,sourceSpan:t},as),ss),_n)}function bU(n,i){return K(K({kind:V.Control,sourceSpan:i,target:n},as),_n)}function Ec(n){return n instanceof Wi}var Wi=class extends Bi{constructor(i=null){super(null,i)}},Ur=class n extends Wi{name;kind=Qt.LexicalRead;constructor(i){super(),this.name=i}visitExpression(i,e){}isEquivalent(i){return this.name===i.name}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.name)}},D1=class n extends Wi{target;targetSlot;offset;kind=Qt.Reference;constructor(i,e,t){super(),this.target=i,this.targetSlot=e,this.offset=t}visitExpression(){}isEquivalent(i){return i instanceof n&&i.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.target,this.targetSlot,this.offset)}},U_=class n extends Wi{target;value;sourceSpan;kind=Qt.StoreLet;[tu]=!0;[ME]=!0;constructor(i,e,t){super(),this.target=i,this.value=e,this.sourceSpan=t}visitExpression(){}isEquivalent(i){return i instanceof n&&i.target===this.target&&i.value.isEquivalent(this.value)}isConstant(){return!1}transformInternalExpressions(i,e){this.value=Vt(this.value,i,e)}clone(){return new n(this.target,this.value,this.sourceSpan)}},G_=class n extends Wi{target;targetSlot;kind=Qt.ContextLetReference;constructor(i,e){super(),this.target=i,this.targetSlot=e}visitExpression(){}isEquivalent(i){return i instanceof n&&i.target===this.target}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.target,this.targetSlot)}},pm=class n extends Wi{view;kind=Qt.Context;constructor(i){super(),this.view=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.view)}},_T=class n extends Wi{view;kind=Qt.TrackContext;constructor(i){super(),this.view=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.view===this.view}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n(this.view)}},P1=class n extends Wi{kind=Qt.NextContext;steps=1;visitExpression(){}isEquivalent(i){return i instanceof n&&i.steps===this.steps}isConstant(){return!1}transformInternalExpressions(){}clone(){let i=new n;return i.steps=this.steps,i}},vT=class n extends Wi{kind=Qt.GetCurrentView;constructor(){super()}visitExpression(){}isEquivalent(i){return i instanceof n}isConstant(){return!1}transformInternalExpressions(){}clone(){return new n}},W_=class n extends Wi{view;kind=Qt.RestoreView;constructor(i){super(),this.view=i}visitExpression(i,e){typeof this.view!="number"&&this.view.visitExpression(i,e)}isEquivalent(i){return!(i instanceof n)||typeof i.view!=typeof this.view?!1:typeof this.view=="number"?this.view===i.view:this.view.isEquivalent(i.view)}isConstant(){return!1}transformInternalExpressions(i,e){typeof this.view!="number"&&(this.view=Vt(this.view,i,e))}clone(){return new n(this.view instanceof Bi?this.view.clone():this.view)}},I1=class n extends Wi{expr;kind=Qt.ResetView;constructor(i){super(),this.expr=i}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof n&&this.expr.isEquivalent(i.expr)}isConstant(){return!1}transformInternalExpressions(i,e){this.expr=Vt(this.expr,i,e)}clone(){return new n(this.expr.clone())}},A1=class n extends Wi{target;value;kind=Qt.TwoWayBindingSet;constructor(i,e){super(),this.target=i,this.value=e}visitExpression(i,e){this.target.visitExpression(i,e),this.value.visitExpression(i,e)}isEquivalent(i){return this.target.isEquivalent(i.target)&&this.value.isEquivalent(i.value)}isConstant(){return!1}transformInternalExpressions(i,e){this.target=Vt(this.target,i,e),this.value=Vt(this.value,i,e)}clone(){return new n(this.target,this.value)}},bd=class n extends Wi{xref;kind=Qt.ReadVariable;name=null;constructor(i){super(),this.xref=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.xref===this.xref}isConstant(){return!1}transformInternalExpressions(){}clone(){let i=new n(this.xref);return i.name=this.name,i}},Kp=class n extends Wi{kind=Qt.PureFunctionExpr;[tu]=!0;[c0]=!0;varOffset=null;body;args;fn=null;constructor(i,e){super(),this.body=i,this.args=e}visitExpression(i,e){this.body?.visitExpression(i,e);for(let t of this.args)t.visitExpression(i,e)}isEquivalent(i){return!(i instanceof n)||i.args.length!==this.args.length?!1:i.body!==null&&this.body!==null&&i.body.isEquivalent(this.body)&&i.args.every((e,t)=>e.isEquivalent(this.args[t]))}isConstant(){return!1}transformInternalExpressions(i,e){this.body!==null?this.body=Vt(this.body,i,e|Wn.InChildOperation):this.fn!==null&&(this.fn=Vt(this.fn,i,e));for(let t=0;te.clone()));return i.fn=this.fn?.clone()??null,i.varOffset=this.varOffset,i}},um=class n extends Wi{index;kind=Qt.PureFunctionParameterExpr;constructor(i){super(),this.index=i}visitExpression(){}isEquivalent(i){return i instanceof n&&i.index===this.index}isConstant(){return!0}transformInternalExpressions(){}clone(){return new n(this.index)}},Yp=class n extends Wi{target;targetSlot;name;args;kind=Qt.PipeBinding;[tu]=!0;[c0]=!0;varOffset=null;constructor(i,e,t,o){super(),this.target=i,this.targetSlot=e,this.name=t,this.args=o}visitExpression(i,e){for(let t of this.args)t.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){for(let t=0;te.clone()));return i.varOffset=this.varOffset,i}},q_=class n extends Wi{target;targetSlot;name;args;numArgs;kind=Qt.PipeBindingVariadic;[tu]=!0;[c0]=!0;varOffset=null;constructor(i,e,t,o,r){super(),this.target=i,this.targetSlot=e,this.name=t,this.args=o,this.numArgs=r}visitExpression(i,e){this.args.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.args=Vt(this.args,i,e)}clone(){let i=new n(this.target,this.targetSlot,this.name,this.args.clone(),this.numArgs);return i.varOffset=this.varOffset,i}},Ah=class n extends Wi{receiver;name;kind=Qt.SafePropertyRead;constructor(i,e){super(),this.receiver=i,this.name=e}get index(){return this.name}visitExpression(i,e){this.receiver.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=Vt(this.receiver,i,e)}clone(){return new n(this.receiver.clone(),this.name)}},Oh=class n extends Wi{receiver;index;kind=Qt.SafeKeyedRead;constructor(i,e,t){super(t),this.receiver=i,this.index=e}visitExpression(i,e){this.receiver.visitExpression(i,e),this.index.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=Vt(this.receiver,i,e),this.index=Vt(this.index,i,e)}clone(){return new n(this.receiver.clone(),this.index.clone(),this.sourceSpan)}},Zp=class n extends Wi{receiver;args;kind=Qt.SafeInvokeFunction;constructor(i,e){super(),this.receiver=i,this.args=e}visitExpression(i,e){this.receiver.visitExpression(i,e);for(let t of this.args)t.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.receiver=Vt(this.receiver,i,e);for(let t=0;ti.clone()))}},Nh=class n extends Wi{guard;expr;kind=Qt.SafeTernaryExpr;constructor(i,e){super(),this.guard=i,this.expr=e}visitExpression(i,e){this.guard.visitExpression(i,e),this.expr.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.guard=Vt(this.guard,i,e),this.expr=Vt(this.expr,i,e)}clone(){return new n(this.guard.clone(),this.expr.clone())}},Q_=class n extends Wi{kind=Qt.EmptyExpr;visitExpression(i,e){}isEquivalent(i){return i instanceof n}isConstant(){return!0}clone(){return new n}transformInternalExpressions(){}},Dc=class n extends Wi{expr;xref;kind=Qt.AssignTemporaryExpr;name=null;constructor(i,e){super(),this.expr=i,this.xref=e}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(i,e){this.expr=Vt(this.expr,i,e)}clone(){let i=new n(this.expr.clone(),this.xref);return i.name=this.name,i}},hm=class n extends Wi{xref;kind=Qt.ReadTemporaryExpr;name=null;constructor(i){super(),this.xref=i}visitExpression(i,e){}isEquivalent(){return this.xref===this.xref}isConstant(){return!1}transformInternalExpressions(i,e){}clone(){let i=new n(this.xref);return i.name=this.name,i}},O1=class n extends Wi{slot;kind=Qt.SlotLiteralExpr;constructor(i){super(),this.slot=i}visitExpression(i,e){}isEquivalent(i){return i instanceof n&&i.slot===this.slot}isConstant(){return!0}clone(){return new n(this.slot)}transformInternalExpressions(){}},N1=class n extends Wi{expr;target;targetSlot;alias;kind=Qt.ConditionalCase;constructor(i,e,t,o=null){super(),this.expr=i,this.target=e,this.targetSlot=t,this.alias=o}visitExpression(i,e){this.expr!==null&&this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof n&&i.expr===this.expr}isConstant(){return!0}clone(){return new n(this.expr,this.target,this.targetSlot)}transformInternalExpressions(i,e){this.expr!==null&&(this.expr=Vt(this.expr,i,e))}},X_=class n extends Wi{expr;kind=Qt.ConstCollected;constructor(i){super(),this.expr=i}transformInternalExpressions(i,e){this.expr=i(this.expr,e)}visitExpression(i,e){this.expr.visitExpression(i,e)}isEquivalent(i){return i instanceof n?this.expr.isEquivalent(i.expr):!1}isConstant(){return this.expr.isConstant()}clone(){return new n(this.expr)}},CT=class n extends Wi{parameters;body;kind=Qt.ArrowFunction;[tu]=!0;[c0]=!0;contextName=Ps;currentViewName="view";varOffset=null;ops;constructor(i,e){super(),this.parameters=i,this.body=e,this.ops=new qe,this.ops.push([Is(new xr(e,e.sourceSpan))])}visitExpression(i,e){for(let t of this.ops)mr(t,o=>{o.visitExpression(i,e)})}isEquivalent(i){return i instanceof n&&i.parameters.length===this.parameters.length&&i.parameters.every((e,t)=>e.isEquivalent(this.parameters[t]))&&i.body.isEquivalent(this.body)}isConstant(){return!1}transformInternalExpressions(i,e){for(let t of this.ops)Xo(t,i,e|(Wn.InChildOperation|Wn.InArrowFunctionOperation))}clone(){let i=new n(this.parameters,this.body);return i.varOffset=this.varOffset,i.ops=this.ops,i}};function mr(n,i){Xo(n,(e,t)=>(i(e,t),e),Wn.None)}var Wn=(function(n){return n[n.None=0]="None",n[n.InChildOperation=1]="InChildOperation",n[n.InArrowFunctionOperation=2]="InArrowFunctionOperation",n})(Wn||{});function Ck(n,i,e){for(let t=0;tVt(t,i,e));else if(n instanceof eu)if(Array.isArray(n.body))for(let t=0;t{!a&&H_(c)&&c.target!==r.xref&&(a=!0)}),a)break;e=e.next}}}}function qU(n){if(!(!n.enableDebugLocations||n.relativeTemplatePath===null))for(let i of n.units){let e=[];for(let t of i.create)if(t.kind===V.ElementStart||t.kind===V.Element){let o=t.startSourceSpan.start;e.push({targetSlot:t.handle,offset:o.offset,line:o.line,column:o.col})}e.length>0&&i.create.push(BU(n.relativeTemplatePath,e))}}function EF(n){let i=new Map;for(let e of n.create)jh(e)&&(i.set(e.xref,e),e.kind===V.RepeaterCreate&&e.emptyView!==null&&i.set(e.emptyView,e));return i}function QU(n){for(let i of n.units){let e=EF(i);for(let t of i.ops())switch(t.kind){case V.Attribute:XU(i,t,e);break;case V.Property:if(t.bindingKind!==jt.LegacyAnimation&&t.bindingKind!==jt.Animation){let o;t.i18nMessage!==null&&t.templateKind===null?o=jt.I18n:t.isStructuralTemplateAttribute?o=jt.Template:o=jt.Property,qe.insertBefore(Js(t.target,o,null,t.name,null,null,null,t.securityContext),ch(e,t.target))}break;case V.TwoWayProperty:qe.insertBefore(Js(t.target,jt.TwoWayProperty,null,t.name,null,null,null,t.securityContext),ch(e,t.target));break;case V.StyleProp:case V.ClassProp:t.expression instanceof Q_&&qe.insertBefore(Js(t.target,jt.Property,null,t.name,null,null,null,eo.STYLE),ch(e,t.target));break;case V.Listener:if(!t.isLegacyAnimationListener){let o=Js(t.target,jt.Property,null,t.name,null,null,null,eo.NONE);if(n.kind===Et.Host)break;qe.insertBefore(o,ch(e,t.target))}break;case V.TwoWayListener:if(n.kind!==Et.Host){let o=Js(t.target,jt.Property,null,t.name,null,null,null,eo.NONE);qe.insertBefore(o,ch(e,t.target))}break}}}function ch(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function XU(n,i,e){if(!(i.expression instanceof Qo)&&i.isTextAttribute){let t=Js(i.target,i.isStructuralTemplateAttribute?jt.Template:jt.Attribute,i.namespace,i.name,i.expression,i.i18nContext,i.i18nMessage,i.securityContext);if(n.job.kind===Et.Host)n.create.push(t);else{let o=ch(e,i.target);qe.insertBefore(t,o)}qe.remove(i)}}var M5="aria-";function DF(n){return n.startsWith(M5)&&n.length>M5.length}function KU(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function YU(n){let i=new Map;for(let e of n.units)for(let t of e.create)fm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.ops())if(t.kind===V.Binding)switch(t.bindingKind){case jt.Attribute:if(t.name==="ngNonBindable"){qe.remove(t);let o=KU(i,t.target);o.nonBindable=!0}else if(t.name.startsWith("animate."))qe.replace(t,w5(t.name,t.target,t.name==="animate.enter"?"enter":"leave",t.expression,t.securityContext,t.sourceSpan,0));else{let[o,r]=Ll(t.name);qe.replace(t,S5(t.target,o,r,t.expression,t.securityContext,t.isTextAttribute,t.isStructuralTemplateAttribute,t.templateKind,t.i18nMessage,t.sourceSpan))}break;case jt.Animation:qe.replace(t,w5(t.name,t.target,t.name==="animate.enter"?"enter":"leave",t.expression,t.securityContext,t.sourceSpan,1));break;case jt.Property:case jt.LegacyAnimation:n.mode===Za.DomOnly&&DF(t.name)?qe.replace(t,S5(t.target,null,t.name,t.expression,t.securityContext,!1,t.isStructuralTemplateAttribute,t.templateKind,t.i18nMessage,t.sourceSpan)):n.kind===Et.Host?qe.replace(t,jU(t.name,t.expression,t.bindingKind,t.i18nContext,t.securityContext,t.sourceSpan)):qe.replace(t,cU(t.target,t.name,t.expression,t.bindingKind,t.securityContext,t.isStructuralTemplateAttribute,t.templateKind,t.i18nContext,t.i18nMessage,t.sourceSpan));break;case jt.TwoWayProperty:if(!(t.expression instanceof Bi))throw new Error(`Expected value of two-way property binding "${t.name}" to be an expression`);qe.replace(t,dU(t.target,t.name,t.expression,t.securityContext,t.isStructuralTemplateAttribute,t.templateKind,t.i18nContext,t.i18nMessage,t.sourceSpan));break;case jt.I18n:case jt.ClassName:case jt.StyleProperty:throw new Error(`Unhandled binding of kind ${jt[t.bindingKind]}`)}}var k5=new Map([[fe.ariaProperty,fe.ariaProperty],[fe.attribute,fe.attribute],[fe.classProp,fe.classProp],[fe.element,fe.element],[fe.elementContainer,fe.elementContainer],[fe.elementContainerEnd,fe.elementContainerEnd],[fe.elementContainerStart,fe.elementContainerStart],[fe.elementEnd,fe.elementEnd],[fe.elementStart,fe.elementStart],[fe.domProperty,fe.domProperty],[fe.i18nExp,fe.i18nExp],[fe.listener,fe.listener],[fe.listener,fe.listener],[fe.property,fe.property],[fe.styleProp,fe.styleProp],[fe.syntheticHostListener,fe.syntheticHostListener],[fe.syntheticHostProperty,fe.syntheticHostProperty],[fe.templateCreate,fe.templateCreate],[fe.twoWayProperty,fe.twoWayProperty],[fe.twoWayListener,fe.twoWayListener],[fe.declareLet,fe.declareLet],[fe.conditionalCreate,fe.conditionalBranchCreate],[fe.conditionalBranchCreate,fe.conditionalBranchCreate],[fe.domElement,fe.domElement],[fe.domElementStart,fe.domElementStart],[fe.domElementEnd,fe.domElementEnd],[fe.domElementContainer,fe.domElementContainer],[fe.domElementContainerStart,fe.domElementContainerStart],[fe.domElementContainerEnd,fe.domElementContainerEnd],[fe.domListener,fe.domListener],[fe.domTemplate,fe.domTemplate],[fe.animationEnter,fe.animationEnter],[fe.animationLeave,fe.animationLeave],[fe.animationEnterListener,fe.animationEnterListener],[fe.animationLeaveListener,fe.animationLeaveListener]]),ZU=256;function JU(n){for(let i of n.units)T5(i.create),T5(i.update)}function T5(n){let i=null;for(let e of n){if(e.kind!==V.Statement||!(e.statement instanceof sa)){i=null;continue}if(!(e.statement.expr instanceof os)||!(e.statement.expr.fn instanceof zp)){i=null;continue}let t=e.statement.expr.fn.value;if(!k5.has(t)){i=null;continue}if(i!==null&&k5.get(i.instruction)===t&&i.lengtho==="")&&(e.expression=e.expression.expressions[0])}function tG(n){for(let i of n.units)for(let e of i.ops()){if(e.kind!==V.Conditional)continue;let t,o=e.conditions.findIndex(c=>c.expr===null);if(o>=0){let c=e.conditions.splice(o,1)[0].targetSlot;t=new O1(c)}else t=Te(-1);let r=e.test==null?null:new Dc(e.test,n.allocateXrefId()),a=null;for(let c=e.conditions.length-1;c>=0;c--){let p=e.conditions[c];if(p.expr!==null){if(r!==null){let u=c===0?r:new hm(r.xref);p.expr=new gi(st.Identical,u,p.expr)}else p.alias!==null&&(a??=n.allocateXrefId(),p.expr=new Dc(p.expr,a),e.contextValue=new hm(a));t=new Sc(p.expr,new O1(p.targetSlot),t)}}e.processed=t,e.conditions=[]}}var nG=new Map([["&&",st.And],[">",st.Bigger],[">=",st.BiggerEquals],["|",st.BitwiseOr],["&",st.BitwiseAnd],["/",st.Divide],["=",st.Assign],["==",st.Equals],["===",st.Identical],["<",st.Lower],["<=",st.LowerEquals],["-",st.Minus],["%",st.Modulo],["**",st.Exponentiation],["*",st.Multiply],["!=",st.NotEquals],["!==",st.NotIdentical],["??",st.NullishCoalesce],["||",st.Or],["+",st.Plus],["in",st.In],["instanceof",st.InstanceOf],["+=",st.AdditionAssignment],["-=",st.SubtractionAssignment],["*=",st.MultiplicationAssignment],["/=",st.DivisionAssignment],["%=",st.RemainderAssignment],["**=",st.ExponentiationAssignment],["&&=",st.AndAssignment],["||=",st.OrAssignment],["??=",st.NullishCoalesceAssignment]]);function PF(n){let i=new Map([["svg",Ca.SVG],["math",Ca.Math]]);return n===null?Ca.HTML:i.get(n)??Ca.HTML}function iG(n){let i=new Map([["svg",Ca.SVG],["math",Ca.Math]]);for(let[e,t]of i.entries())if(t===n)return e;return null}function oG(n,i){return i===Ca.HTML?n:`:${iG(i)}:${n}`}function Fh(n){return Array.isArray(n)?Gi(n.map(Fh)):Te(n)}function rG(n){let i=new Map;for(let e of n.units)for(let t of e.create)if(t.kind===V.ExtractedAttribute){let o=i.get(t.target)||new xT;i.set(t.target,o),o.add(t.bindingKind,t.name,t.expression,t.namespace,t.trustedValueFn),qe.remove(t)}if(n instanceof K_)for(let e of n.units)for(let t of e.create)if(t.kind==V.Projection){let o=i.get(t.xref);if(o!==void 0){let r=yT(o);r.entries.length>0&&(t.attributes=r)}}else fm(t)&&(t.attributes=E5(n,i,t.xref),t.kind===V.RepeaterCreate&&t.emptyView!==null&&(t.emptyAttributes=E5(n,i,t.emptyView)));else if(n instanceof V1)for(let[e,t]of i.entries()){if(e!==n.root.xref)throw new Error("An attribute would be const collected into the host binding's template function, but is not associated with the root xref.");let o=yT(t);o.entries.length>0&&(n.root.attributes=o)}}function E5(n,i,e){let t=i.get(e);if(t!==void 0){let o=yT(t);if(o.entries.length>0)return n.addConst(o)}return null}var ih=Object.freeze([]),xT=class{known=new Map;byKind=new Map;propertyBindings=null;projectAs=null;get attributes(){return this.byKind.get(jt.Attribute)??ih}get classes(){return this.byKind.get(jt.ClassName)??ih}get styles(){return this.byKind.get(jt.StyleProperty)??ih}get bindings(){return this.propertyBindings??ih}get template(){return this.byKind.get(jt.Template)??ih}get i18n(){return this.byKind.get(jt.I18n)??ih}isKnown(i,e){let t=this.known.get(i)??new Set;return this.known.set(i,t),t.has(e)?!0:(t.add(e),!1)}add(i,e,t,o,r){if(!(i===jt.Attribute||i===jt.ClassName||i===jt.StyleProperty)&&this.isKnown(i,e))return;if(e==="ngProjectAs"){if(t===null||!(t instanceof aa)||t.value==null||typeof t.value?.toString()!="string")throw Error("ngProjectAs must have a string literal value");this.projectAs=t.value.toString()}let c=this.arrayFor(i);if(c.push(...aG(o,e)),i===jt.Attribute||i===jt.StyleProperty){if(t===null)throw Error("Attribute, i18n attribute, & style element attributes must have a value");if(r!==null){if(!CF(t))throw Error("AssertionError: extracted attribute value should be string literal");c.push(y$(r,new m_([new JC(t.value)],[]),void 0,t.sourceSpan))}else c.push(t)}}arrayFor(i){return i===jt.Property||i===jt.TwoWayProperty?(this.propertyBindings??=[],this.propertyBindings):(this.byKind.has(i)||this.byKind.set(i,[]),this.byKind.get(i))}};function aG(n,i){let e=Te(i);return n?[Te(0),Te(n),e]:[e]}function yT({attributes:n,bindings:i,classes:e,i18n:t,projectAs:o,styles:r,template:a}){let c=[...n];if(o!==null){let p=pE(o)[0];c.push(Te(5),Fh(p))}return e.length>0&&c.push(Te(1),...e),r.length>0&&c.push(Te(2),...r),i.length>0&&c.push(Te(3),...i),a.length>0&&c.push(Te(4),...a),t.length>0&&c.push(Te(6),...t),Gi(c)}function sG(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function lG(n){let i=new Map;for(let e of n.units)for(let t of e.create)fm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.ops())if(t.kind===V.AnimationBinding){let o=cG(t);n.kind===Et.Host?e.create.push(o):qe.insertAfter(o,sG(i,t.target)),qe.remove(t)}}function cG(n){if(n.animationBindingKind===0)return TU(n.name,n.target,n.name==="animate.enter"?"enter":"leave",n.expression,n.securityContext,n.sourceSpan);{let i=n.expression;return EU(n.name,n.target,n.name==="animate.enter"?"enter":"leave",[Is(new xr(i,i.sourceSpan))],n.securityContext,n.sourceSpan)}}function dG(n){let i=new Map;for(let e of n.units){for(let t of e.create)t.kind===V.I18nAttributes&&i.set(t.target,t);for(let t of e.update)switch(t.kind){case V.Property:case V.Attribute:if(t.i18nContext===null||!(t.expression instanceof Qo))continue;let o=i.get(t.target);if(o===void 0)throw new Error("AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction");if(o.target!==t.target)throw new Error("AssertionError: Expected i18nAttributes target element to match binding target element");let r=[];for(let a=0;aMG(t,{job:n}),Wn.None),Xo(e,kG,Wn.None)}function ys(n){return n instanceof jp?ys(n.expr):n instanceof gi?ys(n.lhs)||ys(n.rhs):n instanceof Sc?n.falseCase&&ys(n.falseCase)?!0:ys(n.condition)||ys(n.trueCase):n instanceof p_?ys(n.condition):n instanceof Dc?ys(n.expr):n instanceof Es?ys(n.receiver):n instanceof xd?ys(n.receiver)||ys(n.index):n instanceof Fl?ys(n.expr):n instanceof os||n instanceof wc||n instanceof Rl||n instanceof Zp||n instanceof Yp}function bG(n){let i=new Set;return Vt(n,e=>(e instanceof Dc&&i.add(e.xref),e),Wn.None),i}function xG(n,i,e){return Vt(n,t=>{if(t instanceof Dc&&i.has(t.xref)){let o=new hm(t.xref);return new Dc(o,o.xref)}return t},Wn.None),n}function oh(n,i,e){let t;if(ys(n)){let o=e.job.allocateXrefId();t=[new Dc(n,o),new hm(o)]}else t=[n,n.clone()],xG(t[1],bG(t[0]));return new Nh(t[0],i(t[1]))}function yG(n){return n instanceof Ah||n instanceof Oh||n instanceof Zp}function SG(n){return n instanceof Es||n instanceof xd||n instanceof os}function IF(n){return yG(n)||SG(n)}function wG(n){if(IF(n)&&n.receiver instanceof Nh){let i=n.receiver;for(;i.expr instanceof Nh;)i=i.expr;return i}return null}function MG(n,i){if(!IF(n))return n;let e=wG(n);if(e){if(n instanceof os)return e.expr=e.expr.callFn(n.args),n.receiver;if(n instanceof Es)return e.expr=e.expr.prop(n.name),n.receiver;if(n instanceof xd)return e.expr=e.expr.key(n.index),n.receiver;if(n instanceof Zp)return e.expr=oh(e.expr,t=>t.callFn(n.args),i),n.receiver;if(n instanceof Ah)return e.expr=oh(e.expr,t=>t.prop(n.name),i),n.receiver;if(n instanceof Oh)return e.expr=oh(e.expr,t=>t.key(n.index),i),n.receiver}else{if(n instanceof Zp)return oh(n.receiver,t=>t.callFn(n.args),i);if(n instanceof Ah)return oh(n.receiver,t=>t.prop(n.name),i);if(n instanceof Oh)return oh(n.receiver,t=>t.key(n.index),i)}return n}function kG(n){return n instanceof Nh?new Fl(new Sc(new gi(st.Equals,n.guard,yh),yh,n.expr)):n}var D5="\uFFFD",TG="#",EG="*",DG="/",PG=":",IG="[",AG="]",OG="|";function NG(n){let i=new Map,e=new Map,t=new Map;for(let r of n.units)for(let a of r.create)switch(a.kind){case V.I18nContext:let c=FG(n,a);r.create.push(c),i.set(a.xref,c),t.set(a.xref,a);break;case V.I18nStart:e.set(a.xref,a);break}let o=null;for(let r of n.units)for(let a of r.create)switch(a.kind){case V.IcuStart:o=a,qe.remove(a);let c=t.get(a.context);if(c.contextKind!==Pp.Icu)continue;let p=e.get(c.i18nBlock);if(p.context===c.xref)continue;let u=e.get(p.root),h=i.get(u.context);if(h===void 0)throw Error("AssertionError: ICU sub-message should belong to a root message.");let _=i.get(c.xref);_.messagePlaceholder=a.messagePlaceholder,h.subMessages.push(_.xref);break;case V.IcuEnd:o=null,qe.remove(a);break;case V.IcuPlaceholder:if(o===null||o.context==null)throw Error("AssertionError: Unexpected ICU placeholder outside of i18n context");i.get(o.context).postprocessingParams.set(a.name,Te(RG(a))),qe.remove(a);break}}function FG(n,i,e){let t=P5(i.params),o=P5(i.postprocessingParams),r=[...i.params.values()].some(a=>a.length>1);return FU(n.allocateXrefId(),i.xref,i.i18nBlock,i.message,null,t,o,r)}function RG(n){if(n.strings.length!==n.expressionPlaceholders.length+1)throw Error(`AssertionError: Invalid ICU placeholder with ${n.strings.length} strings and ${n.expressionPlaceholders.length} expressions`);let i=n.expressionPlaceholders.map(uh);return n.strings.flatMap((e,t)=>[e,i[t]||""]).join("")}function P5(n){let i=new Map;for(let[e,t]of n){let o=LG(t);o!==null&&i.set(e,Te(o))}return i}function LG(n){if(n.length===0)return null;let i=n.map(e=>uh(e));return i.length===1?i[0]:`${IG}${i.join(OG)}${AG}`}function uh(n){if(n.flags&ao.ElementTag&&n.flags&ao.TemplateTag){if(typeof n.value!="object")throw Error("AssertionError: Expected i18n param value to have an element and template slot");let o=uh(it(K({},n),{value:n.value.element,flags:n.flags&~ao.TemplateTag})),r=uh(it(K({},n),{value:n.value.template,flags:n.flags&~ao.ElementTag}));return n.flags&ao.OpenTag&&n.flags&ao.CloseTag?`${r}${o}${r}`:n.flags&ao.CloseTag?`${o}${r}`:`${r}${o}`}if(n.flags&ao.OpenTag&&n.flags&ao.CloseTag)return`${uh(it(K({},n),{flags:n.flags&~ao.CloseTag}))}${uh(it(K({},n),{flags:n.flags&~ao.OpenTag}))}`;if(n.flags===ao.None)return`${n.value}`;let i="",e="";n.flags&ao.ElementTag?i=TG:n.flags&ao.TemplateTag&&(i=EG),i!==""&&(e=n.flags&ao.CloseTag?DG:"");let t=n.subTemplateIndex===null?"":`${PG}${n.subTemplateIndex}`;return`${D5}${e}${i}${n.value}${t}${D5}`}function VG(n){for(let i of n.units){let e=new Map;for(let o of i.create){if(jh(o)){if(o.handle.slot===null)throw new Error("AssertionError: expected slots to have been allocated before generating advance() calls")}else continue;e.set(o.xref,o.handle.slot)}let t=0;for(let o of i.update){let r=null;if(H_(o)?r=o:mr(o,c=>{r===null&&H_(c)&&(r=c)}),r===null)continue;if(!e.has(r.target))throw new Error(`AssertionError: reference to unknown slot for target ${r.target}`);let a=e.get(r.target);if(t!==a){let c=a-t;if(c<0)throw new Error("AssertionError: slot counter should never need to move backwards");qe.insertBefore(fU(c,r.sourceSpan),o),t=a}}}}function BG(n){for(let i of n.units)for(let e of i.update){if(e.kind!==V.StoreLet)continue;let t={kind:Wr.Identifier,name:null,identifier:e.declaredName,local:!0};qe.replace(e,tm(n.allocateXrefId(),t,new U_(e.target,e.value,e.sourceSpan),Zs.None))}}function zG(n){let e=[],t=0;for(let o of n.units)for(let r of o.create)r.kind===V.Projection&&(e.push(r.selector),r.projectionSlotIndex=t++);if(e.length>0){let o=null;if(e.length>1||e[0]!=="*"){let r=e.map(a=>a==="*"?a:pE(a));o=n.pool.getConstLiteral(Fh(r),!0)}n.contentSelectors=n.pool.getConstLiteral(Fh(e),!0),n.root.create.prepend([IU(o)])}}function jG(n){Xg(n.root,null)}function Xg(n,i){let e=I5(n,i);for(let t of n.create)switch(t.kind){case V.ConditionalCreate:case V.ConditionalBranchCreate:case V.Template:Xg(n.job.views.get(t.xref),e);break;case V.Projection:t.fallbackView!==null&&Xg(n.job.views.get(t.fallbackView),e);break;case V.RepeaterCreate:Xg(n.job.views.get(t.xref),e),t.emptyView&&Xg(n.job.views.get(t.emptyView),e),t.trackByOps!==null&&t.trackByOps.prepend(Kg(n,e,!1));break;case V.Animation:case V.AnimationListener:case V.Listener:case V.TwoWayListener:t.handlerOps.prepend(Kg(n,e,!0));break}n.update.prepend(Kg(n,e,!1));for(let t of n.functions)t.ops.prepend(Kg(n,I5(n,i),!0))}function I5(n,i){let e={view:n.xref,viewContextVariable:{kind:Wr.Context,name:null,view:n.xref},contextVariables:new Map,aliases:n.aliases,references:[],letDeclarations:[],parent:i};for(let t of n.contextVariables.keys())e.contextVariables.set(t,{kind:Wr.Identifier,name:null,identifier:t,local:!1});for(let t of n.create)switch(t.kind){case V.ElementStart:case V.ConditionalCreate:case V.ConditionalBranchCreate:case V.Template:if(!Array.isArray(t.localRefs))throw new Error("AssertionError: expected localRefs to be an array");for(let o=0;ot instanceof X_?Te(n.addConst(t.expr)):t,Wn.None)}var A5="style.",O5="class.",HG="style!",N5="class!",F5="!important";function UG(n){for(let i of n.root.update)if(i.kind===V.Binding&&i.bindingKind===jt.Property)if(i.name.endsWith(F5)&&(i.name=i.name.substring(0,i.name.length-F5.length)),i.name.startsWith(A5)){i.bindingKind=jt.StyleProperty,i.name=i.name.substring(A5.length),GG(i.name)||(i.name=WG(i.name));let{property:e,suffix:t}=xk(i.name);i.name=e,i.unit=t}else i.name.startsWith(HG)?(i.bindingKind=jt.StyleProperty,i.name="style"):i.name.startsWith(O5)?(i.bindingKind=jt.ClassName,i.name=xk(i.name.substring(O5.length)).property):i.name.startsWith(N5)&&(i.bindingKind=jt.ClassName,i.name=xk(i.name.substring(N5.length)).property)}function GG(n){return n.startsWith("--")}function WG(n){return n.replace(/[a-z][A-Z]/g,i=>i.charAt(0)+"-"+i.charAt(1)).toLowerCase()}function xk(n){let i=n.indexOf("!important");i!==-1&&(n=i>0?n.substring(0,i):"");let e=null,t=n,o=n.lastIndexOf(".");return o>0&&(e=n.slice(o+1),t=n.substring(0,o)),{property:t,suffix:e}}function ST(n,i=!1){return nl(Object.keys(n).map(e=>({key:e,quoted:i,value:n[e]})))}var wT=class{visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){let e=Object.keys(i.cases).map(o=>`${o} {${i.cases[o].visit(this)}}`);return`{${i.expressionPlaceholder}, ${i.type}, ${e.join(" ")}}`}visitTagPlaceholder(i){return i.isVoid?this.formatPh(i.startName):`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitPlaceholder(i){return this.formatPh(i.name)}visitBlockPlaceholder(i){return`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitIcuPlaceholder(i,e){return this.formatPh(i.name)}formatPh(i){return`{${s0(i,!1)}}`}},qG=new wT;function AF(n){return n.visit(qG)}var yd=class{sourceSpan;i18n;constructor(i,e){this.sourceSpan=i,this.i18n=e}},Jp=class extends yd{value;tokens;constructor(i,e,t,o){super(e,o),this.value=i,this.tokens=t}visit(i,e){return i.visitText(this,e)}},Fp=class extends yd{switchValue;type;cases;switchValueSourceSpan;constructor(i,e,t,o,r,a){super(o,a),this.switchValue=i,this.type=e,this.cases=t,this.switchValueSourceSpan=r}visit(i,e){return i.visitExpansion(this,e)}},B1=class{value;expression;sourceSpan;valueSourceSpan;expSourceSpan;constructor(i,e,t,o,r){this.value=i,this.expression=e,this.sourceSpan=t,this.valueSourceSpan=o,this.expSourceSpan=r}visit(i,e){return i.visitExpansionCase(this,e)}},MT=class extends yd{name;value;keySpan;valueSpan;valueTokens;constructor(i,e,t,o,r,a,c){super(t,c),this.name=i,this.value=e,this.keySpan=o,this.valueSpan=r,this.valueTokens=a}visit(i,e){return i.visitAttribute(this,e)}},qs=class extends yd{name;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;isVoid;constructor(i,e,t,o,r,a,c,p=null,u,h){super(a,h),this.name=i,this.attrs=e,this.directives=t,this.children=o,this.isSelfClosing=r,this.startSourceSpan=c,this.endSourceSpan=p,this.isVoid=u}visit(i,e){return i.visitElement(this,e)}},Y_=class{value;sourceSpan;constructor(i,e){this.value=i,this.sourceSpan=e}visit(i,e){return i.visitComment(this,e)}},Ks=class extends yd{name;parameters;children;nameSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c=null,p){super(o,p),this.name=i,this.parameters=e,this.children=t,this.nameSpan=r,this.startSourceSpan=a,this.endSourceSpan=c}visit(i,e){return i.visitBlock(this,e)}},Fa=class extends yd{componentName;tagName;fullName;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r,a,c,p,u,h=null,_){super(p,_),this.componentName=i,this.tagName=e,this.fullName=t,this.attrs=o,this.directives=r,this.children=a,this.isSelfClosing=c,this.startSourceSpan=u,this.endSourceSpan=h}visit(i,e){return i.visitComponent(this,e)}},kT=class{name;attrs;sourceSpan;startSourceSpan;endSourceSpan;constructor(i,e,t,o,r=null){this.name=i,this.attrs=e,this.sourceSpan=t,this.startSourceSpan=o,this.endSourceSpan=r}visit(i,e){return i.visitDirective(this,e)}},z1=class{expression;sourceSpan;constructor(i,e){this.expression=i,this.sourceSpan=e}visit(i,e){return i.visitBlockParameter(this,e)}},j1=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(i,e,t,o,r){this.name=i,this.value=e,this.sourceSpan=t,this.nameSpan=o,this.valueSpan=r}visit(i,e){return i.visitLetDeclaration(this,e)}};function Co(n,i,e=null){let t=[],o=n.visit?r=>n.visit(r,e)||r.visit(n,e):r=>r.visit(n,e);return i.forEach(r=>{let a=o(r);a&&t.push(a)}),t}var Z_={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\u224E",HumpDownHump:"\u224E",bump:"\u224E",CHcy:"\u0427",COPY:"\xA9",copy:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212D",Cfr:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",cedil:"\xB8",CenterDot:"\xB7",centerdot:"\xB7",middot:"\xB7",Chi:"\u03A7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201D",rdquo:"\u201D",rdquor:"\u201D",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2A74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222F",DoubleContourIntegral:"\u222F",ContourIntegral:"\u222E",conint:"\u222E",oint:"\u222E",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",asympeq:"\u224D",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",DoubleLeftTee:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",acute:"\xB4",DiacriticalDot:"\u02D9",dot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",dblac:"\u02DD",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02DC",tilde:"\u02DC",Diamond:"\u22C4",diam:"\u22C4",diamond:"\u22C4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DoubleDot:"\xA8",die:"\xA8",uml:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21D3",Downarrow:"\u21D3",dArr:"\u21D3",DoubleLeftArrow:"\u21D0",Leftarrow:"\u21D0",lArr:"\u21D0",DoubleLeftRightArrow:"\u21D4",Leftrightarrow:"\u21D4",hArr:"\u21D4",iff:"\u21D4",DoubleLongLeftArrow:"\u27F8",Longleftarrow:"\u27F8",xlArr:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",Longleftrightarrow:"\u27FA",xhArr:"\u27FA",DoubleLongRightArrow:"\u27F9",Longrightarrow:"\u27F9",xrArr:"\u27F9",DoubleRightArrow:"\u21D2",Implies:"\u21D2",Rightarrow:"\u21D2",rArr:"\u21D2",DoubleRightTee:"\u22A8",vDash:"\u22A8",DoubleUpArrow:"\u21D1",Uparrow:"\u21D1",uArr:"\u21D1",DoubleUpDownArrow:"\u21D5",Updownarrow:"\u21D5",vArr:"\u21D5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",duarr:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",leftharpoondown:"\u21BD",lhard:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",rhard:"\u21C1",rightharpoondown:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",top:"\u22A4",DownTeeArrow:"\u21A7",mapstodown:"\u21A7",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21CC",rightleftharpoons:"\u21CC",rlhar:"\u21CC",Escr:"\u2130",expectation:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",blacksquare:"\u25AA",squarf:"\u25AA",squf:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",ggg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22DB",gel:"\u22DB",gtreqless:"\u22DB",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2A7E",geqslant:"\u2A7E",ges:"\u2A7E",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",NestedGreaterGreater:"\u226B",gg:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",caron:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",Poincareplane:"\u210C",HilbertSpace:"\u210B",Hscr:"\u210B",hamilt:"\u210B",Hopf:"\u210D",quaternions:"\u210D",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224F",bumpe:"\u224F",bumpeq:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xCC",Imacr:"\u012A",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222C",Integral:"\u222B",int:"\u222B",Intersection:"\u22C2",bigcap:"\u22C2",xcap:"\u22C2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219E",twoheadleftarrow:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",lang:"\u27E8",langle:"\u27E8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21E4",larrb:"\u21E4",LeftArrowRightArrow:"\u21C6",leftrightarrows:"\u21C6",lrarr:"\u21C6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27E6",lobrk:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",dharl:"\u21C3",downharpoonleft:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",lfloor:"\u230A",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",dashv:"\u22A3",LeftTeeArrow:"\u21A4",mapstoleft:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",vartriangleleft:"\u22B2",vltri:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",ltrie:"\u22B4",trianglelefteq:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",uharl:"\u21BF",upharpoonleft:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",leftharpoonup:"\u21BC",lharu:"\u21BC",LeftVectorBar:"\u2952",LessEqualGreater:"\u22DA",leg:"\u22DA",lesseqgtr:"\u22DA",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",leqslant:"\u2A7D",les:"\u2A7D",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",lAarr:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",longleftarrow:"\u27F5",xlarr:"\u27F5",LongLeftRightArrow:"\u27F7",longleftrightarrow:"\u27F7",xharr:"\u27F7",LongRightArrow:"\u27F6",longrightarrow:"\u27F6",xrarr:"\u27F6",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21B0",lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",NestedLessLess:"\u226A",ll:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1D544}",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",ZeroWidthSpace:"\u200B",NewLine:` +`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vrtri:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",rtrie:"\u22B5",trianglerighteq:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",uharr:"\u21BE",upharpoonright:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",rharu:"\u21C0",rightharpoonup:"\u21C0",RightVectorBar:"\u2953",Ropf:"\u211D",reals:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",rAarr:"\u21DB",Rscr:"\u211B",realine:"\u211B",Rsh:"\u21B1",rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",radic:"\u221A",Square:"\u25A1",squ:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228F",sqsub:"\u228F",sqsubset:"\u228F",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",sstarf:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227B",sc:"\u227B",succ:"\u227B",SucceedsEqual:"\u2AB0",sce:"\u2AB0",succeq:"\u2AB0",SucceedsSlantEqual:"\u227D",sccue:"\u227D",succcurlyeq:"\u227D",SucceedsTilde:"\u227F",scsim:"\u227F",succsim:"\u227F",Sum:"\u2211",sum:"\u2211",Sup:"\u22D1",Supset:"\u22D1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xDE",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223C",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",tdot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",lowbar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",bbrk:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",bigcup:"\u22C3",xcup:"\u22C3",UnionPlus:"\u228E",uplus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",udarr:"\u21C5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296E",udhar:"\u296E",UpTee:"\u22A5",bot:"\u22A5",bottom:"\u22A5",perp:"\u22A5",UpTeeArrow:"\u21A5",mapstoup:"\u21A5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",bigvee:"\u22C1",xvee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200A",hairsp:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",bigwedge:"\u22C0",xwedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",mstpos:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acy:"\u0430",aelig:"\xE6",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",and:"\u2227",wedge:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",angle:"\u2220",ange:"\u29A4",angmsd:"\u2221",measuredangle:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",approxeq:"\u224A",apid:"\u224B",apos:"'",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",midast:"*",atilde:"\xE3",auml:"\xE4",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",bcong:"\u224C",backepsilon:"\u03F6",bepsi:"\u03F6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223D",bsim:"\u223D",backsimeq:"\u22CD",bsime:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23B6",bcy:"\u0431",bdquo:"\u201E",ldquor:"\u201E",bemptyv:"\u29B0",beta:"\u03B2",beth:"\u2136",between:"\u226C",twixt:"\u226C",bfr:"\u{1D51F}",bigcirc:"\u25EF",xcirc:"\u25EF",bigodot:"\u2A00",xodot:"\u2A00",bigoplus:"\u2A01",xoplus:"\u2A01",bigotimes:"\u2A02",xotime:"\u2A02",bigsqcup:"\u2A06",xsqcup:"\u2A06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25BD",xdtri:"\u25BD",bigtriangleup:"\u25B3",xutri:"\u25B3",biguplus:"\u2A04",xuplus:"\u2A04",bkarow:"\u290D",rbarr:"\u290D",blacklozenge:"\u29EB",lozf:"\u29EB",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",bowtie:"\u22C8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255D",boxUR:"\u255A",boxUl:"\u255C",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256C",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256B",boxVl:"\u2562",boxVr:"\u255F",boxbox:"\u29C9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250C",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",minusb:"\u229F",boxplus:"\u229E",plusb:"\u229E",boxtimes:"\u22A0",timesb:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2AAE",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cemptyv:"\u29B2",cent:"\xA2",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21BA",olarr:"\u21BA",circlearrowright:"\u21BB",orarr:"\u21BB",circledS:"\u24C8",oS:"\u24C8",circledast:"\u229B",oast:"\u229B",circledcirc:"\u229A",ocir:"\u229A",circleddash:"\u229D",odash:"\u229D",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2A6D",copf:"\u{1D554}",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",curlyeqprec:"\u22DE",cuesc:"\u22DF",curlyeqsucc:"\u22DF",cularr:"\u21B6",curvearrowleft:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curvearrowright:"\u21B7",curarrm:"\u293C",curlyvee:"\u22CE",cuvee:"\u22CE",curlywedge:"\u22CF",cuwed:"\u22CF",curren:"\xA4",cwint:"\u2231",cylcty:"\u232D",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290F",rBarr:"\u290F",dcaron:"\u010F",dcy:"\u0434",ddarr:"\u21CA",downdownarrows:"\u21CA",ddotseq:"\u2A77",eDDot:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03DD",gammad:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",llcorner:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22A1",sdotb:"\u22A1",drcorn:"\u231F",lrcorner:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",triangledown:"\u25BF",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xEA",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044D",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",eqslantgtr:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",eqslantless:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",straightepsilon:"\u03F5",varepsilon:"\u03F5",equals:"=",equest:"\u225F",questeq:"\u225F",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212F",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",fork:"\u22D4",pitchfork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1D4BB}",gEl:"\u2A8C",gtreqqless:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gap:"\u2A86",gtrapprox:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gnsim:"\u22E7",gopf:"\u{1D558}",gscr:"\u210A",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtrdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrarr:"\u2978",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hardcy:"\u044A",harrcir:"\u2948",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",hbar:"\u210F",hslash:"\u210F",planck:"\u210F",plankv:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",larrhk:"\u21A9",hookrightarrow:"\u21AA",rarrhk:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xED",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",ifr:"\u{1D526}",igrave:"\xEC",iiiint:"\u2A0C",qint:"\u2A0C",iiint:"\u222D",tint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",imath:"\u0131",inodot:"\u0131",imof:"\u22B7",imped:"\u01B5",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",intcal:"\u22BA",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iquest:"\xBF",iscr:"\u{1D4BE}",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAtail:"\u291B",lBarr:"\u290E",lEg:"\u2A8B",lesseqqgtr:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lambda:"\u03BB",langd:"\u2991",lap:"\u2A85",lessapprox:"\u2A85",laquo:"\xAB",larrbfs:"\u291F",larrfs:"\u291D",larrlp:"\u21AB",looparrowleft:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",leftarrowtail:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lcy:"\u043B",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21C7",llarr:"\u21C7",leftthreetimes:"\u22CB",lthree:"\u22CB",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessdot:"\u22D6",ltdot:"\u22D6",lfisht:"\u297C",lfr:"\u{1D529}",lgE:"\u2A91",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",longmapsto:"\u27FC",xmap:"\u27FC",looparrowright:"\u21AC",rarrlp:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",loz:"\u25CA",lozenge:"\u25CA",lpar:"(",lparlt:"\u2993",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsime:"\u2A8D",lsimg:"\u2A8F",lsquor:"\u201A",sbquo:"\u201A",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",triangleleft:"\u25C3",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",strns:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midcir:"\u2AF0",minus:"\u2212",minusdu:"\u2A2A",mlcp:"\u2ADB",models:"\u22A7",mopf:"\u{1D55E}",mscr:"\u{1D4C2}",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nLeftarrow:"\u21CD",nlArr:"\u21CD",nLeftrightarrow:"\u21CE",nhArr:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nRightarrow:"\u21CF",nrArr:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nacute:"\u0144",nang:"\u2220\u20D2",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",natur:"\u266E",natural:"\u266E",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",neArr:"\u21D7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1D52B}",nharr:"\u21AE",nleftrightarrow:"\u21AE",nhpar:"\u2AF2",nis:"\u22FC",nisd:"\u22FA",njcy:"\u045A",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219A",nleftarrow:"\u219A",nldr:"\u2025",nopf:"\u{1D55F}",not:"\xAC",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinvb:"\u22F7",notinvc:"\u22F6",notnivb:"\u22FE",notnivc:"\u22FD",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",nrarr:"\u219B",nrightarrow:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nscr:"\u{1D4C3}",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsubseteqq:"\u2AC5\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupseteqq:"\u2AC6\u0338",ntilde:"\xF1",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22AD",nvHarr:"\u2904",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwArr:"\u21D6",nwarhk:"\u2923",nwnear:"\u2927",oacute:"\xF3",ocirc:"\xF4",ocy:"\u043E",odblac:"\u0151",odiv:"\u2A38",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",olcir:"\u29BE",olcross:"\u29BB",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",or:"\u2228",vee:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",para:"\xB6",parsim:"\u2AF3",parsl:"\u2AFD",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",straightphi:"\u03D5",varphi:"\u03D5",phone:"\u260E",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",planckh:"\u210E",plus:"+",plusacir:"\u2A23",pluscir:"\u2A22",plusdu:"\u2A25",pluse:"\u2A72",plussim:"\u2A26",plustwo:"\u2A27",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",prE:"\u2AB3",prap:"\u2AB7",precapprox:"\u2AB7",precnapprox:"\u2AB9",prnap:"\u2AB9",precneqq:"\u2AB5",prnE:"\u2AB5",precnsim:"\u22E8",prnsim:"\u22E8",prime:"\u2032",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quatint:"\u2A16",quest:"?",rAtail:"\u291C",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",raemptyv:"\u29B3",rangd:"\u2992",range:"\u29A5",raquo:"\xBB",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rightarrowtail:"\u21A3",rarrw:"\u219D",rightsquigarrow:"\u219D",ratail:"\u291A",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21B3",rect:"\u25AD",rfisht:"\u297D",rfr:"\u{1D52F}",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",rightrightarrows:"\u21C9",rrarr:"\u21C9",rightthreetimes:"\u22CC",rthree:"\u22CC",ring:"\u02DA",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rsaquo:"\u203A",rscr:"\u{1D4C7}",rtimes:"\u22CA",rtri:"\u25B9",triangleright:"\u25B9",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",scE:"\u2AB4",scap:"\u2AB8",succapprox:"\u2AB8",scaron:"\u0161",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",succneqq:"\u2AB6",scnap:"\u2ABA",succnapprox:"\u2ABA",scnsim:"\u22E9",succnsim:"\u22E9",scpolint:"\u2A13",scy:"\u0441",sdot:"\u22C5",sdote:"\u2A66",seArr:"\u21D8",sect:"\xA7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1D530}",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",simdot:"\u2A6A",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",smashp:"\u2A33",smeparsl:"\u29E4",smile:"\u2323",ssmile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\uFE00",sqcups:"\u2294\uFE00",sscr:"\u{1D4C8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2AC5",subseteqq:"\u2AC5",subdot:"\u2ABD",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subsetneqq:"\u2ACB",subne:"\u228A",subsetneq:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supseteqq:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supsetneqq:"\u2ACC",supne:"\u228B",supsetneq:"\u228B",supplus:"\u2AC0",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1D531}",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",vartheta:"\u03D1",thorn:"\xFE",times:"\xD7",timesbar:"\u2A31",timesd:"\u2A30",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tprime:"\u2034",triangle:"\u25B5",utri:"\u25B5",triangleq:"\u225C",trie:"\u225C",tridot:"\u25EC",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",uHar:"\u2963",uacute:"\xFA",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uogon:"\u0173",uopf:"\u{1D566}",upsi:"\u03C5",upsilon:"\u03C5",upuparrows:"\u21C8",uuarr:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",uuml:"\xFC",uwangle:"\u29A7",vBar:"\u2AE8",vBarv:"\u2AE9",vangrt:"\u299C",varsubsetneq:"\u228A\uFE00",vsubne:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",vsubnE:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",vsupne:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vsupnE:"\u2ACC\uFE00",vcy:"\u0432",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",vfr:"\u{1D533}",vopf:"\u{1D567}",vscr:"\u{1D4CB}",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wscr:"\u{1D4CC}",xfr:"\u{1D535}",xi:"\u03BE",xnis:"\u22FB",xopf:"\u{1D569}",xscr:"\u{1D4CD}",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},OF="\uE500";Z_.ngsp=OF;var TT=class{tokens;errors;nonNormalizedIcuExpressions;constructor(i,e,t){this.tokens=i,this.errors=e,this.nonNormalizedIcuExpressions=t}};function QG(n,i,e,t={}){let o=new DT(new k1(n,i),e,t);return o.tokenize(),new TT(oW(o.tokens),o.errors,o.nonNormalizedIcuExpressions)}var XG=/\r\n?/g;function rh(n){return`Unexpected character "${n===Gr?"EOF":String.fromCharCode(n)}"`}function R5(n){return`Unknown entity "${n}" - use the "&#;" or "&#x;" syntax`}function KG(n,i){return`Unable to parse entity "${i}" - ${n} character reference entities must end with ";"`}var ET=(function(n){return n.HEX="hexadecimal",n.DEC="decimal",n})(ET||{}),YG=["@if","@else","@for","@switch","@case","@default","@empty","@defer","@placeholder","@loading","@error"],zg={start:"{{",end:"}}"},DT=class{_getTagDefinition;_cursor;_tokenizeIcu;_leadingTriviaCodePoints;_currentTokenStart=null;_currentTokenType=null;_expansionCaseStack=[];_openDirectiveCount=0;_inInterpolation=!1;_preserveLineEndings;_i18nNormalizeLineEndingsInICUs;_tokenizeBlocks;_tokenizeLet;_selectorlessEnabled;tokens=[];errors=[];nonNormalizedIcuExpressions=[];constructor(i,e,t){this._getTagDefinition=e,this._tokenizeIcu=t.tokenizeExpansionForms||!1,this._leadingTriviaCodePoints=t.leadingTriviaChars&&t.leadingTriviaChars.map(r=>r.codePointAt(0)||0);let o=t.range||{endPos:i.content.length,startPos:0,startLine:0,startCol:0};this._cursor=t.escapedString?new PT(i,o):new $1(i,o),this._preserveLineEndings=t.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=t.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=t.tokenizeBlocks??!0,this._tokenizeLet=t.tokenizeLet??!0,this._selectorlessEnabled=t.selectorlessEnabled??!1;try{this._cursor.init()}catch(r){this.handleError(r)}}_processCarriageReturns(i){return this._preserveLineEndings?i:i.replace(XG,` +`)}tokenize(){for(;this._cursor.peek()!==Gr;){let i=this._cursor.clone();try{this._attemptCharCode(_h)?this._attemptCharCode(sT)?this._attemptCharCode(bc)?this._consumeCdata(i):this._attemptCharCode(w1)?this._consumeComment(i):this._consumeDocType(i):this._attemptCharCode(Qs)?this._consumeTagClose(i):this._consumeTagOpen(i):this._tokenizeLet&&this._cursor.peek()===nh&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(i):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(i):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(Ra)?this._consumeBlockEnd(i):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(e){this.handleError(e)}}this._beginToken(41),this._endToken([])}_getBlockName(){let i=!1,e=this._cursor.clone();return this._attemptCharCodeUntilFn(t=>B_(t)?!i:iW(t)?(i=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeBlockStart(i){this._requireCharCode(nh),this._beginToken(24,i);let e=this._endToken([this._getBlockName()]);if(e.parts[0]==="default never"&&this._attemptCharCode(es)){this._beginToken(25),this._endToken([]),this._beginToken(26),this._endToken([]);return}if(this._cursor.peek()===Va)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(Ro),this._attemptCharCode(Cr))this._attemptCharCodeUntilFn(Ro);else{e.type=28;return}this._attemptCharCode(Ys)?(this._beginToken(25),this._endToken([])):this._isBlockStart()&&(e.parts[0]==="case"||e.parts[0]==="default")?(this._beginToken(25),this._endToken([]),this._beginToken(26),this._endToken([])):e.type=28}_consumeBlockEnd(i){this._beginToken(26,i),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(V5);this._cursor.peek()!==Cr&&this._cursor.peek()!==Gr;){this._beginToken(27);let i=this._cursor.clone(),e=null,t=0;for(;this._cursor.peek()!==es&&this._cursor.peek()!==Gr||e!==null;){let o=this._cursor.peek();if(o===Np)this._cursor.advance();else if(o===e)e=null;else if(e===null&&t_(o))e=o;else if(o===Va&&e===null)t++;else if(o===Cr&&e===null){if(t===0)break;t>0&&t--}this._cursor.advance()}this._endToken([this._cursor.getChars(i)]),this._attemptCharCodeUntilFn(V5)}}_consumeLetDeclaration(i){if(this._requireStr("@let"),this._beginToken(29,i),B_(this._cursor.peek()))this._attemptCharCodeUntilFn(Ro);else{let o=this._endToken([this._cursor.getChars(i)]);o.type=32;return}let e=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(Ro),!this._attemptCharCode(Hr)){e.type=32;return}this._attemptCharCodeUntilFn(o=>Ro(o)&&!M1(o)),this._consumeLetDeclarationValue(),this._cursor.peek()===es?(this._beginToken(31),this._endToken([]),this._cursor.advance()):(e.type=32,e.sourceSpan=this._cursor.getSpan(i))}_getLetDeclarationName(){let i=this._cursor.clone(),e=!1;return this._attemptCharCodeUntilFn(t=>mm(t)||t===ob||t===_m||e&&Xs(t)?(e=!0,!1):!0),this._cursor.getChars(i).trim()}_consumeLetDeclarationValue(){let i=this._cursor.clone();for(this._beginToken(30,i);this._cursor.peek()!==Gr;){let e=this._cursor.peek();if(e===es)break;t_(e)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(t=>t===Np?(this._cursor.advance(),!1):t===e)),this._cursor.advance()}this._endToken([this._cursor.getChars(i)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(tW(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===Ra){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(i,e=this._cursor.clone()){this._currentTokenStart=e,this._currentTokenType=i}_endToken(i,e){if(this._currentTokenStart===null)throw new sn(this._cursor.getSpan(e),"Programming error - attempted to end a token when there was no start to the token");if(this._currentTokenType===null)throw new sn(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let t={type:this._currentTokenType,parts:i,sourceSpan:(e??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(t),this._currentTokenStart=null,this._currentTokenType=null,t}_createError(i,e){this._isInExpansionForm()&&(i+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let t=new sn(e,i);return this._currentTokenStart=null,this._currentTokenType=null,t}handleError(i){if(i instanceof J_&&(i=this._createError(i.msg,this._cursor.getSpan(i.cursor))),i instanceof sn)this.errors.push(i);else throw i}_attemptCharCode(i){return this._cursor.peek()===i?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(i){return nW(this._cursor.peek(),i)?(this._cursor.advance(),!0):!1}_requireCharCode(i){let e=this._cursor.clone();if(!this._attemptCharCode(i))throw this._createError(rh(this._cursor.peek()),this._cursor.getSpan(e))}_attemptStr(i){let e=i.length;if(this._cursor.charsLeft()this._peekStr(i))}_isLetStart(){return this._cursor.peek()===nh&&this._peekStr("@let")}_consumeEntity(i){this._beginToken(9);let e=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(iF)){let t=this._attemptCharCode(mF)||this._attemptCharCode(uH),o=this._cursor.clone();if(this._attemptCharCodeUntilFn(JG),this._cursor.peek()!=es){this._cursor.advance();let a=t?ET.HEX:ET.DEC;throw this._createError(KG(a,this._cursor.getChars(e)),this._cursor.getSpan())}let r=this._cursor.getChars(o);this._cursor.advance();try{let a=parseInt(r,t?16:10);this._endToken([String.fromCodePoint(a),this._cursor.getChars(e)])}catch{throw this._createError(R5(this._cursor.getChars(e)),this._cursor.getSpan())}}else{let t=this._cursor.clone();if(this._attemptCharCodeUntilFn(eW),this._cursor.peek()!=es)this._beginToken(i,e),this._cursor=t,this._endToken(["&"]);else{let o=this._cursor.getChars(t);this._cursor.advance();let r=Z_.hasOwnProperty(o)&&Z_[o];if(!r)throw this._createError(R5(o),this._cursor.getSpan(e));this._endToken([r,`&${o};`])}}}_consumeRawText(i,e){this._beginToken(i?6:7);let t=[];for(;;){let o=this._cursor.clone(),r=e();if(this._cursor=o,r)break;i&&this._cursor.peek()===S1?(this._endToken([this._processCarriageReturns(t.join(""))]),t.length=0,this._consumeEntity(6),this._beginToken(6)):t.push(this._readChar())}this._endToken([this._processCarriageReturns(t.join(""))])}_consumeComment(i){this._beginToken(10,i),this._requireCharCode(w1),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeCdata(i){this._beginToken(12,i),this._requireStr("CDATA["),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(i){this._beginToken(18,i);let e=this._cursor.clone();this._attemptUntilChar(Ss);let t=this._cursor.getChars(e);this._cursor.advance(),this._endToken([t])}_consumePrefixAndName(i){let e=this._cursor.clone(),t="";for(;this._cursor.peek()!==_c&&!ZG(this._cursor.peek());)this._cursor.advance();let o;this._cursor.peek()===_c?(t=this._cursor.getChars(e),this._cursor.advance(),o=this._cursor.clone()):o=e,this._requireCharCodeUntilFn(i,t===""?0:1);let r=this._cursor.getChars(o);return[t,r]}_consumeTagOpen(i){let e,t,o,r;try{if(this._selectorlessEnabled&&OC(this._cursor.peek()))r=this._consumeComponentOpenStart(i),[o,t,e]=r.parts,t&&(o+=`:${t}`),e&&(o+=`:${e}`),this._attemptCharCodeUntilFn(Ro);else{if(!mm(this._cursor.peek()))throw this._createError(rh(this._cursor.peek()),this._cursor.getSpan(i));r=this._consumeTagOpenStart(i),t=r.parts[0],e=o=r.parts[1],this._attemptCharCodeUntilFn(Ro)}for(;!z5(this._cursor.peek());)if(this._selectorlessEnabled&&this._cursor.peek()===nh){let c=this._cursor.clone(),p=c.clone();p.advance(),OC(p.peek())&&this._consumeDirective(c,p)}else this._consumeAttribute();r.type===33?this._consumeComponentOpenEnd():this._consumeTagOpenEnd()}catch(c){if(c instanceof sn){r?r.type=r.type===33?37:4:(this._beginToken(5,i),this._endToken(["<"]));return}throw c}let a=this._getTagDefinition(e).getContentType(t);a===gc.RAW_TEXT?this._consumeRawTextWithTagClose(r,o,!1):a===gc.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,o,!0)}_consumeRawTextWithTagClose(i,e,t){this._consumeRawText(t,()=>!this._attemptCharCode(_h)||!this._attemptCharCode(Qs)||(this._attemptCharCodeUntilFn(Ro),!this._attemptStrCaseInsensitive(e))?!1:(this._attemptCharCodeUntilFn(Ro),this._attemptCharCode(Ss))),this._beginToken(i.type===33?36:3),this._requireCharCodeUntilFn(o=>o===Ss,3),this._cursor.advance(),this._endToken(i.parts)}_consumeTagOpenStart(i){this._beginToken(0,i);let e=this._consumePrefixAndName(xp);return this._endToken(e)}_consumeComponentOpenStart(i){this._beginToken(33,i);let e=this._consumeComponentName();return this._endToken(e)}_consumeComponentName(){let i=this._cursor.clone();for(;B5(this._cursor.peek());)this._cursor.advance();let e=this._cursor.getChars(i),t="",o="";return this._cursor.peek()===_c&&(this._cursor.advance(),[t,o]=this._consumePrefixAndName(xp)),[e,t,o]}_consumeAttribute(){this._consumeAttributeName(),this._attemptCharCodeUntilFn(Ro),this._attemptCharCode(Hr)&&(this._attemptCharCodeUntilFn(Ro),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(Ro)}_consumeAttributeName(){let i=this._cursor.peek();if(i===V_||i===L_)throw this._createError(rh(i),this._cursor.getSpan());this._beginToken(14);let e;if(this._openDirectiveCount>0){let o=0;e=r=>{if(this._openDirectiveCount>0){if(r===Va)o++;else if(r===Cr){if(o===0)return!0;o--}}return xp(r)}}else if(i===bc){let o=0;e=r=>(r===bc?o++:r===_d&&o--,o<=0?xp(r):M1(r))}else e=xp;let t=this._consumePrefixAndName(e);this._endToken(t)}_consumeAttributeValue(){if(this._cursor.peek()===V_||this._cursor.peek()===L_){let i=this._cursor.peek();this._consumeQuote(i);let e=()=>this._cursor.peek()===i;this._consumeWithInterpolation(16,17,e,e),this._consumeQuote(i)}else{let i=()=>xp(this._cursor.peek());this._consumeWithInterpolation(16,17,i,i)}}_consumeQuote(i){this._beginToken(15),this._requireCharCode(i),this._endToken([String.fromCodePoint(i)])}_consumeTagOpenEnd(){let i=this._attemptCharCode(Qs)?2:1;this._beginToken(i),this._requireCharCode(Ss),this._endToken([])}_consumeComponentOpenEnd(){let i=this._attemptCharCode(Qs)?35:34;this._beginToken(i),this._requireCharCode(Ss),this._endToken([])}_consumeTagClose(i){if(this._selectorlessEnabled){let t=i.clone();for(;t.peek()!==Ss&&!OC(t.peek());)t.advance();if(OC(t.peek())){this._beginToken(36,i);let o=this._consumeComponentName();this._attemptCharCodeUntilFn(Ro),this._requireCharCode(Ss),this._endToken(o);return}}this._beginToken(3,i),this._attemptCharCodeUntilFn(Ro);let e=this._consumePrefixAndName(xp);this._attemptCharCodeUntilFn(Ro),this._requireCharCode(Ss),this._endToken(e)}_consumeExpansionFormStart(){this._beginToken(19),this._requireCharCode(Ys),this._endToken([]),this._expansionCaseStack.push(19),this._beginToken(7);let i=this._readUntil(va),e=this._processCarriageReturns(i);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([e]);else{let o=this._endToken([i]);e!==i&&this.nonNormalizedIcuExpressions.push(o)}this._requireCharCode(va),this._attemptCharCodeUntilFn(Ro),this._beginToken(7);let t=this._readUntil(va);this._endToken([t]),this._requireCharCode(va),this._attemptCharCodeUntilFn(Ro)}_consumeExpansionCaseStart(){this._beginToken(20);let i=this._readUntil(Ys).trim();this._endToken([i]),this._attemptCharCodeUntilFn(Ro),this._beginToken(21),this._requireCharCode(Ys),this._endToken([]),this._attemptCharCodeUntilFn(Ro),this._expansionCaseStack.push(21)}_consumeExpansionCaseEnd(){this._beginToken(22),this._requireCharCode(Ra),this._endToken([]),this._attemptCharCodeUntilFn(Ro),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(23),this._requireCharCode(Ra),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(i,e,t,o){this._beginToken(i);let r=[];for(;!t();){let a=this._cursor.clone();this._attemptStr(zg.start)?(this._endToken([this._processCarriageReturns(r.join(""))],a),r.length=0,this._consumeInterpolation(e,a,o),this._beginToken(i)):this._cursor.peek()===S1?(this._endToken([this._processCarriageReturns(r.join(""))]),r.length=0,this._consumeEntity(i),this._beginToken(i)):r.push(this._readChar())}this._inInterpolation=!1,this._endToken([this._processCarriageReturns(r.join(""))])}_consumeInterpolation(i,e,t){let o=[];this._beginToken(i,e),o.push(zg.start);let r=this._cursor.clone(),a=null,c=!1;for(;this._cursor.peek()!==Gr&&(t===null||!t());){let p=this._cursor.clone();if(this._isTagStart()){this._cursor=p,o.push(this._getProcessedChars(r,p)),this._endToken(o);return}if(a===null)if(this._attemptStr(zg.end)){o.push(this._getProcessedChars(r,p)),o.push(zg.end),this._endToken(o);return}else this._attemptStr("//")&&(c=!0);let u=this._cursor.peek();this._cursor.advance(),u===Np?this._cursor.advance():u===a?a=null:!c&&a===null&&t_(u)&&(a=u)}o.push(this._getProcessedChars(r,this._cursor)),this._endToken(o)}_consumeDirective(i,e){for(this._requireCharCode(nh),this._cursor.advance();B5(this._cursor.peek());)this._cursor.advance();this._beginToken(38,i);let t=this._cursor.getChars(e);if(this._endToken([t]),this._attemptCharCodeUntilFn(Ro),this._cursor.peek()===Va){for(this._openDirectiveCount++,this._beginToken(39),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Ro);!z5(this._cursor.peek())&&this._cursor.peek()!==Cr;)this._consumeAttribute();if(this._attemptCharCodeUntilFn(Ro),this._openDirectiveCount--,this._cursor.peek()!==Cr){if(this._cursor.peek()===Ss||this._cursor.peek()===Qs)return;throw this._createError(rh(this._cursor.peek()),this._cursor.getSpan(i))}this._beginToken(40),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Ro)}}_getProcessedChars(i,e){return this._processCarriageReturns(e.getChars(i))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===Gr||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===Ra&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._isLetStart()||this._cursor.peek()===Ra))}_isTagStart(){if(this._cursor.peek()===_h){let i=this._cursor.clone();i.advance();let e=i.peek();if(Qp<=e&&e<=l0||gm<=e&&e<=Bh||e===Qs||e===sT)return!0}return!1}_readUntil(i){let e=this._cursor.clone();return this._attemptUntilChar(i),this._cursor.getChars(e)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===21}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===19}isExpansionFormStart(){if(this._cursor.peek()!==Ys)return!1;let i=this._cursor.clone(),e=this._attemptStr(zg.start);return this._cursor=i,!e}};function Ro(n){return!B_(n)||n===Gr}function xp(n){return B_(n)||n===Ss||n===_h||n===Qs||n===V_||n===L_||n===Hr||n===Gr}function ZG(n){return(nrF)}function JG(n){return n===es||n===Gr||!_H(n)}function eW(n){return n===es||n===Gr||!(mm(n)||Xs(n))}function tW(n){return n!==Ra}function nW(n,i){return L5(n)===L5(i)}function L5(n){return n>=Qp&&n<=l0?n-Qp+gm:n}function iW(n){return mm(n)||Xs(n)||n===_m}function V5(n){return n!==es&&Ro(n)}function OC(n){return n===_m||n>=gm&&n<=Bh}function B5(n){return mm(n)||Xs(n)||n===_m}function z5(n){return n===Qs||n===Ss||n===_h||n===Gr}function oW(n){let i=[],e;for(let t=0;t0&&e.indexOf(i.peek())!==-1;)t===i&&(i=i.clone()),i.advance();let o=this.locationFromCursor(i),r=this.locationFromCursor(this),a=t!==i?this.locationFromCursor(t):o;return new gn(o,r,a)}getChars(i){return this.input.substring(i.state.offset,this.state.offset)}charAt(i){return this.input.charCodeAt(i)}advanceState(i){if(i.offset>=this.end)throw this.state=i,new J_('Unexpected character "EOF"',this);let e=this.charAt(i.offset);e===Op?(i.line++,i.column=0):M1(e)||i.column++,i.offset++,this.updatePeek(i)}updatePeek(i){i.peek=i.offset>=this.end?Gr:this.charAt(i.offset)}locationFromCursor(i){return new z_(i.file,i.state.offset,i.state.line,i.state.column)}},PT=class n extends $1{internalState;constructor(i,e){i instanceof n?(super(i),this.internalState=K({},i.internalState)):(super(i,e),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new n(this)}getChars(i){let e=i.clone(),t="";for(;e.internalState.offsetthis.internalState.peek;if(i()===Np)if(this.internalState=K({},this.state),this.advanceState(this.internalState),i()===aF)this.state.peek=Op;else if(i()===sF)this.state.peek=bE;else if(i()===dF)this.state.peek=eF;else if(i()===lF)this.state.peek=CE;else if(i()===fH)this.state.peek=lH;else if(i()===yE)this.state.peek=tF;else if(i()===cF)if(this.advanceState(this.internalState),i()===Ys){this.advanceState(this.internalState);let e=this.clone(),t=0;for(;i()!==Ra;)this.advanceState(this.internalState),t++;this.state.peek=this.decodeHexDigits(e,t)}else{let e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(i()===mF){this.advanceState(this.internalState);let e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(h5(i())){let e="",t=0,o=this.clone();for(;h5(i())&&t<3;)o=this.clone(),e+=String.fromCodePoint(i()),this.advanceState(this.internalState),t++;this.state.peek=parseInt(e,8),this.internalState=o.internalState}else M1(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(i,e){let t=this.input.slice(i.internalState.offset,i.internalState.offset+e),o=parseInt(t,16);if(isNaN(o))throw i.state=i.internalState,new J_("Invalid hexadecimal escape sequence",i);return o}},J_=class extends Error{msg;cursor;constructor(i,e){super(i),this.msg=i,this.cursor=e,Object.setPrototypeOf(this,new.target.prototype)}},dr=class n extends sn{elementName;static create(i,e,t){return new n(i,e,t)}constructor(i,e,t){super(e,t),this.elementName=i}},H1=class{rootNodes;errors;constructor(i,e){this.rootNodes=i,this.errors=e}},rW=class{getTagDefinition;constructor(i){this.getTagDefinition=i}parse(i,e,t){let o=QG(i,e,this.getTagDefinition,t),r=new IT(o.tokens,this.getTagDefinition);return r.build(),new H1(r.rootNodes,[...o.errors,...r.errors])}},IT=class n{tokens;tagDefinitionResolver;_index=-1;_peek;_containerStack=[];rootNodes=[];errors=[];constructor(i,e){this.tokens=i,this.tagDefinitionResolver=e,this._advance()}build(){for(;this._peek.type!==41;)this._peek.type===0||this._peek.type===4?this._consumeElementStartTag(this._advance()):this._peek.type===3?this._consumeElementEndTag(this._advance()):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===19?this._consumeExpansion(this._advance()):this._peek.type===24?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===26?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===28?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===32?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._peek.type===33||this._peek.type===37?this._consumeComponentStartTag(this._advance()):this._peek.type===36?this._consumeComponentEndTag(this._advance()):this._advance();for(let i of this._containerStack)i instanceof Ks&&this.errors.push(dr.create(i.name,i.sourceSpan,`Unclosed block "${i.name}"`))}_advance(){let i=this._peek;return this._index0)return this.errors=this.errors.concat(r.errors),null;let a=new gn(i.sourceSpan.start,o.sourceSpan.end,i.sourceSpan.fullStart),c=new gn(e.sourceSpan.start,o.sourceSpan.end,e.sourceSpan.fullStart);return new B1(i.parts[0],r.rootNodes,a,i.sourceSpan,c)}_collectExpansionExpTokens(i){let e=[],t=[21];for(;;){if((this._peek.type===19||this._peek.type===21)&&t.push(this._peek.type),this._peek.type===22)if(j5(t,21)){if(t.pop(),t.length===0)return e}else return this.errors.push(dr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===23)if(j5(t,19))t.pop();else return this.errors.push(dr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===41)return this.errors.push(dr.create(null,i.sourceSpan,"Invalid ICU message. Missing '}'.")),null;e.push(this._advance())}}_consumeText(i){let e=[i],t=i.sourceSpan,o=i.parts[0];if(o.length>0&&o[0]===` +`){let r=this._getContainer();r!=null&&r.children.length===0&&this._getTagDefinition(r)?.ignoreFirstLf&&(o=o.substring(1),e[0]={type:i.type,sourceSpan:i.sourceSpan,parts:[o]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)i=this._advance(),e.push(i),i.type===8?o+=i.parts.join("").replace(/&([^;]+);/g,$5):i.type===9?o+=i.parts[0]:o+=i.parts.join("");if(o.length>0){let r=i.sourceSpan;this._addToParent(new Jp(o,new gn(t.start,r.end,t.fullStart,t.details),e))}}_closeVoidElement(){let i=this._getContainer();i!==null&&this._getTagDefinition(i)?.isVoid&&this._containerStack.pop()}_consumeElementStartTag(i){let e=[],t=[];this._consumeAttributesAndDirectives(e,t);let o=this._getElementFullName(i,this._getClosestElementLikeParent()),r=this._getTagDefinition(o),a=!1;this._peek.type===2?(this._advance(),a=!0,r?.canSelfClose||Kk(o)!==null||r?.isVoid||this.errors.push(dr.create(o,i.sourceSpan,`Only void, custom and foreign elements can be self closed "${i.parts[1]}"`))):this._peek.type===1&&(this._advance(),a=!1);let c=this._peek.sourceSpan.fullStart,p=new gn(i.sourceSpan.start,c,i.sourceSpan.fullStart),u=new gn(i.sourceSpan.start,c,i.sourceSpan.fullStart),h=new qs(o,e,t,[],a,p,u,void 0,r?.isVoid??!1),_=this._getContainer(),S=_!==null&&!!this._getTagDefinition(_)?.isClosedByChild(h.name);this._pushContainer(h,S),a?this._popContainer(o,qs,p):i.type===4&&(this._popContainer(o,qs,null),this.errors.push(dr.create(o,p,`Opening tag "${o}" not terminated.`)))}_consumeComponentStartTag(i){let e=i.parts[0],t=[],o=[];this._consumeAttributesAndDirectives(t,o);let r=this._getClosestElementLikeParent(),a=this._getComponentTagName(i,r),c=this._getComponentFullName(i,r),p=this._peek.type===35;this._advance();let u=this._peek.sourceSpan.fullStart,h=new gn(i.sourceSpan.start,u,i.sourceSpan.fullStart),_=new gn(i.sourceSpan.start,u,i.sourceSpan.fullStart),S=new Fa(e,a,c,t,o,[],p,h,_,void 0),x=this._getContainer(),b=x!==null&&S.tagName!==null&&!!this._getTagDefinition(x)?.isClosedByChild(S.tagName);this._pushContainer(S,b),p?this._popContainer(c,Fa,h):i.type===37&&(this._popContainer(c,Fa,null),this.errors.push(dr.create(c,h,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(i,e){for(;this._peek.type===14||this._peek.type===38;)this._peek.type===38?e.push(this._consumeDirective(this._peek)):i.push(this._consumeAttr(this._advance()))}_consumeComponentEndTag(i){let e=this._getComponentFullName(i,this._getClosestElementLikeParent());if(!this._popContainer(e,Fa,i.sourceSpan)){let t=this._containerStack[this._containerStack.length-1],o;t instanceof Fa&&t.componentName===i.parts[0]?o=`, did you mean "${t.fullName}"?`:o=". It may happen when the tag has already been closed by another tag.";let r=`Unexpected closing tag "${e}"${o}`;this.errors.push(dr.create(e,i.sourceSpan,r))}}_getTagDefinition(i){return typeof i=="string"?this.tagDefinitionResolver(i):i instanceof qs?this.tagDefinitionResolver(i.name):i instanceof Fa&&i.tagName!==null?this.tagDefinitionResolver(i.tagName):null}_pushContainer(i,e){e&&this._containerStack.pop(),this._addToParent(i),this._containerStack.push(i)}_consumeElementEndTag(i){let e=this._getElementFullName(i,this._getClosestElementLikeParent());if(this._getTagDefinition(e)?.isVoid)this.errors.push(dr.create(e,i.sourceSpan,`Void elements do not have end tags "${i.parts[1]}"`));else if(!this._popContainer(e,qs,i.sourceSpan)){let t=`Unexpected closing tag "${e}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(dr.create(e,i.sourceSpan,t))}}_popContainer(i,e,t){let o=!1;for(let r=this._containerStack.length-1;r>=0;r--){let a=this._containerStack[r];if(((a instanceof Fa?a.fullName:a.name)===i||i===null)&&a instanceof e)return a.endSourceSpan=t,a.sourceSpan.end=t!==null?t.end:a.sourceSpan.end,this._containerStack.splice(r,this._containerStack.length-r),!o;(a instanceof Ks||!this._getTagDefinition(a)?.closedByParent)&&(o=!0)}return!1}_consumeAttr(i){let e=UC(i.parts[0],i.parts[1]),t=i.sourceSpan.end;this._peek.type===15&&this._advance();let o="",r=[],a,c;if(this._peek.type===16)for(a=this._peek.sourceSpan,c=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let h=this._advance();r.push(h),h.type===17?o+=h.parts.join("").replace(/&([^;]+);/g,$5):h.type===9?o+=h.parts[0]:o+=h.parts.join(""),c=t=h.sourceSpan.end}this._peek.type===15&&(t=this._advance().sourceSpan.end);let u=a&&c&&new gn(a.start,c,a.fullStart);return new MT(e,o,new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),i.sourceSpan,u,r.length>0?r:void 0,void 0)}_consumeDirective(i){let e=[],t=i.sourceSpan.end,o=null;if(this._advance(),this._peek.type===39){for(t=this._peek.sourceSpan.end,this._advance();this._peek.type===14;)e.push(this._consumeAttr(this._advance()));this._peek.type===40?(o=this._peek.sourceSpan,this._advance()):this.errors.push(dr.create(null,i.sourceSpan,"Unterminated directive definition"))}let r=new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),a=new gn(r.start,o===null?i.sourceSpan.end:o.end,r.fullStart);return new kT(i.parts[0],e,a,r,o)}_consumeBlockOpen(i){let e=[];for(;this._peek.type===27;){let c=this._advance();e.push(new z1(c.parts[0],c.sourceSpan))}this._peek.type===25&&this._advance();let t=this._peek.sourceSpan.fullStart,o=new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),r=new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),a=new Ks(i.parts[0],e,[],o,i.sourceSpan,r);this._pushContainer(a,!1)}_consumeBlockClose(i){let e=this._containerStack.length,t=this._containerStack[e-1];if(!this._popContainer(null,Ks,i.sourceSpan)){if(this._containerStack.length element? If you meant to write the \`}\` character, you should use the "}" HTML entity instead.`));return}this.errors.push(dr.create(null,i.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the `}` character, you should use the "}" HTML entity instead.'))}}_consumeIncompleteBlock(i){let e=[];for(;this._peek.type===27;){let c=this._advance();e.push(new z1(c.parts[0],c.sourceSpan))}let t=this._peek.sourceSpan.fullStart,o=new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),r=new gn(i.sourceSpan.start,t,i.sourceSpan.fullStart),a=new Ks(i.parts[0],e,[],o,i.sourceSpan,r);this._pushContainer(a,!1),this._popContainer(null,Ks,null),this.errors.push(dr.create(i.parts[0],o,`Incomplete block "${i.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(i){let e=i.parts[0],t,o;if(this._peek.type!==30){this.errors.push(dr.create(i.parts[0],i.sourceSpan,`Invalid @let declaration "${e}". Declaration must have a value.`));return}else t=this._advance();if(this._peek.type!==31){this.errors.push(dr.create(i.parts[0],i.sourceSpan,`Unterminated @let declaration "${e}". Declaration must be terminated with a semicolon.`));return}else o=this._advance();let r=o.sourceSpan.fullStart,a=new gn(i.sourceSpan.start,r,i.sourceSpan.fullStart),c=i.sourceSpan.toString().lastIndexOf(e),p=i.sourceSpan.start.moveBy(c),u=new gn(p,i.sourceSpan.end),h=new j1(e,t.parts[0],a,u,t.sourceSpan);this._addToParent(h)}_consumeIncompleteLet(i){let e=i.parts[0]??"",t=e?` "${e}"`:"";if(e.length>0){let o=i.sourceSpan.toString().lastIndexOf(e),r=i.sourceSpan.start.moveBy(o),a=new gn(r,i.sourceSpan.end),c=new gn(i.sourceSpan.start,i.sourceSpan.start.moveBy(0)),p=new j1(e,"",i.sourceSpan,a,c);this._addToParent(p)}this.errors.push(dr.create(i.parts[0],i.sourceSpan,`Incomplete @let declaration${t}. @let declarations must be written as \`@let = ;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestElementLikeParent(){for(let i=this._containerStack.length-1;i>-1;i--){let e=this._containerStack[i];if(e instanceof qs||e instanceof Fa)return e}return null}_addToParent(i){let e=this._getContainer();e===null?this.rootNodes.push(i):e.children.push(i)}_getElementFullName(i,e){let t=this._getPrefix(i,e);return UC(t,i.parts[1])}_getComponentFullName(i,e){let t=i.parts[0],o=this._getComponentTagName(i,e);return o===null?t:o.startsWith(":")?t+o:`${t}:${o}`}_getComponentTagName(i,e){let t=this._getPrefix(i,e),o=i.parts[2];return!t&&!o?null:!t&&o?o:UC(t,o||"ng-component")}_getPrefix(i,e){let t,o;if(i.type===33||i.type===37||i.type===36?(t=i.parts[1],o=i.parts[2]):(t=i.parts[0],o=i.parts[1]),t=t||this._getTagDefinition(o)?.implicitNamespacePrefix||"",!t&&e){let r=e instanceof qs?e.name:e.tagName;if(r!==null){let a=Ll(r)[1],c=this._getTagDefinition(a);c!==null&&!c.preventNamespaceInheritance&&(t=Kk(r))}}return t}};function j5(n,i){return n.length>0&&n[n.length-1]===i}function $5(n,i){return Z_[i]!==void 0?Z_[i]||n:/^#x[a-f0-9]+$/i.test(i)?String.fromCodePoint(parseInt(i.slice(2),16)):/^#\d+$/.test(i)?String.fromCodePoint(parseInt(i.slice(1),10)):n}var NF="ngPreserveWhitespaces",H5=new Set(["pre","template","textarea","script","style"]),FF=` \f +\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,aW=new RegExp(`[^${FF}]`),sW=new RegExp(`[${FF}]{2,}`,"g");function U5(n){return n.some(i=>i.name===NF)}function RF(n){return n.replace(new RegExp(OF,"g")," ")}var U1=class{preserveSignificantWhitespace;originalNodeMap;requireContext;icuExpansionDepth=0;constructor(i,e,t=!0){this.preserveSignificantWhitespace=i,this.originalNodeMap=e,this.requireContext=t}visitElement(i,e){if(H5.has(i.name)||U5(i.attrs)){let o=new qs(i.name,uc(this,i.attrs),uc(this,i.directives),i.children,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n);return this.originalNodeMap?.set(o,i),o}let t=new qs(i.name,i.attrs,i.directives,uc(this,i.children),i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n);return this.originalNodeMap?.set(t,i),t}visitAttribute(i,e){return i.name!==NF?i:null}visitText(i,e){let t=i.value.match(aW),o=e&&(e.prev instanceof Fp||e.next instanceof Fp);if(this.icuExpansionDepth>0&&this.preserveSignificantWhitespace)return i;if(t||o){let a=i.tokens.map(h=>h.type===5?mW(h):h);if(!this.preserveSignificantWhitespace&&a.length>0){let h=a[0];a.splice(0,1,lW(h,e));let _=a[a.length-1];a.splice(a.length-1,1,cW(_,e))}let c=VF(i.value),p=this.preserveSignificantWhitespace?c:dW(c,e),u=new Jp(p,i.sourceSpan,a,i.i18n);return this.originalNodeMap?.set(u,i),u}return null}visitComment(i,e){return i}visitExpansion(i,e){this.icuExpansionDepth++;let t;try{t=new Fp(i.switchValue,i.type,uc(this,i.cases),i.sourceSpan,i.switchValueSourceSpan,i.i18n)}finally{this.icuExpansionDepth--}return this.originalNodeMap?.set(t,i),t}visitExpansionCase(i,e){let t=new B1(i.value,uc(this,i.expression),i.sourceSpan,i.valueSourceSpan,i.expSourceSpan);return this.originalNodeMap?.set(t,i),t}visitBlock(i,e){let t=new Ks(i.name,i.parameters,uc(this,i.children),i.sourceSpan,i.nameSpan,i.startSourceSpan,i.endSourceSpan);return this.originalNodeMap?.set(t,i),t}visitBlockParameter(i,e){return i}visitLetDeclaration(i,e){return i}visitComponent(i,e){if(i.tagName&&H5.has(i.tagName)||U5(i.attrs)){let o=new Fa(i.componentName,i.tagName,i.fullName,uc(this,i.attrs),uc(this,i.directives),i.children,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return this.originalNodeMap?.set(o,i),o}let t=new Fa(i.componentName,i.tagName,i.fullName,i.attrs,i.directives,uc(this,i.children),i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return this.originalNodeMap?.set(t,i),t}visitDirective(i,e){return i}visit(i,e){if(this.requireContext&&!e)throw new Error("WhitespaceVisitor requires context. Visit via `visitAllWithSiblings` to get this context.");return!1}};function lW(n,i){return n.type!==5||!!i?.prev?n:LF(n,t=>t.trimStart())}function cW(n,i){return n.type!==5||!!i?.next?n:LF(n,t=>t.trimEnd())}function dW(n,i){let e=!i?.prev,t=!i?.next,o=e?n.trimStart():n;return t?o.trimEnd():o}function mW({type:n,parts:i,sourceSpan:e}){return{type:n,parts:[VF(i[0])],sourceSpan:e}}function LF({type:n,parts:i,sourceSpan:e},t){return{type:n,parts:[t(i[0])],sourceSpan:e}}function VF(n){return RF(n).replace(sW," ")}function uc(n,i){let e=[];return i.forEach((t,o)=>{let r={prev:i[o-1],next:i[o+1]},a=t.visit(n,r);a&&e.push(a)}),e}var un=(function(n){return n[n.Character=0]="Character",n[n.Identifier=1]="Identifier",n[n.PrivateIdentifier=2]="PrivateIdentifier",n[n.Keyword=3]="Keyword",n[n.String=4]="String",n[n.Operator=5]="Operator",n[n.Number=6]="Number",n[n.RegExpBody=7]="RegExpBody",n[n.RegExpFlags=8]="RegExpFlags",n[n.Error=9]="Error",n})(un||{}),Rp=(function(n){return n[n.Plain=0]="Plain",n[n.TemplateLiteralPart=1]="TemplateLiteralPart",n[n.TemplateLiteralEnd=2]="TemplateLiteralEnd",n})(Rp||{}),pW=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in","instanceof"],e0=class{tokenize(i){return new AT(i).scan()}},As=class{index;end;type;numValue;strValue;constructor(i,e,t,o,r){this.index=i,this.end=e,this.type=t,this.numValue=o,this.strValue=r}isCharacter(i){return this.type===un.Character&&this.numValue===i}isNumber(){return this.type===un.Number}isString(){return this.type===un.String}isOperator(i){return this.type===un.Operator&&this.strValue===i}isIdentifier(){return this.type===un.Identifier}isPrivateIdentifier(){return this.type===un.PrivateIdentifier}isKeyword(){return this.type===un.Keyword}isKeywordLet(){return this.type===un.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===un.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===un.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===un.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===un.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===un.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===un.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===un.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===un.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===un.Keyword&&this.strValue==="in"}isKeywordInstanceOf(){return this.type===un.Keyword&&this.strValue==="instanceof"}isError(){return this.type===un.Error}isRegExpBody(){return this.type===un.RegExpBody}isRegExpFlags(){return this.type===un.RegExpFlags}toNumber(){return this.type===un.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===Rp.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===Rp.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}toString(){switch(this.type){case un.Character:case un.Identifier:case un.Keyword:case un.Operator:case un.PrivateIdentifier:case un.String:case un.Error:case un.RegExpBody:case un.RegExpFlags:return this.strValue;case un.Number:return this.numValue.toString();default:return null}}},n_=class extends As{kind;constructor(i,e,t,o){super(i,e,un.String,0,t),this.kind=o}};function jg(n,i,e){return new As(n,i,un.Character,e,String.fromCharCode(e))}function uW(n,i,e){return new As(n,i,un.Identifier,0,e)}function hW(n,i,e){return new As(n,i,un.PrivateIdentifier,0,e)}function fW(n,i,e){return new As(n,i,un.Keyword,0,e)}function Xd(n,i,e){return new As(n,i,un.Operator,0,e)}function gW(n,i,e){return new As(n,i,un.Number,e,"")}function _W(n,i,e){return new As(n,i,un.Error,0,e)}function vW(n,i,e){return new As(n,i,un.RegExpBody,0,e)}function CW(n,i,e){return new As(n,i,un.RegExpFlags,0,e)}var $g=new As(-1,-1,un.Character,0,""),AT=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(i){this.input=i,this.length=i.length,this.advance()}scan(){let i=this.scanToken();for(;i!==null;)this.tokens.push(i),i=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?Gr:this.input.charCodeAt(this.index)}scanToken(){let i=this.input,e=this.length,t=this.peek,o=this.index;for(;t<=nF;)if(++o>=e){t=Gr;break}else t=i.charCodeAt(o);if(this.peek=t,this.index=o,o>=e)return null;if(G5(t))return this.scanIdentifier();if(Xs(t))return this.scanNumber(o);let r=o;switch(t){case yp:return this.advance(),Xs(this.peek)?this.scanNumber(r):this.peek!==yp?jg(r,this.index,yp):(this.advance(),this.peek===yp?(this.advance(),Xd(r,this.index,"...")):this.error(`Unexpected character [${String.fromCharCode(t)}]`,0));case Va:case Cr:case bc:case _d:case va:case _c:case es:return this.scanCharacter(r,t);case Ys:return this.scanOpenBrace(r,t);case Ra:return this.scanCloseBrace(r,t);case V_:case L_:return this.scanString();case lT:return this.advance(),this.scanTemplateLiteralPart(r);case iF:return this.scanPrivateIdentifier();case oF:return this.scanComplexOperator(r,"+",Hr,"=");case w1:return this.scanComplexOperator(r,"-",Hr,"=");case Qs:return this.isStartOfRegex()?this.scanRegex(o):this.scanComplexOperator(r,"/",Hr,"=");case cH:return this.scanComplexOperator(r,"%",Hr,"=");case hH:return this.scanOperator(r,"^");case m5:return this.scanStar(r);case p5:return this.scanQuestion(r);case _h:case Ss:return this.scanComplexOperator(r,String.fromCharCode(t),Hr,"=");case sT:return this.scanComplexOperator(r,"!",Hr,"=",Hr,"=");case Hr:return this.scanEquals(r);case S1:return this.scanComplexOperator(r,"&",S1,"&",Hr,"=");case u5:return this.scanComplexOperator(r,"|",u5,"|",Hr,"=");case pF:for(;B_(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(t)}]`,0)}scanCharacter(i,e){return this.advance(),jg(i,this.index,e)}scanOperator(i,e){return this.advance(),Xd(i,this.index,e)}scanOpenBrace(i,e){return this.braceStack.push("expression"),this.advance(),jg(i,this.index,e)}scanCloseBrace(i,e){return this.advance(),this.braceStack.pop()==="interpolation"?(this.tokens.push(jg(i,this.index,Ra)),this.scanTemplateLiteralPart(this.index)):jg(i,this.index,e)}scanComplexOperator(i,e,t,o,r,a){this.advance();let c=e;return this.peek==t&&(this.advance(),c+=o),r!=null&&this.peek==r&&(this.advance(),c+=a),Xd(i,this.index,c)}scanEquals(i){this.advance();let e="=";if(this.peek===Hr)this.advance(),e+="=";else if(this.peek===Ss)return this.advance(),e+=">",Xd(i,this.index,e);return this.peek===Hr&&(this.advance(),e+="="),Xd(i,this.index,e)}scanIdentifier(){let i=this.index;for(this.advance();W5(this.peek);)this.advance();let e=this.input.substring(i,this.index);return pW.indexOf(e)>-1?fW(i,this.index,e):uW(i,this.index,e)}scanPrivateIdentifier(){let i=this.index;if(this.advance(),!G5(this.peek))return this.error("Invalid character [#]",-1);for(;W5(this.peek);)this.advance();let e=this.input.substring(i,this.index);return hW(i,this.index,e)}scanNumber(i){let e=this.index===i,t=!1;for(this.advance();;){if(!Xs(this.peek))if(this.peek===_m){if(!Xs(this.input.charCodeAt(this.index-1))||!Xs(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);t=!0}else if(this.peek===yp)e=!1;else if(bW(this.peek)){if(this.advance(),xW(this.peek)&&this.advance(),!Xs(this.peek))return this.error("Invalid exponent",-1);e=!1}else break;this.advance()}let o=this.input.substring(i,this.index);t&&(o=o.replace(/_/g,""));let r=e?SW(o):parseFloat(o);return gW(i,this.index,r)}scanString(){let i=this.index,e=this.peek;this.advance();let t="",o=this.index,r=this.input;for(;this.peek!=e;)if(this.peek==Np){let c=this.scanStringBackslash(t,o);if(typeof c!="string")return c;t=c,o=this.index}else{if(this.peek==Gr)return this.error("Unterminated quote",0);this.advance()}let a=r.substring(o,this.index);return this.advance(),new n_(i,this.index,t+a,Rp.Plain)}scanQuestion(i){this.advance();let e="?";return this.peek===p5?(e+="?",this.advance(),this.peek===Hr&&(e+="=",this.advance())):this.peek===yp&&(e+=".",this.advance()),Xd(i,this.index,e)}scanTemplateLiteralPart(i){let e="",t=this.index;for(;this.peek!==lT;)if(this.peek===Np){let r=this.scanStringBackslash(e,t);if(typeof r!="string")return r;e=r,t=this.index}else if(this.peek===ob){let r=this.index;if(this.advance(),this.peek===Ys)return this.braceStack.push("interpolation"),this.tokens.push(new n_(i,r,e+this.input.substring(t,r),Rp.TemplateLiteralPart)),this.advance(),Xd(r,this.index,this.input.substring(r,this.index))}else{if(this.peek===Gr)return this.error("Unterminated template literal",0);this.advance()}let o=this.input.substring(t,this.index);return this.advance(),new n_(i,this.index,e+o,Rp.TemplateLiteralEnd)}error(i,e){let t=this.index+e;return _W(t,this.index,`Lexer Error: ${i} at column ${t} in expression [${this.input}]`)}scanStringBackslash(i,e){i+=this.input.substring(e,this.index);let t;if(this.advance(),this.peek===cF){let o=this.input.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(o))t=parseInt(o,16);else return this.error(`Invalid unicode escape [\\u${o}]`,0);for(let r=0;r<5;r++)this.advance()}else t=yW(this.peek),this.advance();return i+=String.fromCharCode(t),i}scanStar(i){this.advance();let e="*";return this.peek===m5?(e+="*",this.advance(),this.peek===Hr&&(e+="=",this.advance())):this.peek===Hr&&(e+="=",this.advance()),Xd(i,this.index,e)}isStartOfRegex(){if(this.tokens.length===0)return!0;let i=this.tokens[this.tokens.length-1];if(i.isOperator("!")){let e=this.tokens.length>1?this.tokens[this.tokens.length-2]:null;return e===null||e.type!==un.Identifier&&!e.isCharacter(Cr)&&!e.isCharacter(_d)}return i.type===un.Operator||i.isCharacter(Va)||i.isCharacter(bc)||i.isCharacter(va)||i.isCharacter(_c)}scanRegex(i){this.advance();let e=this.index,t=!1,o=!1;for(;;){let p=this.peek;if(p===Gr)return this.error("Unterminated regular expression",0);if(t)t=!1;else if(p===Np)t=!0;else if(p===bc)o=!0;else if(p===_d)o=!1;else if(p===Qs&&!o)break;this.advance()}let r=this.input.substring(e,this.index);this.advance();let a=vW(i,this.index,r),c=this.scanRegexFlags(this.index);return c!==null?(this.tokens.push(a),c):a}scanRegexFlags(i){if(!mm(this.peek))return null;for(;mm(this.peek);)this.advance();return CW(i,this.index,this.input.substring(i,this.index))}};function G5(n){return Qp<=n&&n<=l0||gm<=n&&n<=Bh||n==_m||n==ob}function W5(n){return mm(n)||Xs(n)||n==_m||n==ob}function bW(n){return n==gH||n==mH}function xW(n){return n==w1||n==oF}function yW(n){switch(n){case aF:return Op;case yE:return tF;case sF:return bE;case lF:return CE;case dF:return eF;default:return n}}function SW(n){let i=parseInt(n);if(isNaN(i))throw new Error("Invalid integer literal when parsing "+n);return i}var OT=class{strings;expressions;offsets;constructor(i,e,t){this.strings=i,this.expressions=e,this.offsets=t}},NT=class{templateBindings;warnings;errors;constructor(i,e,t){this.templateBindings=i,this.warnings=e,this.errors=t}};function em(n){return n.start.toString()||"(unknown)"}var G1=class{_lexer;_supportsDirectPipeReferences;constructor(i,e=!1){this._lexer=i,this._supportsDirectPipeReferences=e}parseAction(i,e,t){let o=[];this._checkNoInterpolation(o,i,e);let{stripped:r}=this._stripComments(i),a=this._lexer.tokenize(r),c=new kp(i,e,t,a,1,o,0,this._supportsDirectPipeReferences).parseChain();return new ts(c,i,em(e),t,o)}parseBinding(i,e,t){let o=[],r=this._parseBindingAst(i,e,t,o);return new ts(r,i,em(e),t,o)}checkSimpleExpression(i){let e=new FT;return i.visit(e),e.errors}parseSimpleBinding(i,e,t){let o=[],r=this._parseBindingAst(i,e,t,o),a=this.checkSimpleExpression(r);return a.length>0&&o.push(hh(`Host binding expression cannot contain ${a.join(" ")}`,i,"",e)),new ts(r,i,em(e),t,o)}_parseBindingAst(i,e,t,o){this._checkNoInterpolation(o,i,e);let{stripped:r}=this._stripComments(i),a=this._lexer.tokenize(r);return new kp(i,e,t,a,0,o,0,this._supportsDirectPipeReferences).parseChain()}parseTemplateBindings(i,e,t,o,r){let a=this._lexer.tokenize(e),c=[];return new kp(e,t,r,a,0,c,0,this._supportsDirectPipeReferences).parseTemplateBindings({source:i,span:new Ms(o,o+i.length)})}parseInterpolation(i,e,t,o){let r=[],{strings:a,expressions:c,offsets:p}=this.splitInterpolation(i,e,r,o);if(c.length===0)return null;let u=[];for(let h=0;hh.text),u,i,em(e),t,r)}parseInterpolationExpression(i,e,t){let{stripped:o}=this._stripComments(i),r=this._lexer.tokenize(o),a=[],c=new kp(i,e,t,r,0,a,0,this._supportsDirectPipeReferences).parseChain(),p=["",""];return this.createInterpolationAst(p,[c],i,em(e),t,a)}createInterpolationAst(i,e,t,o,r,a){let c=new Up(0,t.length),p=new a0(c,c.toAbsolute(r),i,e);return new ts(p,t,o,r,a)}splitInterpolation(i,e,t,o){let r=[],a=[],c=[],p=o?wW(o):null,u=0,h=!1,_=!1,S="{{",x="}}";for(;u-1)break;o>-1&&r>-1&&i.push(hh("Got interpolation ({{}}) where expression was expected",e,`at column ${o} in`,t))}_getInterpolationEndIndex(i,e,t){for(let o of this._forEachUnquotedChar(i,t)){if(i.startsWith(e,o))return o;if(i.startsWith("//",o))return i.indexOf(e,o)}return-1}*_forEachUnquotedChar(i,e){let t=null,o=0;for(let r=e;r=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(i,e){let t=this.currentEndIndex;if(e!==void 0&&e>this.currentEndIndex&&(t=e),i>t){let o=t;t=i,i=o}return new Up(i,t)}sourceSpan(i,e){let t=`${i}@${this.inputIndex}:${e}`;return this.sourceSpanCache.has(t)||this.sourceSpanCache.set(t,this.span(i,e).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(t)}advance(){this.index++}withContext(i,e){this.context|=i;let t=e();return this.context^=i,t}consumeOptionalCharacter(i){return this.next.isCharacter(i)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(i){this.consumeOptionalCharacter(i)||this.error(`Missing expected ${String.fromCharCode(i)}`)}consumeOptionalOperator(i){return this.next.isOperator(i)?(this.advance(),!0):!1}isAssignmentOperator(i){return i.type===un.Operator&&Na.isAssignmentOperation(i.strValue)}expectOperator(i){this.consumeOptionalOperator(i)||this.error(`Missing expected operator ${i}`)}prettyPrintToken(i){return i===$g?"end of input":`token ${i}`}expectIdentifierOrKeyword(){let i=this.next;return!i.isIdentifier()&&!i.isKeyword()?(i.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(i,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(i)}, expected identifier or keyword`),null):(this.advance(),i.toString())}expectIdentifierOrKeywordOrString(){let i=this.next;return!i.isIdentifier()&&!i.isKeyword()&&!i.isString()?(i.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(i,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(i)}, expected identifier, keyword, or string`),""):(this.advance(),i.toString())}parseChain(){let i=[],e=this.inputIndex;for(;this.index=gm&&u<=Bh?HC.ReferencedDirectly:HC.ReferencedByName}else p=HC.ReferencedByName;e=new l1(this.span(i),this.sourceSpan(i,a),e,o,c,p,r)}while(this.consumeOptionalOperator("|"))}return e}parseExpression(){return this.parseConditional()}parseConditional(){let i=this.inputIndex,e=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let t=this.parsePipe(),o;if(this.consumeOptionalCharacter(_c))o=this.parsePipe();else{let r=this.inputIndex,a=this.input.substring(i,r);this.error(`Conditional expression ${a} requires all 3 expressions`),o=new _a(this.span(i),this.sourceSpan(i))}return new s1(this.span(i),this.sourceSpan(i),e,t,o)}else return e}parseLogicalOr(){let i=this.inputIndex,e=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let t=this.parseLogicalAnd();e=new Na(this.span(i),this.sourceSpan(i),"||",e,t)}return e}parseLogicalAnd(){let i=this.inputIndex,e=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let t=this.parseNullishCoalescing();e=new Na(this.span(i),this.sourceSpan(i),"&&",e,t)}return e}parseNullishCoalescing(){let i=this.inputIndex,e=this.parseEquality();for(;this.consumeOptionalOperator("??");){let t=this.parseEquality();e=new Na(this.span(i),this.sourceSpan(i),"??",e,t)}return e}parseEquality(){let i=this.inputIndex,e=this.parseRelational();for(;this.next.type==un.Operator;){let t=this.next.strValue;switch(t){case"==":case"===":case"!=":case"!==":this.advance();let o=this.parseRelational();e=new Na(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseRelational(){let i=this.inputIndex,e=this.parseAdditive();for(;this.next.type==un.Operator||this.next.isKeywordIn()||this.next.isKeywordInstanceOf();){let t=this.next.strValue;switch(t){case"<":case">":case"<=":case">=":case"in":case"instanceof":this.advance();let o=this.parseAdditive();e=new Na(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseAdditive(){let i=this.inputIndex,e=this.parseMultiplicative();for(;this.next.type==un.Operator;){let t=this.next.strValue;switch(t){case"+":case"-":this.advance();let o=this.parseMultiplicative();e=new Na(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseMultiplicative(){let i=this.inputIndex,e=this.parseExponentiation();for(;this.next.type==un.Operator;){let t=this.next.strValue;switch(t){case"*":case"%":case"/":this.advance();let o=this.parseExponentiation();e=new Na(this.span(i),this.sourceSpan(i),t,e,o);continue}break}return e}parseExponentiation(){let i=this.inputIndex,e=this.parsePrefix();for(;this.next.type==un.Operator&&this.next.strValue==="**";){(e instanceof gh||e instanceof b_||e instanceof x_||e instanceof y_)&&this.error("Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence"),this.advance();let t=this.parseExponentiation();e=new Na(this.span(i),this.sourceSpan(i),"**",e,t)}return e}parsePrefix(){if(this.next.type==un.Operator){let i=this.inputIndex,e=this.next.strValue,t;switch(e){case"+":return this.advance(),t=this.parsePrefix(),gh.createPlus(this.span(i),this.sourceSpan(i),t);case"-":return this.advance(),t=this.parsePrefix(),gh.createMinus(this.span(i),this.sourceSpan(i),t);case"!":return this.advance(),t=this.parsePrefix(),new b_(this.span(i),this.sourceSpan(i),t)}}else if(this.next.isKeywordTypeof()){let i=this.inputIndex;this.advance();let e=this.parsePrefix();return new x_(this.span(i),this.sourceSpan(i),e)}else if(this.next.isKeywordVoid()){let i=this.inputIndex;this.advance();let e=this.parsePrefix();return new y_(this.span(i),this.sourceSpan(i),e)}return this.parseCallChain()}parseCallChain(){let i=this.inputIndex,e=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(yp))e=this.parseAccessMember(e,i,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(Va)?e=this.parseCall(e,i,!0):e=this.consumeOptionalCharacter(bc)?this.parseKeyedReadOrWrite(e,i,!0):this.parseAccessMember(e,i,!0);else if(this.consumeOptionalCharacter(bc))e=this.parseKeyedReadOrWrite(e,i,!1);else if(this.consumeOptionalCharacter(Va))e=this.parseCall(e,i,!1);else if(this.consumeOptionalOperator("!"))e=new S_(this.span(i),this.sourceSpan(i),e);else if(this.next.isTemplateLiteralEnd())e=this.parseNoInterpolationTaggedTemplateLiteral(e,i);else if(this.next.isTemplateLiteralPart())e=this.parseTaggedTemplateLiteral(e,i);else return e}parsePrimary(){let i=this.inputIndex;if(this.isArrowFunction())return this.parseArrowFunction(i);if(this.consumeOptionalCharacter(Va)){this.rparensExpected++;let e=this.parsePipe();return this.consumeOptionalCharacter(Cr)||(this.error("Missing closing parentheses"),this.consumeOptionalCharacter(Cr)),this.rparensExpected--,new k_(this.span(i),this.sourceSpan(i),e)}else{if(this.next.isKeywordNull())return this.advance(),new Ja(this.span(i),this.sourceSpan(i),null);if(this.next.isKeywordUndefined())return this.advance(),new Ja(this.span(i),this.sourceSpan(i),void 0);if(this.next.isKeywordTrue())return this.advance(),new Ja(this.span(i),this.sourceSpan(i),!0);if(this.next.isKeywordFalse())return this.advance(),new Ja(this.span(i),this.sourceSpan(i),!1);if(this.next.isKeywordIn())return this.advance(),new Ja(this.span(i),this.sourceSpan(i),"in");if(this.next.isKeywordThis())return this.advance(),new g_(this.span(i),this.sourceSpan(i));if(this.consumeOptionalCharacter(bc))return this.parseLiteralArray(i);if(this.next.isCharacter(Ys))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new Mc(this.span(i),this.sourceSpan(i)),i,!1);if(this.next.isNumber()){let e=this.next.toNumber();return this.advance(),new Ja(this.span(i),this.sourceSpan(i),e)}else{if(this.next.isTemplateLiteralEnd())return this.parseNoInterpolationTemplateLiteral();if(this.next.isTemplateLiteralPart())return this.parseTemplateLiteral();if(this.next.isString()&&this.next.kind===Rp.Plain){let e=this.next.toString();return this.advance(),new Ja(this.span(i),this.sourceSpan(i),e)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new _a(this.span(i),this.sourceSpan(i))):this.next.isRegExpBody()?this.parseRegularExpressionLiteral():this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new _a(this.span(i),this.sourceSpan(i))):(this.error(`Unexpected token ${this.next}`),new _a(this.span(i),this.sourceSpan(i)))}}}parseLiteralArray(i){this.rbracketsExpected++;let e=[];do if(this.next.isOperator("..."))e.push(this.parseSpreadElement());else if(!this.next.isCharacter(_d))e.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(va));return this.rbracketsExpected--,this.expectCharacter(_d),new C_(this.span(i),this.sourceSpan(i),e)}parseLiteralMap(){let i=[],e=[],t=this.inputIndex;if(this.expectCharacter(Ys),!this.consumeOptionalCharacter(Ra)){this.rbracesExpected++;do{let o=this.inputIndex;if(this.next.isOperator("...")){this.advance(),i.push({kind:"spread",span:this.span(o),sourceSpan:this.sourceSpan(o)}),e.push(this.parsePipe());continue}let r=this.next.isString(),a=this.expectIdentifierOrKeywordOrString(),c=this.span(o),p=this.sourceSpan(o),u={kind:"property",key:a,quoted:r,span:c,sourceSpan:p};i.push(u),r?(this.expectCharacter(_c),e.push(this.parsePipe())):this.consumeOptionalCharacter(_c)?e.push(this.parsePipe()):(u.isShorthandInitialized=!0,e.push(new Cc(c,p,p,new Mc(c,p),a)))}while(this.consumeOptionalCharacter(va)&&!this.next.isCharacter(Ra));this.rbracesExpected--,this.expectCharacter(Ra)}return new Wp(this.span(t),this.sourceSpan(t),i,e)}parseAccessMember(i,e,t){let o=this.inputIndex,r=this.withContext(Yg.Writable,()=>{let c=this.expectIdentifierOrKeyword()??"";return c.length===0&&this.error("Expected identifier for property access",i.span.end),c}),a=this.sourceSpan(o);if(t)return this.isAssignmentOperator(this.next)?(this.advance(),this.error("The '?.' operator cannot be used in the assignment"),new _a(this.span(e),this.sourceSpan(e))):new __(this.span(e),this.sourceSpan(e),a,i,r);if(this.isAssignmentOperator(this.next)){let c=this.next.strValue;if(!(this.parseFlags&1))return this.advance(),this.error("Bindings cannot contain assignments"),new _a(this.span(e),this.sourceSpan(e));let p=new Cc(this.span(e),this.sourceSpan(e),a,i,r);this.advance();let u=this.parseConditional();return new Na(this.span(e),this.sourceSpan(e),c,p,u)}else return new Cc(this.span(e),this.sourceSpan(e),a,i,r)}parseCall(i,e,t){let o=this.inputIndex;this.rparensExpected++;let r=this.parseCallArguments(),a=this.span(o,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(Cr),this.rparensExpected--;let c=this.span(e),p=this.sourceSpan(e);return t?new d1(c,p,i,r,a):new wh(c,p,i,r,a)}parseCallArguments(){if(this.next.isCharacter(Cr))return[];let i=[];do i.push(this.next.isOperator("...")?this.parseSpreadElement():this.parsePipe());while(this.consumeOptionalCharacter(va));return i}parseSpreadElement(){this.next.isOperator("...")||this.error("Spread element must start with '...' operator");let i=this.inputIndex;this.advance();let e=this.parsePipe(),t=this.span(i),o=this.sourceSpan(i);return new c1(t,o,e)}expectTemplateBindingKey(){let i="",e=!1,t=this.currentAbsoluteOffset;do i+=this.expectIdentifierOrKeywordOrString(),e=this.consumeOptionalOperator("-"),e&&(i+="-");while(e);return{source:i,span:new Ms(t,t+i.length)}}parseTemplateBindings(i){let e=[];for(e.push(...this.parseDirectiveKeywordBindings(i));this.index{this.rbracketsExpected++;let o=this.parsePipe();if(o instanceof _a&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(_d),this.isAssignmentOperator(this.next)){let r=this.next.strValue;if(t)this.advance(),this.error("The '?.' operator cannot be used in the assignment");else{let a=new Gp(this.span(e),this.sourceSpan(e),i,o);this.advance();let c=this.parseConditional();return new Na(this.span(e),this.sourceSpan(e),r,a,c)}}else return t?new v_(this.span(e),this.sourceSpan(e),i,o):new Gp(this.span(e),this.sourceSpan(e),i,o);return new _a(this.span(e),this.sourceSpan(e))})}parseDirectiveKeywordBindings(i){let e=[];this.consumeOptionalCharacter(_c);let t=this.getDirectiveBoundTarget(),o=this.currentAbsoluteOffset,r=this.parseAsBinding(i);r||(this.consumeStatementTerminator(),o=this.currentAbsoluteOffset);let a=new Ms(i.span.start,o);return e.push(new qk(a,i,t)),r&&e.push(r),e}getDirectiveBoundTarget(){if(this.next===$g||this.peekKeywordAs()||this.peekKeywordLet())return null;let i=this.parsePipe(),{start:e,end:t}=i.span,o=this.input.substring(e,t);return new ts(i,o,em(this.parseSourceSpan),this.absoluteOffset+e,this.errors)}parseAsBinding(i){if(!this.peekKeywordAs())return null;this.advance();let e=this.expectTemplateBindingKey();this.consumeStatementTerminator();let t=new Ms(i.span.start,this.currentAbsoluteOffset);return new T_(t,e,i)}parseLetBinding(){if(!this.peekKeywordLet())return null;let i=this.currentAbsoluteOffset;this.advance();let e=this.expectTemplateBindingKey(),t=null;this.consumeOptionalOperator("=")&&(t=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let o=new Ms(i,this.currentAbsoluteOffset);return new T_(o,e,t)}parseNoInterpolationTaggedTemplateLiteral(i,e){let t=this.parseNoInterpolationTemplateLiteral();return new w_(this.span(e),this.sourceSpan(e),i,t)}parseNoInterpolationTemplateLiteral(){let i=this.next.strValue,e=this.inputIndex;this.advance();let t=this.span(e),o=this.sourceSpan(e);return new M_(t,o,[new m1(t,o,i)],[])}parseTaggedTemplateLiteral(i,e){let t=this.parseTemplateLiteral();return new w_(this.span(e),this.sourceSpan(e),i,t)}parseTemplateLiteral(){let i=[],e=[],t=this.inputIndex;for(;this.next!==$g;){let o=this.next;if(o.isTemplateLiteralPart()||o.isTemplateLiteralEnd()){let r=this.inputIndex;if(this.advance(),i.push(new m1(this.span(r),this.sourceSpan(r),o.strValue)),o.isTemplateLiteralEnd())break}else if(o.isTemplateLiteralInterpolationStart()){this.advance(),this.rbracesExpected++;let r=this.parsePipe();r instanceof _a?this.error("Template literal interpolation cannot be empty"):e.push(r),this.rbracesExpected--}else this.advance()}return new M_(this.span(t),this.sourceSpan(t),i,e)}parseRegularExpressionLiteral(){let i=this.next;if(this.advance(),!i.isRegExpBody())return new _a(this.span(this.inputIndex),this.sourceSpan(this.inputIndex));let e=null;if(this.next.isRegExpFlags()){e=this.next,this.advance();let r=new Set;for(let a=0;a`"${p}"`).join(", "),e.index+a)}}let t=i.index,o=e?e.end:i.end;return new u1(this.span(t,o),this.sourceSpan(t,o),i.strValue,e?e.strValue:null)}parseArrowFunction(i){let e;if(this.next.isIdentifier()){let o=this.next;this.advance(),e=[this.getArrowFunctionIdentifierArg(o)]}else this.next.isCharacter(Va)?(this.rparensExpected++,this.advance(),e=this.parseArrowFunctionParameters(),this.rparensExpected--):(e=[],this.error(`Unexpected token ${this.next}`));this.expectOperator("=>");let t;if(this.next.isCharacter(Ys))this.error("Multi-line arrow functions are not supported. If you meant to return an object literal, wrap it with parentheses."),t=new _a(this.span(i),this.sourceSpan(i));else{let o=this.parseFlags;this.parseFlags=1,t=this.parseExpression(),this.parseFlags=o}return new p1(this.span(i),this.sourceSpan(i),e,t)}parseArrowFunctionParameters(){let i=[];if(!this.consumeOptionalCharacter(Cr))for(;this.next!==$g;)if(this.next.isIdentifier()){let e=this.next;if(this.advance(),i.push(this.getArrowFunctionIdentifierArg(e)),this.consumeOptionalCharacter(Cr))break;this.expectCharacter(va)}else{this.error(`Unexpected token ${this.next}`);break}return i}getArrowFunctionIdentifierArg(i){return new Wk(i.strValue,this.span(i.index),this.sourceSpan(i.index))}isArrowFunction(){let i=this.index,e=this.tokens;if(i>e.length-2)return!1;if(e[i].isIdentifier()&&e[i+1].isOperator("=>"))return!0;if(e[i].isCharacter(Va)){let t=i+1;for(t;t")}return!1}consumeStatementTerminator(){this.consumeOptionalCharacter(es)||this.consumeOptionalCharacter(va)}error(i,e=this.index){this.errors.push(hh(i,this.input,this.getErrorLocationText(e),this.parseSourceSpan)),this.skip()}getErrorLocationText(i){return i0&&(e=` ${e} `);let o=em(t),r=`Parser Error: ${n}${e}[${i}] in ${o}`;return new sn(t,r)}var FT=class extends Mh{errors=[];visitPipe(){this.errors.push("pipes")}};function wW(n){let i=new Map,e=0,t=0,o=0;for(;oc+p.length,0);t+=a,e+=a}i.set(t,e),o++}return i}function MW(n){return n.visit(new RT)}var RT=class{visitUnary(i,e){return`${i.operator}${i.expr.visit(this,e)}`}visitBinary(i,e){return`${i.left.visit(this,e)} ${i.operation} ${i.right.visit(this,e)}`}visitChain(i,e){return i.expressions.map(t=>t.visit(this,e)).join("; ")}visitConditional(i,e){return`${i.condition.visit(this,e)} ? ${i.trueExp.visit(this,e)} : ${i.falseExp.visit(this,e)}`}visitThisReceiver(){return"this"}visitImplicitReceiver(){return""}visitInterpolation(i,e){return TW(i.strings,i.expressions.map(t=>t.visit(this,e))).join("")}visitKeyedRead(i,e){return`${i.receiver.visit(this,e)}[${i.key.visit(this,e)}]`}visitLiteralArray(i,e){return`[${i.expressions.map(t=>t.visit(this,e)).join(", ")}]`}visitLiteralMap(i,e){return`{${kW(i.keys.map(t=>t.kind==="spread"?"...":t.quoted?`'${t.key}'`:t.key),i.values.map(t=>t.visit(this,e))).map(([t,o])=>`${t}: ${o}`).join(", ")}}`}visitLiteralPrimitive(i){if(i.value===null)return"null";switch(typeof i.value){case"number":case"boolean":return i.value.toString();case"undefined":return"undefined";case"string":return`'${i.value.replace(/'/g,"\\'")}'`;default:throw new Error(`Unsupported primitive type: ${i.value}`)}}visitPipe(i,e){return`${i.exp.visit(this,e)} | ${i.name}`}visitPrefixNot(i,e){return`!${i.expression.visit(this,e)}`}visitNonNullAssert(i,e){return`${i.expression.visit(this,e)}!`}visitPropertyRead(i,e){return i.receiver instanceof Mc||i.receiver instanceof g_?i.name:`${i.receiver.visit(this,e)}.${i.name}`}visitSafePropertyRead(i,e){return`${i.receiver.visit(this,e)}?.${i.name}`}visitSafeKeyedRead(i,e){return`${i.receiver.visit(this,e)}?.[${i.key.visit(this,e)}]`}visitCall(i,e){return`${i.receiver.visit(this,e)}(${i.args.map(t=>t.visit(this,e)).join(", ")})`}visitSafeCall(i,e){return`${i.receiver.visit(this,e)}?.(${i.args.map(t=>t.visit(this,e)).join(", ")})`}visitTypeofExpression(i,e){return`typeof ${i.expression.visit(this,e)}`}visitVoidExpression(i,e){return`void ${i.expression.visit(this,e)}`}visitRegularExpressionLiteral(i,e){return`/${i.body}/${i.flags||""}`}visitArrowFunction(i,e){let t;return i.parameters.length===1?t=i.parameters[0].name:t=`(${i.parameters.map(o=>o.name).join(", ")})`,`${t} => ${i.body.visit(this,e)}`}visitASTWithSource(i,e){return i.ast.visit(this,e)}visitTemplateLiteral(i,e){let t="";for(let o=0;o[e,i[t]])}function TW(n,i){let e=[];for(let t=0;t(n.set(i,e),n),new Map),Rh=class extends LT{_schema=new Map;_eventSchema=new Map;constructor(){super(),AW.forEach(i=>{let e=new Map,t=new Set,[o,r]=i.split("|"),a=r.split(","),[c,p]=o.split("^");c.split(",").forEach(h=>{this._schema.set(h.toLowerCase(),e),this._eventSchema.set(h.toLowerCase(),t)});let u=p&&this._schema.get(p.toLowerCase());if(u){for(let[h,_]of u)e.set(h,_);for(let h of this._eventSchema.get(p.toLowerCase()))t.add(h)}a.forEach(h=>{if(h.length>0)switch(h[0]){case"*":t.add(h.substring(1));break;case"!":e.set(h.substring(1),EW);break;case"#":e.set(h.substring(1),DW);break;case"%":e.set(h.substring(1),IW);break;default:e.set(h,PW)}})})}hasProperty(i,e,t){if(t.some(r=>r.name===Q4.name))return!0;if(i.indexOf("-")>-1){if(a5(i)||Xk(i))return!1;if(t.some(r=>r.name===q4.name))return!0}return(this._schema.get(i.toLowerCase())||this._schema.get("unknown")).has(e)}hasElement(i,e){return e.some(t=>t.name===Q4.name)||i.indexOf("-")>-1&&(a5(i)||Xk(i)||e.some(t=>t.name===q4.name))?!0:this._schema.has(i.toLowerCase())}securityContext(i,e,t){t&&(e=this.getMappedPropName(e)),i=i.toLowerCase(),e=e.toLowerCase();let o=Q5()[i+"|"+e];return o||(o=Q5()["*|"+e],o||eo.NONE)}getMappedPropName(i){return BF.get(i)??i}getDefaultComponentElementName(){return"ng-component"}validateProperty(i){return i.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${i}' is disallowed for security reasons, please use (${i.slice(2)})=... +If '${i}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(i){return i.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${i}' is disallowed for security reasons, please use (${i.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(i){let e=this._schema.get(i.toLowerCase())||this._schema.get("unknown");return Array.from(e.keys()).map(t=>OW.get(t)??t)}allKnownEventsOfElement(i){return Array.from(this._eventSchema.get(i.toLowerCase())??[])}normalizeAnimationStyleProperty(i){return D$(i)}normalizeAnimationStyleValue(i,e,t){let o="",r=t.toString().trim(),a=null;if(NW(i)&&t!==0&&t!=="0")if(typeof t=="number")o="px";else{let c=t.match(/^[+-]?[\d\.]+([a-z]*)$/);c&&c[1].length==0&&(a=`Please provide a CSS unit value for ${e}:${t}`)}return{error:a,value:r+o}}};function NW(n){switch(n){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var Kn=class{closedByChildren={};contentType;closedByParent=!1;implicitNamespacePrefix;isVoid;ignoreFirstLf;canSelfClose;preventNamespaceInheritance;constructor({closedByChildren:i,implicitNamespacePrefix:e,contentType:t=gc.PARSABLE_DATA,closedByParent:o=!1,isVoid:r=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:c=!1,canSelfClose:p=!1}={}){i&&i.length>0&&i.forEach(u=>this.closedByChildren[u]=!0),this.isVoid=r,this.closedByParent=o||r,this.implicitNamespacePrefix=e||null,this.contentType=t,this.ignoreFirstLf=a,this.preventNamespaceInheritance=c,this.canSelfClose=p??r}isClosedByChild(i){return this.isVoid||i.toLowerCase()in this.closedByChildren}getContentType(i){return typeof this.contentType=="object"?(i===void 0?void 0:this.contentType[i])??this.contentType.default:this.contentType}},X5,ah;function VT(n){return ah||(X5=new Kn({canSelfClose:!0}),ah=Object.assign(Object.create(null),{base:new Kn({isVoid:!0}),meta:new Kn({isVoid:!0}),area:new Kn({isVoid:!0}),embed:new Kn({isVoid:!0}),link:new Kn({isVoid:!0}),img:new Kn({isVoid:!0}),input:new Kn({isVoid:!0}),param:new Kn({isVoid:!0}),hr:new Kn({isVoid:!0}),br:new Kn({isVoid:!0}),source:new Kn({isVoid:!0}),track:new Kn({isVoid:!0}),wbr:new Kn({isVoid:!0}),p:new Kn({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new Kn({closedByChildren:["tbody","tfoot"]}),tbody:new Kn({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new Kn({closedByChildren:["tbody"],closedByParent:!0}),tr:new Kn({closedByChildren:["tr"],closedByParent:!0}),td:new Kn({closedByChildren:["td","th"],closedByParent:!0}),th:new Kn({closedByChildren:["td","th"],closedByParent:!0}),col:new Kn({isVoid:!0}),svg:new Kn({implicitNamespacePrefix:"svg"}),foreignObject:new Kn({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new Kn({implicitNamespacePrefix:"math"}),li:new Kn({closedByChildren:["li"],closedByParent:!0}),dt:new Kn({closedByChildren:["dt","dd"]}),dd:new Kn({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new Kn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new Kn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new Kn({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new Kn({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new Kn({closedByChildren:["optgroup"],closedByParent:!0}),option:new Kn({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new Kn({ignoreFirstLf:!0}),listing:new Kn({ignoreFirstLf:!0}),style:new Kn({contentType:gc.RAW_TEXT}),script:new Kn({contentType:gc.RAW_TEXT}),title:new Kn({contentType:{default:gc.ESCAPABLE_RAW_TEXT,svg:gc.PARSABLE_DATA}}),textarea:new Kn({contentType:gc.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Rh().allKnownElementNames().forEach(i=>{!ah[i]&&Kk(i)===null&&(ah[i]=new Kn({canSelfClose:!1}))})),ah[n]??ah[n.toLowerCase()]??X5}var K5={A:"LINK",B:"BOLD_TEXT",BR:"LINE_BREAK",EM:"EMPHASISED_TEXT",H1:"HEADING_LEVEL1",H2:"HEADING_LEVEL2",H3:"HEADING_LEVEL3",H4:"HEADING_LEVEL4",H5:"HEADING_LEVEL5",H6:"HEADING_LEVEL6",HR:"HORIZONTAL_RULE",I:"ITALIC_TEXT",LI:"LIST_ITEM",LINK:"MEDIA_LINK",OL:"ORDERED_LIST",P:"PARAGRAPH",Q:"QUOTATION",S:"STRIKETHROUGH_TEXT",SMALL:"SMALL_TEXT",SUB:"SUBSTRIPT",SUP:"SUPERSCRIPT",TBODY:"TABLE_BODY",TD:"TABLE_CELL",TFOOT:"TABLE_FOOTER",TH:"TABLE_HEADER_CELL",THEAD:"TABLE_HEADER",TR:"TABLE_ROW",TT:"MONOSPACED_TEXT",U:"UNDERLINED_TEXT",UL:"UNORDERED_LIST"},BT=class{_placeHolderNameCounts={};_signatureToName={};getStartTagPlaceholderName(i,e,t){let o=this._hashTag(i,e,t);if(this._signatureToName[o])return this._signatureToName[o];let r=i.toUpperCase(),a=K5[r]||`TAG_${r}`,c=this._generateUniqueName(t?a:`START_${a}`);return this._signatureToName[o]=c,c}getCloseTagPlaceholderName(i){let e=this._hashClosingTag(i);if(this._signatureToName[e])return this._signatureToName[e];let t=i.toUpperCase(),o=K5[t]||`TAG_${t}`,r=this._generateUniqueName(`CLOSE_${o}`);return this._signatureToName[e]=r,r}getPlaceholderName(i,e){let t=i.toUpperCase(),o=`PH: ${t}=${e}`;if(this._signatureToName[o])return this._signatureToName[o];let r=this._generateUniqueName(t);return this._signatureToName[o]=r,r}getUniquePlaceholder(i){return this._generateUniqueName(i.toUpperCase())}getStartBlockPlaceholderName(i,e){let t=this._hashBlock(i,e);if(this._signatureToName[t])return this._signatureToName[t];let o=this._generateUniqueName(`START_BLOCK_${this._toSnakeCase(i)}`);return this._signatureToName[t]=o,o}getCloseBlockPlaceholderName(i){let e=this._hashClosingBlock(i);if(this._signatureToName[e])return this._signatureToName[e];let t=this._generateUniqueName(`CLOSE_BLOCK_${this._toSnakeCase(i)}`);return this._signatureToName[e]=t,t}_hashTag(i,e,t){let o=`<${i}`,r=Object.keys(e).sort().map(c=>` ${c}=${e[c]}`).join(""),a=t?"/>":`>`;return o+r+a}_hashClosingTag(i){return this._hashTag(`/${i}`,{},!1)}_hashBlock(i,e){let t=e.length===0?"":` (${e.sort().join("; ")})`;return`@${i}${t} {}`}_hashClosingBlock(i){return this._hashBlock(`close_${i}`,[])}_toSnakeCase(i){return i.toUpperCase().replace(/[^A-Z0-9]/g,"_")}_generateUniqueName(i){if(!this._placeHolderNameCounts.hasOwnProperty(i))return this._placeHolderNameCounts[i]=1,i;let t=this._placeHolderNameCounts[i];return this._placeHolderNameCounts[i]=t+1,`${i}_${t}`}},FW=new G1(new e0);function RW(n,i){let e=new zT(FW,n,i);return(t,o,r,a,c)=>e.toI18nMessage(t,o,r,a,c)}function LW(n,i){return i}var zT=class{_expressionParser;_retainEmptyTokens;_preserveExpressionWhitespace;constructor(i,e,t){this._expressionParser=i,this._retainEmptyTokens=e,this._preserveExpressionWhitespace=t}toI18nMessage(i,e="",t="",o="",r){let a={isIcu:i.length==1&&i[0]instanceof Fp,icuDepth:0,placeholderRegistry:new BT,placeholderToContent:{},placeholderToMessage:{},visitNodeFn:r||LW},c=Co(this,i,a);return new za(c,a.placeholderToContent,a.placeholderToMessage,e,t,o)}visitElement(i,e){return this._visitElementLike(i,e)}visitComponent(i,e){return this._visitElementLike(i,e)}visitDirective(i,e){throw new Error("Unreachable code")}visitAttribute(i,e){let t=i.valueTokens===void 0||i.valueTokens.length===1?new Vg(i.value,i.valueSpan||i.sourceSpan):this._visitTextWithInterpolation(i.valueTokens,i.valueSpan||i.sourceSpan,e,i.i18n);return e.visitNodeFn(i,t)}visitText(i,e){let t=i.tokens.length===1?new Vg(i.value,i.sourceSpan):this._visitTextWithInterpolation(i.tokens,i.sourceSpan,e,i.i18n);return e.visitNodeFn(i,t)}visitComment(i,e){return null}visitExpansion(i,e){e.icuDepth++;let t={},o=new y1(i.switchValue,i.type,t,i.sourceSpan);if(i.cases.forEach(c=>{t[c.value]=new Cd(c.expression.map(p=>p.visit(this,e)),c.expSourceSpan)}),e.icuDepth--,e.isIcu||e.icuDepth>0){let c=e.placeholderRegistry.getUniquePlaceholder(`VAR_${i.type}`);return o.expressionPlaceholder=c,e.placeholderToContent[c]={text:i.switchValue,sourceSpan:i.switchValueSourceSpan},e.visitNodeFn(i,o)}let r=e.placeholderRegistry.getPlaceholderName("ICU",i.sourceSpan.toString());e.placeholderToMessage[r]=this.toI18nMessage([i],"","","",void 0);let a=new Ph(o,r,i.sourceSpan);return e.visitNodeFn(i,a)}visitExpansionCase(i,e){throw new Error("Unreachable code")}visitBlock(i,e){let t=Co(this,i.children,e);if(i.name==="switch")return new Cd(t,i.sourceSpan);let o=i.parameters.map(p=>p.expression),r=e.placeholderRegistry.getStartBlockPlaceholderName(i.name,o),a=e.placeholderRegistry.getCloseBlockPlaceholderName(i.name);e.placeholderToContent[r]={text:i.startSourceSpan.toString(),sourceSpan:i.startSourceSpan},e.placeholderToContent[a]={text:i.endSourceSpan?i.endSourceSpan.toString():"}",sourceSpan:i.endSourceSpan??i.sourceSpan};let c=new cm(i.name,o,r,a,t,i.sourceSpan,i.startSourceSpan,i.endSourceSpan);return e.visitNodeFn(i,c)}visitBlockParameter(i,e){throw new Error("Unreachable code")}visitLetDeclaration(i,e){return null}_visitElementLike(i,e){let t=Co(this,i.children,e),o={},r=_=>{o[_.name]=_.value},a,c;i instanceof qs?(a=i.name,c=VT(i.name).isVoid):(a=i.fullName,c=i.tagName?VT(i.tagName).isVoid:!1),i.attrs.forEach(r),i.directives.forEach(_=>_.attrs.forEach(r));let p=e.placeholderRegistry.getStartTagPlaceholderName(a,o,c);e.placeholderToContent[p]={text:i.startSourceSpan.toString(),sourceSpan:i.startSourceSpan};let u="";c||(u=e.placeholderRegistry.getCloseTagPlaceholderName(a),e.placeholderToContent[u]={text:``,sourceSpan:i.endSourceSpan??i.sourceSpan});let h=new lm(a,o,p,u,t,c,i.sourceSpan,i.startSourceSpan,i.endSourceSpan);return e.visitNodeFn(i,h)}_visitTextWithInterpolation(i,e,t,o){let r=[],a=!1;for(let c of i)switch(c.type){case 8:case 17:a=!0;let[p,u,h]=c.parts,_=$W(u)||"INTERPOLATION",S=t.placeholderRegistry.getPlaceholderName(_,u);if(this._preserveExpressionWhitespace)t.placeholderToContent[S]={text:c.parts.join(""),sourceSpan:c.sourceSpan},r.push(new R_(u,S,c.sourceSpan));else{let x=this.normalizeExpression(c);t.placeholderToContent[S]={text:`${p}${x}${h}`,sourceSpan:c.sourceSpan},r.push(new R_(x,S,c.sourceSpan))}break;default:if(c.parts[0].length>0||this._retainEmptyTokens){let x=r[r.length-1];x instanceof Vg?(x.value+=c.parts[0],x.sourceSpan=new gn(x.sourceSpan.start,c.sourceSpan.end,x.sourceSpan.fullStart,x.sourceSpan.details)):r.push(new Vg(c.parts[0],c.sourceSpan))}else this._retainEmptyTokens&&r.push(new Vg(c.parts[0],c.sourceSpan));break}return a?(VW(r,o),new Cd(r,e)):r[0]}normalizeExpression(i){let e=i.parts[1],t=this._expressionParser.parseBinding(e,i.sourceSpan,i.sourceSpan.start.offset);return MW(t)}};function VW(n,i){if(i instanceof za&&(BW(i),i=i.nodes[0]),i instanceof Cd){zW(i.children,n);for(let e=0;e`"${e.sourceSpan.toString()}"`).join(` Second pass (${i.length} tokens): ${i.map(e=>`"${e.sourceSpan.toString()}"`).join(` `)} - `.trim());if(n.some((e,t)=>i[t].constructor!==e.constructor))throw new Error("The types of the i18n message children changed between first and second pass.")}var cY=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;function dY(n){return n.split(cY)[2]}var SF=new Set(["iframe|srcdoc","*|innerhtml","*|outerhtml","embed|src","iframe|src","object|codebase","object|data"]);function wF(n,i){return n=n.toLowerCase(),i=i.toLowerCase(),SF.has(n+"|"+i)||SF.has("*|"+i)}var mY=n=>(i,e)=>{let t=n.get(i)??i;return t instanceof Id&&(e instanceof af&&t.i18n instanceof Qa&&(e.previousMessage=t.i18n),t.i18n=e),e},nx=class{keepI18nAttrs;enableI18nLegacyMessageIdFormat;preserveSignificantWhitespace;retainEmptyTokens;hasI18nMeta=!1;_errors=[];constructor(i=!1,e=!1,t=!0,o=!t){this.keepI18nAttrs=i,this.enableI18nLegacyMessageIdFormat=e,this.preserveSignificantWhitespace=t,this.retainEmptyTokens=o}_generateI18nMessage(i,e="",t){let{meaning:o,description:r,customId:a}=this._parseMetadata(e),m=oY(this.retainEmptyTokens,this.preserveSignificantWhitespace)(i,o,r,a,t);return this._setMessageId(m,e),this._setLegacyIds(m,e),m}visitAllWithErrors(i){let e=i.map(t=>t.visit(this,null));return new Jb(e,this._errors)}visitElement(i){return this._visitElementLike(i),i}visitComponent(i,e){return this._visitElementLike(i),i}visitExpansion(i,e){let t,o=i.i18n;if(this.hasI18nMeta=!0,o instanceof af){let r=o.name;t=this._generateI18nMessage([i],o);let a=w6(t);a.name=r,e!==null&&(e.placeholderToMessage[r]=t)}else t=this._generateI18nMessage([i],e||o);return i.i18n=t,i}visitText(i){return i}visitAttribute(i){return i}visitComment(i){return i}visitExpansionCase(i){return i}visitBlock(i,e){return So(this,i.children,e),i}visitBlockParameter(i,e){return i}visitLetDeclaration(i,e){return i}visitDirective(i,e){return i}_visitElementLike(i){let e;if(MW(i)){this.hasI18nMeta=!0;let t=[],o={};for(let r of i.attrs)if(r.name===y6){let a=i.i18n||r.value,c=new Map,m=this.preserveSignificantWhitespace?i.children:yc(new ex(!1,c),i.children);e=this._generateI18nMessage(m,a,mY(c)),e.nodes.length===0&&(e=void 0),i.i18n=e}else if(r.name.startsWith(HE)){let a=r.name.slice(HE.length),c;i instanceof Ha?c=i.tagName===null?!1:wF(i.tagName,a):c=wF(i.name,a),c?this._reportError(r,`Translating attribute '${a}' is disallowed for security reasons.`):o[a]=r.value}else t.push(r);if(Object.keys(o).length)for(let r of t){let a=o[r.name];a!==void 0&&r.value&&(r.i18n=this._generateI18nMessage([r],r.i18n||a))}this.keepI18nAttrs||(i.attrs=t)}So(this,i.children,e)}_parseMetadata(i){return typeof i=="string"?hY(i):i instanceof Qa?i:{}}_setMessageId(i,e){i.id||(i.id=e instanceof Qa&&e.id||TG(i))}_setLegacyIds(i,e){if(this.enableI18nLegacyMessageIdFormat)i.legacyIds=[kG(i),u6(i)];else if(typeof e!="string"){let t=e instanceof Qa?e:e instanceof af?e.previousMessage:void 0;i.legacyIds=t?t.legacyIds:[]}}_reportError(i,e){this._errors.push(new ln(i.sourceSpan,e))}},pY="|",uY="@@";function hY(n=""){let i,e,t;if(n=n.trim(),n){let o=n.indexOf(uY),r=n.indexOf(pY),a;[a,i]=o>-1?[n.slice(0,o),n.slice(o+2)]:[n,""],[e,t]=r>-1?[a.slice(0,r),a.slice(r+1)]:["",a]}return{customId:i,meaning:e,description:t}}function fY(n){let i=[];return n.description?i.push({tagName:"desc",text:n.description}):i.push({tagName:"suppress",text:"{msgDescriptions}"}),n.meaning&&i.push({tagName:"meaning",text:n.meaning}),$G(i)}var gY="goog.getMsg";function _Y(n,i,e,t){let o=CY(i),r=[ke(o)];Object.keys(t).length&&(r.push(aD(eP(t,!0),!0)),r.push(aD({original_code:pl(Object.keys(t).map(m=>({key:Z0(m),quoted:!0,value:i.placeholders[m]?ke(i.placeholders[m].sourceSpan.toString()):ke(i.placeholderToMessage[m].nodes.map(u=>u.sourceSpan.toString()).join(""))})))})));let a=new zr(e.name,Jn(gY).callFn(r),Gl,ma.Final);a.addLeadingComment(fY(i));let c=new ha(n.set(e));return[a,c]}var wD=class{formatPh(i){return`{$${Z0(i)}}`}visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){return o8(i)}visitTagPlaceholder(i){return i.isVoid?this.formatPh(i.startName):`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitPlaceholder(i){return this.formatPh(i.name)}visitBlockPlaceholder(i){return`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitIcuPlaceholder(i,e){return this.formatPh(i.name)}},vY=new wD;function CY(n){return n.nodes.map(i=>i.visit(vY,null)).join("")}function bY(n,i,e){let{messageParts:t,placeHolders:o}=xY(i),r=yY(i),a=o.map(u=>e[u.text]),c=GG(i,t,o,a,r),m=n.set(c);return[new ha(m)]}var MD=class{placeholderToMessage;pieces;constructor(i,e){this.placeholderToMessage=i,this.pieces=e}visitText(i){if(this.pieces[this.pieces.length-1]instanceof iu)this.pieces[this.pieces.length-1].text+=i.value;else{let e=new _n(i.sourceSpan.fullStart,i.sourceSpan.end,i.sourceSpan.fullStart,i.sourceSpan.details);this.pieces.push(new iu(i.value,e))}}visitContainer(i){i.children.forEach(e=>e.visit(this))}visitIcu(i){this.pieces.push(new iu(o8(i),i.sourceSpan))}visitTagPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.startName,i.startSourceSpan??i.sourceSpan)),i.isVoid||(i.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(i.closeName,i.endSourceSpan??i.sourceSpan)))}visitPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.name,i.sourceSpan))}visitBlockPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.startName,i.startSourceSpan??i.sourceSpan)),i.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(i.closeName,i.endSourceSpan??i.sourceSpan))}visitIcuPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.name,i.sourceSpan,this.placeholderToMessage[i.name]))}createPlaceholderPiece(i,e,t){return new Uh(Z0(i,!1),e,t)}};function xY(n){let i=[],e=new MD(n.placeholderToMessage,i);return n.nodes.forEach(t=>t.visit(e)),SY(i)}function yY(n){let i=n.nodes[0],e=n.nodes[n.nodes.length-1];return new _n(i.sourceSpan.fullStart,e.sourceSpan.end,i.sourceSpan.fullStart,i.sourceSpan.details)}function SY(n){let i=[],e=[];n[0]instanceof Uh&&i.push(rE(n[0].sourceSpan.start));for(let t=0;t{let M=S.has(C.name);return S.add(C.name),!M});let x=g.flatMap(C=>{let M=a.get(C.context);if(M===void 0)throw new Error("AssertionError: Could not find i18n expression's value");return[ke(C.name),M]});h.i18nAttributesConfig=n.addConst(new Oc(x))}for(let m of n.units)for(let u of m.create)if(u.kind===B.I18nStart){let h=c.get(u.root);if(h===void 0)throw new Error("AssertionError: Could not find corresponding i18n block index for an i18n message op; was an i18n message incorrectly assumed to correspond to an attribute?");u.messageIndex=h}}function p8(n,i,e,t){let o=[],r=new Map;for(let u of t.subMessages){let h=e.get(u),{mainVar:g,statements:S}=p8(n,i,e,h);o.push(...S);let x=r.get(h.messagePlaceholder)??[];x.push(g),r.set(h.messagePlaceholder,x)}DY(t,r),t.params=new Map([...t.params.entries()].sort());let a=Jn(n.pool.uniqueName(wY)),c=AY(n.pool,t.message.id,i,n.i18nUseExternalIds),m;if(t.needsPostprocessing||t.postprocessingParams.size>0){let u=Object.fromEntries([...t.postprocessingParams.entries()].sort()),h=eP(u,!1),g=[];t.postprocessingParams.size>0&&g.push(aD(h,!0)),m=S=>qt(fe.i18nPostprocess).callFn([S,...g])}return o.push(...PY(t.message,a,c,t.params,m)),{mainVar:a,statements:o}}function DY(n,i){for(let[e,t]of i)t.length===1?n.params.set(e,t[0]):(n.params.set(e,ke(`${kF}${MY}${e}${kF}`)),n.postprocessingParams.set(e,Yi(t)))}function PY(n,i,e,t,o){let r=Object.fromEntries(t),a=[TY(i),mx(IY(),_Y(i,n,e,r),bY(i,n,eP(r,!1)))];return o&&a.push(new ha(i.set(o(i)))),a}function IY(){return Y0(Jn(MF)).notIdentical(ke("undefined",KD)).and(Jn(MF))}function AY(n,i,e,t){let o,r=e;if(t){let a=TF("EXTERNAL_"),c=n.uniqueName(r);o=`${a}${Kp(i)}$$${c}`}else{let a=TF(r);o=n.uniqueName(a)}return Jn(o)}function OY(n){for(let i of n.units){let e=null,t=null,o=new Map,r=new Map,a=new Map;for(let c of i.create)switch(c.kind){case B.I18nStart:if(c.context===null)throw Error("I18n op should have its context set.");e=c;break;case B.I18nEnd:e=null;break;case B.IcuStart:if(c.context===null)throw Error("Icu op should have its context set.");t=c;break;case B.IcuEnd:t=null;break;case B.Text:if(e!==null)if(o.set(c.xref,e),r.set(c.xref,t),c.icuPlaceholder!==null){let m=aQ(n.allocateXrefId(),c.icuPlaceholder,[c.initialValue]);Qe.replace(c,m),a.set(c.xref,m)}else Qe.remove(c);break}for(let c of i.update)switch(c.kind){case B.InterpolateText:if(!o.has(c.target))continue;let m=o.get(c.target),u=r.get(c.target),h=a.get(c.target),g=u?u.context:m.context,S=u?O0.Postproccessing:O0.Creation,x=[];for(let C=0;C0){let t=RY(e.localRefs);e.localRefs=n.addConst(t)}else e.localRefs=null;break}}function RY(n){let i=[];for(let e of n)i.push(ke(e.name),ke(e.target));return Yi(i)}function FY(n){for(let i of n.units){let e=ka.HTML;for(let t of i.create)t.kind===B.ElementStart&&t.namespace!==e&&(Qe.insertBefore(Zq(t.namespace),t),e=t.namespace)}}function LY(n){let i=[],e=0,t=0,o=0,r=0,a=0,c=null;for(;e0&&t===0&&o===0){let u=n.substring(r,e-1).trim();i.push(c,u),a=e,r=0,c=null}break}if(c&&r){let m=n.slice(r).trim();i.push(c,m)}return i}function u8(n){return n.replace(/[a-z][A-Z]/g,i=>i.charAt(0)+"-"+i.charAt(1)).toLowerCase()}function BY(n){let i=new Map;for(let e of n.units)for(let t of e.create)Rm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.create)if(t.kind===B.ExtractedAttribute&&t.bindingKind===Gt.Attribute&&G6(t.expression)){let o=i.get(t.target);if(o!==void 0&&(o.kind===B.Template||o.kind===B.ConditionalCreate||o.kind===B.ConditionalBranchCreate)&&o.templateKind===ds.Structural)continue;if(t.name==="style"){let r=LY(t.expression.value);for(let a=0;a{if(!(!(r instanceof Dd)||r.name!==null)){if(!t.has(r.xref))throw new Error(`Variable ${r.xref} not yet named`);r.name=t.get(r.xref)}})}function zY(n,i){if(n.name===null)switch(n.kind){case Kr.Context:n.name=`ctx_r${i.index++}`;break;case Kr.Identifier:let e=n.identifier===zs?"i":"";n.name=`${n.identifier}_${e}r${++i.index}`;break;default:n.name=`_r${++i.index}`;break}return n.name}function jY(n){return n.startsWith("--")?n:u8(n)}function EF(n){let i=n.indexOf("!important");return i>-1?n.substring(0,i):n}function $Y(n){for(let i of n.units){for(let e of i.functions)aE(e.ops);for(let e of i.create)(e.kind===B.Listener||e.kind===B.Animation||e.kind===B.AnimationListener||e.kind===B.TwoWayListener)&&aE(e.handlerOps);aE(i.update)}}function aE(n){for(let i of n){if(i.kind!==B.Statement||!(i.statement instanceof ha)||!(i.statement.expr instanceof zb))continue;let e=i.statement.expr.steps,t=!0;for(let o=i.next;o.kind!==B.ListEnd&&t;o=o.next)fr(o,(r,a)=>{if(!Lc(r))return r;if(t&&!(a&qn.InChildOperation))switch(r.kind){case Kt.NextContext:r.steps+=e,Qe.remove(i),t=!1;break;case Kt.GetCurrentView:case Kt.Reference:case Kt.ContextLetReference:t=!1;break}})}}var HY="ng-container";function UY(n){for(let i of n.units){let e=new Set;for(let t of i.create)t.kind===B.ElementStart&&t.tag===HY&&(t.kind=B.ContainerStart,e.add(t.xref)),t.kind===B.ElementEnd&&e.has(t.xref)&&(t.kind=B.ContainerEnd)}}function GY(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function WY(n){let i=new Map;for(let e of n.units)for(let t of e.create)Rm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.create)(t.kind===B.ElementStart||t.kind===B.ContainerStart)&&t.nonBindable&&Qe.insertAfter(qq(t.xref),t),(t.kind===B.ElementEnd||t.kind===B.ContainerEnd)&&GY(i,t.xref).nonBindable&&Qe.insertBefore(Qq(t.xref),t)}function Tc(n){return i=>i.kind===n}function Q_(n,i){return e=>e.kind===n&&i===e.expression instanceof Xo}function qY(n){return n.kind===B.Listener&&!(n.hostListener&&n.isLegacyAnimationListener)||n.kind===B.TwoWayListener||n.kind===B.Animation||n.kind===B.AnimationListener}function QY(n){return(n.kind===B.Property||n.kind===B.TwoWayProperty)&&!(n.expression instanceof Xo)}var XY=[{test:n=>n.kind===B.Listener&&n.hostListener&&n.isLegacyAnimationListener},{test:qY}],YY=[{test:Tc(B.StyleMap),transform:ix},{test:Tc(B.ClassMap),transform:ix},{test:Tc(B.StyleProp)},{test:Tc(B.ClassProp)},{test:Q_(B.Attribute,!0)},{test:Q_(B.Property,!0)},{test:QY},{test:Q_(B.Attribute,!1)},{test:Tc(B.Control)}],KY=[{test:Q_(B.DomProperty,!0)},{test:Q_(B.DomProperty,!1)},{test:Tc(B.Attribute)},{test:Tc(B.StyleMap),transform:ix},{test:Tc(B.ClassMap),transform:ix},{test:Tc(B.StyleProp)},{test:Tc(B.ClassProp)}],DF=new Set([B.Listener,B.TwoWayListener,B.AnimationListener,B.StyleMap,B.ClassMap,B.StyleProp,B.ClassProp,B.Property,B.TwoWayProperty,B.DomProperty,B.Attribute,B.Animation,B.Control]);function ZY(n){for(let i of n.units){PF(i.create,XY);let e=i.job.kind===Dt.Host?KY:YY;PF(i.update,e)}}function PF(n,i){let e=[],t=null;for(let o of n){let r=N0(o)?o.target:null;(!DF.has(o.kind)||r!==t&&t!==null&&r!==null)&&(Qe.insertBefore(IF(e,i),o),e=[],t=null),DF.has(o.kind)&&(e.push(o),Qe.remove(o),t=r??t)}n.push(IF(e,i))}function IF(n,i){let e=Array.from(i,()=>new Array);for(let t of n){let o=i.findIndex(r=>r.test(t));e[o].push(t)}return e.flatMap((t,o)=>{let r=i[o].transform;return r?r(t):t})}function ix(n){return n.slice(n.length-1)}function JY(n){for(let i of n.units){let e=e8(i);for(let t of i.ops())if(t.kind===B.Binding){let o=tK(e,t.target);eK(t.name)&&o.kind===B.Projection&&Qe.remove(t)}}}function eK(n){return n.toLowerCase()==="select"}function tK(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an slottable target.");return e}function nK(n){for(let i of n.units)iK(i)}function iK(n){for(let i of n.update)fr(i,(e,t)=>{if(!Lc(e)||e.kind!==Kt.PipeBinding)return;if(t&qn.InChildOperation)throw new Error("AssertionError: pipe bindings should not appear in child expressions");if(i.target==null)throw new Error("AssertionError: expected slot handle to be assigned for pipe creation");oK(n,i.target,e)})}function oK(n,i,e){for(let t=n.create.head.next;t.kind!==B.ListEnd;t=t.next){if(!_f(t)||t.xref!==i)continue;for(;t.next.kind===B.Pipe;)t=t.next;let o=Kq(e.target,e.targetSlot,e.name);Qe.insertBefore(o,t.next);return}throw new Error(`AssertionError: unable to find insertion point for pipe ${e.name}`)}function rK(n){for(let i of n.units)for(let e of i.update)Yo(e,t=>!(t instanceof Su)||t.args.length<=4?t:new B0(t.target,t.targetSlot,t.name,Yi(t.args),t.args.length),qn.None)}function aK(n){h8(n.root,0)}function h8(n,i){let e=null;for(let t of n.create)switch(t.kind){case B.I18nStart:t.subTemplateIndex=i===0?null:i,e=t;break;case B.I18nEnd:e.subTemplateIndex===null&&(i=0),e=null;break;case B.ConditionalCreate:case B.ConditionalBranchCreate:case B.Template:i=U1(n.job.views.get(t.xref),e,t.i18nPlaceholder,i);break;case B.RepeaterCreate:let o=n.job.views.get(t.xref);i=U1(o,e,t.i18nPlaceholder,i),t.emptyView!==null&&(i=U1(n.job.views.get(t.emptyView),e,t.emptyI18nPlaceholder,i));break;case B.Projection:t.fallbackView!==null&&(i=U1(n.job.views.get(t.fallbackView),e,t.fallbackViewI18nPlaceholder,i));break}return i}function U1(n,i,e,t){if(e!==void 0){if(i===null)throw Error("Expected template with i18n placeholder to be in an i18n block.");t++,sK(n,i)}return h8(n,t)}function sK(n,i){if(n.create.head.next?.kind!==B.I18nStart){let e=n.job.allocateXrefId();Qe.insertAfter(fx(e,i.message,i.root,null),n.create.head),Qe.insertBefore(gx(e,null),n.create.tail)}}function lK(n){for(let i of n.units)for(let e of i.ops())fr(e,t=>{if(!(t instanceof yu)||t.body===null)return;let o=new kD(t.args.length);t.fn=n.pool.getSharedConstant(o,t.body),t.body=null})}var kD=class extends r0{numArgs;constructor(i){super(),this.numArgs=i}keyOf(i){return i instanceof Om?`param(${i.index})`:super.keyOf(i)}toSharedConstantDeclaration(i,e){let t=[];for(let r=0;rr instanceof Om?Jn("a"+r.index):r,qn.None);return new zr(i,new ku(t,o),void 0,ma.Final)}};function cK(n){for(let i of n.units)for(let e of i.update)Yo(e,(t,o)=>o&qn.InChildOperation?t:t instanceof Oc?dK(t):t instanceof Ql?mK(t):t,qn.None)}function dK(n){let i=[],e=[];for(let t of n.entries){if(t instanceof hu){if(t.expression.isConstant())i.push(t);else{let o=e.length;e.push(t.expression),i.push(new hu(new Om(o)))}continue}if(t.isConstant())i.push(t);else{let o=e.length;e.push(t),i.push(new Om(o))}}return new yu(Yi(i),e)}function mK(n){let i=[],e=[];for(let t of n.entries){if(t instanceof Mm){if(t.expression.isConstant())i.push(t);else{let o=e.length;e.push(t.expression),i.push(new Mm(new Om(o)))}continue}if(t.value.isConstant())i.push(t);else{let o=e.length;e.push(t.value),i.push(new Yh(t.key,new Om(o),t.quoted))}}return new yu(new Ql(i),e)}function pK(n){for(let i of n.units)for(let e of i.ops())Yo(e,t=>t instanceof Xh&&(t.flags===null||!t.flags.includes("g"))?n.pool.getSharedConstant(new TD,t):t,qn.None)}var TD=class extends r0{toSharedConstantDeclaration(i,e){return new zr(i,e,void 0,ma.Final)}};function uK(n,i,e,t,o){return Bm(fe.element,n,i,e,t,o)}function hK(n,i,e,t,o){return Bm(fe.elementStart,n,i,e,t,o)}function Bm(n,i,e,t,o,r){let a=[ke(i)];return e!==null&&a.push(ke(e)),o!==null?a.push(ke(t),ke(o)):t!==null&&a.push(ke(t)),wn(n,a,r)}function f8(n,i,e,t,o,r,a,c,m){let u=[ke(i),e,ke(t),ke(o),ke(r),ke(a)];for(c!==null&&(u.push(ke(c)),u.push(qt(fe.templateRefExtractor)));u[u.length-1].isEquivalent(Kh);)u.pop();return wn(n,u,m)}function dP(n,i,e,t,o){let r=[ke(i)];return e instanceof Xo?r.push(vf(e,o)):r.push(e),t!==null&&r.push(t),wn(n,r,o)}function fK(n){return wn(fe.elementEnd,[],n)}function gK(n,i,e,t){return Bm(fe.elementContainerStart,n,null,i,e,t)}function _K(n,i,e,t){return Bm(fe.elementContainer,n,null,i,e,t)}function vK(){return wn(fe.elementContainerEnd,[],null)}function CK(n,i,e,t,o,r,a,c){return f8(fe.templateCreate,n,i,e,t,o,r,a,c)}function bK(){return wn(fe.disableBindings,[],null)}function xK(){return wn(fe.enableBindings,[],null)}function yK(n,i,e,t,o){let r=[ke(n),i];return e!==null&&r.push(qt(e)),wn(t?fe.syntheticHostListener:fe.listener,r,o)}function AF(n,i){return qt(fe.twoWayBindingSet).callFn([n,i])}function SK(n,i,e){return wn(fe.twoWayListener,[ke(n),i],e)}function wK(n,i){return wn(fe.pipe,[ke(n),ke(i)],null)}function MK(){return wn(fe.namespaceHTML,[],null)}function kK(){return wn(fe.namespaceSVG,[],null)}function TK(){return wn(fe.namespaceMathML,[],null)}function EK(n,i){return wn(fe.advance,n>1?[ke(n)]:[],i)}function DK(n){return qt(fe.reference).callFn([ke(n)])}function PK(n){return qt(fe.nextContext).callFn(n===1?[]:[ke(n)])}function IK(){return qt(fe.getCurrentView).callFn([])}function AK(n){return qt(fe.restoreView).callFn([n])}function OK(n){return qt(fe.resetView).callFn([n])}function NK(n,i,e){let t=[ke(n,null)];return i!==""&&t.push(ke(i)),wn(fe.text,t,e)}function RK(n,i,e,t,o,r,a,c,m,u,h){let g=[ke(n),ke(i),e??ke(null),ke(t),ke(o),ke(r),a??ke(null),c??ke(null),m?qt(fe.deferEnableTimerScheduling):ke(null),ke(h)],S;for(;(S=g[g.length-1])!==null&&S instanceof ua&&S.value===null;)g.pop();return wn(fe.defer,g,u)}var FK=new Map([[oo.Idle,{none:fe.deferOnIdle,prefetch:fe.deferPrefetchOnIdle,hydrate:fe.deferHydrateOnIdle}],[oo.Immediate,{none:fe.deferOnImmediate,prefetch:fe.deferPrefetchOnImmediate,hydrate:fe.deferHydrateOnImmediate}],[oo.Timer,{none:fe.deferOnTimer,prefetch:fe.deferPrefetchOnTimer,hydrate:fe.deferHydrateOnTimer}],[oo.Hover,{none:fe.deferOnHover,prefetch:fe.deferPrefetchOnHover,hydrate:fe.deferHydrateOnHover}],[oo.Interaction,{none:fe.deferOnInteraction,prefetch:fe.deferPrefetchOnInteraction,hydrate:fe.deferHydrateOnInteraction}],[oo.Viewport,{none:fe.deferOnViewport,prefetch:fe.deferPrefetchOnViewport,hydrate:fe.deferHydrateOnViewport}],[oo.Never,{none:fe.deferHydrateNever,prefetch:fe.deferHydrateNever,hydrate:fe.deferHydrateNever}]]);function LK(n,i,e,t){let o=FK.get(n)?.[e];if(o===void 0)throw new Error(`Unable to determine instruction for trigger ${n}`);return wn(o,i,t)}function BK(n){return wn(fe.projectionDef,n?[n]:[],null)}function VK(n,i,e,t,o,r,a){let c=[ke(n)];return(i!==0||e!==null||t!==null)&&(c.push(ke(i)),e!==null&&c.push(e),t!==null&&(e===null&&c.push(ke(null)),c.push(Jn(t),ke(o),ke(r)))),wn(fe.projection,c,a)}function zK(n,i,e,t){let o=[ke(n),ke(i)];return e!==null&&o.push(ke(e)),wn(fe.i18nStart,o,t)}function jK(n,i,e,t,o,r,a,c){let m=[ke(n),i,ke(e),ke(t),ke(o),ke(r)];for(a!==null&&(m.push(ke(a)),m.push(qt(fe.templateRefExtractor)));m[m.length-1].isEquivalent(Kh);)m.pop();return wn(fe.conditionalCreate,m,c)}function $K(n,i,e,t,o,r,a,c){let m=[ke(n),i,ke(e),ke(t),ke(o),ke(r)];for(a!==null&&(m.push(ke(a)),m.push(qt(fe.templateRefExtractor)));m[m.length-1].isEquivalent(Kh);)m.pop();return wn(fe.conditionalBranchCreate,m,c)}function HK(n,i,e,t,o,r,a,c,m,u,h,g,S,x){let C=[ke(n),Jn(i),ke(e),ke(t),ke(o),ke(r),a];return(c||m!==null)&&(C.push(ke(c)),m!==null&&(C.push(Jn(m),ke(u),ke(h)),(g!==null||S!==null)&&C.push(ke(g)),S!==null&&C.push(ke(S)))),wn(fe.repeaterCreate,C,x)}function UK(n,i){return wn(fe.repeater,[n],i)}function GK(n,i,e){return n==="prefetch"?wn(fe.deferPrefetchWhen,[i],e):n==="hydrate"?wn(fe.deferHydrateWhen,[i],e):wn(fe.deferWhen,[i],e)}function WK(n,i){return wn(fe.declareLet,[ke(n)],i)}function qK(n,i){return qt(fe.storeLet).callFn([n],i)}function QK(n){return qt(fe.readContextLet).callFn([ke(n)])}function XK(n,i,e,t){let o=[ke(n),ke(i)];return e&&o.push(ke(e)),wn(fe.i18n,o,t)}function YK(n){return wn(fe.i18nEnd,[],n)}function KK(n,i){let e=[ke(n),ke(i)];return wn(fe.i18nAttributes,e,null)}function ZK(n,i,e){return dP(fe.ariaProperty,n,i,null,e)}function JK(n,i,e,t){return dP(fe.property,n,i,e,t)}function eZ(n){return wn(fe.control,[],n)}function tZ(n){return wn(fe.controlCreate,[],n)}function nZ(n,i,e,t){let o=[ke(n),i];return e!==null&&o.push(e),wn(fe.twoWayProperty,o,t)}function iZ(n,i,e,t,o){let r=[ke(n)];return i instanceof Xo?r.push(vf(i,o)):r.push(i),(e!==null||t!==null)&&r.push(e??ke(null)),t!==null&&r.push(ke(t)),wn(fe.attribute,r,null)}function oZ(n,i,e,t){let o=[ke(n)];return i instanceof Xo?o.push(vf(i,t)):o.push(i),e!==null&&o.push(ke(e)),wn(fe.styleProp,o,t)}function rZ(n,i,e){return wn(fe.classProp,[ke(n),i],e)}function aZ(n,i){let e=n instanceof Xo?vf(n,i):n;return wn(fe.styleMap,[e],i)}function sZ(n,i){let e=n instanceof Xo?vf(n,i):n;return wn(fe.classMap,[e],i)}function lZ(n,i,e,t,o){return Bm(fe.domElement,n,i,e,t,o)}function cZ(n,i,e,t,o){return Bm(fe.domElementStart,n,i,e,t,o)}function dZ(n){return wn(fe.domElementEnd,[],n)}function mZ(n,i,e,t){return Bm(fe.domElementContainerStart,n,null,i,e,t)}function pZ(n,i,e,t){return Bm(fe.domElementContainer,n,null,i,e,t)}function uZ(){return wn(fe.domElementContainerEnd,[],null)}function hZ(n,i,e,t){let o=[ke(n),i];return e!==null&&o.push(qt(e)),wn(fe.domListener,o,t)}function fZ(n,i,e,t,o,r,a,c){return f8(fe.domTemplate,n,i,e,t,o,r,a,c)}var OF=[fe.pipeBind1,fe.pipeBind2,fe.pipeBind3,fe.pipeBind4];function gZ(n,i,e){if(e.length<1||e.length>OF.length)throw new Error("pipeBind() argument count out of bounds");let t=OF[e.length-1];return qt(t).callFn([ke(n),ke(i),...e])}function _Z(n,i,e){return qt(fe.pipeBindV).callFn([ke(n),ke(i),e])}function vZ(n,i,e){let t=g8(n,i);return OZ(PZ,[],t,e)}function CZ(n,i){return wn(fe.i18nExp,[n],i)}function bZ(n,i){return wn(fe.i18nApply,[ke(n)],i)}function xZ(n,i,e,t){return dP(fe.domProperty,n,i,e,t)}function yZ(n,i,e,t){let o=[i];e!==null&&o.push(e);let r=n==="enter"?fe.animationEnter:fe.animationLeave;return wn(r,o,t)}function SZ(n,i,e,t){let r=[i instanceof Xo?vf(i,t):i];e!==null&&r.push(e);let a=n==="enter"?fe.animationEnter:fe.animationLeave;return wn(a,r,t)}function wZ(n,i,e,t){let o=[i],r=n==="enter"?fe.animationEnterListener:fe.animationLeaveListener;return wn(r,o,t)}function MZ(n,i,e){return wn(fe.syntheticHostProperty,[ke(n),i],e)}function kZ(n,i,e){return mP(AZ,[ke(n),i],e,null)}function TZ(n,i){return wn(fe.attachSourceLocations,[ke(n),i],null)}function EZ(n,i,e){return qt(fe.arrowFunction).callFn([ke(n),i,e])}function g8(n,i){if(n.length<1||i.length!==n.length-1)throw new Error("AssertionError: expected specific shape of args for strings/expressions in interpolation");let e=[];if(i.length===1&&n[0]===""&&n[1]==="")e.push(i[0]);else{let t;for(t=0;t{if(n%2===0)throw new Error("Expected odd number of arguments");return(n-1)/2}},IZ={constant:[fe.interpolate,fe.interpolate1,fe.interpolate2,fe.interpolate3,fe.interpolate4,fe.interpolate5,fe.interpolate6,fe.interpolate7,fe.interpolate8],variable:fe.interpolateV,mapping:n=>{if(n%2===0)throw new Error("Expected odd number of arguments");return(n-1)/2}},AZ={constant:[fe.pureFunction0,fe.pureFunction1,fe.pureFunction2,fe.pureFunction3,fe.pureFunction4,fe.pureFunction5,fe.pureFunction6,fe.pureFunction7,fe.pureFunction8],variable:fe.pureFunctionV,mapping:n=>n};function mP(n,i,e,t){let o=n.mapping(e.length),r=e.at(-1);if(e.length>1&&r instanceof ua&&r.value===""&&e.pop(),o_8(n,t),qn.None),e.kind){case B.Text:Qe.replace(e,NK(e.handle.slot,e.initialValue,e.sourceSpan));break;case B.ElementStart:Qe.replace(e,n.job.mode===as.DomOnly?cZ(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan):hK(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case B.Element:Qe.replace(e,n.job.mode===as.DomOnly?lZ(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan):uK(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan));break;case B.ElementEnd:Qe.replace(e,n.job.mode===as.DomOnly?dZ(e.sourceSpan):fK(e.sourceSpan));break;case B.ContainerStart:Qe.replace(e,n.job.mode===as.DomOnly?mZ(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan):gK(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan));break;case B.Container:Qe.replace(e,n.job.mode===as.DomOnly?pZ(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan):_K(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan));break;case B.ContainerEnd:Qe.replace(e,n.job.mode===as.DomOnly?uZ():vK());break;case B.I18nStart:Qe.replace(e,zK(e.handle.slot,e.messageIndex,e.subTemplateIndex,e.sourceSpan));break;case B.I18nEnd:Qe.replace(e,YK(e.sourceSpan));break;case B.I18n:Qe.replace(e,XK(e.handle.slot,e.messageIndex,e.subTemplateIndex,e.sourceSpan));break;case B.I18nAttributes:if(e.i18nAttributesConfig===null)throw new Error("AssertionError: i18nAttributesConfig was not set");Qe.replace(e,KK(e.handle.slot,e.i18nAttributesConfig));break;case B.Template:if(!(n instanceof dl))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let t=n.job.views.get(e.xref);Qe.replace(e,e.templateKind===ds.Block||n.job.mode===as.DomOnly?fZ(e.handle.slot,Jn(t.fnName),t.decls,t.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan):CK(e.handle.slot,Jn(t.fnName),t.decls,t.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case B.DisableBindings:Qe.replace(e,bK());break;case B.EnableBindings:Qe.replace(e,xK());break;case B.Pipe:Qe.replace(e,wK(e.handle.slot,e.name));break;case B.DeclareLet:Qe.replace(e,WK(e.handle.slot,e.sourceSpan));break;case B.AnimationString:Qe.replace(e,SZ(e.animationKind,e.expression,e.sanitizer,e.sourceSpan));break;case B.Animation:let o=G1(n,e.handlerFnName,e.handlerOps,!1);Qe.replace(e,yZ(e.animationKind,o,e.sanitizer,e.sourceSpan));break;case B.AnimationListener:let r=G1(n,e.handlerFnName,e.handlerOps,e.consumesDollarEvent);Qe.replace(e,wZ(e.animationKind,r,null,e.sourceSpan));break;case B.Listener:let a=G1(n,e.handlerFnName,e.handlerOps,e.consumesDollarEvent),c=e.eventTarget?NZ.get(e.eventTarget):null;if(c===void 0)throw new Error(`Unexpected global target '${e.eventTarget}' defined for '${e.name}' event. Supported list of global targets: window,document,body.`);Qe.replace(e,n.job.mode===as.DomOnly&&!e.hostListener&&!e.isLegacyAnimationListener?hZ(e.name,a,c,e.sourceSpan):yK(e.name,a,c,e.hostListener&&e.isLegacyAnimationListener,e.sourceSpan));break;case B.TwoWayListener:Qe.replace(e,SK(e.name,G1(n,e.handlerFnName,e.handlerOps,!0),e.sourceSpan));break;case B.Variable:if(e.variable.name===null)throw new Error(`AssertionError: unnamed variable ${e.xref}`);Qe.replace(e,js(new zr(e.variable.name,e.initializer,void 0,ma.Final)));break;case B.Namespace:switch(e.active){case ka.HTML:Qe.replace(e,MK());break;case ka.SVG:Qe.replace(e,kK());break;case ka.Math:Qe.replace(e,TK());break}break;case B.Defer:let m=!!e.loadingMinimumTime||!!e.loadingAfterTime||!!e.placeholderMinimumTime;Qe.replace(e,RK(e.handle.slot,e.mainSlot.slot,e.resolverFn,e.loadingSlot?.slot??null,e.placeholderSlot?.slot??null,e.errorSlot?.slot??null,e.loadingConfig,e.placeholderConfig,m,e.sourceSpan,e.flags));break;case B.DeferOn:let u=[];switch(e.trigger.kind){case oo.Never:case oo.Idle:case oo.Immediate:break;case oo.Timer:u=[ke(e.trigger.delay)];break;case oo.Viewport:e.modifier==="hydrate"?u=e.trigger.options?[e.trigger.options]:[]:(u=[ke(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0?u.push(ke(e.trigger.targetSlotViewSteps)):e.trigger.options&&u.push(ke(null)),e.trigger.options&&u.push(e.trigger.options));break;case oo.Interaction:case oo.Hover:e.modifier==="hydrate"?u=[]:(u=[ke(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0&&u.push(ke(e.trigger.targetSlotViewSteps)));break;default:throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${e.trigger.kind}`)}Qe.replace(e,LK(e.trigger.kind,u,e.modifier,e.sourceSpan));break;case B.ProjectionDef:Qe.replace(e,BK(e.def));break;case B.Projection:if(e.handle.slot===null)throw new Error("No slot was assigned for project instruction");let h=null,g=null,S=null;if(e.fallbackView!==null){if(!(n instanceof dl))throw new Error("AssertionError: must be compiling a component");let D=n.job.views.get(e.fallbackView);if(D===void 0)throw new Error("AssertionError: projection had fallback view xref, but fallback view was not found");if(D.fnName===null||D.decls===null||D.vars===null)throw new Error("AssertionError: expected projection fallback view to have been named and counted");h=D.fnName,g=D.decls,S=D.vars}Qe.replace(e,VK(e.handle.slot,e.projectionSlotIndex,e.attributes,h,g,S,e.sourceSpan));break;case B.ConditionalCreate:if(!(n instanceof dl))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let x=n.job.views.get(e.xref);Qe.replace(e,jK(e.handle.slot,Jn(x.fnName),x.decls,x.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case B.ConditionalBranchCreate:if(!(n instanceof dl))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let C=n.job.views.get(e.xref);Qe.replace(e,$K(e.handle.slot,Jn(C.fnName),C.decls,C.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case B.RepeaterCreate:if(e.handle.slot===null)throw new Error("No slot was assigned for repeater instruction");if(!(n instanceof dl))throw new Error("AssertionError: must be compiling a component");let M=n.job.views.get(e.xref);if(M.fnName===null)throw new Error("AssertionError: expected repeater primary view to have been named");let w=null,y=null,k=null;if(e.emptyView!==null){let D=n.job.views.get(e.emptyView);if(D===void 0)throw new Error("AssertionError: repeater had empty view xref, but empty view was not found");if(D.fnName===null||D.decls===null||D.vars===null)throw new Error("AssertionError: expected repeater empty view to have been named and counted");w=D.fnName,y=D.decls,k=D.vars}Qe.replace(e,HK(e.handle.slot,M.fnName,e.decls,e.vars,e.tag,e.attributes,zZ(n,e),e.usesComponentInstance,w,y,k,e.emptyTag,e.emptyAttributes,e.wholeSourceSpan));break;case B.SourceLocation:let I=Yi(e.locations.map(({targetSlot:D,offset:N,line:P,column:F})=>{if(D.slot===null)throw new Error("No slot was assigned for source location");return Yi([ke(D.slot),ke(N),ke(P),ke(F)])}));Qe.replace(e,TZ(e.templatePath,I));break;case B.ControlCreate:Qe.replace(e,tZ(e.sourceSpan));break;case B.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of create op ${B[e.kind]}`)}}function _x(n,i){for(let e of i)switch(Yo(e,t=>_8(n,t),qn.None),e.kind){case B.Advance:Qe.replace(e,EK(e.delta,e.sourceSpan));break;case B.Property:Qe.replace(e,n.job.mode===as.DomOnly&&e.bindingKind!==Gt.LegacyAnimation&&e.bindingKind!==Gt.Animation?NF(e):BZ(e));break;case B.Control:Qe.replace(e,VZ(e));break;case B.TwoWayProperty:Qe.replace(e,nZ(e.name,e.expression,e.sanitizer,e.sourceSpan));break;case B.StyleProp:Qe.replace(e,oZ(e.name,e.expression,e.unit,e.sourceSpan));break;case B.ClassProp:Qe.replace(e,rZ(e.name,e.expression,e.sourceSpan));break;case B.StyleMap:Qe.replace(e,aZ(e.expression,e.sourceSpan));break;case B.ClassMap:Qe.replace(e,sZ(e.expression,e.sourceSpan));break;case B.I18nExpression:Qe.replace(e,CZ(e.expression,e.sourceSpan));break;case B.I18nApply:Qe.replace(e,bZ(e.handle.slot,e.sourceSpan));break;case B.InterpolateText:Qe.replace(e,vZ(e.interpolation.strings,e.interpolation.expressions,e.sourceSpan));break;case B.Attribute:Qe.replace(e,iZ(e.name,e.expression,e.sanitizer,e.namespace,e.sourceSpan));break;case B.DomProperty:if(e.expression instanceof Xo)throw new Error("not yet handled");e.bindingKind===Gt.LegacyAnimation||e.bindingKind===Gt.Animation?Qe.replace(e,MZ(e.name,e.expression,e.sourceSpan)):Qe.replace(e,NF(e));break;case B.Variable:if(e.variable.name===null)throw new Error(`AssertionError: unnamed variable ${e.xref}`);Qe.replace(e,js(new zr(e.variable.name,e.initializer,void 0,ma.Final)));break;case B.Conditional:if(e.processed===null)throw new Error("Conditional test was not set.");Qe.replace(e,DZ(e.processed,e.contextValue,e.sourceSpan));break;case B.Repeater:Qe.replace(e,UK(e.collection,e.sourceSpan));break;case B.DeferWhen:Qe.replace(e,GK(e.modifier,e.expr,e.sourceSpan));break;case B.StoreLet:throw new Error(`AssertionError: unexpected storeLet ${e.declaredName}`);case B.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of update op ${B[e.kind]}`)}}function NF(n){return xZ(RZ.get(n.name)??n.name,n.expression,n.sanitizer,n.sourceSpan)}function BZ(n){return t8(n.name)?ZK(n.name,n.expression,n.sourceSpan):JK(n.name,n.expression,n.sanitizer,n.sourceSpan)}function VZ(n){return eZ(n.sourceSpan)}function _8(n,i){if(!Lc(i))return i;switch(i.kind){case Kt.NextContext:return PK(i.steps);case Kt.Reference:return DK(i.targetSlot.slot+1+i.offset);case Kt.LexicalRead:throw new Error(`AssertionError: unresolved LexicalRead of ${i.name}`);case Kt.TwoWayBindingSet:throw new Error("AssertionError: unresolved TwoWayBindingSet");case Kt.RestoreView:if(typeof i.view=="number")throw new Error("AssertionError: unresolved RestoreView");return AK(i.view);case Kt.ResetView:return OK(i.expr);case Kt.GetCurrentView:return IK();case Kt.ReadVariable:if(i.name===null)throw new Error(`Read of unnamed variable ${i.xref}`);return Jn(i.name);case Kt.ReadTemporaryExpr:if(i.name===null)throw new Error(`Read of unnamed temporary ${i.xref}`);return Jn(i.name);case Kt.AssignTemporaryExpr:if(i.name===null)throw new Error(`Assign of unnamed temporary ${i.xref}`);return Jn(i.name).set(i.expr);case Kt.PureFunctionExpr:if(i.fn===null)throw new Error("AssertionError: expected PureFunctions to have been extracted");return kZ(i.varOffset,i.fn,i.args);case Kt.PureFunctionParameterExpr:throw new Error("AssertionError: expected PureFunctionParameterExpr to have been extracted");case Kt.PipeBinding:return gZ(i.targetSlot.slot,i.varOffset,i.args);case Kt.PipeBindingVariadic:return _Z(i.targetSlot.slot,i.varOffset,i.args);case Kt.SlotLiteralExpr:return ke(i.slot.slot);case Kt.ContextLetReference:return QK(i.targetSlot.slot);case Kt.StoreLet:return qK(i.value,i.sourceSpan);case Kt.TrackContext:return Jn("this");case Kt.ArrowFunction:if(i.varOffset===null)throw new Error("AssertionError: variable offset was not assigned to arrow function");return EZ(i.varOffset,n.job.pool.getSharedFunctionReference(jZ(n,i),"arrowFn"),Jn(zs));default:throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${Kt[i.kind]}`)}}function G1(n,i,e,t){_x(n,e);let o=[];for(let a of e){if(a.kind!==B.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${B[a.kind]}`);o.push(a.statement)}let r=[];return t&&r.push(new wr("$event",ms)),km(r,o,void 0,void 0,i)}function zZ(n,i){if(i.trackByFn!==null)return i.trackByFn;let e=[new wr("$index",mu),new wr("$item",ms)],t;if(i.trackByOps===null)t=i.usesComponentInstance?km(e,[new Mr(i.track)]):Vs(e,i.track);else{_x(n,i.trackByOps);let o=[];for(let r of i.trackByOps){if(r.kind!==B.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${B[r.kind]}`);o.push(r.statement)}t=i.usesComponentInstance||o.length!==1||!(o[0]instanceof Mr)?km(e,o):Vs(e,o[0].value)}return i.trackByFn=n.job.pool.getSharedFunctionReference(t,"_forTrack"),i.trackByFn}function jZ(n,i){_x(n,i.ops);let e=[];for(let o of i.ops){if(o.kind!==B.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${B[o.kind]}`);e.push(o.statement)}let t=e.length===1&&e[0]instanceof Mr?e[0].value:e;return Vs([new wr(i.contextName,ms),new wr(i.currentViewName,ms)],Vs(i.parameters,t))}function $Z(n){for(let i of n.units)for(let e of i.update)switch(e.kind){case B.Attribute:case B.Binding:case B.ClassProp:case B.ClassMap:case B.Property:case B.StyleProp:case B.StyleMap:e.expression instanceof V0&&Qe.remove(e);break}}function HZ(n){for(let i of n.units)for(let e of i.create)switch(e.kind){case B.I18nContext:Qe.remove(e);break;case B.I18nStart:e.context=null;break}}function UZ(n){for(let i of n.units)for(let e of i.update){if(e.kind!==B.Variable||e.variable.kind!==Kr.Identifier||!(e.initializer instanceof R0))continue;let t=e.variable.identifier,o=e;for(;o&&o.kind!==B.ListEnd;)Yo(o,r=>r instanceof Xr&&r.name===t?ke(void 0):r,qn.None),o=o.prev}}function GZ(n){for(let i of n.units){let e=new Set;for(let t of i.update)t.kind===B.I18nExpression&&e.add(t.i18nOwner);for(let t of i.create)switch(t.kind){case B.I18nAttributes:if(e.has(t.xref))continue;Qe.remove(t)}}}function WZ(n){for(let i of n.units){for(let e of i.functions)X_(i,e.ops);X_(i,i.create),X_(i,i.update)}}function X_(n,i){let e=new Map;e.set(n.xref,Jn(zs));for(let t of i)switch(t.kind){case B.Variable:t.variable.kind===Kr.Context&&e.set(t.variable.view,new Dd(t.xref));break;case B.Animation:case B.AnimationListener:case B.Listener:case B.TwoWayListener:X_(n,t.handlerOps);break;case B.RepeaterCreate:t.trackByOps!==null&&X_(n,t.trackByOps);break}n===n.job.root&&e.set(n.xref,Jn(zs));for(let t of i)Yo(t,o=>{if(o instanceof Am){if(!e.has(o.view))throw new Error(`No context found for reference to view ${o.view} from view ${n.xref}`);return e.get(o.view)}else return o},qn.None)}function qZ(n){for(let i of n.units)for(let e of i.create)if(e.kind===B.Defer){if(e.resolverFn!==null)continue;if(e.ownResolverFn!==null){if(e.handle.slot===null)throw new Error("AssertionError: slot must be assigned before extracting defer deps functions");let t=i.fnName?.replace("_Template","");e.resolverFn=n.pool.getSharedFunctionReference(e.ownResolverFn,`${t}_Defer_${e.handle.slot}_DepsFn`,!1)}}}function QZ(n){for(let i of n.units)RF(i.create),RF(i.update)}function RF(n){for(let i of n)(i.kind===B.Listener||i.kind===B.TwoWayListener||i.kind===B.AnimationListener)&&Yo(i,e=>e instanceof Xr&&e.name==="$event"?((i.kind===B.Listener||i.kind===B.AnimationListener)&&(i.consumesDollarEvent=!0),new Wl(e.name)):e,qn.InChildOperation)}function XZ(n){let i=new Map,e=new Map;for(let t of n.units)for(let o of t.create)switch(o.kind){case B.I18nContext:i.set(o.xref,o);break;case B.ElementStart:e.set(o.xref,o);break}Sc(n,n.root,i,e)}function Sc(n,i,e,t,o){let r=null,a=new Map;for(let c of i.create)switch(c.kind){case B.I18nStart:if(!c.context)throw Error("Could not find i18n context for i18n op");r={i18nBlock:c,i18nContext:e.get(c.context)};break;case B.I18nEnd:r=null;break;case B.ElementStart:if(c.i18nPlaceholder!==void 0){if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");FF(c,r.i18nContext,r.i18nBlock,o),o&&c.i18nPlaceholder.closeName&&a.set(c.xref,o),o=void 0}break;case B.ElementEnd:let m=t.get(c.xref);if(m&&m.i18nPlaceholder!==void 0){if(r===null)throw Error("AssertionError: i18n tag placeholder should only occur inside an i18n block");LF(m,r.i18nContext,r.i18nBlock,a.get(c.xref)),a.delete(c.xref)}break;case B.Projection:if(c.i18nPlaceholder!==void 0){if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");FF(c,r.i18nContext,r.i18nBlock,o),LF(c,r.i18nContext,r.i18nBlock,o),o=void 0}if(c.fallbackView!==null){let S=n.views.get(c.fallbackView);if(c.fallbackViewI18nPlaceholder===void 0)Sc(n,S,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");W1(n,S,c.handle.slot,c.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,o),Sc(n,S,e,t),q1(n,S,c.handle.slot,c.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}}break;case B.ConditionalCreate:case B.ConditionalBranchCreate:case B.Template:let u=n.views.get(c.xref);if(c.i18nPlaceholder===void 0)Sc(n,u,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");c.templateKind===ds.Structural?Sc(n,u,e,t,c):(W1(n,u,c.handle.slot,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),Sc(n,u,e,t),q1(n,u,c.handle.slot,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0)}break;case B.RepeaterCreate:if(o!==void 0)throw Error("AssertionError: Unexpected structural directive associated with @for block");let h=c.handle.slot+1,g=n.views.get(c.xref);if(c.i18nPlaceholder===void 0)Sc(n,g,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");W1(n,g,h,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),Sc(n,g,e,t),q1(n,g,h,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}if(c.emptyView!==null){let S=c.handle.slot+2,x=n.views.get(c.emptyView);if(c.emptyI18nPlaceholder===void 0)Sc(n,x,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");W1(n,x,S,c.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,o),Sc(n,x,e,t),q1(n,x,S,c.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}}break}}function FF(n,i,e,t){let{startName:o,closeName:r}=n.i18nPlaceholder,a=mo.ElementTag|mo.OpenTag,c=n.handle.slot;t!==void 0&&(a|=mo.TemplateTag,c={element:c,template:t.handle.slot}),r||(a|=mo.CloseTag),uf(i.params,o,c,e.subTemplateIndex,a)}function LF(n,i,e,t){let{closeName:o}=n.i18nPlaceholder;if(o){let r=mo.ElementTag|mo.CloseTag,a=n.handle.slot;t!==void 0&&(r|=mo.TemplateTag,a={element:a,template:t.handle.slot}),uf(i.params,o,a,e.subTemplateIndex,r)}}function W1(n,i,e,t,o,r,a){let{startName:c,closeName:m}=t,u=mo.TemplateTag|mo.OpenTag;m||(u|=mo.CloseTag),a!==void 0&&uf(o.params,c,a.handle.slot,r.subTemplateIndex,u),uf(o.params,c,e,v8(n,r,i),u)}function q1(n,i,e,t,o,r,a){let{closeName:c}=t,m=mo.TemplateTag|mo.CloseTag;c&&(uf(o.params,c,e,v8(n,r,i),m),a!==void 0&&uf(o.params,c,a.handle.slot,r.subTemplateIndex,m))}function v8(n,i,e){for(let t of e.create)if(t.kind===B.I18nStart)return t.subTemplateIndex;return i.subTemplateIndex}function uf(n,i,e,t,o){let r=n.get(i)??[];r.push({value:e,subTemplateIndex:t,flags:o}),n.set(i,r)}function YZ(n){let i=new Map,e=new Map,t=new Map;for(let a of n.units)for(let c of a.create)switch(c.kind){case B.I18nStart:i.set(c.xref,c.subTemplateIndex);break;case B.I18nContext:e.set(c.xref,c);break;case B.IcuPlaceholder:t.set(c.xref,c);break}let o=new Map,r=a=>a.usage===gf.I18nText?a.i18nOwner:a.context;for(let a of n.units)for(let c of a.update)if(c.kind===B.I18nExpression){let m=o.get(r(c))||0,u=i.get(c.i18nOwner)??null,h={value:m,subTemplateIndex:u,flags:mo.ExpressionIndex};KZ(c,h,e,t),o.set(r(c),m+1)}}function KZ(n,i,e,t){if(n.i18nPlaceholder!==null){let o=e.get(n.context),r=n.resolutionTime===O0.Creation?o.params:o.postprocessingParams,a=r.get(n.i18nPlaceholder)||[];a.push(i),r.set(n.i18nPlaceholder,a)}n.icuPlaceholder!==null&&t.get(n.icuPlaceholder)?.expressionPlaceholders.push(i)}function ZZ(n){for(let i of n.units){for(let e of i.functions)Y_(i,e.ops,null);Y_(i,i.create,null),Y_(i,i.update,null)}}function Y_(n,i,e){let t=new Map,o=new Map;for(let r of i)switch(r.kind){case B.Variable:switch(r.variable.kind){case Kr.Identifier:if(r.variable.local){if(o.has(r.variable.identifier))continue;o.set(r.variable.identifier,r.xref)}else if(t.has(r.variable.identifier))continue;t.set(r.variable.identifier,r.xref);break;case Kr.Alias:if(t.has(r.variable.identifier))continue;t.set(r.variable.identifier,r.xref);break;case Kr.SavedView:e={view:r.variable.view,variable:r.xref};break}break;case B.Animation:case B.AnimationListener:case B.Listener:case B.TwoWayListener:Y_(n,r.handlerOps,e);break;case B.RepeaterCreate:r.trackByOps!==null&&Y_(n,r.trackByOps,e);break}for(let r of i)r.kind===B.Listener||r.kind===B.TwoWayListener||r.kind===B.Animation||r.kind===B.AnimationListener||Yo(r,a=>{if(a instanceof Xr)return o.has(a.name)?new Dd(o.get(a.name)):t.has(a.name)?new Dd(t.get(a.name)):new Bs(new Am(n.job.root.xref),a.name);if(a instanceof L0&&typeof a.view=="number"){if(e===null||e.view!==a.view)throw new Error(`AssertionError: no saved view ${a.view} from view ${n.xref}`);return a.view=new Dd(e.variable),a}else return a},qn.None);for(let r of i)fr(r,a=>{if(a instanceof Xr)throw new Error(`AssertionError: no lexical reads should remain, but found read of ${a.name}`)})}var JZ=new Map([[ro.HTML,fe.sanitizeHtml],[ro.RESOURCE_URL,fe.sanitizeResourceUrl],[ro.SCRIPT,fe.sanitizeScript],[ro.STYLE,fe.sanitizeStyle],[ro.URL,fe.sanitizeUrl],[ro.ATTRIBUTE_NO_BINDING,fe.validateAttribute]]),eJ=new Map([[ro.HTML,fe.trustConstantHtml],[ro.RESOURCE_URL,fe.trustConstantResourceUrl]]);function tJ(n){for(let i of n.units){if(n.kind!==Dt.Host){for(let e of i.create)if(e.kind===B.ExtractedAttribute){let t=eJ.get(BF(e.securityContext))??null;e.trustedValueFn=t!==null?qt(t):null}}for(let e of i.update)switch(e.kind){case B.Property:case B.Attribute:case B.DomProperty:let t=null;Array.isArray(e.securityContext)&&e.securityContext.length===2&&e.securityContext.includes(ro.URL)&&e.securityContext.includes(ro.RESOURCE_URL)?t=fe.sanitizeUrlOrResourceUrl:t=JZ.get(BF(e.securityContext))??null,e.sanitizer=t!==null?qt(t):null;break}}}function BF(n){if(Array.isArray(n)){if(n.length>1)throw Error("AssertionError: Ambiguous security context");return n[0]||ro.NONE}return n}function nJ(n){for(let i of n.units){for(let e of i.functions)VF(n,i,e.ops)&&zF(i,e.ops,Jn(e.currentViewName));i.create.prepend([xm(i.job.allocateXrefId(),{kind:Kr.SavedView,name:null,view:i.xref},new tD,ll.None)]);for(let e of i.create)(e.kind===B.Listener||e.kind===B.TwoWayListener||e.kind===B.Animation||e.kind===B.AnimationListener)&&VF(n,i,e.handlerOps)&&zF(i,e.handlerOps,i.xref)}}function VF(n,i,e){let t=i!==n.root;if(!t)for(let o of e)fr(o,r=>{(r instanceof Vb||r instanceof F0)&&(t=!0)});return t}function zF(n,i,e){i.prepend([xm(n.job.allocateXrefId(),{kind:Kr.Context,name:null,view:n.xref},new L0(e),ll.None)]);for(let t of i)t.kind===B.Statement&&t.statement instanceof Mr&&(t.statement.value=new jb(t.statement.value))}function iJ(n){let i=new Map;for(let e of n.units){let t=0;for(let o of e.create)_f(o)&&(o.handle.slot=t,i.set(o.xref,o.handle.slot),t+=o.numSlotsUsed);e.decls=t}for(let e of n.units)for(let t of e.ops())if(t.kind===B.Template||t.kind===B.ConditionalCreate||t.kind===B.ConditionalBranchCreate||t.kind===B.RepeaterCreate){let o=n.views.get(t.xref);t.decls=o.decls}}function oJ(n){let i=new Set,e=new Map;for(let t of n.units)for(let o of t.ops())o.kind===B.DeclareLet&&e.set(o.xref,o),fr(o,r=>{r instanceof F0&&i.add(r.target)});for(let t of n.units)for(let o of t.update)Yo(o,r=>r instanceof R0&&!i.has(r.target)?(rJ(r)||Qe.remove(e.get(r.target)),r.value):r,qn.None)}function rJ(n){let i=!1;return Bt(n,e=>((e instanceof Su||e instanceof B0)&&(i=!0),e),qn.None),i}function aJ(n){let i=new Set;for(let e of n.units)for(let t of e.ops())fr(t,o=>{if(o instanceof Ci)switch(o.operator){case lt.Exponentiation:sJ(o,i);break;case lt.NullishCoalesce:lJ(o,i);break;case lt.And:case lt.Or:cJ(o,i)}});for(let e of n.units)for(let t of e.ops())Yo(t,o=>o instanceof ql?i.has(o)?o:o.expr:o,qn.None)}function sJ(n,i){n.lhs instanceof ql&&n.lhs.expr instanceof uu&&i.add(n.lhs)}function lJ(n,i){n.lhs instanceof ql&&(jF(n.lhs.expr)||n.lhs.expr instanceof Ac)&&i.add(n.lhs),n.rhs instanceof ql&&(jF(n.rhs.expr)||n.rhs.expr instanceof Ac)&&i.add(n.rhs)}function cJ(n,i){n.lhs instanceof ql&&n.lhs.expr instanceof Ci&&n.lhs.expr.operator===lt.NullishCoalesce&&i.add(n.lhs)}function jF(n){return n instanceof Ci&&(n.operator===lt.And||n.operator===lt.Or)}function dJ(n){for(let i of n.units)for(let e of i.update)if(e.kind===B.Binding)switch(e.bindingKind){case Gt.ClassName:if(e.expression instanceof Xo)throw new Error("Unexpected interpolation in ClassName binding");Qe.replace(e,Nq(e.target,e.name,e.expression,e.sourceSpan));break;case Gt.StyleProperty:Qe.replace(e,Oq(e.target,e.name,e.expression,e.unit,e.sourceSpan));break;case Gt.Property:case Gt.Template:e.name==="style"?Qe.replace(e,Rq(e.target,e.expression,e.sourceSpan)):e.name==="class"&&Qe.replace(e,Fq(e.target,e.expression,e.sourceSpan));break}}function mJ(n){for(let i of n.units){i.create.prepend(K_(i.create)),i.update.prepend(K_(i.update));for(let e of i.functions)e.ops.prepend(K_(e.ops))}}function K_(n){let i=0,e=[];for(let t of n){let o=new Map;fr(t,(u,h)=>{h&qn.InChildOperation||u instanceof Nm&&o.set(u.xref,u)});let r=0,a=new Set,c=new Set,m=new Map;fr(t,(u,h)=>{h&qn.InChildOperation||(u instanceof Bc?(a.has(u.xref)||(a.add(u.xref),m.set(u.xref,`tmp_${i}_${r++}`)),$F(m,u)):u instanceof Nm&&(o.get(u.xref)===u&&(c.add(u.xref),r--),$F(m,u)))}),e.push(...Array.from(new Set(m.values())).map(u=>js(new zr(u)))),i++,t.kind===B.Listener||t.kind===B.Animation||t.kind===B.AnimationListener||t.kind===B.TwoWayListener?t.handlerOps.prepend(K_(t.handlerOps)):t.kind===B.RepeaterCreate&&t.trackByOps!==null&&t.trackByOps.prepend(K_(t.trackByOps))}return e}function $F(n,i){let e=n.get(i.xref);if(e===void 0)throw new Error(`Found xref with unassigned name: ${i.xref}`);i.name=e}function pJ(n){for(let i of n.units)for(let e of i.create)if(e.kind===B.RepeaterCreate)if(e.track instanceof Wl&&e.track.name==="$index")e.trackByFn=qt(fe.repeaterTrackByIndex);else if(e.track instanceof Wl&&e.track.name==="$item")e.trackByFn=qt(fe.repeaterTrackByIdentity);else if(uJ(n.root.xref,e.track))e.usesComponentInstance=!0,e.track.receiver.receiver.view===i.xref?e.trackByFn=e.track.receiver:(e.trackByFn=qt(fe.componentInstance).callFn([]).prop(e.track.receiver.name),e.track=e.trackByFn);else{e.track=Bt(e.track,o=>{if(o instanceof Su||o instanceof B0)throw new Error("Illegal State: Pipes are not allowed in this context");return o instanceof Am?(e.usesComponentInstance=!0,new eD(o.view)):o},qn.None);let t=new Qe;t.push(js(new Mr(e.track,e.track.sourceSpan))),e.trackByOps=t}}function uJ(n,i){if(!(i instanceof ps)||i.args.length===0||i.args.length>2||!(i.receiver instanceof Bs&&i.receiver.receiver instanceof Am)||i.receiver.receiver.view!==n)return!1;let[e,t]=i.args;return!(e instanceof Wl)||e.name!=="$index"?!1:i.args.length===1?!0:!(!(t instanceof Wl)||t.name!=="$item")}function hJ(n){for(let i of n.units)for(let e of i.create)e.kind===B.RepeaterCreate&&(e.track=Bt(e.track,t=>{if(t instanceof Xr){if(e.varNames.$index.has(t.name))return Jn("$index");if(t.name===e.varNames.$implicit)return Jn("$item")}return t},qn.None))}function fJ(n){for(let i of n.units)for(let e of i.create)e.kind===B.TwoWayListener&&Yo(e,t=>{if(!(t instanceof $b))return t;let{target:o,value:r}=t;if(o instanceof Bs||o instanceof Pd)return AF(o,r).or(o.set(r));if(o instanceof Dd)return AF(o,r);throw new Error("Unsupported expression in two-way action binding.")},qn.InChildOperation)}function gJ(n){for(let i of n.units){let e=0;for(let r of i.ops())tE(r)&&(e+=_J(r));let t=r=>{Lc(r)&&(r instanceof yu||(QR(r)&&(r.varOffset=e),tE(r)&&(e+=HF(r))))},o=r=>{!Lc(r)||!(r instanceof yu)||(QR(r)&&(r.varOffset=e),tE(r)&&(e+=HF(r)))};for(let r of i.create)fr(r,t);for(let r of i.update)fr(r,t);for(let r of i.create)fr(r,o);for(let r of i.update)fr(r,o);i.vars=e}if(n instanceof j0)for(let i of n.units)for(let e of i.create){if(e.kind!==B.Template&&e.kind!==B.RepeaterCreate&&e.kind!==B.ConditionalCreate&&e.kind!==B.ConditionalBranchCreate)continue;let t=n.views.get(e.xref);e.vars=t.vars}}function _J(n){let i;switch(n.kind){case B.Attribute:return i=1,n.expression instanceof Xo&&!vJ(n.expression)&&(i+=n.expression.expressions.length),i;case B.Property:case B.DomProperty:return i=1,n.expression instanceof Xo&&(i+=n.expression.expressions.length),i;case B.Control:return 2;case B.TwoWayProperty:return 1;case B.StyleProp:case B.ClassProp:case B.StyleMap:case B.ClassMap:return i=2,n.expression instanceof Xo&&(i+=n.expression.expressions.length),i;case B.InterpolateText:return n.interpolation.expressions.length;case B.I18nExpression:case B.Conditional:case B.DeferWhen:case B.StoreLet:return 1;case B.RepeaterCreate:return n.emptyView?1:0;default:throw new Error(`Unhandled op: ${B[n.kind]}`)}}function HF(n){switch(n.kind){case Kt.PureFunctionExpr:return 1+n.args.length;case Kt.PipeBinding:return 1+n.args.length;case Kt.PipeBindingVariadic:return 1+n.numArgs;case Kt.StoreLet:case Kt.ArrowFunction:return 1;default:throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${n.constructor.name}`)}}function vJ(n){return!(n.expressions.length!==1||n.strings.length!==2||n.strings[0]!==""||n.strings[1]!=="")}function CJ(n){for(let i of n.units){for(let e of i.functions)R_(e.ops);R_(i.create),R_(i.update);for(let e of i.create)e.kind===B.Listener||e.kind===B.Animation||e.kind===B.AnimationListener||e.kind===B.TwoWayListener?R_(e.handlerOps):e.kind===B.RepeaterCreate&&e.trackByOps!==null&&R_(e.trackByOps);for(let e of i.functions)F_(e.ops,null),UF(e.ops);for(let e of i.create)e.kind===B.Listener||e.kind===B.Animation||e.kind===B.AnimationListener||e.kind===B.TwoWayListener?(F_(e.handlerOps,Q1),UF(e.handlerOps)):e.kind===B.RepeaterCreate&&e.trackByOps!==null&&F_(e.trackByOps,Q1);F_(i.create,Q1),F_(i.update,Q1)}}var Vr=(function(n){return n[n.None=0]="None",n[n.ViewContextRead=1]="ViewContextRead",n[n.ViewContextWrite=2]="ViewContextWrite",n[n.SideEffectful=4]="SideEffectful",n})(Vr||{});function Q1(n){return!(n&qn.InArrowFunctionOperation)}function R_(n){let i=new Map;for(let e of n)e.kind===B.Variable&&e.flags&ll.AlwaysInline&&(fr(e,t=>{if(Lc(t)&&pP(t)!==Vr.None)throw new Error("AssertionError: A context-sensitive variable was marked AlwaysInline")}),i.set(e.xref,e)),Yo(e,t=>t instanceof Dd&&i.has(t.xref)?i.get(t.xref).initializer.clone():t,qn.None);for(let e of i.values())Qe.remove(e)}function F_(n,i){let e=new Map,t=new Map,o=new Set,r=new Map;for(let u of n){if(u.kind===B.Variable){if(e.has(u.xref)||t.has(u.xref))throw new Error(`Should not see two declarations of the same variable: ${u.xref}`);e.set(u.xref,u),t.set(u.xref,0)}r.set(u,bJ(u,i)),xJ(u,t,o,i)}let a=!1;for(let u of n.reversed()){let h=r.get(u);if(u.kind===B.Variable&&t.get(u.xref)===0){if(a&&h.fences&Vr.ViewContextWrite||h.fences&Vr.SideEffectful){let g=js(u.initializer.toStmt());r.set(g,h),Qe.replace(u,g)}else yJ(u,t),Qe.remove(u);r.delete(u),e.delete(u.xref),t.delete(u.xref);continue}h.fences&Vr.ViewContextRead&&(a=!0)}let c=[];for(let[u,h]of t){let S=!!(e.get(u).flags&ll.AlwaysInline);h!==1||S||o.has(u)||c.push(u)}let m;for(;m=c.pop();){let u=e.get(m),h=r.get(u);if(!!(u.flags&ll.AlwaysInline))throw new Error("AssertionError: Found an 'AlwaysInline' variable after the always inlining pass.");for(let S=u.next;S.kind!==B.ListEnd;S=S.next){let x=r.get(S);if(x.variablesUsed.has(m)){if(!wJ(u,S))break;if(SJ(m,u.initializer,S,h.fences)){x.variablesUsed.delete(m);for(let C of h.variablesUsed)x.variablesUsed.add(C);x.fences|=h.fences,e.delete(m),t.delete(m),r.delete(u),Qe.remove(u)}break}if(!C8(x.fences,h.fences))break}}}function pP(n){switch(n.kind){case Kt.NextContext:return Vr.ViewContextRead|Vr.ViewContextWrite;case Kt.RestoreView:return Vr.ViewContextRead|Vr.ViewContextWrite|Vr.SideEffectful;case Kt.StoreLet:return Vr.SideEffectful;case Kt.Reference:case Kt.ContextLetReference:return Vr.ViewContextRead;default:return Vr.None}}function bJ(n,i){let e=Vr.None,t=new Set;return fr(n,(o,r)=>{!Lc(o)||i!==null&&!i(r)||(o.kind===Kt.ReadVariable?t.add(o.xref):e|=pP(o))}),{fences:e,variablesUsed:t}}function xJ(n,i,e,t){fr(n,(o,r)=>{if(!Lc(o)||t!==null&&!t(r)||o.kind!==Kt.ReadVariable)return;let a=i.get(o.xref);a!==void 0&&(i.set(o.xref,a+1),r&qn.InChildOperation&&e.add(o.xref))})}function yJ(n,i){fr(n,e=>{if(!Lc(e)||e.kind!==Kt.ReadVariable)return;let t=i.get(e.xref);if(t!==void 0){if(t===0)throw new Error(`Inaccurate variable count: ${e.xref} - found another read but count is already 0`);i.set(e.xref,t-1)}})}function C8(n,i){if(n&Vr.ViewContextWrite){if(i&Vr.ViewContextRead)return!1}else if(n&Vr.ViewContextRead&&i&Vr.ViewContextWrite)return!1;return!0}function SJ(n,i,e,t){let o=!1,r=!0;return Yo(e,(a,c)=>{if(!Lc(a)||o||!r)return a;if(c&qn.InChildOperation&&t&Vr.ViewContextRead)return a;switch(a.kind){case Kt.ReadVariable:if(a.xref===n)return o=!0,i;break;default:let m=pP(a);r=r&&C8(m,t);break}return a},qn.None),o}function wJ(n,i){switch(n.variable.kind){case Kr.Identifier:return n.initializer instanceof Wl&&n.initializer.name===zs;case Kr.Context:return i.kind===B.Variable;default:return!0}}function UF(n){let i=n.head.next,e=n.tail.prev;i!==null&&e!==null&&i.next===e&&i.kind===B.Statement&&i.statement instanceof ha&&i.statement.expr instanceof L0&&e.kind===B.Statement&&e.statement instanceof Mr&&e.statement.value instanceof jb&&(Qe.remove(i),e.statement.value=e.statement.value.expr)}function MJ(n){for(let i of n.units){let e=null,t=null;for(let o of i.create)switch(o.kind){case B.I18nStart:e=o;break;case B.I18nEnd:e=null;break;case B.IcuStart:e===null&&(t=n.allocateXrefId(),Qe.insertBefore(fx(t,o.message,void 0,null),o));break;case B.IcuEnd:t!==null&&(Qe.insertAfter(gx(t,null),o),t=null);break}}}function kJ(n){for(let i of n.units){for(let e of i.create)e.kind!==B.Animation&&e.kind!==B.AnimationListener&&e.kind!==B.Listener&&e.kind!==B.TwoWayListener&&GF(i,e);for(let e of i.update)GF(i,e)}}function GF(n,i){Yo(i,(e,t)=>{if(!(e instanceof ku)||t&qn.InChildOperation)return e;if(Array.isArray(e.body))throw new Error("AssertionError: unexpected multi-line arrow function");let o=new nD(e.params,e.body);return n.functions.add(o),o},qn.None)}var TJ=new Set(["formField"]);function EJ(n){for(let i of n.units)DJ(i)}function DJ(n){for(let i of n.update)i.kind===B.Property&&TJ.has(i.name)&&OJ(n,i)}var PJ=new Set([B.Container,B.ContainerStart,B.ContainerEnd,B.Element,B.ElementStart,B.ElementEnd,B.Template]);function IJ(n){return PJ.has(n.kind)}function AJ(n,i){let e=null;for(let t of n.create)!IJ(t)||t.xref!==i||(e=t);return e}function OJ(n,i){let e=AJ(n,i.target);if(e===null)throw new Error(`No create instruction found for control target ${i.target}`);let t=lQ(i.sourceSpan);Qe.insertAfter(t,e),Qe.insertAfter($q(i.target,i.sourceSpan),i)}var NJ=[{kind:Dt.Tmpl,fn:JY},{kind:Dt.Both,fn:pK},{kind:Dt.Host,fn:pX},{kind:Dt.Tmpl,fn:FY},{kind:Dt.Tmpl,fn:aK},{kind:Dt.Tmpl,fn:MJ},{kind:Dt.Both,fn:NQ},{kind:Dt.Both,fn:dJ},{kind:Dt.Both,fn:CQ},{kind:Dt.Tmpl,fn:EJ},{kind:Dt.Both,fn:PQ},{kind:Dt.Both,fn:gQ},{kind:Dt.Tmpl,fn:OQ},{kind:Dt.Both,fn:BY},{kind:Dt.Tmpl,fn:$Z},{kind:Dt.Both,fn:yQ},{kind:Dt.Both,fn:ZY},{kind:Dt.Tmpl,fn:SQ},{kind:Dt.Tmpl,fn:nK},{kind:Dt.Tmpl,fn:RQ},{kind:Dt.Tmpl,fn:rK},{kind:Dt.Both,fn:kJ},{kind:Dt.Both,fn:cK},{kind:Dt.Tmpl,fn:lX},{kind:Dt.Tmpl,fn:sX},{kind:Dt.Tmpl,fn:cX},{kind:Dt.Tmpl,fn:nJ},{kind:Dt.Both,fn:dQ},{kind:Dt.Both,fn:QZ},{kind:Dt.Tmpl,fn:hJ},{kind:Dt.Tmpl,fn:UZ},{kind:Dt.Both,fn:ZZ},{kind:Dt.Tmpl,fn:FQ},{kind:Dt.Tmpl,fn:fJ},{kind:Dt.Tmpl,fn:pJ},{kind:Dt.Both,fn:WZ},{kind:Dt.Both,fn:tJ},{kind:Dt.Tmpl,fn:NY},{kind:Dt.Both,fn:jQ},{kind:Dt.Both,fn:aJ},{kind:Dt.Both,fn:mJ},{kind:Dt.Both,fn:CJ},{kind:Dt.Both,fn:oJ},{kind:Dt.Tmpl,fn:OY},{kind:Dt.Tmpl,fn:AQ},{kind:Dt.Tmpl,fn:GZ},{kind:Dt.Tmpl,fn:hQ},{kind:Dt.Tmpl,fn:pQ},{kind:Dt.Tmpl,fn:iJ},{kind:Dt.Tmpl,fn:XZ},{kind:Dt.Tmpl,fn:YZ},{kind:Dt.Tmpl,fn:nX},{kind:Dt.Tmpl,fn:EY},{kind:Dt.Tmpl,fn:dX},{kind:Dt.Both,fn:TQ},{kind:Dt.Tmpl,fn:HZ},{kind:Dt.Both,fn:gJ},{kind:Dt.Tmpl,fn:aX},{kind:Dt.Both,fn:VY},{kind:Dt.Tmpl,fn:qZ},{kind:Dt.Tmpl,fn:$Y},{kind:Dt.Tmpl,fn:UY},{kind:Dt.Tmpl,fn:zQ},{kind:Dt.Tmpl,fn:fQ},{kind:Dt.Tmpl,fn:WY},{kind:Dt.Both,fn:lK},{kind:Dt.Both,fn:FZ},{kind:Dt.Both,fn:xQ}];function b8(n,i){for(let e of NJ)(e.kind===i||e.kind===Dt.Both)&&e.fn(n)}function RJ(n,i){let e=y8(n.root);return x8(n.root,i),e}function x8(n,i){for(let e of n.job.units){if(e.parent!==n.xref)continue;x8(e,i);let t=y8(e);i.statements.push(t.toDeclStmt(t.name))}}function y8(n){if(n.fnName===null)throw new Error(`AssertionError: view ${n.xref} is unnamed`);let i=[];for(let r of n.create){if(r.kind!==B.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${B[r.kind]}`);i.push(r.statement)}let e=[];for(let r of n.update){if(r.kind!==B.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${B[r.kind]}`);e.push(r.statement)}let t=ox(1,i),o=ox(2,e);return km([new wr(hf,mu),new wr(zs,ms)],[...t,...o],void 0,void 0,n.fnName)}function ox(n,i){return i.length===0?[]:[mx(new Ci(lt.BitwiseAnd,Jn(hf),ke(n)),i)]}function FJ(n){if(n.root.fnName===null)throw new Error("AssertionError: host binding function is unnamed");let i=[];for(let r of n.root.create){if(r.kind!==B.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${B[r.kind]}`);i.push(r.statement)}let e=[];for(let r of n.root.update){if(r.kind!==B.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${B[r.kind]}`);e.push(r.statement)}if(i.length===0&&e.length===0)return null;let t=ox(1,i),o=ox(2,e);return km([new wr(hf,mu),new wr(zs,ms)],[...t,...o],void 0,void 0,n.root.fnName)}var cu=new pf,du="ng-template",LJ="animate.";function nb(n){return n instanceof Qa}function BJ(n){return nb(n)&&n.nodes.length===1&&n.nodes[0]instanceof Ab}function VJ(n,i,e,t,o,r,a,c,m,u){let h=new j0(n,e,t,o,r,a,c,m,u);return Ad(h.root,i),h}function zJ(n,i,e){let t=new Qb(n.componentName,e,as.DomOnly);for(let o of n.properties??[]){let r=Gt.Property;o.name.startsWith("attr.")&&(o.name=o.name.substring(5),r=Gt.Attribute),o.isLegacyAnimation&&(r=Gt.LegacyAnimation),o.isAnimation&&(r=Gt.Animation);let a=i.calcPossibleSecurityContexts(n.componentSelector,o.name,r===Gt.Attribute).filter(c=>c!==ro.NONE);jJ(t,o,r,a)}for(let[o,r]of Object.entries(n.attributes)??[]){let a=i.calcPossibleSecurityContexts(n.componentSelector,o,!0).filter(c=>c!==ro.NONE);$J(t,o,r,a)}for(let o of n.events??[])HJ(t,o);return t}function jJ(n,i,e,t){let o,r=i.expression.ast;r instanceof K0?o=new Xo(r.strings,r.expressions.map(a=>In(a,n,i.sourceSpan)),[]):o=In(r,n,i.sourceSpan),n.root.update.push(xu(n.root.xref,e,i.name,o,null,t,!1,!1,null,null,i.sourceSpan))}function $J(n,i,e,t){let o=xu(n.root.xref,Gt.Attribute,i,e,null,t,!0,!1,null,null,e.sourceSpan);n.root.update.push(o)}function HJ(n,i){let e;if(i.type===qa.Animation)e=Y6(n.root.xref,new fa,i.name,null,W0(n.root,i.handler,i.handlerSpan),i.name.endsWith("enter")?"enter":"leave",i.targetOrPhase,!0,i.sourceSpan);else{let[t,o]=i.type!==qa.LegacyAnimation?[null,i.targetOrPhase]:[i.targetOrPhase,null];e=cP(n.root.xref,new fa,i.name,null,W0(n.root,i.handler,i.handlerSpan),t,o,!0,i.sourceSpan)}n.root.create.push(e)}function Ad(n,i){for(let e of i)if(e instanceof Rc)UJ(n,e);else if(e instanceof Fs)GJ(n,e);else if(e instanceof rf)WJ(n,e);else if(e instanceof tu)S8(n,e,null);else if(e instanceof tf)w8(n,e,null);else if(e instanceof Pb)qJ(n,e);else if(e instanceof Db)QJ(n,e);else if(e instanceof Cu)XJ(n,e);else if(e instanceof x6)KJ(n,e);else if(e instanceof of)ZJ(n,e);else if(e instanceof JD)eee(n,e);else if(!(e instanceof G_))throw new Error(`Unsupported template node: ${e.constructor.name}`)}function UJ(n,i){if(i.i18n!==void 0&&!(i.i18n instanceof Qa||i.i18n instanceof Em))throw Error(`Unhandled i18n metadata type for element: ${i.i18n.constructor.name}`);let e=n.job.allocateXrefId(),[t,o]=Xl(i.name),r=Uq(o,e,n8(t),i.i18n instanceof Em?i.i18n:void 0,i.startSourceSpan,i.sourceSpan);n.create.push(r),nee(n,r,i),T8(r,i);let a=null;i.i18n instanceof Qa&&(a=n.job.allocateXrefId(),n.create.push(fx(a,i.i18n,void 0,i.startSourceSpan))),Ad(n,i.children);let c=Wq(e,i.endSourceSpan??i.startSourceSpan);n.create.push(c),a!==null&&Qe.insertBefore(gx(a,i.endSourceSpan??i.startSourceSpan),c)}function GJ(n,i){if(i.i18n!==void 0&&!(i.i18n instanceof Qa||i.i18n instanceof Em))throw Error(`Unhandled i18n metadata type for template: ${i.i18n.constructor.name}`);let e=n.job.allocateView(n.xref),t=i.tagName,o="";i.tagName&&([o,t]=Xl(i.tagName));let r=i.i18n instanceof Em?i.i18n:void 0,a=n8(o),c=t===null?"":kQ(t,a),m=tee(i)?ds.NgTemplate:ds.Structural,u=W6(e.xref,m,t,c,a,r,i.startSourceSpan,i.sourceSpan);n.create.push(u),iee(n,u,i,m),T8(u,i),Ad(e,i.children);for(let{name:h,value:g}of i.variables)e.contextVariables.set(h,g!==""?g:"$implicit");if(m===ds.NgTemplate&&i.i18n instanceof Qa){let h=n.job.allocateXrefId();Qe.insertAfter(fx(h,i.i18n,void 0,i.startSourceSpan),e.create.head),Qe.insertBefore(gx(h,i.endSourceSpan??i.startSourceSpan),e.create.tail)}}function WJ(n,i){if(i.i18n!==void 0&&!(i.i18n instanceof Em))throw Error(`Unhandled i18n metadata type for element: ${i.i18n.constructor.name}`);let e=null;i.children.some(r=>!(r instanceof ux)&&(!(r instanceof tu)||r.value.trim().length>0))&&(e=n.job.allocateView(n.xref),Ad(e,i.children));let t=n.job.allocateXrefId(),o=eQ(t,i.selector,i.i18n,e?.xref??null,i.sourceSpan);for(let r of i.attributes){let a=cu.securityContext(i.name,r.name,!0);n.update.push(xu(o.xref,Gt.Attribute,r.name,ke(r.value),null,a,!0,!1,null,Td(r.i18n),r.sourceSpan))}n.create.push(o)}function S8(n,i,e){n.create.push(X6(n.job.allocateXrefId(),i.value,e,i.sourceSpan))}function w8(n,i,e){let t=i.value;if(t instanceof cs&&(t=t.ast),!(t instanceof K0))throw new Error(`AssertionError: expected Interpolation for BoundText node, got ${t.constructor.name}`);if(i.i18n!==void 0&&!(i.i18n instanceof Ed))throw Error(`Unhandled i18n metadata type for text interpolation: ${i.i18n?.constructor.name}`);let o=i.i18n instanceof Ed?i.i18n.children.filter(a=>a instanceof T0).map(a=>a.name):[];if(o.length>0&&o.length!==t.expressions.length)throw Error(`Unexpected number of i18n placeholders (${t.expressions.length}) for BoundText with ${t.expressions.length} expressions`);let r=n.job.allocateXrefId();n.create.push(X6(r,"",e,i.sourceSpan)),n.update.push(Pq(r,new Xo(t.strings,t.expressions.map(a=>In(a,n.job,null)),o),i.sourceSpan))}function qJ(n,i){let e=null,t=[];for(let o=0;oS.modifier==="none")||h.some(S=>S.modifier==="none")||u.push(vm(c,{kind:oo.Idle},"none",null)),n.create.push(u),n.update.push(h)}function YJ(n){return Object.keys(n.hydrateTriggers).length>0?1:null}function sE(n,i,e,t,o,r){if(i.idle!==void 0){let a=vm(r,{kind:oo.Idle},n,i.idle.sourceSpan);e.push(a)}if(i.immediate!==void 0){let a=vm(r,{kind:oo.Immediate},n,i.immediate.sourceSpan);e.push(a)}if(i.timer!==void 0){let a=vm(r,{kind:oo.Timer,delay:i.timer.delay},n,i.timer.sourceSpan);e.push(a)}if(i.hover!==void 0){let a=vm(r,{kind:oo.Hover,targetName:i.hover.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},n,i.hover.sourceSpan);e.push(a)}if(i.interaction!==void 0){let a=vm(r,{kind:oo.Interaction,targetName:i.interaction.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},n,i.interaction.sourceSpan);e.push(a)}if(i.viewport!==void 0){let a=vm(r,{kind:oo.Viewport,targetName:i.viewport.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null,options:i.viewport.options?In(i.viewport.options,o.job,i.viewport.sourceSpan):null},n,i.viewport.sourceSpan);e.push(a)}if(i.never!==void 0){let a=vm(r,{kind:oo.Never},n,i.never.sourceSpan);e.push(a)}if(i.when!==void 0){if(i.when.value instanceof K0)throw new Error("Unexpected interpolation in defer block when trigger");let a=Vq(r,In(i.when.value,o.job,i.when.sourceSpan),n,i.when.sourceSpan);t.push(a)}}function KJ(n,i){if(i.i18n instanceof Qa&&BJ(i.i18n)){let e=n.job.allocateXrefId();n.create.push(oQ(e,i.i18n,w6(i.i18n).name,null));for(let[t,o]of Object.entries(q(q({},i.vars),i.placeholders)))o instanceof tf?w8(n,o,t):S8(n,o,t);n.create.push(rQ(e))}else throw Error(`Unhandled i18n metadata type for ICU: ${i.i18n?.constructor.name}`)}function ZJ(n,i){let e=n.job.allocateView(n.xref),t=`\u0275$index_${e.xref}`,o=`\u0275$count_${e.xref}`,r=new Set;e.contextVariables.set(i.item.name,i.item.value);for(let y of i.contextVariables)y.value==="$index"&&r.add(y.name),y.name==="$index"?e.contextVariables.set("$index",y.value).set(t,y.value):y.name==="$count"?e.contextVariables.set("$count",y.value).set(o,y.value):e.aliases.add({kind:Kr.Alias,name:null,identifier:y.name,expression:JJ(y,t,o)});let a=Lr(i.trackBy.span,i.sourceSpan),c=In(i.trackBy,n.job,a);Ad(e,i.children);let m=null,u=null;i.empty!==null&&(m=n.job.allocateView(n.xref),Ad(m,i.empty.children),u=rx(n,m.xref,i.empty));let h={$index:r,$implicit:i.item.name};if(i.i18n!==void 0&&!(i.i18n instanceof Dm))throw Error("AssertionError: Unhandled i18n metadata type or @for");if(i.empty?.i18n!==void 0&&!(i.empty.i18n instanceof Dm))throw Error("AssertionError: Unhandled i18n metadata type or @empty");let g=i.i18n,S=i.empty?.i18n,x=rx(n,e.xref,i),C=Gq(e.xref,m?.xref??null,x,c,h,u,g,S,i.startSourceSpan,i.sourceSpan);n.create.push(C);let M=In(i.expression,n.job,Lr(i.expression.span,i.sourceSpan)),w=Bq(C.xref,C.handle,M,i.sourceSpan);n.update.push(w)}function JJ(n,i,e){switch(n.value){case"$index":return new Xr(i);case"$count":return new Xr(e);case"$first":return new Xr(i).identical(ke(0));case"$last":return new Xr(i).identical(new Xr(e).minus(ke(1)));case"$even":return new Xr(i).modulo(ke(2)).identical(ke(0));case"$odd":return new Xr(i).modulo(ke(2)).notIdentical(ke(0));default:throw new Error(`AssertionError: unknown @for loop variable ${n.value}`)}}function eee(n,i){let e=n.job.allocateXrefId();n.create.push(nQ(e,i.name,i.sourceSpan)),n.update.push(jq(e,i.name,In(i.value,n.job,i.valueSpan),i.sourceSpan))}function In(n,i,e){if(n instanceof cs)return In(n.ast,i,e);if(n instanceof Ec)return n.receiver instanceof Nc?new Xr(n.name):new Bs(In(n.receiver,i,e),n.name,null,Lr(n.span,e));if(n instanceof Jh){if(n.receiver instanceof Nc)throw new Error("Unexpected ImplicitReceiver");return new ps(In(n.receiver,i,e),n.args.map(t=>In(t,i,e)),void 0,Lr(n.span,e))}else{if(n instanceof ss)return ke(n.value,void 0,Lr(n.span,e));if(n instanceof Gh)switch(n.operator){case"+":return new uu(J_.Plus,In(n.expr,i,e),void 0,Lr(n.span,e));case"-":return new uu(J_.Minus,In(n.expr,i,e),void 0,Lr(n.span,e));default:throw new Error(`AssertionError: unknown unary operator ${n.operator}`)}else if(n instanceof $a){let t=wQ.get(n.operation);if(t===void 0)throw new Error(`AssertionError: unknown binary operator ${n.operation}`);return new Ci(t,In(n.left,i,e),In(n.right,i,e),void 0,Lr(n.span,e))}else{if(n instanceof s0)return new Am(i.root.xref);if(n instanceof _u)return new Pd(In(n.receiver,i,e),In(n.key,i,e),void 0,Lr(n.span,e));if(n instanceof Zh)throw new Error("AssertionError: Chain in unknown context");if(n instanceof vu){let t=n.keys.map((o,r)=>{let a=In(n.values[r],i,e);return o.kind==="spread"?new Mm(a):new Yh(o.key,a,o.quoted)});return new Ql(t,void 0,Lr(n.span,e))}else{if(n instanceof d0)return new Oc(n.expressions.map(t=>In(t,i,e)));if(n instanceof _b)return new Ac(In(n.condition,i,e),In(n.trueExp,i,e),In(n.falseExp,i,e),void 0,Lr(n.span,e));if(n instanceof h0)return In(n.expression,i,e);if(n instanceof vb)return new Su(i.allocateXrefId(),new fa,n.name,[In(n.exp,i,e),...n.args.map(t=>In(t,i,e))]);if(n instanceof c0)return new cf(In(n.receiver,i,e),In(n.key,i,e),Lr(n.span,e));if(n instanceof l0)return new lf(In(n.receiver,i,e),n.name);if(n instanceof bb)return new wu(In(n.receiver,i,e),n.args.map(t=>In(t,i,e)));if(n instanceof wa)return new V0(Lr(n.span,e));if(n instanceof m0)return HG(In(n.expression,i,e),Lr(n.span,e));if(n instanceof p0)return Y0(In(n.expression,i,e));if(n instanceof u0)return new lb(In(n.expression,i,e),void 0,Lr(n.span,e));if(n instanceof g0)return WF(n,i,e);if(n instanceof f0)return new e0(In(n.tag,i,e),WF(n.template,i,e),void 0,Lr(n.span,e));if(n instanceof _0)return new ql(In(n.expression,i,e),void 0,Lr(n.span,e));if(n instanceof Sb)return new Xh(n.body,n.flags,e);if(n instanceof Cb)return new hu(In(n.expression,i,e));if(n instanceof yb)return ree(Vs(n.parameters.map(t=>new wr(t.name,ms)),In(n.body,i,e)));throw new Error(`Unhandled expression type "${n.constructor.name}" in file "${e?.start.file.url}"`)}}}}function WF(n,i,e){return new n0(n.elements.map(t=>new cb(t.text,Lr(t.span,e))),n.expressions.map(t=>In(t,i,e)),Lr(n.span,e))}function ED(n,i,e,t){let o;return i instanceof K0?o=new Xo(i.strings,i.expressions.map(r=>In(r,n,null)),Object.keys(Td(e)?.placeholders??{})):i instanceof ao?o=In(i,n,null):o=ke(i),o}var M8=new Map([[Di.Property,Gt.Property],[Di.TwoWay,Gt.TwoWayProperty],[Di.Attribute,Gt.Attribute],[Di.Class,Gt.ClassName],[Di.Style,Gt.StyleProperty],[Di.LegacyAnimation,Gt.LegacyAnimation],[Di.Animation,Gt.Animation]]);function tee(n){return Xl(n.tagName??"")[1]===du}function Td(n){if(n==null)return null;if(!(n instanceof Qa))throw Error(`Expected i18n meta to be a Message, but got: ${n.constructor.name}`);return n}function nee(n,i,e){let t=new Array,o=new Set;for(let r of e.attributes){let a=cu.securityContext(e.name,r.name,!0);t.push(xu(i.xref,Gt.Attribute,r.name,ED(n.job,r.value,r.i18n),null,a,!0,!1,null,Td(r.i18n),r.sourceSpan)),r.i18n&&o.add(r.name)}for(let r of e.inputs)o.has(r.name)&&console.error(`On component ${n.job.componentName}, the binding ${r.name} is both an i18n attribute and a property. You may want to remove the property binding. This will become a compilation error in future versions of Angular.`),t.push(xu(i.xref,M8.get(r.type),r.name,ED(n.job,q0(r.value),r.i18n),r.unit,r.securityContext,!1,!1,null,Td(r.i18n)??null,r.sourceSpan));n.create.push(t.filter(r=>r?.kind===B.ExtractedAttribute)),n.update.push(t.filter(r=>r?.kind===B.Binding));for(let r of e.outputs){if(r.type===qa.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");r.type===qa.TwoWay?n.create.push(K6(i.xref,i.handle,r.name,i.tag,k8(n,r.handler,r.handlerSpan),r.sourceSpan)):r.type===qa.Animation?n.create.push(Y6(i.xref,i.handle,r.name,i.tag,W0(n,r.handler,r.handlerSpan),r.name.endsWith("enter")?"enter":"leave",r.target,!1,r.sourceSpan)):n.create.push(cP(i.xref,i.handle,r.name,i.tag,W0(n,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))}t.some(r=>r?.i18nMessage)!==null&&n.create.push(Z6(n.job.allocateXrefId(),new fa,i.xref))}function iee(n,i,e,t){let o=new Array;for(let r of e.templateAttrs)if(r instanceof nf){let a=cu.securityContext(du,r.name,!0);o.push(Y1(n,i.xref,Di.Attribute,r.name,r.value,null,a,!0,t,Td(r.i18n),r.sourceSpan))}else o.push(Y1(n,i.xref,r.type,r.name,q0(r.value),r.unit,r.securityContext,!0,t,Td(r.i18n),r.sourceSpan));for(let r of e.attributes){let a=cu.securityContext(du,r.name,!0);o.push(Y1(n,i.xref,Di.Attribute,r.name,r.value,null,a,!1,t,Td(r.i18n),r.sourceSpan))}for(let r of e.inputs)o.push(Y1(n,i.xref,r.type,r.name,q0(r.value),r.unit,r.securityContext,!1,t,Td(r.i18n),r.sourceSpan));n.create.push(o.filter(r=>r?.kind===B.ExtractedAttribute)),n.update.push(o.filter(r=>r?.kind===B.Binding));for(let r of e.outputs){if(r.type===qa.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");if(t===ds.NgTemplate&&(r.type===qa.TwoWay?n.create.push(K6(i.xref,i.handle,r.name,i.tag,k8(n,r.handler,r.handlerSpan),r.sourceSpan)):n.create.push(cP(i.xref,i.handle,r.name,i.tag,W0(n,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))),t===ds.Structural&&r.type!==qa.LegacyAnimation){let a=cu.securityContext(du,r.name,!1);n.create.push(cl(i.xref,Gt.Property,null,r.name,null,null,null,a))}}o.some(r=>r?.i18nMessage)!==null&&n.create.push(Z6(n.job.allocateXrefId(),new fa,i.xref))}function Y1(n,i,e,t,o,r,a,c,m,u,h){let g=typeof o=="string";if(m===ds.Structural){if(!c)switch(e){case Di.Property:case Di.Class:case Di.Style:return cl(i,Gt.Property,null,t,null,null,u,a);case Di.TwoWay:return cl(i,Gt.TwoWayProperty,null,t,null,null,u,a)}if(!g&&(e===Di.Attribute||e===Di.LegacyAnimation||e===Di.Animation))return null}let S=M8.get(e);return m===ds.NgTemplate&&(e===Di.Class||e===Di.Style||e===Di.Attribute&&!g)&&(S=Gt.Property),xu(i,S,t,ED(n.job,o,u),r,a,g,c,m,u,h)}function W0(n,i,e){i=q0(i);let t=new Array,o=i instanceof Zh?i.expressions:[i];if(o.length===0)throw new Error("Expected listener to have non-empty expression list.");let r=o.map(c=>In(c,n.job,e)),a=r.pop();return t.push(...r.map(c=>js(new ha(c,c.sourceSpan)))),t.push(js(new Mr(a,a.sourceSpan))),t}function k8(n,i,e){i=q0(i);let t=new Array;if(i instanceof Zh)if(i.expressions.length===1)i=i.expressions[0];else throw new Error("Expected two-way listener to have a single expression.");let o=In(i,n.job,e),r=new Xr("$event"),a=new $b(o,r);return t.push(js(new ha(a))),t.push(js(new Mr(r))),t}function q0(n){return n instanceof cs?n.ast:n}function T8(n,i){oee(n.localRefs);for(let{name:e,value:t}of i.references)n.localRefs.push({name:e,target:t})}function oee(n){if(!Array.isArray(n))throw new Error("AssertionError: expected an array")}function Lr(n,i){if(i===null)return null;let e=i.start.moveBy(n.start),t=i.start.moveBy(n.end),o=i.fullStart.moveBy(n.start);return new _n(e,t,o)}function rx(n,i,e){let t=null;for(let o of e.children)if(!(o instanceof ux||o instanceof JD)){if(t!==null)return null;if(o instanceof Rc||o instanceof Fs&&o.tagName!==null)t=o;else return null}if(t!==null){for(let r of t.attributes)if(!r.name.startsWith(LJ)){let a=cu.securityContext(du,r.name,!0);n.update.push(xu(i,Gt.Attribute,r.name,ke(r.value),null,a,!0,!1,null,Td(r.i18n),r.sourceSpan))}for(let r of t.inputs)if(r.type!==Di.LegacyAnimation&&r.type!==Di.Animation&&r.type!==Di.Attribute){let a=cu.securityContext(du,r.name,!0);n.create.push(cl(i,Gt.Property,null,r.name,null,null,null,a))}let o=t instanceof Rc?t.name:t.tagName;return o===du?null:o}return null}function ree(n){let i=new Set(n.params.map(e=>e.name));return Bt(n,e=>{if(e instanceof ku)for(let t of e.params)i.add(t.name);else if(e instanceof Xr&&i.has(e.name))return Jn(e.name);return e},qn.None)}var aee=!1;function see(){return aee}function ax(n,i){return mx(Jn(hf).bitwiseAnd(ke(n),null),i)}function lee(n){return(n.descendants?1:0)|(n.static?2:0)|(n.emitDistinctChangesOnly?4:0)}function cee(n,i){if(Array.isArray(n.predicate)){let e=[];return n.predicate.forEach(t=>{let o=t.split(",").map(r=>ke(r.trim()));e.push(...o)}),i.getConstLiteral(Yi(e),!0)}else switch(n.predicate.forwardRef){case 0:case 2:return n.predicate.expression;case 1:return qt(fe.resolveForwardRef).callFn([n.predicate.expression])}}function E8(n,i,e){let t=[];return e!==void 0&&t.push(...e),n.isSignal&&t.push(new Bs(Jn(zs),n.propertyName)),t.push(cee(n,i),ke(lee(n))),n.read&&t.push(n.read),t}var uP=Symbol("queryAdvancePlaceholder");function D8(n){let i=[],e=0,t=()=>{e>0&&(i.unshift(qt(fe.queryAdvance).callFn(e===1?[]:[ke(e)]).toStmt()),e=0)};for(let o=n.length-1;o>=0;o--){let r=n[o];r===uP?e++:(t(),i.unshift(r))}return t(),i}function dee(n,i,e){let t=[],o=[],r=M6(u=>o.push(u),tP),a=null,c=null;n.forEach(u=>{let h=E8(u,i);if(u.isSignal?(a??=qt(fe.viewQuerySignal),a=a.callFn(h)):(c??=qt(fe.viewQuery),c=c.callFn(h)),u.isSignal){o.push(uP);return}let g=r(),S=qt(fe.loadQuery).callFn([]),x=qt(fe.queryRefresh).callFn([g.set(S)]),C=Jn(zs).prop(u.propertyName).set(u.first?g.prop("first"):g);o.push(x.and(C).toStmt())}),a!==null&&t.push(new ha(a)),c!==null&&t.push(new ha(c));let m=e?`${e}_Query`:null;return km([new wr(hf,mu),new wr(zs,ms)],[ax(1,t),ax(2,D8(o))],Gl,null,m)}function mee(n,i,e){let t=[],o=[],r=M6(u=>o.push(u),tP),a=null,c=null;for(let u of n){let h=E8(u,i,[Jn("dirIndex")]);if(u.isSignal?(a??=qt(fe.contentQuerySignal),a=a.callFn(h)):(c??=qt(fe.contentQuery),c=c.callFn(h)),u.isSignal){o.push(uP);continue}let g=r(),S=qt(fe.loadQuery).callFn([]),x=qt(fe.queryRefresh).callFn([g.set(S)]),C=Jn(zs).prop(u.propertyName).set(u.first?g.prop("first"):g);o.push(x.and(C).toStmt())}a!==null&&t.push(new ha(a)),c!==null&&t.push(new ha(c));let m=e?`${e}_ContentQueries`:null;return km([new wr(hf,mu),new wr(zs,ms),new wr("dirIndex",mu)],[ax(1,t),ax(2,D8(o))],Gl,null,m)}var DD=class extends TX{constructor(){super(xD)}parse(i,e,t){return super.parse(i,e,t)}},K1=".",pee="attr",lE="animate",uee="class",hee="style",fee="*",cE="animate-",PD=class{_exprParser;_schemaRegistry;errors;constructor(i,e,t){this._exprParser=i,this._schemaRegistry=e,this.errors=t}createBoundHostProperties(i,e){let t=[];for(let o of Object.keys(i)){let r=i[o];typeof r=="string"?this.parsePropertyBinding(o,r,!0,!1,e,e.start.offset,void 0,[],t,e):this._reportError(`Value of the host property binding "${o}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return t}createDirectiveHostEventAsts(i,e){let t=[];for(let o of Object.keys(i)){let r=i[o];typeof r=="string"?this.parseEvent(o,r,!1,e,e,[],t,e):this._reportError(`Value of the host listener "${o}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return t}parseInterpolation(i,e,t){let o=e.fullStart.offset;try{let r=this._exprParser.parseInterpolation(i,e,o,t);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,o)}}parseInterpolationExpression(i,e){let t=e.start.offset;try{let o=this._exprParser.parseInterpolationExpression(i,e,t);return o&&this.errors.push(...o.errors),o}catch(o){return this._reportError(`${o}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)}}parseInlineTemplateBinding(i,e,t,o,r,a,c,m){let u=t.start.offset+fee.length,h=this._parseTemplateBindings(i,e,t,u,o);for(let g of h){let S=gm(t,g.sourceSpan),x=g.key.source,C=gm(t,g.key.span);if(g instanceof v0){let M=g.value?g.value.source:"$implicit",w=g.value?gm(t,g.value.span):void 0;c.push(new IE(x,M,S,C,w))}else if(g.value){let M=m?S:t,w=gm(t,g.value.ast.sourceSpan);this._parsePropertyAst(x,g.value,!1,M,C,w,r,a)}else r.push([x,""]),this.parseLiteralAttr(x,null,C,o,void 0,r,a,C)}}_parseTemplateBindings(i,e,t,o,r){try{let a=this._exprParser.parseTemplateBindings(i,e,t,o,r);return a.errors.forEach(c=>this.errors.push(c)),a.warnings.forEach(c=>{this._reportError(c,t,ym.WARNING)}),a.templateBindings}catch(a){return this._reportError(`${a}`,t),[]}}parseLiteralAttr(i,e,t,o,r,a,c,m){dE(i)?(i=i.substring(1),m!==void 0&&(m=gm(m,new Rs(m.start.offset+1,m.end.offset))),e&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',t,ym.ERROR),this._parseLegacyAnimation(i,e,t,o,m,r,a,c)):c.push(new Vh(i,this._exprParser.wrapLiteralPrimitive(e,"",o),wc.LITERAL_ATTR,t,m,r))}parsePropertyBinding(i,e,t,o,r,a,c,m,u,h){i.length===0&&this._reportError("Property name is missing in binding",r);let g=!1;i.startsWith(cE)?(g=!0,i=i.substring(cE.length),h!==void 0&&(h=gm(h,new Rs(h.start.offset+cE.length,h.end.offset)))):dE(i)&&(g=!0,i=i.substring(1),h!==void 0&&(h=gm(h,new Rs(h.start.offset+1,h.end.offset)))),g?this._parseLegacyAnimation(i,e,r,a,h,c,m,u):i.startsWith(`${lE}${K1}`)?this._parseAnimation(i,this.parseBinding(e,t,c||r,a),r,h,c,m,u):this._parsePropertyAst(i,this.parseBinding(e,t,c||r,a),o,r,h,c,m,u)}parsePropertyInterpolation(i,e,t,o,r,a,c,m){let u=this.parseInterpolation(e,o||t,m);return u?(this._parsePropertyAst(i,u,!1,t,c,o,r,a),!0):!1}_parsePropertyAst(i,e,t,o,r,a,c,m){c.push([i,e.source]),m.push(new Vh(i,e,t?wc.TWO_WAY:wc.DEFAULT,o,r,a))}_parseAnimation(i,e,t,o,r,a,c){a.push([i,e.source]),c.push(new Vh(i,e,wc.ANIMATION,t,o,r))}_parseLegacyAnimation(i,e,t,o,r,a,c,m){i.length===0&&this._reportError("Animation trigger is missing",t);let u=this.parseBinding(e||"undefined",!1,a||t,o);c.push([i,u.source]),m.push(new Vh(i,u,wc.LEGACY_ANIMATION,t,r,a))}parseBinding(i,e,t,o){try{let r=e?this._exprParser.parseSimpleBinding(i,t,o):this._exprParser.parseBinding(i,t,o);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,t),this._exprParser.wrapLiteralPrimitive("ERROR",t,o)}}createBoundElementProperty(i,e,t=!1,o=!0){if(e.isLegacyAnimation)return new Mb(e.name,Di.LegacyAnimation,ro.NONE,e.expression,null,e.sourceSpan,e.keySpan,e.valueSpan);let r=null,a,c=null,m=e.name.split(K1),u;if(m.length>1)if(m[0]==pee){c=m.slice(1).join(K1),t||this._validatePropertyOrAttributeName(c,e.sourceSpan,!0),u=mE(this._schemaRegistry,i,c,!0);let h=c.indexOf(":");if(h>-1){let g=c.substring(0,h),S=c.substring(h+1);c=eb(g,S)}a=Di.Attribute}else m[0]==uee?(c=m[1],a=Di.Class,u=[ro.NONE]):m[0]==hee?(r=m.length>2?m[2]:null,c=m[1],a=Di.Style,u=[ro.STYLE]):m[0]==lE&&(c=e.name,a=Di.Animation,u=[ro.NONE]);if(c===null){let h=this._schemaRegistry.getMappedPropName(e.name);c=o?h:e.name,u=mE(this._schemaRegistry,i,h,!1),a=e.type===wc.TWO_WAY?Di.TwoWay:Di.Property,t||this._validatePropertyOrAttributeName(h,e.sourceSpan,!1)}return new Mb(c,a,u[0],e.expression,r,e.sourceSpan,e.keySpan,e.valueSpan)}parseEvent(i,e,t,o,r,a,c,m){i.length===0&&this._reportError("Event name is missing in binding",o),dE(i)?(i=i.slice(1),m!==void 0&&(m=gm(m,new Rs(m.start.offset+1,m.end.offset))),this._parseLegacyAnimationEvent(i,e,o,r,c,m)):this._parseRegularEvent(i,e,t,o,r,a,c,m)}calcPossibleSecurityContexts(i,e,t){let o=this._schemaRegistry.getMappedPropName(e);return mE(this._schemaRegistry,i,o,t)}parseEventListenerName(i){let[e,t]=ZG(i,[null,i]);return{eventName:t,target:e}}parseLegacyAnimationEventName(i){let e=JG(i,[i,null]);return{eventName:e[0],phase:e[1]===null?null:e[1].toLowerCase()}}_parseLegacyAnimationEvent(i,e,t,o,r,a){let{eventName:c,phase:m}=this.parseLegacyAnimationEventName(i),u=this._parseAction(e,o);r.push(new wb(c,m,qa.LegacyAnimation,u,t,o,a)),c.length===0&&this._reportError("Animation event name is missing in binding",t),m?m!=="start"&&m!=="done"&&this._reportError(`The provided animation output phase value "${m}" for "@${c}" is not supported (use start or done)`,t):this._reportError(`The animation trigger output event (@${c}) is missing its phase value name (start or done are currently supported)`,t)}_parseRegularEvent(i,e,t,o,r,a,c,m){let{eventName:u,target:h}=this.parseEventListenerName(i),g=this.errors.length,S=this._parseAction(e,r),x=this.errors.length===g;a.push([i,S.source]),t&&x&&!this._isAllowedAssignmentEvent(S)&&this._reportError("Unsupported expression in a two-way binding",o);let C=qa.Regular;t&&(C=qa.TwoWay),i.startsWith(`${lE}${K1}`)&&(C=qa.Animation),c.push(new wb(u,h,C,S,o,r,m))}_parseAction(i,e){let t=e&&e.start?e.start.offset:0;try{let o=this._exprParser.parseAction(i,e,t);return o&&this.errors.push(...o.errors),!o||o.ast instanceof wa?(this._reportError("Empty expressions are not allowed",e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)):o}catch(o){return this._reportError(`${o}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)}}_reportError(i,e,t=ym.ERROR){this.errors.push(new ln(e,i,t))}_validatePropertyOrAttributeName(i,e,t){let o=t?this._schemaRegistry.validateAttribute(i):this._schemaRegistry.validateProperty(i);o.error&&this._reportError(o.msg,e,ym.ERROR)}_isAllowedAssignmentEvent(i){return i instanceof cs?this._isAllowedAssignmentEvent(i.ast):i instanceof h0?this._isAllowedAssignmentEvent(i.expression):i instanceof Jh&&i.args.length===1&&i.receiver instanceof Ec&&i.receiver.name==="$any"&&i.receiver.receiver instanceof Nc?this._isAllowedAssignmentEvent(i.args[0]):(i instanceof Ec||i instanceof _u)&&!ID(i)}};function ID(n){return n instanceof l0||n instanceof c0?!0:n instanceof _0?ID(n.expression):n instanceof Ec||n instanceof _u||n instanceof Jh?ID(n.receiver):!1}function dE(n){return n[0]=="@"}function mE(n,i,e,t){let o,r=a=>n.securityContext(a,e,t);return i===null?o=n.allKnownElementNames().map(r):(o=[],qh.parse(i).forEach(a=>{let c=a.element?[a.element]:n.allKnownElementNames(),m=new Set(a.notSelectors.filter(h=>h.isElementSelector()).map(h=>h.element)),u=c.filter(h=>!m.has(h));o.push(...u.map(r))})),o.length===0?[ro.NONE]:Array.from(new Set(o)).sort()}function gm(n,i){let e=i.start-n.start.offset,t=i.end-n.end.offset;return new _n(n.start.moveBy(e),n.end.moveBy(t),n.fullStart.moveBy(e),n.details)}function gee(n){if(n==null||n.length===0||n[0]=="/")return!1;let i=n.match(_ee);return i===null||i[1]=="package"||i[1]=="asset"}var _ee=/^([^:/?#]+):/,vee="select",Cee="link",bee="rel",xee="href",yee="stylesheet",See="style",wee="script",Mee="ngNonBindable",kee="ngProjectAs";function P8(n){let i=null,e=null,t=null,o=!1,r="";n.attrs.forEach(m=>{let u=m.name.toLowerCase();u==vee?i=m.value:u==xee?e=m.value:u==bee?t=m.value:m.name==Mee?o=!0:m.name==kee&&m.value.length>0&&(r=m.value)}),i=Tee(i);let a=n.name.toLowerCase(),c=Ns.OTHER;return AE(a)?c=Ns.NG_CONTENT:a==See?c=Ns.STYLE:a==wee?c=Ns.SCRIPT:a==Cee&&t==yee&&(c=Ns.STYLESHEET),new AD(c,i,e,o,r)}var Ns=(function(n){return n[n.NG_CONTENT=0]="NG_CONTENT",n[n.STYLE=1]="STYLE",n[n.STYLESHEET=2]="STYLESHEET",n[n.SCRIPT=3]="SCRIPT",n[n.OTHER=4]="OTHER",n})(Ns||{}),AD=class{type;selectAttr;hrefAttr;nonBindable;projectAs;constructor(i,e,t,o,r){this.type=i,this.selectAttr=e,this.hrefAttr=t,this.nonBindable=o,this.projectAs=r}};function Tee(n){return n===null||n.length===0?"*":n}var Eee=/^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/,Dee=/^track\s+([\S\s]*)/,Pee=/^(as\s+)(.*)/,vx=/^else[^\S\r\n]+if/,Iee=/^let\s+([\S\s]*)/,Aee=/^[$A-Z_][0-9A-Z_$]*$/i,qF=/(\s*)(\S+)(\s*)/,Z_=new Set(["$index","$first","$last","$even","$odd","$count"]);function QF(n){return n==="empty"}function XF(n){return n==="else"||vx.test(n)}function Oee(n,i,e,t){let o=Vee(i),r=[],a=YF(n,o,t);a!==null&&r.push(new ou(a.expression,So(e,n.children,n.children),a.expressionAlias,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.nameSpan,n.i18n));for(let g of i)if(vx.test(g.name)){let S=YF(g,o,t);if(S!==null){let x=So(e,g.children,g.children);r.push(new ou(S.expression,x,S.expressionAlias,g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan,g.i18n))}}else if(g.name==="else"){let S=So(e,g.children,g.children);r.push(new ou(null,S,null,g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan,g.i18n))}let c=r.length>0?r[0].startSourceSpan:n.startSourceSpan,m=r.length>0?r[r.length-1].endSourceSpan:n.endSourceSpan,u=n.sourceSpan,h=r[r.length-1];return h!==void 0&&(u=new _n(c.start,h.sourceSpan.end)),{node:new Pb(r,u,n.startSourceSpan,m,n.nameSpan),errors:o}}function Nee(n,i,e,t){let o=[],r=Fee(n,o,t),a=null,c=null;for(let m of i)m.name==="empty"?c!==null?o.push(new ln(m.sourceSpan,"@for loop can only have one @empty block")):m.parameters.length>0?o.push(new ln(m.sourceSpan,"@empty block cannot have parameters")):c=new w0(So(e,m.children,m.children),m.sourceSpan,m.startSourceSpan,m.endSourceSpan,m.nameSpan,m.i18n):o.push(new ln(m.sourceSpan,`Unrecognized @for loop block "${m.name}"`));if(r!==null)if(r.trackBy===null)o.push(new ln(n.startSourceSpan,'@for loop must have a "track" expression'));else{let m=c?.endSourceSpan??n.endSourceSpan,u=new _n(n.sourceSpan.start,m?.end??n.sourceSpan.end);Lee(r.trackBy.expression,r.trackBy.keywordSpan,o),a=new of(r.itemName,r.expression,r.trackBy.expression,r.trackBy.keywordSpan,r.context,So(e,n.children,n.children),c,u,n.sourceSpan,n.startSourceSpan,m,n.nameSpan,n.i18n)}return{node:a,errors:o}}function Ree(n,i,e){let t=zee(n),o=n.parameters.length>0?Q0(n.parameters[0],e):e.parseBinding("",!1,n.sourceSpan,0),r=[],a=[],c=[],m=null,u=null;for(let g of n.children){if(!(g instanceof al))continue;if((g.name!=="case"||g.parameters.length===0)&&g.name!=="default"&&g.name!=="default never"){a.push(new Ib(g.name,g.sourceSpan,g.nameSpan));continue}u!==null&&t.push(new ln(g.sourceSpan,'@default block with "never" parameter must be the last case in a switch'));let S=g.name==="case",x=null;if(S)x=Q0(g.parameters[0],e);else if(g.name==="default never"){(g.children.length>0||g.endSourceSpan!==null&&g.endSourceSpan.start.offset!==g.endSourceSpan.end.offset)&&t.push(new ln(g.sourceSpan,'@default block with "never" parameter cannot have a body')),c.length>0&&t.push(new ln(g.sourceSpan,'A @case block with no body cannot be followed by a @default block with "never" parameter')),u=new jE(g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan);continue}let C=new zE(x,g.sourceSpan,g.startSourceSpan,g.endSourceSpan,g.nameSpan);if(c.push(C),g.children.length===0&&g.endSourceSpan!==null&&g.endSourceSpan.start.offset===g.endSourceSpan.end.offset){m===null&&(m=g.sourceSpan);continue}let w=g.sourceSpan,y=g.startSourceSpan;m!==null&&(w=new _n(m.start,g.sourceSpan.end),y=new _n(m.start,g.startSourceSpan.end),m=null);let k=new S0(c,So(i,g.children,g.children),w,y,g.endSourceSpan,g.nameSpan,g.i18n);r.push(k),c=[]}return{node:new Db(o,r,a,u,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.nameSpan),errors:t}}function Fee(n,i,e){if(n.parameters.length===0)return i.push(new ln(n.startSourceSpan,"@for loop does not have an expression")),null;let[t,...o]=n.parameters,r=jee(t,i)?.match(Eee);if(!r||r[2].trim().length===0)return i.push(new ln(t.sourceSpan,'Cannot parse expression. @for loop expression must match the pattern " of "')),null;let[,a,c]=r;Z_.has(a)&&i.push(new ln(t.sourceSpan,`@for loop item name cannot be one of ${Array.from(Z_).join(", ")}.`));let m=t.expression.split(" ")[0],u=new _n(t.sourceSpan.start,t.sourceSpan.start.moveBy(m.length)),h={itemName:new Tm(a,"$implicit",u,u),trackBy:null,expression:Q0(t,e,c),context:Array.from(Z_,g=>{let S=new _n(n.startSourceSpan.end,n.startSourceSpan.end);return new Tm(g,g,S,S)})};for(let g of o){let S=g.expression.match(Iee);if(S!==null){let C=new _n(g.sourceSpan.start.moveBy(S[0].length-S[1].length),g.sourceSpan.end);Bee(g.sourceSpan,S[1],C,a,h.context,i);continue}let x=g.expression.match(Dee);if(x!==null){if(h.trackBy!==null)i.push(new ln(g.sourceSpan,'@for loop can only have one "track" expression'));else{let C=Q0(g,e,x[1]);C.ast instanceof wa&&i.push(new ln(n.startSourceSpan,'@for loop must have a "track" expression'));let M=new _n(g.sourceSpan.start,g.sourceSpan.start.moveBy(5));h.trackBy={expression:C,keywordSpan:M}}continue}i.push(new ln(g.sourceSpan,`Unrecognized @for loop parameter "${g.expression}"`))}return h}function Lee(n,i,e){let t=new OD;n.ast.visit(t),t.hasPipe&&e.push(new ln(i,"Cannot use pipes in track expressions"))}function Bee(n,i,e,t,o,r){let a=i.split(","),c=e.start;for(let m of a){let u=m.split("="),h=u.length===2?u[0].trim():"",g=u.length===2?u[1].trim():"";if(h.length===0||g.length===0)r.push(new ln(n,'Invalid @for loop "let" parameter. Parameter should match the pattern " = "'));else if(!Z_.has(g))r.push(new ln(n,`Unknown "let" parameter variable "${g}". The allowed variables are: ${Array.from(Z_).join(", ")}`));else if(h===t)r.push(new ln(n,`Invalid @for loop "let" parameter. Variable cannot be called "${t}"`));else if(o.some(S=>S.name===h))r.push(new ln(n,`Duplicate "let" parameter variable "${g}"`));else{let[,S,x]=u[0].match(qF)??[],C=S!==void 0&&u.length===2?new _n(c.moveBy(S.length),c.moveBy(S.length+x.length)):e,M;if(u.length===2){let[,y,k]=u[1].match(qF)??[];M=y!==void 0?new _n(c.moveBy(u[0].length+1+y.length),c.moveBy(u[0].length+1+y.length+k.length)):void 0}let w=new _n(C.start,M?.end??C.end);o.push(new Tm(h,g,w,C,M))}c=c.moveBy(m.length+1)}}function Vee(n){let i=[],e=!1;for(let t=0;t1&&t0&&i.push(new ln(o.startSourceSpan,"@else block cannot have parameters")),e=!0):vx.test(o.name)||i.push(new ln(o.startSourceSpan,`Unrecognized conditional block @${o.name}`))}return i}function zee(n){let i=[],e=!1;if(n.parameters.length!==1)return i.push(new ln(n.startSourceSpan,"@switch block must have exactly one parameter")),i;for(let t of n.children)if(!(t instanceof $0||t instanceof Mu&&t.value.trim().length===0)){if(!(t instanceof al)||t.name!=="case"&&t.name!=="default"&&t.name!=="default never"){i.push(new ln(t.sourceSpan,"@switch block can only contain @case and @default blocks"));continue}t.name==="default never"?(e&&i.push(new ln(t.startSourceSpan,"@switch block can only have one @default block")),e=!0):t.name==="default"?(e?i.push(new ln(t.startSourceSpan,"@switch block can only have one @default block")):t.parameters.length>0&&i.push(new ln(t.startSourceSpan,"@default block cannot have parameters")),e=!0):t.name==="case"&&t.parameters.length!==1&&i.push(new ln(t.startSourceSpan,"@case block must have exactly one parameter"))}return i}function Q0(n,i,e){let t,o;return typeof e=="string"?(t=Math.max(0,n.expression.lastIndexOf(e)),o=t+e.length):(t=0,o=n.expression.length),i.parseBinding(n.expression.slice(t,o),!1,n.sourceSpan,n.sourceSpan.start.offset+t)}function YF(n,i,e){if(n.parameters.length===0)return i.push(new ln(n.startSourceSpan,"Conditional block does not have an expression")),null;let t=Q0(n.parameters[0],e),o=null;for(let r=1;r-1;c--){let m=e[c];if(m===")"){if(a=c,o--,o===0)break}else{if(t.test(m))continue;break}}return o!==0?(i.push(new ln(n.sourceSpan,"Unclosed parentheses in expression")),null):e.slice(r,a)}var OD=class extends ef{hasPipe=!1;visitPipe(){this.hasPipe=!0}},$ee=/^\d+\.?\d*(ms|s)?$/,Hee=/^\s$/,KF=new Map([[sl,Ua],[Dc,kd],[Wa,Sr]]),Ga=(function(n){return n.IDLE="idle",n.TIMER="timer",n.INTERACTION="interaction",n.IMMEDIATE="immediate",n.HOVER="hover",n.VIEWPORT="viewport",n.NEVER="never",n})(Ga||{});function Uee({expression:n,sourceSpan:i},e,t){let o=n.indexOf("never"),r=new _n(i.start.moveBy(o),i.start.moveBy(o+5)),a=hP(n,i),c=fP(n,i);o===-1?t.push(new ln(i,'Could not find "never" keyword in expression')):gP("never",e,t,new FE(r,i,a,null,c))}function pE({expression:n,sourceSpan:i},e,t,o){let r=n.indexOf("when"),a=new _n(i.start.moveBy(r),i.start.moveBy(r+4)),c=hP(n,i),m=fP(n,i);if(r===-1)o.push(new ln(i,'Could not find "when" keyword in expression'));else{let u=X0(n,r+1),h=e.parseBinding(n.slice(u),!1,i,i.start.offset+u);gP("when",t,o,new kb(h,i,c,a,m))}}function uE({expression:n,sourceSpan:i},e,t,o,r){let a=n.indexOf("on"),c=new _n(i.start.moveBy(a),i.start.moveBy(a+2)),m=hP(n,i),u=fP(n,i);if(a===-1)o.push(new ln(i,'Could not find "on" keyword in expression'));else{let h=X0(n,a+1),g=n.startsWith("hydrate");new ND(n,e,h,i,t,o,g?Zee:Kee,g,m,c,u).parse()}}function hP(n,i){return n.startsWith("prefetch")?new _n(i.start,i.start.moveBy(8)):null}function fP(n,i){return n.startsWith("hydrate")?new _n(i.start,i.start.moveBy(7)):null}var ND=class{expression;bindingParser;start;span;triggers;errors;validator;isHydrationTrigger;prefetchSpan;onSourceSpan;hydrateSpan;index=0;tokens;constructor(i,e,t,o,r,a,c,m,u,h,g){this.expression=i,this.bindingParser=e,this.start=t,this.span=o,this.triggers=r,this.errors=a,this.validator=c,this.isHydrationTrigger=m,this.prefetchSpan=u,this.onSourceSpan=h,this.hydrateSpan=g,this.tokens=new G0().tokenize(i.slice(t))}parse(){for(;this.tokens.length>0&&this.index0&&o.isCharacter(e[e.length-1])&&e.pop(),e.length===0&&o.isCharacter(Ma)&&t.length>0){i.push({expression:this.tokenRangeText(t),start:t[0].index}),this.advance(),t=[];continue}t.push(o),this.advance()}return(!this.token().isCharacter(Sr)||e.length>0)&&this.error(this.token(),"Unexpected end of expression"),this.index0)throw new Error(`"${Ga.IDLE}" trigger cannot have parameters`);return new LE(i,e,t,o,r)}function Wee(n,i,e,t,o,r){if(n.length!==1)throw new Error(`"${Ga.TIMER}" trigger must have exactly one parameter`);let a=sx(n[0].expression);if(a===null)throw new Error(`Could not parse time value of trigger "${Ga.TIMER}"`);return new VE(a,i,e,t,o,r)}function qee(n,i,e,t,o,r){if(n.length>0)throw new Error(`"${Ga.IMMEDIATE}" trigger cannot have parameters`);return new BE(i,e,t,o,r)}function Qee(n,i,e,t,o,r,a){return a(Ga.HOVER,n),new Tb(n[0]?.expression??null,i,e,t,o,r)}function Xee(n,i,e,t,o,r,a){return a(Ga.INTERACTION,n),new Eb(n[0]?.expression??null,i,e,t,o,r)}function Yee(n,i,e,t,o,r,a,c,m,u){u(Ga.VIEWPORT,t);let h,g;if(t.length===0)h=g=null;else if(!t[0].expression.startsWith("{"))h=t[0].expression,g=null;else{let S=e.parseBinding(t[0].expression,!1,r,r.start.offset+n+t[0].start);if(S.ast instanceof vu){if(S.ast.keys.some(C=>C.kind==="spread"))throw new Error("Spread operator are not allowed in this context");if(S.ast.keys.some(C=>C.kind==="property"&&C.key==="root"))throw new Error('The "root" option is not supported in the options parameter of the "viewport" trigger')}else throw new Error('Options parameter of the "viewport" trigger must be an object literal');let x=S.ast.keys.findIndex(C=>C.kind==="property"&&C.key==="trigger");if(x===-1)h=null,g=S.ast;else{let C=S.ast.values[x],M=(w,y)=>y!==x;if(!(C instanceof Ec)||!(C.receiver instanceof Nc))throw new Error('"trigger" option of the "viewport" trigger must be an identifier');h=C.name,g=new vu(S.ast.span,S.ast.sourceSpan,S.ast.keys.filter(M),S.ast.values.filter(M))}}if(i&&h!==null)throw new Error('"viewport" hydration trigger cannot have a "trigger"');if(g){let S=RD.findDynamicNode(g);if(S!==null)throw new Error(`Options of the "viewport" trigger must be an object literal containing only literal values, but "${S.constructor.name}" was found`)}return new C0(h,g,o,r,a,c,m)}function Kee(n,i){if(i.length>1)throw new Error(`"${n}" trigger can only have zero or one parameters`)}function Zee(n,i){if(n===Ga.VIEWPORT){if(i.length>1)throw new Error(`Hydration trigger "${n}" cannot have more than one parameter`);return}if(i.length>0)throw new Error(`Hydration trigger "${n}" cannot have parameters`)}function X0(n,i=0){let e=!1;for(let t=i;t0){let M=i[i.length-1];g=M.endSourceSpan,S=M.sourceSpan.end}let x=new _n(n.sourceSpan.start,S);return{node:new Cu(So(e,n.children,n.children),m,u,h,r,a,c,n.nameSpan,x,n.sourceSpan,n.startSourceSpan,g,n.i18n),errors:o}}function lte(n,i,e){let t=null,o=null,r=null;for(let a of n)try{if(!FD(a.name)){i.push(new ln(a.startSourceSpan,`Unrecognized block "@${a.name}"`));break}switch(a.name){case"placeholder":t!==null?i.push(new ln(a.startSourceSpan,"@defer block can only have one @placeholder block")):t=cte(a,e);break;case"loading":o!==null?i.push(new ln(a.startSourceSpan,"@defer block can only have one @loading block")):o=dte(a,e);break;case"error":r!==null?i.push(new ln(a.startSourceSpan,"@defer block can only have one @error block")):r=mte(a,e);break}}catch(c){i.push(new ln(a.startSourceSpan,c.message))}return{placeholder:t,loading:o,error:r}}function cte(n,i){let e=null;for(let t of n.parameters)if(I8.test(t.expression)){if(e!=null)throw new Error('@placeholder block can only have one "minimum" parameter');let o=sx(t.expression.slice(X0(t.expression)));if(o===null)throw new Error('Could not parse time value of parameter "minimum"');e=o}else throw new Error(`Unrecognized parameter in @placeholder block: "${t.expression}"`);return new b0(So(i,n.children,n.children),e,n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function dte(n,i){let e=null,t=null;for(let o of n.parameters)if(ote.test(o.expression)){if(e!=null)throw new Error('@loading block can only have one "after" parameter');let r=sx(o.expression.slice(X0(o.expression)));if(r===null)throw new Error('Could not parse time value of parameter "after"');e=r}else if(I8.test(o.expression)){if(t!=null)throw new Error('@loading block can only have one "minimum" parameter');let r=sx(o.expression.slice(X0(o.expression)));if(r===null)throw new Error('Could not parse time value of parameter "minimum"');t=r}else throw new Error(`Unrecognized parameter in @loading block: "${o.expression}"`);return new x0(So(i,n.children,n.children),e,t,n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function mte(n,i){if(n.parameters.length>0)throw new Error("@error block cannot have parameters");return new y0(So(i,n.children,n.children),n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function pte(n,i,e,t){let o={},r={},a={};for(let c of n.parameters)rte.test(c.expression)?pE(c,i,o,e):ate.test(c.expression)?uE(c,i,o,e):Jee.test(c.expression)?pE(c,i,r,e):ete.test(c.expression)?uE(c,i,r,e):tte.test(c.expression)?pE(c,i,a,e):nte.test(c.expression)?uE(c,i,a,e):ite.test(c.expression)?Uee(c,a,e):e.push(new ln(c.sourceSpan,"Unrecognized trigger"));return a.never&&Object.keys(a).length>1&&e.push(new ln(n.startSourceSpan,"Cannot specify additional `hydrate` triggers if `hydrate never` is present")),{triggers:o,prefetchTriggers:r,hydrateTriggers:a}}var ute=/^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/,ZF=1,JF=2,e6=3,t6=4,n6=5,hte=6,L_=7,_m={BANANA_BOX:{start:"[(",end:")]"},PROPERTY:{start:"[",end:"]"},EVENT:{start:"(",end:")"}},hE="*",fte=new Set(["link","style","script","ng-template","ng-container","ng-content"]),gte=new Set(["ngProjectAs","ngNonBindable"]);function _te(n,i,e){let t=new LD(i,e),o=So(t,n,n),r=i.errors.concat(t.errors),a={nodes:o,errors:r,styleUrls:t.styleUrls,styles:t.styles,ngContentSelectors:t.ngContentSelectors};return e.collectCommentNodes&&(a.commentNodes=t.commentNodes),a}var LD=class{bindingParser;options;errors=[];styles=[];styleUrls=[];ngContentSelectors=[];commentNodes=[];inI18nBlock=!1;processedNodes=new Set;constructor(i,e){this.bindingParser=i,this.options=e}visitElement(i){let e=nb(i.i18n);e&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",i.sourceSpan),this.inI18nBlock=!0);let t=P8(i);if(t.type===Ns.SCRIPT)return null;if(t.type===Ns.STYLE){let y=vte(i);return y!==null&&this.styles.push(y),null}else if(t.type===Ns.STYLESHEET&&gee(t.hrefAttr))return this.styleUrls.push(t.hrefAttr),null;let o=bW(i.name),{attributes:r,boundEvents:a,references:c,variables:m,templateVariables:u,elementHasInlineTemplate:h,parsedProperties:g,templateParsedProperties:S,i18nAttrsMeta:x}=this.prepareAttributes(i.attrs,o),C=this.extractDirectives(i),M;t.nonBindable?M=So(i6,i.children).flat(1/0):M=So(this,i.children,i.children);let w;if(t.type===Ns.NG_CONTENT){let y=t.selectAttr,k=i.attrs.map(I=>this.visitAttribute(I));w=new rf(y,k,M,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n),this.ngContentSelectors.push(y)}else if(o){let y=this.categorizePropertyAttributes(i.name,g,x);w=new Fs(i.name,r,y.bound,a,C,[],M,c,m,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n)}else{let y=this.categorizePropertyAttributes(i.name,g,x);if(i.name==="ng-container")for(let k of y.bound)k.type===Di.Attribute&&this.reportError("Attribute bindings are not supported on ng-container. Use property bindings instead.",k.sourceSpan);w=new Rc(i.name,r,y.bound,a,C,M,c,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n)}return h&&(w=this.wrapInTemplate(w,S,u,x,o,e)),e&&(this.inI18nBlock=!1),w}visitAttribute(i){return new nf(i.name,i.value,i.sourceSpan,i.keySpan,i.valueSpan,i.i18n)}visitText(i){return this.processedNodes.has(i)?null:this._visitTextWithInterpolation(i.value,i.sourceSpan,i.tokens,i.i18n)}visitExpansion(i){if(!i.i18n)return null;if(!nb(i.i18n))throw new Error(`Invalid type "${i.i18n.constructor}" for "i18n" property of ${i.sourceSpan.toString()}. Expected a "Message"`);let e=i.i18n,t={},o={};return Object.keys(e.placeholders).forEach(r=>{let a=e.placeholders[r];if(r.startsWith(wW)){let c=r.trim(),m=this.bindingParser.parseInterpolationExpression(a.text,a.sourceSpan);t[c]=new tf(m,a.sourceSpan)}else o[r]=this._visitTextWithInterpolation(a.text,a.sourceSpan,null)}),new x6(t,o,i.sourceSpan,e)}visitExpansionCase(i){return null}visitComment(i){return this.options.collectCommentNodes&&this.commentNodes.push(new ux(i.value||"",i.sourceSpan)),null}visitLetDeclaration(i,e){let t=this.bindingParser.parseBinding(i.value,!1,i.valueSpan,i.valueSpan.start.offset);return t.errors.length===0&&t.ast instanceof wa&&this.reportError("@let declaration value cannot be empty",i.valueSpan),new JD(i.name,t,i.sourceSpan,i.nameSpan,i.valueSpan)}visitComponent(i){let e=nb(i.i18n);if(e&&(this.inI18nBlock&&this.reportError("Cannot mark a component as translatable inside of a translatable section. Please remove the nested i18n marker.",i.sourceSpan),this.inI18nBlock=!0),i.tagName!==null&&fte.has(i.tagName))return this.reportError(`Tag name "${i.tagName}" cannot be used as a component tag`,i.startSourceSpan),null;let{attributes:t,boundEvents:o,references:r,templateVariables:a,elementHasInlineTemplate:c,parsedProperties:m,templateParsedProperties:u,i18nAttrsMeta:h}=this.prepareAttributes(i.attrs,!1);this.validateSelectorlessReferences(r);let g=this.extractDirectives(i),S;i.attrs.find(M=>M.name==="ngNonBindable")?S=So(i6,i.children).flat(1/0):S=So(this,i.children,i.children);let x=this.categorizePropertyAttributes(i.tagName,m,h),C=new G_(i.componentName,i.tagName,i.fullName,t,x.bound,o,g,S,r,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return c&&(C=this.wrapInTemplate(C,u,a,h,!1,e)),e&&(this.inI18nBlock=!1),C}visitDirective(){return null}visitBlockParameter(){return null}visitBlock(i,e){let t=Array.isArray(e)?e.indexOf(i):-1;if(t===-1)throw new Error("Visitor invoked incorrectly. Expecting visitBlock to be invoked siblings array as its context");if(this.processedNodes.has(i))return null;let o=null;switch(i.name){case"defer":o=ste(i,this.findConnectedBlocks(t,e,FD),this,this.bindingParser);break;case"switch":o=Ree(i,this,this.bindingParser);break;case"for":o=Nee(i,this.findConnectedBlocks(t,e,QF),this,this.bindingParser);break;case"if":o=Oee(i,this.findConnectedBlocks(t,e,XF),this,this.bindingParser);break;default:let r;FD(i.name)?(r=`@${i.name} block can only be used after an @defer block.`,this.processedNodes.add(i)):QF(i.name)?(r=`@${i.name} block can only be used after an @for block.`,this.processedNodes.add(i)):XF(i.name)?(r=`@${i.name} block can only be used after an @if or @else if block.`,this.processedNodes.add(i)):r=`Unrecognized block @${i.name}.`,o={node:new Ib(i.name,i.sourceSpan,i.nameSpan),errors:[new ln(i.sourceSpan,r)]};break}return this.errors.push(...o.errors),o.node}findConnectedBlocks(i,e,t){let o=[];for(let r=i+1;r{let c=t[a.name];if(a.isLiteral)r.push(new nf(a.name,a.expression.source||"",a.sourceSpan,a.keySpan,a.valueSpan,c));else{let m=this.bindingParser.createBoundElementProperty(i,a,!0,!1);o.push(NE.fromBoundElementProperty(m,c))}}),{bound:o,literal:r}}prepareAttributes(i,e){let t=[],o=[],r=[],a=[],c=[],m={},u=[],h=[],g=!1;for(let S of i){let x=!1,C=o6(S.name),M=!1;if(S.i18n&&(m[S.name]=S.i18n),C.startsWith(hE)){g&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",S.sourceSpan),M=!0,g=!0;let w=S.value,y=C.substring(hE.length),k=[],I=S.valueSpan?S.valueSpan.fullStart.offset:S.sourceSpan.fullStart.offset+S.name.length;this.bindingParser.parseInlineTemplateBinding(y,w,S.sourceSpan,I,[],u,k,!0),h.push(...k.map(D=>new Tm(D.name,D.value,D.sourceSpan,D.keySpan,D.valueSpan)))}else x=this.parseAttribute(e,S,[],t,o,r,a);!x&&!M&&c.push(this.visitAttribute(S))}return{attributes:c,boundEvents:o,references:a,variables:r,templateVariables:h,elementHasInlineTemplate:g,parsedProperties:t,templateParsedProperties:u,i18nAttrsMeta:m}}parseAttribute(i,e,t,o,r,a,c){let m=o6(e.name),u=e.value,h=e.sourceSpan,g=e.valueSpan?e.valueSpan.fullStart.offset:h.fullStart.offset;function S(y,k,I){let D=e.name.length-m.length,N=y.start.moveBy(k.length+D),P=N.moveBy(I.length);return new _n(N,P,N,I)}let x=m.match(ute);if(x){if(x[ZF]!=null){let y=x[L_],k=S(h,x[ZF],y);this.bindingParser.parsePropertyBinding(y,u,!1,!1,h,g,e.valueSpan,t,o,k)}else if(x[JF])if(i){let y=x[L_],k=S(h,x[JF],y);this.parseVariable(y,u,h,k,e.valueSpan,a)}else this.reportError('"let-" is only supported on ng-template elements.',h);else if(x[e6]){let y=x[L_],k=S(h,x[e6],y);this.parseReference(y,u,h,k,e.valueSpan,c)}else if(x[t6]){let y=[],k=x[L_],I=S(h,x[t6],k);this.bindingParser.parseEvent(k,u,!1,h,e.valueSpan||h,t,y,I),fE(y,r)}else if(x[n6]){let y=x[L_],k=S(h,x[n6],y);this.bindingParser.parsePropertyBinding(y,u,!1,!0,h,g,e.valueSpan,t,o,k),this.parseAssignmentEvent(y,u,h,e.valueSpan,t,r,k,g)}else if(x[hte]){let y=S(h,"",m);this.bindingParser.parseLiteralAttr(m,u,h,g,e.valueSpan,t,o,y)}return!0}let C=null;if(m.startsWith(_m.BANANA_BOX.start)?C=_m.BANANA_BOX:m.startsWith(_m.PROPERTY.start)?C=_m.PROPERTY:m.startsWith(_m.EVENT.start)&&(C=_m.EVENT),C!==null&&m.endsWith(C.end)&&m.length>C.start.length+C.end.length){let y=m.substring(C.start.length,m.length-C.end.length),k=S(h,C.start,y);if(C.start===_m.BANANA_BOX.start)this.bindingParser.parsePropertyBinding(y,u,!1,!0,h,g,e.valueSpan,t,o,k),this.parseAssignmentEvent(y,u,h,e.valueSpan,t,r,k,g);else if(C.start===_m.PROPERTY.start)this.bindingParser.parsePropertyBinding(y,u,!1,!1,h,g,e.valueSpan,t,o,k);else{let I=[];this.bindingParser.parseEvent(y,u,!1,h,e.valueSpan||h,t,I,k),fE(I,r)}return!0}let M=S(h,"",m);return this.bindingParser.parsePropertyInterpolation(m,u,h,e.valueSpan,t,o,M,e.valueTokens??null)}extractDirectives(i){let e=i instanceof Ha?i.tagName:i.name,t=[],o=new Set;for(let r of i.directives){let a=!1;for(let x of r.attrs)x.name.startsWith(hE)?(a=!0,this.reportError(`Shorthand template syntax "${x.name}" is not supported inside a directive context`,x.sourceSpan)):gte.has(x.name)&&(a=!0,this.reportError(`Attribute "${x.name}" is not supported in a directive context`,x.sourceSpan));if(!a&&o.has(r.name)&&(a=!0,this.reportError(`Cannot apply directive "${r.name}" multiple times on the same element`,r.sourceSpan)),a)continue;let{attributes:c,parsedProperties:m,boundEvents:u,references:h,i18nAttrsMeta:g}=this.prepareAttributes(r.attrs,!1);this.validateSelectorlessReferences(h);let{bound:S}=this.categorizePropertyAttributes(e,m,g);for(let x of S)x.type!==Di.Property&&x.type!==Di.TwoWay&&(a=!0,this.reportError("Binding is not supported in a directive context",x.sourceSpan));a||(o.add(r.name),t.push(new b6(r.name,c,S,u,h,r.sourceSpan,r.startSourceSpan,r.endSourceSpan,void 0)))}return t}filterAnimationAttributes(i){return i.filter(e=>!e.name.startsWith("animate."))}filterAnimationInputs(i){return i.filter(e=>e.type!==Di.Animation)}wrapInTemplate(i,e,t,o,r,a){let c=this.categorizePropertyAttributes("ng-template",e,o),m=[];c.literal.forEach(S=>m.push(S)),c.bound.forEach(S=>m.push(S));let u={attributes:[],inputs:[],outputs:[]};(i instanceof Rc||i instanceof G_)&&(u.attributes.push(...this.filterAnimationAttributes(i.attributes)),u.inputs.push(...this.filterAnimationInputs(i.inputs)),u.outputs.push(...i.outputs));let h=r&&a?void 0:i.i18n,g;return i instanceof G_?g=i.tagName:i instanceof Fs?g=null:g=i.name,new Fs(g,u.attributes,u.inputs,u.outputs,[],m,[i],[],t,!1,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,h)}_visitTextWithInterpolation(i,e,t,o){let r=l8(i),a=this.bindingParser.parseInterpolation(r,e,t);return a?new tf(a,e,o):new tu(r,e)}parseVariable(i,e,t,o,r,a){i.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',t):i.length===0&&this.reportError("Variable does not have a name",t),a.push(new Tm(i,e,t,o,r))}parseReference(i,e,t,o,r,a){i.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',t):i.length===0?this.reportError("Reference does not have a name",t):a.some(c=>c.name===i)&&this.reportError(`Reference "#${i}" is defined more than once`,t),a.push(new M0(i,e,t,o,r))}parseAssignmentEvent(i,e,t,o,r,a,c,m){let u=[];this.bindingParser.parseEvent(`${i}Change`,e,!0,t,o||t,r,u,c),fE(u,a)}validateSelectorlessReferences(i){if(i.length===0)return;let e=new Set;for(let t of i)t.value.length>0?this.reportError("Cannot specify a value for a local reference in this context",t.valueSpan||t.sourceSpan):e.has(t.name)?this.reportError("Duplicate reference names are not allowed",t.sourceSpan):e.add(t.name)}reportError(i,e,t=ym.ERROR){this.errors.push(new ln(e,i,t))}},BD=class{visitElement(i){let e=P8(i);if(e.type===Ns.SCRIPT||e.type===Ns.STYLE||e.type===Ns.STYLESHEET)return null;let t=So(this,i.children,null);return new Rc(i.name,So(this,i.attrs),[],[],[],t,[],i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid)}visitComment(i){return null}visitAttribute(i){return new nf(i.name,i.value,i.sourceSpan,i.keySpan,i.valueSpan,i.i18n)}visitText(i){return new tu(i.value,i.sourceSpan)}visitExpansion(i){return null}visitExpansionCase(i){return null}visitBlock(i,e){let t=[new tu(i.startSourceSpan.toString(),i.startSourceSpan),...So(this,i.children)];return i.endSourceSpan!==null&&t.push(new tu(i.endSourceSpan.toString(),i.endSourceSpan)),t}visitBlockParameter(i,e){return null}visitLetDeclaration(i,e){return new tu(`@let ${i.name} = ${i.value};`,i.sourceSpan)}visitComponent(i,e){let t=So(this,i.children,null);return new Rc(i.fullName,So(this,i.attrs),[],[],[],t,[],i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,!1)}visitDirective(i,e){return null}},i6=new BD;function o6(n){return/^data-/i.test(n)?n.substring(5):n}function fE(n,i){i.push(...n.map(e=>RE.fromParsedEvent(e)))}function vte(n){return n.children.length!==1||!(n.children[0]instanceof Mu)?null:n.children[0].value}var Cte=[" ",` -`,"\r"," "];function bte(n,i,e={}){let{preserveWhitespaces:t,enableI18nLegacyMessageIdFormat:o}=e,r=e.enableSelectorless??!1,a=lx(r),m=new DD().parse(n,i,We(q({leadingTriviaChars:Cte},e),{tokenizeExpansionForms:!0,tokenizeBlocks:e.enableBlockSyntax??!0,tokenizeLet:e.enableLetSyntax??!0,selectorlessEnabled:r}));if(!e.alwaysAttemptHtmlToR3AstConversion&&m.errors&&m.errors.length>0){let D={preserveWhitespaces:t,errors:m.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(D.commentNodes=[]),D}let u=m.rootNodes,h=!(e.preserveSignificantWhitespace??!0),g=new nx(!t,o,e.preserveSignificantWhitespace,h),S=g.visitAllWithErrors(u);if(!e.alwaysAttemptHtmlToR3AstConversion&&S.errors&&S.errors.length>0){let D={preserveWhitespaces:t,errors:S.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(D.commentNodes=[]),D}u=S.rootNodes,t||(u=So(new ex(!0,void 0,!1),u),g.hasI18nMeta&&(u=So(new nx(!1,void 0,!0,h),u)));let{nodes:x,errors:C,styleUrls:M,styles:w,ngContentSelectors:y,commentNodes:k}=_te(u,a,{collectCommentNodes:!!e.collectCommentNodes});C.push(...m.errors,...S.errors);let I={preserveWhitespaces:t,errors:C.length>0?C:null,nodes:x,styleUrls:M,styles:w,ngContentSelectors:y};return e.collectCommentNodes&&(I.commentNodes=k),I}var xte=new pf;function lx(n=!1){return new PD(new tx(new G0,n),xte,[])}var A8="%COMP%",yte=`_nghost-${A8}`,Ste=`_ngcontent-${A8}`;function O8(n,i,e){let t=new Pm,o=XD(n.selector);return t.set("type",n.type.value),o.length>0&&t.set("selectors",zh(o)),n.queries.length>0&&t.set("contentQueries",mee(n.queries,i,n.name)),n.viewQueries.length&&t.set("viewQuery",dee(n.viewQueries,i,n.name)),t.set("hostBindings",Ite(n.host,n.typeSourceSpan,e,i,n.selector||"",n.name,t)),t.set("inputs",OR(n.inputs,!0)),t.set("outputs",OR(n.outputs)),n.exportAs!==null&&t.set("exportAs",Yi(n.exportAs.map(r=>ke(r)))),n.isStandalone===!1&&t.set("standalone",ke(!1)),n.isSignal&&t.set("signals",ke(!0)),t}function N8(n,i){let e=[],t=i.providers,o=i.viewProviders;if(t||o){let r=[t||new Oc([])];o&&r.push(o),e.push(qt(fe.ProvidersFeature).callFn(r))}if(i.hostDirectives?.length&&e.push(qt(fe.HostDirectivesFeature).callFn([Fte(i.hostDirectives)])),i.usesInheritance&&e.push(qt(fe.InheritDefinitionFeature)),i.lifecycle.usesOnChanges&&e.push(qt(fe.NgOnChangesFeature)),i.controlCreate!==null&&e.push(qt(fe.ControlFeature).callFn([ke(i.controlCreate.passThroughInput)])),"externalStyles"in i&&i.externalStyles?.length){let r=i.externalStyles.map(a=>ke(a));e.push(qt(fe.ExternalStylesFeature).callFn([Yi(r)]))}e.length&&n.set("features",Yi(e))}function wte(n,i,e){let t=O8(n,i,e);N8(t,n);let o=qt(fe.defineDirective).callFn([t.toLiteralMap()],void 0,!0),r=Pte(n);return{expression:o,type:r,statements:[]}}function Mte(n,i,e){let t=O8(n,i,e);N8(t,n);let o=n.selector&&qh.parse(n.selector),r=o&&o[0];if(r){let C=r.getAttrs();C.length&&t.set("attrs",i.getConstLiteral(Yi(C.map(M=>M!=null?ke(M):ke(void 0))),!0))}let a=n.name,c=null;if(n.defer.mode===1&&n.defer.dependenciesFn!==null){let C=`${a}_DeferFn`;i.statements.push(new zr(C,n.defer.dependenciesFn,void 0,ma.Final)),c=Jn(C)}let m=n.isStandalone&&!n.hasDirectiveDependencies?as.DomOnly:as.Full,u=VJ(n.name,n.template.nodes,i,m,n.relativeContextFilePath,n.i18nUseExternalIds,n.defer,c,n.relativeTemplatePath,see());b8(u,Dt.Tmpl);let h=RJ(u,i);if(u.contentSelectors!==null&&t.set("ngContentSelectors",u.contentSelectors),t.set("decls",ke(u.root.decls)),t.set("vars",ke(u.root.vars)),u.consts.length>0&&(u.constsInitializers.length>0?t.set("consts",Vs([],[...u.constsInitializers,new Mr(Yi(u.consts))])):t.set("consts",Yi(u.consts))),t.set("template",h),n.declarationListEmitMode!==3&&n.declarations.length>0)t.set("dependencies",Tte(Yi(n.declarations.map(C=>C.type)),n.declarationListEmitMode));else if(n.declarationListEmitMode===3){let C=[n.type.value];n.rawImports&&C.push(n.rawImports),t.set("dependencies",qt(fe.getComponentDepsFactory).callFn(C))}n.encapsulation===null&&(n.encapsulation=Xp.Emulated);let g=!!n.externalStyles?.length;if(n.styles&&n.styles.length){let M=(n.encapsulation==Xp.Emulated?Rte(n.styles,Ste,yte):n.styles).reduce((w,y)=>(y.trim().length>0&&w.push(i.getConstLiteral(ke(y))),w),[]);M.length>0&&(g=!0,t.set("styles",Yi(M)))}!g&&n.encapsulation===Xp.Emulated&&(n.encapsulation=Xp.None),n.encapsulation!==Xp.Emulated&&t.set("encapsulation",ke(n.encapsulation)),n.animations!==null&&t.set("data",pl([{key:"animation",value:n.animations,quoted:!1}])),n.changeDetection!==null&&(typeof n.changeDetection=="number"&&n.changeDetection!==QD.Default?t.set("changeDetection",ke(n.changeDetection)):typeof n.changeDetection=="object"&&t.set("changeDetection",n.changeDetection));let S=qt(fe.defineComponent).callFn([t.toLiteralMap()],void 0,!0),x=kte(n);return{expression:S,type:x,statements:[]}}function kte(n){let i=R8(n);return i.push(zD(n.template.ngContentSelectors)),i.push(pa(ke(n.isStandalone))),i.push(F8(n)),n.isSignal&&i.push(pa(ke(n.isSignal))),pa(qt(fe.ComponentDeclaration,i))}function Tte(n,i){switch(i){case 0:return n;case 1:return Vs([],n);case 2:let e=n.prop("map").callFn([qt(fe.resolveForwardRef)]);return Vs([],e);case 3:throw new Error("Unsupported with an array of pre-resolved dependencies")}}function Ete(n){return pa(ke(n))}function VD(n){let i=Object.keys(n).map(e=>{let t=Array.isArray(n[e])?n[e][0]:n[e];return{key:e,value:ke(t),quoted:!0}});return pl(i)}function zD(n){return n.length>0?pa(Yi(n.map(i=>ke(i)))):Ic}function R8(n){let i=n.selector!==null?n.selector.replace(/\n/g,""):null;return[px(n.type.type,n.typeArgumentCount),i!==null?Ete(i):Ic,n.exportAs!==null?zD(n.exportAs):Ic,pa(Dte(n)),pa(VD(n.outputs)),zD(n.queries.map(e=>e.propertyName))]}function Dte(n){return pl(Object.keys(n.inputs).map(i=>{let e=n.inputs[i],t=[{key:"alias",value:ke(e.bindingPropertyName),quoted:!0},{key:"required",value:ke(e.required),quoted:!0}];return e.isSignal&&t.push({key:"isSignal",value:ke(e.isSignal),quoted:!0}),{key:i,value:pl(t),quoted:!0}}))}function Pte(n){let i=R8(n);return i.push(Ic),i.push(pa(ke(n.isStandalone))),i.push(F8(n)),n.isSignal&&i.push(pa(ke(n.isSignal))),pa(qt(fe.DirectiveDeclaration,i))}function Ite(n,i,e,t,o,r,a){let c=e.createBoundHostProperties(n.properties,i),m=e.createDirectiveHostEventAsts(n.listeners,i);n.specialAttributes.styleAttr&&(n.attributes.style=ke(n.specialAttributes.styleAttr)),n.specialAttributes.classAttr&&(n.attributes.class=ke(n.specialAttributes.classAttr));let u=zJ({componentName:r,componentSelector:o,properties:c,events:m,attributes:n.attributes},e,t);b8(u,Dt.Host),a.set("hostAttrs",u.root.attributes);let h=u.root.vars;return h!==null&&h>0&&a.set("hostVars",ke(h)),FJ(u)}var Ate=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;function Ote(n){let i={},e={},t={},o={};for(let r of Object.keys(n)){let a=n[r],c=r.match(Ate);if(c===null)switch(r){case"class":if(typeof a!="string")throw new Error("Class binding must be string");o.classAttr=a;break;case"style":if(typeof a!="string")throw new Error("Style binding must be string");o.styleAttr=a;break;default:typeof a=="string"?i[r]=ke(a):i[r]=a}else if(c[1]!=null){if(typeof a!="string")throw new Error("Property binding must be string");t[c[1]]=a}else if(c[2]!=null){if(typeof a!="string")throw new Error("Event binding must be string");e[c[2]]=a}}return{attributes:i,listeners:e,properties:t,specialAttributes:o}}function Nte(n,i){let e=lx();return e.createDirectiveHostEventAsts(n.listeners,i),e.createBoundHostProperties(n.properties,i),e.errors}function Rte(n,i,e){let t=new YE;return n.map(o=>t.shimCssText(o,i,e))}function F8(n){return n.hostDirectives?.length?pa(Yi(n.hostDirectives.map(i=>pl([{key:"directive",value:Y0(i.directive.type),quoted:!1},{key:"inputs",value:VD(i.inputs||{}),quoted:!1},{key:"outputs",value:VD(i.outputs||{}),quoted:!1}])))):Ic}function Fte(n){let i=[],e=!1;for(let t of n){if(!t.inputs&&!t.outputs)i.push(t.directive.type);else{let o=[{key:"directive",value:t.directive.type,quoted:!1}];if(t.inputs){let r=r6(t.inputs);r&&o.push({key:"inputs",value:r,quoted:!1})}if(t.outputs){let r=r6(t.outputs);r&&o.push({key:"outputs",value:r,quoted:!1})}i.push(pl(o))}t.isForwardReference&&(e=!0)}return e?new wm([],[new Mr(Yi(i))]):Yi(i)}function r6(n){let i=[];for(let e in n)n.hasOwnProperty(e)&&i.push(ke(e),ke(n[e]));return i.length>0?Yi(i):null}var jD=class extends ef{visit(i){i instanceof cs?this.visit(i.ast):i.visit(this)}visitElement(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitTemplate(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.templateAttrs),this.visitAllTemplateNodes(i.variables),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitContent(i){this.visitAllTemplateNodes(i.children)}visitBoundAttribute(i){this.visit(i.value)}visitBoundEvent(i){this.visit(i.handler)}visitBoundText(i){this.visit(i.value)}visitIcu(i){Object.keys(i.vars).forEach(e=>this.visit(i.vars[e])),Object.keys(i.placeholders).forEach(e=>this.visit(i.placeholders[e]))}visitDeferredBlock(i){i.visitAll(this)}visitDeferredTrigger(i){i instanceof kb?this.visit(i.value):i instanceof C0&&i.options!==null&&this.visit(i.options)}visitDeferredBlockPlaceholder(i){this.visitAllTemplateNodes(i.children)}visitDeferredBlockError(i){this.visitAllTemplateNodes(i.children)}visitDeferredBlockLoading(i){this.visitAllTemplateNodes(i.children)}visitSwitchBlock(i){this.visit(i.expression),this.visitAllTemplateNodes(i.groups)}visitSwitchBlockCase(i){i.expression&&this.visit(i.expression)}visitSwitchBlockCaseGroup(i){this.visitAllTemplateNodes(i.cases),this.visitAllTemplateNodes(i.children)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.item.visit(this),this.visitAllTemplateNodes(i.contextVariables),this.visit(i.expression),this.visitAllTemplateNodes(i.children),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.visitAllTemplateNodes(i.children)}visitIfBlock(i){this.visitAllTemplateNodes(i.branches)}visitIfBlockBranch(i){i.expression&&this.visit(i.expression),i.expressionAlias?.visit(this),this.visitAllTemplateNodes(i.children)}visitLetDeclaration(i){this.visit(i.value)}visitComponent(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitDirective(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.references)}visitVariable(i){}visitReference(i){}visitTextAttribute(i){}visitText(i){}visitUnknownBlock(i){}visitAllTemplateNodes(i){for(let e of i)this.visit(e)}};var $D=class{directiveMatcher;constructor(i){this.directiveMatcher=i}bind(i){if(!i.template&&!i.host)throw new Error("Empty bound targets are not supported");let e=new Map,t=[],o=new Set,r=new Map,a=new Map,c=new Map,m=new Map,u=new Map,h=new Map,g=new Set,S=new Set,x=[];if(i.template){let C=cx.apply(i.template);Lte(C,c),HD.apply(i.template,this.directiveMatcher,e,t,o,r,a),dx.applyWithScope(i.template,C,m,u,h,g,S,x)}return i.host&&(e.set(i.host.node,i.host.directives),dx.applyWithScope(i.host.node,cx.apply(i.host.node),m,u,h,g,S,x)),new UD(i,e,t,o,r,a,m,u,h,c,g,S,x)}},cx=class n{parentScope;rootNode;namedEntities=new Map;elementLikeInScope=new Set;childScopes=new Map;isDeferred;constructor(i,e){this.parentScope=i,this.rootNode=e,this.isDeferred=i!==null&&i.isDeferred?!0:e instanceof Cu}static newRootScope(){return new n(null,null)}static apply(i){let e=n.newRootScope();return e.ingest(i),e}ingest(i){i instanceof Fs?(i.variables.forEach(e=>this.visitVariable(e)),i.children.forEach(e=>e.visit(this))):i instanceof ou?(i.expressionAlias!==null&&this.visitVariable(i.expressionAlias),i.children.forEach(e=>e.visit(this))):i instanceof of?(this.visitVariable(i.item),i.contextVariables.forEach(e=>this.visitVariable(e)),i.children.forEach(e=>e.visit(this))):i instanceof S0||i instanceof w0||i instanceof Cu||i instanceof y0||i instanceof b0||i instanceof x0||i instanceof rf?i.children.forEach(e=>e.visit(this)):i instanceof k0||i.forEach(e=>e.visit(this))}visitElement(i){this.visitElementLike(i)}visitTemplate(i){i.directives.forEach(e=>e.visit(this)),i.references.forEach(e=>this.visitReference(e)),this.ingestScopedNode(i)}visitVariable(i){this.maybeDeclare(i)}visitReference(i){this.maybeDeclare(i)}visitDeferredBlock(i){this.ingestScopedNode(i),i.placeholder?.visit(this),i.loading?.visit(this),i.error?.visit(this)}visitDeferredBlockPlaceholder(i){this.ingestScopedNode(i)}visitDeferredBlockError(i){this.ingestScopedNode(i)}visitDeferredBlockLoading(i){this.ingestScopedNode(i)}visitSwitchBlock(i){i.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(i){}visitSwitchBlockCaseGroup(i){this.ingestScopedNode(i)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){this.ingestScopedNode(i),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.ingestScopedNode(i)}visitIfBlock(i){i.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(i){this.ingestScopedNode(i)}visitContent(i){this.ingestScopedNode(i)}visitLetDeclaration(i){this.maybeDeclare(i)}visitComponent(i){this.visitElementLike(i)}visitDirective(i){i.references.forEach(e=>this.visitReference(e))}visitBoundAttribute(i){}visitBoundEvent(i){}visitBoundText(i){}visitText(i){}visitTextAttribute(i){}visitIcu(i){}visitDeferredTrigger(i){}visitUnknownBlock(i){}visitElementLike(i){i.directives.forEach(e=>e.visit(this)),i.references.forEach(e=>this.visitReference(e)),i.children.forEach(e=>e.visit(this)),this.elementLikeInScope.add(i)}maybeDeclare(i){this.namedEntities.has(i.name)||this.namedEntities.set(i.name,i)}lookup(i){return this.namedEntities.has(i)?this.namedEntities.get(i):this.parentScope!==null?this.parentScope.lookup(i):null}getChildScope(i){let e=this.childScopes.get(i);if(e===void 0)throw new Error(`Assertion error: child scope for ${i} not found`);return e}ingestScopedNode(i){let e=new n(this,i);e.ingest(i),this.childScopes.set(i,e)}},HD=class n{directiveMatcher;directives;eagerDirectives;missingDirectives;bindings;references;isInDeferBlock=!1;constructor(i,e,t,o,r,a){this.directiveMatcher=i,this.directives=e,this.eagerDirectives=t,this.missingDirectives=o,this.bindings=r,this.references=a}static apply(i,e,t,o,r,a,c){new n(e,t,o,r,a,c).ingest(i)}ingest(i){i.forEach(e=>e.visit(this))}visitElement(i){this.visitElementOrTemplate(i)}visitTemplate(i){this.visitElementOrTemplate(i)}visitDeferredBlock(i){let e=this.isInDeferBlock;this.isInDeferBlock=!0,i.children.forEach(t=>t.visit(this)),this.isInDeferBlock=e,i.placeholder?.visit(this),i.loading?.visit(this),i.error?.visit(this)}visitDeferredBlockPlaceholder(i){i.children.forEach(e=>e.visit(this))}visitDeferredBlockError(i){i.children.forEach(e=>e.visit(this))}visitDeferredBlockLoading(i){i.children.forEach(e=>e.visit(this))}visitSwitchBlock(i){i.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(i){}visitSwitchBlockCaseGroup(i){i.children.forEach(e=>e.visit(this))}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.item.visit(this),i.contextVariables.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this)),i.empty?.visit(this)}visitForLoopBlockEmpty(i){i.children.forEach(e=>e.visit(this))}visitIfBlock(i){i.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(i){i.expressionAlias?.visit(this),i.children.forEach(e=>e.visit(this))}visitContent(i){i.children.forEach(e=>e.visit(this))}visitComponent(i){if(this.directiveMatcher instanceof ob){let e=this.directiveMatcher.match(i.componentName);e.length>0?this.trackSelectorlessMatchesAndDirectives(i,e):this.missingDirectives.add(i.componentName)}i.directives.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this))}visitDirective(i){if(this.directiveMatcher instanceof ob){let e=this.directiveMatcher.match(i.name);e.length>0?this.trackSelectorlessMatchesAndDirectives(i,e):this.missingDirectives.add(i.name)}}visitElementOrTemplate(i){if(this.directiveMatcher instanceof ib){let e=[],t=TW(i);this.directiveMatcher.match(t,(o,r)=>e.push(...r)),this.trackSelectorBasedBindingsAndDirectives(i,e)}else i.references.forEach(e=>{e.value.trim()===""&&this.references.set(e,i)});i.directives.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this))}trackMatchedDirectives(i,e){e.length>0&&(this.directives.set(i,e),this.isInDeferBlock||this.eagerDirectives.push(...e))}trackSelectorlessMatchesAndDirectives(i,e){if(e.length===0)return;this.trackMatchedDirectives(i,e);let t=(o,r,a)=>{o[a].hasBindingPropertyName(r.name)&&this.bindings.set(r,o)};for(let o of e)i.inputs.forEach(r=>t(o,r,"inputs")),i.attributes.forEach(r=>t(o,r,"inputs")),i.outputs.forEach(r=>t(o,r,"outputs"));i.references.forEach(o=>this.references.set(o,{directive:e[0],node:i}))}trackSelectorBasedBindingsAndDirectives(i,e){this.trackMatchedDirectives(i,e),i.references.forEach(o=>{let r=null;if(o.value.trim()==="")r=e.find(a=>a.isComponent)||null;else if(r=e.find(a=>a.exportAs!==null&&a.exportAs.some(c=>c===o.value))||null,r===null)return;r!==null?this.references.set(o,{directive:r,node:i}):this.references.set(o,i)});let t=(o,r)=>{let a=e.find(m=>m[r].hasBindingPropertyName(o.name)),c=a!==void 0?a:i;this.bindings.set(o,c)};i.inputs.forEach(o=>t(o,"inputs")),i.attributes.forEach(o=>t(o,"inputs")),i instanceof Fs&&i.templateAttrs.forEach(o=>t(o,"inputs")),i.outputs.forEach(o=>t(o,"outputs"))}visitVariable(i){}visitReference(i){}visitTextAttribute(i){}visitBoundAttribute(i){}visitBoundEvent(i){}visitBoundAttributeOrEvent(i){}visitText(i){}visitBoundText(i){}visitIcu(i){}visitDeferredTrigger(i){}visitUnknownBlock(i){}visitLetDeclaration(i){}},dx=class n extends jD{bindings;symbols;usedPipes;eagerPipes;deferBlocks;nestingLevel;scope;rootNode;level;visitNode=i=>i.visit(this);constructor(i,e,t,o,r,a,c,m,u){super(),this.bindings=i,this.symbols=e,this.usedPipes=t,this.eagerPipes=o,this.deferBlocks=r,this.nestingLevel=a,this.scope=c,this.rootNode=m,this.level=u}static applyWithScope(i,e,t,o,r,a,c,m){let u=i instanceof Fs?i:null;new n(t,o,a,c,m,r,e,u,0).ingest(i)}ingest(i){if(i instanceof Fs)i.variables.forEach(this.visitNode),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof ou)i.expressionAlias!==null&&this.visitNode(i.expressionAlias),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof of)this.visitNode(i.item),i.contextVariables.forEach(e=>this.visitNode(e)),i.trackBy.visit(this),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof Cu){if(this.scope.rootNode!==i)throw new Error(`Assertion error: resolved incorrect scope for deferred block ${i}`);this.deferBlocks.push([i,this.scope]),i.children.forEach(e=>e.visit(this)),this.nestingLevel.set(i,this.level)}else i instanceof S0||i instanceof w0||i instanceof y0||i instanceof b0||i instanceof x0||i instanceof rf?(i.children.forEach(e=>e.visit(this)),this.nestingLevel.set(i,this.level)):i instanceof k0?this.nestingLevel.set(i,0):i.forEach(this.visitNode)}visitTemplate(i){i.inputs.forEach(this.visitNode),i.outputs.forEach(this.visitNode),i.directives.forEach(this.visitNode),i.templateAttrs.forEach(this.visitNode),i.references.forEach(this.visitNode),this.ingestScopedNode(i)}visitVariable(i){this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitReference(i){this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitDeferredBlock(i){this.ingestScopedNode(i),i.triggers.when?.value.visit(this),i.prefetchTriggers.when?.value.visit(this),i.hydrateTriggers.when?.value.visit(this),i.hydrateTriggers.never?.visit(this),i.placeholder&&this.visitNode(i.placeholder),i.loading&&this.visitNode(i.loading),i.error&&this.visitNode(i.error)}visitDeferredBlockPlaceholder(i){this.ingestScopedNode(i)}visitDeferredBlockError(i){this.ingestScopedNode(i)}visitDeferredBlockLoading(i){this.ingestScopedNode(i)}visitSwitchBlockCase(i){i.expression?.visit(this)}visitSwitchBlockCaseGroup(i){i.cases.forEach(e=>e.visit(this)),this.ingestScopedNode(i)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.expression.visit(this),this.ingestScopedNode(i),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.ingestScopedNode(i)}visitIfBlockBranch(i){i.expression?.visit(this),this.ingestScopedNode(i)}visitContent(i){this.ingestScopedNode(i)}visitLetDeclaration(i){super.visitLetDeclaration(i),this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitPipe(i,e){return this.usedPipes.add(i.name),this.scope.isDeferred||this.eagerPipes.add(i.name),super.visitPipe(i,e)}visitPropertyRead(i,e){return this.maybeMap(i,i.name),super.visitPropertyRead(i,e)}visitSafePropertyRead(i,e){return this.maybeMap(i,i.name),super.visitSafePropertyRead(i,e)}ingestScopedNode(i){let e=this.scope.getChildScope(i);new n(this.bindings,this.symbols,this.usedPipes,this.eagerPipes,this.deferBlocks,this.nestingLevel,e,i,this.level+1).ingest(i)}maybeMap(i,e){if(!(i.receiver instanceof Nc))return;let t=this.scope.lookup(e);t!==null&&this.bindings.set(i,t)}},UD=class{target;directives;eagerDirectives;missingDirectives;bindings;references;exprTargets;symbols;nestingLevel;scopedNodeEntities;usedPipes;eagerPipes;deferredBlocks;deferredScopes;constructor(i,e,t,o,r,a,c,m,u,h,g,S,x){this.target=i,this.directives=e,this.eagerDirectives=t,this.missingDirectives=o,this.bindings=r,this.references=a,this.exprTargets=c,this.symbols=m,this.nestingLevel=u,this.scopedNodeEntities=h,this.usedPipes=g,this.eagerPipes=S,this.deferredBlocks=x.map(C=>C[0]),this.deferredScopes=new Map(x)}getEntitiesInScope(i){return this.scopedNodeEntities.get(i)??new Set}getDirectivesOfNode(i){return this.directives.get(i)||null}getReferenceTarget(i){return this.references.get(i)||null}getConsumerOfBinding(i){return this.bindings.get(i)||null}getExpressionTarget(i){return this.exprTargets.get(i)||null}getDefinitionNodeOfSymbol(i){return this.symbols.get(i)||null}getNestingLevel(i){return this.nestingLevel.get(i)||0}getUsedDirectives(){let i=new Set;return this.directives.forEach(e=>e.forEach(t=>i.add(t))),Array.from(i.values())}getEagerlyUsedDirectives(){let i=new Set(this.eagerDirectives);return Array.from(i.values())}getUsedPipes(){return Array.from(this.usedPipes)}getEagerlyUsedPipes(){return Array.from(this.eagerPipes)}getDeferBlocks(){return this.deferredBlocks}getDeferredTriggerTarget(i,e){if(!(e instanceof Eb)&&!(e instanceof C0)&&!(e instanceof Tb))return null;let t=e.reference;if(t===null){let r=null;if(i.placeholder!==null){for(let a of i.placeholder.children)if(!(a instanceof ux)){if(r!==null)return null;a instanceof Rc&&(r=a)}}return r}let o=this.findEntityInScope(i,t);if(o instanceof M0&&this.getDefinitionNodeOfSymbol(o)!==i){let r=this.getReferenceTarget(o);if(r!==null)return this.referenceTargetToElement(r)}if(i.placeholder!==null){let r=this.findEntityInScope(i.placeholder,t),a=r instanceof M0?this.getReferenceTarget(r):null;if(a!==null)return this.referenceTargetToElement(a)}return null}isDeferred(i){for(let e of this.deferredBlocks){if(!this.deferredScopes.has(e))continue;let t=[this.deferredScopes.get(e)];for(;t.length>0;){let o=t.pop();if(o.elementLikeInScope.has(i))return!0;t.push(...o.childScopes.values())}}return!1}referencedDirectiveExists(i){return!this.missingDirectives.has(i)}findEntityInScope(i,e){let t=this.getEntitiesInScope(i);for(let o of t)if(o.name===e)return o;return null}referenceTargetToElement(i){return i instanceof Rc?i:i instanceof Fs||i.node instanceof G_||i.node instanceof b6||i.node instanceof k0?null:this.referenceTargetToElement(i.node)}};function Lte(n,i){let e=new Map;function t(r){if(e.has(r.rootNode))return e.get(r.rootNode);let a=r.namedEntities,c;return r.parentScope!==null?c=new Map([...t(r.parentScope),...a]):c=new Map(a),e.set(r.rootNode,c),c}let o=[n];for(;o.length>0;){let r=o.pop();for(let a of r.childScopes.values())o.push(a);t(r)}for(let[r,a]of e)i.set(r,new Set(a.values()))}var GD=class{},WD=class{jitEvaluator;FactoryTarget=Md;ResourceLoader=GD;elementSchemaRegistry=new pf;constructor(i=new qE){this.jitEvaluator=i}compilePipe(i,e,t){let o={name:t.name,type:Br(t.type),typeArgumentCount:0,pipeName:t.pipeName,pure:t.pure,isStandalone:t.isStandalone},r=UR(o);return this.jitExpression(r.expression,i,e,[])}compilePipeDeclaration(i,e,t){let o=ene(t),r=UR(o);return this.jitExpression(r.expression,i,e,[])}compileInjectable(i,e,t){let{expression:o,statements:r}=NR({name:t.name,type:Br(t.type),typeArgumentCount:t.typeArgumentCount,providedIn:m6(t.providedIn),useClass:Fh(t,"useClass"),useFactory:d6(t,"useFactory"),useValue:Fh(t,"useValue"),useExisting:Fh(t,"useExisting"),deps:t.deps?.map(z8)},!0);return this.jitExpression(o,i,e,r)}compileInjectableDeclaration(i,e,t){let{expression:o,statements:r}=NR({name:t.type.name,type:Br(t.type),typeArgumentCount:0,providedIn:m6(t.providedIn),useClass:Fh(t,"useClass"),useFactory:d6(t,"useFactory"),useValue:Fh(t,"useValue"),useExisting:Fh(t,"useExisting"),deps:t.deps?.map(p6)},!0);return this.jitExpression(o,i,e,r)}compileInjector(i,e,t){let o={type:Br(t.type),providers:t.providers&&t.providers.length>0?new ai(t.providers):null,imports:t.imports.map(a=>new ai(a))},r=HR(o);return this.jitExpression(r.expression,i,e,[])}compileInjectorDeclaration(i,e,t){let o=tne(t),r=HR(o);return this.jitExpression(r.expression,i,e,[])}compileNgModule(i,e,t){let o={kind:Sm.Global,type:Br(t.type),bootstrap:t.bootstrap.map(Br),declarations:t.declarations.map(Br),publicDeclarationTypes:null,imports:t.imports.map(Br),includeImportTypes:!0,exports:t.exports.map(Br),selectorScopeMode:Lb.Inline,containsForwardDecls:!1,schemas:t.schemas?t.schemas.map(Br):null,id:t.id?new ai(t.id):null},r=qW(o);return this.jitExpression(r.expression,i,e,[])}compileNgModuleDeclaration(i,e,t){let o=QW(t);return this.jitExpression(o,i,e,[])}compileDirective(i,e,t){let o=l6(t);return this.compileDirectiveFromMeta(i,e,o)}compileDirectiveDeclaration(i,e,t){let o=this.createParseSourceSpan("Directive",t.type.name,e),r=B8(t,o);return this.compileDirectiveFromMeta(i,e,r)}compileDirectiveFromMeta(i,e,t){let o=new hb,r=lx(),a=wte(t,o,r);return this.jitExpression(a.expression,i,e,o.statements)}compileComponent(i,e,t){let{template:o,defer:r}=V8(t.template,t.name,e,t.preserveWhitespaces,void 0),a=We(q(q({},t),l6(t)),{selector:t.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:o,declarations:t.declarations.map(jte),declarationListEmitMode:0,defer:r,styles:[...t.styles,...o.styles],encapsulation:t.encapsulation,changeDetection:t.changeDetection??null,animations:t.animations!=null?new ai(t.animations):null,viewProviders:t.viewProviders!=null?new ai(t.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null}),c=`ng:///${t.name}.js`;return this.compileComponentFromMeta(i,c,a)}compileComponentDeclaration(i,e,t){let o=this.createParseSourceSpan("Component",t.type.name,e),r=zte(t,o,e);return this.compileComponentFromMeta(i,e,r)}compileComponentFromMeta(i,e,t){let o=new hb,r=lx(),a=Mte(t,o,r);return this.jitExpression(a.expression,i,e,o.statements)}compileFactory(i,e,t){let o=Yp({name:t.name,type:Br(t.type),typeArgumentCount:t.typeArgumentCount,deps:Ute(t.deps),target:t.target});return this.jitExpression(o.expression,i,e,o.statements)}compileFactoryDeclaration(i,e,t){let o=Yp({name:t.type.name,type:Br(t.type),typeArgumentCount:0,deps:Array.isArray(t.deps)?t.deps.map(p6):t.deps,target:t.target});return this.jitExpression(o.expression,i,e,o.statements)}createParseSourceSpan(i,e,t){return zW(i,e,t)}jitExpression(i,e,t,o){let r=[...o,new zr("$def",i,void 0,ma.Exported)];return this.jitEvaluator.evaluateStatements(t,r,new XE(e),!0).$def}};function a6(n){return We(q({},n),{isSignal:n.isSignal,predicate:L8(n.predicate),read:n.read?new ai(n.read):null,static:n.static,emitDistinctChangesOnly:n.emitDistinctChangesOnly})}function s6(n){return{propertyName:n.propertyName,first:n.first??!1,predicate:L8(n.predicate),descendants:n.descendants??!1,read:n.read?new ai(n.read):null,static:n.static??!1,emitDistinctChangesOnly:n.emitDistinctChangesOnly??!0,isSignal:!!n.isSignal}}function L8(n){return Array.isArray(n)?n:ZD(new ai(n),1)}function l6(n){let i=Jte(n.inputs||[]),e=_E(n.outputs||[]),t=n.propMetadata,o={},r={};for(let c in t)t.hasOwnProperty(c)&&t[c].forEach(m=>{Xte(m)?o[c]={bindingPropertyName:m.alias||c,classPropertyName:c,required:m.required||!1,isSignal:!!m.isSignal,transformFunction:m.transform!=null?new ai(m.transform):null}:Yte(m)&&(r[c]=m.alias||c)});let a=n.hostDirectives?.length?n.hostDirectives.map(c=>typeof c=="function"?{directive:Br(c),inputs:null,outputs:null,isForwardReference:!1}:{directive:Br(c.directive),isForwardReference:!1,inputs:c.inputs?_E(c.inputs):null,outputs:c.outputs?_E(c.outputs):null}):null;return We(q({},n),{typeArgumentCount:0,typeSourceSpan:n.typeSourceSpan,type:Br(n.type),deps:null,host:q({},Wte(n.propMetadata,n.typeSourceSpan,n.host)),inputs:q(q({},i),o),outputs:q(q({},e),r),queries:n.queries.map(a6),providers:n.providers!=null?new ai(n.providers):null,viewQueries:n.viewQueries.map(a6),hostDirectives:a})}function B8(n,i){let e=n.hostDirectives?.length?n.hostDirectives.map(t=>({directive:Br(t.directive),isForwardReference:!1,inputs:t.inputs?c6(t.inputs):null,outputs:t.outputs?c6(t.outputs):null})):null;return{name:n.type.name,type:Br(n.type),typeSourceSpan:i,selector:n.selector??null,inputs:n.inputs?Kte(n.inputs):{},outputs:n.outputs??{},host:Bte(n.host),queries:(n.queries??[]).map(s6),viewQueries:(n.viewQueries??[]).map(s6),providers:n.providers!==void 0?new ai(n.providers):null,exportAs:n.exportAs??null,usesInheritance:n.usesInheritance??!1,controlCreate:n.controlCreate??null,lifecycle:{usesOnChanges:n.usesOnChanges??!1},deps:null,typeArgumentCount:0,isStandalone:n.isStandalone??C6(n.version),isSignal:n.isSignal??!1,hostDirectives:e}}function Bte(n={}){return{attributes:Vte(n.attributes??{}),listeners:n.listeners??{},properties:n.properties??{},specialAttributes:{classAttr:n.classAttribute,styleAttr:n.styleAttribute}}}function c6(n){let i=null;for(let e=1;egE(c,!0))),n.directives&&r.push(...n.directives.map(c=>gE(c))),n.pipes&&r.push(...$te(n.pipes)));let a=r.some(({kind:c})=>c===sf.Directive||c===sf.NgModule);return We(q({},B8(n,i)),{template:t,styles:n.styles??[],declarations:r,viewProviders:n.viewProviders!==void 0?new ai(n.viewProviders):null,animations:n.animations!==void 0?new ai(n.animations):null,defer:o,changeDetection:n.changeDetection??QD.Default,encapsulation:n.encapsulation??Xp.Emulated,declarationListEmitMode:2,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null,hasDirectiveDependencies:a})}function jte(n){return We(q({},n),{type:new ai(n.type)})}function gE(n,i=null){return{kind:sf.Directive,isComponent:i||n.kind==="component",selector:n.selector,type:new ai(n.type),inputs:n.inputs??[],outputs:n.outputs??[],exportAs:n.exportAs??null}}function $te(n){return n?Object.keys(n).map(i=>({kind:sf.Pipe,name:i,type:new ai(n[i])})):[]}function Hte(n){return{kind:sf.Pipe,name:n.name,type:new ai(n.type)}}function V8(n,i,e,t,o){let r=bte(n,e,{preserveWhitespaces:t});if(r.errors!==null){let m=r.errors.map(u=>u.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${i}: ${m}`)}let c=new $D(null).bind({template:r.nodes});return{template:r,defer:Gte(c,o)}}function Fh(n,i){if(n.hasOwnProperty(i))return ZD(new ai(n[i]),0)}function d6(n,i){if(n.hasOwnProperty(i))return new ai(n[i])}function m6(n){let i=typeof n=="function"?new ai(n):new ua(n??null);return ZD(i,0)}function Ute(n){return n==null?null:n.map(z8)}function z8(n){let i=n.attribute!=null,e=n.token===null?null:new ai(n.token),t=i?new ai(n.attribute):e;return j8(t,i,n.host,n.optional,n.self,n.skipSelf)}function p6(n){let i=n.attribute??!1,e=n.token===null?null:new ai(n.token);return j8(e,i,n.host??!1,n.optional??!1,n.self??!1,n.skipSelf??!1)}function j8(n,i,e,t,o,r){let a=i?ke("unknown"):null;return{token:n,attributeNameType:a,host:e,optional:t,self:o,skipSelf:r}}function Gte(n,i){let e=n.getDeferBlocks(),t=new Map;for(let o=0;or.msg).join(` -`));for(let r in n)n.hasOwnProperty(r)&&n[r].forEach(a=>{qte(a)?t.properties[a.hostPropertyName||r]=cW("this",r):Qte(a)&&(t.listeners[a.eventName||r]=`${r}(${(a.args||[]).join(",")})`)});return t}function qte(n){return n.ngMetadataName==="HostBinding"}function Qte(n){return n.ngMetadataName==="HostListener"}function Xte(n){return n.ngMetadataName==="Input"}function Yte(n){return n.ngMetadataName==="Output"}function Kte(n){return Object.keys(n).reduce((i,e)=>{let t=n[e];return typeof t=="string"||Array.isArray(t)?i[e]=Zte(t):i[e]={bindingPropertyName:t.publicName,classPropertyName:e,transformFunction:t.transformFunction!==null?new ai(t.transformFunction):null,required:t.isRequired,isSignal:t.isSignal},i},{})}function Zte(n){return typeof n=="string"?{bindingPropertyName:n,classPropertyName:n,transformFunction:null,required:!1,isSignal:!1}:{bindingPropertyName:n[0],classPropertyName:n[1],transformFunction:n[2]?new ai(n[2]):null,required:!1,isSignal:!1}}function Jte(n){return n.reduce((i,e)=>{if(typeof e=="string"){let[t,o]=$8(e);i[o]={bindingPropertyName:t,classPropertyName:o,required:!1,isSignal:!1,transformFunction:null}}else i[e.name]={bindingPropertyName:e.alias||e.name,classPropertyName:e.name,required:e.required||!1,isSignal:!1,transformFunction:e.transform!=null?new ai(e.transform):null};return i},{})}function _E(n){return n.reduce((i,e)=>{let[t,o]=$8(e);return i[o]=t,i},{})}function $8(n){let[i,e]=n.split(":",2).map(t=>t.trim());return[e??i,i]}function ene(n){return{name:n.type.name,type:Br(n.type),typeArgumentCount:0,pipeName:n.name,deps:null,pure:n.pure??!0,isStandalone:n.isStandalone??C6(n.version)}}function tne(n){return{name:n.type.name,type:Br(n.type),providers:n.providers!==void 0&&n.providers.length>0?new ai(n.providers):null,imports:n.imports!==void 0?n.imports.map(i=>new ai(i)):[]}}function nne(n){let i=n.ng||(n.ng={});i.\u0275compilerFacade=new WD}var qD=class{closedByParent=!1;implicitNamespacePrefix=null;isVoid=!1;ignoreFirstLf=!1;canSelfClose=!0;preventNamespaceInheritance=!1;requireExtraParent(i){return!1}isClosedByChild(i){return!1}getContentType(){return Mc.PARSABLE_DATA}},x6e=new qD;var y6e=new wE("21.2.6");nne(U_);function CP(n){let i=n.cloneNode(!0),e=i.querySelectorAll("[id]"),t=n.nodeName.toLowerCase();i.removeAttribute("id");for(let o=0;o=t&&e<=o&&i>=r&&i<=a}function rne(n,i){let e=i.leftn.right,o=i.topn.bottom;return e||t||o||r}function iv(n,i,e){n.top+=i,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function W8(n,i,e,t){let{top:o,right:r,bottom:a,left:c,width:m,height:u}=n,h=m*i,g=u*i;return t>o-g&&tc-h&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:MP(e)})})}handleScroll(i){let e=Wp(i),t=this.positions.get(e);if(!t)return null;let o=t.scrollPosition,r,a;if(e===this._document){let u=this.getViewportScrollPosition();r=u.top,a=u.left}else r=e.scrollTop,a=e.scrollLeft;let c=o.top-r,m=o.left-a;return this.positions.forEach((u,h)=>{u.clientRect&&e!==h&&e.contains(h)&&iv(u.clientRect,c,m)}),o.top=r,o.left=a,{top:c,left:m}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function oL(n,i){let e=n.rootNodes;if(e.length===1&&e[0].nodeType===i.ELEMENT_NODE)return e[0];let t=i.createElement("div");return e.forEach(o=>t.appendChild(o)),t}function kP(n,i,e){for(let t in i)if(i.hasOwnProperty(t)){let o=i[t];o?n.setProperty(t,o,e?.has(t)?"important":""):n.removeProperty(t)}return n}function Cf(n,i){let e=i?"":"none";kP(n.style,{"touch-action":i?"":"none","-webkit-user-drag":i?"":"none","-webkit-tap-highlight-color":i?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function q8(n,i,e){kP(n.style,{position:i?"":"fixed",top:i?"":"0",opacity:i?"":"0",left:i?"":"-999em"},e)}function bx(n,i){return i&&i!="none"?n+" "+i:n}function Q8(n,i){n.style.width=`${i.width}px`,n.style.height=`${i.height}px`,n.style.transform=ov(i.left,i.top)}function ov(n,i){return`translate3d(${Math.round(n)}px, ${Math.round(i)}px, 0)`}var tv={capture:!0},_P={passive:!1,capture:!0},ane=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(t,o){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important} -`],encapsulation:2,changeDetection:0})}return n})(),rL=(()=>{class n{_ngZone=f(Ii);_document=f(qi);_styleLoader=f(ur);_renderer=f(vd).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new je;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=ce([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new je;pointerUp=new je;constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,_P)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(e,t){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(ane),this._activeDragInstances.update(o=>[...o,e]),this._activeDragInstances().length===1)){let o=t.type.startsWith("touch"),r=c=>this.pointerUp.next(c),a=[["scroll",c=>this._scroll.next(c),tv],["selectstart",this._preventDefaultWhileDragging,_P]];o?a.push(["touchend",r,tv],["touchcancel",r,tv]):a.push(["mouseup",r,tv]),o||a.push(["mousemove",c=>this.pointerMove.next(c),_P]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=a.map(([c,m,u])=>this._renderer.listen(this._document,c,m,u))})}}stopDragging(e){this._activeDragInstances.update(t=>{let o=t.indexOf(e);return o>-1?(t.splice(o,1),[...t]):t}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let t=[this._scroll];return e&&e!==this._document&&t.push(new Nr(o=>this._ngZone.runOutsideAngular(()=>{let r=this._renderer.listen(e,"scroll",a=>{this._activeDragInstances().length&&o.next(a)},tv);return()=>{r()}}))),Dn(...t)}registerDirectiveNode(e,t){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,t)}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e)}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function X8(n){let i=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*i}function sne(n){let i=getComputedStyle(n),e=vP(i,"transition-property"),t=e.find(c=>c==="transform"||c==="all");if(!t)return 0;let o=e.indexOf(t),r=vP(i,"transition-duration"),a=vP(i,"transition-delay");return X8(r[o])+X8(a[o])}function vP(n,i){return n.getPropertyValue(i).split(",").map(t=>t.trim())}var lne=new Set(["position"]),xP=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(i,e,t,o,r,a,c,m,u,h){this._document=i,this._rootElement=e,this._direction=t,this._initialDomRect=o,this._previewTemplate=r,this._previewClass=a,this._pickupPositionOnPage=c,this._initialTransform=m,this._zIndex=u,this._renderer=h}attach(i){this._preview=this._createPreview(),i.appendChild(this._preview),Y8(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(i){this._preview.style.transform=i}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(i){this._preview.classList.add(i)}getTransitionDuration(){return sne(this._preview)}addEventListener(i,e){return this._renderer.listen(this._preview,i,e)}_createPreview(){let i=this._previewTemplate,e=this._previewClass,t=i?i.template:null,o;if(t&&i){let r=i.matchSize?this._initialDomRect:null,a=i.viewContainer.createEmbeddedView(t,i.context);a.detectChanges(),o=oL(a,this._document),this._previewEmbeddedView=a,i.matchSize?Q8(o,r):o.style.transform=ov(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else o=CP(this._rootElement),Q8(o,this._initialDomRect),this._initialTransform&&(o.style.transform=this._initialTransform);return kP(o.style,{"pointer-events":"none",margin:Y8(o)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},lne),Cf(o,!1),o.classList.add("cdk-drag-preview"),o.setAttribute("popover","manual"),o.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(r=>o.classList.add(r)):o.classList.add(e)),o}};function Y8(n){return"showPopover"in n}var cne={passive:!0},K8={passive:!1},dne={passive:!1,capture:!0},mne=800,Z8="cdk-drag-placeholder",J8=new Set(["position"]);function pne(n,i,e={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let t=n.get(hi,null,{optional:!0})||n.get(vd).createRenderer(null,null);return new yP(i,e,n.get(qi),n.get(Ii),n.get(bd),n.get(rL),t)}var yP=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=ce(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new je;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=fo.EMPTY;_pointerUpSubscription=fo.EMPTY;_scrollSubscription=fo.EMPTY;_resizeSubscription=fo.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(i){i!==this._disabled&&(this._disabled=i,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Cf(e,i)))}_disabled=!1;beforeStarted=new je;started=new je;released=new je;ended=new je;entered=new je;exited=new je;dropped=new je;moved=this._moveEvents;data;constrainPosition;constructor(i,e,t,o,r,a,c){this._config=e,this._document=t,this._ngZone=o,this._viewportRuler=r,this._dragDropRegistry=a,this._renderer=c,this.withRootElement(i).withParent(e.parentDragRef||null),this._parentPositions=new Cx(t),a.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(i){this._handles=i.map(t=>Hl(t)),this._handles.forEach(t=>Cf(t,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(t=>{this._handles.indexOf(t)>-1&&e.add(t)}),this._disabledHandles=e,this}withPreviewTemplate(i){return this._previewTemplate=i,this}withPlaceholderTemplate(i){return this._placeholderTemplate=i,this}withRootElement(i){let e=Hl(i);if(e!==this._rootElement){this._removeRootElementListeners();let t=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[t.listen(e,"mousedown",this._pointerDown,K8),t.listen(e,"touchstart",this._pointerDown,cne),t.listen(e,"dragstart",this._nativeDragStart,K8)]),this._initialTransform=void 0,this._rootElement=e}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(i){return this._boundaryElement=i?Hl(i):null,this._resizeSubscription.unsubscribe(),i&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(i){return this._parentDragRef=i,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&rne(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let i=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),t=0,o=0;e.lefti.right&&(t=i.right-e.right),e.topi.bottom&&(o=i.bottom-e.bottom);let r=this._activeTransform.x,a=this._activeTransform.y,c=r+t,m=a+o;this._rootElement.style.transform=ov(c,m),this._activeTransform={x:c,y:m},this._passiveTransform={x:c,y:m}}}disableHandle(i){!this._disabledHandles.has(i)&&this._handles.indexOf(i)>-1&&(this._disabledHandles.add(i),Cf(i,!0))}enableHandle(i){this._disabledHandles.has(i)&&(this._disabledHandles.delete(i),Cf(i,this.disabled))}withDirection(i){return this._direction=i,this}_withDropContainer(i){this._dropContainer=i}getFreeDragPosition(){let i=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:i.x,y:i.y}}setFreeDragPosition(i){return this._activeTransform={x:0,y:0},this._passiveTransform.x=i.x,this._passiveTransform.y=i.y,this._dropContainer||this._applyRootElementTransform(i.x,i.y),this}withPreviewContainer(i){return this._previewContainer=i,this}_sortFromLastPointerPosition(){let i=this._lastKnownPointerPosition;i&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(i),i)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=i=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,i)}else this.disabled||this._initializeDragSequence(this._rootElement,i)};_pointerMove=i=>{let e=this._getPointerPositionOnPage(i);if(!this._hasStartedDragging()){let o=Math.abs(e.x-this._pickupPositionOnPage.x),r=Math.abs(e.y-this._pickupPositionOnPage.y);if(o+r>=this._config.dragStartThreshold){let c=Date.now()>=this._dragStartTime+this._getDragStartDelay(i),m=this._dropContainer;if(!c){this._endDragSequence(i);return}(!m||!m.isDragging()&&!m.isReceiving())&&(i.cancelable&&i.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(i)))}return}i.cancelable&&i.preventDefault();let t=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(t),this._dropContainer)this._updateActiveDropContainer(t,e);else{let o=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=t.x-o.x+this._passiveTransform.x,r.y=t.y-o.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:t,event:i,distance:this._getDragDistance(t),delta:this._pointerDirectionDelta})})};_pointerUp=i=>{this._endDragSequence(i)};_endDragSequence(i){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:i}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(i),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(i);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:i})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(i){nv(i)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),t=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(e,"selectstart",une,dne)}),t){let o=this._rootElement,r=o.parentNode,a=this._placeholder=this._createPlaceholderElement(),c=this._marker=this._marker||this._document.createComment("");r.insertBefore(c,o),this._initialTransform=o.style.transform||"",this._preview=new xP(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,e)),q8(o,!1,J8),this._document.body.appendChild(r.replaceChild(a,o)),this.started.next({source:this,event:i}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:i}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(i,e){this._parentDragRef&&e.stopPropagation();let t=this.isDragging(),o=nv(e),r=!o&&e.button!==0,a=this._rootElement,c=Wp(e),m=!o&&this._lastTouchEventTime&&this._lastTouchEventTime+mne>Date.now(),u=o?b1(e):C1(e);if(c&&c.draggable&&e.type==="mousedown"&&e.preventDefault(),t||r||m||u)return;if(this._handles.length){let S=a.style;this._rootElementTapHighlight=S.webkitTapHighlightColor||"",S.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(S=>this._updateOnScroll(S)),this._boundaryElement&&(this._boundaryRect=MP(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,i,e);let g=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:g.x,y:g.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(i){q8(this._rootElement,!0,J8),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,t=e.getItemIndex(this),o=this._getPointerPositionOnPage(i),r=this._getDragDistance(o),a=e._isOverContainer(o.x,o.y);this.ended.next({source:this,distance:r,dropPoint:o,event:i}),this.dropped.next({item:this,currentIndex:t,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:a,distance:r,dropPoint:o,event:i}),e.drop(this,t,this._initialIndex,this._initialContainer,a,r,o,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:i,y:e},{x:t,y:o}){let r=this._initialContainer._getSiblingContainerFromPosition(this,i,e);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,e)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{let a=this._dropContainer.getItemIndex(this),c=this._dropContainer.getItemAtIndex(a+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,c),this._dropContainer=r,this._dropContainer.enter(this,i,e,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(t,o),this._dropContainer._sortItem(this,i,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(i,e):this._applyPreviewTransform(i-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let i=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(i.left,i.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{let o=c=>{(!c||this._preview&&Wp(c)===this._preview.element&&c.propertyName==="transform")&&(a(),t(),clearTimeout(r))},r=setTimeout(o,e*1.5),a=this._preview.addEventListener("transitionend",o)}))}_createPlaceholderElement(){let i=this._placeholderTemplate,e=i?i.template:null,t;return e?(this._placeholderRef=i.viewContainer.createEmbeddedView(e,i.context),this._placeholderRef.detectChanges(),t=oL(this._placeholderRef,this._document)):t=CP(this._rootElement),t.style.pointerEvents="none",t.classList.add(Z8),t}_getPointerPositionInElement(i,e,t){let o=e===this._rootElement?null:e,r=o?o.getBoundingClientRect():i,a=nv(t)?t.targetTouches[0]:t,c=this._getViewportScrollPosition(),m=a.pageX-r.left-c.left,u=a.pageY-r.top-c.top;return{x:r.left-i.left+m,y:r.top-i.top+u}}_getPointerPositionOnPage(i){let e=this._getViewportScrollPosition(),t=nv(i)?i.touches[0]||i.changedTouches[0]||{pageX:0,pageY:0}:i,o=t.pageX-e.left,r=t.pageY-e.top;if(this._ownerSVGElement){let a=this._ownerSVGElement.getScreenCTM();if(a){let c=this._ownerSVGElement.createSVGPoint();return c.x=o,c.y=r,c.matrixTransform(a.inverse())}}return{x:o,y:r}}_getConstrainedPointerPosition(i){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:t,y:o}=this.constrainPosition?this.constrainPosition(i,this,this._initialDomRect,this._pickupPositionInElement):i;if(this.lockAxis==="x"||e==="x"?o=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(t=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:r,y:a}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,c=this._boundaryRect,{width:m,height:u}=this._getPreviewRect(),h=c.top+a,g=c.bottom-(u-a),S=c.left+r,x=c.right-(m-r);t=eL(t,S,x),o=eL(o,h,g)}return{x:t,y:o}}_updatePointerDirectionDelta(i){let{x:e,y:t}=i,o=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,a=Math.abs(e-r.x),c=Math.abs(t-r.y);return a>this._config.pointerDirectionChangeThreshold&&(o.x=e>r.x?1:-1,r.x=e),c>this._config.pointerDirectionChangeThreshold&&(o.y=t>r.y?1:-1,r.y=t),o}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let i=this._handles.length>0||!this.isDragging();i!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=i,Cf(this._rootElement,i))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(i=>i()),this._rootElementCleanups=void 0}_applyRootElementTransform(i,e){let t=1/this.scale,o=ov(i*t,e*t),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=bx(o,this._initialTransform)}_applyPreviewTransform(i,e){let t=this._previewTemplate?.template?void 0:this._initialTransform,o=ov(i,e);this._preview.setTransform(bx(o,t))}_getDragDistance(i){let e=this._pickupPositionOnPage;return e?{x:i.x-e.x,y:i.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:i,y:e}=this._passiveTransform;if(i===0&&e===0||this.isDragging()||!this._boundaryElement)return;let t=this._rootElement.getBoundingClientRect(),o=this._boundaryElement.getBoundingClientRect();if(o.width===0&&o.height===0||t.width===0&&t.height===0)return;let r=o.left-t.left,a=t.right-o.right,c=o.top-t.top,m=t.bottom-o.bottom;o.width>t.width?(r>0&&(i+=r),a>0&&(i-=a)):i=0,o.height>t.height?(c>0&&(e+=c),m>0&&(e-=m)):e=0,(i!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:i})}_getDragStartDelay(i){let e=this.dragStartDelay;return typeof e=="number"?e:nv(i)?e.touch:e?e.mouse:0}_updateOnScroll(i){let e=this._parentPositions.handleScroll(i);if(e){let t=Wp(i);this._boundaryRect&&t!==this._boundaryElement&&t.contains(this._boundaryElement)&&iv(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=_1(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(i,e){let t=this._previewContainer||"global";if(t==="parent")return i;if(t==="global"){let o=this._document;return e||o.fullscreenElement||o.webkitFullscreenElement||o.mozFullScreenElement||o.msFullscreenElement||o.body}return Hl(t)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=i=>{if(this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&i.preventDefault()}else this.disabled||i.preventDefault()};_getTargetHandle(i){return this._handles.find(e=>i.target&&(i.target===e||e.contains(i.target)))}_conditionallyInsertAnchor(i,e,t){if(i===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let o=this._anchor??=CP(this._placeholder);o.classList.remove(Z8),o.classList.add("cdk-drag-anchor"),o.style.transform="",t?t.before(o):Hl(e.element).appendChild(o)}}};function eL(n,i,e){return Math.max(i,Math.min(e,n))}function nv(n){return n.type[0]==="t"}function une(n){n.preventDefault()}function aL(n,i,e){let t=tL(i,n.length-1),o=tL(e,n.length-1);if(t===o)return;let r=n[t],a=o0)return null;let c=this.orientation==="horizontal",m=r.findIndex(w=>w.drag===i),u=r[a],h=r[m].clientRect,g=u.clientRect,S=m>a?1:-1,x=this._getItemOffsetPx(h,g,S),C=this._getSiblingOffsetPx(m,r,S),M=r.slice();return aL(r,m,a),r.forEach((w,y)=>{if(M[y]===w)return;let k=w.drag===i,I=k?x:C,D=k?i.getPlaceholderElement():w.drag.getRootElement();w.offset+=I;let N=Math.round(w.offset*(1/w.drag.scale));c?(D.style.transform=bx(`translate3d(${N}px, 0, 0)`,w.initialTransform),iv(w.clientRect,0,I)):(D.style.transform=bx(`translate3d(0, ${N}px, 0)`,w.initialTransform),iv(w.clientRect,I,0))}),this._previousSwap.overlaps=bP(g,e,t),this._previousSwap.drag=u.drag,this._previousSwap.delta=c?o.x:o.y,{previousIndex:m,currentIndex:a}}enter(i,e,t,o){let r=this._activeDraggables,a=r.indexOf(i),c=i.getPlaceholderElement();a>-1&&r.splice(a,1);let m=o==null||o<0?this._getItemIndexFromPointerPosition(i,e,t):o,u=r[m];if(u===i&&(u=r[m+1]),!u&&(m==null||m===-1||m{let e=i.getRootElement();if(e){let t=this._itemPositions.find(o=>o.drag===i)?.initialTransform;e.style.transform=t||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(i){return this._getVisualItemPositions().findIndex(e=>e.drag===i)}getItemAtIndex(i){return this._getVisualItemPositions()[i]?.drag||null}updateOnScroll(i,e){this._itemPositions.forEach(({clientRect:t})=>{iv(t,i,e)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(i){this._element=i}_cacheItemPositions(){let i=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let t=e.getVisibleElement();return{drag:e,offset:0,initialTransform:t.style.transform||"",clientRect:MP(t)}}).sort((e,t)=>i?e.clientRect.left-t.clientRect.left:e.clientRect.top-t.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(i,e,t){let o=this.orientation==="horizontal",r=o?e.left-i.left:e.top-i.top;return t===-1&&(r+=o?e.width-i.width:e.height-i.height),r}_getSiblingOffsetPx(i,e,t){let o=this.orientation==="horizontal",r=e[i].clientRect,a=e[i+t*-1],c=r[o?"width":"height"]*t;if(a){let m=o?"left":"top",u=o?"right":"bottom";t===-1?c-=a.clientRect[m]-r[u]:c+=r[m]-a.clientRect[u]}return c}_shouldEnterAsFirstChild(i,e){if(!this._activeDraggables.length)return!1;let t=this._itemPositions,o=this.orientation==="horizontal";if(t[0].drag!==this._activeDraggables[0]){let a=t[t.length-1].clientRect;return o?i>=a.right:e>=a.bottom}else{let a=t[0].clientRect;return o?i<=a.left:e<=a.top}}_getItemIndexFromPointerPosition(i,e,t,o){let r=this.orientation==="horizontal",a=this._itemPositions.findIndex(({drag:c,clientRect:m})=>{if(c===i)return!1;if(o){let u=r?o.x:o.y;if(c===this._previousSwap.drag&&this._previousSwap.overlaps&&u===this._previousSwap.delta)return!1}return r?e>=Math.floor(m.left)&&e=Math.floor(m.top)&&tm?h.after(u):h.before(u),aL(this._activeItems,m,r);let g=this._getRootNode().elementFromPoint(e,t);return a.deltaX=o.x,a.deltaY=o.y,a.drag=c,a.overlaps=h===g||h.contains(g),{previousIndex:m,currentIndex:r}}enter(i,e,t,o){let r=this._activeItems.indexOf(i);r>-1&&this._activeItems.splice(r,1);let a=o==null||o<0?this._getItemIndexFromPointerPosition(i,e,t):o;a===-1&&(a=this._getClosestItemIndexToPointer(i,e,t));let c=this._activeItems[a];c&&!this._dragDropRegistry.isDragging(c)?(this._activeItems.splice(a,0,i),c.getRootElement().before(i.getPlaceholderElement())):(this._activeItems.push(i),this._element.appendChild(i.getPlaceholderElement()))}withItems(i){this._activeItems=i.slice()}withSortPredicate(i){this._sortPredicate=i}reset(){let i=this._element,e=this._previousSwap;for(let t=this._relatedNodes.length-1;t>-1;t--){let[o,r]=this._relatedNodes[t];o.parentNode===i&&o.nextSibling!==r&&(r===null?i.appendChild(o):r.parentNode===i&&i.insertBefore(o,r))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(i){return this._activeItems.indexOf(i)}getItemAtIndex(i){return this._activeItems[i]||null}updateOnScroll(){this._activeItems.forEach(i=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(i){i!==this._element&&(this._element=i,this._rootNode=void 0)}_getItemIndexFromPointerPosition(i,e,t){let o=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(t)),r=o?this._activeItems.findIndex(a=>{let c=a.getRootElement();return o===c||c.contains(o)}):-1;return r===-1||!this._sortPredicate(r,i)?-1:r}_getRootNode(){return this._rootNode||(this._rootNode=_1(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(i,e,t){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let o=1/0,r=-1;for(let a=0;a!0;sortPredicate=()=>!0;beforeStarted=new je;entered=new je;exited=new je;dropped=new je;sorted=new je;receivingStarted=new je;receivingStopped=new je;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=fo.EMPTY;_verticalScrollDirection=hl.NONE;_horizontalScrollDirection=Xa.NONE;_scrollNode;_stopScrollTimers=new je;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(i,e,t,o,r){this._dragDropRegistry=e,this._ngZone=o,this._viewportRuler=r;let a=this.element=Hl(i);this._document=t,this.withOrientation("vertical").withElementContainer(a),e.registerDropContainer(this),this._parentPositions=new Cx(t)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(i,e,t,o){this._draggingStarted(),o==null&&this.sortingDisabled&&(o=this._draggables.indexOf(i)),this._sortStrategy.enter(i,e,t,o),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:i,container:this,currentIndex:this.getItemIndex(i)})}exit(i){this._reset(),this.exited.next({item:i,container:this})}drop(i,e,t,o,r,a,c,m={}){this._reset(),this.dropped.next({item:i,currentIndex:e,previousIndex:t,container:this,previousContainer:o,isPointerOverContainer:r,distance:a,dropPoint:c,event:m})}withItems(i){let e=this._draggables;return this._draggables=i,i.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(o=>o.isDragging()).every(o=>i.indexOf(o)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(i){return this._direction=i,this._sortStrategy instanceof xx&&(this._sortStrategy.direction=i),this}connectedTo(i){return this._siblings=i.slice(),this}withOrientation(i){if(i==="mixed")this._sortStrategy=new SP(this._document,this._dragDropRegistry);else{let e=new xx(this._dragDropRegistry);e.direction=this._direction,e.orientation=i,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,t)=>this.sortPredicate(e,t,this)),this}withScrollableParents(i){let e=this._container;return this._scrollableElements=i.indexOf(e)===-1?[e,...i]:i.slice(),this}withElementContainer(i){if(i===this._container)return this;let e=Hl(this.element),t=this._scrollableElements.indexOf(this._container),o=this._scrollableElements.indexOf(i);return t>-1&&this._scrollableElements.splice(t,1),o>-1&&this._scrollableElements.splice(o,1),this._sortStrategy&&this._sortStrategy.withElementContainer(i),this._cachedShadowRoot=null,this._scrollableElements.unshift(i),this._container=i,this}getScrollableParents(){return this._scrollableElements}getItemIndex(i){return this._isDragging?this._sortStrategy.getItemIndex(i):this._draggables.indexOf(i)}getItemAtIndex(i){return this._isDragging?this._sortStrategy.getItemAtIndex(i):this._draggables[i]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(i,e,t,o){if(this.sortingDisabled||!this._domRect||!W8(this._domRect,nL,e,t))return;let r=this._sortStrategy.sort(i,e,t,o);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:i})}_startScrollingIfNecessary(i,e){if(this.autoScrollDisabled)return;let t,o=hl.NONE,r=Xa.NONE;if(this._parentPositions.positions.forEach((a,c)=>{c===this._document||!a.clientRect||t||W8(a.clientRect,nL,i,e)&&([o,r]=fne(c,a.clientRect,this._direction,i,e),(o||r)&&(t=c))}),!o&&!r){let{width:a,height:c}=this._viewportRuler.getViewportSize(),m={width:a,height:c,top:0,right:a,bottom:c,left:0};o=lL(m,e),r=cL(m,i),t=window}t&&(o!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||t!==this._scrollNode)&&(this._verticalScrollDirection=o,this._horizontalScrollDirection=r,this._scrollNode=t,(o||r)&&t?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let i=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=i.msScrollSnapType||i.scrollSnapType||"",i.scrollSnapType=i.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let i=this._container.style;i.scrollSnapType=i.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),o1(0,om).pipe(tt(this._stopScrollTimers)).subscribe(()=>{let i=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===hl.UP?i.scrollBy(0,-e):this._verticalScrollDirection===hl.DOWN&&i.scrollBy(0,e),this._horizontalScrollDirection===Xa.LEFT?i.scrollBy(-e,0):this._horizontalScrollDirection===Xa.RIGHT&&i.scrollBy(e,0)})};_isOverContainer(i,e){return this._domRect!=null&&bP(this._domRect,i,e)}_getSiblingContainerFromPosition(i,e,t){return this._siblings.find(o=>o._canReceive(i,e,t))}_canReceive(i,e,t){if(!this._domRect||!bP(this._domRect,e,t)||!this.enterPredicate(i,this))return!1;let o=this._getShadowRoot().elementFromPoint(e,t);return o?o===this._container||this._container.contains(o):!1}_startReceiving(i,e){let t=this._activeSiblings;!t.has(i)&&e.every(o=>this.enterPredicate(o,this)||this._draggables.indexOf(o)>-1)&&(t.add(i),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:i,receiver:this,items:e}))}_stopReceiving(i){this._activeSiblings.delete(i),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:i,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(i=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(i);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let i=_1(this._container);this._cachedShadowRoot=i||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let i=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,i))}};function lL(n,i){let{top:e,bottom:t,height:o}=n,r=o*sL;return i>=e-r&&i<=e+r?hl.UP:i>=t-r&&i<=t+r?hl.DOWN:hl.NONE}function cL(n,i){let{left:e,right:t,width:o}=n,r=o*sL;return i>=e-r&&i<=e+r?Xa.LEFT:i>=t-r&&i<=t+r?Xa.RIGHT:Xa.NONE}function fne(n,i,e,t,o){let r=lL(i,o),a=cL(i,t),c=hl.NONE,m=Xa.NONE;if(r){let u=n.scrollTop;r===hl.UP?u>0&&(c=hl.UP):n.scrollHeight-u>n.clientHeight&&(c=hl.DOWN)}if(a){let u=n.scrollLeft;e==="rtl"?a===Xa.RIGHT?u<0&&(m=Xa.RIGHT):n.scrollWidth+u>n.clientWidth&&(m=Xa.LEFT):a===Xa.LEFT?u>0&&(m=Xa.LEFT):n.scrollWidth-u>n.clientWidth&&(m=Xa.RIGHT)}return[c,m]}var gne=(()=>{class n{_injector=f(Wo);constructor(){}createDrag(e,t){return pne(this._injector,e,t)}createDropList(e){return hne(this._injector,e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var dL=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({providers:[gne],imports:[xd]})}return n})();var _ne=[[["caption"]],[["colgroup"],["col"]],"*"],vne=["caption","colgroup, col","*"];function Cne(n,i){n&1&&rn(0,2)}function bne(n,i){n&1&&(s(0,"thead",0),co(1,1),l(),s(2,"tbody",0),co(3,2)(4,3),l(),s(5,"tfoot",0),co(6,4),l())}function xne(n,i){n&1&&co(0,1)(1,2)(2,3)(3,4)}var Yl=new jt("CDK_TABLE");var wx=(()=>{class n{template=f(zo);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkCellDef",""]]})}return n})(),Mx=(()=>{class n{template=f(zo);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkHeaderCellDef",""]]})}return n})(),uL=(()=>{class n{template=f(zo);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkFooterCellDef",""]]})}return n})(),Vm=(()=>{class n{_table=f(Yl,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,o,r){if(t&1&&Hi(r,wx,5)(r,Mx,5)(r,uL,5),t&2){let a;dt(a=mt())&&(o.cell=a.first),dt(a=mt())&&(o.headerCell=a.first),dt(a=mt())&&(o.footerCell=a.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",gt],stickyEnd:[2,"stickyEnd","stickyEnd",gt]}})}return n})(),Sx=class{constructor(i,e){e.nativeElement.classList.add(...i._columnCssClassName)}},hL=(()=>{class n extends Sx{constructor(){super(f(Vm),f(Yt))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[di]})}return n})();var fL=(()=>{class n extends Sx{constructor(){let e=f(Vm),t=f(Yt);super(e,t);let o=e._table?._getCellRole();o&&t.nativeElement.setAttribute("role",o)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[di]})}return n})();var EP=(()=>{class n{template=f(zo);_differs=f(Cd);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof av?e.headerCell.template:this instanceof DP?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,features:[dn]})}return n})(),av=(()=>{class n extends EP{_table=f(Yl,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(f(zo),f(Cd))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",gt]},features:[di,dn]})}return n})(),DP=(()=>{class n extends EP{_table=f(Yl,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(f(zo),f(Cd))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",gt]},features:[di,dn]})}return n})(),kx=(()=>{class n extends EP{_table=f(Yl,{optional:!0});when;constructor(){super(f(zo),f(Cd))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[di]})}return n})(),Eu=(()=>{class n{_viewContainer=f(to);cells;context;static mostRecentCellOutlet=null;constructor(){n.mostRecentCellOutlet=this}ngOnDestroy(){n.mostRecentCellOutlet===this&&(n.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkCellOutlet",""]]})}return n})(),PP=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&co(0,0)},dependencies:[Eu],encapsulation:2})}return n})();var IP=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&co(0,0)},dependencies:[Eu],encapsulation:2})}return n})(),gL=(()=>{class n{templateRef=f(zo);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["ng-template","cdkNoDataRow",""]]})}return n})(),mL=["top","bottom","left","right"],TP=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(i=>this._updateCachedSizes(i)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(i,e,t=!0,o=!0,r,a,c){this._isNativeHtmlTable=i,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=o,this.direction=r,this._positionListener=a,this._tableInjector=c,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(i,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(i);let t=[];for(let o of i)o.nodeType===o.ELEMENT_NODE&&t.push(o,...Array.from(o.children));ca({write:()=>{for(let o of t)this._removeStickyStyle(o,e)}},{injector:this._tableInjector})}updateStickyColumns(i,e,t,o=!0,r=!0){if(!i.length||!this._isBrowser||!(e.some(w=>w)||t.some(w=>w))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let a=i[0],c=a.children.length,m=this.direction==="rtl",u=m?"right":"left",h=m?"left":"right",g=e.lastIndexOf(!0),S=t.indexOf(!0),x,C,M;r&&this._updateStickyColumnReplayQueue({rows:[...i],stickyStartStates:[...e],stickyEndStates:[...t]}),ca({earlyRead:()=>{x=this._getCellWidths(a,o),C=this._getStickyStartColumnPositions(x,e),M=this._getStickyEndColumnPositions(x,t)},write:()=>{for(let w of i)for(let y=0;y!!w)&&(this._positionListener.stickyColumnsUpdated({sizes:g===-1?[]:x.slice(0,g+1).map((w,y)=>e[y]?w:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:S===-1?[]:x.slice(S).map((w,y)=>t[y+S]?w:null).reverse()}))}},{injector:this._tableInjector})}stickRows(i,e,t){if(!this._isBrowser)return;let o=t==="bottom"?i.slice().reverse():i,r=t==="bottom"?e.slice().reverse():e,a=[],c=[],m=[];ca({earlyRead:()=>{for(let u=0,h=0;u{let u=r.lastIndexOf(!0);for(let h=0;h{let t=i.querySelector("tfoot");t&&(e.some(o=>!o)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(i,e){if(!i.classList.contains(this._stickCellCss))return;for(let o of e)i.style[o]="",i.classList.remove(this._borderCellCss[o]);mL.some(o=>e.indexOf(o)===-1&&i.style[o])?i.style.zIndex=this._getCalculatedZIndex(i):(i.style.zIndex="",this._needsPositionStickyOnElement&&(i.style.position=""),i.classList.remove(this._stickCellCss))}_addStickyStyle(i,e,t,o){i.classList.add(this._stickCellCss),o&&i.classList.add(this._borderCellCss[e]),i.style[e]=`${t}px`,i.style.zIndex=this._getCalculatedZIndex(i),this._needsPositionStickyOnElement&&(i.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(i){let e={top:100,bottom:10,left:1,right:1},t=0;for(let o of mL)i.style[o]&&(t+=e[o]);return t?`${t}`:""}_getCellWidths(i,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],o=i.children;for(let r=0;r0;r--)e[r]&&(t[r]=o,o+=i[r]);return t}_retrieveElementSize(i){let e=this._elemSizeCache.get(i);if(e)return e;let t=i.getBoundingClientRect(),o={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(i,o),this._resizeObserver.observe(i,{box:"border-box"})),o}_updateStickyColumnReplayQueue(i){this._removeFromStickyColumnReplayQueue(i.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(i)}_removeFromStickyColumnReplayQueue(i){let e=new Set(i);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(o=>!e.has(o));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(i){let e=!1;for(let t of i){let o=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};o.width!==this._elemSizeCache.get(t.target)?.width&&yne(t.target)&&(e=!0),this._elemSizeCache.set(t.target,o)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function yne(n){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(i=>n.classList.contains(i))}var rv=new jt("STICKY_POSITIONING_LISTENER");var AP=(()=>{class n{viewContainer=f(to);elementRef=f(Yt);constructor(){let e=f(Yl);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","rowOutlet",""]]})}return n})(),OP=(()=>{class n{viewContainer=f(to);elementRef=f(Yt);constructor(){let e=f(Yl);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","headerRowOutlet",""]]})}return n})(),NP=(()=>{class n{viewContainer=f(to);elementRef=f(Yt);constructor(){let e=f(Yl);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","footerRowOutlet",""]]})}return n})(),RP=(()=>{class n{viewContainer=f(to);elementRef=f(Yt);constructor(){let e=f(Yl);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","noDataRowOutlet",""]]})}return n})(),FP=(()=>{class n{_differs=f(Cd);_changeDetectorRef=f(X);_elementRef=f(Yt);_dir=f(os,{optional:!0});_platform=f(Zs);_viewRepeater;_viewportRuler=f(bd);_injector=f(Wo);_virtualScrollViewport=f(E5,{optional:!0,host:!0});_positionListener=f(rv,{optional:!0})||f(rv,{optional:!0,skipSelf:!0});_document=f(qi);_data;_renderedRange;_onDestroy=new je;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new je;_footerRowStickyUpdates=new je;_disableVirtualScrolling=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck())}_dataSource;_dataSourceChanges=new je;_dataStream=new je;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new _e;viewChange=new zt({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;constructor(){f(new Ks("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,o)=>this.trackBy?this.trackBy(o.dataIndex,o.data):o)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(tt(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new k5:new O5,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),bh(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(o,r,a)=>this._getEmbeddedViewArgs(o.item,a),o=>o.item.data,o=>{o.operation===M5.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let r=t.get(o.currentIndex);r.context.$implicit=o.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let o=pL(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=pL(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...o],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((r,a)=>{this._addStickyColumnStyles([r],this._headerRowDefs[a])}),this._rowDefs.forEach(r=>{let a=[];for(let c=0;c{this._addStickyColumnStyles([r],this._footerRowDefs[a])}),Array.from(this._columnDefsByName.values()).forEach(r=>r.resetStickyChanged())}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e)}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e)}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e)}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e)}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return[];let e=[],t=Math.min(this._data.length,this._renderedRange.end),o=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r{let c=o&&o.has(a)?o.get(a):[];if(c.length){let m=c.shift();return m.dataIndex=t,m}else return{data:e,rowDef:a,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),yx(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=yx(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=yx(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=yx(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(a,c)=>{let m=!!c.getColumnsDiff();return a||m},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,!1);o&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,!1);return r&&this._forceRenderFooterRows(),t||o||r}_switchDataSource(e){this._data=[],bh(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;bh(this.dataSource)?e=this.dataSource.connect(this):rm(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Ct(this.dataSource)),this._renderChangeSubscription=ir([e,this.viewChange]).pipe(tt(this._onDestroy)).subscribe(([t,o])=>{this._data=t||[],this._renderedRange=o,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let o=Array.from(t?.columns||[]).map(c=>{let m=this._columnDefsByName.get(c);return m}),r=o.map(c=>c.sticky),a=o.map(c=>c.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,a,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let o=0;o!r.when||r.when(t,e));else{let r=this._rowDefs.find(a=>a.when&&a.when(t,e))||this._defaultRowDef;r&&o.push(r)}return o.length,o}_getEmbeddedViewArgs(e,t){let o=e.rowDef,r={$implicit:e.data};return{templateRef:o.template,context:r,index:t}}_renderRow(e,t,o,r={}){let a=e.viewContainer.createEmbeddedView(t.template,r,o);return this._renderCellTemplateForItem(t,r),a}_renderCellTemplateForItem(e,t){for(let o of this._getCellTemplates(e))Eu.mostRecentCellOutlet&&Eu.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,o=e.length;t{let o=this._columnDefsByName.get(t);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,o)=>t||o.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new TP(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Ct()).pipe(tt(this._onDestroy)).subscribe(o=>{this._stickyStyler.direction=o,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?om:ON;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(gh(0,t),tt(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(o,r)=>this._measureRangeSize(o,r)}),ir([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(tt(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let o=this._noDataRowOutlet.viewContainer;if(t){let r=o.createEmbeddedView(e.templateRef),a=r.rootNodes[0];if(r.rootNodes.length===1&&a?.nodeType===this._document.ELEMENT_NODE){a.setAttribute("role","row"),a.classList.add(...e._contentClassNames);let c=a.querySelectorAll(e._cellSelector);for(let m=0;m=e.end||t!=="vertical")return 0;let o=this.viewChange.value,r=this._rowOutlet.viewContainer;e.starto.end;let a=e.start-o.start,c=e.end-e.start,m,u;for(let S=0;S-1;S--){let x=r.get(S+a);if(x&&x.rootNodes.length){u=x.rootNodes[x.rootNodes.length-1];break}}let h=m?.getBoundingClientRect?.(),g=u?.getBoundingClientRect?.();return h&&g?g.bottom-h.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,o,r){if(t&1&&Hi(r,gL,5)(r,Vm,5)(r,kx,5)(r,av,5)(r,DP,5),t&2){let a;dt(a=mt())&&(o._noDataRow=a.first),dt(a=mt())&&(o._contentColumnDefs=a),dt(a=mt())&&(o._contentRowDefs=a),dt(a=mt())&&(o._contentHeaderRowDefs=a),dt(a=mt())&&(o._contentFooterRowDefs=a)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,o){t&2&&ze("cdk-table-fixed-layout",o.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",gt],fixedLayout:[2,"fixedLayout","fixedLayout",gt],recycleRows:[2,"recycleRows","recycleRows",gt]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[Cn([{provide:Yl,useExisting:n},{provide:rv,useValue:null}])],ngContentSelectors:vne,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(ri(_ne),rn(0),rn(1,1),A(2,Cne,1,0),A(3,bne,7,0)(4,xne,4,0)),t&2&&(p(2),O(o._isServer?2:-1),p(),O(o._isNativeHtmlTable?3:4))},dependencies:[OP,AP,RP,NP],styles:[`.cdk-table-fixed-layout{table-layout:fixed} -`],encapsulation:2})}return n})();function yx(n,i){return n.concat(Array.from(i))}function pL(n,i){let e=i.toUpperCase(),t=n.viewContainer.element.nativeElement;for(;t;){let o=t.nodeType===1?t.nodeName:null;if(o===e)return t;if(o==="TABLE")break;t=t.parentNode}return null}var Tx=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({imports:[x1]})}return n})();var _L=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({imports:[xd,_i,xd]})}return n})();var Qn=(function(n){return n[n.State=0]="State",n[n.Transition=1]="Transition",n[n.Sequence=2]="Sequence",n[n.Group=3]="Group",n[n.Animate=4]="Animate",n[n.Keyframes=5]="Keyframes",n[n.Style=6]="Style",n[n.Trigger=7]="Trigger",n[n.Reference=8]="Reference",n[n.AnimateChild=9]="AnimateChild",n[n.AnimateRef=10]="AnimateRef",n[n.Query=11]="Query",n[n.Stagger=12]="Stagger",n})(Qn||{}),fl="*";function LP(n,i){return{type:Qn.Trigger,name:n,definitions:i,options:{}}}function BP(n,i=null){return{type:Qn.Animate,styles:i,timings:n}}function vL(n,i=null){return{type:Qn.Sequence,steps:n,options:i}}function Pu(n){return{type:Qn.Style,styles:n,offset:null}}function Ex(n,i,e){return{type:Qn.State,name:n,styles:i,options:e}}function VP(n,i,e=null){return{type:Qn.Transition,expr:n,animation:i,options:e}}var Vc=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(i=0,e=0){this.totalTime=i+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(i=>i()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(i){this._position=this.totalTime?i*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},Du=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(i){this.players=i;let e=0,t=0,o=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++e==r&&this._onFinish()}),a.onDestroy(()=>{++t==r&&this._onDestroy()}),a.onStart(()=>{++o==r&&this._onStart()})}),this.totalTime=this.players.reduce((a,c)=>Math.max(a,c.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this.players.forEach(i=>i.init())}onStart(i){this._onStartFns.push(i)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(i=>i()),this._onStartFns=[])}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(i=>i.play())}pause(){this.players.forEach(i=>i.pause())}restart(){this.players.forEach(i=>i.restart())}finish(){this._onFinish(),this.players.forEach(i=>i.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(i=>i.destroy()),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this.players.forEach(i=>i.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(i){let e=i*this.totalTime;this.players.forEach(t=>{let o=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(o)})}getPosition(){let i=this.players.reduce((e,t)=>e===null||t.totalTime>e.totalTime?t:e,null);return i!=null?i.getPosition():0}beforeDestroy(){this.players.forEach(i=>{i.beforeDestroy&&i.beforeDestroy()})}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},bf="!";function CL(n){return new fn(3e3,!1)}function Sne(){return new fn(3100,!1)}function wne(){return new fn(3101,!1)}function Mne(n){return new fn(3001,!1)}function kne(n){return new fn(3003,!1)}function Tne(n){return new fn(3004,!1)}function xL(n,i){return new fn(3005,!1)}function yL(){return new fn(3006,!1)}function SL(){return new fn(3007,!1)}function wL(n,i){return new fn(3008,!1)}function ML(n){return new fn(3002,!1)}function kL(n,i,e,t,o){return new fn(3010,!1)}function TL(){return new fn(3011,!1)}function EL(){return new fn(3012,!1)}function DL(){return new fn(3200,!1)}function PL(){return new fn(3202,!1)}function IL(){return new fn(3013,!1)}function AL(n){return new fn(3014,!1)}function OL(n){return new fn(3015,!1)}function NL(n){return new fn(3016,!1)}function RL(n,i){return new fn(3404,!1)}function Ene(n){return new fn(3502,!1)}function FL(n){return new fn(3503,!1)}function LL(){return new fn(3300,!1)}function BL(n){return new fn(3504,!1)}function VL(n){return new fn(3301,!1)}function zL(n,i){return new fn(3302,!1)}function jL(n){return new fn(3303,!1)}function $L(n,i){return new fn(3400,!1)}function HL(n){return new fn(3401,!1)}function UL(n){return new fn(3402,!1)}function GL(n,i){return new fn(3505,!1)}function Nd(n){switch(n.length){case 0:return new Vc;case 1:return n[0];default:return new Du(n)}}function HP(n,i,e=new Map,t=new Map){let o=[],r=[],a=-1,c=null;if(i.forEach(m=>{let u=m.get("offset"),h=u==a,g=h&&c||new Map;m.forEach((S,x)=>{let C=x,M=S;if(x!=="offset")switch(C=n.normalizePropertyName(C,o),M){case bf:M=e.get(x);break;case fl:M=t.get(x);break;default:M=n.normalizeStyleValue(x,C,M,o);break}g.set(C,M)}),h||r.push(g),c=g,a=u}),o.length)throw Ene(o);return r}function Dx(n,i,e,t){switch(i){case"start":n.onStart(()=>t(e&&zP(e,"start",n)));break;case"done":n.onDone(()=>t(e&&zP(e,"done",n)));break;case"destroy":n.onDestroy(()=>t(e&&zP(e,"destroy",n)));break}}function zP(n,i,e){let t=e.totalTime,o=!!e.disabled,r=Px(n.element,n.triggerName,n.fromState,n.toState,i||n.phaseName,t??n.totalTime,o),a=n._data;return a!=null&&(r._data=a),r}function Px(n,i,e,t,o="",r=0,a){return{element:n,triggerName:i,fromState:e,toState:t,phaseName:o,totalTime:r,disabled:!!a}}function gs(n,i,e){let t=n.get(i);return t||n.set(i,t=e),t}function UP(n){let i=n.indexOf(":"),e=n.substring(1,i),t=n.slice(i+1);return[e,t]}var Dne=typeof document>"u"?null:document.documentElement;function Ix(n){let i=n.parentNode||n.host||null;return i===Dne?null:i}function Pne(n){return n.substring(1,6)=="ebkit"}var Iu=null,bL=!1;function WL(n){Iu||(Iu=Ine()||{},bL=Iu.style?"WebkitAppearance"in Iu.style:!1);let i=!0;return Iu.style&&!Pne(n)&&(i=n in Iu.style,!i&&bL&&(i="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in Iu.style)),i}function Ine(){return typeof document<"u"?document.body:null}function GP(n,i){for(;i;){if(i===n)return!0;i=Ix(i)}return!1}function WP(n,i,e){if(e)return Array.from(n.querySelectorAll(i));let t=n.querySelector(i);return t?[t]:[]}var Ane=1e3,qP="{{",One="}}",QP="ng-enter",Ax="ng-leave",sv="ng-trigger",lv=".ng-trigger",XP="ng-animating",Ox=".ng-animating";function zc(n){if(typeof n=="number")return n;let i=n.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:jP(parseFloat(i[1]),i[2])}function jP(n,i){return i==="s"?n*Ane:n}function cv(n,i,e){return n.hasOwnProperty("duration")?n:Rne(n,i,e)}var Nne=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function Rne(n,i,e){let t,o=0,r="";if(typeof n=="string"){let a=n.match(Nne);if(a===null)return i.push(CL(n)),{duration:0,delay:0,easing:""};t=jP(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(o=jP(parseFloat(c),a[4]));let m=a[5];m&&(r=m)}else t=n;if(!e){let a=!1,c=i.length;t<0&&(i.push(Sne()),a=!0),o<0&&(i.push(wne()),a=!0),a&&i.splice(c,0,CL(n))}return{duration:t,delay:o,easing:r}}function qL(n){return n.length?n[0]instanceof Map?n:n.map(i=>new Map(Object.entries(i))):[]}function Kl(n,i,e){i.forEach((t,o)=>{let r=Nx(o);e&&!e.has(o)&&e.set(o,n.style[r]),n.style[r]=t})}function zm(n,i){i.forEach((e,t)=>{let o=Nx(t);n.style[o]=""})}function xf(n){return Array.isArray(n)?n.length==1?n[0]:vL(n):n}function QL(n,i,e){let t=i.params||{},o=YP(n);o.length&&o.forEach(r=>{t.hasOwnProperty(r)||e.push(Mne(r))})}var $P=new RegExp(`${qP}\\s*(.+?)\\s*${One}`,"g");function YP(n){let i=[];if(typeof n=="string"){let e;for(;e=$P.exec(n);)i.push(e[1]);$P.lastIndex=0}return i}function yf(n,i,e){let t=`${n}`,o=t.replace($P,(r,a)=>{let c=i[a];return c==null&&(e.push(kne(a)),c=""),c.toString()});return o==t?n:o}var Fne=/-+([a-z0-9])/g;function Nx(n){return n.replace(Fne,(...i)=>i[1].toUpperCase())}function XL(n,i){return n===0||i===0}function YL(n,i,e){if(e.size&&i.length){let t=i[0],o=[];if(e.forEach((r,a)=>{t.has(a)||o.push(a),t.set(a,r)}),o.length)for(let r=1;ra.set(c,Rx(n,c)))}}return i}function _s(n,i,e){switch(i.type){case Qn.Trigger:return n.visitTrigger(i,e);case Qn.State:return n.visitState(i,e);case Qn.Transition:return n.visitTransition(i,e);case Qn.Sequence:return n.visitSequence(i,e);case Qn.Group:return n.visitGroup(i,e);case Qn.Animate:return n.visitAnimate(i,e);case Qn.Keyframes:return n.visitKeyframes(i,e);case Qn.Style:return n.visitStyle(i,e);case Qn.Reference:return n.visitReference(i,e);case Qn.AnimateChild:return n.visitAnimateChild(i,e);case Qn.AnimateRef:return n.visitAnimateRef(i,e);case Qn.Query:return n.visitQuery(i,e);case Qn.Stagger:return n.visitStagger(i,e);default:throw Tne(i.type)}}function Rx(n,i){return window.getComputedStyle(n)[i]}var uI=(()=>{class n{validateStyleProperty(e){return WL(e)}containsElement(e,t){return GP(e,t)}getParentElement(e){return Ix(e)}query(e,t,o){return WP(e,t,o)}computeStyle(e,t,o){return o||""}animate(e,t,o,r,a,c=[],m){return new Vc(o,r)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac})}return n})(),Ou=class{static NOOP=new uI},Nu=class{};var Lne=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),zx=class extends Nu{normalizePropertyName(i,e){return Nx(i)}normalizeStyleValue(i,e,t,o){let r="",a=t.toString().trim();if(Lne.has(e)&&t!==0&&t!=="0")if(typeof t=="number")r="px";else{let c=t.match(/^[+-]?[\d\.]+([a-z]*)$/);c&&c[1].length==0&&o.push(xL(i,t))}return a+r}};var jx="*";function Bne(n,i){let e=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(t=>Vne(t,e,i)):e.push(n),e}function Vne(n,i,e){if(n[0]==":"){let m=zne(n,e);if(typeof m=="function"){i.push(m);return}n=m}let t=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return e.push(OL(n)),i;let o=t[1],r=t[2],a=t[3];i.push(KL(o,a));let c=o==jx&&a==jx;r[0]=="<"&&!c&&i.push(KL(a,o))}function zne(n,i){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t) *"}}var Fx=new Set(["true","1"]),Lx=new Set(["false","0"]);function KL(n,i){let e=Fx.has(n)||Lx.has(n),t=Fx.has(i)||Lx.has(i);return(o,r)=>{let a=n==jx||n==o,c=i==jx||i==r;return!a&&e&&typeof o=="boolean"&&(a=o?Fx.has(n):Lx.has(n)),!c&&t&&typeof r=="boolean"&&(c=r?Fx.has(i):Lx.has(i)),a&&c}}var s7=":self",jne=new RegExp(`s*${s7}s*,?`,"g");function l7(n,i,e,t){return new nI(n).build(i,e,t)}var ZL="",nI=class{_driver;constructor(i){this._driver=i}build(i,e,t){let o=new iI(e);return this._resetContextStyleTimingState(o),_s(this,xf(i),o)}_resetContextStyleTimingState(i){i.currentQuerySelector=ZL,i.collectedStyles=new Map,i.collectedStyles.set(ZL,new Map),i.currentTime=0}visitTrigger(i,e){let t=e.queryCount=0,o=e.depCount=0,r=[],a=[];return i.name.charAt(0)=="@"&&e.errors.push(yL()),i.definitions.forEach(c=>{if(this._resetContextStyleTimingState(e),c.type==Qn.State){let m=c,u=m.name;u.toString().split(/\s*,\s*/).forEach(h=>{m.name=h,r.push(this.visitState(m,e))}),m.name=u}else if(c.type==Qn.Transition){let m=this.visitTransition(c,e);t+=m.queryCount,o+=m.depCount,a.push(m)}else e.errors.push(SL())}),{type:Qn.Trigger,name:i.name,states:r,transitions:a,queryCount:t,depCount:o,options:null}}visitState(i,e){let t=this.visitStyle(i.styles,e),o=i.options&&i.options.params||null;if(t.containsDynamicStyles){let r=new Set,a=o||{};t.styles.forEach(c=>{c instanceof Map&&c.forEach(m=>{YP(m).forEach(u=>{a.hasOwnProperty(u)||r.add(u)})})}),r.size&&e.errors.push(wL(i.name,[...r.values()]))}return{type:Qn.State,name:i.name,style:t,options:o?{params:o}:null}}visitTransition(i,e){e.queryCount=0,e.depCount=0;let t=_s(this,xf(i.animation),e),o=Bne(i.expr,e.errors);return{type:Qn.Transition,matchers:o,animation:t,queryCount:e.queryCount,depCount:e.depCount,options:Au(i.options)}}visitSequence(i,e){return{type:Qn.Sequence,steps:i.steps.map(t=>_s(this,t,e)),options:Au(i.options)}}visitGroup(i,e){let t=e.currentTime,o=0,r=i.steps.map(a=>{e.currentTime=t;let c=_s(this,a,e);return o=Math.max(o,e.currentTime),c});return e.currentTime=o,{type:Qn.Group,steps:r,options:Au(i.options)}}visitAnimate(i,e){let t=Gne(i.timings,e.errors);e.currentAnimateTimings=t;let o,r=i.styles?i.styles:Pu({});if(r.type==Qn.Keyframes)o=this.visitKeyframes(r,e);else{let a=i.styles,c=!1;if(!a){c=!0;let u={};t.easing&&(u.easing=t.easing),a=Pu(u)}e.currentTime+=t.duration+t.delay;let m=this.visitStyle(a,e);m.isEmptyStep=c,o=m}return e.currentAnimateTimings=null,{type:Qn.Animate,timings:t,style:o,options:null}}visitStyle(i,e){let t=this._makeStyleAst(i,e);return this._validateStyleAst(t,e),t}_makeStyleAst(i,e){let t=[],o=Array.isArray(i.styles)?i.styles:[i.styles];for(let c of o)typeof c=="string"?c===fl?t.push(c):e.errors.push(ML(c)):t.push(new Map(Object.entries(c)));let r=!1,a=null;return t.forEach(c=>{if(c instanceof Map&&(c.has("easing")&&(a=c.get("easing"),c.delete("easing")),!r)){for(let m of c.values())if(m.toString().indexOf(qP)>=0){r=!0;break}}}),{type:Qn.Style,styles:t,easing:a,offset:i.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(i,e){let t=e.currentAnimateTimings,o=e.currentTime,r=e.currentTime;t&&r>0&&(r-=t.duration+t.delay),i.styles.forEach(a=>{typeof a!="string"&&a.forEach((c,m)=>{let u=e.collectedStyles.get(e.currentQuerySelector),h=u.get(m),g=!0;h&&(r!=o&&r>=h.startTime&&o<=h.endTime&&(e.errors.push(kL(m,h.startTime,h.endTime,r,o)),g=!1),r=h.startTime),g&&u.set(m,{startTime:r,endTime:o}),e.options&&QL(c,e.options,e.errors)})})}visitKeyframes(i,e){let t={type:Qn.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(TL()),t;let o=1,r=0,a=[],c=!1,m=!1,u=0,h=i.steps.map(y=>{let k=this._makeStyleAst(y,e),I=k.offset!=null?k.offset:Une(k.styles),D=0;return I!=null&&(r++,D=k.offset=I),m=m||D<0||D>1,c=c||D0&&r{let I=S>0?k==x?1:S*k:a[k],D=I*w;e.currentTime=C+M.delay+D,M.duration=D,this._validateStyleAst(y,e),y.offset=I,t.styles.push(y)}),t}visitReference(i,e){return{type:Qn.Reference,animation:_s(this,xf(i.animation),e),options:Au(i.options)}}visitAnimateChild(i,e){return e.depCount++,{type:Qn.AnimateChild,options:Au(i.options)}}visitAnimateRef(i,e){return{type:Qn.AnimateRef,animation:this.visitReference(i.animation,e),options:Au(i.options)}}visitQuery(i,e){let t=e.currentQuerySelector,o=i.options||{};e.queryCount++,e.currentQuery=i;let[r,a]=$ne(i.selector);e.currentQuerySelector=t.length?t+" "+r:r,gs(e.collectedStyles,e.currentQuerySelector,new Map);let c=_s(this,xf(i.animation),e);return e.currentQuery=null,e.currentQuerySelector=t,{type:Qn.Query,selector:r,limit:o.limit||0,optional:!!o.optional,includeSelf:a,animation:c,originalSelector:i.selector,options:Au(i.options)}}visitStagger(i,e){e.currentQuery||e.errors.push(IL());let t=i.timings==="full"?{duration:0,delay:0,easing:"full"}:cv(i.timings,e.errors,!0);return{type:Qn.Stagger,animation:_s(this,xf(i.animation),e),timings:t,options:null}}};function $ne(n){let i=!!n.split(/\s*,\s*/).find(e=>e==s7);return i&&(n=n.replace(jne,"")),n=n.replace(/@\*/g,lv).replace(/@\w+/g,e=>lv+"-"+e.slice(1)).replace(/:animating/g,Ox),[n,i]}function Hne(n){return n?q({},n):null}var iI=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(i){this.errors=i}};function Une(n){if(typeof n=="string")return null;let i=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){let t=e;i=parseFloat(t.get("offset")),t.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let e=n;i=parseFloat(e.get("offset")),e.delete("offset")}return i}function Gne(n,i){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=cv(n,i).duration;return KP(r,0,"")}let e=n;if(e.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=KP(0,0,"");return r.dynamic=!0,r.strValue=e,r}let o=cv(e,i);return KP(o.duration,o.delay,o.easing)}function Au(n){return n?(n=q({},n),n.params&&(n.params=Hne(n.params))):n={},n}function KP(n,i,e){return{duration:n,delay:i,easing:e}}function hI(n,i,e,t,o,r,a=null,c=!1){return{type:1,element:n,keyframes:i,preStyleProps:e,postStyleProps:t,duration:o,delay:r,totalTime:o+r,easing:a,subTimeline:c}}var mv=class{_map=new Map;get(i){return this._map.get(i)||[]}append(i,e){let t=this._map.get(i);t||this._map.set(i,t=[]),t.push(...e)}has(i){return this._map.has(i)}clear(){this._map.clear()}},Wne=1,qne=":enter",Qne=new RegExp(qne,"g"),Xne=":leave",Yne=new RegExp(Xne,"g");function c7(n,i,e,t,o,r=new Map,a=new Map,c,m,u=[]){return new oI().buildKeyframes(n,i,e,t,o,r,a,c,m,u)}var oI=class{buildKeyframes(i,e,t,o,r,a,c,m,u,h=[]){u=u||new mv;let g=new rI(i,e,u,o,r,h,[]);g.options=m;let S=m.delay?zc(m.delay):0;g.currentTimeline.delayNextStep(S),g.currentTimeline.setStyles([a],null,g.errors,m),_s(this,t,g);let x=g.timelines.filter(C=>C.containsAnimation());if(x.length&&c.size){let C;for(let M=x.length-1;M>=0;M--){let w=x[M];if(w.element===e){C=w;break}}C&&!C.allowOnlyTimelineStyles()&&C.setStyles([c],null,g.errors,m)}return x.length?x.map(C=>C.buildKeyframes()):[hI(e,[],[],[],0,S,"",!1)]}visitTrigger(i,e){}visitState(i,e){}visitTransition(i,e){}visitAnimateChild(i,e){let t=e.subInstructions.get(e.element);if(t){let o=e.createSubContext(i.options),r=e.currentTimeline.currentTime,a=this._visitSubInstructions(t,o,o.options);r!=a&&e.transformIntoNewTimeline(a)}e.previousNode=i}visitAnimateRef(i,e){let t=e.createSubContext(i.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([i.options,i.animation.options],e,t),this.visitReference(i.animation,t),e.transformIntoNewTimeline(t.currentTimeline.currentTime),e.previousNode=i}_applyAnimationRefDelays(i,e,t){for(let o of i){let r=o?.delay;if(r){let a=typeof r=="number"?r:zc(yf(r,o?.params??{},e.errors));t.delayNextStep(a)}}}_visitSubInstructions(i,e,t){let r=e.currentTimeline.currentTime,a=t.duration!=null?zc(t.duration):null,c=t.delay!=null?zc(t.delay):null;return a!==0&&i.forEach(m=>{let u=e.appendInstructionToTimeline(m,a,c);r=Math.max(r,u.duration+u.delay)}),r}visitReference(i,e){e.updateOptions(i.options,!0),_s(this,i.animation,e),e.previousNode=i}visitSequence(i,e){let t=e.subContextCount,o=e,r=i.options;if(r&&(r.params||r.delay)&&(o=e.createSubContext(r),o.transformIntoNewTimeline(),r.delay!=null)){o.previousNode.type==Qn.Style&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=$x);let a=zc(r.delay);o.delayNextStep(a)}i.steps.length&&(i.steps.forEach(a=>_s(this,a,o)),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>t&&o.transformIntoNewTimeline()),e.previousNode=i}visitGroup(i,e){let t=[],o=e.currentTimeline.currentTime,r=i.options&&i.options.delay?zc(i.options.delay):0;i.steps.forEach(a=>{let c=e.createSubContext(i.options);r&&c.delayNextStep(r),_s(this,a,c),o=Math.max(o,c.currentTimeline.currentTime),t.push(c.currentTimeline)}),t.forEach(a=>e.currentTimeline.mergeTimelineCollectedStyles(a)),e.transformIntoNewTimeline(o),e.previousNode=i}_visitTiming(i,e){if(i.dynamic){let t=i.strValue,o=e.params?yf(t,e.params,e.errors):t;return cv(o,e.errors)}else return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,e){let t=e.currentAnimateTimings=this._visitTiming(i.timings,e),o=e.currentTimeline;t.delay&&(e.incrementTime(t.delay),o.snapshotCurrentStyles());let r=i.style;r.type==Qn.Keyframes?this.visitKeyframes(r,e):(e.incrementTime(t.duration),this.visitStyle(r,e),o.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=i}visitStyle(i,e){let t=e.currentTimeline,o=e.currentAnimateTimings;!o&&t.hasCurrentStyleProperties()&&t.forwardFrame();let r=o&&o.easing||i.easing;i.isEmptyStep?t.applyEmptyStep(r):t.setStyles(i.styles,r,e.errors,e.options),e.previousNode=i}visitKeyframes(i,e){let t=e.currentAnimateTimings,o=e.currentTimeline.duration,r=t.duration,c=e.createSubContext().currentTimeline;c.easing=t.easing,i.styles.forEach(m=>{let u=m.offset||0;c.forwardTime(u*r),c.setStyles(m.styles,m.easing,e.errors,e.options),c.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(c),e.transformIntoNewTimeline(o+r),e.previousNode=i}visitQuery(i,e){let t=e.currentTimeline.currentTime,o=i.options||{},r=o.delay?zc(o.delay):0;r&&(e.previousNode.type===Qn.Style||t==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=$x);let a=t,c=e.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!o.optional,e.errors);e.currentQueryTotal=c.length;let m=null;c.forEach((u,h)=>{e.currentQueryIndex=h;let g=e.createSubContext(i.options,u);r&&g.delayNextStep(r),u===e.element&&(m=g.currentTimeline),_s(this,i.animation,g),g.currentTimeline.applyStylesToKeyframe();let S=g.currentTimeline.currentTime;a=Math.max(a,S)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),m&&(e.currentTimeline.mergeTimelineCollectedStyles(m),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=i}visitStagger(i,e){let t=e.parentContext,o=e.currentTimeline,r=i.timings,a=Math.abs(r.duration),c=a*(e.currentQueryTotal-1),m=a*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":m=c-m;break;case"full":m=t.currentStaggerTime;break}let h=e.currentTimeline;m&&h.delayNextStep(m);let g=h.currentTime;_s(this,i.animation,e),e.previousNode=i,t.currentStaggerTime=o.currentTime-g+(o.startTime-t.currentTimeline.startTime)}},$x={},rI=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=$x;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(i,e,t,o,r,a,c,m){this._driver=i,this.element=e,this.subInstructions=t,this._enterClassName=o,this._leaveClassName=r,this.errors=a,this.timelines=c,this.currentTimeline=m||new Hx(this._driver,e,0),c.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,e){if(!i)return;let t=i,o=this.options;t.duration!=null&&(o.duration=zc(t.duration)),t.delay!=null&&(o.delay=zc(t.delay));let r=t.params;if(r){let a=o.params;a||(a=this.options.params={}),Object.keys(r).forEach(c=>{(!e||!a.hasOwnProperty(c))&&(a[c]=yf(r[c],a,this.errors))})}}_copyOptions(){let i={};if(this.options){let e=this.options.params;if(e){let t=i.params={};Object.keys(e).forEach(o=>{t[o]=e[o]})}}return i}createSubContext(i=null,e,t){let o=e||this.element,r=new n(this._driver,o,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(o,t||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(i),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(i){return this.previousNode=$x,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,e,t){let o={duration:e??i.duration,delay:this.currentTimeline.currentTime+(t??0)+i.delay,easing:""},r=new aI(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,o,i.stretchStartingKeyframe);return this.timelines.push(r),o}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,e,t,o,r,a){let c=[];if(o&&c.push(this.element),i.length>0){i=i.replace(Qne,"."+this._enterClassName),i=i.replace(Yne,"."+this._leaveClassName);let m=t!=1,u=this._driver.query(this.element,i,m);t!==0&&(u=t<0?u.slice(u.length+t,u.length):u.slice(0,t)),c.push(...u)}return!r&&c.length==0&&a.push(AL(e)),c}},Hx=class n{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(i,e,t,o){this._driver=i,this.element=e,this.startTime=t,this._elementTimelineStylesLookup=o,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(i){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+i),e&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,e){return this.applyStylesToKeyframe(),new n(this._driver,i,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Wne,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,e){this._localTimelineStyles.set(i,e),this._globalTimelineStyles.set(i,e),this._styleSummary.set(i,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&this._previousKeyframe.set("easing",i);for(let[e,t]of this._globalTimelineStyles)this._backFill.set(e,t||fl),this._currentKeyframe.set(e,fl);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,e,t,o){e&&this._previousKeyframe.set("easing",e);let r=o&&o.params||{},a=Kne(i,this._globalTimelineStyles);for(let[c,m]of a){let u=yf(m,r,t);this._pendingStyles.set(c,u),this._localTimelineStyles.has(c)||this._backFill.set(c,this._globalTimelineStyles.get(c)??fl),this._updateStyle(c,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((i,e)=>{this._currentKeyframe.set(e,i)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((i,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,i)}))}snapshotCurrentStyles(){for(let[i,e]of this._localTimelineStyles)this._pendingStyles.set(i,e),this._updateStyle(i,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let i=[];for(let e in this._currentKeyframe)i.push(e);return i}mergeTimelineCollectedStyles(i){i._styleSummary.forEach((e,t)=>{let o=this._styleSummary.get(t);(!o||e.time>o.time)&&this._updateStyle(t,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let i=new Set,e=new Set,t=this._keyframes.size===1&&this.duration===0,o=[];this._keyframes.forEach((c,m)=>{let u=new Map([...this._backFill,...c]);u.forEach((h,g)=>{h===bf?i.add(g):h===fl&&e.add(g)}),t||u.set("offset",m/this.duration),o.push(u)});let r=[...i.values()],a=[...e.values()];if(t){let c=o[0],m=new Map(c);c.set("offset",0),m.set("offset",1),o=[c,m]}return hI(this.element,o,r,a,this.duration,this.startTime,this.easing,!1)}},aI=class extends Hx{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(i,e,t,o,r,a,c=!1){super(i,e,a.delay),this.keyframes=t,this.preStyleProps=o,this.postStyleProps=r,this._stretchStartingKeyframe=c,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:e,duration:t,easing:o}=this.timings;if(this._stretchStartingKeyframe&&e){let r=[],a=t+e,c=e/a,m=new Map(i[0]);m.set("offset",0),r.push(m);let u=new Map(i[0]);u.set("offset",JL(c)),r.push(u);let h=i.length-1;for(let g=1;g<=h;g++){let S=new Map(i[g]),x=S.get("offset"),C=e+x*t;S.set("offset",JL(C/a)),r.push(S)}t=a,e=0,o="",i=r}return hI(this.element,i,this.preStyleProps,this.postStyleProps,t,e,o,!0)}};function JL(n,i=3){let e=Math.pow(10,i-1);return Math.round(n*e)/e}function Kne(n,i){let e=new Map,t;return n.forEach(o=>{if(o==="*"){t??=i.keys();for(let r of t)e.set(r,fl)}else for(let[r,a]of o)e.set(r,a)}),e}function e7(n,i,e,t,o,r,a,c,m,u,h,g,S){return{type:0,element:n,triggerName:i,isRemovalTransition:o,fromState:e,fromStyles:r,toState:t,toStyles:a,timelines:c,queriedElements:m,preStyleProps:u,postStyleProps:h,totalTime:g,errors:S}}var ZP={},Ux=class{_triggerName;ast;_stateStyles;constructor(i,e,t){this._triggerName=i,this.ast=e,this._stateStyles=t}match(i,e,t,o){return Zne(this.ast.matchers,i,e,t,o)}buildStyles(i,e,t){let o=this._stateStyles.get("*");return i!==void 0&&(o=this._stateStyles.get(i?.toString())||o),o?o.buildStyles(e,t):new Map}build(i,e,t,o,r,a,c,m,u,h){let g=[],S=this.ast.options&&this.ast.options.params||ZP,x=c&&c.params||ZP,C=this.buildStyles(t,x,g),M=m&&m.params||ZP,w=this.buildStyles(o,M,g),y=new Set,k=new Map,I=new Map,D=o==="void",N={params:d7(M,S),delay:this.ast.options?.delay},P=h?[]:c7(i,e,this.ast.animation,r,a,C,w,N,u,g),F=0;return P.forEach(re=>{F=Math.max(re.duration+re.delay,F)}),g.length?e7(e,this._triggerName,t,o,D,C,w,[],[],k,I,F,g):(P.forEach(re=>{let ne=re.element,G=gs(k,ne,new Set);re.preStyleProps.forEach(pe=>G.add(pe));let j=gs(I,ne,new Set);re.postStyleProps.forEach(pe=>j.add(pe)),ne!==e&&y.add(ne)}),e7(e,this._triggerName,t,o,D,C,w,P,[...y.values()],k,I,F))}};function Zne(n,i,e,t,o){return n.some(r=>r(i,e,t,o))}function d7(n,i){let e=q({},i);return Object.entries(n).forEach(([t,o])=>{o!=null&&(e[t]=o)}),e}var sI=class{styles;defaultParams;normalizer;constructor(i,e,t){this.styles=i,this.defaultParams=e,this.normalizer=t}buildStyles(i,e){let t=new Map,o=d7(i,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,c)=>{a&&(a=yf(a,o,e));let m=this.normalizer.normalizePropertyName(c,e);a=this.normalizer.normalizeStyleValue(c,m,a,e),t.set(c,a)})}),t}};function Jne(n,i,e){return new lI(n,i,e)}var lI=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(i,e,t){this.name=i,this.ast=e,this._normalizer=t,e.states.forEach(o=>{let r=o.options&&o.options.params||{};this.states.set(o.name,new sI(o.style,r,t))}),t7(this.states,"true","1"),t7(this.states,"false","0"),e.transitions.forEach(o=>{this.transitionFactories.push(new Ux(i,o,this.states))}),this.fallbackTransition=eie(i,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,e,t,o){return this.transitionFactories.find(a=>a.match(i,e,t,o))||null}matchStyles(i,e,t){return this.fallbackTransition.buildStyles(i,e,t)}};function eie(n,i,e){let t=[(a,c)=>!0],o={type:Qn.Sequence,steps:[],options:null},r={type:Qn.Transition,animation:o,matchers:t,options:null,queryCount:0,depCount:0};return new Ux(n,r,i)}function t7(n,i,e){n.has(i)?n.has(e)||n.set(e,n.get(i)):n.has(e)&&n.set(i,n.get(e))}var tie=new mv,cI=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(i,e,t){this.bodyNode=i,this._driver=e,this._normalizer=t}register(i,e){let t=[],o=[],r=l7(this._driver,e,t,o);if(t.length)throw FL(t);this._animations.set(i,r)}_buildPlayer(i,e,t){let o=i.element,r=HP(this._normalizer,i.keyframes,e,t);return this._driver.animate(o,r,i.duration,i.delay,i.easing,[],!0)}create(i,e,t={}){let o=[],r=this._animations.get(i),a,c=new Map;if(r?(a=c7(this._driver,e,r,QP,Ax,new Map,new Map,t,tie,o),a.forEach(h=>{let g=gs(c,h.element,new Map);h.postStyleProps.forEach(S=>g.set(S,null))})):(o.push(LL()),a=[]),o.length)throw BL(o);c.forEach((h,g)=>{h.forEach((S,x)=>{h.set(x,this._driver.computeStyle(g,x,fl))})});let m=a.map(h=>{let g=c.get(h.element);return this._buildPlayer(h,new Map,g)}),u=Nd(m);return this._playersById.set(i,u),u.onDestroy(()=>this.destroy(i)),this.players.push(u),u}destroy(i){let e=this._getPlayer(i);e.destroy(),this._playersById.delete(i);let t=this.players.indexOf(e);t>=0&&this.players.splice(t,1)}_getPlayer(i){let e=this._playersById.get(i);if(!e)throw VL(i);return e}listen(i,e,t,o){let r=Px(e,"","","");return Dx(this._getPlayer(i),t,r,o),()=>{}}command(i,e,t,o){if(t=="register"){this.register(i,o[0]);return}if(t=="create"){let a=o[0]||{};this.create(i,e,a);return}let r=this._getPlayer(i);switch(t){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(o[0]));break;case"destroy":this.destroy(i);break}}},n7="ng-animate-queued",nie=".ng-animate-queued",JP="ng-animate-disabled",iie=".ng-animate-disabled",oie="ng-star-inserted",rie=".ng-star-inserted",aie=[],m7={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},sie={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Zl="__ng_removed",pv=class{namespaceId;value;options;get params(){return this.options.params}constructor(i,e=""){this.namespaceId=e;let t=i&&i.hasOwnProperty("value"),o=t?i.value:i;if(this.value=cie(o),t){let r=i,{value:a}=r,c=IN(r,["value"]);this.options=c}else this.options={};this.options.params||(this.options.params={})}absorbOptions(i){let e=i.params;if(e){let t=this.options.params;Object.keys(e).forEach(o=>{t[o]==null&&(t[o]=e[o])})}}},dv="void",eI=new pv(dv),dI=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(i,e,t){this.id=i,this.hostElement=e,this._engine=t,this._hostClassName="ng-tns-"+i,gl(e,this._hostClassName)}listen(i,e,t,o){if(!this._triggers.has(e))throw zL(t,e);if(t==null||t.length==0)throw jL(e);if(!die(t))throw $L(t,e);let r=gs(this._elementListeners,i,[]),a={name:e,phase:t,callback:o};r.push(a);let c=gs(this._engine.statesByElement,i,new Map);return c.has(e)||(gl(i,sv),gl(i,sv+"-"+e),c.set(e,eI)),()=>{this._engine.afterFlush(()=>{let m=r.indexOf(a);m>=0&&r.splice(m,1),this._triggers.has(e)||c.delete(e)})}}register(i,e){return this._triggers.has(i)?!1:(this._triggers.set(i,e),!0)}_getTrigger(i){let e=this._triggers.get(i);if(!e)throw HL(i);return e}trigger(i,e,t,o=!0){let r=this._getTrigger(e),a=new uv(this.id,e,i),c=this._engine.statesByElement.get(i);c||(gl(i,sv),gl(i,sv+"-"+e),this._engine.statesByElement.set(i,c=new Map));let m=c.get(e),u=new pv(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&m&&u.absorbOptions(m.options),c.set(e,u),m||(m=eI),!(u.value===dv)&&m.value===u.value){if(!uie(m.params,u.params)){let M=[],w=r.matchStyles(m.value,m.params,M),y=r.matchStyles(u.value,u.params,M);M.length?this._engine.reportError(M):this._engine.afterFlush(()=>{zm(i,w),Kl(i,y)})}return}let S=gs(this._engine.playersByElement,i,[]);S.forEach(M=>{M.namespaceId==this.id&&M.triggerName==e&&M.queued&&M.destroy()});let x=r.matchTransition(m.value,u.value,i,u.params),C=!1;if(!x){if(!o)return;x=r.fallbackTransition,C=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:e,transition:x,fromState:m,toState:u,player:a,isFallbackTransition:C}),C||(gl(i,n7),a.onStart(()=>{Sf(i,n7)})),a.onDone(()=>{let M=this.players.indexOf(a);M>=0&&this.players.splice(M,1);let w=this._engine.playersByElement.get(i);if(w){let y=w.indexOf(a);y>=0&&w.splice(y,1)}}),this.players.push(a),S.push(a),a}deregister(i){this._triggers.delete(i),this._engine.statesByElement.forEach(e=>e.delete(i)),this._elementListeners.forEach((e,t)=>{this._elementListeners.set(t,e.filter(o=>o.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);let e=this._engine.playersByElement.get(i);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,e){let t=this._engine.driver.query(i,lv,!0);t.forEach(o=>{if(o[Zl])return;let r=this._engine.fetchNamespacesByElement(o);r.size?r.forEach(a=>a.triggerLeaveAnimation(o,e,!1,!0)):this.clearElementCache(o)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(o=>this.clearElementCache(o)))}triggerLeaveAnimation(i,e,t,o){let r=this._engine.statesByElement.get(i),a=new Map;if(r){let c=[];if(r.forEach((m,u)=>{if(a.set(u,m.value),this._triggers.has(u)){let h=this.trigger(i,u,dv,o);h&&c.push(h)}}),c.length)return this._engine.markElementAsRemoved(this.id,i,!0,e,a),t&&Nd(c).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){let e=this._elementListeners.get(i),t=this._engine.statesByElement.get(i);if(e&&t){let o=new Set;e.forEach(r=>{let a=r.name;if(o.has(a))return;o.add(a);let m=this._triggers.get(a).fallbackTransition,u=t.get(a)||eI,h=new pv(dv),g=new uv(this.id,a,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:a,transition:m,fromState:u,toState:h,player:g,isFallbackTransition:!0})})}}removeNode(i,e){let t=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,e),this.triggerLeaveAnimation(i,e,!0))return;let o=!1;if(t.totalAnimations){let r=t.players.length?t.playersByQueriedElement.get(i):[];if(r&&r.length)o=!0;else{let a=i;for(;a=a.parentNode;)if(t.statesByElement.get(a)){o=!0;break}}}if(this.prepareLeaveAnimationListeners(i),o)t.markElementAsRemoved(this.id,i,!1,e);else{let r=i[Zl];(!r||r===m7)&&(t.afterFlush(()=>this.clearElementCache(i)),t.destroyInnerAnimations(i),t._onRemovalComplete(i,e))}}insertNode(i,e){gl(i,this._hostClassName)}drainQueuedTransitions(i){let e=[];return this._queue.forEach(t=>{let o=t.player;if(o.destroyed)return;let r=t.element,a=this._elementListeners.get(r);a&&a.forEach(c=>{if(c.name==t.triggerName){let m=Px(r,t.triggerName,t.fromState.value,t.toState.value);m._data=i,Dx(t.player,c.phase,m,c.callback)}}),o.markedForDestroy?this._engine.afterFlush(()=>{o.destroy()}):e.push(t)}),this._queue=[],e.sort((t,o)=>{let r=t.transition.ast.depCount,a=o.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(t.element,o.element)?1:-1})}destroy(i){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}},mI=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(i,e)=>{};_onRemovalComplete(i,e){this.onRemovalComplete(i,e)}constructor(i,e,t){this.bodyNode=i,this.driver=e,this._normalizer=t}get queuedPlayers(){let i=[];return this._namespaceList.forEach(e=>{e.players.forEach(t=>{t.queued&&i.push(t)})}),i}createNamespace(i,e){let t=new dI(i,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(t,e):(this.newHostElements.set(e,t),this.collectEnterElement(e)),this._namespaceLookup[i]=t}_balanceNamespaceList(i,e){let t=this._namespaceList,o=this.namespacesByHostElement;if(t.length-1>=0){let a=!1,c=this.driver.getParentElement(e);for(;c;){let m=o.get(c);if(m){let u=t.indexOf(m);t.splice(u+1,0,i),a=!0;break}c=this.driver.getParentElement(c)}a||t.unshift(i)}else t.push(i);return o.set(e,i),i}register(i,e){let t=this._namespaceLookup[i];return t||(t=this.createNamespace(i,e)),t}registerTrigger(i,e,t){let o=this._namespaceLookup[i];o&&o.register(e,t)&&this.totalAnimations++}destroy(i,e){i&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(i);this.namespacesByHostElement.delete(t.hostElement);let o=this._namespaceList.indexOf(t);o>=0&&this._namespaceList.splice(o,1),t.destroy(e),delete this._namespaceLookup[i]}))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){let e=new Set,t=this.statesByElement.get(i);if(t){for(let o of t.values())if(o.namespaceId){let r=this._fetchNamespace(o.namespaceId);r&&e.add(r)}}return e}trigger(i,e,t,o){if(Bx(e)){let r=this._fetchNamespace(i);if(r)return r.trigger(e,t,o),!0}return!1}insertNode(i,e,t,o){if(!Bx(e))return;let r=e[Zl];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let a=this.collectedLeaveElements.indexOf(e);a>=0&&this.collectedLeaveElements.splice(a,1)}if(i){let a=this._fetchNamespace(i);a&&a.insertNode(e,t)}o&&this.collectEnterElement(e)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,e){e?this.disabledNodes.has(i)||(this.disabledNodes.add(i),gl(i,JP)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),Sf(i,JP))}removeNode(i,e,t){if(Bx(e)){let o=i?this._fetchNamespace(i):null;o?o.removeNode(e,t):this.markElementAsRemoved(i,e,!1,t);let r=this.namespacesByHostElement.get(e);r&&r.id!==i&&r.removeNode(e,t)}else this._onRemovalComplete(e,t)}markElementAsRemoved(i,e,t,o,r){this.collectedLeaveElements.push(e),e[Zl]={namespaceId:i,setForRemoval:o,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:r}}listen(i,e,t,o,r){return Bx(e)?this._fetchNamespace(i).listen(e,t,o,r):()=>{}}_buildInstruction(i,e,t,o,r){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,t,o,i.fromState.options,i.toState.options,e,r)}destroyInnerAnimations(i){let e=this.driver.query(i,lv,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(i,Ox,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(i){let e=this.playersByElement.get(i);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(i){let e=this.playersByQueriedElement.get(i);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return Nd(this.players).onDone(()=>i());i()})}processLeaveNode(i){let e=i[Zl];if(e&&e.setForRemoval){if(i[Zl]=m7,e.namespaceId){this.destroyInnerAnimations(i);let t=this._fetchNamespace(e.namespaceId);t&&t.clearElementCache(i)}this._onRemovalComplete(i,e.setForRemoval)}i.classList?.contains(JP)&&this.markElementAsDisabled(i,!1),this.driver.query(i,iie,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(i=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,o)=>this._balanceNamespaceList(t,o)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let t=0;tt()),this._flushFns=[],this._whenQuietFns.length){let t=this._whenQuietFns;this._whenQuietFns=[],e.length?Nd(e).onDone(()=>{t.forEach(o=>o())}):t.forEach(o=>o())}}reportError(i){throw UL(i)}_flushAnimations(i,e){let t=new mv,o=[],r=new Map,a=[],c=new Map,m=new Map,u=new Map,h=new Set;this.disabledNodes.forEach(ue=>{h.add(ue);let V=this.driver.query(ue,nie,!0);for(let K=0;K{let K=QP+M++;C.set(V,K),ue.forEach(ae=>gl(ae,K))});let w=[],y=new Set,k=new Set;for(let ue=0;uey.add(ae)):k.add(V))}let I=new Map,D=r7(S,Array.from(y));D.forEach((ue,V)=>{let K=Ax+M++;I.set(V,K),ue.forEach(ae=>gl(ae,K))}),i.push(()=>{x.forEach((ue,V)=>{let K=C.get(V);ue.forEach(ae=>Sf(ae,K))}),D.forEach((ue,V)=>{let K=I.get(V);ue.forEach(ae=>Sf(ae,K))}),w.forEach(ue=>{this.processLeaveNode(ue)})});let N=[],P=[];for(let ue=this._namespaceList.length-1;ue>=0;ue--)this._namespaceList[ue].drainQueuedTransitions(e).forEach(K=>{let ae=K.player,se=K.element;if(N.push(ae),this.collectedEnterElements.length){let Ae=se[Zl];if(Ae&&Ae.setForMove){if(Ae.previousTriggersValues&&Ae.previousTriggersValues.has(K.triggerName)){let qe=Ae.previousTriggersValues.get(K.triggerName),ct=this.statesByElement.get(K.element);if(ct&&ct.has(K.triggerName)){let Et=ct.get(K.triggerName);Et.value=qe,ct.set(K.triggerName,Et)}}ae.destroy();return}}let Me=!g||!this.driver.containsElement(g,se),Le=I.get(se),Ke=C.get(se),Xe=this._buildInstruction(K,t,Ke,Le,Me);if(Xe.errors&&Xe.errors.length){P.push(Xe);return}if(Me){ae.onStart(()=>zm(se,Xe.fromStyles)),ae.onDestroy(()=>Kl(se,Xe.toStyles)),o.push(ae);return}if(K.isFallbackTransition){ae.onStart(()=>zm(se,Xe.fromStyles)),ae.onDestroy(()=>Kl(se,Xe.toStyles)),o.push(ae);return}let xe=[];Xe.timelines.forEach(Ae=>{Ae.stretchStartingKeyframe=!0,this.disabledNodes.has(Ae.element)||xe.push(Ae)}),Xe.timelines=xe,t.append(se,Xe.timelines);let Q={instruction:Xe,player:ae,element:se};a.push(Q),Xe.queriedElements.forEach(Ae=>gs(c,Ae,[]).push(ae)),Xe.preStyleProps.forEach((Ae,qe)=>{if(Ae.size){let ct=m.get(qe);ct||m.set(qe,ct=new Set),Ae.forEach((Et,Yn)=>ct.add(Yn))}}),Xe.postStyleProps.forEach((Ae,qe)=>{let ct=u.get(qe);ct||u.set(qe,ct=new Set),Ae.forEach((Et,Yn)=>ct.add(Yn))})});if(P.length){let ue=[];P.forEach(V=>{ue.push(GL(V.triggerName,V.errors))}),N.forEach(V=>V.destroy()),this.reportError(ue)}let F=new Map,re=new Map;a.forEach(ue=>{let V=ue.element;t.has(V)&&(re.set(V,V),this._beforeAnimationBuild(ue.player.namespaceId,ue.instruction,F))}),o.forEach(ue=>{let V=ue.element;this._getPreviousPlayers(V,!1,ue.namespaceId,ue.triggerName,null).forEach(ae=>{gs(F,V,[]).push(ae),ae.destroy()})});let ne=w.filter(ue=>a7(ue,m,u)),G=new Map;o7(G,this.driver,k,u,fl).forEach(ue=>{a7(ue,m,u)&&ne.push(ue)});let pe=new Map;x.forEach((ue,V)=>{o7(pe,this.driver,new Set(ue),m,bf)}),ne.forEach(ue=>{let V=G.get(ue),K=pe.get(ue);G.set(ue,new Map([...V?.entries()??[],...K?.entries()??[]]))});let be=[],me=[],Ee={};a.forEach(ue=>{let{element:V,player:K,instruction:ae}=ue;if(t.has(V)){if(h.has(V)){K.onDestroy(()=>Kl(V,ae.toStyles)),K.disabled=!0,K.overrideTotalTime(ae.totalTime),o.push(K);return}let se=Ee;if(re.size>1){let Le=V,Ke=[];for(;Le=Le.parentNode;){let Xe=re.get(Le);if(Xe){se=Xe;break}Ke.push(Le)}Ke.forEach(Xe=>re.set(Xe,se))}let Me=this._buildAnimation(K.namespaceId,ae,F,r,pe,G);if(K.setRealPlayer(Me),se===Ee)be.push(K);else{let Le=this.playersByElement.get(se);Le&&Le.length&&(K.parentPlayer=Nd(Le)),o.push(K)}}else zm(V,ae.fromStyles),K.onDestroy(()=>Kl(V,ae.toStyles)),me.push(K),h.has(V)&&o.push(K)}),me.forEach(ue=>{let V=r.get(ue.element);if(V&&V.length){let K=Nd(V);ue.setRealPlayer(K)}}),o.forEach(ue=>{ue.parentPlayer?ue.syncPlayerEvents(ue.parentPlayer):ue.destroy()});for(let ue=0;ue!Me.destroyed);se.length?mie(this,V,se):this.processLeaveNode(V)}return w.length=0,be.forEach(ue=>{this.players.push(ue),ue.onDone(()=>{ue.destroy();let V=this.players.indexOf(ue);this.players.splice(V,1)}),ue.play()}),be}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,e,t,o,r){let a=[];if(e){let c=this.playersByQueriedElement.get(i);c&&(a=c)}else{let c=this.playersByElement.get(i);if(c){let m=!r||r==dv;c.forEach(u=>{u.queued||!m&&u.triggerName!=o||a.push(u)})}}return(t||o)&&(a=a.filter(c=>!(t&&t!=c.namespaceId||o&&o!=c.triggerName))),a}_beforeAnimationBuild(i,e,t){let o=e.triggerName,r=e.element,a=e.isRemovalTransition?void 0:i,c=e.isRemovalTransition?void 0:o;for(let m of e.timelines){let u=m.element,h=u!==r,g=gs(t,u,[]);this._getPreviousPlayers(u,h,a,c,e.toState).forEach(x=>{let C=x.getRealPlayer();C.beforeDestroy&&C.beforeDestroy(),x.destroy(),g.push(x)})}zm(r,e.fromStyles)}_buildAnimation(i,e,t,o,r,a){let c=e.triggerName,m=e.element,u=[],h=new Set,g=new Set,S=e.timelines.map(C=>{let M=C.element;h.add(M);let w=M[Zl];if(w&&w.removedBeforeQueried)return new Vc(C.duration,C.delay);let y=M!==m,k=pie((t.get(M)||aie).map(F=>F.getRealPlayer())).filter(F=>{let re=F;return re.element?re.element===M:!1}),I=r.get(M),D=a.get(M),N=HP(this._normalizer,C.keyframes,I,D),P=this._buildPlayer(C,N,k);if(C.subTimeline&&o&&g.add(M),y){let F=new uv(i,c,M);F.setRealPlayer(P),u.push(F)}return P});u.forEach(C=>{gs(this.playersByQueriedElement,C.element,[]).push(C),C.onDone(()=>lie(this.playersByQueriedElement,C.element,C))}),h.forEach(C=>gl(C,XP));let x=Nd(S);return x.onDestroy(()=>{h.forEach(C=>Sf(C,XP)),Kl(m,e.toStyles)}),g.forEach(C=>{gs(o,C,[]).push(x)}),x}_buildPlayer(i,e,t){return e.length>0?this.driver.animate(i.element,e,i.duration,i.delay,i.easing,t):new Vc(i.duration,i.delay)}},uv=class{namespaceId;triggerName;element;_player=new Vc;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(i,e,t){this.namespaceId=i,this.triggerName=e,this.element=t}setRealPlayer(i){this._containsRealPlayer||(this._player=i,this._queuedCallbacks.forEach((e,t)=>{e.forEach(o=>Dx(i,t,void 0,o))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){let e=this._player;e.triggerCallback&&i.onStart(()=>e.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,e){gs(this._queuedCallbacks,i,[]).push(e)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){let e=this._player;e.triggerCallback&&e.triggerCallback(i)}};function lie(n,i,e){let t=n.get(i);if(t){if(t.length){let o=t.indexOf(e);t.splice(o,1)}t.length==0&&n.delete(i)}return t}function cie(n){return n??null}function Bx(n){return n&&n.nodeType===1}function die(n){return n=="start"||n=="done"}function i7(n,i){let e=n.style.display;return n.style.display=i??"none",e}function o7(n,i,e,t,o){let r=[];e.forEach(m=>r.push(i7(m)));let a=[];t.forEach((m,u)=>{let h=new Map;m.forEach(g=>{let S=i.computeStyle(u,g,o);h.set(g,S),(!S||S.length==0)&&(u[Zl]=sie,a.push(u))}),n.set(u,h)});let c=0;return e.forEach(m=>i7(m,r[c++])),a}function r7(n,i){let e=new Map;if(n.forEach(c=>e.set(c,[])),i.length==0)return e;let t=1,o=new Set(i),r=new Map;function a(c){if(!c)return t;let m=r.get(c);if(m)return m;let u=c.parentNode;return e.has(u)?m=u:o.has(u)?m=t:m=a(u),r.set(c,m),m}return i.forEach(c=>{let m=a(c);m!==t&&e.get(m).push(c)}),e}function gl(n,i){n.classList?.add(i)}function Sf(n,i){n.classList?.remove(i)}function mie(n,i,e){Nd(e).onDone(()=>n.processLeaveNode(i))}function pie(n){let i=[];return p7(n,i),i}function p7(n,i){for(let e=0;eo.add(r)):i.set(n,t),e.delete(n),!0}var wf=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(i,e)=>{};constructor(i,e,t){this._driver=e,this._normalizer=t,this._transitionEngine=new mI(i.body,e,t),this._timelineEngine=new cI(i.body,e,t),this._transitionEngine.onRemovalComplete=(o,r)=>this.onRemovalComplete(o,r)}registerTrigger(i,e,t,o,r){let a=i+"-"+o,c=this._triggerCache[a];if(!c){let m=[],u=[],h=l7(this._driver,r,m,u);if(m.length)throw RL(o,m);c=Jne(o,h,this._normalizer),this._triggerCache[a]=c}this._transitionEngine.registerTrigger(e,o,c)}register(i,e){this._transitionEngine.register(i,e)}destroy(i,e){this._transitionEngine.destroy(i,e)}onInsert(i,e,t,o){this._transitionEngine.insertNode(i,e,t,o)}onRemove(i,e,t){this._transitionEngine.removeNode(i,e,t)}disableAnimations(i,e){this._transitionEngine.markElementAsDisabled(i,e)}process(i,e,t,o){if(t.charAt(0)=="@"){let[r,a]=UP(t),c=o;this._timelineEngine.command(r,e,a,c)}else this._transitionEngine.trigger(i,e,t,o)}listen(i,e,t,o,r){if(t.charAt(0)=="@"){let[a,c]=UP(t);return this._timelineEngine.listen(a,e,c,r)}return this._transitionEngine.listen(i,e,t,o,r)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(i){this._transitionEngine.afterFlushAnimationsDone(i)}};function hie(n,i){let e=null,t=null;return Array.isArray(i)&&i.length?(e=tI(i[0]),i.length>1&&(t=tI(i[i.length-1]))):i instanceof Map&&(e=tI(i)),e||t?new fie(n,e,t):null}var fie=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,t,o){this._element=e,this._startStyles=t,this._endStyles=o;let r=n.initialStylesByElement.get(e);r||n.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Kl(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Kl(this._element,this._initialStyles),this._endStyles&&(Kl(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(zm(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(zm(this._element,this._endStyles),this._endStyles=null),Kl(this._element,this._initialStyles),this._state=3)}}return n})();function tI(n){let i=null;return n.forEach((e,t)=>{gie(t)&&(i=i||new Map,i.set(t,e))}),i}function gie(n){return n==="display"||n==="position"}var Gx=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(i,e,t,o){this.element=i,this.keyframes=e,this.options=t,this._specialStyles=o,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let i=this.keyframes,e=this._triggerWebAnimation(this.element,i,this.options);if(!e)return this._onFinish(),null;this.domPlayer=e,this._finalKeyframe=i.length?i[i.length-1]:new Map;let t=()=>this._onFinish();return e.addEventListener("finish",t),this.onDestroy(()=>{e.removeEventListener("finish",t)}),e}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(i){let e=[];return i.forEach(t=>{e.push(Object.fromEntries(t))}),e}_triggerWebAnimation(i,e,t){let o=this._convertKeyframesToObject(e);try{return i.animate(o,t)}catch{return null}}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){let i=this._buildPlayer();i&&(this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),i.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}setPosition(i){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=i*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let i=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,o)=>{o!=="offset"&&i.set(o,this._finished?t:Rx(this.element,o))}),this.currentSnapshot=i}triggerCallback(i){let e=i==="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},Wx=class{validateStyleProperty(i){return!0}validateAnimatableStyleProperty(i){return!0}containsElement(i,e){return GP(i,e)}getParentElement(i){return Ix(i)}query(i,e,t){return WP(i,e,t)}computeStyle(i,e,t){return Rx(i,e)}animate(i,e,t,o,r,a=[]){let c=o==0?"both":"forwards",m={duration:t,delay:o,fill:c};r&&(m.easing=r);let u=new Map,h=a.filter(x=>x instanceof Gx);XL(t,o)&&h.forEach(x=>{x.currentSnapshot.forEach((C,M)=>u.set(M,C))});let g=qL(e).map(x=>new Map(x));g=YL(i,g,u);let S=hie(i,g);return new Gx(i,g,m,S)}};var Vx="@",u7="@.disabled",qx=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(i,e,t,o){this.namespaceId=i,this.delegate=e,this.engine=t,this._onDestroy=o}get data(){return this.delegate.data}destroyNode(i){this.delegate.destroyNode?.(i)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(i,e){return this.delegate.createElement(i,e)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,e){this.delegate.appendChild(i,e),this.engine.onInsert(this.namespaceId,e,i,!1)}insertBefore(i,e,t,o=!0){this.delegate.insertBefore(i,e,t),this.engine.onInsert(this.namespaceId,e,i,o)}removeChild(i,e,t,o){if(o){this.delegate.removeChild(i,e,t,o);return}this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(i,e){return this.delegate.selectRootElement(i,e)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,e,t,o){this.delegate.setAttribute(i,e,t,o)}removeAttribute(i,e,t){this.delegate.removeAttribute(i,e,t)}addClass(i,e){this.delegate.addClass(i,e)}removeClass(i,e){this.delegate.removeClass(i,e)}setStyle(i,e,t,o){this.delegate.setStyle(i,e,t,o)}removeStyle(i,e,t){this.delegate.removeStyle(i,e,t)}setProperty(i,e,t){e.charAt(0)==Vx&&e==u7?this.disableAnimations(i,!!t):this.delegate.setProperty(i,e,t)}setValue(i,e){this.delegate.setValue(i,e)}listen(i,e,t,o){return this.delegate.listen(i,e,t,o)}disableAnimations(i,e){this.engine.disableAnimations(i,e)}},pI=class extends qx{factory;constructor(i,e,t,o,r){super(e,t,o,r),this.factory=i,this.namespaceId=e}setProperty(i,e,t){e.charAt(0)==Vx?e.charAt(1)=="."&&e==u7?(t=t===void 0?!0:!!t,this.disableAnimations(i,t)):this.engine.process(this.namespaceId,i,e.slice(1),t):this.delegate.setProperty(i,e,t)}listen(i,e,t,o){if(e.charAt(0)==Vx){let r=_ie(i),a=e.slice(1),c="";return a.charAt(0)!=Vx&&([a,c]=vie(a)),this.engine.listen(this.namespaceId,r,a,c,m=>{let u=m._data||-1;this.factory.scheduleListenerCallback(u,t,m)})}return this.delegate.listen(i,e,t,o)}};function _ie(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function vie(n){let i=n.indexOf("."),e=n.substring(0,i),t=n.slice(i+1);return[e,t]}var Qx=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(i,e,t){this.delegate=i,this.engine=e,this._zone=t,e.onRemovalComplete=(o,r)=>{r?.removeChild(null,o)}}createRenderer(i,e){let o=this.delegate.createRenderer(i,e);if(!i||!e?.data?.animation){let u=this._rendererCache,h=u.get(o);if(!h){let g=()=>u.delete(o);h=new qx("",o,this.engine,g),u.set(o,h)}return h}let r=e.id,a=e.id+"-"+this._currentId;this._currentId++,this.engine.register(a,i);let c=u=>{Array.isArray(u)?u.forEach(c):this.engine.registerTrigger(r,a,i,u.name,u)};return e.data.animation.forEach(c),new pI(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(i,e,t){if(i>=0&&ie(t));return}let o=this._animationCallbacksBuffer;o.length==0&&queueMicrotask(()=>{this._zone.run(()=>{o.forEach(r=>{let[a,c]=r;a(c)}),this._animationCallbacksBuffer=[]})}),o.push([e,t])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(i){this.engine.flush(),this.delegate.componentReplaced?.(i)}};var bie=(()=>{class n extends wf{constructor(e,t,o){super(e,t,o)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||n)(ge(qi),ge(Ou),ge(Nu))};static \u0275prov=Y({token:n,factory:n.\u0275fac})}return n})();function xie(){return new zx}function yie(){return new Qx(f(f5),f(wf),f(Ii))}var f7=[{provide:Nu,useFactory:xie},{provide:wf,useClass:bie},{provide:vd,useFactory:yie}],Sie=[{provide:Ou,useClass:uI},{provide:VT,useValue:"NoopAnimations"},...f7],h7=[{provide:Ou,useFactory:()=>new Wx},{provide:VT,useFactory:()=>"BrowserAnimations"},...f7],g7=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?Sie:h7}}static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({providers:h7,imports:[f1]})}return n})();function wie(n,i){return typeof n>"u"?typeof i>"u"?n:i:n}function vI(n,i){return n=wie(n,i),typeof n=="function"?function(){for(var t=arguments,o=arguments.length,r=Array(o),a=0;a"u"?"undefined":fI(n))==="object"&&n.nodeType===1&&fI(n.style)==="object"&&fI(n.ownerDocument)==="object"};function C7(n,i){if(i=xI(i,!0),!v7(i))return-1;for(var e=0;e0;)e[t]=i[t+1];return e=e.map(xI),Mie(n,e)}function Tie(n){for(var i=arguments,e=[],t=arguments.length-1;t-- >0;)e[t]=i[t+1];return e.map(xI).reduce(function(o,r){var a=C7(n,r);return a!==-1?o.concat(n.splice(a,1)):o},[])}function xI(n,i){if(typeof n=="string")try{return document.querySelector(n)}catch(e){throw e}if(!v7(n)&&!i)throw new TypeError(n+" is not a DOM element.");return n}function Eie(n,i){i=i||{};var e=vI(i.allowUpdate,!0);return function(o){if(o=o||window.event,n.target=o.target||o.srcElement||o.originalTarget,n.element=this,n.type=o.type,!!e(o)){if(o.targetTouches)n.x=o.targetTouches[0].clientX,n.y=o.targetTouches[0].clientY,n.pageX=o.targetTouches[0].pageX,n.pageY=o.targetTouches[0].pageY,n.screenX=o.targetTouches[0].screenX,n.screenY=o.targetTouches[0].screenY;else{if(o.pageX===null&&o.clientX!==null){var r=o.target&&o.target.ownerDocument||document,a=r.documentElement,c=r.body;n.pageX=o.clientX+(a&&a.scrollLeft||c&&c.scrollLeft||0)-(a&&a.clientLeft||c&&c.clientLeft||0),n.pageY=o.clientY+(a&&a.scrollTop||c&&c.scrollTop||0)-(a&&a.clientTop||c&&c.clientTop||0)}else n.pageX=o.pageX,n.pageY=o.pageY;n.x=o.clientX,n.y=o.clientY,n.screenX=o.screenX,n.screenY=o.screenY}n.clientX=n.x,n.clientY=n.y}}}function Die(){var n={top:{value:0,enumerable:!0},left:{value:0,enumerable:!0},right:{value:window.innerWidth,enumerable:!0},bottom:{value:window.innerHeight,enumerable:!0},width:{value:window.innerWidth,enumerable:!0},height:{value:window.innerHeight,enumerable:!0},x:{value:0,enumerable:!0},y:{value:0,enumerable:!0}};if(Object.create)return Object.create({},n);var i={};return Object.defineProperties(i,n),i}function b7(n){if(n===window)return Die();try{var i=n.getBoundingClientRect();return i.x===void 0&&(i.x=i.left,i.y=i.top),i}catch{throw new TypeError("Can't call getBoundingClientRect on "+n)}}function Pie(n,i){var e=b7(i);return n.y>e.top&&n.ye.left&&n.x"u")return function(){};for(var n=0,i=fv.length;n"u")return function(){};for(var n=0,i=fv.length;npe.right-e.margin.right?be=Math.ceil(Math.min(1,(a.x-pe.right)/e.margin.right+1)*e.maxSpeed.right):be=0,a.ype.bottom-e.margin.bottom?me=Math.ceil(Math.min(1,(a.y-pe.bottom)/e.margin.bottom+1)*e.maxSpeed.bottom):me=0,e.syncMove()&&m.dispatch(j,{pageX:a.pageX+be,pageY:a.pageY+me,clientX:a.x+be,clientY:a.y+me}),setTimeout(function(){me&&ne(j,me),be&&G(j,be)})}function ne(j,pe){j===window?window.scrollTo(j.pageXOffset,j.pageYOffset+pe):j.scrollTop+=pe}function G(j,pe){j===window?window.scrollTo(j.pageXOffset+pe,j.pageYOffset):j.scrollLeft+=pe}}function Nie(n,i){return new Oie(n,i)}function _7(n,i,e){return e?n.y>e.top&&n.ye.left&&n.x{class n{constructor(){this.currentDrag=new je}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Fie=(()=>{class n{constructor(){this.elementRef=f(Yt)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275dir=ft({type:n,selectors:[["","mwlDraggableScrollContainer",""]]})}}return n})();function Lie(n,i,e){e&&e.split(" ").forEach(t=>n.addClass(i.nativeElement,t))}function Bie(n,i,e){e&&e.split(" ").forEach(t=>n.removeClass(i.nativeElement,t))}var y7=(()=>{class n{constructor(){this.dragAxis={x:!0,y:!0},this.dragSnapGrid={},this.ghostDragEnabled=!0,this.showOriginalElementWhileDragging=!1,this.dragCursor="",this.autoScroll={margin:20},this.dragPointerDown=new _e,this.dragStart=new _e,this.ghostElementCreated=new _e,this.dragging=new _e,this.dragEnd=new _e,this.pointerDown$=new je,this.pointerMove$=new je,this.pointerUp$=new je,this.eventListenerSubscriptions={},this.destroy$=new je,this.timeLongPress={timerBegin:0,timerEnd:0},this.element=f(Yt),this.renderer=f(hi),this.draggableHelper=f(Rie),this.zone=f(Ii),this.vcr=f(to),this.scrollContainer=f(Fie,{optional:!0}),this.document=f(qi)}ngOnInit(){this.checkEventListeners();let e=this.pointerDown$.pipe(Kn(()=>this.canDrag()),Cr(t=>{t.event.stopPropagation&&!this.scrollContainer&&t.event.stopPropagation();let o=this.renderer.createElement("style");this.renderer.setAttribute(o,"type","text/css"),this.renderer.appendChild(o,this.renderer.createText(` + `.trim());if(n.some((e,t)=>i[t].constructor!==e.constructor))throw new Error("The types of the i18n message children changed between first and second pass.")}var jW=/\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*("|')([\s\S]*?)\1[\s\S]*\)/g;function $W(n){return n.split(jW)[2]}var Y5=new Set(["iframe|srcdoc","*|innerhtml","*|outerhtml","embed|src","iframe|src","object|codebase","object|data"]);function Z5(n,i){return n=n.toLowerCase(),i=i.toLowerCase(),Y5.has(n+"|"+i)||Y5.has("*|"+i)}var HW=n=>(i,e)=>{let t=n.get(i)??i;return t instanceof yd&&(e instanceof Ph&&t.i18n instanceof za&&(e.previousMessage=t.i18n),t.i18n=e),e},W1=class{keepI18nAttrs;enableI18nLegacyMessageIdFormat;preserveSignificantWhitespace;retainEmptyTokens;hasI18nMeta=!1;_errors=[];constructor(i=!1,e=!1,t=!0,o=!t){this.keepI18nAttrs=i,this.enableI18nLegacyMessageIdFormat=e,this.preserveSignificantWhitespace=t,this.retainEmptyTokens=o}_generateI18nMessage(i,e="",t){let{meaning:o,description:r,customId:a}=this._parseMetadata(e),p=RW(this.retainEmptyTokens,this.preserveSignificantWhitespace)(i,o,r,a,t);return this._setMessageId(p,e),this._setLegacyIds(p,e),p}visitAllWithErrors(i){let e=i.map(t=>t.visit(this,null));return new H1(e,this._errors)}visitElement(i){return this._visitElementLike(i),i}visitComponent(i,e){return this._visitElementLike(i),i}visitExpansion(i,e){let t,o=i.i18n;if(this.hasI18nMeta=!0,o instanceof Ph){let r=o.name;t=this._generateI18nMessage([i],o);let a=ZN(t);a.name=r,e!==null&&(e.placeholderToMessage[r]=t)}else t=this._generateI18nMessage([i],e||o);return i.i18n=t,i}visitText(i){return i}visitAttribute(i){return i}visitComment(i){return i}visitExpansionCase(i){return i}visitBlock(i,e){return Co(this,i.children,e),i}visitBlockParameter(i,e){return i}visitLetDeclaration(i,e){return i}visitDirective(i,e){return i}_visitElementLike(i){let e;if(iH(i)){this.hasI18nMeta=!0;let t=[],o={};for(let r of i.attrs)if(r.name===KN){let a=i.i18n||r.value,c=new Map,p=this.preserveSignificantWhitespace?i.children:uc(new U1(!1,c),i.children);e=this._generateI18nMessage(p,a,HW(c)),e.nodes.length===0&&(e=void 0),i.i18n=e}else if(r.name.startsWith(aT)){let a=r.name.slice(aT.length),c;i instanceof Fa?c=i.tagName===null?!1:Z5(i.tagName,a):c=Z5(i.name,a),c?this._reportError(r,`Translating attribute '${a}' is disallowed for security reasons.`):o[a]=r.value}else t.push(r);if(Object.keys(o).length)for(let r of t){let a=o[r.name];a!==void 0&&r.value&&(r.i18n=this._generateI18nMessage([r],r.i18n||a))}this.keepI18nAttrs||(i.attrs=t)}Co(this,i.children,e)}_parseMetadata(i){return typeof i=="string"?WW(i):i instanceof za?i:{}}_setMessageId(i,e){i.id||(i.id=e instanceof za&&e.id||r$(i))}_setLegacyIds(i,e){if(this.enableI18nLegacyMessageIdFormat)i.legacyIds=[o$(i),jN(i)];else if(typeof e!="string"){let t=e instanceof za?e:e instanceof Ph?e.previousMessage:void 0;i.legacyIds=t?t.legacyIds:[]}}_reportError(i,e){this._errors.push(new sn(i.sourceSpan,e))}},UW="|",GW="@@";function WW(n=""){let i,e,t;if(n=n.trim(),n){let o=n.indexOf(GW),r=n.indexOf(UW),a;[a,i]=o>-1?[n.slice(0,o),n.slice(o+2)]:[n,""],[e,t]=r>-1?[a.slice(0,r),a.slice(r+1)]:["",a]}return{customId:i,meaning:e,description:t}}function qW(n){let i=[];return n.description?i.push({tagName:"desc",text:n.description}):i.push({tagName:"suppress",text:"{msgDescriptions}"}),n.meaning&&i.push({tagName:"meaning",text:n.meaning}),b$(i)}var QW="goog.getMsg";function XW(n,i,e,t){let o=YW(i),r=[Te(o)];Object.keys(t).length&&(r.push(ST(_E(t,!0),!0)),r.push(ST({original_code:nl(Object.keys(t).map(p=>({key:s0(p),quoted:!0,value:i.placeholders[p]?Te(i.placeholders[p].sourceSpan.toString()):Te(i.placeholderToMessage[p].nodes.map(u=>u.sourceSpan.toString()).join(""))})))})));let a=new Rr(e.name,Yn(QW).callFn(r),Ol,oa.Final);a.addLeadingComment(qW(i));let c=new sa(n.set(e));return[a,c]}var jT=class{formatPh(i){return`{$${s0(i)}}`}visitText(i){return i.value}visitContainer(i){return i.children.map(e=>e.visit(this)).join("")}visitIcu(i){return AF(i)}visitTagPlaceholder(i){return i.isVoid?this.formatPh(i.startName):`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitPlaceholder(i){return this.formatPh(i.name)}visitBlockPlaceholder(i){return`${this.formatPh(i.startName)}${i.children.map(e=>e.visit(this)).join("")}${this.formatPh(i.closeName)}`}visitIcuPlaceholder(i,e){return this.formatPh(i.name)}},KW=new jT;function YW(n){return n.nodes.map(i=>i.visit(KW,null)).join("")}function ZW(n,i,e){let{messageParts:t,placeHolders:o}=JW(i),r=eq(i),a=o.map(u=>e[u.text]),c=S$(i,t,o,a,r),p=n.set(c);return[new sa(p)]}var $T=class{placeholderToMessage;pieces;constructor(i,e){this.placeholderToMessage=i,this.pieces=e}visitText(i){if(this.pieces[this.pieces.length-1]instanceof Ip)this.pieces[this.pieces.length-1].text+=i.value;else{let e=new gn(i.sourceSpan.fullStart,i.sourceSpan.end,i.sourceSpan.fullStart,i.sourceSpan.details);this.pieces.push(new Ip(i.value,e))}}visitContainer(i){i.children.forEach(e=>e.visit(this))}visitIcu(i){this.pieces.push(new Ip(AF(i),i.sourceSpan))}visitTagPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.startName,i.startSourceSpan??i.sourceSpan)),i.isVoid||(i.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(i.closeName,i.endSourceSpan??i.sourceSpan)))}visitPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.name,i.sourceSpan))}visitBlockPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.startName,i.startSourceSpan??i.sourceSpan)),i.children.forEach(e=>e.visit(this)),this.pieces.push(this.createPlaceholderPiece(i.closeName,i.endSourceSpan??i.sourceSpan))}visitIcuPlaceholder(i){this.pieces.push(this.createPlaceholderPiece(i.name,i.sourceSpan,this.placeholderToMessage[i.name]))}createPlaceholderPiece(i,e,t){return new fh(s0(i,!1),e,t)}};function JW(n){let i=[],e=new $T(n.placeholderToMessage,i);return n.nodes.forEach(t=>t.visit(e)),tq(i)}function eq(n){let i=n.nodes[0],e=n.nodes[n.nodes.length-1];return new gn(i.sourceSpan.fullStart,e.sourceSpan.end,i.sourceSpan.fullStart,i.sourceSpan.details)}function tq(n){let i=[],e=[];n[0]instanceof fh&&i.push(yk(n[0].sourceSpan.start));for(let t=0;t{let M=S.has(b.name);return S.add(b.name),!M});let x=_.flatMap(b=>{let M=a.get(b.context);if(M===void 0)throw new Error("AssertionError: Could not find i18n expression's value");return[Te(b.name),M]});h.i18nAttributesConfig=n.addConst(new wc(x))}for(let p of n.units)for(let u of p.create)if(u.kind===V.I18nStart){let h=c.get(u.root);if(h===void 0)throw new Error("AssertionError: Could not find corresponding i18n block index for an i18n message op; was an i18n message incorrectly assumed to correspond to an attribute?");u.messageIndex=h}}function zF(n,i,e,t){let o=[],r=new Map;for(let u of t.subMessages){let h=e.get(u),{mainVar:_,statements:S}=zF(n,i,e,h);o.push(...S);let x=r.get(h.messagePlaceholder)??[];x.push(_),r.set(h.messagePlaceholder,x)}sq(t,r),t.params=new Map([...t.params.entries()].sort());let a=Yn(n.pool.uniqueName(nq)),c=dq(n.pool,t.message.id,i,n.i18nUseExternalIds),p;if(t.needsPostprocessing||t.postprocessingParams.size>0){let u=Object.fromEntries([...t.postprocessingParams.entries()].sort()),h=_E(u,!1),_=[];t.postprocessingParams.size>0&&_.push(ST(h,!0)),p=S=>Ut(fe.i18nPostprocess).callFn([S,..._])}return o.push(...lq(t.message,a,c,t.params,p)),{mainVar:a,statements:o}}function sq(n,i){for(let[e,t]of i)t.length===1?n.params.set(e,t[0]):(n.params.set(e,Te(`${eN}${iq}${e}${eN}`)),n.postprocessingParams.set(e,Gi(t)))}function lq(n,i,e,t,o){let r=Object.fromEntries(t),a=[rq(i),tb(cq(),XW(i,n,e,r),ZW(i,n,_E(r,!1)))];return o&&a.push(new sa(i.set(o(i)))),a}function cq(){return r0(Yn(J5)).notIdentical(Te("undefined",hE)).and(Yn(J5))}function dq(n,i,e,t){let o,r=e;if(t){let a=tN("EXTERNAL_"),c=n.uniqueName(r);o=`${a}${Mp(i)}$$${c}`}else{let a=tN(r);o=n.uniqueName(a)}return Yn(o)}function mq(n){for(let i of n.units){let e=null,t=null,o=new Map,r=new Map,a=new Map;for(let c of i.create)switch(c.kind){case V.I18nStart:if(c.context===null)throw Error("I18n op should have its context set.");e=c;break;case V.I18nEnd:e=null;break;case V.IcuStart:if(c.context===null)throw Error("Icu op should have its context set.");t=c;break;case V.IcuEnd:t=null;break;case V.Text:if(e!==null)if(o.set(c.xref,e),r.set(c.xref,t),c.icuPlaceholder!==null){let p=VU(n.allocateXrefId(),c.icuPlaceholder,[c.initialValue]);qe.replace(c,p),a.set(c.xref,p)}else qe.remove(c);break}for(let c of i.update)switch(c.kind){case V.InterpolateText:if(!o.has(c.target))continue;let p=o.get(c.target),u=r.get(c.target),h=a.get(c.target),_=u?u.context:p.context,S=u?$_.Postproccessing:$_.Creation,x=[];for(let b=0;b0){let t=uq(e.localRefs);e.localRefs=n.addConst(t)}else e.localRefs=null;break}}function uq(n){let i=[];for(let e of n)i.push(Te(e.name),Te(e.target));return Gi(i)}function hq(n){for(let i of n.units){let e=Ca.HTML;for(let t of i.create)t.kind===V.ElementStart&&t.namespace!==e&&(qe.insertBefore(PU(t.namespace),t),e=t.namespace)}}function fq(n){let i=[],e=0,t=0,o=0,r=0,a=0,c=null;for(;e0&&t===0&&o===0){let u=n.substring(r,e-1).trim();i.push(c,u),a=e,r=0,c=null}break}if(c&&r){let p=n.slice(r).trim();i.push(c,p)}return i}function jF(n){return n.replace(/[a-z][A-Z]/g,i=>i.charAt(0)+"-"+i.charAt(1)).toLowerCase()}function gq(n){let i=new Map;for(let e of n.units)for(let t of e.create)fm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.create)if(t.kind===V.ExtractedAttribute&&t.bindingKind===jt.Attribute&&CF(t.expression)){let o=i.get(t.target);if(o!==void 0&&(o.kind===V.Template||o.kind===V.ConditionalCreate||o.kind===V.ConditionalBranchCreate)&&o.templateKind===ns.Structural)continue;if(t.name==="style"){let r=fq(t.expression.value);for(let a=0;a{if(!(!(r instanceof bd)||r.name!==null)){if(!t.has(r.xref))throw new Error(`Variable ${r.xref} not yet named`);r.name=t.get(r.xref)}})}function vq(n,i){if(n.name===null)switch(n.kind){case Wr.Context:n.name=`ctx_r${i.index++}`;break;case Wr.Identifier:let e=n.identifier===Ps?"i":"";n.name=`${n.identifier}_${e}r${++i.index}`;break;default:n.name=`_r${++i.index}`;break}return n.name}function Cq(n){return n.startsWith("--")?n:jF(n)}function nN(n){let i=n.indexOf("!important");return i>-1?n.substring(0,i):n}function bq(n){for(let i of n.units){for(let e of i.functions)Sk(e.ops);for(let e of i.create)(e.kind===V.Listener||e.kind===V.Animation||e.kind===V.AnimationListener||e.kind===V.TwoWayListener)&&Sk(e.handlerOps);Sk(i.update)}}function Sk(n){for(let i of n){if(i.kind!==V.Statement||!(i.statement instanceof sa)||!(i.statement.expr instanceof P1))continue;let e=i.statement.expr.steps,t=!0;for(let o=i.next;o.kind!==V.ListEnd&&t;o=o.next)mr(o,(r,a)=>{if(!Ec(r))return r;if(t&&!(a&Wn.InChildOperation))switch(r.kind){case Qt.NextContext:r.steps+=e,qe.remove(i),t=!1;break;case Qt.GetCurrentView:case Qt.Reference:case Qt.ContextLetReference:t=!1;break}})}}var xq="ng-container";function yq(n){for(let i of n.units){let e=new Set;for(let t of i.create)t.kind===V.ElementStart&&t.tag===xq&&(t.kind=V.ContainerStart,e.add(t.xref)),t.kind===V.ElementEnd&&e.has(t.xref)&&(t.kind=V.ContainerEnd)}}function Sq(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an element-like target.");return e}function wq(n){let i=new Map;for(let e of n.units)for(let t of e.create)fm(t)&&i.set(t.xref,t);for(let e of n.units)for(let t of e.create)(t.kind===V.ElementStart||t.kind===V.ContainerStart)&&t.nonBindable&&qe.insertAfter(MU(t.xref),t),(t.kind===V.ElementEnd||t.kind===V.ContainerEnd)&&Sq(i,t.xref).nonBindable&&qe.insertBefore(kU(t.xref),t)}function vc(n){return i=>i.kind===n}function i_(n,i){return e=>e.kind===n&&i===e.expression instanceof Qo}function Mq(n){return n.kind===V.Listener&&!(n.hostListener&&n.isLegacyAnimationListener)||n.kind===V.TwoWayListener||n.kind===V.Animation||n.kind===V.AnimationListener}function kq(n){return(n.kind===V.Property||n.kind===V.TwoWayProperty)&&!(n.expression instanceof Qo)}var Tq=[{test:n=>n.kind===V.Listener&&n.hostListener&&n.isLegacyAnimationListener},{test:Mq}],Eq=[{test:vc(V.StyleMap),transform:q1},{test:vc(V.ClassMap),transform:q1},{test:vc(V.StyleProp)},{test:vc(V.ClassProp)},{test:i_(V.Attribute,!0)},{test:i_(V.Property,!0)},{test:kq},{test:i_(V.Attribute,!1)},{test:vc(V.Control)}],Dq=[{test:i_(V.DomProperty,!0)},{test:i_(V.DomProperty,!1)},{test:vc(V.Attribute)},{test:vc(V.StyleMap),transform:q1},{test:vc(V.ClassMap),transform:q1},{test:vc(V.StyleProp)},{test:vc(V.ClassProp)}],iN=new Set([V.Listener,V.TwoWayListener,V.AnimationListener,V.StyleMap,V.ClassMap,V.StyleProp,V.ClassProp,V.Property,V.TwoWayProperty,V.DomProperty,V.Attribute,V.Animation,V.Control]);function Pq(n){for(let i of n.units){oN(i.create,Tq);let e=i.job.kind===Et.Host?Dq:Eq;oN(i.update,e)}}function oN(n,i){let e=[],t=null;for(let o of n){let r=H_(o)?o.target:null;(!iN.has(o.kind)||r!==t&&t!==null&&r!==null)&&(qe.insertBefore(rN(e,i),o),e=[],t=null),iN.has(o.kind)&&(e.push(o),qe.remove(o),t=r??t)}n.push(rN(e,i))}function rN(n,i){let e=Array.from(i,()=>new Array);for(let t of n){let o=i.findIndex(r=>r.test(t));e[o].push(t)}return e.flatMap((t,o)=>{let r=i[o].transform;return r?r(t):t})}function q1(n){return n.slice(n.length-1)}function Iq(n){for(let i of n.units){let e=EF(i);for(let t of i.ops())if(t.kind===V.Binding){let o=Oq(e,t.target);Aq(t.name)&&o.kind===V.Projection&&qe.remove(t)}}}function Aq(n){return n.toLowerCase()==="select"}function Oq(n,i){let e=n.get(i);if(e===void 0)throw new Error("All attributes should have an slottable target.");return e}function Nq(n){for(let i of n.units)Fq(i)}function Fq(n){for(let i of n.update)mr(i,(e,t)=>{if(!Ec(e)||e.kind!==Qt.PipeBinding)return;if(t&Wn.InChildOperation)throw new Error("AssertionError: pipe bindings should not appear in child expressions");if(i.target==null)throw new Error("AssertionError: expected slot handle to be assigned for pipe creation");Rq(n,i.target,e)})}function Rq(n,i,e){for(let t=n.create.head.next;t.kind!==V.ListEnd;t=t.next){if(!jh(t)||t.xref!==i)continue;for(;t.next.kind===V.Pipe;)t=t.next;let o=DU(e.target,e.targetSlot,e.name);qe.insertBefore(o,t.next);return}throw new Error(`AssertionError: unable to find insertion point for pipe ${e.name}`)}function Lq(n){for(let i of n.units)for(let e of i.update)Xo(e,t=>!(t instanceof Yp)||t.args.length<=4?t:new q_(t.target,t.targetSlot,t.name,Gi(t.args),t.args.length),Wn.None)}function Vq(n){$F(n.root,0)}function $F(n,i){let e=null;for(let t of n.create)switch(t.kind){case V.I18nStart:t.subTemplateIndex=i===0?null:i,e=t;break;case V.I18nEnd:e.subTemplateIndex===null&&(i=0),e=null;break;case V.ConditionalCreate:case V.ConditionalBranchCreate:case V.Template:i=NC(n.job.views.get(t.xref),e,t.i18nPlaceholder,i);break;case V.RepeaterCreate:let o=n.job.views.get(t.xref);i=NC(o,e,t.i18nPlaceholder,i),t.emptyView!==null&&(i=NC(n.job.views.get(t.emptyView),e,t.emptyI18nPlaceholder,i));break;case V.Projection:t.fallbackView!==null&&(i=NC(n.job.views.get(t.fallbackView),e,t.fallbackViewI18nPlaceholder,i));break}return i}function NC(n,i,e,t){if(e!==void 0){if(i===null)throw Error("Expected template with i18n placeholder to be in an i18n block.");t++,Bq(n,i)}return $F(n,t)}function Bq(n,i){if(n.create.head.next?.kind!==V.I18nStart){let e=n.job.allocateXrefId();qe.insertAfter(rb(e,i.message,i.root,null),n.create.head),qe.insertBefore(ab(e,null),n.create.tail)}}function zq(n){for(let i of n.units)for(let e of i.ops())mr(e,t=>{if(!(t instanceof Kp)||t.body===null)return;let o=new HT(t.args.length);t.fn=n.pool.getSharedConstant(o,t.body),t.body=null})}var HT=class extends h_{numArgs;constructor(i){super(),this.numArgs=i}keyOf(i){return i instanceof um?`param(${i.index})`:super.keyOf(i)}toSharedConstantDeclaration(i,e){let t=[];for(let r=0;rr instanceof um?Yn("a"+r.index):r,Wn.None);return new Rr(i,new eu(t,o),void 0,oa.Final)}};function jq(n){for(let i of n.units)for(let e of i.update)Xo(e,(t,o)=>o&Wn.InChildOperation?t:t instanceof wc?$q(t):t instanceof Rl?Hq(t):t,Wn.None)}function $q(n){let i=[],e=[];for(let t of n.entries){if(t instanceof $p){if(t.expression.isConstant())i.push(t);else{let o=e.length;e.push(t.expression),i.push(new $p(new um(o)))}continue}if(t.isConstant())i.push(t);else{let o=e.length;e.push(t),i.push(new um(o))}}return new Kp(Gi(i),e)}function Hq(n){let i=[],e=[];for(let t of n.entries){if(t instanceof rm){if(t.expression.isConstant())i.push(t);else{let o=e.length;e.push(t.expression),i.push(new rm(new um(o)))}continue}if(t.value.isConstant())i.push(t);else{let o=e.length;e.push(t.value),i.push(new xh(t.key,new um(o),t.quoted))}}return new Kp(new Rl(i),e)}function Uq(n){for(let i of n.units)for(let e of i.ops())Xo(e,t=>t instanceof bh&&(t.flags===null||!t.flags.includes("g"))?n.pool.getSharedConstant(new UT,t):t,Wn.None)}var UT=class extends h_{toSharedConstantDeclaration(i,e){return new Rr(i,e,void 0,oa.Final)}};function Gq(n,i,e,t,o){return vm(fe.element,n,i,e,t,o)}function Wq(n,i,e,t,o){return vm(fe.elementStart,n,i,e,t,o)}function vm(n,i,e,t,o,r){let a=[Te(i)];return e!==null&&a.push(Te(e)),o!==null?a.push(Te(t),Te(o)):t!==null&&a.push(Te(t)),yn(n,a,r)}function HF(n,i,e,t,o,r,a,c,p){let u=[Te(i),e,Te(t),Te(o),Te(r),Te(a)];for(c!==null&&(u.push(Te(c)),u.push(Ut(fe.templateRefExtractor)));u[u.length-1].isEquivalent(yh);)u.pop();return yn(n,u,p)}function TE(n,i,e,t,o){let r=[Te(i)];return e instanceof Qo?r.push($h(e,o)):r.push(e),t!==null&&r.push(t),yn(n,r,o)}function qq(n){return yn(fe.elementEnd,[],n)}function Qq(n,i,e,t){return vm(fe.elementContainerStart,n,null,i,e,t)}function Xq(n,i,e,t){return vm(fe.elementContainer,n,null,i,e,t)}function Kq(){return yn(fe.elementContainerEnd,[],null)}function Yq(n,i,e,t,o,r,a,c){return HF(fe.templateCreate,n,i,e,t,o,r,a,c)}function Zq(){return yn(fe.disableBindings,[],null)}function Jq(){return yn(fe.enableBindings,[],null)}function eQ(n,i,e,t,o){let r=[Te(n),i];return e!==null&&r.push(Ut(e)),yn(t?fe.syntheticHostListener:fe.listener,r,o)}function aN(n,i){return Ut(fe.twoWayBindingSet).callFn([n,i])}function tQ(n,i,e){return yn(fe.twoWayListener,[Te(n),i],e)}function nQ(n,i){return yn(fe.pipe,[Te(n),Te(i)],null)}function iQ(){return yn(fe.namespaceHTML,[],null)}function oQ(){return yn(fe.namespaceSVG,[],null)}function rQ(){return yn(fe.namespaceMathML,[],null)}function aQ(n,i){return yn(fe.advance,n>1?[Te(n)]:[],i)}function sQ(n){return Ut(fe.reference).callFn([Te(n)])}function lQ(n){return Ut(fe.nextContext).callFn(n===1?[]:[Te(n)])}function cQ(){return Ut(fe.getCurrentView).callFn([])}function dQ(n){return Ut(fe.restoreView).callFn([n])}function mQ(n){return Ut(fe.resetView).callFn([n])}function pQ(n,i,e){let t=[Te(n,null)];return i!==""&&t.push(Te(i)),yn(fe.text,t,e)}function uQ(n,i,e,t,o,r,a,c,p,u,h){let _=[Te(n),Te(i),e??Te(null),Te(t),Te(o),Te(r),a??Te(null),c??Te(null),p?Ut(fe.deferEnableTimerScheduling):Te(null),Te(h)],S;for(;(S=_[_.length-1])!==null&&S instanceof aa&&S.value===null;)_.pop();return yn(fe.defer,_,u)}var hQ=new Map([[Ji.Idle,{none:fe.deferOnIdle,prefetch:fe.deferPrefetchOnIdle,hydrate:fe.deferHydrateOnIdle}],[Ji.Immediate,{none:fe.deferOnImmediate,prefetch:fe.deferPrefetchOnImmediate,hydrate:fe.deferHydrateOnImmediate}],[Ji.Timer,{none:fe.deferOnTimer,prefetch:fe.deferPrefetchOnTimer,hydrate:fe.deferHydrateOnTimer}],[Ji.Hover,{none:fe.deferOnHover,prefetch:fe.deferPrefetchOnHover,hydrate:fe.deferHydrateOnHover}],[Ji.Interaction,{none:fe.deferOnInteraction,prefetch:fe.deferPrefetchOnInteraction,hydrate:fe.deferHydrateOnInteraction}],[Ji.Viewport,{none:fe.deferOnViewport,prefetch:fe.deferPrefetchOnViewport,hydrate:fe.deferHydrateOnViewport}],[Ji.Never,{none:fe.deferHydrateNever,prefetch:fe.deferHydrateNever,hydrate:fe.deferHydrateNever}]]);function fQ(n,i,e,t){let o=hQ.get(n)?.[e];if(o===void 0)throw new Error(`Unable to determine instruction for trigger ${n}`);return yn(o,i,t)}function gQ(n){return yn(fe.projectionDef,n?[n]:[],null)}function _Q(n,i,e,t,o,r,a){let c=[Te(n)];return(i!==0||e!==null||t!==null)&&(c.push(Te(i)),e!==null&&c.push(e),t!==null&&(e===null&&c.push(Te(null)),c.push(Yn(t),Te(o),Te(r)))),yn(fe.projection,c,a)}function vQ(n,i,e,t){let o=[Te(n),Te(i)];return e!==null&&o.push(Te(e)),yn(fe.i18nStart,o,t)}function CQ(n,i,e,t,o,r,a,c){let p=[Te(n),i,Te(e),Te(t),Te(o),Te(r)];for(a!==null&&(p.push(Te(a)),p.push(Ut(fe.templateRefExtractor)));p[p.length-1].isEquivalent(yh);)p.pop();return yn(fe.conditionalCreate,p,c)}function bQ(n,i,e,t,o,r,a,c){let p=[Te(n),i,Te(e),Te(t),Te(o),Te(r)];for(a!==null&&(p.push(Te(a)),p.push(Ut(fe.templateRefExtractor)));p[p.length-1].isEquivalent(yh);)p.pop();return yn(fe.conditionalBranchCreate,p,c)}function xQ(n,i,e,t,o,r,a,c,p,u,h,_,S,x){let b=[Te(n),Yn(i),Te(e),Te(t),Te(o),Te(r),a];return(c||p!==null)&&(b.push(Te(c)),p!==null&&(b.push(Yn(p),Te(u),Te(h)),(_!==null||S!==null)&&b.push(Te(_)),S!==null&&b.push(Te(S)))),yn(fe.repeaterCreate,b,x)}function yQ(n,i){return yn(fe.repeater,[n],i)}function SQ(n,i,e){return n==="prefetch"?yn(fe.deferPrefetchWhen,[i],e):n==="hydrate"?yn(fe.deferHydrateWhen,[i],e):yn(fe.deferWhen,[i],e)}function wQ(n,i){return yn(fe.declareLet,[Te(n)],i)}function MQ(n,i){return Ut(fe.storeLet).callFn([n],i)}function kQ(n){return Ut(fe.readContextLet).callFn([Te(n)])}function TQ(n,i,e,t){let o=[Te(n),Te(i)];return e&&o.push(Te(e)),yn(fe.i18n,o,t)}function EQ(n){return yn(fe.i18nEnd,[],n)}function DQ(n,i){let e=[Te(n),Te(i)];return yn(fe.i18nAttributes,e,null)}function PQ(n,i,e){return TE(fe.ariaProperty,n,i,null,e)}function IQ(n,i,e,t){return TE(fe.property,n,i,e,t)}function AQ(n){return yn(fe.control,[],n)}function OQ(n){return yn(fe.controlCreate,[],n)}function NQ(n,i,e,t){let o=[Te(n),i];return e!==null&&o.push(e),yn(fe.twoWayProperty,o,t)}function FQ(n,i,e,t,o){let r=[Te(n)];return i instanceof Qo?r.push($h(i,o)):r.push(i),(e!==null||t!==null)&&r.push(e??Te(null)),t!==null&&r.push(Te(t)),yn(fe.attribute,r,null)}function RQ(n,i,e,t){let o=[Te(n)];return i instanceof Qo?o.push($h(i,t)):o.push(i),e!==null&&o.push(Te(e)),yn(fe.styleProp,o,t)}function LQ(n,i,e){return yn(fe.classProp,[Te(n),i],e)}function VQ(n,i){let e=n instanceof Qo?$h(n,i):n;return yn(fe.styleMap,[e],i)}function BQ(n,i){let e=n instanceof Qo?$h(n,i):n;return yn(fe.classMap,[e],i)}function zQ(n,i,e,t,o){return vm(fe.domElement,n,i,e,t,o)}function jQ(n,i,e,t,o){return vm(fe.domElementStart,n,i,e,t,o)}function $Q(n){return yn(fe.domElementEnd,[],n)}function HQ(n,i,e,t){return vm(fe.domElementContainerStart,n,null,i,e,t)}function UQ(n,i,e,t){return vm(fe.domElementContainer,n,null,i,e,t)}function GQ(){return yn(fe.domElementContainerEnd,[],null)}function WQ(n,i,e,t){let o=[Te(n),i];return e!==null&&o.push(Ut(e)),yn(fe.domListener,o,t)}function qQ(n,i,e,t,o,r,a,c){return HF(fe.domTemplate,n,i,e,t,o,r,a,c)}var sN=[fe.pipeBind1,fe.pipeBind2,fe.pipeBind3,fe.pipeBind4];function QQ(n,i,e){if(e.length<1||e.length>sN.length)throw new Error("pipeBind() argument count out of bounds");let t=sN[e.length-1];return Ut(t).callFn([Te(n),Te(i),...e])}function XQ(n,i,e){return Ut(fe.pipeBindV).callFn([Te(n),Te(i),e])}function KQ(n,i,e){let t=UF(n,i);return mX(lX,[],t,e)}function YQ(n,i){return yn(fe.i18nExp,[n],i)}function ZQ(n,i){return yn(fe.i18nApply,[Te(n)],i)}function JQ(n,i,e,t){return TE(fe.domProperty,n,i,e,t)}function eX(n,i,e,t){let o=[i];e!==null&&o.push(e);let r=n==="enter"?fe.animationEnter:fe.animationLeave;return yn(r,o,t)}function tX(n,i,e,t){let r=[i instanceof Qo?$h(i,t):i];e!==null&&r.push(e);let a=n==="enter"?fe.animationEnter:fe.animationLeave;return yn(a,r,t)}function nX(n,i,e,t){let o=[i],r=n==="enter"?fe.animationEnterListener:fe.animationLeaveListener;return yn(r,o,t)}function iX(n,i,e){return yn(fe.syntheticHostProperty,[Te(n),i],e)}function oX(n,i,e){return EE(dX,[Te(n),i],e,null)}function rX(n,i){return yn(fe.attachSourceLocations,[Te(n),i],null)}function aX(n,i,e){return Ut(fe.arrowFunction).callFn([Te(n),i,e])}function UF(n,i){if(n.length<1||i.length!==n.length-1)throw new Error("AssertionError: expected specific shape of args for strings/expressions in interpolation");let e=[];if(i.length===1&&n[0]===""&&n[1]==="")e.push(i[0]);else{let t;for(t=0;t{if(n%2===0)throw new Error("Expected odd number of arguments");return(n-1)/2}},cX={constant:[fe.interpolate,fe.interpolate1,fe.interpolate2,fe.interpolate3,fe.interpolate4,fe.interpolate5,fe.interpolate6,fe.interpolate7,fe.interpolate8],variable:fe.interpolateV,mapping:n=>{if(n%2===0)throw new Error("Expected odd number of arguments");return(n-1)/2}},dX={constant:[fe.pureFunction0,fe.pureFunction1,fe.pureFunction2,fe.pureFunction3,fe.pureFunction4,fe.pureFunction5,fe.pureFunction6,fe.pureFunction7,fe.pureFunction8],variable:fe.pureFunctionV,mapping:n=>n};function EE(n,i,e,t){let o=n.mapping(e.length),r=e.at(-1);if(e.length>1&&r instanceof aa&&r.value===""&&e.pop(),oGF(n,t),Wn.None),e.kind){case V.Text:qe.replace(e,pQ(e.handle.slot,e.initialValue,e.sourceSpan));break;case V.ElementStart:qe.replace(e,n.job.mode===Za.DomOnly?jQ(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan):Wq(e.handle.slot,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case V.Element:qe.replace(e,n.job.mode===Za.DomOnly?zQ(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan):Gq(e.handle.slot,e.tag,e.attributes,e.localRefs,e.wholeSourceSpan));break;case V.ElementEnd:qe.replace(e,n.job.mode===Za.DomOnly?$Q(e.sourceSpan):qq(e.sourceSpan));break;case V.ContainerStart:qe.replace(e,n.job.mode===Za.DomOnly?HQ(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan):Qq(e.handle.slot,e.attributes,e.localRefs,e.startSourceSpan));break;case V.Container:qe.replace(e,n.job.mode===Za.DomOnly?UQ(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan):Xq(e.handle.slot,e.attributes,e.localRefs,e.wholeSourceSpan));break;case V.ContainerEnd:qe.replace(e,n.job.mode===Za.DomOnly?GQ():Kq());break;case V.I18nStart:qe.replace(e,vQ(e.handle.slot,e.messageIndex,e.subTemplateIndex,e.sourceSpan));break;case V.I18nEnd:qe.replace(e,EQ(e.sourceSpan));break;case V.I18n:qe.replace(e,TQ(e.handle.slot,e.messageIndex,e.subTemplateIndex,e.sourceSpan));break;case V.I18nAttributes:if(e.i18nAttributesConfig===null)throw new Error("AssertionError: i18nAttributesConfig was not set");qe.replace(e,DQ(e.handle.slot,e.i18nAttributesConfig));break;case V.Template:if(!(n instanceof el))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let t=n.job.views.get(e.xref);qe.replace(e,e.templateKind===ns.Block||n.job.mode===Za.DomOnly?qQ(e.handle.slot,Yn(t.fnName),t.decls,t.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan):Yq(e.handle.slot,Yn(t.fnName),t.decls,t.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case V.DisableBindings:qe.replace(e,Zq());break;case V.EnableBindings:qe.replace(e,Jq());break;case V.Pipe:qe.replace(e,nQ(e.handle.slot,e.name));break;case V.DeclareLet:qe.replace(e,wQ(e.handle.slot,e.sourceSpan));break;case V.AnimationString:qe.replace(e,tX(e.animationKind,e.expression,e.sanitizer,e.sourceSpan));break;case V.Animation:let o=FC(n,e.handlerFnName,e.handlerOps,!1);qe.replace(e,eX(e.animationKind,o,e.sanitizer,e.sourceSpan));break;case V.AnimationListener:let r=FC(n,e.handlerFnName,e.handlerOps,e.consumesDollarEvent);qe.replace(e,nX(e.animationKind,r,null,e.sourceSpan));break;case V.Listener:let a=FC(n,e.handlerFnName,e.handlerOps,e.consumesDollarEvent),c=e.eventTarget?pX.get(e.eventTarget):null;if(c===void 0)throw new Error(`Unexpected global target '${e.eventTarget}' defined for '${e.name}' event. Supported list of global targets: window,document,body.`);qe.replace(e,n.job.mode===Za.DomOnly&&!e.hostListener&&!e.isLegacyAnimationListener?WQ(e.name,a,c,e.sourceSpan):eQ(e.name,a,c,e.hostListener&&e.isLegacyAnimationListener,e.sourceSpan));break;case V.TwoWayListener:qe.replace(e,tQ(e.name,FC(n,e.handlerFnName,e.handlerOps,!0),e.sourceSpan));break;case V.Variable:if(e.variable.name===null)throw new Error(`AssertionError: unnamed variable ${e.xref}`);qe.replace(e,Is(new Rr(e.variable.name,e.initializer,void 0,oa.Final)));break;case V.Namespace:switch(e.active){case Ca.HTML:qe.replace(e,iQ());break;case Ca.SVG:qe.replace(e,oQ());break;case Ca.Math:qe.replace(e,rQ());break}break;case V.Defer:let p=!!e.loadingMinimumTime||!!e.loadingAfterTime||!!e.placeholderMinimumTime;qe.replace(e,uQ(e.handle.slot,e.mainSlot.slot,e.resolverFn,e.loadingSlot?.slot??null,e.placeholderSlot?.slot??null,e.errorSlot?.slot??null,e.loadingConfig,e.placeholderConfig,p,e.sourceSpan,e.flags));break;case V.DeferOn:let u=[];switch(e.trigger.kind){case Ji.Never:case Ji.Idle:case Ji.Immediate:break;case Ji.Timer:u=[Te(e.trigger.delay)];break;case Ji.Viewport:e.modifier==="hydrate"?u=e.trigger.options?[e.trigger.options]:[]:(u=[Te(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0?u.push(Te(e.trigger.targetSlotViewSteps)):e.trigger.options&&u.push(Te(null)),e.trigger.options&&u.push(e.trigger.options));break;case Ji.Interaction:case Ji.Hover:e.modifier==="hydrate"?u=[]:(u=[Te(e.trigger.targetSlot?.slot??null)],e.trigger.targetSlotViewSteps!==0&&u.push(Te(e.trigger.targetSlotViewSteps)));break;default:throw new Error(`AssertionError: Unsupported reification of defer trigger kind ${e.trigger.kind}`)}qe.replace(e,fQ(e.trigger.kind,u,e.modifier,e.sourceSpan));break;case V.ProjectionDef:qe.replace(e,gQ(e.def));break;case V.Projection:if(e.handle.slot===null)throw new Error("No slot was assigned for project instruction");let h=null,_=null,S=null;if(e.fallbackView!==null){if(!(n instanceof el))throw new Error("AssertionError: must be compiling a component");let D=n.job.views.get(e.fallbackView);if(D===void 0)throw new Error("AssertionError: projection had fallback view xref, but fallback view was not found");if(D.fnName===null||D.decls===null||D.vars===null)throw new Error("AssertionError: expected projection fallback view to have been named and counted");h=D.fnName,_=D.decls,S=D.vars}qe.replace(e,_Q(e.handle.slot,e.projectionSlotIndex,e.attributes,h,_,S,e.sourceSpan));break;case V.ConditionalCreate:if(!(n instanceof el))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let x=n.job.views.get(e.xref);qe.replace(e,CQ(e.handle.slot,Yn(x.fnName),x.decls,x.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case V.ConditionalBranchCreate:if(!(n instanceof el))throw new Error("AssertionError: must be compiling a component");if(Array.isArray(e.localRefs))throw new Error("AssertionError: local refs array should have been extracted into a constant");let b=n.job.views.get(e.xref);qe.replace(e,bQ(e.handle.slot,Yn(b.fnName),b.decls,b.vars,e.tag,e.attributes,e.localRefs,e.startSourceSpan));break;case V.RepeaterCreate:if(e.handle.slot===null)throw new Error("No slot was assigned for repeater instruction");if(!(n instanceof el))throw new Error("AssertionError: must be compiling a component");let M=n.job.views.get(e.xref);if(M.fnName===null)throw new Error("AssertionError: expected repeater primary view to have been named");let w=null,y=null,E=null;if(e.emptyView!==null){let D=n.job.views.get(e.emptyView);if(D===void 0)throw new Error("AssertionError: repeater had empty view xref, but empty view was not found");if(D.fnName===null||D.decls===null||D.vars===null)throw new Error("AssertionError: expected repeater empty view to have been named and counted");w=D.fnName,y=D.decls,E=D.vars}qe.replace(e,xQ(e.handle.slot,M.fnName,e.decls,e.vars,e.tag,e.attributes,vX(n,e),e.usesComponentInstance,w,y,E,e.emptyTag,e.emptyAttributes,e.wholeSourceSpan));break;case V.SourceLocation:let I=Gi(e.locations.map(({targetSlot:D,offset:N,line:P,column:L})=>{if(D.slot===null)throw new Error("No slot was assigned for source location");return Gi([Te(D.slot),Te(N),Te(P),Te(L)])}));qe.replace(e,rX(e.templatePath,I));break;case V.ControlCreate:qe.replace(e,OQ(e.sourceSpan));break;case V.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of create op ${V[e.kind]}`)}}function sb(n,i){for(let e of i)switch(Xo(e,t=>GF(n,t),Wn.None),e.kind){case V.Advance:qe.replace(e,aQ(e.delta,e.sourceSpan));break;case V.Property:qe.replace(e,n.job.mode===Za.DomOnly&&e.bindingKind!==jt.LegacyAnimation&&e.bindingKind!==jt.Animation?lN(e):gX(e));break;case V.Control:qe.replace(e,_X(e));break;case V.TwoWayProperty:qe.replace(e,NQ(e.name,e.expression,e.sanitizer,e.sourceSpan));break;case V.StyleProp:qe.replace(e,RQ(e.name,e.expression,e.unit,e.sourceSpan));break;case V.ClassProp:qe.replace(e,LQ(e.name,e.expression,e.sourceSpan));break;case V.StyleMap:qe.replace(e,VQ(e.expression,e.sourceSpan));break;case V.ClassMap:qe.replace(e,BQ(e.expression,e.sourceSpan));break;case V.I18nExpression:qe.replace(e,YQ(e.expression,e.sourceSpan));break;case V.I18nApply:qe.replace(e,ZQ(e.handle.slot,e.sourceSpan));break;case V.InterpolateText:qe.replace(e,KQ(e.interpolation.strings,e.interpolation.expressions,e.sourceSpan));break;case V.Attribute:qe.replace(e,FQ(e.name,e.expression,e.sanitizer,e.namespace,e.sourceSpan));break;case V.DomProperty:if(e.expression instanceof Qo)throw new Error("not yet handled");e.bindingKind===jt.LegacyAnimation||e.bindingKind===jt.Animation?qe.replace(e,iX(e.name,e.expression,e.sourceSpan)):qe.replace(e,lN(e));break;case V.Variable:if(e.variable.name===null)throw new Error(`AssertionError: unnamed variable ${e.xref}`);qe.replace(e,Is(new Rr(e.variable.name,e.initializer,void 0,oa.Final)));break;case V.Conditional:if(e.processed===null)throw new Error("Conditional test was not set.");qe.replace(e,sX(e.processed,e.contextValue,e.sourceSpan));break;case V.Repeater:qe.replace(e,yQ(e.collection,e.sourceSpan));break;case V.DeferWhen:qe.replace(e,SQ(e.modifier,e.expr,e.sourceSpan));break;case V.StoreLet:throw new Error(`AssertionError: unexpected storeLet ${e.declaredName}`);case V.Statement:break;default:throw new Error(`AssertionError: Unsupported reification of update op ${V[e.kind]}`)}}function lN(n){return JQ(uX.get(n.name)??n.name,n.expression,n.sanitizer,n.sourceSpan)}function gX(n){return DF(n.name)?PQ(n.name,n.expression,n.sourceSpan):IQ(n.name,n.expression,n.sanitizer,n.sourceSpan)}function _X(n){return AQ(n.sourceSpan)}function GF(n,i){if(!Ec(i))return i;switch(i.kind){case Qt.NextContext:return lQ(i.steps);case Qt.Reference:return sQ(i.targetSlot.slot+1+i.offset);case Qt.LexicalRead:throw new Error(`AssertionError: unresolved LexicalRead of ${i.name}`);case Qt.TwoWayBindingSet:throw new Error("AssertionError: unresolved TwoWayBindingSet");case Qt.RestoreView:if(typeof i.view=="number")throw new Error("AssertionError: unresolved RestoreView");return dQ(i.view);case Qt.ResetView:return mQ(i.expr);case Qt.GetCurrentView:return cQ();case Qt.ReadVariable:if(i.name===null)throw new Error(`Read of unnamed variable ${i.xref}`);return Yn(i.name);case Qt.ReadTemporaryExpr:if(i.name===null)throw new Error(`Read of unnamed temporary ${i.xref}`);return Yn(i.name);case Qt.AssignTemporaryExpr:if(i.name===null)throw new Error(`Assign of unnamed temporary ${i.xref}`);return Yn(i.name).set(i.expr);case Qt.PureFunctionExpr:if(i.fn===null)throw new Error("AssertionError: expected PureFunctions to have been extracted");return oX(i.varOffset,i.fn,i.args);case Qt.PureFunctionParameterExpr:throw new Error("AssertionError: expected PureFunctionParameterExpr to have been extracted");case Qt.PipeBinding:return QQ(i.targetSlot.slot,i.varOffset,i.args);case Qt.PipeBindingVariadic:return XQ(i.targetSlot.slot,i.varOffset,i.args);case Qt.SlotLiteralExpr:return Te(i.slot.slot);case Qt.ContextLetReference:return kQ(i.targetSlot.slot);case Qt.StoreLet:return MQ(i.value,i.sourceSpan);case Qt.TrackContext:return Yn("this");case Qt.ArrowFunction:if(i.varOffset===null)throw new Error("AssertionError: variable offset was not assigned to arrow function");return aX(i.varOffset,n.job.pool.getSharedFunctionReference(CX(n,i),"arrowFn"),Yn(Ps));default:throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${Qt[i.kind]}`)}}function FC(n,i,e,t){sb(n,e);let o=[];for(let a of e){if(a.kind!==V.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${V[a.kind]}`);o.push(a.statement)}let r=[];return t&&r.push(new br("$event",is)),am(r,o,void 0,void 0,i)}function vX(n,i){if(i.trackByFn!==null)return i.trackByFn;let e=[new br("$index",Bp),new br("$item",is)],t;if(i.trackByOps===null)t=i.usesComponentInstance?am(e,[new xr(i.track)]):Ds(e,i.track);else{sb(n,i.trackByOps);let o=[];for(let r of i.trackByOps){if(r.kind!==V.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${V[r.kind]}`);o.push(r.statement)}t=i.usesComponentInstance||o.length!==1||!(o[0]instanceof xr)?am(e,o):Ds(e,o[0].value)}return i.trackByFn=n.job.pool.getSharedFunctionReference(t,"_forTrack"),i.trackByFn}function CX(n,i){sb(n,i.ops);let e=[];for(let o of i.ops){if(o.kind!==V.Statement)throw new Error(`AssertionError: expected reified statements, but found op ${V[o.kind]}`);e.push(o.statement)}let t=e.length===1&&e[0]instanceof xr?e[0].value:e;return Ds([new br(i.contextName,is),new br(i.currentViewName,is)],Ds(i.parameters,t))}function bX(n){for(let i of n.units)for(let e of i.update)switch(e.kind){case V.Attribute:case V.Binding:case V.ClassProp:case V.ClassMap:case V.Property:case V.StyleProp:case V.StyleMap:e.expression instanceof Q_&&qe.remove(e);break}}function xX(n){for(let i of n.units)for(let e of i.create)switch(e.kind){case V.I18nContext:qe.remove(e);break;case V.I18nStart:e.context=null;break}}function yX(n){for(let i of n.units)for(let e of i.update){if(e.kind!==V.Variable||e.variable.kind!==Wr.Identifier||!(e.initializer instanceof U_))continue;let t=e.variable.identifier,o=e;for(;o&&o.kind!==V.ListEnd;)Xo(o,r=>r instanceof Ur&&r.name===t?Te(void 0):r,Wn.None),o=o.prev}}function SX(n){for(let i of n.units){let e=new Set;for(let t of i.update)t.kind===V.I18nExpression&&e.add(t.i18nOwner);for(let t of i.create)switch(t.kind){case V.I18nAttributes:if(e.has(t.xref))continue;qe.remove(t)}}}function wX(n){for(let i of n.units){for(let e of i.functions)o_(i,e.ops);o_(i,i.create),o_(i,i.update)}}function o_(n,i){let e=new Map;e.set(n.xref,Yn(Ps));for(let t of i)switch(t.kind){case V.Variable:t.variable.kind===Wr.Context&&e.set(t.variable.view,new bd(t.xref));break;case V.Animation:case V.AnimationListener:case V.Listener:case V.TwoWayListener:o_(n,t.handlerOps);break;case V.RepeaterCreate:t.trackByOps!==null&&o_(n,t.trackByOps);break}n===n.job.root&&e.set(n.xref,Yn(Ps));for(let t of i)Xo(t,o=>{if(o instanceof pm){if(!e.has(o.view))throw new Error(`No context found for reference to view ${o.view} from view ${n.xref}`);return e.get(o.view)}else return o},Wn.None)}function MX(n){for(let i of n.units)for(let e of i.create)if(e.kind===V.Defer){if(e.resolverFn!==null)continue;if(e.ownResolverFn!==null){if(e.handle.slot===null)throw new Error("AssertionError: slot must be assigned before extracting defer deps functions");let t=i.fnName?.replace("_Template","");e.resolverFn=n.pool.getSharedFunctionReference(e.ownResolverFn,`${t}_Defer_${e.handle.slot}_DepsFn`,!1)}}}function kX(n){for(let i of n.units)cN(i.create),cN(i.update)}function cN(n){for(let i of n)(i.kind===V.Listener||i.kind===V.TwoWayListener||i.kind===V.AnimationListener)&&Xo(i,e=>e instanceof Ur&&e.name==="$event"?((i.kind===V.Listener||i.kind===V.AnimationListener)&&(i.consumesDollarEvent=!0),new Nl(e.name)):e,Wn.InChildOperation)}function TX(n){let i=new Map,e=new Map;for(let t of n.units)for(let o of t.create)switch(o.kind){case V.I18nContext:i.set(o.xref,o);break;case V.ElementStart:e.set(o.xref,o);break}hc(n,n.root,i,e)}function hc(n,i,e,t,o){let r=null,a=new Map;for(let c of i.create)switch(c.kind){case V.I18nStart:if(!c.context)throw Error("Could not find i18n context for i18n op");r={i18nBlock:c,i18nContext:e.get(c.context)};break;case V.I18nEnd:r=null;break;case V.ElementStart:if(c.i18nPlaceholder!==void 0){if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");dN(c,r.i18nContext,r.i18nBlock,o),o&&c.i18nPlaceholder.closeName&&a.set(c.xref,o),o=void 0}break;case V.ElementEnd:let p=t.get(c.xref);if(p&&p.i18nPlaceholder!==void 0){if(r===null)throw Error("AssertionError: i18n tag placeholder should only occur inside an i18n block");mN(p,r.i18nContext,r.i18nBlock,a.get(c.xref)),a.delete(c.xref)}break;case V.Projection:if(c.i18nPlaceholder!==void 0){if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");dN(c,r.i18nContext,r.i18nBlock,o),mN(c,r.i18nContext,r.i18nBlock,o),o=void 0}if(c.fallbackView!==null){let S=n.views.get(c.fallbackView);if(c.fallbackViewI18nPlaceholder===void 0)hc(n,S,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");RC(n,S,c.handle.slot,c.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,o),hc(n,S,e,t),LC(n,S,c.handle.slot,c.fallbackViewI18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}}break;case V.ConditionalCreate:case V.ConditionalBranchCreate:case V.Template:let u=n.views.get(c.xref);if(c.i18nPlaceholder===void 0)hc(n,u,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");c.templateKind===ns.Structural?hc(n,u,e,t,c):(RC(n,u,c.handle.slot,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),hc(n,u,e,t),LC(n,u,c.handle.slot,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0)}break;case V.RepeaterCreate:if(o!==void 0)throw Error("AssertionError: Unexpected structural directive associated with @for block");let h=c.handle.slot+1,_=n.views.get(c.xref);if(c.i18nPlaceholder===void 0)hc(n,_,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");RC(n,_,h,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),hc(n,_,e,t),LC(n,_,h,c.i18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}if(c.emptyView!==null){let S=c.handle.slot+2,x=n.views.get(c.emptyView);if(c.emptyI18nPlaceholder===void 0)hc(n,x,e,t);else{if(r===null)throw Error("i18n tag placeholder should only occur inside an i18n block");RC(n,x,S,c.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,o),hc(n,x,e,t),LC(n,x,S,c.emptyI18nPlaceholder,r.i18nContext,r.i18nBlock,o),o=void 0}}break}}function dN(n,i,e,t){let{startName:o,closeName:r}=n.i18nPlaceholder,a=ao.ElementTag|ao.OpenTag,c=n.handle.slot;t!==void 0&&(a|=ao.TemplateTag,c={element:c,template:t.handle.slot}),r||(a|=ao.CloseTag),Lh(i.params,o,c,e.subTemplateIndex,a)}function mN(n,i,e,t){let{closeName:o}=n.i18nPlaceholder;if(o){let r=ao.ElementTag|ao.CloseTag,a=n.handle.slot;t!==void 0&&(r|=ao.TemplateTag,a={element:a,template:t.handle.slot}),Lh(i.params,o,a,e.subTemplateIndex,r)}}function RC(n,i,e,t,o,r,a){let{startName:c,closeName:p}=t,u=ao.TemplateTag|ao.OpenTag;p||(u|=ao.CloseTag),a!==void 0&&Lh(o.params,c,a.handle.slot,r.subTemplateIndex,u),Lh(o.params,c,e,WF(n,r,i),u)}function LC(n,i,e,t,o,r,a){let{closeName:c}=t,p=ao.TemplateTag|ao.CloseTag;c&&(Lh(o.params,c,e,WF(n,r,i),p),a!==void 0&&Lh(o.params,c,a.handle.slot,r.subTemplateIndex,p))}function WF(n,i,e){for(let t of e.create)if(t.kind===V.I18nStart)return t.subTemplateIndex;return i.subTemplateIndex}function Lh(n,i,e,t,o){let r=n.get(i)??[];r.push({value:e,subTemplateIndex:t,flags:o}),n.set(i,r)}function EX(n){let i=new Map,e=new Map,t=new Map;for(let a of n.units)for(let c of a.create)switch(c.kind){case V.I18nStart:i.set(c.xref,c.subTemplateIndex);break;case V.I18nContext:e.set(c.xref,c);break;case V.IcuPlaceholder:t.set(c.xref,c);break}let o=new Map,r=a=>a.usage===zh.I18nText?a.i18nOwner:a.context;for(let a of n.units)for(let c of a.update)if(c.kind===V.I18nExpression){let p=o.get(r(c))||0,u=i.get(c.i18nOwner)??null,h={value:p,subTemplateIndex:u,flags:ao.ExpressionIndex};DX(c,h,e,t),o.set(r(c),p+1)}}function DX(n,i,e,t){if(n.i18nPlaceholder!==null){let o=e.get(n.context),r=n.resolutionTime===$_.Creation?o.params:o.postprocessingParams,a=r.get(n.i18nPlaceholder)||[];a.push(i),r.set(n.i18nPlaceholder,a)}n.icuPlaceholder!==null&&t.get(n.icuPlaceholder)?.expressionPlaceholders.push(i)}function PX(n){for(let i of n.units){for(let e of i.functions)r_(i,e.ops,null);r_(i,i.create,null),r_(i,i.update,null)}}function r_(n,i,e){let t=new Map,o=new Map;for(let r of i)switch(r.kind){case V.Variable:switch(r.variable.kind){case Wr.Identifier:if(r.variable.local){if(o.has(r.variable.identifier))continue;o.set(r.variable.identifier,r.xref)}else if(t.has(r.variable.identifier))continue;t.set(r.variable.identifier,r.xref);break;case Wr.Alias:if(t.has(r.variable.identifier))continue;t.set(r.variable.identifier,r.xref);break;case Wr.SavedView:e={view:r.variable.view,variable:r.xref};break}break;case V.Animation:case V.AnimationListener:case V.Listener:case V.TwoWayListener:r_(n,r.handlerOps,e);break;case V.RepeaterCreate:r.trackByOps!==null&&r_(n,r.trackByOps,e);break}for(let r of i)r.kind===V.Listener||r.kind===V.TwoWayListener||r.kind===V.Animation||r.kind===V.AnimationListener||Xo(r,a=>{if(a instanceof Ur)return o.has(a.name)?new bd(o.get(a.name)):t.has(a.name)?new bd(t.get(a.name)):new Es(new pm(n.job.root.xref),a.name);if(a instanceof W_&&typeof a.view=="number"){if(e===null||e.view!==a.view)throw new Error(`AssertionError: no saved view ${a.view} from view ${n.xref}`);return a.view=new bd(e.variable),a}else return a},Wn.None);for(let r of i)mr(r,a=>{if(a instanceof Ur)throw new Error(`AssertionError: no lexical reads should remain, but found read of ${a.name}`)})}var IX=new Map([[eo.HTML,fe.sanitizeHtml],[eo.RESOURCE_URL,fe.sanitizeResourceUrl],[eo.SCRIPT,fe.sanitizeScript],[eo.STYLE,fe.sanitizeStyle],[eo.URL,fe.sanitizeUrl],[eo.ATTRIBUTE_NO_BINDING,fe.validateAttribute]]),AX=new Map([[eo.HTML,fe.trustConstantHtml],[eo.RESOURCE_URL,fe.trustConstantResourceUrl]]);function OX(n){for(let i of n.units){if(n.kind!==Et.Host){for(let e of i.create)if(e.kind===V.ExtractedAttribute){let t=AX.get(pN(e.securityContext))??null;e.trustedValueFn=t!==null?Ut(t):null}}for(let e of i.update)switch(e.kind){case V.Property:case V.Attribute:case V.DomProperty:let t=null;Array.isArray(e.securityContext)&&e.securityContext.length===2&&e.securityContext.includes(eo.URL)&&e.securityContext.includes(eo.RESOURCE_URL)?t=fe.sanitizeUrlOrResourceUrl:t=IX.get(pN(e.securityContext))??null,e.sanitizer=t!==null?Ut(t):null;break}}}function pN(n){if(Array.isArray(n)){if(n.length>1)throw Error("AssertionError: Ambiguous security context");return n[0]||eo.NONE}return n}function NX(n){for(let i of n.units){for(let e of i.functions)uN(n,i,e.ops)&&hN(i,e.ops,Yn(e.currentViewName));i.create.prepend([tm(i.job.allocateXrefId(),{kind:Wr.SavedView,name:null,view:i.xref},new vT,Zs.None)]);for(let e of i.create)(e.kind===V.Listener||e.kind===V.TwoWayListener||e.kind===V.Animation||e.kind===V.AnimationListener)&&uN(n,i,e.handlerOps)&&hN(i,e.handlerOps,i.xref)}}function uN(n,i,e){let t=i!==n.root;if(!t)for(let o of e)mr(o,r=>{(r instanceof D1||r instanceof G_)&&(t=!0)});return t}function hN(n,i,e){i.prepend([tm(n.job.allocateXrefId(),{kind:Wr.Context,name:null,view:n.xref},new W_(e),Zs.None)]);for(let t of i)t.kind===V.Statement&&t.statement instanceof xr&&(t.statement.value=new I1(t.statement.value))}function FX(n){let i=new Map;for(let e of n.units){let t=0;for(let o of e.create)jh(o)&&(o.handle.slot=t,i.set(o.xref,o.handle.slot),t+=o.numSlotsUsed);e.decls=t}for(let e of n.units)for(let t of e.ops())if(t.kind===V.Template||t.kind===V.ConditionalCreate||t.kind===V.ConditionalBranchCreate||t.kind===V.RepeaterCreate){let o=n.views.get(t.xref);t.decls=o.decls}}function RX(n){let i=new Set,e=new Map;for(let t of n.units)for(let o of t.ops())o.kind===V.DeclareLet&&e.set(o.xref,o),mr(o,r=>{r instanceof G_&&i.add(r.target)});for(let t of n.units)for(let o of t.update)Xo(o,r=>r instanceof U_&&!i.has(r.target)?(LX(r)||qe.remove(e.get(r.target)),r.value):r,Wn.None)}function LX(n){let i=!1;return Vt(n,e=>((e instanceof Yp||e instanceof q_)&&(i=!0),e),Wn.None),i}function VX(n){let i=new Set;for(let e of n.units)for(let t of e.ops())mr(t,o=>{if(o instanceof gi)switch(o.operator){case st.Exponentiation:BX(o,i);break;case st.NullishCoalesce:zX(o,i);break;case st.And:case st.Or:jX(o,i)}});for(let e of n.units)for(let t of e.ops())Xo(t,o=>o instanceof Fl?i.has(o)?o:o.expr:o,Wn.None)}function BX(n,i){n.lhs instanceof Fl&&n.lhs.expr instanceof jp&&i.add(n.lhs)}function zX(n,i){n.lhs instanceof Fl&&(fN(n.lhs.expr)||n.lhs.expr instanceof Sc)&&i.add(n.lhs),n.rhs instanceof Fl&&(fN(n.rhs.expr)||n.rhs.expr instanceof Sc)&&i.add(n.rhs)}function jX(n,i){n.lhs instanceof Fl&&n.lhs.expr instanceof gi&&n.lhs.expr.operator===st.NullishCoalesce&&i.add(n.lhs)}function fN(n){return n instanceof gi&&(n.operator===st.And||n.operator===st.Or)}function $X(n){for(let i of n.units)for(let e of i.update)if(e.kind===V.Binding)switch(e.bindingKind){case jt.ClassName:if(e.expression instanceof Qo)throw new Error("Unexpected interpolation in ClassName binding");qe.replace(e,pU(e.target,e.name,e.expression,e.sourceSpan));break;case jt.StyleProperty:qe.replace(e,mU(e.target,e.name,e.expression,e.unit,e.sourceSpan));break;case jt.Property:case jt.Template:e.name==="style"?qe.replace(e,uU(e.target,e.expression,e.sourceSpan)):e.name==="class"&&qe.replace(e,hU(e.target,e.expression,e.sourceSpan));break}}function HX(n){for(let i of n.units){i.create.prepend(a_(i.create)),i.update.prepend(a_(i.update));for(let e of i.functions)e.ops.prepend(a_(e.ops))}}function a_(n){let i=0,e=[];for(let t of n){let o=new Map;mr(t,(u,h)=>{h&Wn.InChildOperation||u instanceof hm&&o.set(u.xref,u)});let r=0,a=new Set,c=new Set,p=new Map;mr(t,(u,h)=>{h&Wn.InChildOperation||(u instanceof Dc?(a.has(u.xref)||(a.add(u.xref),p.set(u.xref,`tmp_${i}_${r++}`)),gN(p,u)):u instanceof hm&&(o.get(u.xref)===u&&(c.add(u.xref),r--),gN(p,u)))}),e.push(...Array.from(new Set(p.values())).map(u=>Is(new Rr(u)))),i++,t.kind===V.Listener||t.kind===V.Animation||t.kind===V.AnimationListener||t.kind===V.TwoWayListener?t.handlerOps.prepend(a_(t.handlerOps)):t.kind===V.RepeaterCreate&&t.trackByOps!==null&&t.trackByOps.prepend(a_(t.trackByOps))}return e}function gN(n,i){let e=n.get(i.xref);if(e===void 0)throw new Error(`Found xref with unassigned name: ${i.xref}`);i.name=e}function UX(n){for(let i of n.units)for(let e of i.create)if(e.kind===V.RepeaterCreate)if(e.track instanceof Nl&&e.track.name==="$index")e.trackByFn=Ut(fe.repeaterTrackByIndex);else if(e.track instanceof Nl&&e.track.name==="$item")e.trackByFn=Ut(fe.repeaterTrackByIdentity);else if(GX(n.root.xref,e.track))e.usesComponentInstance=!0,e.track.receiver.receiver.view===i.xref?e.trackByFn=e.track.receiver:(e.trackByFn=Ut(fe.componentInstance).callFn([]).prop(e.track.receiver.name),e.track=e.trackByFn);else{e.track=Vt(e.track,o=>{if(o instanceof Yp||o instanceof q_)throw new Error("Illegal State: Pipes are not allowed in this context");return o instanceof pm?(e.usesComponentInstance=!0,new _T(o.view)):o},Wn.None);let t=new qe;t.push(Is(new xr(e.track,e.track.sourceSpan))),e.trackByOps=t}}function GX(n,i){if(!(i instanceof os)||i.args.length===0||i.args.length>2||!(i.receiver instanceof Es&&i.receiver.receiver instanceof pm)||i.receiver.receiver.view!==n)return!1;let[e,t]=i.args;return!(e instanceof Nl)||e.name!=="$index"?!1:i.args.length===1?!0:!(!(t instanceof Nl)||t.name!=="$item")}function WX(n){for(let i of n.units)for(let e of i.create)e.kind===V.RepeaterCreate&&(e.track=Vt(e.track,t=>{if(t instanceof Ur){if(e.varNames.$index.has(t.name))return Yn("$index");if(t.name===e.varNames.$implicit)return Yn("$item")}return t},Wn.None))}function qX(n){for(let i of n.units)for(let e of i.create)e.kind===V.TwoWayListener&&Xo(e,t=>{if(!(t instanceof A1))return t;let{target:o,value:r}=t;if(o instanceof Es||o instanceof xd)return aN(o,r).or(o.set(r));if(o instanceof bd)return aN(o,r);throw new Error("Unsupported expression in two-way action binding.")},Wn.InChildOperation)}function QX(n){for(let i of n.units){let e=0;for(let r of i.ops())vk(r)&&(e+=XX(r));let t=r=>{Ec(r)&&(r instanceof Kp||(y5(r)&&(r.varOffset=e),vk(r)&&(e+=_N(r))))},o=r=>{!Ec(r)||!(r instanceof Kp)||(y5(r)&&(r.varOffset=e),vk(r)&&(e+=_N(r)))};for(let r of i.create)mr(r,t);for(let r of i.update)mr(r,t);for(let r of i.create)mr(r,o);for(let r of i.update)mr(r,o);i.vars=e}if(n instanceof K_)for(let i of n.units)for(let e of i.create){if(e.kind!==V.Template&&e.kind!==V.RepeaterCreate&&e.kind!==V.ConditionalCreate&&e.kind!==V.ConditionalBranchCreate)continue;let t=n.views.get(e.xref);e.vars=t.vars}}function XX(n){let i;switch(n.kind){case V.Attribute:return i=1,n.expression instanceof Qo&&!KX(n.expression)&&(i+=n.expression.expressions.length),i;case V.Property:case V.DomProperty:return i=1,n.expression instanceof Qo&&(i+=n.expression.expressions.length),i;case V.Control:return 2;case V.TwoWayProperty:return 1;case V.StyleProp:case V.ClassProp:case V.StyleMap:case V.ClassMap:return i=2,n.expression instanceof Qo&&(i+=n.expression.expressions.length),i;case V.InterpolateText:return n.interpolation.expressions.length;case V.I18nExpression:case V.Conditional:case V.DeferWhen:case V.StoreLet:return 1;case V.RepeaterCreate:return n.emptyView?1:0;default:throw new Error(`Unhandled op: ${V[n.kind]}`)}}function _N(n){switch(n.kind){case Qt.PureFunctionExpr:return 1+n.args.length;case Qt.PipeBinding:return 1+n.args.length;case Qt.PipeBindingVariadic:return 1+n.numArgs;case Qt.StoreLet:case Qt.ArrowFunction:return 1;default:throw new Error(`AssertionError: unhandled ConsumesVarsTrait expression ${n.constructor.name}`)}}function KX(n){return!(n.expressions.length!==1||n.strings.length!==2||n.strings[0]!==""||n.strings[1]!=="")}function YX(n){for(let i of n.units){for(let e of i.functions)Ug(e.ops);Ug(i.create),Ug(i.update);for(let e of i.create)e.kind===V.Listener||e.kind===V.Animation||e.kind===V.AnimationListener||e.kind===V.TwoWayListener?Ug(e.handlerOps):e.kind===V.RepeaterCreate&&e.trackByOps!==null&&Ug(e.trackByOps);for(let e of i.functions)Gg(e.ops,null),vN(e.ops);for(let e of i.create)e.kind===V.Listener||e.kind===V.Animation||e.kind===V.AnimationListener||e.kind===V.TwoWayListener?(Gg(e.handlerOps,VC),vN(e.handlerOps)):e.kind===V.RepeaterCreate&&e.trackByOps!==null&&Gg(e.trackByOps,VC);Gg(i.create,VC),Gg(i.update,VC)}}var Fr=(function(n){return n[n.None=0]="None",n[n.ViewContextRead=1]="ViewContextRead",n[n.ViewContextWrite=2]="ViewContextWrite",n[n.SideEffectful=4]="SideEffectful",n})(Fr||{});function VC(n){return!(n&Wn.InArrowFunctionOperation)}function Ug(n){let i=new Map;for(let e of n)e.kind===V.Variable&&e.flags&Zs.AlwaysInline&&(mr(e,t=>{if(Ec(t)&&DE(t)!==Fr.None)throw new Error("AssertionError: A context-sensitive variable was marked AlwaysInline")}),i.set(e.xref,e)),Xo(e,t=>t instanceof bd&&i.has(t.xref)?i.get(t.xref).initializer.clone():t,Wn.None);for(let e of i.values())qe.remove(e)}function Gg(n,i){let e=new Map,t=new Map,o=new Set,r=new Map;for(let u of n){if(u.kind===V.Variable){if(e.has(u.xref)||t.has(u.xref))throw new Error(`Should not see two declarations of the same variable: ${u.xref}`);e.set(u.xref,u),t.set(u.xref,0)}r.set(u,ZX(u,i)),JX(u,t,o,i)}let a=!1;for(let u of n.reversed()){let h=r.get(u);if(u.kind===V.Variable&&t.get(u.xref)===0){if(a&&h.fences&Fr.ViewContextWrite||h.fences&Fr.SideEffectful){let _=Is(u.initializer.toStmt());r.set(_,h),qe.replace(u,_)}else eK(u,t),qe.remove(u);r.delete(u),e.delete(u.xref),t.delete(u.xref);continue}h.fences&Fr.ViewContextRead&&(a=!0)}let c=[];for(let[u,h]of t){let S=!!(e.get(u).flags&Zs.AlwaysInline);h!==1||S||o.has(u)||c.push(u)}let p;for(;p=c.pop();){let u=e.get(p),h=r.get(u);if(!!(u.flags&Zs.AlwaysInline))throw new Error("AssertionError: Found an 'AlwaysInline' variable after the always inlining pass.");for(let S=u.next;S.kind!==V.ListEnd;S=S.next){let x=r.get(S);if(x.variablesUsed.has(p)){if(!nK(u,S))break;if(tK(p,u.initializer,S,h.fences)){x.variablesUsed.delete(p);for(let b of h.variablesUsed)x.variablesUsed.add(b);x.fences|=h.fences,e.delete(p),t.delete(p),r.delete(u),qe.remove(u)}break}if(!qF(x.fences,h.fences))break}}}function DE(n){switch(n.kind){case Qt.NextContext:return Fr.ViewContextRead|Fr.ViewContextWrite;case Qt.RestoreView:return Fr.ViewContextRead|Fr.ViewContextWrite|Fr.SideEffectful;case Qt.StoreLet:return Fr.SideEffectful;case Qt.Reference:case Qt.ContextLetReference:return Fr.ViewContextRead;default:return Fr.None}}function ZX(n,i){let e=Fr.None,t=new Set;return mr(n,(o,r)=>{!Ec(o)||i!==null&&!i(r)||(o.kind===Qt.ReadVariable?t.add(o.xref):e|=DE(o))}),{fences:e,variablesUsed:t}}function JX(n,i,e,t){mr(n,(o,r)=>{if(!Ec(o)||t!==null&&!t(r)||o.kind!==Qt.ReadVariable)return;let a=i.get(o.xref);a!==void 0&&(i.set(o.xref,a+1),r&Wn.InChildOperation&&e.add(o.xref))})}function eK(n,i){mr(n,e=>{if(!Ec(e)||e.kind!==Qt.ReadVariable)return;let t=i.get(e.xref);if(t!==void 0){if(t===0)throw new Error(`Inaccurate variable count: ${e.xref} - found another read but count is already 0`);i.set(e.xref,t-1)}})}function qF(n,i){if(n&Fr.ViewContextWrite){if(i&Fr.ViewContextRead)return!1}else if(n&Fr.ViewContextRead&&i&Fr.ViewContextWrite)return!1;return!0}function tK(n,i,e,t){let o=!1,r=!0;return Xo(e,(a,c)=>{if(!Ec(a)||o||!r)return a;if(c&Wn.InChildOperation&&t&Fr.ViewContextRead)return a;switch(a.kind){case Qt.ReadVariable:if(a.xref===n)return o=!0,i;break;default:let p=DE(a);r=r&&qF(p,t);break}return a},Wn.None),o}function nK(n,i){switch(n.variable.kind){case Wr.Identifier:return n.initializer instanceof Nl&&n.initializer.name===Ps;case Wr.Context:return i.kind===V.Variable;default:return!0}}function vN(n){let i=n.head.next,e=n.tail.prev;i!==null&&e!==null&&i.next===e&&i.kind===V.Statement&&i.statement instanceof sa&&i.statement.expr instanceof W_&&e.kind===V.Statement&&e.statement instanceof xr&&e.statement.value instanceof I1&&(qe.remove(i),e.statement.value=e.statement.value.expr)}function iK(n){for(let i of n.units){let e=null,t=null;for(let o of i.create)switch(o.kind){case V.I18nStart:e=o;break;case V.I18nEnd:e=null;break;case V.IcuStart:e===null&&(t=n.allocateXrefId(),qe.insertBefore(rb(t,o.message,void 0,null),o));break;case V.IcuEnd:t!==null&&(qe.insertAfter(ab(t,null),o),t=null);break}}}function oK(n){for(let i of n.units){for(let e of i.create)e.kind!==V.Animation&&e.kind!==V.AnimationListener&&e.kind!==V.Listener&&e.kind!==V.TwoWayListener&&CN(i,e);for(let e of i.update)CN(i,e)}}function CN(n,i){Xo(i,(e,t)=>{if(!(e instanceof eu)||t&Wn.InChildOperation)return e;if(Array.isArray(e.body))throw new Error("AssertionError: unexpected multi-line arrow function");let o=new CT(e.params,e.body);return n.functions.add(o),o},Wn.None)}var rK=new Set(["formField"]);function aK(n){for(let i of n.units)sK(i)}function sK(n){for(let i of n.update)i.kind===V.Property&&rK.has(i.name)&&mK(n,i)}var lK=new Set([V.Container,V.ContainerStart,V.ContainerEnd,V.Element,V.ElementStart,V.ElementEnd,V.Template]);function cK(n){return lK.has(n.kind)}function dK(n,i){let e=null;for(let t of n.create)!cK(t)||t.xref!==i||(e=t);return e}function mK(n,i){let e=dK(n,i.target);if(e===null)throw new Error(`No create instruction found for control target ${i.target}`);let t=zU(i.sourceSpan);qe.insertAfter(t,e),qe.insertAfter(bU(i.target,i.sourceSpan),i)}var pK=[{kind:Et.Tmpl,fn:Iq},{kind:Et.Both,fn:Uq},{kind:Et.Host,fn:UG},{kind:Et.Tmpl,fn:hq},{kind:Et.Tmpl,fn:Vq},{kind:Et.Tmpl,fn:iK},{kind:Et.Both,fn:pG},{kind:Et.Both,fn:$X},{kind:Et.Both,fn:YU},{kind:Et.Tmpl,fn:aK},{kind:Et.Both,fn:lG},{kind:Et.Both,fn:QU},{kind:Et.Tmpl,fn:mG},{kind:Et.Both,fn:gq},{kind:Et.Tmpl,fn:bX},{kind:Et.Both,fn:eG},{kind:Et.Both,fn:Pq},{kind:Et.Tmpl,fn:tG},{kind:Et.Tmpl,fn:Nq},{kind:Et.Tmpl,fn:uG},{kind:Et.Tmpl,fn:Lq},{kind:Et.Both,fn:oK},{kind:Et.Both,fn:jq},{kind:Et.Tmpl,fn:zG},{kind:Et.Tmpl,fn:BG},{kind:Et.Tmpl,fn:jG},{kind:Et.Tmpl,fn:NX},{kind:Et.Both,fn:$U},{kind:Et.Both,fn:kX},{kind:Et.Tmpl,fn:WX},{kind:Et.Tmpl,fn:yX},{kind:Et.Both,fn:PX},{kind:Et.Tmpl,fn:hG},{kind:Et.Tmpl,fn:qX},{kind:Et.Tmpl,fn:UX},{kind:Et.Both,fn:wX},{kind:Et.Both,fn:OX},{kind:Et.Tmpl,fn:pq},{kind:Et.Both,fn:CG},{kind:Et.Both,fn:VX},{kind:Et.Both,fn:HX},{kind:Et.Both,fn:YX},{kind:Et.Both,fn:RX},{kind:Et.Tmpl,fn:mq},{kind:Et.Tmpl,fn:dG},{kind:Et.Tmpl,fn:SX},{kind:Et.Tmpl,fn:WU},{kind:Et.Tmpl,fn:UU},{kind:Et.Tmpl,fn:FX},{kind:Et.Tmpl,fn:TX},{kind:Et.Tmpl,fn:EX},{kind:Et.Tmpl,fn:NG},{kind:Et.Tmpl,fn:aq},{kind:Et.Tmpl,fn:$G},{kind:Et.Both,fn:rG},{kind:Et.Tmpl,fn:xX},{kind:Et.Both,fn:QX},{kind:Et.Tmpl,fn:VG},{kind:Et.Both,fn:_q},{kind:Et.Tmpl,fn:MX},{kind:Et.Tmpl,fn:bq},{kind:Et.Tmpl,fn:yq},{kind:Et.Tmpl,fn:vG},{kind:Et.Tmpl,fn:qU},{kind:Et.Tmpl,fn:wq},{kind:Et.Both,fn:zq},{kind:Et.Both,fn:hX},{kind:Et.Both,fn:JU}];function QF(n,i){for(let e of pK)(e.kind===i||e.kind===Et.Both)&&e.fn(n)}function uK(n,i){let e=KF(n.root);return XF(n.root,i),e}function XF(n,i){for(let e of n.job.units){if(e.parent!==n.xref)continue;XF(e,i);let t=KF(e);i.statements.push(t.toDeclStmt(t.name))}}function KF(n){if(n.fnName===null)throw new Error(`AssertionError: view ${n.xref} is unnamed`);let i=[];for(let r of n.create){if(r.kind!==V.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${V[r.kind]}`);i.push(r.statement)}let e=[];for(let r of n.update){if(r.kind!==V.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${V[r.kind]}`);e.push(r.statement)}let t=Q1(1,i),o=Q1(2,e);return am([new br(Vh,Bp),new br(Ps,is)],[...t,...o],void 0,void 0,n.fnName)}function Q1(n,i){return i.length===0?[]:[tb(new gi(st.BitwiseAnd,Yn(Vh),Te(n)),i)]}function hK(n){if(n.root.fnName===null)throw new Error("AssertionError: host binding function is unnamed");let i=[];for(let r of n.root.create){if(r.kind!==V.Statement)throw new Error(`AssertionError: expected all create ops to have been compiled, but got ${V[r.kind]}`);i.push(r.statement)}let e=[];for(let r of n.root.update){if(r.kind!==V.Statement)throw new Error(`AssertionError: expected all update ops to have been compiled, but got ${V[r.kind]}`);e.push(r.statement)}if(i.length===0&&e.length===0)return null;let t=Q1(1,i),o=Q1(2,e);return am([new br(Vh,Bp),new br(Ps,is)],[...t,...o],void 0,void 0,n.root.fnName)}var Lp=new Rh,Vp="ng-template",fK="animate.";function WC(n){return n instanceof za}function gK(n){return WC(n)&&n.nodes.length===1&&n.nodes[0]instanceof y1}function _K(n,i,e,t,o,r,a,c,p,u){let h=new K_(n,e,t,o,r,a,c,p,u);return Sd(h.root,i),h}function vK(n,i,e){let t=new V1(n.componentName,e,Za.DomOnly);for(let o of n.properties??[]){let r=jt.Property;o.name.startsWith("attr.")&&(o.name=o.name.substring(5),r=jt.Attribute),o.isLegacyAnimation&&(r=jt.LegacyAnimation),o.isAnimation&&(r=jt.Animation);let a=i.calcPossibleSecurityContexts(n.componentSelector,o.name,r===jt.Attribute).filter(c=>c!==eo.NONE);CK(t,o,r,a)}for(let[o,r]of Object.entries(n.attributes)??[]){let a=i.calcPossibleSecurityContexts(n.componentSelector,o,!0).filter(c=>c!==eo.NONE);bK(t,o,r,a)}for(let o of n.events??[])xK(t,o);return t}function CK(n,i,e,t){let o,r=i.expression.ast;r instanceof a0?o=new Qo(r.strings,r.expressions.map(a=>Bn(a,n,i.sourceSpan)),[]):o=Bn(r,n,i.sourceSpan),n.root.update.push(Xp(n.root.xref,e,i.name,o,null,t,!1,!1,null,null,i.sourceSpan))}function bK(n,i,e,t){let o=Xp(n.root.xref,jt.Attribute,i,e,null,t,!0,!1,null,null,e.sourceSpan);n.root.update.push(o)}function xK(n,i){let e;if(i.type===Ba.Animation)e=wF(n.root.xref,new la,i.name,null,t0(n.root,i.handler,i.handlerSpan),i.name.endsWith("enter")?"enter":"leave",i.targetOrPhase,!0,i.sourceSpan);else{let[t,o]=i.type!==Ba.LegacyAnimation?[null,i.targetOrPhase]:[i.targetOrPhase,null];e=kE(n.root.xref,new la,i.name,null,t0(n.root,i.handler,i.handlerSpan),t,o,!0,i.sourceSpan)}n.root.create.push(e)}function Sd(n,i){for(let e of i)if(e instanceof kc)yK(n,e);else if(e instanceof ks)SK(n,e);else if(e instanceof Dh)wK(n,e);else if(e instanceof Dp)YF(n,e,null);else if(e instanceof kh)ZF(n,e,null);else if(e instanceof b1)MK(n,e);else if(e instanceof C1)kK(n,e);else if(e instanceof qp)TK(n,e);else if(e instanceof XN)DK(n,e);else if(e instanceof Eh)PK(n,e);else if(e instanceof gE)AK(n,e);else if(!(e instanceof e_))throw new Error(`Unsupported template node: ${e.constructor.name}`)}function yK(n,i){if(i.i18n!==void 0&&!(i.i18n instanceof za||i.i18n instanceof lm))throw Error(`Unhandled i18n metadata type for element: ${i.i18n.constructor.name}`);let e=n.job.allocateXrefId(),[t,o]=Ll(i.name),r=yU(o,e,PF(t),i.i18n instanceof lm?i.i18n:void 0,i.startSourceSpan,i.sourceSpan);n.create.push(r),NK(n,r,i),t6(r,i);let a=null;i.i18n instanceof za&&(a=n.job.allocateXrefId(),n.create.push(rb(a,i.i18n,void 0,i.startSourceSpan))),Sd(n,i.children);let c=wU(e,i.endSourceSpan??i.startSourceSpan);n.create.push(c),a!==null&&qe.insertBefore(ab(a,i.endSourceSpan??i.startSourceSpan),c)}function SK(n,i){if(i.i18n!==void 0&&!(i.i18n instanceof za||i.i18n instanceof lm))throw Error(`Unhandled i18n metadata type for template: ${i.i18n.constructor.name}`);let e=n.job.allocateView(n.xref),t=i.tagName,o="";i.tagName&&([o,t]=Ll(i.tagName));let r=i.i18n instanceof lm?i.i18n:void 0,a=PF(o),c=t===null?"":oG(t,a),p=OK(i)?ns.NgTemplate:ns.Structural,u=bF(e.xref,p,t,c,a,r,i.startSourceSpan,i.sourceSpan);n.create.push(u),FK(n,u,i,p),t6(u,i),Sd(e,i.children);for(let{name:h,value:_}of i.variables)e.contextVariables.set(h,_!==""?_:"$implicit");if(p===ns.NgTemplate&&i.i18n instanceof za){let h=n.job.allocateXrefId();qe.insertAfter(rb(h,i.i18n,void 0,i.startSourceSpan),e.create.head),qe.insertBefore(ab(h,i.endSourceSpan??i.startSourceSpan),e.create.tail)}}function wK(n,i){if(i.i18n!==void 0&&!(i.i18n instanceof lm))throw Error(`Unhandled i18n metadata type for element: ${i.i18n.constructor.name}`);let e=null;i.children.some(r=>!(r instanceof ib)&&(!(r instanceof Dp)||r.value.trim().length>0))&&(e=n.job.allocateView(n.xref),Sd(e,i.children));let t=n.job.allocateXrefId(),o=AU(t,i.selector,i.i18n,e?.xref??null,i.sourceSpan);for(let r of i.attributes){let a=Lp.securityContext(i.name,r.name,!0);n.update.push(Xp(o.xref,jt.Attribute,r.name,Te(r.value),null,a,!0,!1,null,vd(r.i18n),r.sourceSpan))}n.create.push(o)}function YF(n,i,e){n.create.push(SF(n.job.allocateXrefId(),i.value,e,i.sourceSpan))}function ZF(n,i,e){let t=i.value;if(t instanceof ts&&(t=t.ast),!(t instanceof a0))throw new Error(`AssertionError: expected Interpolation for BoundText node, got ${t.constructor.name}`);if(i.i18n!==void 0&&!(i.i18n instanceof Cd))throw Error(`Unhandled i18n metadata type for text interpolation: ${i.i18n?.constructor.name}`);let o=i.i18n instanceof Cd?i.i18n.children.filter(a=>a instanceof R_).map(a=>a.name):[];if(o.length>0&&o.length!==t.expressions.length)throw Error(`Unexpected number of i18n placeholders (${t.expressions.length}) for BoundText with ${t.expressions.length} expressions`);let r=n.job.allocateXrefId();n.create.push(SF(r,"",e,i.sourceSpan)),n.update.push(lU(r,new Qo(t.strings,t.expressions.map(a=>Bn(a,n.job,null)),o),i.sourceSpan))}function MK(n,i){let e=null,t=[];for(let o=0;oS.modifier==="none")||h.some(S=>S.modifier==="none")||u.push(Zd(c,{kind:Ji.Idle},"none",null)),n.create.push(u),n.update.push(h)}function EK(n){return Object.keys(n.hydrateTriggers).length>0?1:null}function wk(n,i,e,t,o,r){if(i.idle!==void 0){let a=Zd(r,{kind:Ji.Idle},n,i.idle.sourceSpan);e.push(a)}if(i.immediate!==void 0){let a=Zd(r,{kind:Ji.Immediate},n,i.immediate.sourceSpan);e.push(a)}if(i.timer!==void 0){let a=Zd(r,{kind:Ji.Timer,delay:i.timer.delay},n,i.timer.sourceSpan);e.push(a)}if(i.hover!==void 0){let a=Zd(r,{kind:Ji.Hover,targetName:i.hover.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},n,i.hover.sourceSpan);e.push(a)}if(i.interaction!==void 0){let a=Zd(r,{kind:Ji.Interaction,targetName:i.interaction.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null},n,i.interaction.sourceSpan);e.push(a)}if(i.viewport!==void 0){let a=Zd(r,{kind:Ji.Viewport,targetName:i.viewport.reference,targetXref:null,targetSlot:null,targetView:null,targetSlotViewSteps:null,options:i.viewport.options?Bn(i.viewport.options,o.job,i.viewport.sourceSpan):null},n,i.viewport.sourceSpan);e.push(a)}if(i.never!==void 0){let a=Zd(r,{kind:Ji.Never},n,i.never.sourceSpan);e.push(a)}if(i.when!==void 0){if(i.when.value instanceof a0)throw new Error("Unexpected interpolation in defer block when trigger");let a=_U(r,Bn(i.when.value,o.job,i.when.sourceSpan),n,i.when.sourceSpan);t.push(a)}}function DK(n,i){if(i.i18n instanceof za&&gK(i.i18n)){let e=n.job.allocateXrefId();n.create.push(RU(e,i.i18n,ZN(i.i18n).name,null));for(let[t,o]of Object.entries(K(K({},i.vars),i.placeholders)))o instanceof kh?ZF(n,o,t):YF(n,o,t);n.create.push(LU(e))}else throw Error(`Unhandled i18n metadata type for ICU: ${i.i18n?.constructor.name}`)}function PK(n,i){let e=n.job.allocateView(n.xref),t=`\u0275$index_${e.xref}`,o=`\u0275$count_${e.xref}`,r=new Set;e.contextVariables.set(i.item.name,i.item.value);for(let y of i.contextVariables)y.value==="$index"&&r.add(y.name),y.name==="$index"?e.contextVariables.set("$index",y.value).set(t,y.value):y.name==="$count"?e.contextVariables.set("$count",y.value).set(o,y.value):e.aliases.add({kind:Wr.Alias,name:null,identifier:y.name,expression:IK(y,t,o)});let a=Or(i.trackBy.span,i.sourceSpan),c=Bn(i.trackBy,n.job,a);Sd(e,i.children);let p=null,u=null;i.empty!==null&&(p=n.job.allocateView(n.xref),Sd(p,i.empty.children),u=X1(n,p.xref,i.empty));let h={$index:r,$implicit:i.item.name};if(i.i18n!==void 0&&!(i.i18n instanceof cm))throw Error("AssertionError: Unhandled i18n metadata type or @for");if(i.empty?.i18n!==void 0&&!(i.empty.i18n instanceof cm))throw Error("AssertionError: Unhandled i18n metadata type or @empty");let _=i.i18n,S=i.empty?.i18n,x=X1(n,e.xref,i),b=SU(e.xref,p?.xref??null,x,c,h,u,_,S,i.startSourceSpan,i.sourceSpan);n.create.push(b);let M=Bn(i.expression,n.job,Or(i.expression.span,i.sourceSpan)),w=gU(b.xref,b.handle,M,i.sourceSpan);n.update.push(w)}function IK(n,i,e){switch(n.value){case"$index":return new Ur(i);case"$count":return new Ur(e);case"$first":return new Ur(i).identical(Te(0));case"$last":return new Ur(i).identical(new Ur(e).minus(Te(1)));case"$even":return new Ur(i).modulo(Te(2)).identical(Te(0));case"$odd":return new Ur(i).modulo(Te(2)).notIdentical(Te(0));default:throw new Error(`AssertionError: unknown @for loop variable ${n.value}`)}}function AK(n,i){let e=n.job.allocateXrefId();n.create.push(NU(e,i.name,i.sourceSpan)),n.update.push(CU(e,i.name,Bn(i.value,n.job,i.valueSpan),i.sourceSpan))}function Bn(n,i,e){if(n instanceof ts)return Bn(n.ast,i,e);if(n instanceof Cc)return n.receiver instanceof Mc?new Ur(n.name):new Es(Bn(n.receiver,i,e),n.name,null,Or(n.span,e));if(n instanceof wh){if(n.receiver instanceof Mc)throw new Error("Unexpected ImplicitReceiver");return new os(Bn(n.receiver,i,e),n.args.map(t=>Bn(t,i,e)),void 0,Or(n.span,e))}else{if(n instanceof Ja)return Te(n.value,void 0,Or(n.span,e));if(n instanceof gh)switch(n.operator){case"+":return new jp(l_.Plus,Bn(n.expr,i,e),void 0,Or(n.span,e));case"-":return new jp(l_.Minus,Bn(n.expr,i,e),void 0,Or(n.span,e));default:throw new Error(`AssertionError: unknown unary operator ${n.operator}`)}else if(n instanceof Na){let t=nG.get(n.operation);if(t===void 0)throw new Error(`AssertionError: unknown binary operator ${n.operation}`);return new gi(t,Bn(n.left,i,e),Bn(n.right,i,e),void 0,Or(n.span,e))}else{if(n instanceof g_)return new pm(i.root.xref);if(n instanceof Gp)return new xd(Bn(n.receiver,i,e),Bn(n.key,i,e),void 0,Or(n.span,e));if(n instanceof Sh)throw new Error("AssertionError: Chain in unknown context");if(n instanceof Wp){let t=n.keys.map((o,r)=>{let a=Bn(n.values[r],i,e);return o.kind==="spread"?new rm(a):new xh(o.key,a,o.quoted)});return new Rl(t,void 0,Or(n.span,e))}else{if(n instanceof C_)return new wc(n.expressions.map(t=>Bn(t,i,e)));if(n instanceof s1)return new Sc(Bn(n.condition,i,e),Bn(n.trueExp,i,e),Bn(n.falseExp,i,e),void 0,Or(n.span,e));if(n instanceof S_)return Bn(n.expression,i,e);if(n instanceof l1)return new Yp(i.allocateXrefId(),new la,n.name,[Bn(n.exp,i,e),...n.args.map(t=>Bn(t,i,e))]);if(n instanceof v_)return new Oh(Bn(n.receiver,i,e),Bn(n.key,i,e),Or(n.span,e));if(n instanceof __)return new Ah(Bn(n.receiver,i,e),n.name);if(n instanceof d1)return new Zp(Bn(n.receiver,i,e),n.args.map(t=>Bn(t,i,e)));if(n instanceof _a)return new Q_(Or(n.span,e));if(n instanceof b_)return x$(Bn(n.expression,i,e),Or(n.span,e));if(n instanceof x_)return r0(Bn(n.expression,i,e));if(n instanceof y_)return new ZC(Bn(n.expression,i,e),void 0,Or(n.span,e));if(n instanceof M_)return bN(n,i,e);if(n instanceof w_)return new c_(Bn(n.tag,i,e),bN(n.template,i,e),void 0,Or(n.span,e));if(n instanceof k_)return new Fl(Bn(n.expression,i,e),void 0,Or(n.span,e));if(n instanceof u1)return new bh(n.body,n.flags,e);if(n instanceof c1)return new $p(Bn(n.expression,i,e));if(n instanceof p1)return LK(Ds(n.parameters.map(t=>new br(t.name,is)),Bn(n.body,i,e)));throw new Error(`Unhandled expression type "${n.constructor.name}" in file "${e?.start.file.url}"`)}}}}function bN(n,i,e){return new m_(n.elements.map(t=>new JC(t.text,Or(t.span,e))),n.expressions.map(t=>Bn(t,i,e)),Or(n.span,e))}function GT(n,i,e,t){let o;return i instanceof a0?o=new Qo(i.strings,i.expressions.map(r=>Bn(r,n,null)),Object.keys(vd(e)?.placeholders??{})):i instanceof to?o=Bn(i,n,null):o=Te(i),o}var JF=new Map([[Ti.Property,jt.Property],[Ti.TwoWay,jt.TwoWayProperty],[Ti.Attribute,jt.Attribute],[Ti.Class,jt.ClassName],[Ti.Style,jt.StyleProperty],[Ti.LegacyAnimation,jt.LegacyAnimation],[Ti.Animation,jt.Animation]]);function OK(n){return Ll(n.tagName??"")[1]===Vp}function vd(n){if(n==null)return null;if(!(n instanceof za))throw Error(`Expected i18n meta to be a Message, but got: ${n.constructor.name}`);return n}function NK(n,i,e){let t=new Array,o=new Set;for(let r of e.attributes){let a=Lp.securityContext(e.name,r.name,!0);t.push(Xp(i.xref,jt.Attribute,r.name,GT(n.job,r.value,r.i18n),null,a,!0,!1,null,vd(r.i18n),r.sourceSpan)),r.i18n&&o.add(r.name)}for(let r of e.inputs)o.has(r.name)&&console.error(`On component ${n.job.componentName}, the binding ${r.name} is both an i18n attribute and a property. You may want to remove the property binding. This will become a compilation error in future versions of Angular.`),t.push(Xp(i.xref,JF.get(r.type),r.name,GT(n.job,n0(r.value),r.i18n),r.unit,r.securityContext,!1,!1,null,vd(r.i18n)??null,r.sourceSpan));n.create.push(t.filter(r=>r?.kind===V.ExtractedAttribute)),n.update.push(t.filter(r=>r?.kind===V.Binding));for(let r of e.outputs){if(r.type===Ba.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");r.type===Ba.TwoWay?n.create.push(MF(i.xref,i.handle,r.name,i.tag,e6(n,r.handler,r.handlerSpan),r.sourceSpan)):r.type===Ba.Animation?n.create.push(wF(i.xref,i.handle,r.name,i.tag,t0(n,r.handler,r.handlerSpan),r.name.endsWith("enter")?"enter":"leave",r.target,!1,r.sourceSpan)):n.create.push(kE(i.xref,i.handle,r.name,i.tag,t0(n,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))}t.some(r=>r?.i18nMessage)!==null&&n.create.push(kF(n.job.allocateXrefId(),new la,i.xref))}function FK(n,i,e,t){let o=new Array;for(let r of e.templateAttrs)if(r instanceof Th){let a=Lp.securityContext(Vp,r.name,!0);o.push(zC(n,i.xref,Ti.Attribute,r.name,r.value,null,a,!0,t,vd(r.i18n),r.sourceSpan))}else o.push(zC(n,i.xref,r.type,r.name,n0(r.value),r.unit,r.securityContext,!0,t,vd(r.i18n),r.sourceSpan));for(let r of e.attributes){let a=Lp.securityContext(Vp,r.name,!0);o.push(zC(n,i.xref,Ti.Attribute,r.name,r.value,null,a,!1,t,vd(r.i18n),r.sourceSpan))}for(let r of e.inputs)o.push(zC(n,i.xref,r.type,r.name,n0(r.value),r.unit,r.securityContext,!1,t,vd(r.i18n),r.sourceSpan));n.create.push(o.filter(r=>r?.kind===V.ExtractedAttribute)),n.update.push(o.filter(r=>r?.kind===V.Binding));for(let r of e.outputs){if(r.type===Ba.LegacyAnimation&&r.phase===null)throw Error("Animation listener should have a phase");if(t===ns.NgTemplate&&(r.type===Ba.TwoWay?n.create.push(MF(i.xref,i.handle,r.name,i.tag,e6(n,r.handler,r.handlerSpan),r.sourceSpan)):n.create.push(kE(i.xref,i.handle,r.name,i.tag,t0(n,r.handler,r.handlerSpan),r.phase,r.target,!1,r.sourceSpan))),t===ns.Structural&&r.type!==Ba.LegacyAnimation){let a=Lp.securityContext(Vp,r.name,!1);n.create.push(Js(i.xref,jt.Property,null,r.name,null,null,null,a))}}o.some(r=>r?.i18nMessage)!==null&&n.create.push(kF(n.job.allocateXrefId(),new la,i.xref))}function zC(n,i,e,t,o,r,a,c,p,u,h){let _=typeof o=="string";if(p===ns.Structural){if(!c)switch(e){case Ti.Property:case Ti.Class:case Ti.Style:return Js(i,jt.Property,null,t,null,null,u,a);case Ti.TwoWay:return Js(i,jt.TwoWayProperty,null,t,null,null,u,a)}if(!_&&(e===Ti.Attribute||e===Ti.LegacyAnimation||e===Ti.Animation))return null}let S=JF.get(e);return p===ns.NgTemplate&&(e===Ti.Class||e===Ti.Style||e===Ti.Attribute&&!_)&&(S=jt.Property),Xp(i,S,t,GT(n.job,o,u),r,a,_,c,p,u,h)}function t0(n,i,e){i=n0(i);let t=new Array,o=i instanceof Sh?i.expressions:[i];if(o.length===0)throw new Error("Expected listener to have non-empty expression list.");let r=o.map(c=>Bn(c,n.job,e)),a=r.pop();return t.push(...r.map(c=>Is(new sa(c,c.sourceSpan)))),t.push(Is(new xr(a,a.sourceSpan))),t}function e6(n,i,e){i=n0(i);let t=new Array;if(i instanceof Sh)if(i.expressions.length===1)i=i.expressions[0];else throw new Error("Expected two-way listener to have a single expression.");let o=Bn(i,n.job,e),r=new Ur("$event"),a=new A1(o,r);return t.push(Is(new sa(a))),t.push(Is(new xr(r))),t}function n0(n){return n instanceof ts?n.ast:n}function t6(n,i){RK(n.localRefs);for(let{name:e,value:t}of i.references)n.localRefs.push({name:e,target:t})}function RK(n){if(!Array.isArray(n))throw new Error("AssertionError: expected an array")}function Or(n,i){if(i===null)return null;let e=i.start.moveBy(n.start),t=i.start.moveBy(n.end),o=i.fullStart.moveBy(n.start);return new gn(e,t,o)}function X1(n,i,e){let t=null;for(let o of e.children)if(!(o instanceof ib||o instanceof gE)){if(t!==null)return null;if(o instanceof kc||o instanceof ks&&o.tagName!==null)t=o;else return null}if(t!==null){for(let r of t.attributes)if(!r.name.startsWith(fK)){let a=Lp.securityContext(Vp,r.name,!0);n.update.push(Xp(i,jt.Attribute,r.name,Te(r.value),null,a,!0,!1,null,vd(r.i18n),r.sourceSpan))}for(let r of t.inputs)if(r.type!==Ti.LegacyAnimation&&r.type!==Ti.Animation&&r.type!==Ti.Attribute){let a=Lp.securityContext(Vp,r.name,!0);n.create.push(Js(i,jt.Property,null,r.name,null,null,null,a))}let o=t instanceof kc?t.name:t.tagName;return o===Vp?null:o}return null}function LK(n){let i=new Set(n.params.map(e=>e.name));return Vt(n,e=>{if(e instanceof eu)for(let t of e.params)i.add(t.name);else if(e instanceof Ur&&i.has(e.name))return Yn(e.name);return e},Wn.None)}var VK=!1;function BK(){return VK}function K1(n,i){return tb(Yn(Vh).bitwiseAnd(Te(n),null),i)}function zK(n){return(n.descendants?1:0)|(n.static?2:0)|(n.emitDistinctChangesOnly?4:0)}function jK(n,i){if(Array.isArray(n.predicate)){let e=[];return n.predicate.forEach(t=>{let o=t.split(",").map(r=>Te(r.trim()));e.push(...o)}),i.getConstLiteral(Gi(e),!0)}else switch(n.predicate.forwardRef){case 0:case 2:return n.predicate.expression;case 1:return Ut(fe.resolveForwardRef).callFn([n.predicate.expression])}}function n6(n,i,e){let t=[];return e!==void 0&&t.push(...e),n.isSignal&&t.push(new Es(Yn(Ps),n.propertyName)),t.push(jK(n,i),Te(zK(n))),n.read&&t.push(n.read),t}var PE=Symbol("queryAdvancePlaceholder");function i6(n){let i=[],e=0,t=()=>{e>0&&(i.unshift(Ut(fe.queryAdvance).callFn(e===1?[]:[Te(e)]).toStmt()),e=0)};for(let o=n.length-1;o>=0;o--){let r=n[o];r===PE?e++:(t(),i.unshift(r))}return t(),i}function $K(n,i,e){let t=[],o=[],r=JN(u=>o.push(u),vE),a=null,c=null;n.forEach(u=>{let h=n6(u,i);if(u.isSignal?(a??=Ut(fe.viewQuerySignal),a=a.callFn(h)):(c??=Ut(fe.viewQuery),c=c.callFn(h)),u.isSignal){o.push(PE);return}let _=r(),S=Ut(fe.loadQuery).callFn([]),x=Ut(fe.queryRefresh).callFn([_.set(S)]),b=Yn(Ps).prop(u.propertyName).set(u.first?_.prop("first"):_);o.push(x.and(b).toStmt())}),a!==null&&t.push(new sa(a)),c!==null&&t.push(new sa(c));let p=e?`${e}_Query`:null;return am([new br(Vh,Bp),new br(Ps,is)],[K1(1,t),K1(2,i6(o))],Ol,null,p)}function HK(n,i,e){let t=[],o=[],r=JN(u=>o.push(u),vE),a=null,c=null;for(let u of n){let h=n6(u,i,[Yn("dirIndex")]);if(u.isSignal?(a??=Ut(fe.contentQuerySignal),a=a.callFn(h)):(c??=Ut(fe.contentQuery),c=c.callFn(h)),u.isSignal){o.push(PE);continue}let _=r(),S=Ut(fe.loadQuery).callFn([]),x=Ut(fe.queryRefresh).callFn([_.set(S)]),b=Yn(Ps).prop(u.propertyName).set(u.first?_.prop("first"):_);o.push(x.and(b).toStmt())}a!==null&&t.push(new sa(a)),c!==null&&t.push(new sa(c));let p=e?`${e}_ContentQueries`:null;return am([new br(Vh,Bp),new br(Ps,is),new br("dirIndex",Bp)],[K1(1,t),K1(2,i6(o))],Ol,null,p)}var WT=class extends rW{constructor(){super(VT)}parse(i,e,t){return super.parse(i,e,t)}},jC=".",UK="attr",Mk="animate",GK="class",WK="style",qK="*",kk="animate-",qT=class{_exprParser;_schemaRegistry;errors;constructor(i,e,t){this._exprParser=i,this._schemaRegistry=e,this.errors=t}createBoundHostProperties(i,e){let t=[];for(let o of Object.keys(i)){let r=i[o];typeof r=="string"?this.parsePropertyBinding(o,r,!0,!1,e,e.start.offset,void 0,[],t,e):this._reportError(`Value of the host property binding "${o}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return t}createDirectiveHostEventAsts(i,e){let t=[];for(let o of Object.keys(i)){let r=i[o];typeof r=="string"?this.parseEvent(o,r,!1,e,e,[],t,e):this._reportError(`Value of the host listener "${o}" needs to be a string representing an expression but got "${r}" (${typeof r})`,e)}return t}parseInterpolation(i,e,t){let o=e.fullStart.offset;try{let r=this._exprParser.parseInterpolation(i,e,o,t);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,o)}}parseInterpolationExpression(i,e){let t=e.start.offset;try{let o=this._exprParser.parseInterpolationExpression(i,e,t);return o&&this.errors.push(...o.errors),o}catch(o){return this._reportError(`${o}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)}}parseInlineTemplateBinding(i,e,t,o,r,a,c,p){let u=t.start.offset+qK.length,h=this._parseTemplateBindings(i,e,t,u,o);for(let _ of h){let S=Kd(t,_.sourceSpan),x=_.key.source,b=Kd(t,_.key.span);if(_ instanceof T_){let M=_.value?_.value.source:"$implicit",w=_.value?Kd(t,_.value.span):void 0;c.push(new Qk(x,M,S,b,w))}else if(_.value){let M=p?S:t,w=Kd(t,_.value.ast.sourceSpan);this._parsePropertyAst(x,_.value,!1,M,b,w,r,a)}else r.push([x,""]),this.parseLiteralAttr(x,null,b,o,void 0,r,a,b)}}_parseTemplateBindings(i,e,t,o,r){try{let a=this._exprParser.parseTemplateBindings(i,e,t,o,r);return a.errors.forEach(c=>this.errors.push(c)),a.warnings.forEach(c=>{this._reportError(c,t,nm.WARNING)}),a.templateBindings}catch(a){return this._reportError(`${a}`,t),[]}}parseLiteralAttr(i,e,t,o,r,a,c,p){Tk(i)?(i=i.substring(1),p!==void 0&&(p=Kd(p,new Ms(p.start.offset+1,p.end.offset))),e&&this._reportError('Assigning animation triggers via @prop="exp" attributes with an expression is invalid. Use property bindings (e.g. [@prop]="exp") or use an attribute without a value (e.g. @prop) instead.',t,nm.ERROR),this._parseLegacyAnimation(i,e,t,o,p,r,a,c)):c.push(new dh(i,this._exprParser.wrapLiteralPrimitive(e,"",o),fc.LITERAL_ATTR,t,p,r))}parsePropertyBinding(i,e,t,o,r,a,c,p,u,h){i.length===0&&this._reportError("Property name is missing in binding",r);let _=!1;i.startsWith(kk)?(_=!0,i=i.substring(kk.length),h!==void 0&&(h=Kd(h,new Ms(h.start.offset+kk.length,h.end.offset)))):Tk(i)&&(_=!0,i=i.substring(1),h!==void 0&&(h=Kd(h,new Ms(h.start.offset+1,h.end.offset)))),_?this._parseLegacyAnimation(i,e,r,a,h,c,p,u):i.startsWith(`${Mk}${jC}`)?this._parseAnimation(i,this.parseBinding(e,t,c||r,a),r,h,c,p,u):this._parsePropertyAst(i,this.parseBinding(e,t,c||r,a),o,r,h,c,p,u)}parsePropertyInterpolation(i,e,t,o,r,a,c,p){let u=this.parseInterpolation(e,o||t,p);return u?(this._parsePropertyAst(i,u,!1,t,c,o,r,a),!0):!1}_parsePropertyAst(i,e,t,o,r,a,c,p){c.push([i,e.source]),p.push(new dh(i,e,t?fc.TWO_WAY:fc.DEFAULT,o,r,a))}_parseAnimation(i,e,t,o,r,a,c){a.push([i,e.source]),c.push(new dh(i,e,fc.ANIMATION,t,o,r))}_parseLegacyAnimation(i,e,t,o,r,a,c,p){i.length===0&&this._reportError("Animation trigger is missing",t);let u=this.parseBinding(e||"undefined",!1,a||t,o);c.push([i,u.source]),p.push(new dh(i,u,fc.LEGACY_ANIMATION,t,r,a))}parseBinding(i,e,t,o){try{let r=e?this._exprParser.parseSimpleBinding(i,t,o):this._exprParser.parseBinding(i,t,o);return r&&this.errors.push(...r.errors),r}catch(r){return this._reportError(`${r}`,t),this._exprParser.wrapLiteralPrimitive("ERROR",t,o)}}createBoundElementProperty(i,e,t=!1,o=!0){if(e.isLegacyAnimation)return new f1(e.name,Ti.LegacyAnimation,eo.NONE,e.expression,null,e.sourceSpan,e.keySpan,e.valueSpan);let r=null,a,c=null,p=e.name.split(jC),u;if(p.length>1)if(p[0]==UK){c=p.slice(1).join(jC),t||this._validatePropertyOrAttributeName(c,e.sourceSpan,!0),u=Ek(this._schemaRegistry,i,c,!0);let h=c.indexOf(":");if(h>-1){let _=c.substring(0,h),S=c.substring(h+1);c=UC(_,S)}a=Ti.Attribute}else p[0]==GK?(c=p[1],a=Ti.Class,u=[eo.NONE]):p[0]==WK?(r=p.length>2?p[2]:null,c=p[1],a=Ti.Style,u=[eo.STYLE]):p[0]==Mk&&(c=e.name,a=Ti.Animation,u=[eo.NONE]);if(c===null){let h=this._schemaRegistry.getMappedPropName(e.name);c=o?h:e.name,u=Ek(this._schemaRegistry,i,h,!1),a=e.type===fc.TWO_WAY?Ti.TwoWay:Ti.Property,t||this._validatePropertyOrAttributeName(h,e.sourceSpan,!1)}return new f1(c,a,u[0],e.expression,r,e.sourceSpan,e.keySpan,e.valueSpan)}parseEvent(i,e,t,o,r,a,c,p){i.length===0&&this._reportError("Event name is missing in binding",o),Tk(i)?(i=i.slice(1),p!==void 0&&(p=Kd(p,new Ms(p.start.offset+1,p.end.offset))),this._parseLegacyAnimationEvent(i,e,o,r,c,p)):this._parseRegularEvent(i,e,t,o,r,a,c,p)}calcPossibleSecurityContexts(i,e,t){let o=this._schemaRegistry.getMappedPropName(e);return Ek(this._schemaRegistry,i,o,t)}parseEventListenerName(i){let[e,t]=P$(i,[null,i]);return{eventName:t,target:e}}parseLegacyAnimationEventName(i){let e=I$(i,[i,null]);return{eventName:e[0],phase:e[1]===null?null:e[1].toLowerCase()}}_parseLegacyAnimationEvent(i,e,t,o,r,a){let{eventName:c,phase:p}=this.parseLegacyAnimationEventName(i),u=this._parseAction(e,o);r.push(new h1(c,p,Ba.LegacyAnimation,u,t,o,a)),c.length===0&&this._reportError("Animation event name is missing in binding",t),p?p!=="start"&&p!=="done"&&this._reportError(`The provided animation output phase value "${p}" for "@${c}" is not supported (use start or done)`,t):this._reportError(`The animation trigger output event (@${c}) is missing its phase value name (start or done are currently supported)`,t)}_parseRegularEvent(i,e,t,o,r,a,c,p){let{eventName:u,target:h}=this.parseEventListenerName(i),_=this.errors.length,S=this._parseAction(e,r),x=this.errors.length===_;a.push([i,S.source]),t&&x&&!this._isAllowedAssignmentEvent(S)&&this._reportError("Unsupported expression in a two-way binding",o);let b=Ba.Regular;t&&(b=Ba.TwoWay),i.startsWith(`${Mk}${jC}`)&&(b=Ba.Animation),c.push(new h1(u,h,b,S,o,r,p))}_parseAction(i,e){let t=e&&e.start?e.start.offset:0;try{let o=this._exprParser.parseAction(i,e,t);return o&&this.errors.push(...o.errors),!o||o.ast instanceof _a?(this._reportError("Empty expressions are not allowed",e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)):o}catch(o){return this._reportError(`${o}`,e),this._exprParser.wrapLiteralPrimitive("ERROR",e,t)}}_reportError(i,e,t=nm.ERROR){this.errors.push(new sn(e,i,t))}_validatePropertyOrAttributeName(i,e,t){let o=t?this._schemaRegistry.validateAttribute(i):this._schemaRegistry.validateProperty(i);o.error&&this._reportError(o.msg,e,nm.ERROR)}_isAllowedAssignmentEvent(i){return i instanceof ts?this._isAllowedAssignmentEvent(i.ast):i instanceof S_?this._isAllowedAssignmentEvent(i.expression):i instanceof wh&&i.args.length===1&&i.receiver instanceof Cc&&i.receiver.name==="$any"&&i.receiver.receiver instanceof Mc?this._isAllowedAssignmentEvent(i.args[0]):(i instanceof Cc||i instanceof Gp)&&!QT(i)}};function QT(n){return n instanceof __||n instanceof v_?!0:n instanceof k_?QT(n.expression):n instanceof Cc||n instanceof Gp||n instanceof wh?QT(n.receiver):!1}function Tk(n){return n[0]=="@"}function Ek(n,i,e,t){let o,r=a=>n.securityContext(a,e,t);return i===null?o=n.allKnownElementNames().map(r):(o=[],vh.parse(i).forEach(a=>{let c=a.element?[a.element]:n.allKnownElementNames(),p=new Set(a.notSelectors.filter(h=>h.isElementSelector()).map(h=>h.element)),u=c.filter(h=>!p.has(h));o.push(...u.map(r))})),o.length===0?[eo.NONE]:Array.from(new Set(o)).sort()}function Kd(n,i){let e=i.start-n.start.offset,t=i.end-n.end.offset;return new gn(n.start.moveBy(e),n.end.moveBy(t),n.fullStart.moveBy(e),n.details)}function QK(n){if(n==null||n.length===0||n[0]=="/")return!1;let i=n.match(XK);return i===null||i[1]=="package"||i[1]=="asset"}var XK=/^([^:/?#]+):/,KK="select",YK="link",ZK="rel",JK="href",eY="stylesheet",tY="style",nY="script",iY="ngNonBindable",oY="ngProjectAs";function o6(n){let i=null,e=null,t=null,o=!1,r="";n.attrs.forEach(p=>{let u=p.name.toLowerCase();u==KK?i=p.value:u==JK?e=p.value:u==ZK?t=p.value:p.name==iY?o=!0:p.name==oY&&p.value.length>0&&(r=p.value)}),i=rY(i);let a=n.name.toLowerCase(),c=ws.OTHER;return Xk(a)?c=ws.NG_CONTENT:a==tY?c=ws.STYLE:a==nY?c=ws.SCRIPT:a==YK&&t==eY&&(c=ws.STYLESHEET),new XT(c,i,e,o,r)}var ws=(function(n){return n[n.NG_CONTENT=0]="NG_CONTENT",n[n.STYLE=1]="STYLE",n[n.STYLESHEET=2]="STYLESHEET",n[n.SCRIPT=3]="SCRIPT",n[n.OTHER=4]="OTHER",n})(ws||{}),XT=class{type;selectAttr;hrefAttr;nonBindable;projectAs;constructor(i,e,t,o,r){this.type=i,this.selectAttr=e,this.hrefAttr=t,this.nonBindable=o,this.projectAs=r}};function rY(n){return n===null||n.length===0?"*":n}var aY=/^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/,sY=/^track\s+([\S\s]*)/,lY=/^(as\s+)(.*)/,lb=/^else[^\S\r\n]+if/,cY=/^let\s+([\S\s]*)/,dY=/^[$A-Z_][0-9A-Z_$]*$/i,xN=/(\s*)(\S+)(\s*)/,s_=new Set(["$index","$first","$last","$even","$odd","$count"]);function yN(n){return n==="empty"}function SN(n){return n==="else"||lb.test(n)}function mY(n,i,e,t){let o=_Y(i),r=[],a=wN(n,o,t);a!==null&&r.push(new Ap(a.expression,Co(e,n.children,n.children),a.expressionAlias,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.nameSpan,n.i18n));for(let _ of i)if(lb.test(_.name)){let S=wN(_,o,t);if(S!==null){let x=Co(e,_.children,_.children);r.push(new Ap(S.expression,x,S.expressionAlias,_.sourceSpan,_.startSourceSpan,_.endSourceSpan,_.nameSpan,_.i18n))}}else if(_.name==="else"){let S=Co(e,_.children,_.children);r.push(new Ap(null,S,null,_.sourceSpan,_.startSourceSpan,_.endSourceSpan,_.nameSpan,_.i18n))}let c=r.length>0?r[0].startSourceSpan:n.startSourceSpan,p=r.length>0?r[r.length-1].endSourceSpan:n.endSourceSpan,u=n.sourceSpan,h=r[r.length-1];return h!==void 0&&(u=new gn(c.start,h.sourceSpan.end)),{node:new b1(r,u,n.startSourceSpan,p,n.nameSpan),errors:o}}function pY(n,i,e,t){let o=[],r=hY(n,o,t),a=null,c=null;for(let p of i)p.name==="empty"?c!==null?o.push(new sn(p.sourceSpan,"@for loop can only have one @empty block")):p.parameters.length>0?o.push(new sn(p.sourceSpan,"@empty block cannot have parameters")):c=new O_(Co(e,p.children,p.children),p.sourceSpan,p.startSourceSpan,p.endSourceSpan,p.nameSpan,p.i18n):o.push(new sn(p.sourceSpan,`Unrecognized @for loop block "${p.name}"`));if(r!==null)if(r.trackBy===null)o.push(new sn(n.startSourceSpan,'@for loop must have a "track" expression'));else{let p=c?.endSourceSpan??n.endSourceSpan,u=new gn(n.sourceSpan.start,p?.end??n.sourceSpan.end);fY(r.trackBy.expression,r.trackBy.keywordSpan,o),a=new Eh(r.itemName,r.expression,r.trackBy.expression,r.trackBy.keywordSpan,r.context,Co(e,n.children,n.children),c,u,n.sourceSpan,n.startSourceSpan,p,n.nameSpan,n.i18n)}return{node:a,errors:o}}function uY(n,i,e){let t=vY(n),o=n.parameters.length>0?i0(n.parameters[0],e):e.parseBinding("",!1,n.sourceSpan,0),r=[],a=[],c=[],p=null,u=null;for(let _ of n.children){if(!(_ instanceof Ks))continue;if((_.name!=="case"||_.parameters.length===0)&&_.name!=="default"&&_.name!=="default never"){a.push(new x1(_.name,_.sourceSpan,_.nameSpan));continue}u!==null&&t.push(new sn(_.sourceSpan,'@default block with "never" parameter must be the last case in a switch'));let S=_.name==="case",x=null;if(S)x=i0(_.parameters[0],e);else if(_.name==="default never"){(_.children.length>0||_.endSourceSpan!==null&&_.endSourceSpan.start.offset!==_.endSourceSpan.end.offset)&&t.push(new sn(_.sourceSpan,'@default block with "never" parameter cannot have a body')),c.length>0&&t.push(new sn(_.sourceSpan,'A @case block with no body cannot be followed by a @default block with "never" parameter')),u=new oT(_.sourceSpan,_.startSourceSpan,_.endSourceSpan,_.nameSpan);continue}let b=new iT(x,_.sourceSpan,_.startSourceSpan,_.endSourceSpan,_.nameSpan);if(c.push(b),_.children.length===0&&_.endSourceSpan!==null&&_.endSourceSpan.start.offset===_.endSourceSpan.end.offset){p===null&&(p=_.sourceSpan);continue}let w=_.sourceSpan,y=_.startSourceSpan;p!==null&&(w=new gn(p.start,_.sourceSpan.end),y=new gn(p.start,_.startSourceSpan.end),p=null);let E=new A_(c,Co(i,_.children,_.children),w,y,_.endSourceSpan,_.nameSpan,_.i18n);r.push(E),c=[]}return{node:new C1(o,r,a,u,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.nameSpan),errors:t}}function hY(n,i,e){if(n.parameters.length===0)return i.push(new sn(n.startSourceSpan,"@for loop does not have an expression")),null;let[t,...o]=n.parameters,r=CY(t,i)?.match(aY);if(!r||r[2].trim().length===0)return i.push(new sn(t.sourceSpan,'Cannot parse expression. @for loop expression must match the pattern " of "')),null;let[,a,c]=r;s_.has(a)&&i.push(new sn(t.sourceSpan,`@for loop item name cannot be one of ${Array.from(s_).join(", ")}.`));let p=t.expression.split(" ")[0],u=new gn(t.sourceSpan.start,t.sourceSpan.start.moveBy(p.length)),h={itemName:new sm(a,"$implicit",u,u),trackBy:null,expression:i0(t,e,c),context:Array.from(s_,_=>{let S=new gn(n.startSourceSpan.end,n.startSourceSpan.end);return new sm(_,_,S,S)})};for(let _ of o){let S=_.expression.match(cY);if(S!==null){let b=new gn(_.sourceSpan.start.moveBy(S[0].length-S[1].length),_.sourceSpan.end);gY(_.sourceSpan,S[1],b,a,h.context,i);continue}let x=_.expression.match(sY);if(x!==null){if(h.trackBy!==null)i.push(new sn(_.sourceSpan,'@for loop can only have one "track" expression'));else{let b=i0(_,e,x[1]);b.ast instanceof _a&&i.push(new sn(n.startSourceSpan,'@for loop must have a "track" expression'));let M=new gn(_.sourceSpan.start,_.sourceSpan.start.moveBy(5));h.trackBy={expression:b,keywordSpan:M}}continue}i.push(new sn(_.sourceSpan,`Unrecognized @for loop parameter "${_.expression}"`))}return h}function fY(n,i,e){let t=new KT;n.ast.visit(t),t.hasPipe&&e.push(new sn(i,"Cannot use pipes in track expressions"))}function gY(n,i,e,t,o,r){let a=i.split(","),c=e.start;for(let p of a){let u=p.split("="),h=u.length===2?u[0].trim():"",_=u.length===2?u[1].trim():"";if(h.length===0||_.length===0)r.push(new sn(n,'Invalid @for loop "let" parameter. Parameter should match the pattern " = "'));else if(!s_.has(_))r.push(new sn(n,`Unknown "let" parameter variable "${_}". The allowed variables are: ${Array.from(s_).join(", ")}`));else if(h===t)r.push(new sn(n,`Invalid @for loop "let" parameter. Variable cannot be called "${t}"`));else if(o.some(S=>S.name===h))r.push(new sn(n,`Duplicate "let" parameter variable "${_}"`));else{let[,S,x]=u[0].match(xN)??[],b=S!==void 0&&u.length===2?new gn(c.moveBy(S.length),c.moveBy(S.length+x.length)):e,M;if(u.length===2){let[,y,E]=u[1].match(xN)??[];M=y!==void 0?new gn(c.moveBy(u[0].length+1+y.length),c.moveBy(u[0].length+1+y.length+E.length)):void 0}let w=new gn(b.start,M?.end??b.end);o.push(new sm(h,_,w,b,M))}c=c.moveBy(p.length+1)}}function _Y(n){let i=[],e=!1;for(let t=0;t1&&t0&&i.push(new sn(o.startSourceSpan,"@else block cannot have parameters")),e=!0):lb.test(o.name)||i.push(new sn(o.startSourceSpan,`Unrecognized conditional block @${o.name}`))}return i}function vY(n){let i=[],e=!1;if(n.parameters.length!==1)return i.push(new sn(n.startSourceSpan,"@switch block must have exactly one parameter")),i;for(let t of n.children)if(!(t instanceof Y_||t instanceof Jp&&t.value.trim().length===0)){if(!(t instanceof Ks)||t.name!=="case"&&t.name!=="default"&&t.name!=="default never"){i.push(new sn(t.sourceSpan,"@switch block can only contain @case and @default blocks"));continue}t.name==="default never"?(e&&i.push(new sn(t.startSourceSpan,"@switch block can only have one @default block")),e=!0):t.name==="default"?(e?i.push(new sn(t.startSourceSpan,"@switch block can only have one @default block")):t.parameters.length>0&&i.push(new sn(t.startSourceSpan,"@default block cannot have parameters")),e=!0):t.name==="case"&&t.parameters.length!==1&&i.push(new sn(t.startSourceSpan,"@case block must have exactly one parameter"))}return i}function i0(n,i,e){let t,o;return typeof e=="string"?(t=Math.max(0,n.expression.lastIndexOf(e)),o=t+e.length):(t=0,o=n.expression.length),i.parseBinding(n.expression.slice(t,o),!1,n.sourceSpan,n.sourceSpan.start.offset+t)}function wN(n,i,e){if(n.parameters.length===0)return i.push(new sn(n.startSourceSpan,"Conditional block does not have an expression")),null;let t=i0(n.parameters[0],e),o=null;for(let r=1;r-1;c--){let p=e[c];if(p===")"){if(a=c,o--,o===0)break}else{if(t.test(p))continue;break}}return o!==0?(i.push(new sn(n.sourceSpan,"Unclosed parentheses in expression")),null):e.slice(r,a)}var KT=class extends Mh{hasPipe=!1;visitPipe(){this.hasPipe=!0}},bY=/^\d+\.?\d*(ms|s)?$/,xY=/^\s$/,MN=new Map([[Ys,Ra],[bc,_d],[Va,Cr]]),La=(function(n){return n.IDLE="idle",n.TIMER="timer",n.INTERACTION="interaction",n.IMMEDIATE="immediate",n.HOVER="hover",n.VIEWPORT="viewport",n.NEVER="never",n})(La||{});function yY({expression:n,sourceSpan:i},e,t){let o=n.indexOf("never"),r=new gn(i.start.moveBy(o),i.start.moveBy(o+5)),a=IE(n,i),c=AE(n,i);o===-1?t.push(new sn(i,'Could not find "never" keyword in expression')):OE("never",e,t,new Jk(r,i,a,null,c))}function Dk({expression:n,sourceSpan:i},e,t,o){let r=n.indexOf("when"),a=new gn(i.start.moveBy(r),i.start.moveBy(r+4)),c=IE(n,i),p=AE(n,i);if(r===-1)o.push(new sn(i,'Could not find "when" keyword in expression'));else{let u=o0(n,r+1),h=e.parseBinding(n.slice(u),!1,i,i.start.offset+u);OE("when",t,o,new g1(h,i,c,a,p))}}function Pk({expression:n,sourceSpan:i},e,t,o,r){let a=n.indexOf("on"),c=new gn(i.start.moveBy(a),i.start.moveBy(a+2)),p=IE(n,i),u=AE(n,i);if(a===-1)o.push(new sn(i,'Could not find "on" keyword in expression'));else{let h=o0(n,a+1),_=n.startsWith("hydrate");new YT(n,e,h,i,t,o,_?PY:DY,_,p,c,u).parse()}}function IE(n,i){return n.startsWith("prefetch")?new gn(i.start,i.start.moveBy(8)):null}function AE(n,i){return n.startsWith("hydrate")?new gn(i.start,i.start.moveBy(7)):null}var YT=class{expression;bindingParser;start;span;triggers;errors;validator;isHydrationTrigger;prefetchSpan;onSourceSpan;hydrateSpan;index=0;tokens;constructor(i,e,t,o,r,a,c,p,u,h,_){this.expression=i,this.bindingParser=e,this.start=t,this.span=o,this.triggers=r,this.errors=a,this.validator=c,this.isHydrationTrigger=p,this.prefetchSpan=u,this.onSourceSpan=h,this.hydrateSpan=_,this.tokens=new e0().tokenize(i.slice(t))}parse(){for(;this.tokens.length>0&&this.index0&&o.isCharacter(e[e.length-1])&&e.pop(),e.length===0&&o.isCharacter(va)&&t.length>0){i.push({expression:this.tokenRangeText(t),start:t[0].index}),this.advance(),t=[];continue}t.push(o),this.advance()}return(!this.token().isCharacter(Cr)||e.length>0)&&this.error(this.token(),"Unexpected end of expression"),this.index0)throw new Error(`"${La.IDLE}" trigger cannot have parameters`);return new eT(i,e,t,o,r)}function wY(n,i,e,t,o,r){if(n.length!==1)throw new Error(`"${La.TIMER}" trigger must have exactly one parameter`);let a=Y1(n[0].expression);if(a===null)throw new Error(`Could not parse time value of trigger "${La.TIMER}"`);return new nT(a,i,e,t,o,r)}function MY(n,i,e,t,o,r){if(n.length>0)throw new Error(`"${La.IMMEDIATE}" trigger cannot have parameters`);return new tT(i,e,t,o,r)}function kY(n,i,e,t,o,r,a){return a(La.HOVER,n),new _1(n[0]?.expression??null,i,e,t,o,r)}function TY(n,i,e,t,o,r,a){return a(La.INTERACTION,n),new v1(n[0]?.expression??null,i,e,t,o,r)}function EY(n,i,e,t,o,r,a,c,p,u){u(La.VIEWPORT,t);let h,_;if(t.length===0)h=_=null;else if(!t[0].expression.startsWith("{"))h=t[0].expression,_=null;else{let S=e.parseBinding(t[0].expression,!1,r,r.start.offset+n+t[0].start);if(S.ast instanceof Wp){if(S.ast.keys.some(b=>b.kind==="spread"))throw new Error("Spread operator are not allowed in this context");if(S.ast.keys.some(b=>b.kind==="property"&&b.key==="root"))throw new Error('The "root" option is not supported in the options parameter of the "viewport" trigger')}else throw new Error('Options parameter of the "viewport" trigger must be an object literal');let x=S.ast.keys.findIndex(b=>b.kind==="property"&&b.key==="trigger");if(x===-1)h=null,_=S.ast;else{let b=S.ast.values[x],M=(w,y)=>y!==x;if(!(b instanceof Cc)||!(b.receiver instanceof Mc))throw new Error('"trigger" option of the "viewport" trigger must be an identifier');h=b.name,_=new Wp(S.ast.span,S.ast.sourceSpan,S.ast.keys.filter(M),S.ast.values.filter(M))}}if(i&&h!==null)throw new Error('"viewport" hydration trigger cannot have a "trigger"');if(_){let S=ZT.findDynamicNode(_);if(S!==null)throw new Error(`Options of the "viewport" trigger must be an object literal containing only literal values, but "${S.constructor.name}" was found`)}return new E_(h,_,o,r,a,c,p)}function DY(n,i){if(i.length>1)throw new Error(`"${n}" trigger can only have zero or one parameters`)}function PY(n,i){if(n===La.VIEWPORT){if(i.length>1)throw new Error(`Hydration trigger "${n}" cannot have more than one parameter`);return}if(i.length>0)throw new Error(`Hydration trigger "${n}" cannot have parameters`)}function o0(n,i=0){let e=!1;for(let t=i;t0){let M=i[i.length-1];_=M.endSourceSpan,S=M.sourceSpan.end}let x=new gn(n.sourceSpan.start,S);return{node:new qp(Co(e,n.children,n.children),p,u,h,r,a,c,n.nameSpan,x,n.sourceSpan,n.startSourceSpan,_,n.i18n),errors:o}}function zY(n,i,e){let t=null,o=null,r=null;for(let a of n)try{if(!JT(a.name)){i.push(new sn(a.startSourceSpan,`Unrecognized block "@${a.name}"`));break}switch(a.name){case"placeholder":t!==null?i.push(new sn(a.startSourceSpan,"@defer block can only have one @placeholder block")):t=jY(a,e);break;case"loading":o!==null?i.push(new sn(a.startSourceSpan,"@defer block can only have one @loading block")):o=$Y(a,e);break;case"error":r!==null?i.push(new sn(a.startSourceSpan,"@defer block can only have one @error block")):r=HY(a,e);break}}catch(c){i.push(new sn(a.startSourceSpan,c.message))}return{placeholder:t,loading:o,error:r}}function jY(n,i){let e=null;for(let t of n.parameters)if(r6.test(t.expression)){if(e!=null)throw new Error('@placeholder block can only have one "minimum" parameter');let o=Y1(t.expression.slice(o0(t.expression)));if(o===null)throw new Error('Could not parse time value of parameter "minimum"');e=o}else throw new Error(`Unrecognized parameter in @placeholder block: "${t.expression}"`);return new D_(Co(i,n.children,n.children),e,n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function $Y(n,i){let e=null,t=null;for(let o of n.parameters)if(RY.test(o.expression)){if(e!=null)throw new Error('@loading block can only have one "after" parameter');let r=Y1(o.expression.slice(o0(o.expression)));if(r===null)throw new Error('Could not parse time value of parameter "after"');e=r}else if(r6.test(o.expression)){if(t!=null)throw new Error('@loading block can only have one "minimum" parameter');let r=Y1(o.expression.slice(o0(o.expression)));if(r===null)throw new Error('Could not parse time value of parameter "minimum"');t=r}else throw new Error(`Unrecognized parameter in @loading block: "${o.expression}"`);return new P_(Co(i,n.children,n.children),e,t,n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function HY(n,i){if(n.parameters.length>0)throw new Error("@error block cannot have parameters");return new I_(Co(i,n.children,n.children),n.nameSpan,n.sourceSpan,n.startSourceSpan,n.endSourceSpan,n.i18n)}function UY(n,i,e,t){let o={},r={},a={};for(let c of n.parameters)LY.test(c.expression)?Dk(c,i,o,e):VY.test(c.expression)?Pk(c,i,o,e):IY.test(c.expression)?Dk(c,i,r,e):AY.test(c.expression)?Pk(c,i,r,e):OY.test(c.expression)?Dk(c,i,a,e):NY.test(c.expression)?Pk(c,i,a,e):FY.test(c.expression)?yY(c,a,e):e.push(new sn(c.sourceSpan,"Unrecognized trigger"));return a.never&&Object.keys(a).length>1&&e.push(new sn(n.startSourceSpan,"Cannot specify additional `hydrate` triggers if `hydrate never` is present")),{triggers:o,prefetchTriggers:r,hydrateTriggers:a}}var GY=/^(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.*)$/,kN=1,TN=2,EN=3,DN=4,PN=5,WY=6,Wg=7,Yd={BANANA_BOX:{start:"[(",end:")]"},PROPERTY:{start:"[",end:"]"},EVENT:{start:"(",end:")"}},Ik="*",qY=new Set(["link","style","script","ng-template","ng-container","ng-content"]),QY=new Set(["ngProjectAs","ngNonBindable"]);function XY(n,i,e){let t=new eE(i,e),o=Co(t,n,n),r=i.errors.concat(t.errors),a={nodes:o,errors:r,styleUrls:t.styleUrls,styles:t.styles,ngContentSelectors:t.ngContentSelectors};return e.collectCommentNodes&&(a.commentNodes=t.commentNodes),a}var eE=class{bindingParser;options;errors=[];styles=[];styleUrls=[];ngContentSelectors=[];commentNodes=[];inI18nBlock=!1;processedNodes=new Set;constructor(i,e){this.bindingParser=i,this.options=e}visitElement(i){let e=WC(i.i18n);e&&(this.inI18nBlock&&this.reportError("Cannot mark an element as translatable inside of a translatable section. Please remove the nested i18n marker.",i.sourceSpan),this.inI18nBlock=!0);let t=o6(i);if(t.type===ws.SCRIPT)return null;if(t.type===ws.STYLE){let y=KY(i);return y!==null&&this.styles.push(y),null}else if(t.type===ws.STYLESHEET&&QK(t.hrefAttr))return this.styleUrls.push(t.hrefAttr),null;let o=Z$(i.name),{attributes:r,boundEvents:a,references:c,variables:p,templateVariables:u,elementHasInlineTemplate:h,parsedProperties:_,templateParsedProperties:S,i18nAttrsMeta:x}=this.prepareAttributes(i.attrs,o),b=this.extractDirectives(i),M;t.nonBindable?M=Co(IN,i.children).flat(1/0):M=Co(this,i.children,i.children);let w;if(t.type===ws.NG_CONTENT){let y=t.selectAttr,E=i.attrs.map(I=>this.visitAttribute(I));w=new Dh(y,E,M,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n),this.ngContentSelectors.push(y)}else if(o){let y=this.categorizePropertyAttributes(i.name,_,x);w=new ks(i.name,r,y.bound,a,b,[],M,c,p,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n)}else{let y=this.categorizePropertyAttributes(i.name,_,x);if(i.name==="ng-container")for(let E of y.bound)E.type===Ti.Attribute&&this.reportError("Attribute bindings are not supported on ng-container. Use property bindings instead.",E.sourceSpan);w=new kc(i.name,r,y.bound,a,b,M,c,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid,i.i18n)}return h&&(w=this.wrapInTemplate(w,S,u,x,o,e)),e&&(this.inI18nBlock=!1),w}visitAttribute(i){return new Th(i.name,i.value,i.sourceSpan,i.keySpan,i.valueSpan,i.i18n)}visitText(i){return this.processedNodes.has(i)?null:this._visitTextWithInterpolation(i.value,i.sourceSpan,i.tokens,i.i18n)}visitExpansion(i){if(!i.i18n)return null;if(!WC(i.i18n))throw new Error(`Invalid type "${i.i18n.constructor}" for "i18n" property of ${i.sourceSpan.toString()}. Expected a "Message"`);let e=i.i18n,t={},o={};return Object.keys(e.placeholders).forEach(r=>{let a=e.placeholders[r];if(r.startsWith(nH)){let c=r.trim(),p=this.bindingParser.parseInterpolationExpression(a.text,a.sourceSpan);t[c]=new kh(p,a.sourceSpan)}else o[r]=this._visitTextWithInterpolation(a.text,a.sourceSpan,null)}),new XN(t,o,i.sourceSpan,e)}visitExpansionCase(i){return null}visitComment(i){return this.options.collectCommentNodes&&this.commentNodes.push(new ib(i.value||"",i.sourceSpan)),null}visitLetDeclaration(i,e){let t=this.bindingParser.parseBinding(i.value,!1,i.valueSpan,i.valueSpan.start.offset);return t.errors.length===0&&t.ast instanceof _a&&this.reportError("@let declaration value cannot be empty",i.valueSpan),new gE(i.name,t,i.sourceSpan,i.nameSpan,i.valueSpan)}visitComponent(i){let e=WC(i.i18n);if(e&&(this.inI18nBlock&&this.reportError("Cannot mark a component as translatable inside of a translatable section. Please remove the nested i18n marker.",i.sourceSpan),this.inI18nBlock=!0),i.tagName!==null&&qY.has(i.tagName))return this.reportError(`Tag name "${i.tagName}" cannot be used as a component tag`,i.startSourceSpan),null;let{attributes:t,boundEvents:o,references:r,templateVariables:a,elementHasInlineTemplate:c,parsedProperties:p,templateParsedProperties:u,i18nAttrsMeta:h}=this.prepareAttributes(i.attrs,!1);this.validateSelectorlessReferences(r);let _=this.extractDirectives(i),S;i.attrs.find(M=>M.name==="ngNonBindable")?S=Co(IN,i.children).flat(1/0):S=Co(this,i.children,i.children);let x=this.categorizePropertyAttributes(i.tagName,p,h),b=new e_(i.componentName,i.tagName,i.fullName,t,x.bound,o,_,S,r,i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.i18n);return c&&(b=this.wrapInTemplate(b,u,a,h,!1,e)),e&&(this.inI18nBlock=!1),b}visitDirective(){return null}visitBlockParameter(){return null}visitBlock(i,e){let t=Array.isArray(e)?e.indexOf(i):-1;if(t===-1)throw new Error("Visitor invoked incorrectly. Expecting visitBlock to be invoked siblings array as its context");if(this.processedNodes.has(i))return null;let o=null;switch(i.name){case"defer":o=BY(i,this.findConnectedBlocks(t,e,JT),this,this.bindingParser);break;case"switch":o=uY(i,this,this.bindingParser);break;case"for":o=pY(i,this.findConnectedBlocks(t,e,yN),this,this.bindingParser);break;case"if":o=mY(i,this.findConnectedBlocks(t,e,SN),this,this.bindingParser);break;default:let r;JT(i.name)?(r=`@${i.name} block can only be used after an @defer block.`,this.processedNodes.add(i)):yN(i.name)?(r=`@${i.name} block can only be used after an @for block.`,this.processedNodes.add(i)):SN(i.name)?(r=`@${i.name} block can only be used after an @if or @else if block.`,this.processedNodes.add(i)):r=`Unrecognized block @${i.name}.`,o={node:new x1(i.name,i.sourceSpan,i.nameSpan),errors:[new sn(i.sourceSpan,r)]};break}return this.errors.push(...o.errors),o.node}findConnectedBlocks(i,e,t){let o=[];for(let r=i+1;r{let c=t[a.name];if(a.isLiteral)r.push(new Th(a.name,a.expression.source||"",a.sourceSpan,a.keySpan,a.valueSpan,c));else{let p=this.bindingParser.createBoundElementProperty(i,a,!0,!1);o.push(Yk.fromBoundElementProperty(p,c))}}),{bound:o,literal:r}}prepareAttributes(i,e){let t=[],o=[],r=[],a=[],c=[],p={},u=[],h=[],_=!1;for(let S of i){let x=!1,b=AN(S.name),M=!1;if(S.i18n&&(p[S.name]=S.i18n),b.startsWith(Ik)){_&&this.reportError("Can't have multiple template bindings on one element. Use only one attribute prefixed with *",S.sourceSpan),M=!0,_=!0;let w=S.value,y=b.substring(Ik.length),E=[],I=S.valueSpan?S.valueSpan.fullStart.offset:S.sourceSpan.fullStart.offset+S.name.length;this.bindingParser.parseInlineTemplateBinding(y,w,S.sourceSpan,I,[],u,E,!0),h.push(...E.map(D=>new sm(D.name,D.value,D.sourceSpan,D.keySpan,D.valueSpan)))}else x=this.parseAttribute(e,S,[],t,o,r,a);!x&&!M&&c.push(this.visitAttribute(S))}return{attributes:c,boundEvents:o,references:a,variables:r,templateVariables:h,elementHasInlineTemplate:_,parsedProperties:t,templateParsedProperties:u,i18nAttrsMeta:p}}parseAttribute(i,e,t,o,r,a,c){let p=AN(e.name),u=e.value,h=e.sourceSpan,_=e.valueSpan?e.valueSpan.fullStart.offset:h.fullStart.offset;function S(y,E,I){let D=e.name.length-p.length,N=y.start.moveBy(E.length+D),P=N.moveBy(I.length);return new gn(N,P,N,I)}let x=p.match(GY);if(x){if(x[kN]!=null){let y=x[Wg],E=S(h,x[kN],y);this.bindingParser.parsePropertyBinding(y,u,!1,!1,h,_,e.valueSpan,t,o,E)}else if(x[TN])if(i){let y=x[Wg],E=S(h,x[TN],y);this.parseVariable(y,u,h,E,e.valueSpan,a)}else this.reportError('"let-" is only supported on ng-template elements.',h);else if(x[EN]){let y=x[Wg],E=S(h,x[EN],y);this.parseReference(y,u,h,E,e.valueSpan,c)}else if(x[DN]){let y=[],E=x[Wg],I=S(h,x[DN],E);this.bindingParser.parseEvent(E,u,!1,h,e.valueSpan||h,t,y,I),Ak(y,r)}else if(x[PN]){let y=x[Wg],E=S(h,x[PN],y);this.bindingParser.parsePropertyBinding(y,u,!1,!0,h,_,e.valueSpan,t,o,E),this.parseAssignmentEvent(y,u,h,e.valueSpan,t,r,E,_)}else if(x[WY]){let y=S(h,"",p);this.bindingParser.parseLiteralAttr(p,u,h,_,e.valueSpan,t,o,y)}return!0}let b=null;if(p.startsWith(Yd.BANANA_BOX.start)?b=Yd.BANANA_BOX:p.startsWith(Yd.PROPERTY.start)?b=Yd.PROPERTY:p.startsWith(Yd.EVENT.start)&&(b=Yd.EVENT),b!==null&&p.endsWith(b.end)&&p.length>b.start.length+b.end.length){let y=p.substring(b.start.length,p.length-b.end.length),E=S(h,b.start,y);if(b.start===Yd.BANANA_BOX.start)this.bindingParser.parsePropertyBinding(y,u,!1,!0,h,_,e.valueSpan,t,o,E),this.parseAssignmentEvent(y,u,h,e.valueSpan,t,r,E,_);else if(b.start===Yd.PROPERTY.start)this.bindingParser.parsePropertyBinding(y,u,!1,!1,h,_,e.valueSpan,t,o,E);else{let I=[];this.bindingParser.parseEvent(y,u,!1,h,e.valueSpan||h,t,I,E),Ak(I,r)}return!0}let M=S(h,"",p);return this.bindingParser.parsePropertyInterpolation(p,u,h,e.valueSpan,t,o,M,e.valueTokens??null)}extractDirectives(i){let e=i instanceof Fa?i.tagName:i.name,t=[],o=new Set;for(let r of i.directives){let a=!1;for(let x of r.attrs)x.name.startsWith(Ik)?(a=!0,this.reportError(`Shorthand template syntax "${x.name}" is not supported inside a directive context`,x.sourceSpan)):QY.has(x.name)&&(a=!0,this.reportError(`Attribute "${x.name}" is not supported in a directive context`,x.sourceSpan));if(!a&&o.has(r.name)&&(a=!0,this.reportError(`Cannot apply directive "${r.name}" multiple times on the same element`,r.sourceSpan)),a)continue;let{attributes:c,parsedProperties:p,boundEvents:u,references:h,i18nAttrsMeta:_}=this.prepareAttributes(r.attrs,!1);this.validateSelectorlessReferences(h);let{bound:S}=this.categorizePropertyAttributes(e,p,_);for(let x of S)x.type!==Ti.Property&&x.type!==Ti.TwoWay&&(a=!0,this.reportError("Binding is not supported in a directive context",x.sourceSpan));a||(o.add(r.name),t.push(new QN(r.name,c,S,u,h,r.sourceSpan,r.startSourceSpan,r.endSourceSpan,void 0)))}return t}filterAnimationAttributes(i){return i.filter(e=>!e.name.startsWith("animate."))}filterAnimationInputs(i){return i.filter(e=>e.type!==Ti.Animation)}wrapInTemplate(i,e,t,o,r,a){let c=this.categorizePropertyAttributes("ng-template",e,o),p=[];c.literal.forEach(S=>p.push(S)),c.bound.forEach(S=>p.push(S));let u={attributes:[],inputs:[],outputs:[]};(i instanceof kc||i instanceof e_)&&(u.attributes.push(...this.filterAnimationAttributes(i.attributes)),u.inputs.push(...this.filterAnimationInputs(i.inputs)),u.outputs.push(...i.outputs));let h=r&&a?void 0:i.i18n,_;return i instanceof e_?_=i.tagName:i instanceof ks?_=null:_=i.name,new ks(_,u.attributes,u.inputs,u.outputs,[],p,[i],[],t,!1,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,h)}_visitTextWithInterpolation(i,e,t,o){let r=RF(i),a=this.bindingParser.parseInterpolation(r,e,t);return a?new kh(a,e,o):new Dp(r,e)}parseVariable(i,e,t,o,r,a){i.indexOf("-")>-1?this.reportError('"-" is not allowed in variable names',t):i.length===0&&this.reportError("Variable does not have a name",t),a.push(new sm(i,e,t,o,r))}parseReference(i,e,t,o,r,a){i.indexOf("-")>-1?this.reportError('"-" is not allowed in reference names',t):i.length===0?this.reportError("Reference does not have a name",t):a.some(c=>c.name===i)&&this.reportError(`Reference "#${i}" is defined more than once`,t),a.push(new N_(i,e,t,o,r))}parseAssignmentEvent(i,e,t,o,r,a,c,p){let u=[];this.bindingParser.parseEvent(`${i}Change`,e,!0,t,o||t,r,u,c),Ak(u,a)}validateSelectorlessReferences(i){if(i.length===0)return;let e=new Set;for(let t of i)t.value.length>0?this.reportError("Cannot specify a value for a local reference in this context",t.valueSpan||t.sourceSpan):e.has(t.name)?this.reportError("Duplicate reference names are not allowed",t.sourceSpan):e.add(t.name)}reportError(i,e,t=nm.ERROR){this.errors.push(new sn(e,i,t))}},tE=class{visitElement(i){let e=o6(i);if(e.type===ws.SCRIPT||e.type===ws.STYLE||e.type===ws.STYLESHEET)return null;let t=Co(this,i.children,null);return new kc(i.name,Co(this,i.attrs),[],[],[],t,[],i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,i.isVoid)}visitComment(i){return null}visitAttribute(i){return new Th(i.name,i.value,i.sourceSpan,i.keySpan,i.valueSpan,i.i18n)}visitText(i){return new Dp(i.value,i.sourceSpan)}visitExpansion(i){return null}visitExpansionCase(i){return null}visitBlock(i,e){let t=[new Dp(i.startSourceSpan.toString(),i.startSourceSpan),...Co(this,i.children)];return i.endSourceSpan!==null&&t.push(new Dp(i.endSourceSpan.toString(),i.endSourceSpan)),t}visitBlockParameter(i,e){return null}visitLetDeclaration(i,e){return new Dp(`@let ${i.name} = ${i.value};`,i.sourceSpan)}visitComponent(i,e){let t=Co(this,i.children,null);return new kc(i.fullName,Co(this,i.attrs),[],[],[],t,[],i.isSelfClosing,i.sourceSpan,i.startSourceSpan,i.endSourceSpan,!1)}visitDirective(i,e){return null}},IN=new tE;function AN(n){return/^data-/i.test(n)?n.substring(5):n}function Ak(n,i){i.push(...n.map(e=>Zk.fromParsedEvent(e)))}function KY(n){return n.children.length!==1||!(n.children[0]instanceof Jp)?null:n.children[0].value}var YY=[" ",` +`,"\r"," "];function ZY(n,i,e={}){let{preserveWhitespaces:t,enableI18nLegacyMessageIdFormat:o}=e,r=e.enableSelectorless??!1,a=Z1(r),p=new WT().parse(n,i,it(K({leadingTriviaChars:YY},e),{tokenizeExpansionForms:!0,tokenizeBlocks:e.enableBlockSyntax??!0,tokenizeLet:e.enableLetSyntax??!0,selectorlessEnabled:r}));if(!e.alwaysAttemptHtmlToR3AstConversion&&p.errors&&p.errors.length>0){let D={preserveWhitespaces:t,errors:p.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(D.commentNodes=[]),D}let u=p.rootNodes,h=!(e.preserveSignificantWhitespace??!0),_=new W1(!t,o,e.preserveSignificantWhitespace,h),S=_.visitAllWithErrors(u);if(!e.alwaysAttemptHtmlToR3AstConversion&&S.errors&&S.errors.length>0){let D={preserveWhitespaces:t,errors:S.errors,nodes:[],styleUrls:[],styles:[],ngContentSelectors:[]};return e.collectCommentNodes&&(D.commentNodes=[]),D}u=S.rootNodes,t||(u=Co(new U1(!0,void 0,!1),u),_.hasI18nMeta&&(u=Co(new W1(!1,void 0,!0,h),u)));let{nodes:x,errors:b,styleUrls:M,styles:w,ngContentSelectors:y,commentNodes:E}=XY(u,a,{collectCommentNodes:!!e.collectCommentNodes});b.push(...p.errors,...S.errors);let I={preserveWhitespaces:t,errors:b.length>0?b:null,nodes:x,styleUrls:M,styles:w,ngContentSelectors:y};return e.collectCommentNodes&&(I.commentNodes=E),I}var JY=new Rh;function Z1(n=!1){return new qT(new G1(new e0,n),JY,[])}var a6="%COMP%",eZ=`_nghost-${a6}`,tZ=`_ngcontent-${a6}`;function s6(n,i,e){let t=new dm,o=pE(n.selector);return t.set("type",n.type.value),o.length>0&&t.set("selectors",mh(o)),n.queries.length>0&&t.set("contentQueries",HK(n.queries,i,n.name)),n.viewQueries.length&&t.set("viewQuery",$K(n.viewQueries,i,n.name)),t.set("hostBindings",cZ(n.host,n.typeSourceSpan,e,i,n.selector||"",n.name,t)),t.set("inputs",s5(n.inputs,!0)),t.set("outputs",s5(n.outputs)),n.exportAs!==null&&t.set("exportAs",Gi(n.exportAs.map(r=>Te(r)))),n.isStandalone===!1&&t.set("standalone",Te(!1)),n.isSignal&&t.set("signals",Te(!0)),t}function l6(n,i){let e=[],t=i.providers,o=i.viewProviders;if(t||o){let r=[t||new wc([])];o&&r.push(o),e.push(Ut(fe.ProvidersFeature).callFn(r))}if(i.hostDirectives?.length&&e.push(Ut(fe.HostDirectivesFeature).callFn([hZ(i.hostDirectives)])),i.usesInheritance&&e.push(Ut(fe.InheritDefinitionFeature)),i.lifecycle.usesOnChanges&&e.push(Ut(fe.NgOnChangesFeature)),i.controlCreate!==null&&e.push(Ut(fe.ControlFeature).callFn([Te(i.controlCreate.passThroughInput)])),"externalStyles"in i&&i.externalStyles?.length){let r=i.externalStyles.map(a=>Te(a));e.push(Ut(fe.ExternalStylesFeature).callFn([Gi(r)]))}e.length&&n.set("features",Gi(e))}function nZ(n,i,e){let t=s6(n,i,e);l6(t,n);let o=Ut(fe.defineDirective).callFn([t.toLiteralMap()],void 0,!0),r=lZ(n);return{expression:o,type:r,statements:[]}}function iZ(n,i,e){let t=s6(n,i,e);l6(t,n);let o=n.selector&&vh.parse(n.selector),r=o&&o[0];if(r){let b=r.getAttrs();b.length&&t.set("attrs",i.getConstLiteral(Gi(b.map(M=>M!=null?Te(M):Te(void 0))),!0))}let a=n.name,c=null;if(n.defer.mode===1&&n.defer.dependenciesFn!==null){let b=`${a}_DeferFn`;i.statements.push(new Rr(b,n.defer.dependenciesFn,void 0,oa.Final)),c=Yn(b)}let p=n.isStandalone&&!n.hasDirectiveDependencies?Za.DomOnly:Za.Full,u=_K(n.name,n.template.nodes,i,p,n.relativeContextFilePath,n.i18nUseExternalIds,n.defer,c,n.relativeTemplatePath,BK());QF(u,Et.Tmpl);let h=uK(u,i);if(u.contentSelectors!==null&&t.set("ngContentSelectors",u.contentSelectors),t.set("decls",Te(u.root.decls)),t.set("vars",Te(u.root.vars)),u.consts.length>0&&(u.constsInitializers.length>0?t.set("consts",Ds([],[...u.constsInitializers,new xr(Gi(u.consts))])):t.set("consts",Gi(u.consts))),t.set("template",h),n.declarationListEmitMode!==3&&n.declarations.length>0)t.set("dependencies",rZ(Gi(n.declarations.map(b=>b.type)),n.declarationListEmitMode));else if(n.declarationListEmitMode===3){let b=[n.type.value];n.rawImports&&b.push(n.rawImports),t.set("dependencies",Ut(fe.getComponentDepsFactory).callFn(b))}n.encapsulation===null&&(n.encapsulation=Sp.Emulated);let _=!!n.externalStyles?.length;if(n.styles&&n.styles.length){let M=(n.encapsulation==Sp.Emulated?uZ(n.styles,tZ,eZ):n.styles).reduce((w,y)=>(y.trim().length>0&&w.push(i.getConstLiteral(Te(y))),w),[]);M.length>0&&(_=!0,t.set("styles",Gi(M)))}!_&&n.encapsulation===Sp.Emulated&&(n.encapsulation=Sp.None),n.encapsulation!==Sp.Emulated&&t.set("encapsulation",Te(n.encapsulation)),n.animations!==null&&t.set("data",nl([{key:"animation",value:n.animations,quoted:!1}])),n.changeDetection!==null&&(typeof n.changeDetection=="number"&&n.changeDetection!==mE.Default?t.set("changeDetection",Te(n.changeDetection)):typeof n.changeDetection=="object"&&t.set("changeDetection",n.changeDetection));let S=Ut(fe.defineComponent).callFn([t.toLiteralMap()],void 0,!0),x=oZ(n);return{expression:S,type:x,statements:[]}}function oZ(n){let i=c6(n);return i.push(iE(n.template.ngContentSelectors)),i.push(ra(Te(n.isStandalone))),i.push(d6(n)),n.isSignal&&i.push(ra(Te(n.isSignal))),ra(Ut(fe.ComponentDeclaration,i))}function rZ(n,i){switch(i){case 0:return n;case 1:return Ds([],n);case 2:let e=n.prop("map").callFn([Ut(fe.resolveForwardRef)]);return Ds([],e);case 3:throw new Error("Unsupported with an array of pre-resolved dependencies")}}function aZ(n){return ra(Te(n))}function nE(n){let i=Object.keys(n).map(e=>{let t=Array.isArray(n[e])?n[e][0]:n[e];return{key:e,value:Te(t),quoted:!0}});return nl(i)}function iE(n){return n.length>0?ra(Gi(n.map(i=>Te(i)))):yc}function c6(n){let i=n.selector!==null?n.selector.replace(/\n/g,""):null;return[nb(n.type.type,n.typeArgumentCount),i!==null?aZ(i):yc,n.exportAs!==null?iE(n.exportAs):yc,ra(sZ(n)),ra(nE(n.outputs)),iE(n.queries.map(e=>e.propertyName))]}function sZ(n){return nl(Object.keys(n.inputs).map(i=>{let e=n.inputs[i],t=[{key:"alias",value:Te(e.bindingPropertyName),quoted:!0},{key:"required",value:Te(e.required),quoted:!0}];return e.isSignal&&t.push({key:"isSignal",value:Te(e.isSignal),quoted:!0}),{key:i,value:nl(t),quoted:!0}}))}function lZ(n){let i=c6(n);return i.push(yc),i.push(ra(Te(n.isStandalone))),i.push(d6(n)),n.isSignal&&i.push(ra(Te(n.isSignal))),ra(Ut(fe.DirectiveDeclaration,i))}function cZ(n,i,e,t,o,r,a){let c=e.createBoundHostProperties(n.properties,i),p=e.createDirectiveHostEventAsts(n.listeners,i);n.specialAttributes.styleAttr&&(n.attributes.style=Te(n.specialAttributes.styleAttr)),n.specialAttributes.classAttr&&(n.attributes.class=Te(n.specialAttributes.classAttr));let u=vK({componentName:r,componentSelector:o,properties:c,events:p,attributes:n.attributes},e,t);QF(u,Et.Host),a.set("hostAttrs",u.root.attributes);let h=u.root.vars;return h!==null&&h>0&&a.set("hostVars",Te(h)),hK(u)}var dZ=/^(?:\[([^\]]+)\])|(?:\(([^\)]+)\))$/;function mZ(n){let i={},e={},t={},o={};for(let r of Object.keys(n)){let a=n[r],c=r.match(dZ);if(c===null)switch(r){case"class":if(typeof a!="string")throw new Error("Class binding must be string");o.classAttr=a;break;case"style":if(typeof a!="string")throw new Error("Style binding must be string");o.styleAttr=a;break;default:typeof a=="string"?i[r]=Te(a):i[r]=a}else if(c[1]!=null){if(typeof a!="string")throw new Error("Property binding must be string");t[c[1]]=a}else if(c[2]!=null){if(typeof a!="string")throw new Error("Event binding must be string");e[c[2]]=a}}return{attributes:i,listeners:e,properties:t,specialAttributes:o}}function pZ(n,i){let e=Z1();return e.createDirectiveHostEventAsts(n.listeners,i),e.createBoundHostProperties(n.properties,i),e.errors}function uZ(n,i,e){let t=new uT;return n.map(o=>t.shimCssText(o,i,e))}function d6(n){return n.hostDirectives?.length?ra(Gi(n.hostDirectives.map(i=>nl([{key:"directive",value:r0(i.directive.type),quoted:!1},{key:"inputs",value:nE(i.inputs||{}),quoted:!1},{key:"outputs",value:nE(i.outputs||{}),quoted:!1}])))):yc}function hZ(n){let i=[],e=!1;for(let t of n){if(!t.inputs&&!t.outputs)i.push(t.directive.type);else{let o=[{key:"directive",value:t.directive.type,quoted:!1}];if(t.inputs){let r=ON(t.inputs);r&&o.push({key:"inputs",value:r,quoted:!1})}if(t.outputs){let r=ON(t.outputs);r&&o.push({key:"outputs",value:r,quoted:!1})}i.push(nl(o))}t.isForwardReference&&(e=!0)}return e?new om([],[new xr(Gi(i))]):Gi(i)}function ON(n){let i=[];for(let e in n)n.hasOwnProperty(e)&&i.push(Te(e),Te(n[e]));return i.length>0?Gi(i):null}var oE=class extends Mh{visit(i){i instanceof ts?this.visit(i.ast):i.visit(this)}visitElement(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitTemplate(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.templateAttrs),this.visitAllTemplateNodes(i.variables),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitContent(i){this.visitAllTemplateNodes(i.children)}visitBoundAttribute(i){this.visit(i.value)}visitBoundEvent(i){this.visit(i.handler)}visitBoundText(i){this.visit(i.value)}visitIcu(i){Object.keys(i.vars).forEach(e=>this.visit(i.vars[e])),Object.keys(i.placeholders).forEach(e=>this.visit(i.placeholders[e]))}visitDeferredBlock(i){i.visitAll(this)}visitDeferredTrigger(i){i instanceof g1?this.visit(i.value):i instanceof E_&&i.options!==null&&this.visit(i.options)}visitDeferredBlockPlaceholder(i){this.visitAllTemplateNodes(i.children)}visitDeferredBlockError(i){this.visitAllTemplateNodes(i.children)}visitDeferredBlockLoading(i){this.visitAllTemplateNodes(i.children)}visitSwitchBlock(i){this.visit(i.expression),this.visitAllTemplateNodes(i.groups)}visitSwitchBlockCase(i){i.expression&&this.visit(i.expression)}visitSwitchBlockCaseGroup(i){this.visitAllTemplateNodes(i.cases),this.visitAllTemplateNodes(i.children)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.item.visit(this),this.visitAllTemplateNodes(i.contextVariables),this.visit(i.expression),this.visitAllTemplateNodes(i.children),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.visitAllTemplateNodes(i.children)}visitIfBlock(i){this.visitAllTemplateNodes(i.branches)}visitIfBlockBranch(i){i.expression&&this.visit(i.expression),i.expressionAlias?.visit(this),this.visitAllTemplateNodes(i.children)}visitLetDeclaration(i){this.visit(i.value)}visitComponent(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.directives),this.visitAllTemplateNodes(i.references),this.visitAllTemplateNodes(i.children)}visitDirective(i){this.visitAllTemplateNodes(i.attributes),this.visitAllTemplateNodes(i.inputs),this.visitAllTemplateNodes(i.outputs),this.visitAllTemplateNodes(i.references)}visitVariable(i){}visitReference(i){}visitTextAttribute(i){}visitText(i){}visitUnknownBlock(i){}visitAllTemplateNodes(i){for(let e of i)this.visit(e)}};var rE=class{directiveMatcher;constructor(i){this.directiveMatcher=i}bind(i){if(!i.template&&!i.host)throw new Error("Empty bound targets are not supported");let e=new Map,t=[],o=new Set,r=new Map,a=new Map,c=new Map,p=new Map,u=new Map,h=new Map,_=new Set,S=new Set,x=[];if(i.template){let b=J1.apply(i.template);fZ(b,c),aE.apply(i.template,this.directiveMatcher,e,t,o,r,a),eb.applyWithScope(i.template,b,p,u,h,_,S,x)}return i.host&&(e.set(i.host.node,i.host.directives),eb.applyWithScope(i.host.node,J1.apply(i.host.node),p,u,h,_,S,x)),new sE(i,e,t,o,r,a,p,u,h,c,_,S,x)}},J1=class n{parentScope;rootNode;namedEntities=new Map;elementLikeInScope=new Set;childScopes=new Map;isDeferred;constructor(i,e){this.parentScope=i,this.rootNode=e,this.isDeferred=i!==null&&i.isDeferred?!0:e instanceof qp}static newRootScope(){return new n(null,null)}static apply(i){let e=n.newRootScope();return e.ingest(i),e}ingest(i){i instanceof ks?(i.variables.forEach(e=>this.visitVariable(e)),i.children.forEach(e=>e.visit(this))):i instanceof Ap?(i.expressionAlias!==null&&this.visitVariable(i.expressionAlias),i.children.forEach(e=>e.visit(this))):i instanceof Eh?(this.visitVariable(i.item),i.contextVariables.forEach(e=>this.visitVariable(e)),i.children.forEach(e=>e.visit(this))):i instanceof A_||i instanceof O_||i instanceof qp||i instanceof I_||i instanceof D_||i instanceof P_||i instanceof Dh?i.children.forEach(e=>e.visit(this)):i instanceof F_||i.forEach(e=>e.visit(this))}visitElement(i){this.visitElementLike(i)}visitTemplate(i){i.directives.forEach(e=>e.visit(this)),i.references.forEach(e=>this.visitReference(e)),this.ingestScopedNode(i)}visitVariable(i){this.maybeDeclare(i)}visitReference(i){this.maybeDeclare(i)}visitDeferredBlock(i){this.ingestScopedNode(i),i.placeholder?.visit(this),i.loading?.visit(this),i.error?.visit(this)}visitDeferredBlockPlaceholder(i){this.ingestScopedNode(i)}visitDeferredBlockError(i){this.ingestScopedNode(i)}visitDeferredBlockLoading(i){this.ingestScopedNode(i)}visitSwitchBlock(i){i.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(i){}visitSwitchBlockCaseGroup(i){this.ingestScopedNode(i)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){this.ingestScopedNode(i),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.ingestScopedNode(i)}visitIfBlock(i){i.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(i){this.ingestScopedNode(i)}visitContent(i){this.ingestScopedNode(i)}visitLetDeclaration(i){this.maybeDeclare(i)}visitComponent(i){this.visitElementLike(i)}visitDirective(i){i.references.forEach(e=>this.visitReference(e))}visitBoundAttribute(i){}visitBoundEvent(i){}visitBoundText(i){}visitText(i){}visitTextAttribute(i){}visitIcu(i){}visitDeferredTrigger(i){}visitUnknownBlock(i){}visitElementLike(i){i.directives.forEach(e=>e.visit(this)),i.references.forEach(e=>this.visitReference(e)),i.children.forEach(e=>e.visit(this)),this.elementLikeInScope.add(i)}maybeDeclare(i){this.namedEntities.has(i.name)||this.namedEntities.set(i.name,i)}lookup(i){return this.namedEntities.has(i)?this.namedEntities.get(i):this.parentScope!==null?this.parentScope.lookup(i):null}getChildScope(i){let e=this.childScopes.get(i);if(e===void 0)throw new Error(`Assertion error: child scope for ${i} not found`);return e}ingestScopedNode(i){let e=new n(this,i);e.ingest(i),this.childScopes.set(i,e)}},aE=class n{directiveMatcher;directives;eagerDirectives;missingDirectives;bindings;references;isInDeferBlock=!1;constructor(i,e,t,o,r,a){this.directiveMatcher=i,this.directives=e,this.eagerDirectives=t,this.missingDirectives=o,this.bindings=r,this.references=a}static apply(i,e,t,o,r,a,c){new n(e,t,o,r,a,c).ingest(i)}ingest(i){i.forEach(e=>e.visit(this))}visitElement(i){this.visitElementOrTemplate(i)}visitTemplate(i){this.visitElementOrTemplate(i)}visitDeferredBlock(i){let e=this.isInDeferBlock;this.isInDeferBlock=!0,i.children.forEach(t=>t.visit(this)),this.isInDeferBlock=e,i.placeholder?.visit(this),i.loading?.visit(this),i.error?.visit(this)}visitDeferredBlockPlaceholder(i){i.children.forEach(e=>e.visit(this))}visitDeferredBlockError(i){i.children.forEach(e=>e.visit(this))}visitDeferredBlockLoading(i){i.children.forEach(e=>e.visit(this))}visitSwitchBlock(i){i.groups.forEach(e=>e.visit(this))}visitSwitchBlockCase(i){}visitSwitchBlockCaseGroup(i){i.children.forEach(e=>e.visit(this))}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.item.visit(this),i.contextVariables.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this)),i.empty?.visit(this)}visitForLoopBlockEmpty(i){i.children.forEach(e=>e.visit(this))}visitIfBlock(i){i.branches.forEach(e=>e.visit(this))}visitIfBlockBranch(i){i.expressionAlias?.visit(this),i.children.forEach(e=>e.visit(this))}visitContent(i){i.children.forEach(e=>e.visit(this))}visitComponent(i){if(this.directiveMatcher instanceof QC){let e=this.directiveMatcher.match(i.componentName);e.length>0?this.trackSelectorlessMatchesAndDirectives(i,e):this.missingDirectives.add(i.componentName)}i.directives.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this))}visitDirective(i){if(this.directiveMatcher instanceof QC){let e=this.directiveMatcher.match(i.name);e.length>0?this.trackSelectorlessMatchesAndDirectives(i,e):this.missingDirectives.add(i.name)}}visitElementOrTemplate(i){if(this.directiveMatcher instanceof qC){let e=[],t=rH(i);this.directiveMatcher.match(t,(o,r)=>e.push(...r)),this.trackSelectorBasedBindingsAndDirectives(i,e)}else i.references.forEach(e=>{e.value.trim()===""&&this.references.set(e,i)});i.directives.forEach(e=>e.visit(this)),i.children.forEach(e=>e.visit(this))}trackMatchedDirectives(i,e){e.length>0&&(this.directives.set(i,e),this.isInDeferBlock||this.eagerDirectives.push(...e))}trackSelectorlessMatchesAndDirectives(i,e){if(e.length===0)return;this.trackMatchedDirectives(i,e);let t=(o,r,a)=>{o[a].hasBindingPropertyName(r.name)&&this.bindings.set(r,o)};for(let o of e)i.inputs.forEach(r=>t(o,r,"inputs")),i.attributes.forEach(r=>t(o,r,"inputs")),i.outputs.forEach(r=>t(o,r,"outputs"));i.references.forEach(o=>this.references.set(o,{directive:e[0],node:i}))}trackSelectorBasedBindingsAndDirectives(i,e){this.trackMatchedDirectives(i,e),i.references.forEach(o=>{let r=null;if(o.value.trim()==="")r=e.find(a=>a.isComponent)||null;else if(r=e.find(a=>a.exportAs!==null&&a.exportAs.some(c=>c===o.value))||null,r===null)return;r!==null?this.references.set(o,{directive:r,node:i}):this.references.set(o,i)});let t=(o,r)=>{let a=e.find(p=>p[r].hasBindingPropertyName(o.name)),c=a!==void 0?a:i;this.bindings.set(o,c)};i.inputs.forEach(o=>t(o,"inputs")),i.attributes.forEach(o=>t(o,"inputs")),i instanceof ks&&i.templateAttrs.forEach(o=>t(o,"inputs")),i.outputs.forEach(o=>t(o,"outputs"))}visitVariable(i){}visitReference(i){}visitTextAttribute(i){}visitBoundAttribute(i){}visitBoundEvent(i){}visitBoundAttributeOrEvent(i){}visitText(i){}visitBoundText(i){}visitIcu(i){}visitDeferredTrigger(i){}visitUnknownBlock(i){}visitLetDeclaration(i){}},eb=class n extends oE{bindings;symbols;usedPipes;eagerPipes;deferBlocks;nestingLevel;scope;rootNode;level;visitNode=i=>i.visit(this);constructor(i,e,t,o,r,a,c,p,u){super(),this.bindings=i,this.symbols=e,this.usedPipes=t,this.eagerPipes=o,this.deferBlocks=r,this.nestingLevel=a,this.scope=c,this.rootNode=p,this.level=u}static applyWithScope(i,e,t,o,r,a,c,p){let u=i instanceof ks?i:null;new n(t,o,a,c,p,r,e,u,0).ingest(i)}ingest(i){if(i instanceof ks)i.variables.forEach(this.visitNode),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof Ap)i.expressionAlias!==null&&this.visitNode(i.expressionAlias),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof Eh)this.visitNode(i.item),i.contextVariables.forEach(e=>this.visitNode(e)),i.trackBy.visit(this),i.children.forEach(this.visitNode),this.nestingLevel.set(i,this.level);else if(i instanceof qp){if(this.scope.rootNode!==i)throw new Error(`Assertion error: resolved incorrect scope for deferred block ${i}`);this.deferBlocks.push([i,this.scope]),i.children.forEach(e=>e.visit(this)),this.nestingLevel.set(i,this.level)}else i instanceof A_||i instanceof O_||i instanceof I_||i instanceof D_||i instanceof P_||i instanceof Dh?(i.children.forEach(e=>e.visit(this)),this.nestingLevel.set(i,this.level)):i instanceof F_?this.nestingLevel.set(i,0):i.forEach(this.visitNode)}visitTemplate(i){i.inputs.forEach(this.visitNode),i.outputs.forEach(this.visitNode),i.directives.forEach(this.visitNode),i.templateAttrs.forEach(this.visitNode),i.references.forEach(this.visitNode),this.ingestScopedNode(i)}visitVariable(i){this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitReference(i){this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitDeferredBlock(i){this.ingestScopedNode(i),i.triggers.when?.value.visit(this),i.prefetchTriggers.when?.value.visit(this),i.hydrateTriggers.when?.value.visit(this),i.hydrateTriggers.never?.visit(this),i.placeholder&&this.visitNode(i.placeholder),i.loading&&this.visitNode(i.loading),i.error&&this.visitNode(i.error)}visitDeferredBlockPlaceholder(i){this.ingestScopedNode(i)}visitDeferredBlockError(i){this.ingestScopedNode(i)}visitDeferredBlockLoading(i){this.ingestScopedNode(i)}visitSwitchBlockCase(i){i.expression?.visit(this)}visitSwitchBlockCaseGroup(i){i.cases.forEach(e=>e.visit(this)),this.ingestScopedNode(i)}visitSwitchExhaustiveCheck(i){}visitForLoopBlock(i){i.expression.visit(this),this.ingestScopedNode(i),i.empty?.visit(this)}visitForLoopBlockEmpty(i){this.ingestScopedNode(i)}visitIfBlockBranch(i){i.expression?.visit(this),this.ingestScopedNode(i)}visitContent(i){this.ingestScopedNode(i)}visitLetDeclaration(i){super.visitLetDeclaration(i),this.rootNode!==null&&this.symbols.set(i,this.rootNode)}visitPipe(i,e){return this.usedPipes.add(i.name),this.scope.isDeferred||this.eagerPipes.add(i.name),super.visitPipe(i,e)}visitPropertyRead(i,e){return this.maybeMap(i,i.name),super.visitPropertyRead(i,e)}visitSafePropertyRead(i,e){return this.maybeMap(i,i.name),super.visitSafePropertyRead(i,e)}ingestScopedNode(i){let e=this.scope.getChildScope(i);new n(this.bindings,this.symbols,this.usedPipes,this.eagerPipes,this.deferBlocks,this.nestingLevel,e,i,this.level+1).ingest(i)}maybeMap(i,e){if(!(i.receiver instanceof Mc))return;let t=this.scope.lookup(e);t!==null&&this.bindings.set(i,t)}},sE=class{target;directives;eagerDirectives;missingDirectives;bindings;references;exprTargets;symbols;nestingLevel;scopedNodeEntities;usedPipes;eagerPipes;deferredBlocks;deferredScopes;constructor(i,e,t,o,r,a,c,p,u,h,_,S,x){this.target=i,this.directives=e,this.eagerDirectives=t,this.missingDirectives=o,this.bindings=r,this.references=a,this.exprTargets=c,this.symbols=p,this.nestingLevel=u,this.scopedNodeEntities=h,this.usedPipes=_,this.eagerPipes=S,this.deferredBlocks=x.map(b=>b[0]),this.deferredScopes=new Map(x)}getEntitiesInScope(i){return this.scopedNodeEntities.get(i)??new Set}getDirectivesOfNode(i){return this.directives.get(i)||null}getReferenceTarget(i){return this.references.get(i)||null}getConsumerOfBinding(i){return this.bindings.get(i)||null}getExpressionTarget(i){return this.exprTargets.get(i)||null}getDefinitionNodeOfSymbol(i){return this.symbols.get(i)||null}getNestingLevel(i){return this.nestingLevel.get(i)||0}getUsedDirectives(){let i=new Set;return this.directives.forEach(e=>e.forEach(t=>i.add(t))),Array.from(i.values())}getEagerlyUsedDirectives(){let i=new Set(this.eagerDirectives);return Array.from(i.values())}getUsedPipes(){return Array.from(this.usedPipes)}getEagerlyUsedPipes(){return Array.from(this.eagerPipes)}getDeferBlocks(){return this.deferredBlocks}getDeferredTriggerTarget(i,e){if(!(e instanceof v1)&&!(e instanceof E_)&&!(e instanceof _1))return null;let t=e.reference;if(t===null){let r=null;if(i.placeholder!==null){for(let a of i.placeholder.children)if(!(a instanceof ib)){if(r!==null)return null;a instanceof kc&&(r=a)}}return r}let o=this.findEntityInScope(i,t);if(o instanceof N_&&this.getDefinitionNodeOfSymbol(o)!==i){let r=this.getReferenceTarget(o);if(r!==null)return this.referenceTargetToElement(r)}if(i.placeholder!==null){let r=this.findEntityInScope(i.placeholder,t),a=r instanceof N_?this.getReferenceTarget(r):null;if(a!==null)return this.referenceTargetToElement(a)}return null}isDeferred(i){for(let e of this.deferredBlocks){if(!this.deferredScopes.has(e))continue;let t=[this.deferredScopes.get(e)];for(;t.length>0;){let o=t.pop();if(o.elementLikeInScope.has(i))return!0;t.push(...o.childScopes.values())}}return!1}referencedDirectiveExists(i){return!this.missingDirectives.has(i)}findEntityInScope(i,e){let t=this.getEntitiesInScope(i);for(let o of t)if(o.name===e)return o;return null}referenceTargetToElement(i){return i instanceof kc?i:i instanceof ks||i.node instanceof e_||i.node instanceof QN||i.node instanceof F_?null:this.referenceTargetToElement(i.node)}};function fZ(n,i){let e=new Map;function t(r){if(e.has(r.rootNode))return e.get(r.rootNode);let a=r.namedEntities,c;return r.parentScope!==null?c=new Map([...t(r.parentScope),...a]):c=new Map(a),e.set(r.rootNode,c),c}let o=[n];for(;o.length>0;){let r=o.pop();for(let a of r.childScopes.values())o.push(a);t(r)}for(let[r,a]of e)i.set(r,new Set(a.values()))}var lE=class{},cE=class{jitEvaluator;FactoryTarget=gd;ResourceLoader=lE;elementSchemaRegistry=new Rh;constructor(i=new dT){this.jitEvaluator=i}compilePipe(i,e,t){let o={name:t.name,type:Nr(t.type),typeArgumentCount:0,pipeName:t.pipeName,pure:t.pure,isStandalone:t.isStandalone},r=v5(o);return this.jitExpression(r.expression,i,e,[])}compilePipeDeclaration(i,e,t){let o=AZ(t),r=v5(o);return this.jitExpression(r.expression,i,e,[])}compileInjectable(i,e,t){let{expression:o,statements:r}=l5({name:t.name,type:Nr(t.type),typeArgumentCount:t.typeArgumentCount,providedIn:BN(t.providedIn),useClass:sh(t,"useClass"),useFactory:VN(t,"useFactory"),useValue:sh(t,"useValue"),useExisting:sh(t,"useExisting"),deps:t.deps?.map(h6)},!0);return this.jitExpression(o,i,e,r)}compileInjectableDeclaration(i,e,t){let{expression:o,statements:r}=l5({name:t.type.name,type:Nr(t.type),typeArgumentCount:0,providedIn:BN(t.providedIn),useClass:sh(t,"useClass"),useFactory:VN(t,"useFactory"),useValue:sh(t,"useValue"),useExisting:sh(t,"useExisting"),deps:t.deps?.map(zN)},!0);return this.jitExpression(o,i,e,r)}compileInjector(i,e,t){let o={type:Nr(t.type),providers:t.providers&&t.providers.length>0?new oi(t.providers):null,imports:t.imports.map(a=>new oi(a))},r=_5(o);return this.jitExpression(r.expression,i,e,[])}compileInjectorDeclaration(i,e,t){let o=OZ(t),r=_5(o);return this.jitExpression(r.expression,i,e,[])}compileNgModule(i,e,t){let o={kind:im.Global,type:Nr(t.type),bootstrap:t.bootstrap.map(Nr),declarations:t.declarations.map(Nr),publicDeclarationTypes:null,imports:t.imports.map(Nr),includeImportTypes:!0,exports:t.exports.map(Nr),selectorScopeMode:T1.Inline,containsForwardDecls:!1,schemas:t.schemas?t.schemas.map(Nr):null,id:t.id?new oi(t.id):null},r=MH(o);return this.jitExpression(r.expression,i,e,[])}compileNgModuleDeclaration(i,e,t){let o=kH(t);return this.jitExpression(o,i,e,[])}compileDirective(i,e,t){let o=RN(t);return this.compileDirectiveFromMeta(i,e,o)}compileDirectiveDeclaration(i,e,t){let o=this.createParseSourceSpan("Directive",t.type.name,e),r=p6(t,o);return this.compileDirectiveFromMeta(i,e,r)}compileDirectiveFromMeta(i,e,t){let o=new o1,r=Z1(),a=nZ(t,o,r);return this.jitExpression(a.expression,i,e,o.statements)}compileComponent(i,e,t){let{template:o,defer:r}=u6(t.template,t.name,e,t.preserveWhitespaces,void 0),a=it(K(K({},t),RN(t)),{selector:t.selector||this.elementSchemaRegistry.getDefaultComponentElementName(),template:o,declarations:t.declarations.map(CZ),declarationListEmitMode:0,defer:r,styles:[...t.styles,...o.styles],encapsulation:t.encapsulation,changeDetection:t.changeDetection??null,animations:t.animations!=null?new oi(t.animations):null,viewProviders:t.viewProviders!=null?new oi(t.viewProviders):null,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null}),c=`ng:///${t.name}.js`;return this.compileComponentFromMeta(i,c,a)}compileComponentDeclaration(i,e,t){let o=this.createParseSourceSpan("Component",t.type.name,e),r=vZ(t,o,e);return this.compileComponentFromMeta(i,e,r)}compileComponentFromMeta(i,e,t){let o=new o1,r=Z1(),a=iZ(t,o,r);return this.jitExpression(a.expression,i,e,o.statements)}compileFactory(i,e,t){let o=wp({name:t.name,type:Nr(t.type),typeArgumentCount:t.typeArgumentCount,deps:yZ(t.deps),target:t.target});return this.jitExpression(o.expression,i,e,o.statements)}compileFactoryDeclaration(i,e,t){let o=wp({name:t.type.name,type:Nr(t.type),typeArgumentCount:0,deps:Array.isArray(t.deps)?t.deps.map(zN):t.deps,target:t.target});return this.jitExpression(o.expression,i,e,o.statements)}createParseSourceSpan(i,e,t){return vH(i,e,t)}jitExpression(i,e,t,o){let r=[...o,new Rr("$def",i,void 0,oa.Exported)];return this.jitEvaluator.evaluateStatements(t,r,new pT(e),!0).$def}};function NN(n){return it(K({},n),{isSignal:n.isSignal,predicate:m6(n.predicate),read:n.read?new oi(n.read):null,static:n.static,emitDistinctChangesOnly:n.emitDistinctChangesOnly})}function FN(n){return{propertyName:n.propertyName,first:n.first??!1,predicate:m6(n.predicate),descendants:n.descendants??!1,read:n.read?new oi(n.read):null,static:n.static??!1,emitDistinctChangesOnly:n.emitDistinctChangesOnly??!0,isSignal:!!n.isSignal}}function m6(n){return Array.isArray(n)?n:fE(new oi(n),1)}function RN(n){let i=IZ(n.inputs||[]),e=Nk(n.outputs||[]),t=n.propMetadata,o={},r={};for(let c in t)t.hasOwnProperty(c)&&t[c].forEach(p=>{TZ(p)?o[c]={bindingPropertyName:p.alias||c,classPropertyName:c,required:p.required||!1,isSignal:!!p.isSignal,transformFunction:p.transform!=null?new oi(p.transform):null}:EZ(p)&&(r[c]=p.alias||c)});let a=n.hostDirectives?.length?n.hostDirectives.map(c=>typeof c=="function"?{directive:Nr(c),inputs:null,outputs:null,isForwardReference:!1}:{directive:Nr(c.directive),isForwardReference:!1,inputs:c.inputs?Nk(c.inputs):null,outputs:c.outputs?Nk(c.outputs):null}):null;return it(K({},n),{typeArgumentCount:0,typeSourceSpan:n.typeSourceSpan,type:Nr(n.type),deps:null,host:K({},wZ(n.propMetadata,n.typeSourceSpan,n.host)),inputs:K(K({},i),o),outputs:K(K({},e),r),queries:n.queries.map(NN),providers:n.providers!=null?new oi(n.providers):null,viewQueries:n.viewQueries.map(NN),hostDirectives:a})}function p6(n,i){let e=n.hostDirectives?.length?n.hostDirectives.map(t=>({directive:Nr(t.directive),isForwardReference:!1,inputs:t.inputs?LN(t.inputs):null,outputs:t.outputs?LN(t.outputs):null})):null;return{name:n.type.name,type:Nr(n.type),typeSourceSpan:i,selector:n.selector??null,inputs:n.inputs?DZ(n.inputs):{},outputs:n.outputs??{},host:gZ(n.host),queries:(n.queries??[]).map(FN),viewQueries:(n.viewQueries??[]).map(FN),providers:n.providers!==void 0?new oi(n.providers):null,exportAs:n.exportAs??null,usesInheritance:n.usesInheritance??!1,controlCreate:n.controlCreate??null,lifecycle:{usesOnChanges:n.usesOnChanges??!1},deps:null,typeArgumentCount:0,isStandalone:n.isStandalone??qN(n.version),isSignal:n.isSignal??!1,hostDirectives:e}}function gZ(n={}){return{attributes:_Z(n.attributes??{}),listeners:n.listeners??{},properties:n.properties??{},specialAttributes:{classAttr:n.classAttribute,styleAttr:n.styleAttribute}}}function LN(n){let i=null;for(let e=1;eOk(c,!0))),n.directives&&r.push(...n.directives.map(c=>Ok(c))),n.pipes&&r.push(...bZ(n.pipes)));let a=r.some(({kind:c})=>c===Ih.Directive||c===Ih.NgModule);return it(K({},p6(n,i)),{template:t,styles:n.styles??[],declarations:r,viewProviders:n.viewProviders!==void 0?new oi(n.viewProviders):null,animations:n.animations!==void 0?new oi(n.animations):null,defer:o,changeDetection:n.changeDetection??mE.Default,encapsulation:n.encapsulation??Sp.Emulated,declarationListEmitMode:2,relativeContextFilePath:"",i18nUseExternalIds:!0,relativeTemplatePath:null,hasDirectiveDependencies:a})}function CZ(n){return it(K({},n),{type:new oi(n.type)})}function Ok(n,i=null){return{kind:Ih.Directive,isComponent:i||n.kind==="component",selector:n.selector,type:new oi(n.type),inputs:n.inputs??[],outputs:n.outputs??[],exportAs:n.exportAs??null}}function bZ(n){return n?Object.keys(n).map(i=>({kind:Ih.Pipe,name:i,type:new oi(n[i])})):[]}function xZ(n){return{kind:Ih.Pipe,name:n.name,type:new oi(n.type)}}function u6(n,i,e,t,o){let r=ZY(n,e,{preserveWhitespaces:t});if(r.errors!==null){let p=r.errors.map(u=>u.toString()).join(", ");throw new Error(`Errors during JIT compilation of template for ${i}: ${p}`)}let c=new rE(null).bind({template:r.nodes});return{template:r,defer:SZ(c,o)}}function sh(n,i){if(n.hasOwnProperty(i))return fE(new oi(n[i]),0)}function VN(n,i){if(n.hasOwnProperty(i))return new oi(n[i])}function BN(n){let i=typeof n=="function"?new oi(n):new aa(n??null);return fE(i,0)}function yZ(n){return n==null?null:n.map(h6)}function h6(n){let i=n.attribute!=null,e=n.token===null?null:new oi(n.token),t=i?new oi(n.attribute):e;return f6(t,i,n.host,n.optional,n.self,n.skipSelf)}function zN(n){let i=n.attribute??!1,e=n.token===null?null:new oi(n.token);return f6(e,i,n.host??!1,n.optional??!1,n.self??!1,n.skipSelf??!1)}function f6(n,i,e,t,o,r){let a=i?Te("unknown"):null;return{token:n,attributeNameType:a,host:e,optional:t,self:o,skipSelf:r}}function SZ(n,i){let e=n.getDeferBlocks(),t=new Map;for(let o=0;or.msg).join(` +`));for(let r in n)n.hasOwnProperty(r)&&n[r].forEach(a=>{MZ(a)?t.properties[a.hostPropertyName||r]=j$("this",r):kZ(a)&&(t.listeners[a.eventName||r]=`${r}(${(a.args||[]).join(",")})`)});return t}function MZ(n){return n.ngMetadataName==="HostBinding"}function kZ(n){return n.ngMetadataName==="HostListener"}function TZ(n){return n.ngMetadataName==="Input"}function EZ(n){return n.ngMetadataName==="Output"}function DZ(n){return Object.keys(n).reduce((i,e)=>{let t=n[e];return typeof t=="string"||Array.isArray(t)?i[e]=PZ(t):i[e]={bindingPropertyName:t.publicName,classPropertyName:e,transformFunction:t.transformFunction!==null?new oi(t.transformFunction):null,required:t.isRequired,isSignal:t.isSignal},i},{})}function PZ(n){return typeof n=="string"?{bindingPropertyName:n,classPropertyName:n,transformFunction:null,required:!1,isSignal:!1}:{bindingPropertyName:n[0],classPropertyName:n[1],transformFunction:n[2]?new oi(n[2]):null,required:!1,isSignal:!1}}function IZ(n){return n.reduce((i,e)=>{if(typeof e=="string"){let[t,o]=g6(e);i[o]={bindingPropertyName:t,classPropertyName:o,required:!1,isSignal:!1,transformFunction:null}}else i[e.name]={bindingPropertyName:e.alias||e.name,classPropertyName:e.name,required:e.required||!1,isSignal:!1,transformFunction:e.transform!=null?new oi(e.transform):null};return i},{})}function Nk(n){return n.reduce((i,e)=>{let[t,o]=g6(e);return i[o]=t,i},{})}function g6(n){let[i,e]=n.split(":",2).map(t=>t.trim());return[e??i,i]}function AZ(n){return{name:n.type.name,type:Nr(n.type),typeArgumentCount:0,pipeName:n.name,deps:null,pure:n.pure??!0,isStandalone:n.isStandalone??qN(n.version)}}function OZ(n){return{name:n.type.name,type:Nr(n.type),providers:n.providers!==void 0&&n.providers.length>0?new oi(n.providers):null,imports:n.imports!==void 0?n.imports.map(i=>new oi(i)):[]}}function NZ(n){let i=n.ng||(n.ng={});i.\u0275compilerFacade=new cE}var dE=class{closedByParent=!1;implicitNamespacePrefix=null;isVoid=!1;ignoreFirstLf=!1;canSelfClose=!0;preventNamespaceInheritance=!1;requireExtraParent(i){return!1}isClosedByChild(i){return!1}getContentType(){return gc.PARSABLE_DATA}},_5e=new dE;var v5e=new jk("21.2.6");NZ(Jg);function RE(n){let i=n.cloneNode(!0),e=i.querySelectorAll("[id]"),t=n.nodeName.toLowerCase();i.removeAttribute("id");for(let o=0;o=t&&e<=o&&i>=r&&i<=a}function LZ(n,i){let e=i.leftn.right,o=i.topn.bottom;return e||t||o||r}function p0(n,i,e){n.top+=i,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function b6(n,i,e,t){let{top:o,right:r,bottom:a,left:c,width:p,height:u}=n,h=p*i,_=u*i;return t>o-_&&tc-h&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:$E(e)})})}handleScroll(i){let e=Cp(i),t=this.positions.get(e);if(!t)return null;let o=t.scrollPosition,r,a;if(e===this._document){let u=this.getViewportScrollPosition();r=u.top,a=u.left}else r=e.scrollTop,a=e.scrollLeft;let c=o.top-r,p=o.left-a;return this.positions.forEach((u,h)=>{u.clientRect&&e!==h&&e.contains(h)&&p0(u.clientRect,c,p)}),o.top=r,o.left=a,{top:c,left:p}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function A6(n,i){let e=n.rootNodes;if(e.length===1&&e[0].nodeType===i.ELEMENT_NODE)return e[0];let t=i.createElement("div");return e.forEach(o=>t.appendChild(o)),t}function HE(n,i,e){for(let t in i)if(i.hasOwnProperty(t)){let o=i[t];o?n.setProperty(t,o,e?.has(t)?"important":""):n.removeProperty(t)}return n}function Hh(n,i){let e=i?"":"none";HE(n.style,{"touch-action":i?"":"none","-webkit-user-drag":i?"":"none","-webkit-tap-highlight-color":i?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function x6(n,i,e){HE(n.style,{position:i?"":"fixed",top:i?"":"0",opacity:i?"":"0",left:i?"":"-999em"},e)}function db(n,i){return i&&i!="none"?n+" "+i:n}function y6(n,i){n.style.width=`${i.width}px`,n.style.height=`${i.height}px`,n.style.transform=u0(i.left,i.top)}function u0(n,i){return`translate3d(${Math.round(n)}px, ${Math.round(i)}px, 0)`}var d0={capture:!0},NE={passive:!1,capture:!0},VZ=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(t,o){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important} +`],encapsulation:2,changeDetection:0})}return n})(),O6=(()=>{class n{_ngZone=f(Vi);_document=f(Xi);_styleLoader=f(cr);_renderer=f(sd).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new He;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=ae([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new He;pointerUp=new He;constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,NE)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(e,t){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(VZ),this._activeDragInstances.update(o=>[...o,e]),this._activeDragInstances().length===1)){let o=t.type.startsWith("touch"),r=c=>this.pointerUp.next(c),a=[["scroll",c=>this._scroll.next(c),d0],["selectstart",this._preventDefaultWhileDragging,NE]];o?a.push(["touchend",r,d0],["touchcancel",r,d0]):a.push(["mouseup",r,d0]),o||a.push(["mousemove",c=>this.pointerMove.next(c),NE]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=a.map(([c,p,u])=>this._renderer.listen(this._document,c,p,u))})}}stopDragging(e){this._activeDragInstances.update(t=>{let o=t.indexOf(e);return o>-1?(t.splice(o,1),[...t]):t}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let t=[this._scroll];return e&&e!==this._document&&t.push(new Dr(o=>this._ngZone.runOutsideAngular(()=>{let r=this._renderer.listen(e,"scroll",a=>{this._activeDragInstances().length&&o.next(a)},d0);return()=>{r()}}))),Hn(...t)}registerDirectiveNode(e,t){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,t)}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e)}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function S6(n){let i=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*i}function BZ(n){let i=getComputedStyle(n),e=FE(i,"transition-property"),t=e.find(c=>c==="transform"||c==="all");if(!t)return 0;let o=e.indexOf(t),r=FE(i,"transition-duration"),a=FE(i,"transition-delay");return S6(r[o])+S6(a[o])}function FE(n,i){return n.getPropertyValue(i).split(",").map(t=>t.trim())}var zZ=new Set(["position"]),VE=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview}constructor(i,e,t,o,r,a,c,p,u,h){this._document=i,this._rootElement=e,this._direction=t,this._initialDomRect=o,this._previewTemplate=r,this._previewClass=a,this._pickupPositionOnPage=c,this._initialTransform=p,this._zIndex=u,this._renderer=h}attach(i){this._preview=this._createPreview(),i.appendChild(this._preview),w6(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(i){this._preview.style.transform=i}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(i){this._preview.classList.add(i)}getTransitionDuration(){return BZ(this._preview)}addEventListener(i,e){return this._renderer.listen(this._preview,i,e)}_createPreview(){let i=this._previewTemplate,e=this._previewClass,t=i?i.template:null,o;if(t&&i){let r=i.matchSize?this._initialDomRect:null,a=i.viewContainer.createEmbeddedView(t,i.context);a.detectChanges(),o=A6(a,this._document),this._previewEmbeddedView=a,i.matchSize?y6(o,r):o.style.transform=u0(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else o=RE(this._rootElement),y6(o,this._initialDomRect),this._initialTransform&&(o.style.transform=this._initialTransform);return HE(o.style,{"pointer-events":"none",margin:w6(o)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},zZ),Hh(o,!1),o.classList.add("cdk-drag-preview"),o.setAttribute("popover","manual"),o.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(r=>o.classList.add(r)):o.classList.add(e)),o}};function w6(n){return"showPopover"in n}var jZ={passive:!0},M6={passive:!1},$Z={passive:!1,capture:!0},HZ=800,k6="cdk-drag-placeholder",T6=new Set(["position"]);function UZ(n,i,e={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let t=n.get(Si,null,{optional:!0})||n.get(sd).createRenderer(null,null);return new BE(i,e,n.get(Xi),n.get(Vi),n.get(dd),n.get(O6),t)}var BE=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=ae(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new He;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=So.EMPTY;_pointerUpSubscription=So.EMPTY;_scrollSubscription=So.EMPTY;_resizeSubscription=So.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(i){i!==this._disabled&&(this._disabled=i,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Hh(e,i)))}_disabled=!1;beforeStarted=new He;started=new He;released=new He;ended=new He;entered=new He;exited=new He;dropped=new He;moved=this._moveEvents;data;constrainPosition;constructor(i,e,t,o,r,a,c){this._config=e,this._document=t,this._ngZone=o,this._viewportRuler=r,this._dragDropRegistry=a,this._renderer=c,this.withRootElement(i).withParent(e.parentDragRef||null),this._parentPositions=new cb(t),a.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(i){this._handles=i.map(t=>Al(t)),this._handles.forEach(t=>Hh(t,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(t=>{this._handles.indexOf(t)>-1&&e.add(t)}),this._disabledHandles=e,this}withPreviewTemplate(i){return this._previewTemplate=i,this}withPlaceholderTemplate(i){return this._placeholderTemplate=i,this}withRootElement(i){let e=Al(i);if(e!==this._rootElement){this._removeRootElementListeners();let t=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[t.listen(e,"mousedown",this._pointerDown,M6),t.listen(e,"touchstart",this._pointerDown,jZ),t.listen(e,"dragstart",this._nativeDragStart,M6)]),this._initialTransform=void 0,this._rootElement=e}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(i){return this._boundaryElement=i?Al(i):null,this._resizeSubscription.unsubscribe(),i&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(i){return this._parentDragRef=i,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&LZ(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let i=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),t=0,o=0;e.lefti.right&&(t=i.right-e.right),e.topi.bottom&&(o=i.bottom-e.bottom);let r=this._activeTransform.x,a=this._activeTransform.y,c=r+t,p=a+o;this._rootElement.style.transform=u0(c,p),this._activeTransform={x:c,y:p},this._passiveTransform={x:c,y:p}}}disableHandle(i){!this._disabledHandles.has(i)&&this._handles.indexOf(i)>-1&&(this._disabledHandles.add(i),Hh(i,!0))}enableHandle(i){this._disabledHandles.has(i)&&(this._disabledHandles.delete(i),Hh(i,this.disabled))}withDirection(i){return this._direction=i,this}_withDropContainer(i){this._dropContainer=i}getFreeDragPosition(){let i=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:i.x,y:i.y}}setFreeDragPosition(i){return this._activeTransform={x:0,y:0},this._passiveTransform.x=i.x,this._passiveTransform.y=i.y,this._dropContainer||this._applyRootElementTransform(i.x,i.y),this}withPreviewContainer(i){return this._previewContainer=i,this}_sortFromLastPointerPosition(){let i=this._lastKnownPointerPosition;i&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(i),i)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=i=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,i)}else this.disabled||this._initializeDragSequence(this._rootElement,i)};_pointerMove=i=>{let e=this._getPointerPositionOnPage(i);if(!this._hasStartedDragging()){let o=Math.abs(e.x-this._pickupPositionOnPage.x),r=Math.abs(e.y-this._pickupPositionOnPage.y);if(o+r>=this._config.dragStartThreshold){let c=Date.now()>=this._dragStartTime+this._getDragStartDelay(i),p=this._dropContainer;if(!c){this._endDragSequence(i);return}(!p||!p.isDragging()&&!p.isReceiving())&&(i.cancelable&&i.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(i)))}return}i.cancelable&&i.preventDefault();let t=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(t),this._dropContainer)this._updateActiveDropContainer(t,e);else{let o=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=t.x-o.x+this._passiveTransform.x,r.y=t.y-o.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:t,event:i,distance:this._getDragDistance(t),delta:this._pointerDirectionDelta})})};_pointerUp=i=>{this._endDragSequence(i)};_endDragSequence(i){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:i}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(i),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(i);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:i})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(i){m0(i)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),t=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(e,"selectstart",GZ,$Z)}),t){let o=this._rootElement,r=o.parentNode,a=this._placeholder=this._createPlaceholderElement(),c=this._marker=this._marker||this._document.createComment("");r.insertBefore(c,o),this._initialTransform=o.style.transform||"",this._preview=new VE(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,e)),x6(o,!1,T6),this._document.body.appendChild(r.replaceChild(a,o)),this.started.next({source:this,event:i}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:i}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(i,e){this._parentDragRef&&e.stopPropagation();let t=this.isDragging(),o=m0(e),r=!o&&e.button!==0,a=this._rootElement,c=Cp(e),p=!o&&this._lastTouchEventTime&&this._lastTouchEventTime+HZ>Date.now(),u=o?dC(e):cC(e);if(c&&c.draggable&&e.type==="mousedown"&&e.preventDefault(),t||r||p||u)return;if(this._handles.length){let S=a.style;this._rootElementTapHighlight=S.webkitTapHighlightColor||"",S.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(S=>this._updateOnScroll(S)),this._boundaryElement&&(this._boundaryRect=$E(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,i,e);let _=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:_.x,y:_.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(i){x6(this._rootElement,!0,T6),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,t=e.getItemIndex(this),o=this._getPointerPositionOnPage(i),r=this._getDragDistance(o),a=e._isOverContainer(o.x,o.y);this.ended.next({source:this,distance:r,dropPoint:o,event:i}),this.dropped.next({item:this,currentIndex:t,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:a,distance:r,dropPoint:o,event:i}),e.drop(this,t,this._initialIndex,this._initialContainer,a,r,o,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:i,y:e},{x:t,y:o}){let r=this._initialContainer._getSiblingContainerFromPosition(this,i,e);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,e)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{let a=this._dropContainer.getItemIndex(this),c=this._dropContainer.getItemAtIndex(a+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,c),this._dropContainer=r,this._dropContainer.enter(this,i,e,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(t,o),this._dropContainer._sortItem(this,i,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(i,e):this._applyPreviewTransform(i-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let i=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(i.left,i.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{let o=c=>{(!c||this._preview&&Cp(c)===this._preview.element&&c.propertyName==="transform")&&(a(),t(),clearTimeout(r))},r=setTimeout(o,e*1.5),a=this._preview.addEventListener("transitionend",o)}))}_createPlaceholderElement(){let i=this._placeholderTemplate,e=i?i.template:null,t;return e?(this._placeholderRef=i.viewContainer.createEmbeddedView(e,i.context),this._placeholderRef.detectChanges(),t=A6(this._placeholderRef,this._document)):t=RE(this._rootElement),t.style.pointerEvents="none",t.classList.add(k6),t}_getPointerPositionInElement(i,e,t){let o=e===this._rootElement?null:e,r=o?o.getBoundingClientRect():i,a=m0(t)?t.targetTouches[0]:t,c=this._getViewportScrollPosition(),p=a.pageX-r.left-c.left,u=a.pageY-r.top-c.top;return{x:r.left-i.left+p,y:r.top-i.top+u}}_getPointerPositionOnPage(i){let e=this._getViewportScrollPosition(),t=m0(i)?i.touches[0]||i.changedTouches[0]||{pageX:0,pageY:0}:i,o=t.pageX-e.left,r=t.pageY-e.top;if(this._ownerSVGElement){let a=this._ownerSVGElement.getScreenCTM();if(a){let c=this._ownerSVGElement.createSVGPoint();return c.x=o,c.y=r,c.matrixTransform(a.inverse())}}return{x:o,y:r}}_getConstrainedPointerPosition(i){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:t,y:o}=this.constrainPosition?this.constrainPosition(i,this,this._initialDomRect,this._pickupPositionInElement):i;if(this.lockAxis==="x"||e==="x"?o=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(t=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:r,y:a}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,c=this._boundaryRect,{width:p,height:u}=this._getPreviewRect(),h=c.top+a,_=c.bottom-(u-a),S=c.left+r,x=c.right-(p-r);t=E6(t,S,x),o=E6(o,h,_)}return{x:t,y:o}}_updatePointerDirectionDelta(i){let{x:e,y:t}=i,o=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,a=Math.abs(e-r.x),c=Math.abs(t-r.y);return a>this._config.pointerDirectionChangeThreshold&&(o.x=e>r.x?1:-1,r.x=e),c>this._config.pointerDirectionChangeThreshold&&(o.y=t>r.y?1:-1,r.y=t),o}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let i=this._handles.length>0||!this.isDragging();i!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=i,Hh(this._rootElement,i))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(i=>i()),this._rootElementCleanups=void 0}_applyRootElementTransform(i,e){let t=1/this.scale,o=u0(i*t,e*t),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=db(o,this._initialTransform)}_applyPreviewTransform(i,e){let t=this._previewTemplate?.template?void 0:this._initialTransform,o=u0(i,e);this._preview.setTransform(db(o,t))}_getDragDistance(i){let e=this._pickupPositionOnPage;return e?{x:i.x-e.x,y:i.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:i,y:e}=this._passiveTransform;if(i===0&&e===0||this.isDragging()||!this._boundaryElement)return;let t=this._rootElement.getBoundingClientRect(),o=this._boundaryElement.getBoundingClientRect();if(o.width===0&&o.height===0||t.width===0&&t.height===0)return;let r=o.left-t.left,a=t.right-o.right,c=o.top-t.top,p=t.bottom-o.bottom;o.width>t.width?(r>0&&(i+=r),a>0&&(i-=a)):i=0,o.height>t.height?(c>0&&(e+=c),p>0&&(e-=p)):e=0,(i!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:i})}_getDragStartDelay(i){let e=this.dragStartDelay;return typeof e=="number"?e:m0(i)?e.touch:e?e.mouse:0}_updateOnScroll(i){let e=this._parentPositions.handleScroll(i);if(e){let t=Cp(i);this._boundaryRect&&t!==this._boundaryElement&&t.contains(this._boundaryElement)&&p0(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=sC(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(i,e){let t=this._previewContainer||"global";if(t==="parent")return i;if(t==="global"){let o=this._document;return e||o.fullscreenElement||o.webkitFullscreenElement||o.mozFullScreenElement||o.msFullscreenElement||o.body}return Al(t)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=i=>{if(this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&i.preventDefault()}else this.disabled||i.preventDefault()};_getTargetHandle(i){return this._handles.find(e=>i.target&&(i.target===e||e.contains(i.target)))}_conditionallyInsertAnchor(i,e,t){if(i===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let o=this._anchor??=RE(this._placeholder);o.classList.remove(k6),o.classList.add("cdk-drag-anchor"),o.style.transform="",t?t.before(o):Al(e.element).appendChild(o)}}};function E6(n,i,e){return Math.max(i,Math.min(e,n))}function m0(n){return n.type[0]==="t"}function GZ(n){n.preventDefault()}function N6(n,i,e){let t=D6(i,n.length-1),o=D6(e,n.length-1);if(t===o)return;let r=n[t],a=o0)return null;let c=this.orientation==="horizontal",p=r.findIndex(w=>w.drag===i),u=r[a],h=r[p].clientRect,_=u.clientRect,S=p>a?1:-1,x=this._getItemOffsetPx(h,_,S),b=this._getSiblingOffsetPx(p,r,S),M=r.slice();return N6(r,p,a),r.forEach((w,y)=>{if(M[y]===w)return;let E=w.drag===i,I=E?x:b,D=E?i.getPlaceholderElement():w.drag.getRootElement();w.offset+=I;let N=Math.round(w.offset*(1/w.drag.scale));c?(D.style.transform=db(`translate3d(${N}px, 0, 0)`,w.initialTransform),p0(w.clientRect,0,I)):(D.style.transform=db(`translate3d(0, ${N}px, 0)`,w.initialTransform),p0(w.clientRect,I,0))}),this._previousSwap.overlaps=LE(_,e,t),this._previousSwap.drag=u.drag,this._previousSwap.delta=c?o.x:o.y,{previousIndex:p,currentIndex:a}}enter(i,e,t,o){let r=this._activeDraggables,a=r.indexOf(i),c=i.getPlaceholderElement();a>-1&&r.splice(a,1);let p=o==null||o<0?this._getItemIndexFromPointerPosition(i,e,t):o,u=r[p];if(u===i&&(u=r[p+1]),!u&&(p==null||p===-1||p{let e=i.getRootElement();if(e){let t=this._itemPositions.find(o=>o.drag===i)?.initialTransform;e.style.transform=t||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(i){return this._getVisualItemPositions().findIndex(e=>e.drag===i)}getItemAtIndex(i){return this._getVisualItemPositions()[i]?.drag||null}updateOnScroll(i,e){this._itemPositions.forEach(({clientRect:t})=>{p0(t,i,e)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(i){this._element=i}_cacheItemPositions(){let i=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let t=e.getVisibleElement();return{drag:e,offset:0,initialTransform:t.style.transform||"",clientRect:$E(t)}}).sort((e,t)=>i?e.clientRect.left-t.clientRect.left:e.clientRect.top-t.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(i,e,t){let o=this.orientation==="horizontal",r=o?e.left-i.left:e.top-i.top;return t===-1&&(r+=o?e.width-i.width:e.height-i.height),r}_getSiblingOffsetPx(i,e,t){let o=this.orientation==="horizontal",r=e[i].clientRect,a=e[i+t*-1],c=r[o?"width":"height"]*t;if(a){let p=o?"left":"top",u=o?"right":"bottom";t===-1?c-=a.clientRect[p]-r[u]:c+=r[p]-a.clientRect[u]}return c}_shouldEnterAsFirstChild(i,e){if(!this._activeDraggables.length)return!1;let t=this._itemPositions,o=this.orientation==="horizontal";if(t[0].drag!==this._activeDraggables[0]){let a=t[t.length-1].clientRect;return o?i>=a.right:e>=a.bottom}else{let a=t[0].clientRect;return o?i<=a.left:e<=a.top}}_getItemIndexFromPointerPosition(i,e,t,o){let r=this.orientation==="horizontal",a=this._itemPositions.findIndex(({drag:c,clientRect:p})=>{if(c===i)return!1;if(o){let u=r?o.x:o.y;if(c===this._previousSwap.drag&&this._previousSwap.overlaps&&u===this._previousSwap.delta)return!1}return r?e>=Math.floor(p.left)&&e=Math.floor(p.top)&&tp?h.after(u):h.before(u),N6(this._activeItems,p,r);let _=this._getRootNode().elementFromPoint(e,t);return a.deltaX=o.x,a.deltaY=o.y,a.drag=c,a.overlaps=h===_||h.contains(_),{previousIndex:p,currentIndex:r}}enter(i,e,t,o){let r=this._activeItems.indexOf(i);r>-1&&this._activeItems.splice(r,1);let a=o==null||o<0?this._getItemIndexFromPointerPosition(i,e,t):o;a===-1&&(a=this._getClosestItemIndexToPointer(i,e,t));let c=this._activeItems[a];c&&!this._dragDropRegistry.isDragging(c)?(this._activeItems.splice(a,0,i),c.getRootElement().before(i.getPlaceholderElement())):(this._activeItems.push(i),this._element.appendChild(i.getPlaceholderElement()))}withItems(i){this._activeItems=i.slice()}withSortPredicate(i){this._sortPredicate=i}reset(){let i=this._element,e=this._previousSwap;for(let t=this._relatedNodes.length-1;t>-1;t--){let[o,r]=this._relatedNodes[t];o.parentNode===i&&o.nextSibling!==r&&(r===null?i.appendChild(o):r.parentNode===i&&i.insertBefore(o,r))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(i){return this._activeItems.indexOf(i)}getItemAtIndex(i){return this._activeItems[i]||null}updateOnScroll(){this._activeItems.forEach(i=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(i){i!==this._element&&(this._element=i,this._rootNode=void 0)}_getItemIndexFromPointerPosition(i,e,t){let o=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(t)),r=o?this._activeItems.findIndex(a=>{let c=a.getRootElement();return o===c||c.contains(o)}):-1;return r===-1||!this._sortPredicate(r,i)?-1:r}_getRootNode(){return this._rootNode||(this._rootNode=sC(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(i,e,t){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let o=1/0,r=-1;for(let a=0;a!0;sortPredicate=()=>!0;beforeStarted=new He;entered=new He;exited=new He;dropped=new He;sorted=new He;receivingStarted=new He;receivingStopped=new He;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=So.EMPTY;_verticalScrollDirection=ol.NONE;_horizontalScrollDirection=ja.NONE;_scrollNode;_stopScrollTimers=new He;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(i,e,t,o,r){this._dragDropRegistry=e,this._ngZone=o,this._viewportRuler=r;let a=this.element=Al(i);this._document=t,this.withOrientation("vertical").withElementContainer(a),e.registerDropContainer(this),this._parentPositions=new cb(t)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(i,e,t,o){this._draggingStarted(),o==null&&this.sortingDisabled&&(o=this._draggables.indexOf(i)),this._sortStrategy.enter(i,e,t,o),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:i,container:this,currentIndex:this.getItemIndex(i)})}exit(i){this._reset(),this.exited.next({item:i,container:this})}drop(i,e,t,o,r,a,c,p={}){this._reset(),this.dropped.next({item:i,currentIndex:e,previousIndex:t,container:this,previousContainer:o,isPointerOverContainer:r,distance:a,dropPoint:c,event:p})}withItems(i){let e=this._draggables;return this._draggables=i,i.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(o=>o.isDragging()).every(o=>i.indexOf(o)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(i){return this._direction=i,this._sortStrategy instanceof mb&&(this._sortStrategy.direction=i),this}connectedTo(i){return this._siblings=i.slice(),this}withOrientation(i){if(i==="mixed")this._sortStrategy=new zE(this._document,this._dragDropRegistry);else{let e=new mb(this._dragDropRegistry);e.direction=this._direction,e.orientation=i,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,t)=>this.sortPredicate(e,t,this)),this}withScrollableParents(i){let e=this._container;return this._scrollableElements=i.indexOf(e)===-1?[e,...i]:i.slice(),this}withElementContainer(i){if(i===this._container)return this;let e=Al(this.element),t=this._scrollableElements.indexOf(this._container),o=this._scrollableElements.indexOf(i);return t>-1&&this._scrollableElements.splice(t,1),o>-1&&this._scrollableElements.splice(o,1),this._sortStrategy&&this._sortStrategy.withElementContainer(i),this._cachedShadowRoot=null,this._scrollableElements.unshift(i),this._container=i,this}getScrollableParents(){return this._scrollableElements}getItemIndex(i){return this._isDragging?this._sortStrategy.getItemIndex(i):this._draggables.indexOf(i)}getItemAtIndex(i){return this._isDragging?this._sortStrategy.getItemAtIndex(i):this._draggables[i]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(i,e,t,o){if(this.sortingDisabled||!this._domRect||!b6(this._domRect,P6,e,t))return;let r=this._sortStrategy.sort(i,e,t,o);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:i})}_startScrollingIfNecessary(i,e){if(this.autoScrollDisabled)return;let t,o=ol.NONE,r=ja.NONE;if(this._parentPositions.positions.forEach((a,c)=>{c===this._document||!a.clientRect||t||b6(a.clientRect,P6,i,e)&&([o,r]=qZ(c,a.clientRect,this._direction,i,e),(o||r)&&(t=c))}),!o&&!r){let{width:a,height:c}=this._viewportRuler.getViewportSize(),p={width:a,height:c,top:0,right:a,bottom:c,left:0};o=R6(p,e),r=L6(p,i),t=window}t&&(o!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||t!==this._scrollNode)&&(this._verticalScrollDirection=o,this._horizontalScrollDirection=r,this._scrollNode=t,(o||r)&&t?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let i=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=i.msScrollSnapType||i.scrollSnapType||"",i.scrollSnapType=i.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let i=this._container.style;i.scrollSnapType=i.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),Kv(0,nc).pipe(tt(this._stopScrollTimers)).subscribe(()=>{let i=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===ol.UP?i.scrollBy(0,-e):this._verticalScrollDirection===ol.DOWN&&i.scrollBy(0,e),this._horizontalScrollDirection===ja.LEFT?i.scrollBy(-e,0):this._horizontalScrollDirection===ja.RIGHT&&i.scrollBy(e,0)})};_isOverContainer(i,e){return this._domRect!=null&&LE(this._domRect,i,e)}_getSiblingContainerFromPosition(i,e,t){return this._siblings.find(o=>o._canReceive(i,e,t))}_canReceive(i,e,t){if(!this._domRect||!LE(this._domRect,e,t)||!this.enterPredicate(i,this))return!1;let o=this._getShadowRoot().elementFromPoint(e,t);return o?o===this._container||this._container.contains(o):!1}_startReceiving(i,e){let t=this._activeSiblings;!t.has(i)&&e.every(o=>this.enterPredicate(o,this)||this._draggables.indexOf(o)>-1)&&(t.add(i),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:i,receiver:this,items:e}))}_stopReceiving(i){this._activeSiblings.delete(i),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:i,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(i=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(i);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let i=sC(this._container);this._cachedShadowRoot=i||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let i=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,i))}};function R6(n,i){let{top:e,bottom:t,height:o}=n,r=o*F6;return i>=e-r&&i<=e+r?ol.UP:i>=t-r&&i<=t+r?ol.DOWN:ol.NONE}function L6(n,i){let{left:e,right:t,width:o}=n,r=o*F6;return i>=e-r&&i<=e+r?ja.LEFT:i>=t-r&&i<=t+r?ja.RIGHT:ja.NONE}function qZ(n,i,e,t,o){let r=R6(i,o),a=L6(i,t),c=ol.NONE,p=ja.NONE;if(r){let u=n.scrollTop;r===ol.UP?u>0&&(c=ol.UP):n.scrollHeight-u>n.clientHeight&&(c=ol.DOWN)}if(a){let u=n.scrollLeft;e==="rtl"?a===ja.RIGHT?u<0&&(p=ja.RIGHT):n.scrollWidth+u>n.clientWidth&&(p=ja.LEFT):a===ja.LEFT?u>0&&(p=ja.LEFT):n.scrollWidth-u>n.clientWidth&&(p=ja.RIGHT)}return[c,p]}var QZ=(()=>{class n{_injector=f(Jo);constructor(){}createDrag(e,t){return UZ(this._injector,e,t)}createDropList(e){return WZ(this._injector,e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var V6=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({providers:[QZ],imports:[md]})}return n})();var XZ=[[["caption"]],[["colgroup"],["col"]],"*"],KZ=["caption","colgroup, col","*"];function YZ(n,i){n&1&&on(0,2)}function ZZ(n,i){n&1&&(s(0,"thead",0),ro(1,1),l(),s(2,"tbody",0),ro(3,2)(4,3),l(),s(5,"tfoot",0),ro(6,4),l())}function JZ(n,i){n&1&&ro(0,1)(1,2)(2,3)(3,4)}var Vl=new cn("CDK_TABLE");var hb=(()=>{class n{template=f(Oo);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkCellDef",""]]})}return n})(),fb=(()=>{class n{template=f(Oo);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkHeaderCellDef",""]]})}return n})(),j6=(()=>{class n{template=f(Oo);constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkFooterCellDef",""]]})}return n})(),Cm=(()=>{class n{_table=f(Vl,{optional:!0});_hasStickyChanged=!1;get name(){return this._name}set name(e){this._setNameInput(e)}_name;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;get stickyEnd(){return this._stickyEnd}set stickyEnd(e){e!==this._stickyEnd&&(this._stickyEnd=e,this._hasStickyChanged=!0)}_stickyEnd=!1;cell;headerCell;footerCell;cssClassFriendlyName;_columnCssClassName;constructor(){}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(e){e&&(this._name=e,this.cssClassFriendlyName=e.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,o,r){if(t&1&&Ki(r,hb,5)(r,fb,5)(r,j6,5),t&2){let a;mt(a=pt())&&(o.cell=a.first),mt(a=pt())&&(o.headerCell=a.first),mt(a=pt())&&(o.footerCell=a.first)}},inputs:{name:[0,"cdkColumnDef","name"],sticky:[2,"sticky","sticky",Ct],stickyEnd:[2,"stickyEnd","stickyEnd",Ct]}})}return n})(),ub=class{constructor(i,e){e.nativeElement.classList.add(...i._columnCssClassName)}},$6=(()=>{class n extends ub{constructor(){super(f(Cm),f(Zt))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[si]})}return n})();var H6=(()=>{class n extends ub{constructor(){let e=f(Cm),t=f(Zt);super(e,t);let o=e._table?._getCellRole();o&&t.nativeElement.setAttribute("role",o)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],features:[si]})}return n})();var GE=(()=>{class n{template=f(Oo);_differs=f(ld);columns;_columnsDiffer;constructor(){}ngOnChanges(e){if(!this._columnsDiffer){let t=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(t).create(),this._columnsDiffer.diff(t)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof f0?e.headerCell.template:this instanceof WE?e.footerCell.template:e.cell.template}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,features:[bn]})}return n})(),f0=(()=>{class n extends GE{_table=f(Vl,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(f(Oo),f(ld))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[0,"cdkHeaderRowDef","columns"],sticky:[2,"cdkHeaderRowDefSticky","sticky",Ct]},features:[si,bn]})}return n})(),WE=(()=>{class n extends GE{_table=f(Vl,{optional:!0});_hasStickyChanged=!1;get sticky(){return this._sticky}set sticky(e){e!==this._sticky&&(this._sticky=e,this._hasStickyChanged=!0)}_sticky=!1;constructor(){super(f(Oo),f(ld))}ngOnChanges(e){super.ngOnChanges(e)}hasStickyChanged(){let e=this._hasStickyChanged;return this.resetStickyChanged(),e}resetStickyChanged(){this._hasStickyChanged=!1}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[0,"cdkFooterRowDef","columns"],sticky:[2,"cdkFooterRowDefSticky","sticky",Ct]},features:[si,bn]})}return n})(),gb=(()=>{class n extends GE{_table=f(Vl,{optional:!0});when;constructor(){super(f(Oo),f(ld))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkRowDef",""]],inputs:{columns:[0,"cdkRowDefColumns","columns"],when:[0,"cdkRowDefWhen","when"]},features:[si]})}return n})(),nu=(()=>{class n{_viewContainer=f(oo);cells;context;static mostRecentCellOutlet=null;constructor(){n.mostRecentCellOutlet=this}ngOnDestroy(){n.mostRecentCellOutlet===this&&(n.mostRecentCellOutlet=null)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","cdkCellOutlet",""]]})}return n})(),qE=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&ro(0,0)},dependencies:[nu],encapsulation:2})}return n})();var QE=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&ro(0,0)},dependencies:[nu],encapsulation:2})}return n})(),U6=(()=>{class n{templateRef=f(Oo);_contentClassNames=["cdk-no-data-row","cdk-row"];_cellClassNames=["cdk-cell","cdk-no-data-cell"];_cellSelector="td, cdk-cell, [cdk-cell], .cdk-cell";constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["ng-template","cdkNoDataRow",""]]})}return n})(),B6=["top","bottom","left","right"],UE=class{_isNativeHtmlTable;_stickCellCss;_isBrowser;_needsPositionStickyOnElement;direction;_positionListener;_tableInjector;_elemSizeCache=new WeakMap;_resizeObserver=globalThis?.ResizeObserver?new globalThis.ResizeObserver(i=>this._updateCachedSizes(i)):null;_updatedStickyColumnsParamsToReplay=[];_stickyColumnsReplayTimeout=null;_cachedCellWidths=[];_borderCellCss;_destroyed=!1;constructor(i,e,t=!0,o=!0,r,a,c){this._isNativeHtmlTable=i,this._stickCellCss=e,this._isBrowser=t,this._needsPositionStickyOnElement=o,this.direction=r,this._positionListener=a,this._tableInjector=c,this._borderCellCss={top:`${e}-border-elem-top`,bottom:`${e}-border-elem-bottom`,left:`${e}-border-elem-left`,right:`${e}-border-elem-right`}}clearStickyPositioning(i,e){(e.includes("left")||e.includes("right"))&&this._removeFromStickyColumnReplayQueue(i);let t=[];for(let o of i)o.nodeType===o.ELEMENT_NODE&&t.push(o,...Array.from(o.children));Xa({write:()=>{for(let o of t)this._removeStickyStyle(o,e)}},{injector:this._tableInjector})}updateStickyColumns(i,e,t,o=!0,r=!0){if(!i.length||!this._isBrowser||!(e.some(w=>w)||t.some(w=>w))){this._positionListener?.stickyColumnsUpdated({sizes:[]}),this._positionListener?.stickyEndColumnsUpdated({sizes:[]});return}let a=i[0],c=a.children.length,p=this.direction==="rtl",u=p?"right":"left",h=p?"left":"right",_=e.lastIndexOf(!0),S=t.indexOf(!0),x,b,M;r&&this._updateStickyColumnReplayQueue({rows:[...i],stickyStartStates:[...e],stickyEndStates:[...t]}),Xa({earlyRead:()=>{x=this._getCellWidths(a,o),b=this._getStickyStartColumnPositions(x,e),M=this._getStickyEndColumnPositions(x,t)},write:()=>{for(let w of i)for(let y=0;y!!w)&&(this._positionListener.stickyColumnsUpdated({sizes:_===-1?[]:x.slice(0,_+1).map((w,y)=>e[y]?w:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:S===-1?[]:x.slice(S).map((w,y)=>t[y+S]?w:null).reverse()}))}},{injector:this._tableInjector})}stickRows(i,e,t){if(!this._isBrowser)return;let o=t==="bottom"?i.slice().reverse():i,r=t==="bottom"?e.slice().reverse():e,a=[],c=[],p=[];Xa({earlyRead:()=>{for(let u=0,h=0;u{let u=r.lastIndexOf(!0);for(let h=0;h{let t=i.querySelector("tfoot");t&&(e.some(o=>!o)?this._removeStickyStyle(t,["bottom"]):this._addStickyStyle(t,"bottom",0,!1))}},{injector:this._tableInjector})}destroy(){this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._resizeObserver?.disconnect(),this._destroyed=!0}_removeStickyStyle(i,e){if(!i.classList.contains(this._stickCellCss))return;for(let o of e)i.style[o]="",i.classList.remove(this._borderCellCss[o]);B6.some(o=>e.indexOf(o)===-1&&i.style[o])?i.style.zIndex=this._getCalculatedZIndex(i):(i.style.zIndex="",this._needsPositionStickyOnElement&&(i.style.position=""),i.classList.remove(this._stickCellCss))}_addStickyStyle(i,e,t,o){i.classList.add(this._stickCellCss),o&&i.classList.add(this._borderCellCss[e]),i.style[e]=`${t}px`,i.style.zIndex=this._getCalculatedZIndex(i),this._needsPositionStickyOnElement&&(i.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(i){let e={top:100,bottom:10,left:1,right:1},t=0;for(let o of B6)i.style[o]&&(t+=e[o]);return t?`${t}`:""}_getCellWidths(i,e=!0){if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;let t=[],o=i.children;for(let r=0;r0;r--)e[r]&&(t[r]=o,o+=i[r]);return t}_retrieveElementSize(i){let e=this._elemSizeCache.get(i);if(e)return e;let t=i.getBoundingClientRect(),o={width:t.width,height:t.height};return this._resizeObserver&&(this._elemSizeCache.set(i,o),this._resizeObserver.observe(i,{box:"border-box"})),o}_updateStickyColumnReplayQueue(i){this._removeFromStickyColumnReplayQueue(i.rows),this._stickyColumnsReplayTimeout||this._updatedStickyColumnsParamsToReplay.push(i)}_removeFromStickyColumnReplayQueue(i){let e=new Set(i);for(let t of this._updatedStickyColumnsParamsToReplay)t.rows=t.rows.filter(o=>!e.has(o));this._updatedStickyColumnsParamsToReplay=this._updatedStickyColumnsParamsToReplay.filter(t=>!!t.rows.length)}_updateCachedSizes(i){let e=!1;for(let t of i){let o=t.borderBoxSize?.length?{width:t.borderBoxSize[0].inlineSize,height:t.borderBoxSize[0].blockSize}:{width:t.contentRect.width,height:t.contentRect.height};o.width!==this._elemSizeCache.get(t.target)?.width&&eJ(t.target)&&(e=!0),this._elemSizeCache.set(t.target,o)}e&&this._updatedStickyColumnsParamsToReplay.length&&(this._stickyColumnsReplayTimeout&&clearTimeout(this._stickyColumnsReplayTimeout),this._stickyColumnsReplayTimeout=setTimeout(()=>{if(!this._destroyed){for(let t of this._updatedStickyColumnsParamsToReplay)this.updateStickyColumns(t.rows,t.stickyStartStates,t.stickyEndStates,!0,!1);this._updatedStickyColumnsParamsToReplay=[],this._stickyColumnsReplayTimeout=null}},0))}};function eJ(n){return["cdk-cell","cdk-header-cell","cdk-footer-cell"].some(i=>n.classList.contains(i))}var h0=new cn("STICKY_POSITIONING_LISTENER");var XE=(()=>{class n{viewContainer=f(oo);elementRef=f(Zt);constructor(){let e=f(Vl);e._rowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","rowOutlet",""]]})}return n})(),KE=(()=>{class n{viewContainer=f(oo);elementRef=f(Zt);constructor(){let e=f(Vl);e._headerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","headerRowOutlet",""]]})}return n})(),YE=(()=>{class n{viewContainer=f(oo);elementRef=f(Zt);constructor(){let e=f(Vl);e._footerRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","footerRowOutlet",""]]})}return n})(),ZE=(()=>{class n{viewContainer=f(oo);elementRef=f(Zt);constructor(){let e=f(Vl);e._noDataRowOutlet=this,e._outletAssigned()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","noDataRowOutlet",""]]})}return n})(),JE=(()=>{class n{_differs=f(ld);_changeDetectorRef=f(Q);_elementRef=f(Zt);_dir=f(Ka,{optional:!0});_platform=f($s);_viewRepeater;_viewportRuler=f(dd);_injector=f(Jo);_virtualScrollViewport=f(YO,{optional:!0,host:!0});_positionListener=f(h0,{optional:!0})||f(h0,{optional:!0,skipSelf:!0});_document=f(Xi);_data;_renderedRange;_onDestroy=new He;_renderRows;_renderChangeSubscription=null;_columnDefsByName=new Map;_rowDefs;_headerRowDefs;_footerRowDefs;_dataDiffer;_defaultRowDef=null;_customColumnDefs=new Set;_customRowDefs=new Set;_customHeaderRowDefs=new Set;_customFooterRowDefs=new Set;_customNoDataRow=null;_headerRowDefChanged=!0;_footerRowDefChanged=!0;_stickyColumnStylesNeedReset=!0;_forceRecalculateCellWidths=!0;_cachedRenderRowsMap=new Map;_isNativeHtmlTable;_stickyStyler;stickyCssClass="cdk-table-sticky";needsPositionStickyOnElement=!0;_isServer;_isShowingNoDataRow=!1;_hasAllOutlets=!1;_hasInitialized=!1;_headerRowStickyUpdates=new He;_footerRowStickyUpdates=new He;_disableVirtualScrolling=!1;_getCellRole(){if(this._cellRoleInternal===void 0){let e=this._elementRef.nativeElement.getAttribute("role");return e==="grid"||e==="treegrid"?"gridcell":"cell"}return this._cellRoleInternal}_cellRoleInternal=void 0;get trackBy(){return this._trackByFn}set trackBy(e){this._trackByFn=e}_trackByFn;get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&(this._switchDataSource(e),this._changeDetectorRef.markForCheck())}_dataSource;_dataSourceChanges=new He;_dataStream=new He;get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(e){this._multiTemplateDataRows=e,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}_multiTemplateDataRows=!1;get fixedLayout(){return this._virtualScrollEnabled()?!0:this._fixedLayout}set fixedLayout(e){this._fixedLayout=e,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}_fixedLayout=!1;recycleRows=!1;contentChanged=new ve;viewChange=new an({start:0,end:Number.MAX_VALUE});_rowOutlet;_headerRowOutlet;_footerRowOutlet;_noDataRowOutlet;_contentColumnDefs;_contentRowDefs;_contentHeaderRowDefs;_contentFooterRowDefs;_noDataRow;constructor(){f(new sc("role"),{optional:!0})||this._elementRef.nativeElement.setAttribute("role","table"),this._isServer=!this._platform.isBrowser,this._isNativeHtmlTable=this._elementRef.nativeElement.nodeName==="TABLE",this._dataDiffer=this._differs.find([]).create((t,o)=>this.trackBy?this.trackBy(o.dataIndex,o.data):o)}ngOnInit(){this._setupStickyStyler(),this._viewportRuler.change().pipe(tt(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._viewRepeater=this.recycleRows||this._virtualScrollEnabled()?new XO:new i4,this._virtualScrollEnabled()&&this._setupVirtualScrolling(this._virtualScrollViewport),this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){this._stickyStyler?.destroy(),[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(e=>{e?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._headerRowStickyUpdates.complete(),this._footerRowStickyUpdates.complete(),this._onDestroy.next(),this._onDestroy.complete(),Uu(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();let e=this._dataDiffer.diff(this._renderRows);if(!e){this._updateNoDataRow(),this.contentChanged.next();return}let t=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(e,t,(o,r,a)=>this._getEmbeddedViewArgs(o.item,a),o=>o.item.data,o=>{o.operation===QO.INSERTED&&o.context&&this._renderCellTemplateForItem(o.record.item.rowDef,o.context)}),this._updateRowIndexContext(),e.forEachIdentityChange(o=>{let r=t.get(o.currentIndex);r.context.$implicit=o.item.data}),this._updateNoDataRow(),this.contentChanged.next(),this.updateStickyColumnStyles()}addColumnDef(e){this._customColumnDefs.add(e)}removeColumnDef(e){this._customColumnDefs.delete(e)}addRowDef(e){this._customRowDefs.add(e)}removeRowDef(e){this._customRowDefs.delete(e)}addHeaderRowDef(e){this._customHeaderRowDefs.add(e),this._headerRowDefChanged=!0}removeHeaderRowDef(e){this._customHeaderRowDefs.delete(e),this._headerRowDefChanged=!0}addFooterRowDef(e){this._customFooterRowDefs.add(e),this._footerRowDefChanged=!0}removeFooterRowDef(e){this._customFooterRowDefs.delete(e),this._footerRowDefChanged=!0}setNoDataRow(e){this._customNoDataRow=e}updateStickyHeaderRowStyles(){let e=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){let o=z6(this._headerRowOutlet,"thead");o&&(o.style.display=e.length?"":"none")}let t=this._headerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["top"]),this._stickyStyler.stickRows(e,t,"top"),this._headerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyFooterRowStyles(){let e=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){let o=z6(this._footerRowOutlet,"tfoot");o&&(o.style.display=e.length?"":"none")}let t=this._footerRowDefs.map(o=>o.sticky);this._stickyStyler.clearStickyPositioning(e,["bottom"]),this._stickyStyler.stickRows(e,t,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,t),this._footerRowDefs.forEach(o=>o.resetStickyChanged())}updateStickyColumnStyles(){let e=this._getRenderedRows(this._headerRowOutlet),t=this._getRenderedRows(this._rowOutlet),o=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this.fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...e,...t,...o],["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach((r,a)=>{this._addStickyColumnStyles([r],this._headerRowDefs[a])}),this._rowDefs.forEach(r=>{let a=[];for(let c=0;c{this._addStickyColumnStyles([r],this._footerRowDefs[a])}),Array.from(this._columnDefsByName.values()).forEach(r=>r.resetStickyChanged())}stickyColumnsUpdated(e){this._positionListener?.stickyColumnsUpdated(e)}stickyEndColumnsUpdated(e){this._positionListener?.stickyEndColumnsUpdated(e)}stickyHeaderRowsUpdated(e){this._headerRowStickyUpdates.next(e),this._positionListener?.stickyHeaderRowsUpdated(e)}stickyFooterRowsUpdated(e){this._footerRowStickyUpdates.next(e),this._positionListener?.stickyFooterRowsUpdated(e)}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs(),!this._headerRowDefs.length&&!this._footerRowDefs.length&&this._rowDefs.length;let t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){if(!Array.isArray(this._data)||!this._renderedRange)return[];let e=[],t=Math.min(this._data.length,this._renderedRange.end),o=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=this._renderedRange.start;r{let c=o&&o.has(a)?o.get(a):[];if(c.length){let p=c.shift();return p.dataIndex=t,p}else return{data:e,rowDef:a,dataIndex:t}})}_cacheColumnDefs(){this._columnDefsByName.clear(),pb(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=pb(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=pb(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=pb(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);let e=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=e[0]}_renderUpdatedColumns(){let e=(a,c)=>{let p=!!c.getColumnsDiff();return a||p},t=this._rowDefs.reduce(e,!1);t&&this._forceRenderDataRows();let o=this._headerRowDefs.reduce(e,!1);o&&this._forceRenderHeaderRows();let r=this._footerRowDefs.reduce(e,!1);return r&&this._forceRenderFooterRows(),t||o||r}_switchDataSource(e){this._data=[],Uu(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),e||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=e}_observeRenderChanges(){if(!this.dataSource)return;let e;Uu(this.dataSource)?e=this.dataSource.connect(this):Ng(this.dataSource)?e=this.dataSource:Array.isArray(this.dataSource)&&(e=Nn(this.dataSource)),this._renderChangeSubscription=Pr([e,this.viewChange]).pipe(tt(this._onDestroy)).subscribe(([t,o])=>{this._data=t||[],this._renderedRange=o,this._dataStream.next(t),this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((e,t)=>this._renderRow(this._headerRowOutlet,e,t)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((e,t)=>this._renderRow(this._footerRowOutlet,e,t)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(e,t){let o=Array.from(t?.columns||[]).map(c=>{let p=this._columnDefsByName.get(c);return p}),r=o.map(c=>c.sticky),a=o.map(c=>c.stickyEnd);this._stickyStyler.updateStickyColumns(e,r,a,!this.fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(e){let t=[];for(let o=0;o!r.when||r.when(t,e));else{let r=this._rowDefs.find(a=>a.when&&a.when(t,e))||this._defaultRowDef;r&&o.push(r)}return o.length,o}_getEmbeddedViewArgs(e,t){let o=e.rowDef,r={$implicit:e.data};return{templateRef:o.template,context:r,index:t}}_renderRow(e,t,o,r={}){let a=e.viewContainer.createEmbeddedView(t.template,r,o);return this._renderCellTemplateForItem(t,r),a}_renderCellTemplateForItem(e,t){for(let o of this._getCellTemplates(e))nu.mostRecentCellOutlet&&nu.mostRecentCellOutlet._viewContainer.createEmbeddedView(o,t);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){let e=this._rowOutlet.viewContainer;for(let t=0,o=e.length;t{let o=this._columnDefsByName.get(t);return e.extractCellTemplate(o)})}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){let e=(t,o)=>t||o.hasStickyChanged();this._headerRowDefs.reduce(e,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(e,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(e,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){let e=this._dir?this._dir.value:"ltr",t=this._injector;this._stickyStyler=new UE(this._isNativeHtmlTable,this.stickyCssClass,this._platform.isBrowser,this.needsPositionStickyOnElement,e,this,t),(this._dir?this._dir.change:Nn()).pipe(tt(this._onDestroy)).subscribe(o=>{this._stickyStyler.direction=o,this.updateStickyColumnStyles()})}_setupVirtualScrolling(e){let t=typeof requestAnimationFrame<"u"?nc:hO;this.viewChange.next({start:0,end:0}),e.renderedRangeStream.pipe(Ud(0,t),tt(this._onDestroy)).subscribe(this.viewChange),e.attach({dataStream:this._dataStream,measureRangeSize:(o,r)=>this._measureRangeSize(o,r)}),Pr([e.renderedContentOffset,this._headerRowStickyUpdates]).pipe(tt(this._onDestroy)).subscribe(([o,r])=>{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a{if(!(!r.sizes||!r.offsets||!r.elements))for(let a=0;a!t._table||t._table===this)}_updateNoDataRow(){let e=this._customNoDataRow||this._noDataRow;if(!e)return;let t=this._rowOutlet.viewContainer.length===0;if(t===this._isShowingNoDataRow)return;let o=this._noDataRowOutlet.viewContainer;if(t){let r=o.createEmbeddedView(e.templateRef),a=r.rootNodes[0];if(r.rootNodes.length===1&&a?.nodeType===this._document.ELEMENT_NODE){a.setAttribute("role","row"),a.classList.add(...e._contentClassNames);let c=a.querySelectorAll(e._cellSelector);for(let p=0;p=e.end||t!=="vertical")return 0;let o=this.viewChange.value,r=this._rowOutlet.viewContainer;e.starto.end;let a=e.start-o.start,c=e.end-e.start,p,u;for(let S=0;S-1;S--){let x=r.get(S+a);if(x&&x.rootNodes.length){u=x.rootNodes[x.rootNodes.length-1];break}}let h=p?.getBoundingClientRect?.(),_=u?.getBoundingClientRect?.();return h&&_?_.bottom-h.top:0}_virtualScrollEnabled(){return!this._disableVirtualScrolling&&this._virtualScrollViewport!=null}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,o,r){if(t&1&&Ki(r,U6,5)(r,Cm,5)(r,gb,5)(r,f0,5)(r,WE,5),t&2){let a;mt(a=pt())&&(o._noDataRow=a.first),mt(a=pt())&&(o._contentColumnDefs=a),mt(a=pt())&&(o._contentRowDefs=a),mt(a=pt())&&(o._contentHeaderRowDefs=a),mt(a=pt())&&(o._contentFooterRowDefs=a)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(t,o){t&2&&Be("cdk-table-fixed-layout",o.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[2,"multiTemplateDataRows","multiTemplateDataRows",Ct],fixedLayout:[2,"fixedLayout","fixedLayout",Ct],recycleRows:[2,"recycleRows","recycleRows",Ct]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],features:[fn([{provide:Vl,useExisting:n},{provide:h0,useValue:null}])],ngContentSelectors:KZ,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(ii(XZ),on(0),on(1,1),A(2,YZ,1,0),A(3,ZZ,7,0)(4,JZ,4,0)),t&2&&(m(2),O(o._isServer?2:-1),m(),O(o._isNativeHtmlTable?3:4))},dependencies:[KE,XE,ZE,YE],styles:[`.cdk-table-fixed-layout{table-layout:fixed} +`],encapsulation:2})}return n})();function pb(n,i){return n.concat(Array.from(i))}function z6(n,i){let e=i.toUpperCase(),t=n.viewContainer.element.nativeElement;for(;t;){let o=t.nodeType===1?t.nodeName:null;if(o===e)return t;if(o==="TABLE")break;t=t.parentNode}return null}var _b=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[mC]})}return n})();var G6=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[md,hi,md]})}return n})();var qn=(function(n){return n[n.State=0]="State",n[n.Transition=1]="Transition",n[n.Sequence=2]="Sequence",n[n.Group=3]="Group",n[n.Animate=4]="Animate",n[n.Keyframes=5]="Keyframes",n[n.Style=6]="Style",n[n.Trigger=7]="Trigger",n[n.Reference=8]="Reference",n[n.AnimateChild=9]="AnimateChild",n[n.AnimateRef=10]="AnimateRef",n[n.Query=11]="Query",n[n.Stagger=12]="Stagger",n})(qn||{}),rl="*";function eD(n,i){return{type:qn.Trigger,name:n,definitions:i,options:{}}}function tD(n,i=null){return{type:qn.Animate,styles:i,timings:n}}function W6(n,i=null){return{type:qn.Sequence,steps:n,options:i}}function ou(n){return{type:qn.Style,styles:n,offset:null}}function vb(n,i,e){return{type:qn.State,name:n,styles:i,options:e}}function nD(n,i,e=null){return{type:qn.Transition,expr:n,animation:i,options:e}}var Pc=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(i=0,e=0){this.totalTime=i+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(i=>i()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(i){this._position=this.totalTime?i*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},iu=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(i){this.players=i;let e=0,t=0,o=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++e==r&&this._onFinish()}),a.onDestroy(()=>{++t==r&&this._onDestroy()}),a.onStart(()=>{++o==r&&this._onStart()})}),this.totalTime=this.players.reduce((a,c)=>Math.max(a,c.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this.players.forEach(i=>i.init())}onStart(i){this._onStartFns.push(i)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(i=>i()),this._onStartFns=[])}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(i=>i.play())}pause(){this.players.forEach(i=>i.pause())}restart(){this.players.forEach(i=>i.restart())}finish(){this._onFinish(),this.players.forEach(i=>i.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(i=>i.destroy()),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this.players.forEach(i=>i.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(i){let e=i*this.totalTime;this.players.forEach(t=>{let o=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(o)})}getPosition(){let i=this.players.reduce((e,t)=>e===null||t.totalTime>e.totalTime?t:e,null);return i!=null?i.getPosition():0}beforeDestroy(){this.players.forEach(i=>{i.beforeDestroy&&i.beforeDestroy()})}triggerCallback(i){let e=i=="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},Uh="!";function q6(n){return new yi(3e3,!1)}function tJ(){return new yi(3100,!1)}function nJ(){return new yi(3101,!1)}function iJ(n){return new yi(3001,!1)}function oJ(n){return new yi(3003,!1)}function rJ(n){return new yi(3004,!1)}function X6(n,i){return new yi(3005,!1)}function K6(){return new yi(3006,!1)}function Y6(){return new yi(3007,!1)}function Z6(n,i){return new yi(3008,!1)}function J6(n){return new yi(3002,!1)}function eR(n,i,e,t,o){return new yi(3010,!1)}function tR(){return new yi(3011,!1)}function nR(){return new yi(3012,!1)}function iR(){return new yi(3200,!1)}function oR(){return new yi(3202,!1)}function rR(){return new yi(3013,!1)}function aR(n){return new yi(3014,!1)}function sR(n){return new yi(3015,!1)}function lR(n){return new yi(3016,!1)}function cR(n,i){return new yi(3404,!1)}function aJ(n){return new yi(3502,!1)}function dR(n){return new yi(3503,!1)}function mR(){return new yi(3300,!1)}function pR(n){return new yi(3504,!1)}function uR(n){return new yi(3301,!1)}function hR(n,i){return new yi(3302,!1)}function fR(n){return new yi(3303,!1)}function gR(n,i){return new yi(3400,!1)}function _R(n){return new yi(3401,!1)}function vR(n){return new yi(3402,!1)}function CR(n,i){return new yi(3505,!1)}function Md(n){switch(n.length){case 0:return new Pc;case 1:return n[0];default:return new iu(n)}}function aD(n,i,e=new Map,t=new Map){let o=[],r=[],a=-1,c=null;if(i.forEach(p=>{let u=p.get("offset"),h=u==a,_=h&&c||new Map;p.forEach((S,x)=>{let b=x,M=S;if(x!=="offset")switch(b=n.normalizePropertyName(b,o),M){case Uh:M=e.get(x);break;case rl:M=t.get(x);break;default:M=n.normalizeStyleValue(x,b,M,o);break}_.set(b,M)}),h||r.push(_),c=_,a=u}),o.length)throw aJ(o);return r}function Cb(n,i,e,t){switch(i){case"start":n.onStart(()=>t(e&&iD(e,"start",n)));break;case"done":n.onDone(()=>t(e&&iD(e,"done",n)));break;case"destroy":n.onDestroy(()=>t(e&&iD(e,"destroy",n)));break}}function iD(n,i,e){let t=e.totalTime,o=!!e.disabled,r=bb(n.element,n.triggerName,n.fromState,n.toState,i||n.phaseName,t??n.totalTime,o),a=n._data;return a!=null&&(r._data=a),r}function bb(n,i,e,t,o="",r=0,a){return{element:n,triggerName:i,fromState:e,toState:t,phaseName:o,totalTime:r,disabled:!!a}}function ls(n,i,e){let t=n.get(i);return t||n.set(i,t=e),t}function sD(n){let i=n.indexOf(":"),e=n.substring(1,i),t=n.slice(i+1);return[e,t]}var sJ=typeof document>"u"?null:document.documentElement;function xb(n){let i=n.parentNode||n.host||null;return i===sJ?null:i}function lJ(n){return n.substring(1,6)=="ebkit"}var ru=null,Q6=!1;function bR(n){ru||(ru=cJ()||{},Q6=ru.style?"WebkitAppearance"in ru.style:!1);let i=!0;return ru.style&&!lJ(n)&&(i=n in ru.style,!i&&Q6&&(i="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in ru.style)),i}function cJ(){return typeof document<"u"?document.body:null}function lD(n,i){for(;i;){if(i===n)return!0;i=xb(i)}return!1}function cD(n,i,e){if(e)return Array.from(n.querySelectorAll(i));let t=n.querySelector(i);return t?[t]:[]}var dJ=1e3,dD="{{",mJ="}}",mD="ng-enter",yb="ng-leave",g0="ng-trigger",_0=".ng-trigger",pD="ng-animating",Sb=".ng-animating";function Ic(n){if(typeof n=="number")return n;let i=n.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:oD(parseFloat(i[1]),i[2])}function oD(n,i){return i==="s"?n*dJ:n}function v0(n,i,e){return n.hasOwnProperty("duration")?n:uJ(n,i,e)}var pJ=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function uJ(n,i,e){let t,o=0,r="";if(typeof n=="string"){let a=n.match(pJ);if(a===null)return i.push(q6(n)),{duration:0,delay:0,easing:""};t=oD(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(o=oD(parseFloat(c),a[4]));let p=a[5];p&&(r=p)}else t=n;if(!e){let a=!1,c=i.length;t<0&&(i.push(tJ()),a=!0),o<0&&(i.push(nJ()),a=!0),a&&i.splice(c,0,q6(n))}return{duration:t,delay:o,easing:r}}function xR(n){return n.length?n[0]instanceof Map?n:n.map(i=>new Map(Object.entries(i))):[]}function Bl(n,i,e){i.forEach((t,o)=>{let r=wb(o);e&&!e.has(o)&&e.set(o,n.style[r]),n.style[r]=t})}function bm(n,i){i.forEach((e,t)=>{let o=wb(t);n.style[o]=""})}function Gh(n){return Array.isArray(n)?n.length==1?n[0]:W6(n):n}function yR(n,i,e){let t=i.params||{},o=uD(n);o.length&&o.forEach(r=>{t.hasOwnProperty(r)||e.push(iJ(r))})}var rD=new RegExp(`${dD}\\s*(.+?)\\s*${mJ}`,"g");function uD(n){let i=[];if(typeof n=="string"){let e;for(;e=rD.exec(n);)i.push(e[1]);rD.lastIndex=0}return i}function Wh(n,i,e){let t=`${n}`,o=t.replace(rD,(r,a)=>{let c=i[a];return c==null&&(e.push(oJ(a)),c=""),c.toString()});return o==t?n:o}var hJ=/-+([a-z0-9])/g;function wb(n){return n.replace(hJ,(...i)=>i[1].toUpperCase())}function SR(n,i){return n===0||i===0}function wR(n,i,e){if(e.size&&i.length){let t=i[0],o=[];if(e.forEach((r,a)=>{t.has(a)||o.push(a),t.set(a,r)}),o.length)for(let r=1;ra.set(c,Mb(n,c)))}}return i}function cs(n,i,e){switch(i.type){case qn.Trigger:return n.visitTrigger(i,e);case qn.State:return n.visitState(i,e);case qn.Transition:return n.visitTransition(i,e);case qn.Sequence:return n.visitSequence(i,e);case qn.Group:return n.visitGroup(i,e);case qn.Animate:return n.visitAnimate(i,e);case qn.Keyframes:return n.visitKeyframes(i,e);case qn.Style:return n.visitStyle(i,e);case qn.Reference:return n.visitReference(i,e);case qn.AnimateChild:return n.visitAnimateChild(i,e);case qn.AnimateRef:return n.visitAnimateRef(i,e);case qn.Query:return n.visitQuery(i,e);case qn.Stagger:return n.visitStagger(i,e);default:throw rJ(i.type)}}function Mb(n,i){return window.getComputedStyle(n)[i]}var PD=(()=>{class n{validateStyleProperty(e){return bR(e)}containsElement(e,t){return lD(e,t)}getParentElement(e){return xb(e)}query(e,t,o){return cD(e,t,o)}computeStyle(e,t,o){return o||""}animate(e,t,o,r,a,c=[],p){return new Pc(o,r)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})(),su=class{static NOOP=new PD},lu=class{};var fJ=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Pb=class extends lu{normalizePropertyName(i,e){return wb(i)}normalizeStyleValue(i,e,t,o){let r="",a=t.toString().trim();if(fJ.has(e)&&t!==0&&t!=="0")if(typeof t=="number")r="px";else{let c=t.match(/^[+-]?[\d\.]+([a-z]*)$/);c&&c[1].length==0&&o.push(X6(i,t))}return a+r}};var Ib="*";function gJ(n,i){let e=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(t=>_J(t,e,i)):e.push(n),e}function _J(n,i,e){if(n[0]==":"){let p=vJ(n,e);if(typeof p=="function"){i.push(p);return}n=p}let t=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return e.push(sR(n)),i;let o=t[1],r=t[2],a=t[3];i.push(MR(o,a));let c=o==Ib&&a==Ib;r[0]=="<"&&!c&&i.push(MR(a,o))}function vJ(n,i){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t) *"}}var kb=new Set(["true","1"]),Tb=new Set(["false","0"]);function MR(n,i){let e=kb.has(n)||Tb.has(n),t=kb.has(i)||Tb.has(i);return(o,r)=>{let a=n==Ib||n==o,c=i==Ib||i==r;return!a&&e&&typeof o=="boolean"&&(a=o?kb.has(n):Tb.has(n)),!c&&t&&typeof r=="boolean"&&(c=r?kb.has(i):Tb.has(i)),a&&c}}var FR=":self",CJ=new RegExp(`s*${FR}s*,?`,"g");function RR(n,i,e,t){return new CD(n).build(i,e,t)}var kR="",CD=class{_driver;constructor(i){this._driver=i}build(i,e,t){let o=new bD(e);return this._resetContextStyleTimingState(o),cs(this,Gh(i),o)}_resetContextStyleTimingState(i){i.currentQuerySelector=kR,i.collectedStyles=new Map,i.collectedStyles.set(kR,new Map),i.currentTime=0}visitTrigger(i,e){let t=e.queryCount=0,o=e.depCount=0,r=[],a=[];return i.name.charAt(0)=="@"&&e.errors.push(K6()),i.definitions.forEach(c=>{if(this._resetContextStyleTimingState(e),c.type==qn.State){let p=c,u=p.name;u.toString().split(/\s*,\s*/).forEach(h=>{p.name=h,r.push(this.visitState(p,e))}),p.name=u}else if(c.type==qn.Transition){let p=this.visitTransition(c,e);t+=p.queryCount,o+=p.depCount,a.push(p)}else e.errors.push(Y6())}),{type:qn.Trigger,name:i.name,states:r,transitions:a,queryCount:t,depCount:o,options:null}}visitState(i,e){let t=this.visitStyle(i.styles,e),o=i.options&&i.options.params||null;if(t.containsDynamicStyles){let r=new Set,a=o||{};t.styles.forEach(c=>{c instanceof Map&&c.forEach(p=>{uD(p).forEach(u=>{a.hasOwnProperty(u)||r.add(u)})})}),r.size&&e.errors.push(Z6(i.name,[...r.values()]))}return{type:qn.State,name:i.name,style:t,options:o?{params:o}:null}}visitTransition(i,e){e.queryCount=0,e.depCount=0;let t=cs(this,Gh(i.animation),e),o=gJ(i.expr,e.errors);return{type:qn.Transition,matchers:o,animation:t,queryCount:e.queryCount,depCount:e.depCount,options:au(i.options)}}visitSequence(i,e){return{type:qn.Sequence,steps:i.steps.map(t=>cs(this,t,e)),options:au(i.options)}}visitGroup(i,e){let t=e.currentTime,o=0,r=i.steps.map(a=>{e.currentTime=t;let c=cs(this,a,e);return o=Math.max(o,e.currentTime),c});return e.currentTime=o,{type:qn.Group,steps:r,options:au(i.options)}}visitAnimate(i,e){let t=SJ(i.timings,e.errors);e.currentAnimateTimings=t;let o,r=i.styles?i.styles:ou({});if(r.type==qn.Keyframes)o=this.visitKeyframes(r,e);else{let a=i.styles,c=!1;if(!a){c=!0;let u={};t.easing&&(u.easing=t.easing),a=ou(u)}e.currentTime+=t.duration+t.delay;let p=this.visitStyle(a,e);p.isEmptyStep=c,o=p}return e.currentAnimateTimings=null,{type:qn.Animate,timings:t,style:o,options:null}}visitStyle(i,e){let t=this._makeStyleAst(i,e);return this._validateStyleAst(t,e),t}_makeStyleAst(i,e){let t=[],o=Array.isArray(i.styles)?i.styles:[i.styles];for(let c of o)typeof c=="string"?c===rl?t.push(c):e.errors.push(J6(c)):t.push(new Map(Object.entries(c)));let r=!1,a=null;return t.forEach(c=>{if(c instanceof Map&&(c.has("easing")&&(a=c.get("easing"),c.delete("easing")),!r)){for(let p of c.values())if(p.toString().indexOf(dD)>=0){r=!0;break}}}),{type:qn.Style,styles:t,easing:a,offset:i.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(i,e){let t=e.currentAnimateTimings,o=e.currentTime,r=e.currentTime;t&&r>0&&(r-=t.duration+t.delay),i.styles.forEach(a=>{typeof a!="string"&&a.forEach((c,p)=>{let u=e.collectedStyles.get(e.currentQuerySelector),h=u.get(p),_=!0;h&&(r!=o&&r>=h.startTime&&o<=h.endTime&&(e.errors.push(eR(p,h.startTime,h.endTime,r,o)),_=!1),r=h.startTime),_&&u.set(p,{startTime:r,endTime:o}),e.options&&yR(c,e.options,e.errors)})})}visitKeyframes(i,e){let t={type:qn.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(tR()),t;let o=1,r=0,a=[],c=!1,p=!1,u=0,h=i.steps.map(y=>{let E=this._makeStyleAst(y,e),I=E.offset!=null?E.offset:yJ(E.styles),D=0;return I!=null&&(r++,D=E.offset=I),p=p||D<0||D>1,c=c||D0&&r<_?e.errors.push(oR()):r==0&&(S=o/(_-1));let x=_-1,b=e.currentTime,M=e.currentAnimateTimings,w=M.duration;return h.forEach((y,E)=>{let I=S>0?E==x?1:S*E:a[E],D=I*w;e.currentTime=b+M.delay+D,M.duration=D,this._validateStyleAst(y,e),y.offset=I,t.styles.push(y)}),t}visitReference(i,e){return{type:qn.Reference,animation:cs(this,Gh(i.animation),e),options:au(i.options)}}visitAnimateChild(i,e){return e.depCount++,{type:qn.AnimateChild,options:au(i.options)}}visitAnimateRef(i,e){return{type:qn.AnimateRef,animation:this.visitReference(i.animation,e),options:au(i.options)}}visitQuery(i,e){let t=e.currentQuerySelector,o=i.options||{};e.queryCount++,e.currentQuery=i;let[r,a]=bJ(i.selector);e.currentQuerySelector=t.length?t+" "+r:r,ls(e.collectedStyles,e.currentQuerySelector,new Map);let c=cs(this,Gh(i.animation),e);return e.currentQuery=null,e.currentQuerySelector=t,{type:qn.Query,selector:r,limit:o.limit||0,optional:!!o.optional,includeSelf:a,animation:c,originalSelector:i.selector,options:au(i.options)}}visitStagger(i,e){e.currentQuery||e.errors.push(rR());let t=i.timings==="full"?{duration:0,delay:0,easing:"full"}:v0(i.timings,e.errors,!0);return{type:qn.Stagger,animation:cs(this,Gh(i.animation),e),timings:t,options:null}}};function bJ(n){let i=!!n.split(/\s*,\s*/).find(e=>e==FR);return i&&(n=n.replace(CJ,"")),n=n.replace(/@\*/g,_0).replace(/@\w+/g,e=>_0+"-"+e.slice(1)).replace(/:animating/g,Sb),[n,i]}function xJ(n){return n?K({},n):null}var bD=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(i){this.errors=i}};function yJ(n){if(typeof n=="string")return null;let i=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){let t=e;i=parseFloat(t.get("offset")),t.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let e=n;i=parseFloat(e.get("offset")),e.delete("offset")}return i}function SJ(n,i){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=v0(n,i).duration;return hD(r,0,"")}let e=n;if(e.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=hD(0,0,"");return r.dynamic=!0,r.strValue=e,r}let o=v0(e,i);return hD(o.duration,o.delay,o.easing)}function au(n){return n?(n=K({},n),n.params&&(n.params=xJ(n.params))):n={},n}function hD(n,i,e){return{duration:n,delay:i,easing:e}}function ID(n,i,e,t,o,r,a=null,c=!1){return{type:1,element:n,keyframes:i,preStyleProps:e,postStyleProps:t,duration:o,delay:r,totalTime:o+r,easing:a,subTimeline:c}}var b0=class{_map=new Map;get(i){return this._map.get(i)||[]}append(i,e){let t=this._map.get(i);t||this._map.set(i,t=[]),t.push(...e)}has(i){return this._map.has(i)}clear(){this._map.clear()}},wJ=1,MJ=":enter",kJ=new RegExp(MJ,"g"),TJ=":leave",EJ=new RegExp(TJ,"g");function LR(n,i,e,t,o,r=new Map,a=new Map,c,p,u=[]){return new xD().buildKeyframes(n,i,e,t,o,r,a,c,p,u)}var xD=class{buildKeyframes(i,e,t,o,r,a,c,p,u,h=[]){u=u||new b0;let _=new yD(i,e,u,o,r,h,[]);_.options=p;let S=p.delay?Ic(p.delay):0;_.currentTimeline.delayNextStep(S),_.currentTimeline.setStyles([a],null,_.errors,p),cs(this,t,_);let x=_.timelines.filter(b=>b.containsAnimation());if(x.length&&c.size){let b;for(let M=x.length-1;M>=0;M--){let w=x[M];if(w.element===e){b=w;break}}b&&!b.allowOnlyTimelineStyles()&&b.setStyles([c],null,_.errors,p)}return x.length?x.map(b=>b.buildKeyframes()):[ID(e,[],[],[],0,S,"",!1)]}visitTrigger(i,e){}visitState(i,e){}visitTransition(i,e){}visitAnimateChild(i,e){let t=e.subInstructions.get(e.element);if(t){let o=e.createSubContext(i.options),r=e.currentTimeline.currentTime,a=this._visitSubInstructions(t,o,o.options);r!=a&&e.transformIntoNewTimeline(a)}e.previousNode=i}visitAnimateRef(i,e){let t=e.createSubContext(i.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([i.options,i.animation.options],e,t),this.visitReference(i.animation,t),e.transformIntoNewTimeline(t.currentTimeline.currentTime),e.previousNode=i}_applyAnimationRefDelays(i,e,t){for(let o of i){let r=o?.delay;if(r){let a=typeof r=="number"?r:Ic(Wh(r,o?.params??{},e.errors));t.delayNextStep(a)}}}_visitSubInstructions(i,e,t){let r=e.currentTimeline.currentTime,a=t.duration!=null?Ic(t.duration):null,c=t.delay!=null?Ic(t.delay):null;return a!==0&&i.forEach(p=>{let u=e.appendInstructionToTimeline(p,a,c);r=Math.max(r,u.duration+u.delay)}),r}visitReference(i,e){e.updateOptions(i.options,!0),cs(this,i.animation,e),e.previousNode=i}visitSequence(i,e){let t=e.subContextCount,o=e,r=i.options;if(r&&(r.params||r.delay)&&(o=e.createSubContext(r),o.transformIntoNewTimeline(),r.delay!=null)){o.previousNode.type==qn.Style&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=Ab);let a=Ic(r.delay);o.delayNextStep(a)}i.steps.length&&(i.steps.forEach(a=>cs(this,a,o)),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>t&&o.transformIntoNewTimeline()),e.previousNode=i}visitGroup(i,e){let t=[],o=e.currentTimeline.currentTime,r=i.options&&i.options.delay?Ic(i.options.delay):0;i.steps.forEach(a=>{let c=e.createSubContext(i.options);r&&c.delayNextStep(r),cs(this,a,c),o=Math.max(o,c.currentTimeline.currentTime),t.push(c.currentTimeline)}),t.forEach(a=>e.currentTimeline.mergeTimelineCollectedStyles(a)),e.transformIntoNewTimeline(o),e.previousNode=i}_visitTiming(i,e){if(i.dynamic){let t=i.strValue,o=e.params?Wh(t,e.params,e.errors):t;return v0(o,e.errors)}else return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,e){let t=e.currentAnimateTimings=this._visitTiming(i.timings,e),o=e.currentTimeline;t.delay&&(e.incrementTime(t.delay),o.snapshotCurrentStyles());let r=i.style;r.type==qn.Keyframes?this.visitKeyframes(r,e):(e.incrementTime(t.duration),this.visitStyle(r,e),o.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=i}visitStyle(i,e){let t=e.currentTimeline,o=e.currentAnimateTimings;!o&&t.hasCurrentStyleProperties()&&t.forwardFrame();let r=o&&o.easing||i.easing;i.isEmptyStep?t.applyEmptyStep(r):t.setStyles(i.styles,r,e.errors,e.options),e.previousNode=i}visitKeyframes(i,e){let t=e.currentAnimateTimings,o=e.currentTimeline.duration,r=t.duration,c=e.createSubContext().currentTimeline;c.easing=t.easing,i.styles.forEach(p=>{let u=p.offset||0;c.forwardTime(u*r),c.setStyles(p.styles,p.easing,e.errors,e.options),c.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(c),e.transformIntoNewTimeline(o+r),e.previousNode=i}visitQuery(i,e){let t=e.currentTimeline.currentTime,o=i.options||{},r=o.delay?Ic(o.delay):0;r&&(e.previousNode.type===qn.Style||t==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Ab);let a=t,c=e.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!o.optional,e.errors);e.currentQueryTotal=c.length;let p=null;c.forEach((u,h)=>{e.currentQueryIndex=h;let _=e.createSubContext(i.options,u);r&&_.delayNextStep(r),u===e.element&&(p=_.currentTimeline),cs(this,i.animation,_),_.currentTimeline.applyStylesToKeyframe();let S=_.currentTimeline.currentTime;a=Math.max(a,S)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),p&&(e.currentTimeline.mergeTimelineCollectedStyles(p),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=i}visitStagger(i,e){let t=e.parentContext,o=e.currentTimeline,r=i.timings,a=Math.abs(r.duration),c=a*(e.currentQueryTotal-1),p=a*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":p=c-p;break;case"full":p=t.currentStaggerTime;break}let h=e.currentTimeline;p&&h.delayNextStep(p);let _=h.currentTime;cs(this,i.animation,e),e.previousNode=i,t.currentStaggerTime=o.currentTime-_+(o.startTime-t.currentTimeline.startTime)}},Ab={},yD=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Ab;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(i,e,t,o,r,a,c,p){this._driver=i,this.element=e,this.subInstructions=t,this._enterClassName=o,this._leaveClassName=r,this.errors=a,this.timelines=c,this.currentTimeline=p||new Ob(this._driver,e,0),c.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,e){if(!i)return;let t=i,o=this.options;t.duration!=null&&(o.duration=Ic(t.duration)),t.delay!=null&&(o.delay=Ic(t.delay));let r=t.params;if(r){let a=o.params;a||(a=this.options.params={}),Object.keys(r).forEach(c=>{(!e||!a.hasOwnProperty(c))&&(a[c]=Wh(r[c],a,this.errors))})}}_copyOptions(){let i={};if(this.options){let e=this.options.params;if(e){let t=i.params={};Object.keys(e).forEach(o=>{t[o]=e[o]})}}return i}createSubContext(i=null,e,t){let o=e||this.element,r=new n(this._driver,o,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(o,t||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(i),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(i){return this.previousNode=Ab,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,e,t){let o={duration:e??i.duration,delay:this.currentTimeline.currentTime+(t??0)+i.delay,easing:""},r=new SD(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,o,i.stretchStartingKeyframe);return this.timelines.push(r),o}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,e,t,o,r,a){let c=[];if(o&&c.push(this.element),i.length>0){i=i.replace(kJ,"."+this._enterClassName),i=i.replace(EJ,"."+this._leaveClassName);let p=t!=1,u=this._driver.query(this.element,i,p);t!==0&&(u=t<0?u.slice(u.length+t,u.length):u.slice(0,t)),c.push(...u)}return!r&&c.length==0&&a.push(aR(e)),c}},Ob=class n{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(i,e,t,o){this._driver=i,this.element=e,this.startTime=t,this._elementTimelineStylesLookup=o,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(i){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+i),e&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,e){return this.applyStylesToKeyframe(),new n(this._driver,i,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=wJ,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,e){this._localTimelineStyles.set(i,e),this._globalTimelineStyles.set(i,e),this._styleSummary.set(i,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&this._previousKeyframe.set("easing",i);for(let[e,t]of this._globalTimelineStyles)this._backFill.set(e,t||rl),this._currentKeyframe.set(e,rl);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,e,t,o){e&&this._previousKeyframe.set("easing",e);let r=o&&o.params||{},a=DJ(i,this._globalTimelineStyles);for(let[c,p]of a){let u=Wh(p,r,t);this._pendingStyles.set(c,u),this._localTimelineStyles.has(c)||this._backFill.set(c,this._globalTimelineStyles.get(c)??rl),this._updateStyle(c,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((i,e)=>{this._currentKeyframe.set(e,i)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((i,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,i)}))}snapshotCurrentStyles(){for(let[i,e]of this._localTimelineStyles)this._pendingStyles.set(i,e),this._updateStyle(i,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let i=[];for(let e in this._currentKeyframe)i.push(e);return i}mergeTimelineCollectedStyles(i){i._styleSummary.forEach((e,t)=>{let o=this._styleSummary.get(t);(!o||e.time>o.time)&&this._updateStyle(t,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let i=new Set,e=new Set,t=this._keyframes.size===1&&this.duration===0,o=[];this._keyframes.forEach((c,p)=>{let u=new Map([...this._backFill,...c]);u.forEach((h,_)=>{h===Uh?i.add(_):h===rl&&e.add(_)}),t||u.set("offset",p/this.duration),o.push(u)});let r=[...i.values()],a=[...e.values()];if(t){let c=o[0],p=new Map(c);c.set("offset",0),p.set("offset",1),o=[c,p]}return ID(this.element,o,r,a,this.duration,this.startTime,this.easing,!1)}},SD=class extends Ob{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(i,e,t,o,r,a,c=!1){super(i,e,a.delay),this.keyframes=t,this.preStyleProps=o,this.postStyleProps=r,this._stretchStartingKeyframe=c,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:e,duration:t,easing:o}=this.timings;if(this._stretchStartingKeyframe&&e){let r=[],a=t+e,c=e/a,p=new Map(i[0]);p.set("offset",0),r.push(p);let u=new Map(i[0]);u.set("offset",TR(c)),r.push(u);let h=i.length-1;for(let _=1;_<=h;_++){let S=new Map(i[_]),x=S.get("offset"),b=e+x*t;S.set("offset",TR(b/a)),r.push(S)}t=a,e=0,o="",i=r}return ID(this.element,i,this.preStyleProps,this.postStyleProps,t,e,o,!0)}};function TR(n,i=3){let e=Math.pow(10,i-1);return Math.round(n*e)/e}function DJ(n,i){let e=new Map,t;return n.forEach(o=>{if(o==="*"){t??=i.keys();for(let r of t)e.set(r,rl)}else for(let[r,a]of o)e.set(r,a)}),e}function ER(n,i,e,t,o,r,a,c,p,u,h,_,S){return{type:0,element:n,triggerName:i,isRemovalTransition:o,fromState:e,fromStyles:r,toState:t,toStyles:a,timelines:c,queriedElements:p,preStyleProps:u,postStyleProps:h,totalTime:_,errors:S}}var fD={},Nb=class{_triggerName;ast;_stateStyles;constructor(i,e,t){this._triggerName=i,this.ast=e,this._stateStyles=t}match(i,e,t,o){return PJ(this.ast.matchers,i,e,t,o)}buildStyles(i,e,t){let o=this._stateStyles.get("*");return i!==void 0&&(o=this._stateStyles.get(i?.toString())||o),o?o.buildStyles(e,t):new Map}build(i,e,t,o,r,a,c,p,u,h){let _=[],S=this.ast.options&&this.ast.options.params||fD,x=c&&c.params||fD,b=this.buildStyles(t,x,_),M=p&&p.params||fD,w=this.buildStyles(o,M,_),y=new Set,E=new Map,I=new Map,D=o==="void",N={params:VR(M,S),delay:this.ast.options?.delay},P=h?[]:LR(i,e,this.ast.animation,r,a,b,w,N,u,_),L=0;return P.forEach(re=>{L=Math.max(re.duration+re.delay,L)}),_.length?ER(e,this._triggerName,t,o,D,b,w,[],[],E,I,L,_):(P.forEach(re=>{let oe=re.element,G=ls(E,oe,new Set);re.preStyleProps.forEach(ue=>G.add(ue));let $=ls(I,oe,new Set);re.postStyleProps.forEach(ue=>$.add(ue)),oe!==e&&y.add(oe)}),ER(e,this._triggerName,t,o,D,b,w,P,[...y.values()],E,I,L))}};function PJ(n,i,e,t,o){return n.some(r=>r(i,e,t,o))}function VR(n,i){let e=K({},i);return Object.entries(n).forEach(([t,o])=>{o!=null&&(e[t]=o)}),e}var wD=class{styles;defaultParams;normalizer;constructor(i,e,t){this.styles=i,this.defaultParams=e,this.normalizer=t}buildStyles(i,e){let t=new Map,o=VR(i,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,c)=>{a&&(a=Wh(a,o,e));let p=this.normalizer.normalizePropertyName(c,e);a=this.normalizer.normalizeStyleValue(c,p,a,e),t.set(c,a)})}),t}};function IJ(n,i,e){return new MD(n,i,e)}var MD=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(i,e,t){this.name=i,this.ast=e,this._normalizer=t,e.states.forEach(o=>{let r=o.options&&o.options.params||{};this.states.set(o.name,new wD(o.style,r,t))}),DR(this.states,"true","1"),DR(this.states,"false","0"),e.transitions.forEach(o=>{this.transitionFactories.push(new Nb(i,o,this.states))}),this.fallbackTransition=AJ(i,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,e,t,o){return this.transitionFactories.find(a=>a.match(i,e,t,o))||null}matchStyles(i,e,t){return this.fallbackTransition.buildStyles(i,e,t)}};function AJ(n,i,e){let t=[(a,c)=>!0],o={type:qn.Sequence,steps:[],options:null},r={type:qn.Transition,animation:o,matchers:t,options:null,queryCount:0,depCount:0};return new Nb(n,r,i)}function DR(n,i,e){n.has(i)?n.has(e)||n.set(e,n.get(i)):n.has(e)&&n.set(i,n.get(e))}var OJ=new b0,kD=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(i,e,t){this.bodyNode=i,this._driver=e,this._normalizer=t}register(i,e){let t=[],o=[],r=RR(this._driver,e,t,o);if(t.length)throw dR(t);this._animations.set(i,r)}_buildPlayer(i,e,t){let o=i.element,r=aD(this._normalizer,i.keyframes,e,t);return this._driver.animate(o,r,i.duration,i.delay,i.easing,[],!0)}create(i,e,t={}){let o=[],r=this._animations.get(i),a,c=new Map;if(r?(a=LR(this._driver,e,r,mD,yb,new Map,new Map,t,OJ,o),a.forEach(h=>{let _=ls(c,h.element,new Map);h.postStyleProps.forEach(S=>_.set(S,null))})):(o.push(mR()),a=[]),o.length)throw pR(o);c.forEach((h,_)=>{h.forEach((S,x)=>{h.set(x,this._driver.computeStyle(_,x,rl))})});let p=a.map(h=>{let _=c.get(h.element);return this._buildPlayer(h,new Map,_)}),u=Md(p);return this._playersById.set(i,u),u.onDestroy(()=>this.destroy(i)),this.players.push(u),u}destroy(i){let e=this._getPlayer(i);e.destroy(),this._playersById.delete(i);let t=this.players.indexOf(e);t>=0&&this.players.splice(t,1)}_getPlayer(i){let e=this._playersById.get(i);if(!e)throw uR(i);return e}listen(i,e,t,o){let r=bb(e,"","","");return Cb(this._getPlayer(i),t,r,o),()=>{}}command(i,e,t,o){if(t=="register"){this.register(i,o[0]);return}if(t=="create"){let a=o[0]||{};this.create(i,e,a);return}let r=this._getPlayer(i);switch(t){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(o[0]));break;case"destroy":this.destroy(i);break}}},PR="ng-animate-queued",NJ=".ng-animate-queued",gD="ng-animate-disabled",FJ=".ng-animate-disabled",RJ="ng-star-inserted",LJ=".ng-star-inserted",VJ=[],BR={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},BJ={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},zl="__ng_removed",x0=class{namespaceId;value;options;get params(){return this.options.params}constructor(i,e=""){this.namespaceId=e;let t=i&&i.hasOwnProperty("value"),o=t?i.value:i;if(this.value=jJ(o),t){let r=i,{value:a}=r,c=uO(r,["value"]);this.options=c}else this.options={};this.options.params||(this.options.params={})}absorbOptions(i){let e=i.params;if(e){let t=this.options.params;Object.keys(e).forEach(o=>{t[o]==null&&(t[o]=e[o])})}}},C0="void",_D=new x0(C0),TD=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(i,e,t){this.id=i,this.hostElement=e,this._engine=t,this._hostClassName="ng-tns-"+i,al(e,this._hostClassName)}listen(i,e,t,o){if(!this._triggers.has(e))throw hR(t,e);if(t==null||t.length==0)throw fR(e);if(!$J(t))throw gR(t,e);let r=ls(this._elementListeners,i,[]),a={name:e,phase:t,callback:o};r.push(a);let c=ls(this._engine.statesByElement,i,new Map);return c.has(e)||(al(i,g0),al(i,g0+"-"+e),c.set(e,_D)),()=>{this._engine.afterFlush(()=>{let p=r.indexOf(a);p>=0&&r.splice(p,1),this._triggers.has(e)||c.delete(e)})}}register(i,e){return this._triggers.has(i)?!1:(this._triggers.set(i,e),!0)}_getTrigger(i){let e=this._triggers.get(i);if(!e)throw _R(i);return e}trigger(i,e,t,o=!0){let r=this._getTrigger(e),a=new y0(this.id,e,i),c=this._engine.statesByElement.get(i);c||(al(i,g0),al(i,g0+"-"+e),this._engine.statesByElement.set(i,c=new Map));let p=c.get(e),u=new x0(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&p&&u.absorbOptions(p.options),c.set(e,u),p||(p=_D),!(u.value===C0)&&p.value===u.value){if(!GJ(p.params,u.params)){let M=[],w=r.matchStyles(p.value,p.params,M),y=r.matchStyles(u.value,u.params,M);M.length?this._engine.reportError(M):this._engine.afterFlush(()=>{bm(i,w),Bl(i,y)})}return}let S=ls(this._engine.playersByElement,i,[]);S.forEach(M=>{M.namespaceId==this.id&&M.triggerName==e&&M.queued&&M.destroy()});let x=r.matchTransition(p.value,u.value,i,u.params),b=!1;if(!x){if(!o)return;x=r.fallbackTransition,b=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:e,transition:x,fromState:p,toState:u,player:a,isFallbackTransition:b}),b||(al(i,PR),a.onStart(()=>{qh(i,PR)})),a.onDone(()=>{let M=this.players.indexOf(a);M>=0&&this.players.splice(M,1);let w=this._engine.playersByElement.get(i);if(w){let y=w.indexOf(a);y>=0&&w.splice(y,1)}}),this.players.push(a),S.push(a),a}deregister(i){this._triggers.delete(i),this._engine.statesByElement.forEach(e=>e.delete(i)),this._elementListeners.forEach((e,t)=>{this._elementListeners.set(t,e.filter(o=>o.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);let e=this._engine.playersByElement.get(i);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,e){let t=this._engine.driver.query(i,_0,!0);t.forEach(o=>{if(o[zl])return;let r=this._engine.fetchNamespacesByElement(o);r.size?r.forEach(a=>a.triggerLeaveAnimation(o,e,!1,!0)):this.clearElementCache(o)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(o=>this.clearElementCache(o)))}triggerLeaveAnimation(i,e,t,o){let r=this._engine.statesByElement.get(i),a=new Map;if(r){let c=[];if(r.forEach((p,u)=>{if(a.set(u,p.value),this._triggers.has(u)){let h=this.trigger(i,u,C0,o);h&&c.push(h)}}),c.length)return this._engine.markElementAsRemoved(this.id,i,!0,e,a),t&&Md(c).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){let e=this._elementListeners.get(i),t=this._engine.statesByElement.get(i);if(e&&t){let o=new Set;e.forEach(r=>{let a=r.name;if(o.has(a))return;o.add(a);let p=this._triggers.get(a).fallbackTransition,u=t.get(a)||_D,h=new x0(C0),_=new y0(this.id,a,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:a,transition:p,fromState:u,toState:h,player:_,isFallbackTransition:!0})})}}removeNode(i,e){let t=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,e),this.triggerLeaveAnimation(i,e,!0))return;let o=!1;if(t.totalAnimations){let r=t.players.length?t.playersByQueriedElement.get(i):[];if(r&&r.length)o=!0;else{let a=i;for(;a=a.parentNode;)if(t.statesByElement.get(a)){o=!0;break}}}if(this.prepareLeaveAnimationListeners(i),o)t.markElementAsRemoved(this.id,i,!1,e);else{let r=i[zl];(!r||r===BR)&&(t.afterFlush(()=>this.clearElementCache(i)),t.destroyInnerAnimations(i),t._onRemovalComplete(i,e))}}insertNode(i,e){al(i,this._hostClassName)}drainQueuedTransitions(i){let e=[];return this._queue.forEach(t=>{let o=t.player;if(o.destroyed)return;let r=t.element,a=this._elementListeners.get(r);a&&a.forEach(c=>{if(c.name==t.triggerName){let p=bb(r,t.triggerName,t.fromState.value,t.toState.value);p._data=i,Cb(t.player,c.phase,p,c.callback)}}),o.markedForDestroy?this._engine.afterFlush(()=>{o.destroy()}):e.push(t)}),this._queue=[],e.sort((t,o)=>{let r=t.transition.ast.depCount,a=o.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(t.element,o.element)?1:-1})}destroy(i){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}},ED=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(i,e)=>{};_onRemovalComplete(i,e){this.onRemovalComplete(i,e)}constructor(i,e,t){this.bodyNode=i,this.driver=e,this._normalizer=t}get queuedPlayers(){let i=[];return this._namespaceList.forEach(e=>{e.players.forEach(t=>{t.queued&&i.push(t)})}),i}createNamespace(i,e){let t=new TD(i,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(t,e):(this.newHostElements.set(e,t),this.collectEnterElement(e)),this._namespaceLookup[i]=t}_balanceNamespaceList(i,e){let t=this._namespaceList,o=this.namespacesByHostElement;if(t.length-1>=0){let a=!1,c=this.driver.getParentElement(e);for(;c;){let p=o.get(c);if(p){let u=t.indexOf(p);t.splice(u+1,0,i),a=!0;break}c=this.driver.getParentElement(c)}a||t.unshift(i)}else t.push(i);return o.set(e,i),i}register(i,e){let t=this._namespaceLookup[i];return t||(t=this.createNamespace(i,e)),t}registerTrigger(i,e,t){let o=this._namespaceLookup[i];o&&o.register(e,t)&&this.totalAnimations++}destroy(i,e){i&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(i);this.namespacesByHostElement.delete(t.hostElement);let o=this._namespaceList.indexOf(t);o>=0&&this._namespaceList.splice(o,1),t.destroy(e),delete this._namespaceLookup[i]}))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){let e=new Set,t=this.statesByElement.get(i);if(t){for(let o of t.values())if(o.namespaceId){let r=this._fetchNamespace(o.namespaceId);r&&e.add(r)}}return e}trigger(i,e,t,o){if(Eb(e)){let r=this._fetchNamespace(i);if(r)return r.trigger(e,t,o),!0}return!1}insertNode(i,e,t,o){if(!Eb(e))return;let r=e[zl];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let a=this.collectedLeaveElements.indexOf(e);a>=0&&this.collectedLeaveElements.splice(a,1)}if(i){let a=this._fetchNamespace(i);a&&a.insertNode(e,t)}o&&this.collectEnterElement(e)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,e){e?this.disabledNodes.has(i)||(this.disabledNodes.add(i),al(i,gD)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),qh(i,gD))}removeNode(i,e,t){if(Eb(e)){let o=i?this._fetchNamespace(i):null;o?o.removeNode(e,t):this.markElementAsRemoved(i,e,!1,t);let r=this.namespacesByHostElement.get(e);r&&r.id!==i&&r.removeNode(e,t)}else this._onRemovalComplete(e,t)}markElementAsRemoved(i,e,t,o,r){this.collectedLeaveElements.push(e),e[zl]={namespaceId:i,setForRemoval:o,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:r}}listen(i,e,t,o,r){return Eb(e)?this._fetchNamespace(i).listen(e,t,o,r):()=>{}}_buildInstruction(i,e,t,o,r){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,t,o,i.fromState.options,i.toState.options,e,r)}destroyInnerAnimations(i){let e=this.driver.query(i,_0,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(i,Sb,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(i){let e=this.playersByElement.get(i);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(i){let e=this.playersByQueriedElement.get(i);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return Md(this.players).onDone(()=>i());i()})}processLeaveNode(i){let e=i[zl];if(e&&e.setForRemoval){if(i[zl]=BR,e.namespaceId){this.destroyInnerAnimations(i);let t=this._fetchNamespace(e.namespaceId);t&&t.clearElementCache(i)}this._onRemovalComplete(i,e.setForRemoval)}i.classList?.contains(gD)&&this.markElementAsDisabled(i,!1),this.driver.query(i,FJ,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(i=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,o)=>this._balanceNamespaceList(t,o)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let t=0;tt()),this._flushFns=[],this._whenQuietFns.length){let t=this._whenQuietFns;this._whenQuietFns=[],e.length?Md(e).onDone(()=>{t.forEach(o=>o())}):t.forEach(o=>o())}}reportError(i){throw vR(i)}_flushAnimations(i,e){let t=new b0,o=[],r=new Map,a=[],c=new Map,p=new Map,u=new Map,h=new Set;this.disabledNodes.forEach(he=>{h.add(he);let B=this.driver.query(he,NJ,!0);for(let X=0;X{let X=mD+M++;b.set(B,X),he.forEach(se=>al(se,X))});let w=[],y=new Set,E=new Set;for(let he=0;hey.add(se)):E.add(B))}let I=new Map,D=OR(S,Array.from(y));D.forEach((he,B)=>{let X=yb+M++;I.set(B,X),he.forEach(se=>al(se,X))}),i.push(()=>{x.forEach((he,B)=>{let X=b.get(B);he.forEach(se=>qh(se,X))}),D.forEach((he,B)=>{let X=I.get(B);he.forEach(se=>qh(se,X))}),w.forEach(he=>{this.processLeaveNode(he)})});let N=[],P=[];for(let he=this._namespaceList.length-1;he>=0;he--)this._namespaceList[he].drainQueuedTransitions(e).forEach(X=>{let se=X.player,ce=X.element;if(N.push(se),this.collectedEnterElements.length){let Oe=ce[zl];if(Oe&&Oe.setForMove){if(Oe.previousTriggersValues&&Oe.previousTriggersValues.has(X.triggerName)){let We=Oe.previousTriggersValues.get(X.triggerName),ct=this.statesByElement.get(X.element);if(ct&&ct.has(X.triggerName)){let Tt=ct.get(X.triggerName);Tt.value=We,ct.set(X.triggerName,Tt)}}se.destroy();return}}let ke=!_||!this.driver.containsElement(_,ce),ze=I.get(ce),Ke=b.get(ce),Qe=this._buildInstruction(X,t,Ke,ze,ke);if(Qe.errors&&Qe.errors.length){P.push(Qe);return}if(ke){se.onStart(()=>bm(ce,Qe.fromStyles)),se.onDestroy(()=>Bl(ce,Qe.toStyles)),o.push(se);return}if(X.isFallbackTransition){se.onStart(()=>bm(ce,Qe.fromStyles)),se.onDestroy(()=>Bl(ce,Qe.toStyles)),o.push(se);return}let ye=[];Qe.timelines.forEach(Oe=>{Oe.stretchStartingKeyframe=!0,this.disabledNodes.has(Oe.element)||ye.push(Oe)}),Qe.timelines=ye,t.append(ce,Qe.timelines);let q={instruction:Qe,player:se,element:ce};a.push(q),Qe.queriedElements.forEach(Oe=>ls(c,Oe,[]).push(se)),Qe.preStyleProps.forEach((Oe,We)=>{if(Oe.size){let ct=p.get(We);ct||p.set(We,ct=new Set),Oe.forEach((Tt,Xn)=>ct.add(Xn))}}),Qe.postStyleProps.forEach((Oe,We)=>{let ct=u.get(We);ct||u.set(We,ct=new Set),Oe.forEach((Tt,Xn)=>ct.add(Xn))})});if(P.length){let he=[];P.forEach(B=>{he.push(CR(B.triggerName,B.errors))}),N.forEach(B=>B.destroy()),this.reportError(he)}let L=new Map,re=new Map;a.forEach(he=>{let B=he.element;t.has(B)&&(re.set(B,B),this._beforeAnimationBuild(he.player.namespaceId,he.instruction,L))}),o.forEach(he=>{let B=he.element;this._getPreviousPlayers(B,!1,he.namespaceId,he.triggerName,null).forEach(se=>{ls(L,B,[]).push(se),se.destroy()})});let oe=w.filter(he=>NR(he,p,u)),G=new Map;AR(G,this.driver,E,u,rl).forEach(he=>{NR(he,p,u)&&oe.push(he)});let ue=new Map;x.forEach((he,B)=>{AR(ue,this.driver,new Set(he),p,Uh)}),oe.forEach(he=>{let B=G.get(he),X=ue.get(he);G.set(he,new Map([...B?.entries()??[],...X?.entries()??[]]))});let be=[],me=[],De={};a.forEach(he=>{let{element:B,player:X,instruction:se}=he;if(t.has(B)){if(h.has(B)){X.onDestroy(()=>Bl(B,se.toStyles)),X.disabled=!0,X.overrideTotalTime(se.totalTime),o.push(X);return}let ce=De;if(re.size>1){let ze=B,Ke=[];for(;ze=ze.parentNode;){let Qe=re.get(ze);if(Qe){ce=Qe;break}Ke.push(ze)}Ke.forEach(Qe=>re.set(Qe,ce))}let ke=this._buildAnimation(X.namespaceId,se,L,r,ue,G);if(X.setRealPlayer(ke),ce===De)be.push(X);else{let ze=this.playersByElement.get(ce);ze&&ze.length&&(X.parentPlayer=Md(ze)),o.push(X)}}else bm(B,se.fromStyles),X.onDestroy(()=>Bl(B,se.toStyles)),me.push(X),h.has(B)&&o.push(X)}),me.forEach(he=>{let B=r.get(he.element);if(B&&B.length){let X=Md(B);he.setRealPlayer(X)}}),o.forEach(he=>{he.parentPlayer?he.syncPlayerEvents(he.parentPlayer):he.destroy()});for(let he=0;he!ke.destroyed);ce.length?HJ(this,B,ce):this.processLeaveNode(B)}return w.length=0,be.forEach(he=>{this.players.push(he),he.onDone(()=>{he.destroy();let B=this.players.indexOf(he);this.players.splice(B,1)}),he.play()}),be}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,e,t,o,r){let a=[];if(e){let c=this.playersByQueriedElement.get(i);c&&(a=c)}else{let c=this.playersByElement.get(i);if(c){let p=!r||r==C0;c.forEach(u=>{u.queued||!p&&u.triggerName!=o||a.push(u)})}}return(t||o)&&(a=a.filter(c=>!(t&&t!=c.namespaceId||o&&o!=c.triggerName))),a}_beforeAnimationBuild(i,e,t){let o=e.triggerName,r=e.element,a=e.isRemovalTransition?void 0:i,c=e.isRemovalTransition?void 0:o;for(let p of e.timelines){let u=p.element,h=u!==r,_=ls(t,u,[]);this._getPreviousPlayers(u,h,a,c,e.toState).forEach(x=>{let b=x.getRealPlayer();b.beforeDestroy&&b.beforeDestroy(),x.destroy(),_.push(x)})}bm(r,e.fromStyles)}_buildAnimation(i,e,t,o,r,a){let c=e.triggerName,p=e.element,u=[],h=new Set,_=new Set,S=e.timelines.map(b=>{let M=b.element;h.add(M);let w=M[zl];if(w&&w.removedBeforeQueried)return new Pc(b.duration,b.delay);let y=M!==p,E=UJ((t.get(M)||VJ).map(L=>L.getRealPlayer())).filter(L=>{let re=L;return re.element?re.element===M:!1}),I=r.get(M),D=a.get(M),N=aD(this._normalizer,b.keyframes,I,D),P=this._buildPlayer(b,N,E);if(b.subTimeline&&o&&_.add(M),y){let L=new y0(i,c,M);L.setRealPlayer(P),u.push(L)}return P});u.forEach(b=>{ls(this.playersByQueriedElement,b.element,[]).push(b),b.onDone(()=>zJ(this.playersByQueriedElement,b.element,b))}),h.forEach(b=>al(b,pD));let x=Md(S);return x.onDestroy(()=>{h.forEach(b=>qh(b,pD)),Bl(p,e.toStyles)}),_.forEach(b=>{ls(o,b,[]).push(x)}),x}_buildPlayer(i,e,t){return e.length>0?this.driver.animate(i.element,e,i.duration,i.delay,i.easing,t):new Pc(i.duration,i.delay)}},y0=class{namespaceId;triggerName;element;_player=new Pc;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(i,e,t){this.namespaceId=i,this.triggerName=e,this.element=t}setRealPlayer(i){this._containsRealPlayer||(this._player=i,this._queuedCallbacks.forEach((e,t)=>{e.forEach(o=>Cb(i,t,void 0,o))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){let e=this._player;e.triggerCallback&&i.onStart(()=>e.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,e){ls(this._queuedCallbacks,i,[]).push(e)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){let e=this._player;e.triggerCallback&&e.triggerCallback(i)}};function zJ(n,i,e){let t=n.get(i);if(t){if(t.length){let o=t.indexOf(e);t.splice(o,1)}t.length==0&&n.delete(i)}return t}function jJ(n){return n??null}function Eb(n){return n&&n.nodeType===1}function $J(n){return n=="start"||n=="done"}function IR(n,i){let e=n.style.display;return n.style.display=i??"none",e}function AR(n,i,e,t,o){let r=[];e.forEach(p=>r.push(IR(p)));let a=[];t.forEach((p,u)=>{let h=new Map;p.forEach(_=>{let S=i.computeStyle(u,_,o);h.set(_,S),(!S||S.length==0)&&(u[zl]=BJ,a.push(u))}),n.set(u,h)});let c=0;return e.forEach(p=>IR(p,r[c++])),a}function OR(n,i){let e=new Map;if(n.forEach(c=>e.set(c,[])),i.length==0)return e;let t=1,o=new Set(i),r=new Map;function a(c){if(!c)return t;let p=r.get(c);if(p)return p;let u=c.parentNode;return e.has(u)?p=u:o.has(u)?p=t:p=a(u),r.set(c,p),p}return i.forEach(c=>{let p=a(c);p!==t&&e.get(p).push(c)}),e}function al(n,i){n.classList?.add(i)}function qh(n,i){n.classList?.remove(i)}function HJ(n,i,e){Md(e).onDone(()=>n.processLeaveNode(i))}function UJ(n){let i=[];return zR(n,i),i}function zR(n,i){for(let e=0;eo.add(r)):i.set(n,t),e.delete(n),!0}var Qh=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(i,e)=>{};constructor(i,e,t){this._driver=e,this._normalizer=t,this._transitionEngine=new ED(i.body,e,t),this._timelineEngine=new kD(i.body,e,t),this._transitionEngine.onRemovalComplete=(o,r)=>this.onRemovalComplete(o,r)}registerTrigger(i,e,t,o,r){let a=i+"-"+o,c=this._triggerCache[a];if(!c){let p=[],u=[],h=RR(this._driver,r,p,u);if(p.length)throw cR(o,p);c=IJ(o,h,this._normalizer),this._triggerCache[a]=c}this._transitionEngine.registerTrigger(e,o,c)}register(i,e){this._transitionEngine.register(i,e)}destroy(i,e){this._transitionEngine.destroy(i,e)}onInsert(i,e,t,o){this._transitionEngine.insertNode(i,e,t,o)}onRemove(i,e,t){this._transitionEngine.removeNode(i,e,t)}disableAnimations(i,e){this._transitionEngine.markElementAsDisabled(i,e)}process(i,e,t,o){if(t.charAt(0)=="@"){let[r,a]=sD(t),c=o;this._timelineEngine.command(r,e,a,c)}else this._transitionEngine.trigger(i,e,t,o)}listen(i,e,t,o,r){if(t.charAt(0)=="@"){let[a,c]=sD(t);return this._timelineEngine.listen(a,e,c,r)}return this._transitionEngine.listen(i,e,t,o,r)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(i){this._transitionEngine.afterFlushAnimationsDone(i)}};function WJ(n,i){let e=null,t=null;return Array.isArray(i)&&i.length?(e=vD(i[0]),i.length>1&&(t=vD(i[i.length-1]))):i instanceof Map&&(e=vD(i)),e||t?new qJ(n,e,t):null}var qJ=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,t,o){this._element=e,this._startStyles=t,this._endStyles=o;let r=n.initialStylesByElement.get(e);r||n.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Bl(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Bl(this._element,this._initialStyles),this._endStyles&&(Bl(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(bm(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(bm(this._element,this._endStyles),this._endStyles=null),Bl(this._element,this._initialStyles),this._state=3)}}return n})();function vD(n){let i=null;return n.forEach((e,t)=>{QJ(t)&&(i=i||new Map,i.set(t,e))}),i}function QJ(n){return n==="display"||n==="position"}var Fb=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(i,e,t,o){this.element=i,this.keyframes=e,this.options=t,this._specialStyles=o,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let i=this.keyframes,e=this._triggerWebAnimation(this.element,i,this.options);if(!e)return this._onFinish(),null;this.domPlayer=e,this._finalKeyframe=i.length?i[i.length-1]:new Map;let t=()=>this._onFinish();return e.addEventListener("finish",t),this.onDestroy(()=>{e.removeEventListener("finish",t)}),e}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(i){let e=[];return i.forEach(t=>{e.push(Object.fromEntries(t))}),e}_triggerWebAnimation(i,e,t){let o=this._convertKeyframesToObject(e);try{return i.animate(o,t)}catch{return null}}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){let i=this._buildPlayer();i&&(this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),i.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}setPosition(i){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=i*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let i=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,o)=>{o!=="offset"&&i.set(o,this._finished?t:Mb(this.element,o))}),this.currentSnapshot=i}triggerCallback(i){let e=i==="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},Rb=class{validateStyleProperty(i){return!0}validateAnimatableStyleProperty(i){return!0}containsElement(i,e){return lD(i,e)}getParentElement(i){return xb(i)}query(i,e,t){return cD(i,e,t)}computeStyle(i,e,t){return Mb(i,e)}animate(i,e,t,o,r,a=[]){let c=o==0?"both":"forwards",p={duration:t,delay:o,fill:c};r&&(p.easing=r);let u=new Map,h=a.filter(x=>x instanceof Fb);SR(t,o)&&h.forEach(x=>{x.currentSnapshot.forEach((b,M)=>u.set(M,b))});let _=xR(e).map(x=>new Map(x));_=wR(i,_,u);let S=WJ(i,_);return new Fb(i,_,p,S)}};var Db="@",jR="@.disabled",Lb=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(i,e,t,o){this.namespaceId=i,this.delegate=e,this.engine=t,this._onDestroy=o}get data(){return this.delegate.data}destroyNode(i){this.delegate.destroyNode?.(i)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(i,e){return this.delegate.createElement(i,e)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,e){this.delegate.appendChild(i,e),this.engine.onInsert(this.namespaceId,e,i,!1)}insertBefore(i,e,t,o=!0){this.delegate.insertBefore(i,e,t),this.engine.onInsert(this.namespaceId,e,i,o)}removeChild(i,e,t,o){if(o){this.delegate.removeChild(i,e,t,o);return}this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(i,e){return this.delegate.selectRootElement(i,e)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,e,t,o){this.delegate.setAttribute(i,e,t,o)}removeAttribute(i,e,t){this.delegate.removeAttribute(i,e,t)}addClass(i,e){this.delegate.addClass(i,e)}removeClass(i,e){this.delegate.removeClass(i,e)}setStyle(i,e,t,o){this.delegate.setStyle(i,e,t,o)}removeStyle(i,e,t){this.delegate.removeStyle(i,e,t)}setProperty(i,e,t){e.charAt(0)==Db&&e==jR?this.disableAnimations(i,!!t):this.delegate.setProperty(i,e,t)}setValue(i,e){this.delegate.setValue(i,e)}listen(i,e,t,o){return this.delegate.listen(i,e,t,o)}disableAnimations(i,e){this.engine.disableAnimations(i,e)}},DD=class extends Lb{factory;constructor(i,e,t,o,r){super(e,t,o,r),this.factory=i,this.namespaceId=e}setProperty(i,e,t){e.charAt(0)==Db?e.charAt(1)=="."&&e==jR?(t=t===void 0?!0:!!t,this.disableAnimations(i,t)):this.engine.process(this.namespaceId,i,e.slice(1),t):this.delegate.setProperty(i,e,t)}listen(i,e,t,o){if(e.charAt(0)==Db){let r=XJ(i),a=e.slice(1),c="";return a.charAt(0)!=Db&&([a,c]=KJ(a)),this.engine.listen(this.namespaceId,r,a,c,p=>{let u=p._data||-1;this.factory.scheduleListenerCallback(u,t,p)})}return this.delegate.listen(i,e,t,o)}};function XJ(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function KJ(n){let i=n.indexOf("."),e=n.substring(0,i),t=n.slice(i+1);return[e,t]}var Vb=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(i,e,t){this.delegate=i,this.engine=e,this._zone=t,e.onRemovalComplete=(o,r)=>{r?.removeChild(null,o)}}createRenderer(i,e){let o=this.delegate.createRenderer(i,e);if(!i||!e?.data?.animation){let u=this._rendererCache,h=u.get(o);if(!h){let _=()=>u.delete(o);h=new Lb("",o,this.engine,_),u.set(o,h)}return h}let r=e.id,a=e.id+"-"+this._currentId;this._currentId++,this.engine.register(a,i);let c=u=>{Array.isArray(u)?u.forEach(c):this.engine.registerTrigger(r,a,i,u.name,u)};return e.data.animation.forEach(c),new DD(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(i,e,t){if(i>=0&&ie(t));return}let o=this._animationCallbacksBuffer;o.length==0&&queueMicrotask(()=>{this._zone.run(()=>{o.forEach(r=>{let[a,c]=r;a(c)}),this._animationCallbacksBuffer=[]})}),o.push([e,t])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(i){this.engine.flush(),this.delegate.componentReplaced?.(i)}};var ZJ=(()=>{class n extends Qh{constructor(e,t,o){super(e,t,o)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||n)(ge(Xi),ge(su),ge(lu))};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();function JJ(){return new Pb}function eee(){return new Vb(f(VO),f(Qh),f(Vi))}var HR=[{provide:lu,useFactory:JJ},{provide:Qh,useClass:ZJ},{provide:sd,useFactory:eee}],tee=[{provide:su,useClass:PD},{provide:ak,useValue:"NoopAnimations"},...HR],$R=[{provide:su,useFactory:()=>new Rb},{provide:ak,useFactory:()=>"BrowserAnimations"},...HR],UR=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?tee:$R}}static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({providers:$R,imports:[rC]})}return n})();function nee(n,i){return typeof n>"u"?typeof i>"u"?n:i:n}function FD(n,i){return n=nee(n,i),typeof n=="function"?function(){for(var t=arguments,o=arguments.length,r=Array(o),a=0;a"u"?"undefined":AD(n))==="object"&&n.nodeType===1&&AD(n.style)==="object"&&AD(n.ownerDocument)==="object"};function qR(n,i){if(i=VD(i,!0),!WR(i))return-1;for(var e=0;e0;)e[t]=i[t+1];return e=e.map(VD),iee(n,e)}function ree(n){for(var i=arguments,e=[],t=arguments.length-1;t-- >0;)e[t]=i[t+1];return e.map(VD).reduce(function(o,r){var a=qR(n,r);return a!==-1?o.concat(n.splice(a,1)):o},[])}function VD(n,i){if(typeof n=="string")try{return document.querySelector(n)}catch(e){throw e}if(!WR(n)&&!i)throw new TypeError(n+" is not a DOM element.");return n}function aee(n,i){i=i||{};var e=FD(i.allowUpdate,!0);return function(o){if(o=o||window.event,n.target=o.target||o.srcElement||o.originalTarget,n.element=this,n.type=o.type,!!e(o)){if(o.targetTouches)n.x=o.targetTouches[0].clientX,n.y=o.targetTouches[0].clientY,n.pageX=o.targetTouches[0].pageX,n.pageY=o.targetTouches[0].pageY,n.screenX=o.targetTouches[0].screenX,n.screenY=o.targetTouches[0].screenY;else{if(o.pageX===null&&o.clientX!==null){var r=o.target&&o.target.ownerDocument||document,a=r.documentElement,c=r.body;n.pageX=o.clientX+(a&&a.scrollLeft||c&&c.scrollLeft||0)-(a&&a.clientLeft||c&&c.clientLeft||0),n.pageY=o.clientY+(a&&a.scrollTop||c&&c.scrollTop||0)-(a&&a.clientTop||c&&c.clientTop||0)}else n.pageX=o.pageX,n.pageY=o.pageY;n.x=o.clientX,n.y=o.clientY,n.screenX=o.screenX,n.screenY=o.screenY}n.clientX=n.x,n.clientY=n.y}}}function see(){var n={top:{value:0,enumerable:!0},left:{value:0,enumerable:!0},right:{value:window.innerWidth,enumerable:!0},bottom:{value:window.innerHeight,enumerable:!0},width:{value:window.innerWidth,enumerable:!0},height:{value:window.innerHeight,enumerable:!0},x:{value:0,enumerable:!0},y:{value:0,enumerable:!0}};if(Object.create)return Object.create({},n);var i={};return Object.defineProperties(i,n),i}function QR(n){if(n===window)return see();try{var i=n.getBoundingClientRect();return i.x===void 0&&(i.x=i.left,i.y=i.top),i}catch{throw new TypeError("Can't call getBoundingClientRect on "+n)}}function lee(n,i){var e=QR(i);return n.y>e.top&&n.ye.left&&n.x"u")return function(){};for(var n=0,i=w0.length;n"u")return function(){};for(var n=0,i=w0.length;nue.right-e.margin.right?be=Math.ceil(Math.min(1,(a.x-ue.right)/e.margin.right+1)*e.maxSpeed.right):be=0,a.yue.bottom-e.margin.bottom?me=Math.ceil(Math.min(1,(a.y-ue.bottom)/e.margin.bottom+1)*e.maxSpeed.bottom):me=0,e.syncMove()&&p.dispatch($,{pageX:a.pageX+be,pageY:a.pageY+me,clientX:a.x+be,clientY:a.y+me}),setTimeout(function(){me&&oe($,me),be&&G($,be)})}function oe($,ue){$===window?window.scrollTo($.pageXOffset,$.pageYOffset+ue):$.scrollTop+=ue}function G($,ue){$===window?window.scrollTo($.pageXOffset+ue,$.pageYOffset):$.scrollLeft+=ue}}function pee(n,i){return new mee(n,i)}function GR(n,i,e){return e?n.y>e.top&&n.ye.left&&n.x{class n{constructor(){this.currentDrag=new He}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=J({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),hee=(()=>{class n{constructor(){this.elementRef=f(Zt)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275dir=ft({type:n,selectors:[["","mwlDraggableScrollContainer",""]]})}}return n})();function fee(n,i,e){e&&e.split(" ").forEach(t=>n.addClass(i.nativeElement,t))}function gee(n,i,e){e&&e.split(" ").forEach(t=>n.removeClass(i.nativeElement,t))}var KR=(()=>{class n{constructor(){this.dragAxis={x:!0,y:!0},this.dragSnapGrid={},this.ghostDragEnabled=!0,this.showOriginalElementWhileDragging=!1,this.dragCursor="",this.autoScroll={margin:20},this.dragPointerDown=new ve,this.dragStart=new ve,this.ghostElementCreated=new ve,this.dragging=new ve,this.dragEnd=new ve,this.pointerDown$=new He,this.pointerMove$=new He,this.pointerUp$=new He,this.eventListenerSubscriptions={},this.destroy$=new He,this.timeLongPress={timerBegin:0,timerEnd:0},this.element=f(Zt),this.renderer=f(Si),this.draggableHelper=f(uee),this.zone=f(Vi),this.vcr=f(oo),this.scrollContainer=f(hee,{optional:!0}),this.document=f(Xi)}ngOnInit(){this.checkEventListeners();let e=this.pointerDown$.pipe(ai(()=>this.canDrag()),ic(t=>{t.event.stopPropagation&&!this.scrollContainer&&t.event.stopPropagation();let o=this.renderer.createElement("style");this.renderer.setAttribute(o,"type","text/css"),this.renderer.appendChild(o,this.renderer.createText(` body * { -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; user-select: none; } - `)),requestAnimationFrame(()=>{this.document.head.appendChild(o)});let r=this.getScrollPosition(),a=new Nr(x=>{let C=this.scrollContainer?this.scrollContainer.elementRef.nativeElement:"window";return this.renderer.listen(C,"scroll",M=>x.next(M))}).pipe(ci(r),_t(()=>this.getScrollPosition())),c=new je,m=new hh;this.dragPointerDown.observers.length>0&&this.zone.run(()=>{this.dragPointerDown.next({x:0,y:0})});let u=Dn(this.pointerUp$,this.pointerDown$,m,this.destroy$).pipe(zl()),h=ir([this.pointerMove$,a]).pipe(_t(([x,C])=>({currentDrag$:c,transformX:x.clientX-t.clientX,transformY:x.clientY-t.clientY,clientX:x.clientX,clientY:x.clientY,scrollLeft:C.left,scrollTop:C.top,target:x.event.target})),_t(x=>(this.dragSnapGrid.x&&(x.transformX=Math.round(x.transformX/this.dragSnapGrid.x)*this.dragSnapGrid.x),this.dragSnapGrid.y&&(x.transformY=Math.round(x.transformY/this.dragSnapGrid.y)*this.dragSnapGrid.y),x)),_t(x=>(this.dragAxis.x||(x.transformX=0),this.dragAxis.y||(x.transformY=0),x)),_t(x=>{let C=x.scrollLeft-r.left,M=x.scrollTop-r.top;return We(q({},x),{x:x.transformX+C,y:x.transformY+M})}),Kn(({x,y:C,transformX:M,transformY:w})=>!this.validateDrag||this.validateDrag({x,y:C,transform:{x:M,y:w}})),tt(u),zl()),g=h.pipe(Wi(1),zl()),S=h.pipe(w_(1),zl());return g.subscribe(({clientX:x,clientY:C,x:M,y:w})=>{if(this.dragStart.observers.length>0&&this.zone.run(()=>{this.dragStart.next({cancelDrag$:m})}),this.scroller=x7([this.scrollContainer?this.scrollContainer.elementRef.nativeElement:this.document.defaultView],We(q({},this.autoScroll),{autoScroll(){return!0}})),Lie(this.renderer,this.element,this.dragActiveClass),this.ghostDragEnabled){let y=this.element.nativeElement.getBoundingClientRect(),k=this.element.nativeElement.cloneNode(!0);if(this.showOriginalElementWhileDragging||this.renderer.setStyle(this.element.nativeElement,"visibility","hidden"),this.ghostElementAppendTo?this.ghostElementAppendTo.appendChild(k):this.element.nativeElement.parentNode.insertBefore(k,this.element.nativeElement.nextSibling),this.ghostElement=k,this.document.body.style.cursor=this.dragCursor,this.setElementStyles(k,{position:"fixed",top:`${y.top}px`,left:`${y.left}px`,width:`${y.width}px`,height:`${y.height}px`,cursor:this.dragCursor,margin:"0",willChange:"transform",pointerEvents:"none"}),this.ghostElementTemplate){let I=this.vcr.createEmbeddedView(this.ghostElementTemplate);k.innerHTML="",I.rootNodes.filter(D=>D instanceof Node).forEach(D=>{k.appendChild(D)}),S.subscribe(()=>{this.vcr.remove(this.vcr.indexOf(I))})}this.ghostElementCreated.observers.length>0&&this.zone.run(()=>{this.ghostElementCreated.emit({clientX:x-M,clientY:C-w,element:k})}),S.subscribe(()=>{k.parentElement.removeChild(k),this.ghostElement=null,this.renderer.setStyle(this.element.nativeElement,"visibility","")})}this.draggableHelper.currentDrag.next(c)}),S.pipe(Cr(x=>{let C=m.pipe(RN(),Wi(1),_t(M=>We(q({},x),{dragCancelled:M>0})));return m.complete(),C})).subscribe(({x,y:C,dragCancelled:M})=>{this.scroller.destroy(),this.dragEnd.observers.length>0&&this.zone.run(()=>{this.dragEnd.next({x,y:C,dragCancelled:M})}),Bie(this.renderer,this.element,this.dragActiveClass),c.complete()}),Dn(u,S).pipe(Wi(1)).subscribe(()=>{requestAnimationFrame(()=>{this.document.head.removeChild(o)})}),h}),zl());Dn(e.pipe(Wi(1),_t(t=>[,t])),e.pipe(r1())).pipe(Kn(([t,o])=>t?t.x!==o.x||t.y!==o.y:!0),_t(([t,o])=>o)).subscribe(({x:t,y:o,currentDrag$:r,clientX:a,clientY:c,transformX:m,transformY:u,target:h})=>{this.dragging.observers.length>0&&this.zone.run(()=>{this.dragging.next({x:t,y:o})}),requestAnimationFrame(()=>{if(this.ghostElement){let g=`translate3d(${m}px, ${u}px, 0px)`;this.setElementStyles(this.ghostElement,{transform:g,"-webkit-transform":g,"-ms-transform":g,"-moz-transform":g,"-o-transform":g})}}),r.next({clientX:a,clientY:c,dropData:this.dropData,target:h})})}ngOnChanges(e){e.dragAxis&&this.checkEventListeners()}ngOnDestroy(){this.unsubscribeEventListeners(),this.pointerDown$.complete(),this.pointerMove$.complete(),this.pointerUp$.complete(),this.destroy$.next()}checkEventListeners(){let e=this.canDrag(),t=Object.keys(this.eventListenerSubscriptions).length>0;e&&!t?this.zone.runOutsideAngular(()=>{this.eventListenerSubscriptions.mousedown=this.renderer.listen(this.element.nativeElement,"mousedown",o=>{this.onMouseDown(o)}),this.eventListenerSubscriptions.mouseup=this.renderer.listen("document","mouseup",o=>{this.onMouseUp(o)}),this.eventListenerSubscriptions.touchstart=this.renderer.listen(this.element.nativeElement,"touchstart",o=>{this.onTouchStart(o)}),this.eventListenerSubscriptions.touchend=this.renderer.listen("document","touchend",o=>{this.onTouchEnd(o)}),this.eventListenerSubscriptions.touchcancel=this.renderer.listen("document","touchcancel",o=>{this.onTouchEnd(o)}),this.eventListenerSubscriptions.mouseenter=this.renderer.listen(this.element.nativeElement,"mouseenter",()=>{this.onMouseEnter()}),this.eventListenerSubscriptions.mouseleave=this.renderer.listen(this.element.nativeElement,"mouseleave",()=>{this.onMouseLeave()})}):!e&&t&&this.unsubscribeEventListeners()}onMouseDown(e){e.button===0&&(this.eventListenerSubscriptions.mousemove||(this.eventListenerSubscriptions.mousemove=this.renderer.listen("document","mousemove",t=>{this.pointerMove$.next({event:t,clientX:t.clientX,clientY:t.clientY})})),this.pointerDown$.next({event:e,clientX:e.clientX,clientY:e.clientY}))}onMouseUp(e){e.button===0&&(this.eventListenerSubscriptions.mousemove&&(this.eventListenerSubscriptions.mousemove(),delete this.eventListenerSubscriptions.mousemove),this.pointerUp$.next({event:e,clientX:e.clientX,clientY:e.clientY}))}onTouchStart(e){let t,o,r;if(this.touchStartLongPress&&(this.timeLongPress.timerBegin=Date.now(),o=!1,r=this.hasScrollbar(),t=this.getScrollPosition()),!this.eventListenerSubscriptions.touchmove){let a=la(this.document,"contextmenu").subscribe(m=>{m.preventDefault()}),c=la(this.document,"touchmove",{passive:!1}).subscribe(m=>{this.touchStartLongPress&&!o&&r&&(o=this.shouldBeginDrag(e,m,t)),(!this.touchStartLongPress||!r||o)&&(m.preventDefault(),this.pointerMove$.next({event:m,clientX:m.targetTouches[0].clientX,clientY:m.targetTouches[0].clientY}))});this.eventListenerSubscriptions.touchmove=()=>{a.unsubscribe(),c.unsubscribe()}}this.pointerDown$.next({event:e,clientX:e.touches[0].clientX,clientY:e.touches[0].clientY})}onTouchEnd(e){this.eventListenerSubscriptions.touchmove&&(this.eventListenerSubscriptions.touchmove(),delete this.eventListenerSubscriptions.touchmove,this.touchStartLongPress&&this.enableScroll()),this.pointerUp$.next({event:e,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY})}onMouseEnter(){this.setCursor(this.dragCursor)}onMouseLeave(){this.setCursor("")}canDrag(){return this.dragAxis.x||this.dragAxis.y}setCursor(e){this.eventListenerSubscriptions.mousemove||this.renderer.setStyle(this.element.nativeElement,"cursor",e)}unsubscribeEventListeners(){Object.keys(this.eventListenerSubscriptions).forEach(e=>{this.eventListenerSubscriptions[e](),delete this.eventListenerSubscriptions[e]})}setElementStyles(e,t){Object.keys(t).forEach(o=>{this.renderer.setStyle(e,o,t[o])})}getScrollElement(){return this.scrollContainer?this.scrollContainer.elementRef.nativeElement:this.document.body}getScrollPosition(){return this.scrollContainer?{top:this.scrollContainer.elementRef.nativeElement.scrollTop,left:this.scrollContainer.elementRef.nativeElement.scrollLeft}:{top:window.pageYOffset||this.document.documentElement.scrollTop,left:window.pageXOffset||this.document.documentElement.scrollLeft}}shouldBeginDrag(e,t,o){let r=this.getScrollPosition(),a={top:Math.abs(r.top-o.top),left:Math.abs(r.left-o.left)},c=Math.abs(t.targetTouches[0].clientX-e.touches[0].clientX)-a.left,m=Math.abs(t.targetTouches[0].clientY-e.touches[0].clientY)-a.top,u=c+m,h=this.touchStartLongPress;return(u>h.delta||a.top>0||a.left>0)&&(this.timeLongPress.timerBegin=Date.now()),this.timeLongPress.timerEnd=Date.now(),this.timeLongPress.timerEnd-this.timeLongPress.timerBegin>=h.delay?(this.disableScroll(),!0):!1}enableScroll(){this.scrollContainer&&this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement,"overflow",""),this.renderer.setStyle(this.document.body,"overflow","")}disableScroll(){this.scrollContainer&&this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement,"overflow","hidden"),this.renderer.setStyle(this.document.body,"overflow","hidden")}hasScrollbar(){let e=this.getScrollElement(),t=e.scrollWidth>e.clientWidth,o=e.scrollHeight>e.clientHeight;return t||o}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275dir=ft({type:n,selectors:[["","mwlDraggable",""]],inputs:{dropData:"dropData",dragAxis:"dragAxis",dragSnapGrid:"dragSnapGrid",ghostDragEnabled:"ghostDragEnabled",showOriginalElementWhileDragging:"showOriginalElementWhileDragging",validateDrag:"validateDrag",dragCursor:"dragCursor",dragActiveClass:"dragActiveClass",ghostElementAppendTo:"ghostElementAppendTo",ghostElementTemplate:"ghostElementTemplate",touchStartLongPress:"touchStartLongPress",autoScroll:"autoScroll"},outputs:{dragPointerDown:"dragPointerDown",dragStart:"dragStart",ghostElementCreated:"ghostElementCreated",dragging:"dragging",dragEnd:"dragEnd"},features:[dn]})}}return n})();var Xx=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=Ut({type:n})}static{this.\u0275inj=Ht({})}}return n})();var gv=class{constructor(i){this.rawFile=i;let e=i instanceof HTMLInputElement?i.value:i;this[`_createFrom${typeof e=="string"?"FakePath":"Object"}`](e)}_createFromFakePath(i){this.lastModifiedDate=void 0,this.size=void 0,this.type=`like/${i.slice(i.lastIndexOf(".")+1).toLowerCase()}`,this.name=i.slice(i.lastIndexOf("/")+i.lastIndexOf("\\")+2)}_createFromObject(i){this.size=i.size,this.type=i.type,this.name=i.name}},yI=class{constructor(i,e,t){this.url="/",this.headers=[],this.withCredentials=!0,this.formData=[],this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.uploader=i,this.some=e,this.options=t,this.file=new gv(e),this._file=e,i.options&&(this.method=i.options.method||"POST",this.alias=i.options.itemAlias||"file"),this.url=i.options.url}upload(){try{this.uploader.uploadItem(this)}catch{this.uploader._onCompleteItem(this,"",0,{}),this.uploader._onErrorItem(this,"",0,{})}}cancel(){this.uploader.cancelItem(this)}remove(){this.uploader.removeFromQueue(this)}onBeforeUpload(){}onBuildForm(i){return{form:i}}onProgress(i){return{progress:i}}onSuccess(i,e,t){return{response:i,status:e,headers:t}}onError(i,e,t){return{response:i,status:e,headers:t}}onCancel(i,e,t){return{response:i,status:e,headers:t}}onComplete(i,e,t){return{response:i,status:e,headers:t}}_onBeforeUpload(){this.isReady=!0,this.isUploading=!0,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.onBeforeUpload()}_onBuildForm(i){this.onBuildForm(i)}_onProgress(i){this.progress=i,this.onProgress(i)}_onSuccess(i,e,t){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!0,this.isCancel=!1,this.isError=!1,this.progress=100,this.index=void 0,this.onSuccess(i,e,t)}_onError(i,e,t){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!1,this.isCancel=!1,this.isError=!0,this.progress=0,this.index=void 0,this.onError(i,e,t)}_onCancel(i,e,t){this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!0,this.isError=!1,this.progress=0,this.index=void 0,this.onCancel(i,e,t)}_onComplete(i,e,t){this.onComplete(i,e,t),this.uploader.options.removeAfterUpload&&this.remove()}_prepareToUploading(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0}},zie=(()=>{class n{static getMimeClass(e){let t="application";return e?.type&&this.mime_psd.indexOf(e.type)!==-1||e?.type?.match("image.*")?t="image":e?.type?.match("video.*")?t="video":e?.type?.match("audio.*")?t="audio":e?.type==="application/pdf"?t="pdf":e?.type&&this.mime_compress.indexOf(e.type)!==-1?t="compress":e?.type&&this.mime_doc.indexOf(e.type)!==-1?t="doc":e?.type&&this.mime_xsl.indexOf(e.type)!==-1?t="xls":e?.type&&this.mime_ppt.indexOf(e.type)!==-1&&(t="ppt"),t==="application"&&e?.name&&(t=this.fileTypeDetection(e.name)),t}static fileTypeDetection(e){let t={jpg:"image",jpeg:"image",tif:"image",psd:"image",bmp:"image",png:"image",nef:"image",tiff:"image",cr2:"image",dwg:"image",cdr:"image",ai:"image",indd:"image",pin:"image",cdp:"image",skp:"image",stp:"image","3dm":"image",mp3:"audio",wav:"audio",wma:"audio",mod:"audio",m4a:"audio",compress:"compress",zip:"compress",rar:"compress","7z":"compress",lz:"compress",z01:"compress",bz2:"compress",gz:"compress",pdf:"pdf",xls:"xls",xlsx:"xls",ods:"xls",mp4:"video",avi:"video",wmv:"video",mpg:"video",mts:"video",flv:"video","3gp":"video",vob:"video",m4v:"video",mpeg:"video",m2ts:"video",mov:"video",doc:"doc",docx:"doc",eps:"doc",txt:"doc",odt:"doc",rtf:"doc",ppt:"ppt",pptx:"ppt",pps:"ppt",ppsx:"ppt",odp:"ppt"},o=e.split(".");if(o.length<2)return"application";let r=o[o.length-1].toLowerCase();return t[r]===void 0?"application":t[r]}}return n.mime_doc=["application/msword","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-word.document.macroEnabled.12","application/vnd.ms-word.template.macroEnabled.12"],n.mime_xsl=["application/vnd.ms-excel","application/vnd.ms-excel","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.ms-excel.sheet.macroEnabled.12","application/vnd.ms-excel.template.macroEnabled.12","application/vnd.ms-excel.addin.macroEnabled.12","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],n.mime_ppt=["application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/vnd.ms-powerpoint.addin.macroEnabled.12","application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],n.mime_psd=["image/photoshop","image/x-photoshop","image/psd","application/photoshop","application/psd","zz-application/zz-winassoc-psd"],n.mime_compress=["application/x-gtar","application/x-gcompress","application/compress","application/x-tar","application/x-rar-compressed","application/octet-stream","application/x-zip-compressed","application/zip-compressed","application/x-7z-compressed","application/gzip","application/x-bzip2"],n})();function jie(n){return File&&n instanceof File}var Ya=class{constructor(i){this.isUploading=!1,this.queue=[],this.progress=0,this._nextIndex=0,this.options={autoUpload:!1,isHTML5:!0,filters:[],removeAfterUpload:!1,disableMultipart:!1,formatDataFunction:e=>e._file,formatDataFunctionIsAsync:!1,url:""},this.setOptions(i),this.response=new _e}setOptions(i){this.options=Object.assign(this.options,i),this.authToken=this.options.authToken,this.authTokenHeader=this.options.authTokenHeader||"Authorization",this.autoUpload=this.options.autoUpload,this.options.filters?.unshift({name:"queueLimit",fn:this._queueLimitFilter}),this.options.maxFileSize&&this.options.filters?.unshift({name:"fileSize",fn:this._fileSizeFilter}),this.options.allowedFileType&&this.options.filters?.unshift({name:"fileType",fn:this._fileTypeFilter}),this.options.allowedMimeType&&this.options.filters?.unshift({name:"mimeType",fn:this._mimeTypeFilter});for(let e=0;e{o||(o=this.options);let h=new gv(u);if(this._isValidFile(h,a,o)){let g=new yI(this,u,o);m.push(g),this.queue.push(g),this._onAfterAddingFile(g)}else if(this._failFilterIndex){let g=a[this._failFilterIndex];this._onWhenAddingFileFailed(h,g,o)}}),this.queue.length!==c&&(this._onAfterAddingAll(m),this.progress=this._getTotalProgress()),this._render(),this.options.autoUpload&&this.uploadAll()}removeFromQueue(i){let e=this.getIndexOfItem(i),t=this.queue[e];t.isUploading&&t.cancel(),this.queue.splice(e,1),this.progress=this._getTotalProgress()}clearQueue(){for(;this.queue.length;)this.queue[0].remove();this.progress=0}uploadItem(i){let e=this.getIndexOfItem(i),t=this.queue[e],o=this.options.isHTML5?"_xhrTransport":"_iframeTransport";t._prepareToUploading(),!this.isUploading&&(this.isUploading=!0,this[o](t))}cancelItem(i){let e=this.getIndexOfItem(i),t=this.queue[e],o=this.options.isHTML5?t._xhr:t._form;t&&t.isUploading&&o.abort()}uploadAll(){let i=this.getNotUploadedItems().filter(e=>!e.isUploading);i.length&&(i.map(e=>e._prepareToUploading()),i[0].upload())}cancelAll(){this.getNotUploadedItems().map(e=>e.cancel())}isFile(i){return jie(i)}isFileLikeObject(i){return i instanceof gv}getIndexOfItem(i){return typeof i=="number"?i:this.queue.indexOf(i)}getNotUploadedItems(){return this.queue.filter(i=>!i.isUploaded)}getReadyItems(){return this.queue.filter(i=>i.isReady&&!i.isUploading).sort((i,e)=>i.index-e.index)}onAfterAddingAll(i){return{fileItems:i}}onBuildItemForm(i,e){return{fileItem:i,form:e}}onAfterAddingFile(i){return{fileItem:i}}onWhenAddingFileFailed(i,e,t){return{item:i,filter:e,options:t}}onBeforeUploadItem(i){return{fileItem:i}}onProgressItem(i,e){return{fileItem:i,progress:e}}onProgressAll(i){return{progress:i}}onSuccessItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onErrorItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onCancelItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onCompleteItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onCompleteAll(){}_mimeTypeFilter(i){return!(i?.type&&this.options.allowedMimeType&&this.options.allowedMimeType?.indexOf(i.type)===-1)}_fileSizeFilter(i){return!(this.options.maxFileSize&&i.size>this.options.maxFileSize)}_fileTypeFilter(i){return!(this.options.allowedFileType&&this.options.allowedFileType.indexOf(zie.getMimeClass(i))===-1)}_onErrorItem(i,e,t,o){i._onError(e,t,o),this.onErrorItem(i,e,t,o)}_onCompleteItem(i,e,t,o){i._onComplete(e,t,o),this.onCompleteItem(i,e,t,o);let r=this.getReadyItems()[0];if(this.isUploading=!1,r){r.upload();return}this.onCompleteAll(),this.progress=this._getTotalProgress(),this._render()}_headersGetter(i){return e=>e?i[e.toLowerCase()]||void 0:i}_xhrTransport(i){let e=this,t=i._xhr=new XMLHttpRequest,o;if(this._onBeforeUploadItem(i),typeof i._file.size!="number")throw new TypeError("The file specified is no longer valid");if(this.options.disableMultipart)this.options.formatDataFunction&&(o=this.options.formatDataFunction(i));else{o=new FormData,this._onBuildItemForm(i,o);let r=()=>o.append(i.alias,i._file,i.file.name);this.options.parametersBeforeFiles||r(),this.options.additionalParameter!==void 0&&Object.keys(this.options.additionalParameter).forEach(a=>{let c=this.options.additionalParameter?.[a];typeof c=="string"&&c.indexOf("{{file_name}}")>=0&&i.file?.name&&(c=c.replace("{{file_name}}",i.file.name)),o.append(a,c)}),r&&this.options.parametersBeforeFiles&&r()}if(t.upload.onprogress=r=>{let a=Math.round(r.lengthComputable?r.loaded*100/r.total:0);this._onProgressItem(i,a)},t.onload=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),a=this._transformResponse(t.response,r),m=`_on${this._isSuccessCode(t.status)?"Success":"Error"}Item`;this[m](i,a,t.status,r),this._onCompleteItem(i,a,t.status,r)},t.onerror=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),a=this._transformResponse(t.response,r);this._onErrorItem(i,a,t.status,r),this._onCompleteItem(i,a,t.status,r)},t.onabort=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),a=this._transformResponse(t.response,r);this._onCancelItem(i,a,t.status,r),this._onCompleteItem(i,a,t.status,r)},i.method&&i.url&&t.open(i.method,i.url,!0),t.withCredentials=i.withCredentials,this.options.headers)for(let r of this.options.headers)t.setRequestHeader(r.name,r.value);if(i.headers.length)for(let r of i.headers)t.setRequestHeader(r.name,r.value);this.authToken&&this.authTokenHeader&&t.setRequestHeader(this.authTokenHeader,this.authToken),t.onreadystatechange=function(){t.readyState==XMLHttpRequest.DONE&&e.response.emit(t.responseText)},this.options.formatDataFunctionIsAsync?o.then(r=>t.send(JSON.stringify(r))):t.send(o),this._render()}_getTotalProgress(i=0){if(this.options.removeAfterUpload)return i;let e=this.getNotUploadedItems().length,t=e?this.queue.length-e:this.queue.length,o=100/this.queue.length,r=i*o/100;return Math.round(t*o+r)}_getFilters(i){if(!i)return this.options?.filters||[];if(Array.isArray(i))return i;if(typeof i=="string"){let e=i.match(/[^\s,]+/g);return this.options?.filters||[].filter(t=>e?.indexOf(t.name)!==-1)}return this.options?.filters||[]}_render(){}_queueLimitFilter(){return this.options.queueLimit===void 0||this.queue.length(this._failFilterIndex&&this._failFilterIndex++,o.fn.call(this,i,t))):!0}_isSuccessCode(i){return i>=200&&i<300||i===304}_transformResponse(i,e){return i}_parseHeaders(i){let e={},t,o,r;return i&&i.split(` -`).map(a=>{r=a.indexOf(":"),t=a.slice(0,r).trim().toLowerCase(),o=a.slice(r+1).trim(),t&&(e[t]=e[t]?e[t]+", "+o:o)}),e}_onWhenAddingFileFailed(i,e,t){this.onWhenAddingFileFailed(i,e,t)}_onAfterAddingFile(i){this.onAfterAddingFile(i)}_onAfterAddingAll(i){this.onAfterAddingAll(i)}_onBeforeUploadItem(i){i._onBeforeUpload(),this.onBeforeUploadItem(i)}_onBuildItemForm(i,e){i._onBuildForm(e),this.onBuildItemForm(i,e)}_onProgressItem(i,e){let t=this._getTotalProgress(e);this.progress=t,i._onProgress(e),this.onProgressItem(i,e),this.onProgressAll(t),this._render()}_onSuccessItem(i,e,t,o){i._onSuccess(e,t,o),this.onSuccessItem(i,e,t,o)}_onCancelItem(i,e,t,o){i._onCancel(e,t,o),this.onCancelItem(i,e,t,o)}};var jc=(()=>{class n{constructor(e){this.onFileSelected=new _e,this.element=e}getOptions(){return this.uploader?.options}getFilters(){return""}isEmptyAfterSelection(){return!!this.element.nativeElement.attributes.multiple}onChange(){let e=this.element.nativeElement.files,t=this.getOptions(),o=this.getFilters();this.uploader?.addToQueue(e,t,o),this.onFileSelected.emit(e),this.isEmptyAfterSelection()&&(this.element.nativeElement.value="")}}return n.\u0275fac=function(e){return new(e||n)(Ye(Yt))},n.\u0275dir=ft({type:n,selectors:[["","ng2FileSelect",""]],hostBindings:function(e,t){e&1&&_("change",function(){return t.onChange()})},inputs:{uploader:"uploader"},outputs:{onFileSelected:"onFileSelected"},standalone:!1}),n})(),_l=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ut({type:n}),n.\u0275inj=Ht({imports:[ie]}),n})();var Xn="primary",Pv=Symbol("RouteTitle"),TI=class{params;constructor(i){this.params=i||{}}has(i){return Object.prototype.hasOwnProperty.call(this.params,i)}get(i){if(this.has(i)){let e=this.params[i];return Array.isArray(e)?e[0]:e}return null}getAll(i){if(this.has(i)){let e=this.params[i];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function Lu(n){return new TI(n)}function SI(n,i,e){for(let t=0;tn.length||e.pathMatch==="full"&&(i.hasChildren()||t.lengthn.length||e.pathMatch==="full"&&i.hasChildren()&&e.path!=="**")return null;let c={};return!SI(r,n.slice(0,r.length),c)||!SI(a,n.slice(n.length-a.length),c)?null:{consumed:n,posParams:c}}function ty(n){return new Promise((i,e)=>{n.pipe(gd()).subscribe({next:t=>i(t),error:t=>e(t)})})}function $ie(n,i){if(n.length!==i.length)return!1;for(let e=0;et[r]===o)}else return n===i}function Hie(n){return n.length>0?n[n.length-1]:null}function Bu(n){return rm(n)?n:KN(n)?nr(Promise.resolve(n)):Ct(n)}function I7(n){return rm(n)?ty(n):Promise.resolve(n)}var Uie={exact:O7,subset:N7},A7={exact:Gie,subset:Wie,ignored:()=>!0},$I={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},yv={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function HI(n,i,e){let t=n instanceof Ka?n:i.parseUrl(n);return sn(()=>DI(i.lastSuccessfulNavigation()?.finalUrl??new Ka,t,q(q({},yv),e)))}function DI(n,i,e){return Uie[e.paths](n.root,i.root,e.matrixParams)&&A7[e.queryParams](n.queryParams,i.queryParams)&&!(e.fragment==="exact"&&n.fragment!==i.fragment)}function Gie(n,i){return $c(n,i)}function O7(n,i,e){if(!Fu(n.segments,i.segments)||!Zx(n.segments,i.segments,e)||n.numberOfChildren!==i.numberOfChildren)return!1;for(let t in i.children)if(!n.children[t]||!O7(n.children[t],i.children[t],e))return!1;return!0}function Wie(n,i){return Object.keys(i).length<=Object.keys(n).length&&Object.keys(i).every(e=>P7(n[e],i[e]))}function N7(n,i,e){return R7(n,i,i.segments,e)}function R7(n,i,e,t){if(n.segments.length>e.length){let o=n.segments.slice(0,e.length);return!(!Fu(o,e)||i.hasChildren()||!Zx(o,e,t))}else if(n.segments.length===e.length){if(!Fu(n.segments,e)||!Zx(n.segments,e,t))return!1;for(let o in i.children)if(!n.children[o]||!N7(n.children[o],i.children[o],t))return!1;return!0}else{let o=e.slice(0,n.segments.length),r=e.slice(n.segments.length);return!Fu(n.segments,o)||!Zx(n.segments,o,t)||!n.children[Xn]?!1:R7(n.children[Xn],i,r,t)}}function Zx(n,i,e){return i.every((t,o)=>A7[e](n[o].parameters,t.parameters))}var Ka=class{root;queryParams;fragment;_queryParamMap;constructor(i=new Zi([],{}),e={},t=null){this.root=i,this.queryParams=e,this.fragment=t}get queryParamMap(){return this._queryParamMap??=Lu(this.queryParams),this._queryParamMap}toString(){return Xie.serialize(this)}},Zi=class{segments;children;parent=null;constructor(i,e){this.segments=i,this.children=e,Object.values(e).forEach(t=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Jx(this)}},jm=class{path;parameters;_parameterMap;constructor(i,e){this.path=i,this.parameters=e}get parameterMap(){return this._parameterMap??=Lu(this.parameters),this._parameterMap}toString(){return L7(this)}};function qie(n,i){return Fu(n,i)&&n.every((e,t)=>$c(e.parameters,i[t].parameters))}function Fu(n,i){return n.length!==i.length?!1:n.every((e,t)=>e.path===i[t].path)}function Qie(n,i){let e=[];return Object.entries(n.children).forEach(([t,o])=>{t===Xn&&(e=e.concat(i(o,t)))}),Object.entries(n.children).forEach(([t,o])=>{t!==Xn&&(e=e.concat(i(o,t)))}),e}var Hm=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:()=>new Fd,providedIn:"root"})}return n})(),Fd=class{parse(i){let e=new II(i);return new Ka(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(i){let e=`/${vv(i.root,!0)}`,t=Zie(i.queryParams),o=typeof i.fragment=="string"?`#${Yie(i.fragment)}`:"";return`${e}${t}${o}`}},Xie=new Fd;function Jx(n){return n.segments.map(i=>L7(i)).join("/")}function vv(n,i){if(!n.hasChildren())return Jx(n);if(i){let e=n.children[Xn]?vv(n.children[Xn],!1):"",t=[];return Object.entries(n.children).forEach(([o,r])=>{o!==Xn&&t.push(`${o}:${vv(r,!1)}`)}),t.length>0?`${e}(${t.join("//")})`:e}else{let e=Qie(n,(t,o)=>o===Xn?[vv(n.children[Xn],!1)]:[`${o}:${vv(t,!1)}`]);return Object.keys(n.children).length===1&&n.children[Xn]!=null?`${Jx(n)}/${e[0]}`:`${Jx(n)}/(${e.join("//")})`}}function F7(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Yx(n){return F7(n).replace(/%3B/gi,";")}function Yie(n){return encodeURI(n)}function PI(n){return F7(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ey(n){return decodeURIComponent(n)}function S7(n){return ey(n.replace(/\+/g,"%20"))}function L7(n){return`${PI(n.path)}${Kie(n.parameters)}`}function Kie(n){return Object.entries(n).map(([i,e])=>`;${PI(i)}=${PI(e)}`).join("")}function Zie(n){let i=Object.entries(n).map(([e,t])=>Array.isArray(t)?t.map(o=>`${Yx(e)}=${Yx(o)}`).join("&"):`${Yx(e)}=${Yx(t)}`).filter(e=>e);return i.length?`?${i.join("&")}`:""}var Jie=/^[^\/()?;#]+/;function wI(n){let i=n.match(Jie);return i?i[0]:""}var eoe=/^[^\/()?;=#]+/;function toe(n){let i=n.match(eoe);return i?i[0]:""}var noe=/^[^=?&#]+/;function ioe(n){let i=n.match(noe);return i?i[0]:""}var ooe=/^[^&#]+/;function roe(n){let i=n.match(ooe);return i?i[0]:""}var II=class{url;remaining;constructor(i){this.url=i,this.remaining=i}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Zi([],{}):new Zi([],this.parseChildren())}parseQueryParams(){let i={};if(this.consumeOptional("?"))do this.parseQueryParam(i);while(this.consumeOptional("&"));return i}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(i=0){if(i>50)throw new fn(4010,!1);if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0,i));let o={};return this.peekStartsWith("(")&&(o=this.parseParens(!1,i)),(e.length>0||Object.keys(t).length>0)&&(o[Xn]=new Zi(e,t)),o}parseSegment(){let i=wI(this.remaining);if(i===""&&this.peekStartsWith(";"))throw new fn(4009,!1);return this.capture(i),new jm(ey(i),this.parseMatrixParams())}parseMatrixParams(){let i={};for(;this.consumeOptional(";");)this.parseParam(i);return i}parseParam(i){let e=toe(this.remaining);if(!e)return;this.capture(e);let t="";if(this.consumeOptional("=")){let o=wI(this.remaining);o&&(t=o,this.capture(t))}i[ey(e)]=ey(t)}parseQueryParam(i){let e=ioe(this.remaining);if(!e)return;this.capture(e);let t="";if(this.consumeOptional("=")){let a=roe(this.remaining);a&&(t=a,this.capture(t))}let o=S7(e),r=S7(t);if(i.hasOwnProperty(o)){let a=i[o];Array.isArray(a)||(a=[a],i[o]=a),a.push(r)}else i[o]=r}parseParens(i,e){let t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let o=wI(this.remaining),r=this.remaining[o.length];if(r!=="/"&&r!==")"&&r!==";")throw new fn(4010,!1);let a;o.indexOf(":")>-1?(a=o.slice(0,o.indexOf(":")),this.capture(a),this.capture(":")):i&&(a=Xn);let c=this.parseChildren(e+1);t[a??Xn]=Object.keys(c).length===1&&c[Xn]?c[Xn]:new Zi([],c),this.consumeOptional("//")}return t}peekStartsWith(i){return this.remaining.startsWith(i)}consumeOptional(i){return this.peekStartsWith(i)?(this.remaining=this.remaining.substring(i.length),!0):!1}capture(i){if(!this.consumeOptional(i))throw new fn(4011,!1)}};function B7(n){return n.segments.length>0?new Zi([],{[Xn]:n}):n}function V7(n){let i={};for(let[t,o]of Object.entries(n.children)){let r=V7(o);if(t===Xn&&r.segments.length===0&&r.hasChildren())for(let[a,c]of Object.entries(r.children))i[a]=c;else(r.segments.length>0||r.hasChildren())&&(i[t]=r)}let e=new Zi(n.segments,i);return aoe(e)}function aoe(n){if(n.numberOfChildren===1&&n.children[Xn]){let i=n.children[Xn];return new Zi(n.segments.concat(i.segments),i.children)}return n}function $m(n){return n instanceof Ka}function z7(n,i,e=null,t=null,o=new Fd){let r=j7(n);return $7(r,i,e,t,o)}function j7(n){let i;function e(r){let a={};for(let m of r.children){let u=e(m);a[m.outlet]=u}let c=new Zi(r.url,a);return r===n&&(i=c),c}let t=e(n.root),o=B7(t);return i??o}function $7(n,i,e,t,o){let r=n;for(;r.parent;)r=r.parent;if(i.length===0)return MI(r,r,r,e,t,o);let a=soe(i);if(a.toRoot())return MI(r,r,new Zi([],{}),e,t,o);let c=loe(a,r,n),m=c.processChildren?bv(c.segmentGroup,c.index,a.commands):U7(c.segmentGroup,c.index,a.commands);return MI(r,c.segmentGroup,m,e,t,o)}function ny(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function Sv(n){return typeof n=="object"&&n!=null&&n.outlets}function w7(n,i,e){n||="\u0275";let t=new Ka;return t.queryParams={[n]:i},e.parse(e.serialize(t)).queryParams[n]}function MI(n,i,e,t,o,r){let a={};for(let[u,h]of Object.entries(t??{}))a[u]=Array.isArray(h)?h.map(g=>w7(u,g,r)):w7(u,h,r);let c;n===i?c=e:c=H7(n,i,e);let m=B7(V7(c));return new Ka(m,a,o)}function H7(n,i,e){let t={};return Object.entries(n.children).forEach(([o,r])=>{r===i?t[o]=e:t[o]=H7(r,i,e)}),new Zi(n.segments,t)}var iy=class{isAbsolute;numberOfDoubleDots;commands;constructor(i,e,t){if(this.isAbsolute=i,this.numberOfDoubleDots=e,this.commands=t,i&&t.length>0&&ny(t[0]))throw new fn(4003,!1);let o=t.find(Sv);if(o&&o!==Hie(t))throw new fn(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function soe(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new iy(!0,0,n);let i=0,e=!1,t=n.reduce((o,r,a)=>{if(typeof r=="object"&&r!=null){if(r.outlets){let c={};return Object.entries(r.outlets).forEach(([m,u])=>{c[m]=typeof u=="string"?u.split("/"):u}),[...o,{outlets:c}]}if(r.segmentPath)return[...o,r.segmentPath]}return typeof r!="string"?[...o,r]:a===0?(r.split("/").forEach((c,m)=>{m==0&&c==="."||(m==0&&c===""?e=!0:c===".."?i++:c!=""&&o.push(c))}),o):[...o,r]},[]);return new iy(e,i,t)}var Tf=class{segmentGroup;processChildren;index;constructor(i,e,t){this.segmentGroup=i,this.processChildren=e,this.index=t}};function loe(n,i,e){if(n.isAbsolute)return new Tf(i,!0,0);if(!e)return new Tf(i,!1,NaN);if(e.parent===null)return new Tf(e,!0,0);let t=ny(n.commands[0])?0:1,o=e.segments.length-1+t;return coe(e,o,n.numberOfDoubleDots)}function coe(n,i,e){let t=n,o=i,r=e;for(;r>o;){if(r-=o,t=t.parent,!t)throw new fn(4005,!1);o=t.segments.length}return new Tf(t,!1,o-r)}function doe(n){return Sv(n[0])?n[0].outlets:{[Xn]:n}}function U7(n,i,e){if(n??=new Zi([],{}),n.segments.length===0&&n.hasChildren())return bv(n,i,e);let t=moe(n,i,e),o=e.slice(t.commandIndex);if(t.match&&t.pathIndexr!==Xn)&&n.children[Xn]&&n.numberOfChildren===1&&n.children[Xn].segments.length===0){let r=bv(n.children[Xn],i,e);return new Zi(n.segments,r.children)}return Object.entries(t).forEach(([r,a])=>{typeof a=="string"&&(a=[a]),a!==null&&(o[r]=U7(n.children[r],i,a))}),Object.entries(n.children).forEach(([r,a])=>{t[r]===void 0&&(o[r]=a)}),new Zi(n.segments,o)}}function moe(n,i,e){let t=0,o=i,r={match:!1,pathIndex:0,commandIndex:0};for(;o=e.length)return r;let a=n.segments[o],c=e[t];if(Sv(c))break;let m=`${c}`,u=t0&&m===void 0)break;if(m&&u&&typeof u=="object"&&u.outlets===void 0){if(!k7(m,u,a))return r;t+=2}else{if(!k7(m,{},a))return r;t++}o++}return{match:!0,pathIndex:o,commandIndex:t}}function AI(n,i,e){let t=n.segments.slice(0,i),o=0;for(;o{typeof t=="string"&&(t=[t]),t!==null&&(i[e]=AI(new Zi([],{}),0,t))}),i}function M7(n){let i={};return Object.entries(n).forEach(([e,t])=>i[e]=`${t}`),i}function k7(n,i,e){return n==e.path&&$c(i,e.parameters)}var Ef="imperative",jr=(function(n){return n[n.NavigationStart=0]="NavigationStart",n[n.NavigationEnd=1]="NavigationEnd",n[n.NavigationCancel=2]="NavigationCancel",n[n.NavigationError=3]="NavigationError",n[n.RoutesRecognized=4]="RoutesRecognized",n[n.ResolveStart=5]="ResolveStart",n[n.ResolveEnd=6]="ResolveEnd",n[n.GuardsCheckStart=7]="GuardsCheckStart",n[n.GuardsCheckEnd=8]="GuardsCheckEnd",n[n.RouteConfigLoadStart=9]="RouteConfigLoadStart",n[n.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",n[n.ChildActivationStart=11]="ChildActivationStart",n[n.ChildActivationEnd=12]="ChildActivationEnd",n[n.ActivationStart=13]="ActivationStart",n[n.ActivationEnd=14]="ActivationEnd",n[n.Scroll=15]="Scroll",n[n.NavigationSkipped=16]="NavigationSkipped",n})(jr||{}),Us=class{id;url;constructor(i,e){this.id=i,this.url=e}},Uc=class extends Us{type=jr.NavigationStart;navigationTrigger;restoredState;constructor(i,e,t="imperative",o=null){super(i,e),this.navigationTrigger=t,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},kr=class extends Us{urlAfterRedirects;type=jr.NavigationEnd;constructor(i,e,t){super(i,e),this.urlAfterRedirects=t}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Ta=(function(n){return n[n.Redirect=0]="Redirect",n[n.SupersededByNewNavigation=1]="SupersededByNewNavigation",n[n.NoDataFromResolver=2]="NoDataFromResolver",n[n.GuardRejected=3]="GuardRejected",n[n.Aborted=4]="Aborted",n})(Ta||{}),Pf=(function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n})(Pf||{}),vs=class extends Us{reason;code;type=jr.NavigationCancel;constructor(i,e,t,o){super(i,e),this.reason=t,this.code=o}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function G7(n){return n instanceof vs&&(n.code===Ta.Redirect||n.code===Ta.SupersededByNewNavigation)}var Gc=class extends Us{reason;code;type=jr.NavigationSkipped;constructor(i,e,t,o){super(i,e),this.reason=t,this.code=o}},Ld=class extends Us{error;target;type=jr.NavigationError;constructor(i,e,t,o){super(i,e),this.error=t,this.target=o}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},wv=class extends Us{urlAfterRedirects;state;type=jr.RoutesRecognized;constructor(i,e,t,o){super(i,e),this.urlAfterRedirects=t,this.state=o}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},oy=class extends Us{urlAfterRedirects;state;type=jr.GuardsCheckStart;constructor(i,e,t,o){super(i,e),this.urlAfterRedirects=t,this.state=o}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ry=class extends Us{urlAfterRedirects;state;shouldActivate;type=jr.GuardsCheckEnd;constructor(i,e,t,o,r){super(i,e),this.urlAfterRedirects=t,this.state=o,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},ay=class extends Us{urlAfterRedirects;state;type=jr.ResolveStart;constructor(i,e,t,o){super(i,e),this.urlAfterRedirects=t,this.state=o}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},sy=class extends Us{urlAfterRedirects;state;type=jr.ResolveEnd;constructor(i,e,t,o){super(i,e),this.urlAfterRedirects=t,this.state=o}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ly=class{route;type=jr.RouteConfigLoadStart;constructor(i){this.route=i}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},cy=class{route;type=jr.RouteConfigLoadEnd;constructor(i){this.route=i}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},dy=class{snapshot;type=jr.ChildActivationStart;constructor(i){this.snapshot=i}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},my=class{snapshot;type=jr.ChildActivationEnd;constructor(i){this.snapshot=i}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},py=class{snapshot;type=jr.ActivationStart;constructor(i){this.snapshot=i}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},uy=class{snapshot;type=jr.ActivationEnd;constructor(i){this.snapshot=i}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},If=class{routerEvent;position;anchor;scrollBehavior;type=jr.Scroll;constructor(i,e,t,o){this.routerEvent=i,this.position=e,this.anchor=t,this.scrollBehavior=o}toString(){let i=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${i}')`}},Af=class{},Mv=class{},Of=class{url;navigationBehaviorOptions;constructor(i,e){this.url=i,this.navigationBehaviorOptions=e}};function uoe(n){return!(n instanceof Af)&&!(n instanceof Of)&&!(n instanceof Mv)}var hy=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(i){this.rootInjector=i,this.children=new Vu(this.rootInjector)}},Vu=(()=>{class n{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,t){let o=this.getOrCreateContext(e);o.outlet=t,this.contexts.set(e,o)}onChildOutletDestroyed(e){let t=this.getContext(e);t&&(t.outlet=null,t.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let t=this.getContext(e);return t||(t=new hy(this.rootInjector),this.contexts.set(e,t)),t}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(t){return new(t||n)(ge(jl))};static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),fy=class{_root;constructor(i){this._root=i}get root(){return this._root.value}parent(i){let e=this.pathFromRoot(i);return e.length>1?e[e.length-2]:null}children(i){let e=OI(i,this._root);return e?e.children.map(t=>t.value):[]}firstChild(i){let e=OI(i,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(i){let e=NI(i,this._root);return e.length<2?[]:e[e.length-2].children.map(o=>o.value).filter(o=>o!==i)}pathFromRoot(i){return NI(i,this._root).map(e=>e.value)}};function OI(n,i){if(n===i.value)return i;for(let e of i.children){let t=OI(n,e);if(t)return t}return null}function NI(n,i){if(n===i.value)return[i];for(let e of i.children){let t=NI(n,e);if(t.length)return t.unshift(i),t}return[]}var Hs=class{value;children;constructor(i,e){this.value=i,this.children=e}toString(){return`TreeNode(${this.value})`}};function kf(n){let i={};return n&&n.children.forEach(e=>i[e.value.outlet]=e),i}var kv=class extends fy{snapshot;constructor(i,e){super(i),this.snapshot=e,GI(this,i)}toString(){return this.snapshot.toString()}};function W7(n,i){let e=hoe(n,i),t=new zt([new jm("",{})]),o=new zt({}),r=new zt({}),a=new zt({}),c=new zt(""),m=new rt(t,o,a,c,r,Xn,n,e.root);return m.snapshot=e.root,new kv(new Hs(m,[]),e)}function hoe(n,i){let e={},t={},o={},a=new Nf([],e,o,"",t,Xn,n,null,{},i);return new Tv("",new Hs(a,[]))}var rt=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(i,e,t,o,r,a,c,m){this.urlSubject=i,this.paramsSubject=e,this.queryParamsSubject=t,this.fragmentSubject=o,this.dataSubject=r,this.outlet=a,this.component=c,this._futureSnapshot=m,this.title=this.dataSubject?.pipe(_t(u=>u[Pv]))??Ct(void 0),this.url=i,this.params=e,this.queryParams=t,this.fragment=o,this.data=r}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(_t(i=>Lu(i))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(_t(i=>Lu(i))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function UI(n,i,e="emptyOnly"){let t,{routeConfig:o}=n;return i!==null&&(e==="always"||o?.path===""||!i.component&&!i.routeConfig?.loadComponent)?t={params:q(q({},i.params),n.params),data:q(q({},i.data),n.data),resolve:q(q(q(q({},n.data),i.data),o?.data),n._resolvedData)}:t={params:q({},n.params),data:q({},n.data),resolve:q(q({},n.data),n._resolvedData??{})},o&&Q7(o)&&(t.resolve[Pv]=o.title),t}var Nf=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[Pv]}constructor(i,e,t,o,r,a,c,m,u,h){this.url=i,this.params=e,this.queryParams=t,this.fragment=o,this.data=r,this.outlet=a,this.component=c,this.routeConfig=m,this._resolve=u,this._environmentInjector=h}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Lu(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Lu(this.queryParams),this._queryParamMap}toString(){let i=this.url.map(t=>t.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${i}', path:'${e}')`}},Tv=class extends fy{url;constructor(i,e){super(e),this.url=i,GI(this,e)}toString(){return q7(this._root)}};function GI(n,i){i.value._routerState=n,i.children.forEach(e=>GI(n,e))}function q7(n){let i=n.children.length>0?` { ${n.children.map(q7).join(", ")} } `:"";return`${n.value}${i}`}function kI(n){if(n.snapshot){let i=n.snapshot,e=n._futureSnapshot;n.snapshot=e,$c(i.queryParams,e.queryParams)||n.queryParamsSubject.next(e.queryParams),i.fragment!==e.fragment&&n.fragmentSubject.next(e.fragment),$c(i.params,e.params)||n.paramsSubject.next(e.params),$ie(i.url,e.url)||n.urlSubject.next(e.url),$c(i.data,e.data)||n.dataSubject.next(e.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function RI(n,i){let e=$c(n.params,i.params)&&qie(n.url,i.url),t=!n.parent!=!i.parent;return e&&!t&&(!n.parent||RI(n.parent,i.parent))}function Q7(n){return typeof n.title=="string"||n.title===null}var X7=new jt(""),Bd=(()=>{class n{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=Xn;activateEvents=new _e;deactivateEvents=new _e;attachEvents=new _e;detachEvents=new _e;routerOutletData=le();parentContexts=f(Vu);location=f(to);changeDetector=f(X);inputBinder=f(Iv,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:t,previousValue:o}=e.name;if(t)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new fn(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new fn(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new fn(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,t){this.activated=e,this._activatedRoute=t,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,t){if(this.isActivated)throw new fn(4013,!1);this._activatedRoute=e;let o=this.location,a=e.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,m=new FI(e,c,o.injector,this.routerOutletData);this.activated=o.createComponent(a,{index:o.length,injector:m,environmentInjector:t}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[dn]})}return n})(),FI=class{route;childContexts;parent;outletData;constructor(i,e,t,o){this.route=i,this.childContexts=e,this.parent=t,this.outletData=o}get(i,e){return i===rt?this.route:i===Vu?this.childContexts:i===X7?this.outletData:this.parent.get(i,e)}},Iv=new jt(""),WI=(()=>{class n{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:t}=e,o=ir([t.queryParams,t.params,t.data]).pipe(hn(([r,a,c],m)=>(c=q(q(q({},r),a),c),m===0?Ct(c):Promise.resolve(c)))).subscribe(r=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==t||t.component===null){this.unsubscribeFromRouteData(e);return}let a=l5(t.component);if(!a){this.unsubscribeFromRouteData(e);return}for(let{templateName:c}of a.inputs)e.activatedComponentRef.setInput(c,r[c])});this.outletDataSubscriptions.set(e,o)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac})}return n})(),qI=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(t,o){t&1&&L(0,"router-outlet")},dependencies:[Bd],encapsulation:2})}return n})();function QI(n){let i=n.children&&n.children.map(QI),e=i?We(q({},n),{children:i}):q({},n);return!e.component&&!e.loadComponent&&(i||e.loadChildren)&&e.outlet&&e.outlet!==Xn&&(e.component=qI),e}function foe(n,i,e){let t=Ev(n,i._root,e?e._root:void 0);return new kv(t,i)}function Ev(n,i,e){if(e&&n.shouldReuseRoute(i.value,e.value.snapshot)){let t=e.value;t._futureSnapshot=i.value;let o=goe(n,i,e);return new Hs(t,o)}else{if(n.shouldAttach(i.value)){let r=n.retrieve(i.value);if(r!==null){let a=r.route;return a.value._futureSnapshot=i.value,a.children=i.children.map(c=>Ev(n,c)),a}}let t=_oe(i.value),o=i.children.map(r=>Ev(n,r));return new Hs(t,o)}}function goe(n,i,e){return i.children.map(t=>{for(let o of e.children)if(n.shouldReuseRoute(t.value,o.value.snapshot))return Ev(n,t,o);return Ev(n,t)})}function _oe(n){return new rt(new zt(n.url),new zt(n.params),new zt(n.queryParams),new zt(n.fragment),new zt(n.data),n.outlet,n.component,n)}var Rf=class{redirectTo;navigationBehaviorOptions;constructor(i,e){this.redirectTo=i,this.navigationBehaviorOptions=e}},Y7="ngNavigationCancelingError";function gy(n,i){let{redirectTo:e,navigationBehaviorOptions:t}=$m(i)?{redirectTo:i,navigationBehaviorOptions:void 0}:i,o=K7(!1,Ta.Redirect);return o.url=e,o.navigationBehaviorOptions=t,o}function K7(n,i){let e=new Error(`NavigationCancelingError: ${n||""}`);return e[Y7]=!0,e.cancellationCode=i,e}function voe(n){return Z7(n)&&$m(n.url)}function Z7(n){return!!n&&n[Y7]}var LI=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(i,e,t,o,r){this.routeReuseStrategy=i,this.futureState=e,this.currState=t,this.forwardEvent=o,this.inputBindingEnabled=r}activate(i){let e=this.futureState._root,t=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,t,i),kI(this.futureState.root),this.activateChildRoutes(e,t,i)}deactivateChildRoutes(i,e,t){let o=kf(e);i.children.forEach(r=>{let a=r.value.outlet;this.deactivateRoutes(r,o[a],t),delete o[a]}),Object.values(o).forEach(r=>{this.deactivateRouteAndItsChildren(r,t)})}deactivateRoutes(i,e,t){let o=i.value,r=e?e.value:null;if(o===r)if(o.component){let a=t.getContext(o.outlet);a&&this.deactivateChildRoutes(i,e,a.children)}else this.deactivateChildRoutes(i,e,t);else r&&this.deactivateRouteAndItsChildren(e,t)}deactivateRouteAndItsChildren(i,e){i.value.component&&this.routeReuseStrategy.shouldDetach(i.value.snapshot)?this.detachAndStoreRouteSubtree(i,e):this.deactivateRouteAndOutlet(i,e)}detachAndStoreRouteSubtree(i,e){let t=e.getContext(i.value.outlet),o=t&&i.value.component?t.children:e,r=kf(i);for(let a of Object.values(r))this.deactivateRouteAndItsChildren(a,o);if(t&&t.outlet){let a=t.outlet.detach(),c=t.children.onOutletDeactivated();this.routeReuseStrategy.store(i.value.snapshot,{componentRef:a,route:i,contexts:c})}}deactivateRouteAndOutlet(i,e){let t=e.getContext(i.value.outlet),o=t&&i.value.component?t.children:e,r=kf(i);for(let a of Object.values(r))this.deactivateRouteAndItsChildren(a,o);t&&(t.outlet&&(t.outlet.deactivate(),t.children.onOutletDeactivated()),t.attachRef=null,t.route=null)}activateChildRoutes(i,e,t){let o=kf(e);i.children.forEach(r=>{this.activateRoutes(r,o[r.value.outlet],t),this.forwardEvent(new uy(r.value.snapshot))}),i.children.length&&this.forwardEvent(new my(i.value.snapshot))}activateRoutes(i,e,t){let o=i.value,r=e?e.value:null;if(kI(o),o===r)if(o.component){let a=t.getOrCreateContext(o.outlet);this.activateChildRoutes(i,e,a.children)}else this.activateChildRoutes(i,e,t);else if(o.component){let a=t.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let c=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),a.children.onOutletReAttached(c.contexts),a.attachRef=c.componentRef,a.route=c.route.value,a.outlet&&a.outlet.attach(c.componentRef,c.route.value),kI(c.route.value),this.activateChildRoutes(i,null,a.children)}else a.attachRef=null,a.route=o,a.outlet&&a.outlet.activateWith(o,a.injector),this.activateChildRoutes(i,null,a.children)}else this.activateChildRoutes(i,null,t)}},_y=class{path;route;constructor(i){this.path=i,this.route=this.path[this.path.length-1]}},Df=class{component;route;constructor(i,e){this.component=i,this.route=e}};function Coe(n,i,e){let t=n._root,o=i?i._root:null;return Cv(t,o,e,[t.value])}function boe(n){let i=n.routeConfig?n.routeConfig.canActivateChild:null;return!i||i.length===0?null:{node:n,guards:i}}function Lf(n,i){let e=Symbol(),t=i.get(n,e);return t===e?typeof n=="function"&&!jN(n)?n:i.get(n):t}function Cv(n,i,e,t,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=kf(i);return n.children.forEach(a=>{xoe(a,r[a.value.outlet],e,t.concat([a.value]),o),delete r[a.value.outlet]}),Object.entries(r).forEach(([a,c])=>xv(c,e.getContext(a),o)),o}function xoe(n,i,e,t,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=n.value,a=i?i.value:null,c=e?e.getContext(n.value.outlet):null;if(a&&r.routeConfig===a.routeConfig){let m=yoe(a,r,r.routeConfig.runGuardsAndResolvers);m?o.canActivateChecks.push(new _y(t)):(r.data=a.data,r._resolvedData=a._resolvedData),r.component?Cv(n,i,c?c.children:null,t,o):Cv(n,i,e,t,o),m&&c&&c.outlet&&c.outlet.isActivated&&o.canDeactivateChecks.push(new Df(c.outlet.component,a))}else a&&xv(i,c,o),o.canActivateChecks.push(new _y(t)),r.component?Cv(n,null,c?c.children:null,t,o):Cv(n,null,e,t,o);return o}function yoe(n,i,e){if(typeof e=="function")return Es(i._environmentInjector,()=>e(n,i));switch(e){case"pathParamsChange":return!Fu(n.url,i.url);case"pathParamsOrQueryParamsChange":return!Fu(n.url,i.url)||!$c(n.queryParams,i.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!RI(n,i)||!$c(n.queryParams,i.queryParams);default:return!RI(n,i)}}function xv(n,i,e){let t=kf(n),o=n.value;Object.entries(t).forEach(([r,a])=>{o.component?i?xv(a,i.children.getContext(r),e):xv(a,null,e):xv(a,i,e)}),o.component?i&&i.outlet&&i.outlet.isActivated?e.canDeactivateChecks.push(new Df(i.outlet.component,o)):e.canDeactivateChecks.push(new Df(null,o)):e.canDeactivateChecks.push(new Df(null,o))}function Av(n){return typeof n=="function"}function Soe(n){return typeof n=="boolean"}function woe(n){return n&&Av(n.canLoad)}function Moe(n){return n&&Av(n.canActivate)}function koe(n){return n&&Av(n.canActivateChild)}function Toe(n){return n&&Av(n.canDeactivate)}function Eoe(n){return n&&Av(n.canMatch)}function J7(n){return n instanceof NN||n?.name==="EmptyError"}var Kx=Symbol("INITIAL_VALUE");function Ff(){return hn(n=>ir(n.map(i=>i.pipe(Wi(1),ci(Kx)))).pipe(_t(i=>{for(let e of i)if(e!==!0){if(e===Kx)return Kx;if(e===!1||Doe(e))return e}return!0}),Kn(i=>i!==Kx),Wi(1)))}function Doe(n){return $m(n)||n instanceof Rf}function eB(n){return n.aborted?Ct(void 0).pipe(Wi(1)):new Nr(i=>{let e=()=>{i.next(),i.complete()};return n.addEventListener("abort",e),()=>n.removeEventListener("abort",e)})}function tB(n){return tt(eB(n))}function Poe(n){return Cr(i=>{let{targetSnapshot:e,currentSnapshot:t,guards:{canActivateChecks:o,canDeactivateChecks:r}}=i;return r.length===0&&o.length===0?Ct(We(q({},i),{guardsResult:!0})):Ioe(r,e,t).pipe(Cr(a=>a&&Soe(a)?Aoe(e,o,n):Ct(a)),_t(a=>We(q({},i),{guardsResult:a})))})}function Ioe(n,i,e){return nr(n).pipe(Cr(t=>Loe(t.component,t.route,e,i)),gd(t=>t!==!0,!0))}function Aoe(n,i,e){return nr(i).pipe(am(t=>S_(Noe(t.route.parent,e),Ooe(t.route,e),Foe(n,t.path),Roe(n,t.route))),gd(t=>t!==!0,!0))}function Ooe(n,i){return n!==null&&i&&i(new py(n)),Ct(!0)}function Noe(n,i){return n!==null&&i&&i(new dy(n)),Ct(!0)}function Roe(n,i){let e=i.routeConfig?i.routeConfig.canActivate:null;if(!e||e.length===0)return Ct(!0);let t=e.map(o=>fh(()=>{let r=i._environmentInjector,a=Lf(o,r),c=Moe(a)?a.canActivate(i,n):Es(r,()=>a(i,n));return Bu(c).pipe(gd())}));return Ct(t).pipe(Ff())}function Foe(n,i){let e=i[i.length-1],o=i.slice(0,i.length-1).reverse().map(r=>boe(r)).filter(r=>r!==null).map(r=>fh(()=>{let a=r.guards.map(c=>{let m=r.node._environmentInjector,u=Lf(c,m),h=koe(u)?u.canActivateChild(e,n):Es(m,()=>u(e,n));return Bu(h).pipe(gd())});return Ct(a).pipe(Ff())}));return Ct(o).pipe(Ff())}function Loe(n,i,e,t){let o=i&&i.routeConfig?i.routeConfig.canDeactivate:null;if(!o||o.length===0)return Ct(!0);let r=o.map(a=>{let c=i._environmentInjector,m=Lf(a,c),u=Toe(m)?m.canDeactivate(n,i,e,t):Es(c,()=>m(n,i,e,t));return Bu(u).pipe(gd())});return Ct(r).pipe(Ff())}function Boe(n,i,e,t,o){let r=i.canLoad;if(r===void 0||r.length===0)return Ct(!0);let a=r.map(c=>{let m=Lf(c,n),u=woe(m)?m.canLoad(i,e):Es(n,()=>m(i,e)),h=Bu(u);return o?h.pipe(tB(o)):h});return Ct(a).pipe(Ff(),nB(t))}function nB(n){return AN(fi(i=>{if(typeof i!="boolean")throw gy(n,i)}),_t(i=>i===!0))}function Voe(n,i,e,t,o,r){let a=i.canMatch;if(!a||a.length===0)return Ct(!0);let c=a.map(m=>{let u=Lf(m,n),h=Eoe(u)?u.canMatch(i,e,o):Es(n,()=>u(i,e,o));return Bu(h).pipe(tB(r))});return Ct(c).pipe(Ff(),nB(t))}var Rd=class n extends Error{segmentGroup;constructor(i){super(),this.segmentGroup=i||null,Object.setPrototypeOf(this,n.prototype)}},Dv=class n extends Error{urlTree;constructor(i){super(),this.urlTree=i,Object.setPrototypeOf(this,n.prototype)}};function zoe(n){throw new fn(4e3,!1)}function joe(n){throw K7(!1,Ta.GuardRejected)}var BI=class{urlSerializer;urlTree;constructor(i,e){this.urlSerializer=i,this.urlTree=e}async lineralizeSegments(i,e){let t=[],o=e.root;for(;;){if(t=t.concat(o.segments),o.numberOfChildren===0)return t;if(o.numberOfChildren>1||!o.children[Xn])throw zoe(`${i.redirectTo}`);o=o.children[Xn]}}async applyRedirectCommands(i,e,t,o,r){let a=await $oe(e,o,r);if(a instanceof Ka)throw new Dv(a);let c=this.applyRedirectCreateUrlTree(a,this.urlSerializer.parse(a),i,t);if(a[0]==="/")throw new Dv(c);return c}applyRedirectCreateUrlTree(i,e,t,o){let r=this.createSegmentGroup(i,e.root,t,o);return new Ka(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(i,e){let t={};return Object.entries(i).forEach(([o,r])=>{if(typeof r=="string"&&r[0]===":"){let c=r.substring(1);t[o]=e[c]}else t[o]=r}),t}createSegmentGroup(i,e,t,o){let r=this.createSegments(i,e.segments,t,o),a={};return Object.entries(e.children).forEach(([c,m])=>{a[c]=this.createSegmentGroup(i,m,t,o)}),new Zi(r,a)}createSegments(i,e,t,o){return e.map(r=>r.path[0]===":"?this.findPosParam(i,r,o):this.findOrReturn(r,t))}findPosParam(i,e,t){let o=t[e.path.substring(1)];if(!o)throw new fn(4001,!1);return o}findOrReturn(i,e){let t=0;for(let o of e){if(o.path===i.path)return e.splice(t),o;t++}return i}};function $oe(n,i,e){if(typeof n=="string")return Promise.resolve(n);let t=n;return ty(Bu(Es(e,()=>t(i))))}function Hoe(n,i){return n.providers&&!n._injector&&(n._injector=c1(n.providers,i,`Route: ${n.path}`)),n._injector??i}function Hc(n){return n.outlet||Xn}function Uoe(n,i){let e=n.filter(t=>Hc(t)===i);return e.push(...n.filter(t=>Hc(t)!==i)),e}var VI={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function iB(n){return{routeConfig:n.routeConfig,url:n.url,params:n.params,queryParams:n.queryParams,fragment:n.fragment,data:n.data,outlet:n.outlet,title:n.title,paramMap:n.paramMap,queryParamMap:n.queryParamMap}}function Goe(n,i,e,t,o,r,a){let c=oB(n,i,e);if(!c.matched)return Ct(c);let m=iB(r(c));return t=Hoe(i,t),Voe(t,i,e,o,m,a).pipe(_t(u=>u===!0?c:q({},VI)))}function oB(n,i,e){if(i.path==="")return i.pathMatch==="full"&&(n.hasChildren()||e.length>0)?q({},VI):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let o=(i.matcher||D7)(e,n,i);if(!o)return q({},VI);let r={};Object.entries(o.posParams??{}).forEach(([c,m])=>{r[c]=m.path});let a=o.consumed.length>0?q(q({},r),o.consumed[o.consumed.length-1].parameters):r;return{matched:!0,consumedSegments:o.consumed,remainingSegments:e.slice(o.consumed.length),parameters:a,positionalParamSegments:o.posParams??{}}}function T7(n,i,e,t){return e.length>0&&Qoe(n,e,t)?{segmentGroup:new Zi(i,qoe(t,new Zi(e,n.children))),slicedSegments:[]}:e.length===0&&Xoe(n,e,t)?{segmentGroup:new Zi(n.segments,Woe(n,e,t,n.children)),slicedSegments:e}:{segmentGroup:new Zi(n.segments,n.children),slicedSegments:e}}function Woe(n,i,e,t){let o={};for(let r of e)if(Cy(n,i,r)&&!t[Hc(r)]){let a=new Zi([],{});o[Hc(r)]=a}return q(q({},t),o)}function qoe(n,i){let e={};e[Xn]=i;for(let t of n)if(t.path===""&&Hc(t)!==Xn){let o=new Zi([],{});e[Hc(t)]=o}return e}function Qoe(n,i,e){return e.some(t=>Cy(n,i,t)&&Hc(t)!==Xn)}function Xoe(n,i,e){return e.some(t=>Cy(n,i,t))}function Cy(n,i,e){return(n.hasChildren()||i.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Yoe(n,i,e){return i.length===0&&!n.children[e]}var zI=class{};async function Koe(n,i,e,t,o,r,a="emptyOnly",c){return new jI(n,i,e,t,o,a,r,c).recognize()}var Zoe=31,jI=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(i,e,t,o,r,a,c,m){this.injector=i,this.configLoader=e,this.rootComponentType=t,this.config=o,this.urlTree=r,this.paramsInheritanceStrategy=a,this.urlSerializer=c,this.abortSignal=m,this.applyRedirects=new BI(this.urlSerializer,this.urlTree)}noMatchError(i){return new fn(4002,`'${i.segmentGroup}'`)}async recognize(){let i=T7(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:t}=await this.match(i),o=new Hs(t,e),r=new Tv("",o),a=z7(t,[],this.urlTree.queryParams,this.urlTree.fragment);return a.queryParams=this.urlTree.queryParams,r.url=this.urlSerializer.serialize(a),{state:r,tree:a}}async match(i){let e=new Nf([],Object.freeze({}),Object.freeze(q({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Xn,this.rootComponentType,null,{},this.injector);try{return{children:await this.processSegmentGroup(this.injector,this.config,i,Xn,e),rootSnapshot:e}}catch(t){if(t instanceof Dv)return this.urlTree=t.urlTree,this.match(t.urlTree.root);throw t instanceof Rd?this.noMatchError(t):t}}async processSegmentGroup(i,e,t,o,r){if(t.segments.length===0&&t.hasChildren())return this.processChildren(i,e,t,r);let a=await this.processSegment(i,e,t,t.segments,o,!0,r);return a instanceof Hs?[a]:[]}async processChildren(i,e,t,o){let r=[];for(let m of Object.keys(t.children))m==="primary"?r.unshift(m):r.push(m);let a=[];for(let m of r){let u=t.children[m],h=Uoe(e,m),g=await this.processSegmentGroup(i,h,u,m,o);a.push(...g)}let c=rB(a);return Joe(c),c}async processSegment(i,e,t,o,r,a,c){for(let m of e)try{return await this.processSegmentAgainstRoute(m._injector??i,e,m,t,o,r,a,c)}catch(u){if(u instanceof Rd||J7(u))continue;throw u}if(Yoe(t,o,r))return new zI;throw new Rd(t)}async processSegmentAgainstRoute(i,e,t,o,r,a,c,m){if(Hc(t)!==a&&(a===Xn||!Cy(o,r,t)))throw new Rd(o);if(t.redirectTo===void 0)return this.matchSegmentAgainstRoute(i,o,t,r,a,m);if(this.allowRedirects&&c)return this.expandSegmentAgainstRouteUsingRedirect(i,o,e,t,r,a,m);throw new Rd(o)}async expandSegmentAgainstRouteUsingRedirect(i,e,t,o,r,a,c){let{matched:m,parameters:u,consumedSegments:h,positionalParamSegments:g,remainingSegments:S}=oB(e,o,r);if(!m)throw new Rd(e);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Zoe&&(this.allowRedirects=!1));let x=this.createSnapshot(i,o,r,u,c);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let C=await this.applyRedirects.applyRedirectCommands(h,o.redirectTo,g,iB(x),i),M=await this.applyRedirects.lineralizeSegments(o,C);return this.processSegment(i,t,e,M.concat(S),a,!1,c)}createSnapshot(i,e,t,o,r){let a=new Nf(t,o,Object.freeze(q({},this.urlTree.queryParams)),this.urlTree.fragment,tre(e),Hc(e),e.component??e._loadedComponent??null,e,nre(e),i),c=UI(a,r,this.paramsInheritanceStrategy);return a.params=Object.freeze(c.params),a.data=Object.freeze(c.data),a}async matchSegmentAgainstRoute(i,e,t,o,r,a){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let c=I=>this.createSnapshot(i,t,I.consumedSegments,I.parameters,a),m=await ty(Goe(e,t,o,i,this.urlSerializer,c,this.abortSignal));if(t.path==="**"&&(e.children={}),!m?.matched)throw new Rd(e);i=t._injector??i;let{routes:u}=await this.getChildConfig(i,t,o),h=t._loadedInjector??i,{parameters:g,consumedSegments:S,remainingSegments:x}=m,C=this.createSnapshot(i,t,S,g,a),{segmentGroup:M,slicedSegments:w}=T7(e,S,x,u);if(w.length===0&&M.hasChildren()){let I=await this.processChildren(h,u,M,C);return new Hs(C,I)}if(u.length===0&&w.length===0)return new Hs(C,[]);let y=Hc(t)===r,k=await this.processSegment(h,u,M,w,y?Xn:r,!0,C);return new Hs(C,k instanceof Hs?[k]:[])}async getChildConfig(i,e,t){if(e.children)return{routes:e.children,injector:i};if(e.loadChildren){if(e._loadedRoutes!==void 0){let r=e._loadedNgModuleFactory;return r&&!e._loadedInjector&&(e._loadedInjector=r.create(i).injector),{routes:e._loadedRoutes,injector:e._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(await ty(Boe(i,e,t,this.urlSerializer,this.abortSignal))){let r=await this.configLoader.loadChildren(i,e);return e._loadedRoutes=r.routes,e._loadedInjector=r.injector,e._loadedNgModuleFactory=r.factory,r}throw joe(e)}return{routes:[],injector:i}}};function Joe(n){n.sort((i,e)=>i.value.outlet===Xn?-1:e.value.outlet===Xn?1:i.value.outlet.localeCompare(e.value.outlet))}function ere(n){let i=n.value.routeConfig;return i&&i.path===""}function rB(n){let i=[],e=new Set;for(let t of n){if(!ere(t)){i.push(t);continue}let o=i.find(r=>t.value.routeConfig===r.value.routeConfig);o!==void 0?(o.children.push(...t.children),e.add(o)):i.push(t)}for(let t of e){let o=rB(t.children);i.push(new Hs(t.value,o))}return i.filter(t=>!e.has(t))}function tre(n){return n.data||{}}function nre(n){return n.resolve||{}}function ire(n,i,e,t,o,r,a){return Cr(async c=>{let{state:m,tree:u}=await Koe(n,i,e,t,c.extractedUrl,o,r,a);return We(q({},c),{targetSnapshot:m,urlAfterRedirects:u})})}function ore(n){return Cr(i=>{let{targetSnapshot:e,guards:{canActivateChecks:t}}=i;if(!t.length)return Ct(i);let o=new Set(t.map(c=>c.route)),r=new Set;for(let c of o)if(!r.has(c))for(let m of aB(c))r.add(m);let a=0;return nr(r).pipe(am(c=>o.has(c)?rre(c,e,n):(c.data=UI(c,c.parent,n).resolve,Ct(void 0))),fi(()=>a++),w_(1),Cr(c=>a===r.size?Ct(i):Ur))})}function aB(n){let i=n.children.map(e=>aB(e)).flat();return[n,...i]}function rre(n,i,e){let t=n.routeConfig,o=n._resolve;return t?.title!==void 0&&!Q7(t)&&(o[Pv]=t.title),fh(()=>(n.data=UI(n,n.parent,e).resolve,are(o,n,i).pipe(_t(r=>(n._resolvedData=r,n.data=q(q({},n.data),r),null)))))}function are(n,i,e){let t=EI(n);if(t.length===0)return Ct({});let o={};return nr(t).pipe(Cr(r=>sre(n[r],i,e).pipe(gd(),fi(a=>{if(a instanceof Rf)throw gy(new Fd,a);o[r]=a}))),w_(1),_t(()=>o),eo(r=>J7(r)?Ur:Vo(r)))}function sre(n,i,e){let t=i._environmentInjector,o=Lf(n,t),r=o.resolve?o.resolve(i,e):Es(t,()=>o(i,e));return Bu(r)}function E7(n){return hn(i=>{let e=n(i);return e?nr(e).pipe(_t(()=>i)):Ct(i)})}var XI=(()=>{class n{buildTitle(e){let t,o=e.root;for(;o!==void 0;)t=this.getResolvedTitleForRoute(o)??t,o=o.children.find(r=>r.outlet===Xn);return t}getResolvedTitleForRoute(e){return e.data[Pv]}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:()=>f(sB),providedIn:"root"})}return n})(),sB=(()=>{class n extends XI{title;constructor(e){super(),this.title=e}updateTitle(e){let t=this.buildTitle(e);t!==void 0&&this.title.setTitle(t)}static \u0275fac=function(t){return new(t||n)(ge(cm))};static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Um=new jt("",{factory:()=>({})}),Bf=new jt(""),by=(()=>{class n{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=f(n5);async loadComponent(e,t){if(this.componentLoaders.get(t))return this.componentLoaders.get(t);if(t._loadedComponent)return Promise.resolve(t._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(t);let o=(async()=>{try{let r=await I7(Es(e,()=>t.loadComponent())),a=await dB(cB(r));return this.onLoadEndListener&&this.onLoadEndListener(t),t._loadedComponent=a,a}finally{this.componentLoaders.delete(t)}})();return this.componentLoaders.set(t,o),o}loadChildren(e,t){if(this.childrenLoaders.get(t))return this.childrenLoaders.get(t);if(t._loadedRoutes)return Promise.resolve({routes:t._loadedRoutes,injector:t._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(t);let o=(async()=>{try{let r=await lB(t,this.compiler,e,this.onLoadEndListener);return t._loadedRoutes=r.routes,t._loadedInjector=r.injector,t._loadedNgModuleFactory=r.factory,r}finally{this.childrenLoaders.delete(t)}})();return this.childrenLoaders.set(t,o),o}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();async function lB(n,i,e,t){let o=await I7(Es(e,()=>n.loadChildren())),r=await dB(cB(o)),a;r instanceof QN||Array.isArray(r)?a=r:a=await i.compileModuleAsync(r),t&&t(n);let c,m,u=!1,h;return Array.isArray(a)?(m=a,u=!0):(c=a.create(e).injector,h=a,m=c.get(Bf,[],{optional:!0,self:!0}).flat()),{routes:m.map(QI),injector:c,factory:h}}function lre(n){return n&&typeof n=="object"&&"default"in n}function cB(n){return lre(n)?n.default:n}async function dB(n){return n}var xy=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:()=>f(cre),providedIn:"root"})}return n})(),cre=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,t){return e}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),YI=new jt(""),KI=new jt("");function mB(n,i,e){let t=n.get(KI),o=n.get(qi);if(!o.startViewTransition||t.skipNextTransition)return t.skipNextTransition=!1,new Promise(u=>setTimeout(u));let r,a=new Promise(u=>{r=u}),c=o.startViewTransition(()=>(r(),dre(n)));c.updateCallbackDone.catch(u=>{}),c.ready.catch(u=>{}),c.finished.catch(u=>{});let{onViewTransitionCreated:m}=t;return m&&Es(n,()=>m({transition:c,from:i,to:e})),a}function dre(n){return new Promise(i=>{ca({read:()=>setTimeout(i)},{injector:n})})}var mre=()=>{},ZI=new jt(""),yy=(()=>{class n{currentNavigation=ce(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=ce(null);events=new je;transitionAbortWithErrorSubject=new je;configLoader=f(by);environmentInjector=f(jl);destroyRef=f(sm);urlSerializer=f(Hm);rootContexts=f(Vu);location=f(fc);inputBindingEnabled=f(Iv,{optional:!0})!==null;titleStrategy=f(XI);options=f(Um,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=f(xy);createViewTransition=f(YI,{optional:!0});navigationErrorHandler=f(ZI,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>Ct(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=o=>this.events.next(new ly(o)),t=o=>this.events.next(new cy(o));this.configLoader.onLoadEndListener=t,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let t=++this.navigationId;rr(()=>{this.transitions?.next(We(q({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:t,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(e){return this.transitions=new zt(null),this.transitions.pipe(Kn(t=>t!==null),hn(t=>{let o=!1,r=new AbortController,a=()=>!o&&this.currentTransition?.id===t.id;return Ct(t).pipe(hn(c=>{if(this.navigationId>t.id)return this.cancelNavigationTransition(t,"",Ta.SupersededByNewNavigation),Ur;this.currentTransition=t;let m=this.lastSuccessfulNavigation();this.currentNavigation.set({id:c.id,initialUrl:c.rawUrl,extractedUrl:c.extractedUrl,targetBrowserUrl:typeof c.extras.browserUrl=="string"?this.urlSerializer.parse(c.extras.browserUrl):c.extras.browserUrl,trigger:c.source,extras:c.extras,previousNavigation:m?We(q({},m),{previousNavigation:null}):null,abort:()=>r.abort(),routesRecognizeHandler:c.routesRecognizeHandler,beforeActivateHandler:c.beforeActivateHandler});let u=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),h=c.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!u&&h!=="reload")return this.events.next(new Gc(c.id,this.urlSerializer.serialize(c.rawUrl),"",Pf.IgnoredSameUrlNavigation)),c.resolve(!1),Ur;if(this.urlHandlingStrategy.shouldProcessUrl(c.rawUrl))return Ct(c).pipe(hn(g=>(this.events.next(new Uc(g.id,this.urlSerializer.serialize(g.extractedUrl),g.source,g.restoredState)),g.id!==this.navigationId?Ur:Promise.resolve(g))),ire(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,r.signal),fi(g=>{t.targetSnapshot=g.targetSnapshot,t.urlAfterRedirects=g.urlAfterRedirects,this.currentNavigation.update(S=>(S.finalUrl=g.urlAfterRedirects,S)),this.events.next(new Mv)}),hn(g=>nr(t.routesRecognizeHandler.deferredHandle??Ct(void 0)).pipe(_t(()=>g))),fi(()=>{let g=new wv(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(g)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(c.currentRawUrl)){let{id:g,extractedUrl:S,source:x,restoredState:C,extras:M}=c,w=new Uc(g,this.urlSerializer.serialize(S),x,C);this.events.next(w);let y=W7(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=t=We(q({},c),{targetSnapshot:y,urlAfterRedirects:S,extras:We(q({},M),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(k=>(k.finalUrl=S,k)),Ct(t)}else return this.events.next(new Gc(c.id,this.urlSerializer.serialize(c.extractedUrl),"",Pf.IgnoredByUrlHandlingStrategy)),c.resolve(!1),Ur}),_t(c=>{let m=new oy(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);return this.events.next(m),this.currentTransition=t=We(q({},c),{guards:Coe(c.targetSnapshot,c.currentSnapshot,this.rootContexts)}),t}),Poe(c=>this.events.next(c)),hn(c=>{if(t.guardsResult=c.guardsResult,c.guardsResult&&typeof c.guardsResult!="boolean")throw gy(this.urlSerializer,c.guardsResult);let m=new ry(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot,!!c.guardsResult);if(this.events.next(m),!a())return Ur;if(!c.guardsResult)return this.cancelNavigationTransition(c,"",Ta.GuardRejected),Ur;if(c.guards.canActivateChecks.length===0)return Ct(c);let u=new ay(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);if(this.events.next(u),!a())return Ur;let h=!1;return Ct(c).pipe(ore(this.paramsInheritanceStrategy),fi({next:()=>{h=!0;let g=new sy(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(g)},complete:()=>{h||this.cancelNavigationTransition(c,"",Ta.NoDataFromResolver)}}))}),E7(c=>{let m=h=>{let g=[];if(h.routeConfig?._loadedComponent)h.component=h.routeConfig?._loadedComponent;else if(h.routeConfig?.loadComponent){let S=h._environmentInjector;g.push(this.configLoader.loadComponent(S,h.routeConfig).then(x=>{h.component=x}))}for(let S of h.children)g.push(...m(S));return g},u=m(c.targetSnapshot.root);return u.length===0?Ct(c):nr(Promise.all(u).then(()=>c))}),E7(()=>this.afterPreactivation()),hn(()=>{let{currentSnapshot:c,targetSnapshot:m}=t,u=this.createViewTransition?.(this.environmentInjector,c.root,m.root);return u?nr(u).pipe(_t(()=>t)):Ct(t)}),Wi(1),hn(c=>{let m=foe(e.routeReuseStrategy,c.targetSnapshot,c.currentRouterState);this.currentTransition=t=c=We(q({},c),{targetRouterState:m}),this.currentNavigation.update(h=>(h.targetRouterState=m,h)),this.events.next(new Af);let u=t.beforeActivateHandler.deferredHandle;return u?nr(u.then(()=>c)):Ct(c)}),fi(c=>{new LI(e.routeReuseStrategy,t.targetRouterState,t.currentRouterState,m=>this.events.next(m),this.inputBindingEnabled).activate(this.rootContexts),a()&&(o=!0,this.currentNavigation.update(m=>(m.abort=mre,m)),this.lastSuccessfulNavigation.set(rr(this.currentNavigation)),this.events.next(new kr(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects))),this.titleStrategy?.updateTitle(c.targetRouterState.snapshot),c.resolve(!0))}),tt(eB(r.signal).pipe(Kn(()=>!o&&!t.targetRouterState),fi(()=>{this.cancelNavigationTransition(t,r.signal.reason+"",Ta.Aborted)}))),fi({complete:()=>{o=!0}}),tt(this.transitionAbortWithErrorSubject.pipe(fi(c=>{throw c}))),VN(()=>{r.abort(),o||this.cancelNavigationTransition(t,"",Ta.SupersededByNewNavigation),this.currentTransition?.id===t.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),eo(c=>{if(o=!0,this.destroyed)return t.resolve(!1),Ur;if(Z7(c))this.events.next(new vs(t.id,this.urlSerializer.serialize(t.extractedUrl),c.message,c.cancellationCode)),voe(c)?this.events.next(new Of(c.url,c.navigationBehaviorOptions)):t.resolve(!1);else{let m=new Ld(t.id,this.urlSerializer.serialize(t.extractedUrl),c,t.targetSnapshot??void 0);try{let u=Es(this.environmentInjector,()=>this.navigationErrorHandler?.(m));if(u instanceof Rf){let{message:h,cancellationCode:g}=gy(this.urlSerializer,u);this.events.next(new vs(t.id,this.urlSerializer.serialize(t.extractedUrl),h,g)),this.events.next(new Of(u.redirectTo,u.navigationBehaviorOptions))}else throw this.events.next(m),c}catch(u){this.options.resolveNavigationPromiseOnError?t.resolve(!1):t.reject(u)}}return Ur}))}))}cancelNavigationTransition(e,t,o){let r=new vs(e.id,this.urlSerializer.serialize(e.extractedUrl),t,o);this.events.next(r),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),t=rr(this.currentNavigation),o=t?.targetBrowserUrl??t?.extractedUrl;return e.toString()!==o?.toString()&&!t?.extras.skipLocationChange}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function pre(n){return n!==Ef}var pB=new jt("");var uB=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:()=>f(ure),providedIn:"root"})}return n})(),vy=class{shouldDetach(i){return!1}store(i,e){}shouldAttach(i){return!1}retrieve(i){return null}shouldReuseRoute(i,e){return i.routeConfig===e.routeConfig}shouldDestroyInjector(i){return!0}},ure=(()=>{class n extends vy{static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Sy=(()=>{class n{urlSerializer=f(Hm);options=f(Um,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=f(fc);urlHandlingStrategy=f(xy);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new Ka;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:t,targetBrowserUrl:o}){let r=e!==void 0?this.urlHandlingStrategy.merge(e,t):t,a=o??r;return a instanceof Ka?this.urlSerializer.serialize(a):a}commitTransition({targetRouterState:e,finalUrl:t,initialUrl:o}){t&&e?(this.currentUrlTree=t,this.rawUrlTree=this.urlHandlingStrategy.merge(t,o),this.routerState=e):this.rawUrlTree=o}routerState=W7(null,f(jl));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:()=>f(hre),providedIn:"root"})}return n})(),hre=(()=>{class n extends Sy{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(t=>{t.type==="popstate"&&setTimeout(()=>{e(t.url,t.state,"popstate",{replaceUrl:!0})})})}handleRouterEvent(e,t){e instanceof Uc?this.updateStateMemento():e instanceof Gc?this.commitTransition(t):e instanceof wv?this.urlUpdateStrategy==="eager"&&(t.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(t),t)):e instanceof Af?(this.commitTransition(t),this.urlUpdateStrategy==="deferred"&&!t.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(t),t)):e instanceof vs&&!G7(e)?this.restoreHistory(t):e instanceof Ld?this.restoreHistory(t,!0):e instanceof kr&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:t,id:o}){let{replaceUrl:r,state:a}=t;if(this.location.isCurrentPathEqualTo(e)||r){let c=this.browserPageId,m=q(q({},a),this.generateNgRouterState(o,c));this.location.replaceState(e,"",m)}else{let c=q(q({},a),this.generateNgRouterState(o,this.browserPageId+1));this.location.go(e,"",c)}}restoreHistory(e,t=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,r=this.currentPageId-o;r!==0?this.location.historyGo(r):this.getCurrentUrlTree()===e.finalUrl&&r===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(t&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,t){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:t}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function wy(n,i){n.events.pipe(Kn(e=>e instanceof kr||e instanceof vs||e instanceof Ld||e instanceof Gc),_t(e=>e instanceof kr||e instanceof Gc?0:(e instanceof vs?e.code===Ta.Redirect||e.code===Ta.SupersededByNewNavigation:!1)?2:1),Kn(e=>e!==2),Wi(1)).subscribe(()=>{i()})}var ut=(()=>{class n{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=f(XN);stateManager=f(Sy);options=f(Um,{optional:!0})||{};pendingTasks=f(HN);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=f(yy);urlSerializer=f(Hm);location=f(fc);urlHandlingStrategy=f(xy);injector=f(jl);_events=new je;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=f(uB);injectorCleanup=f(pB,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=f(Bf,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!f(Iv,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new fo;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(t=>{try{let o=this.navigationTransitions.currentTransition,r=rr(this.navigationTransitions.currentNavigation);if(o!==null&&r!==null){if(this.stateManager.handleRouterEvent(t,r),t instanceof vs&&t.code!==Ta.Redirect&&t.code!==Ta.SupersededByNewNavigation)this.navigated=!0;else if(t instanceof kr)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(t instanceof Of){let a=t.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(t.url,o.currentRawUrl),m=q({scroll:o.extras.scroll,browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||pre(o.source)},a);this.scheduleNavigation(c,Ef,null,m,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}uoe(t)&&this._events.next(t)}catch(o){this.navigationTransitions.transitionAbortWithErrorSubject.next(o)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Ef,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,t,o,r)=>{this.navigateToSyncWithBrowser(e,o,t,r)})}navigateToSyncWithBrowser(e,t,o,r){let a=o?.navigationId?o:null;if(o){let m=q({},o);delete m.navigationId,delete m.\u0275routerPageId,Object.keys(m).length!==0&&(r.state=m)}let c=this.parseUrl(e);this.scheduleNavigation(c,t,a,r).catch(m=>{this.disposed||this.injector.get(a1)(m)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return rr(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(QI),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,t={}){let{relativeTo:o,queryParams:r,fragment:a,queryParamsHandling:c,preserveFragment:m}=t,u=m?this.currentUrlTree.fragment:a,h=null;switch(c??this.options.defaultQueryParamsHandling){case"merge":h=q(q({},this.currentUrlTree.queryParams),r);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=r||null}h!==null&&(h=this.removeEmptyProps(h));let g;try{let S=o?o.snapshot:this.routerState.snapshot.root;g=j7(S)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),g=this.currentUrlTree.root}return $7(g,e,h,u??null,this.urlSerializer)}navigateByUrl(e,t={skipLocationChange:!1}){let o=$m(e)?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(r,Ef,null,t)}navigate(e,t={skipLocationChange:!1}){return fre(e),this.navigateByUrl(this.createUrlTree(e,t),t)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(zN(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,t){let o;if(t===!0?o=q({},$I):t===!1?o=q({},yv):o=q(q({},yv),t),$m(e))return DI(this.currentUrlTree,e,o);let r=this.parseUrl(e);return DI(this.currentUrlTree,r,o)}removeEmptyProps(e){return Object.entries(e).reduce((t,[o,r])=>(r!=null&&(t[o]=r),t),{})}scheduleNavigation(e,t,o,r,a){if(this.disposed)return Promise.resolve(!1);let c,m,u;a?(c=a.resolve,m=a.reject,u=a.promise):u=new Promise((g,S)=>{c=g,m=S});let h=this.pendingTasks.add();return wy(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:t,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:r,resolve:c,reject:m,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(Promise.reject.bind(Promise))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function fre(n){for(let i=0;i{class n{router=f(ut);stateManager=f(Sy);fragment=ce("");queryParams=ce({});path=ce("");serializer=f(Hm);constructor(){this.updateState(),this.router.events?.subscribe(e=>{e instanceof kr&&this.updateState()})}updateState(){let{fragment:e,root:t,queryParams:o}=this.stateManager.getCurrentUrlTree();this.fragment.set(e),this.queryParams.set(o),this.path.set(this.serializer.serialize(new Ka(t)))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),mn=(()=>{class n{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=f(new Ks("href"),{optional:!0});reactiveHref=o5(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return rr(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}set target(e){this._target.set(e)}get target(){return rr(this._target)}_target=ce(void 0);set queryParams(e){this._queryParams.set(e)}get queryParams(){return rr(this._queryParams)}_queryParams=ce(void 0,{equal:()=>!1});set fragment(e){this._fragment.set(e)}get fragment(){return rr(this._fragment)}_fragment=ce(void 0);set queryParamsHandling(e){this._queryParamsHandling.set(e)}get queryParamsHandling(){return rr(this._queryParamsHandling)}_queryParamsHandling=ce(void 0);set state(e){this._state.set(e)}get state(){return rr(this._state)}_state=ce(void 0,{equal:()=>!1});set info(e){this._info.set(e)}get info(){return rr(this._info)}_info=ce(void 0,{equal:()=>!1});set relativeTo(e){this._relativeTo.set(e)}get relativeTo(){return rr(this._relativeTo)}_relativeTo=ce(void 0);set preserveFragment(e){this._preserveFragment.set(e)}get preserveFragment(){return rr(this._preserveFragment)}_preserveFragment=ce(!1);set skipLocationChange(e){this._skipLocationChange.set(e)}get skipLocationChange(){return rr(this._skipLocationChange)}_skipLocationChange=ce(!1);set replaceUrl(e){this._replaceUrl.set(e)}get replaceUrl(){return rr(this._replaceUrl)}_replaceUrl=ce(!1);isAnchorElement;onChanges=new je;applicationErrorHandler=f(a1);options=f(Um,{optional:!0});reactiveRouterState=f(gre);constructor(e,t,o,r,a,c){this.router=e,this.route=t,this.tabIndexAttribute=o,this.renderer=r,this.el=a,this.locationStrategy=c;let m=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=m==="a"||m==="area"||!!(typeof customElements=="object"&&customElements.get(m)?.observedAttributes?.includes?.("href"))}setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.onChanges.next(this)}routerLinkInput=ce(null);set routerLink(e){e==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):($m(e)?this.routerLinkInput.set(e):this.routerLinkInput.set(Array.isArray(e)?e:[e]),this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,t,o,r,a){let c=this._urlTree();if(c===null||this.isAnchorElement&&(e!==0||t||o||r||a||typeof this.target=="string"&&this.target!="_self"))return!0;let m={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(c,m)?.catch(u=>{this.applicationErrorHandler(u)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(e,t){let o=this.renderer,r=this.el.nativeElement;t!==null?o.setAttribute(r,e,t):o.removeAttribute(r,e)}_urlTree=sn(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let e=o=>o==="preserve"||o==="merge";(e(this._queryParamsHandling())||e(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let t=this.routerLinkInput();return t===null||!this.router.createUrlTree?null:$m(t)?t:this.router.createUrlTree(t,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(e,t)=>this.computeHref(e)===this.computeHref(t)});get urlTree(){return rr(this._urlTree)}computeHref(e){return e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null}static \u0275fac=function(t){return new(t||n)(Ye(ut),Ye(rt),GN("tabindex"),Ye(hi),Ye(Yt),Ye(T_))};static \u0275dir=ft({type:n,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(t,o){t&1&&_("click",function(a){return o.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),t&2&&Wt("href",o.reactiveHref(),qN)("target",o._target())},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",gt],skipLocationChange:[2,"skipLocationChange","skipLocationChange",gt],replaceUrl:[2,"replaceUrl","replaceUrl",gt],routerLink:"routerLink"},features:[dn]})}return n})(),e3=(()=>{class n{router;element;renderer;cdr;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new _e;link=f(mn,{optional:!0});constructor(e,t,o,r){this.router=e,this.element=t,this.renderer=o,this.cdr=r,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof kr&&this.update()})}ngAfterContentInit(){Ct(this.links.changes,Ct(null)).pipe(y_()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(t=>!!t).map(t=>t.onChanges);this.linkInputChangesSubscription=nr(e).pipe(y_()).subscribe(t=>{this._isActive!==this.isLinkActive(this.router)(t)&&this.update()})}set routerLinkActive(e){let t=Array.isArray(e)?e:e.split(" ");this.classes=t.filter(o=>!!o)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(t=>{e?this.renderer.addClass(this.element.nativeElement,t):this.renderer.removeClass(this.element.nativeElement,t)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let t=_re(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact??!1?q({},$I):q({},yv);return o=>{let r=o.urlTree;return r?rr(HI(r,e,t)):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(t){return new(t||n)(Ye(ut),Ye(Yt),Ye(hi),Ye(X))};static \u0275dir=ft({type:n,selectors:[["","routerLinkActive",""]],contentQueries:function(t,o,r){if(t&1&&Hi(r,mn,5),t&2){let a;dt(a=mt())&&(o.links=a)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[dn]})}return n})();function _re(n){let i=n;return!!(i.paths||i.matrixParams||i.queryParams||i.fragment)}var Ov=class{};var hB=(()=>{class n{router;injector;preloadingStrategy;loader;subscription;constructor(e,t,o,r){this.router=e,this.injector=t,this.preloadingStrategy=o,this.loader=r}setUpPreloading(){this.subscription=this.router.events.pipe(Kn(e=>e instanceof kr),am(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription?.unsubscribe()}processRoutes(e,t){let o=[];for(let r of t){r.providers&&!r._injector&&(r._injector=c1(r.providers,e,""));let a=r._injector??e;r._loadedNgModuleFactory&&!r._loadedInjector&&(r._loadedInjector=r._loadedNgModuleFactory.create(a).injector);let c=r._loadedInjector??a;(r.loadChildren&&!r._loadedRoutes&&r.canLoad===void 0||r.loadComponent&&!r._loadedComponent)&&o.push(this.preloadConfig(a,r)),(r.children||r._loadedRoutes)&&o.push(this.processRoutes(c,r.children??r._loadedRoutes))}return nr(o).pipe(y_())}preloadConfig(e,t){return this.preloadingStrategy.preload(t,()=>{if(e.destroyed)return Ct(null);let o;t.loadChildren&&t.canLoad===void 0?o=nr(this.loader.loadChildren(e,t)):o=Ct(null);let r=o.pipe(Cr(a=>a===null?Ct(void 0):(t._loadedRoutes=a.routes,t._loadedInjector=a.injector,t._loadedNgModuleFactory=a.factory,this.processRoutes(a.injector??e,a.routes))));if(t.loadComponent&&!t._loadedComponent){let a=this.loader.loadComponent(e,t);return nr([r,a]).pipe(y_())}else return r})}static \u0275fac=function(t){return new(t||n)(ge(ut),ge(jl),ge(Ov),ge(by))};static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),fB=new jt(""),vre=(()=>{class n{options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=Ef;restoredId=0;store={};urlSerializer=f(Hm);zone=f(Ii);viewportScroller=f(GT);transitions=f(yy);constructor(e){this.options=e,this.options.scrollPositionRestoration||="disabled",this.options.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Uc?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof kr?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof Gc&&e.code===Pf.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{if(!(e instanceof If)||e.scrollBehavior==="manual")return;let t={behavior:"instant"};e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0],t):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position,t):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0])})}scheduleScrollEvent(e,t){let o=rr(this.transitions.currentNavigation)?.extras.scroll;this.zone.runOutsideAngular(async()=>{await new Promise(r=>{setTimeout(r),typeof requestAnimationFrame<"u"&&requestAnimationFrame(r)}),this.zone.run(()=>{this.transitions.events.next(new If(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,t,o))})})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(t){l1()};static \u0275prov=Y({token:n,factory:n.\u0275fac})}return n})();function Cre(){return f(ut).routerState.root}function Nv(n,i){return{\u0275kind:n,\u0275providers:i}}function bre(){let n=f(Wo);return i=>{let e=n.get(HT);if(i!==e.components[0])return;let t=n.get(ut),o=n.get(gB);n.get(t3)===1&&t.initialNavigation(),n.get(CB,null,{optional:!0})?.setUpPreloading(),n.get(fB,null,{optional:!0})?.init(),t.resetRootComponentType(e.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var gB=new jt("",{factory:()=>new je}),t3=new jt("",{factory:()=>1});function _B(){let n=[{provide:WN,useValue:!0},{provide:t3,useValue:0},$T(()=>{let i=f(Wo);return i.get(c5,Promise.resolve()).then(()=>new Promise(t=>{let o=i.get(ut),r=i.get(gB);wy(o,()=>{t(!0)}),i.get(yy).afterPreactivation=()=>(t(!0),r.closed?Ct(void 0):r),o.initialNavigation()}))})];return Nv(2,n)}function vB(){let n=[$T(()=>{f(ut).setUpLocationChangeListener()}),{provide:t3,useValue:2}];return Nv(3,n)}var CB=new jt("");function bB(n){return Nv(0,[{provide:CB,useExisting:hB},{provide:Ov,useExisting:n}])}function xB(){return Nv(8,[WI,{provide:Iv,useExisting:WI}])}function yB(n){jT("NgRouterViewTransitions");let i=[{provide:YI,useValue:mB},{provide:KI,useValue:q({skipNextTransition:!!n?.skipInitialTransition},n)}];return Nv(9,i)}var SB=[fc,{provide:Hm,useClass:Fd},ut,Vu,{provide:rt,useFactory:Cre},by,[]],pt=(()=>{class n{constructor(){}static forRoot(e,t){return{ngModule:n,providers:[SB,[],{provide:Bf,multi:!0,useValue:e},[],t?.errorHandler?{provide:ZI,useValue:t.errorHandler}:[],{provide:Um,useValue:t||{}},t?.useHash?yre():Sre(),xre(),t?.preloadingStrategy?bB(t.preloadingStrategy).\u0275providers:[],t?.initialNavigation?wre(t):[],t?.bindToComponentInputs?xB().\u0275providers:[],t?.enableViewTransitions?yB().\u0275providers:[],Mre()]}}static forChild(e){return{ngModule:n,providers:[{provide:Bf,multi:!0,useValue:e}]}}static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({})}return n})();function xre(){return{provide:fB,useFactory:()=>{let n=f(GT),i=f(Um);return i.scrollOffset&&n.setOffset(i.scrollOffset),new vre(i)}}}function yre(){return{provide:T_,useClass:m5}}function Sre(){return{provide:T_,useClass:d5}}function wre(n){return[n.initialNavigation==="disabled"?vB().\u0275providers:[],n.initialNavigation==="enabledBlocking"?_B().\u0275providers:[]]}var JI=new jt("");function Mre(){return[{provide:JI,useFactory:bre},{provide:ZN,multi:!0,useExisting:JI}]}var zu=class{visible;error;clear;constructor(i,e,t=!1){this.visible=i,this.error=e,this.clear=t}},so=(()=>{class n{state=new zt(new zu(!1));constructor(){}setError(e){this.state.next(new zu(!1,e.error))}clear(){this.state.next(new zu(!1,null,!0))}activate(){this.state.next(new zu(!0))}deactivate(){this.state.next(new zu(!1))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac})}return n})();function kre(n,i){n&1&&(s(0,"div",1),L(1,"mat-spinner",3),l())}function Tre(n,i){if(n&1){let e=z();s(0,"div",2)(1,"div",4)(2,"mat-icon"),d(3,"error_outline"),l()(),s(4,"div"),d(5),l(),s(6,"div")(7,"button",5),_("click",function(){T(e);let o=v(2);return E(o.refresh())}),s(8,"mat-icon"),d(9,"refresh"),l()(),s(10,"button",6)(11,"mat-icon"),d(12,"home"),l()()()()}if(n&2){let e,t=v(2);p(5),te("Error occurred: ",(e=t.error())==null?null:e.message)}}function Ere(n,i){if(n&1&&(s(0,"div",0),A(1,kre,2,0,"div",1),A(2,Tre,13,1,"div",2),l()),n&2){let e=v();p(),O(e.visible()&&!e.error()?1:-1),p(),O(e.error()?2:-1)}}var Gm=(()=>{class n{progressService=f(so);router=f(ut);visible=ce(!1);error=ce(null);routerSubscription;ngOnInit(){this.progressService.state.subscribe(e=>{this.visible.set(e.visible),e.error&&!this.error()&&this.error.set(e.error),e.clear&&this.error.set(null)}),this.routerSubscription=this.router.events.subscribe(()=>{this.progressService.clear()})}refresh(){this.router.navigateByUrl(this.router.url)}ngOnDestroy(){this.routerSubscription.unsubscribe()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["app-progress"]],decls:1,vars:1,consts:[[1,"overlay"],[1,"loading-spinner"],[1,"error-state"],["color","primary"],[1,"error-icon"],["mat-button","","matTooltip","Refresh page","matTooltipClass","custom-tooltip",3,"click"],["mat-button","","routerLink","/","matTooltip","Go to home","matTooltipClass","custom-tooltip"]],template:function(t,o){t&1&&A(0,Ere,3,2,"div",0),t&2&&O(o.visible()||o.error()?0:-1)},dependencies:[ie,Sn,ki,oe,de,W,he,Mt,Ot,mn],styles:[".overlay[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;inset:0;background-color:color-mix(in srgb,var(--mat-sys-shadow) 50%,transparent);z-index:2000}.loading-spinner[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.error-state[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{text-align:center}.error-icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:64px;width:64px;height:64px}"],changeDetection:0})}return n})();var My=(()=>{class n{document;router=f(ut);controllerService=f(nt);progressService=f(so);constructor(e){this.document=e}ngOnInit(){this.progressService.activate(),setTimeout(()=>{let e;parseInt(this.document.location.port,10)?e=parseInt(this.document.location.port,10):this.document.location.protocol=="https:"?e=443:e=80,this.controllerService.getLocalController(this.document.location.hostname,e).then(t=>{this.router.navigate(["/controller",t.id,"projects"]),this.progressService.deactivate()})},100)}static \u0275fac=function(t){return new(t||n)(Ye(qi))};static \u0275cmp=R({type:n,selectors:[["app-bundled-controller-finder"]],decls:1,vars:0,template:function(t,o){t&1&&L(0,"app-progress")},dependencies:[Gm],encapsulation:2,changeDetection:0})}return n})();var Dre=["mat-menu-item",""],Pre=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],Ire=["mat-icon, [matMenuItemIcon]","*"];function Are(n,i){n&1&&(ni(),s(0,"svg",2),L(1,"polygon",3),l())}var Ore=["*"];function Nre(n,i){if(n&1){let e=z();yo(0,"div",0),d1("click",function(){T(e);let o=v();return E(o.closed.emit("click"))})("animationstart",function(o){T(e);let r=v();return E(r._onAnimationStart(o.animationName))})("animationend",function(o){T(e);let r=v();return E(r._onAnimationDone(o.animationName))})("animationcancel",function(o){T(e);let r=v();return E(r._onAnimationDone(o.animationName))}),yo(1,"div",1),rn(2),To()()}if(n&2){let e=v();or(e._classList),ze("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),qo("id",e.panelId),Wt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var i3=new jt("MAT_MENU_PANEL"),et=(()=>{class n{_elementRef=f(Yt);_document=f(qi);_focusMonitor=f(za);_parentMenu=f(i3,{optional:!0});_changeDetectorRef=f(X);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new je;_focused=new je;_highlighted=!1;_triggersSubmenu=!1;constructor(){f(ur).load(da),this._parentMenu?.addItem?.(this)}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),t=e.querySelectorAll("mat-icon, .material-icons");for(let o=0;o({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),n3="_mat-menu-enter",ky="_mat-menu-exit",ii=(()=>{class n{_elementRef=f(Yt);_changeDetectorRef=f(X);_injector=f(Wo);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=Qo();_allItems;_directDescendantItems=new $l;_classList={};_panelAnimationState="void";_animationDone=new je;_isAnimating=ce(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;set panelClass(e){let t=this._previousPanelClass,o=q({},this._classList);t&&t.length&&t.split(" ").forEach(r=>{o[r]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(r=>{o[r]=!0}),this._elementRef.nativeElement.className=""),this._classList=o}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new _e;close=this.closed;panelId=f(Eo).getId("mat-menu-panel-");constructor(){let e=f(Fre);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new mm(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(ci(this._directDescendantItems),hn(e=>Dn(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let o=e.toArray(),r=Math.max(0,Math.min(o.length-1,t.activeItemIndex||0));o[r]&&!o[r].disabled?t.setActiveItem(r):t.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(ci(this._directDescendantItems),hn(t=>Dn(...t.map(o=>o._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,o=this._keyManager;switch(t){case 27:ya(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=ca(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(e).setFirstItemActive(),!o.activeItem&&t&&t.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=We(q({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let t=e===ky;(t||e===n3)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===n3||e===ky)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(ky),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?n3:ky)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(ci(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["mat-menu"]],contentQueries:function(t,o,r){if(t&1&&Hi(r,Rre,5)(r,et,5)(r,et,4),t&2){let a;dt(a=mt())&&(o.lazyContent=a.first),dt(a=mt())&&(o._allItems=a),dt(a=mt())&&(o.items=a)}},viewQuery:function(t,o){if(t&1&&xn(zo,5),t&2){let r;dt(r=mt())&&(o.templateRef=r.first)}},hostVars:3,hostBindings:function(t,o){t&2&&Wt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",gt],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:gt(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[Cn([{provide:i3,useExisting:n}])],ngContentSelectors:Ore,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,o){t&1&&(ri(),Ch(0,Nre,3,12,"ng-template"))},styles:[`mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{border-top-color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none} -`],encapsulation:2,changeDetection:0})}return n})(),Lre=new jt("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let n=f(Wo);return()=>y1(n)}});var Vf=new WeakMap,Bre=(()=>{class n{_canHaveBackdrop;_element=f(Yt);_viewContainerRef=f(to);_menuItemInstance=f(et,{optional:!0,self:!0});_dir=f(os,{optional:!0});_focusMonitor=f(za);_ngZone=f(Ii);_injector=f(Wo);_scrollStrategy=f(Lre);_changeDetectorRef=f(X);_animationsDisabled=Qo();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=fo.EMPTY;_menuCloseSubscription=fo.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(t=>{this._destroyMenu(t),(t==="click"||t==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(t)})),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal=null;constructor(e){this._canHaveBackdrop=e;let t=f(i3,{optional:!0});this._parentMaterialMenu=t instanceof ii?t:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&Vf.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){if(this._triggerIsAriaDisabled())return;let t=this._menu;if(this._menuOpen||!t)return;this._pendingRemoval?.unsubscribe();let o=Vf.get(t);Vf.set(t,this),o&&o!==this&&o._closeMenu();let r=this._createOverlay(t),a=r.getConfig(),c=a.positionStrategy;this._setPosition(t,c),this._canHaveBackdrop?a.hasBackdrop=t.hasBackdrop==null?!this._triggersSubmenu():t.hasBackdrop:a.hasBackdrop=t.hasBackdrop??!1,r.hasAttached()||(r.attach(this._getPortal(t)),t.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),t.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,e&&t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),t instanceof ii&&(t._setIsOpen(!0),t._directDescendantItems.changes.pipe(tt(t.close)).subscribe(()=>{c.withLockedPosition(!1).reapplyLastPosition(),c.withLockedPosition(!0)}))}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}_destroyMenu(e){let t=this._overlayRef,o=this._menu;!t||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),o instanceof ii&&this._ownsMenu(o)?(this._pendingRemoval=o._animationDone.pipe(Wi(1)).subscribe(()=>{t.detach(),Vf.has(o)||o.lazyContent?.detach()}),o._setIsOpen(!1)):(t.detach(),o?.lazyContent?.detach()),o&&this._ownsMenu(o)&&Vf.delete(o),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let t=this._getOverlayConfig(e);this._subscribeToPositions(e,t.positionStrategy),this._overlayRef=M1(this._injector,t),this._overlayRef.keydownEvents().subscribe(o=>{this._menu instanceof ii&&this._menu._handleKeydown(o)})}return this._overlayRef}_getOverlayConfig(e){return new S1({positionStrategy:w1(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,t){e.setPositionClasses&&t.positionChanges.subscribe(o=>{this._ngZone.run(()=>{let r=o.connectionPair.overlayX==="start"?"after":"before",a=o.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(r,a)})})}_setPosition(e,t){let[o,r]=e.xPosition==="before"?["end","start"]:["start","end"],[a,c]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[m,u]=[a,c],[h,g]=[o,r],S=0;if(this._triggersSubmenu()){if(g=o=e.xPosition==="before"?"start":"end",r=h=o==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let x=this._parentMaterialMenu.items.first;this._parentInnerPadding=x?x._getHostElement().offsetTop:0}S=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(m=a==="top"?"bottom":"top",u=c==="top"?"bottom":"top");t.withPositions([{originX:o,originY:m,overlayX:h,overlayY:a,offsetY:S},{originX:r,originY:m,overlayX:g,overlayY:a,offsetY:S},{originX:o,originY:u,overlayX:h,overlayY:c,offsetY:-S},{originX:r,originY:u,overlayX:g,overlayY:c,offsetY:-S}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),t=this._overlayRef.detachments(),o=this._parentMaterialMenu?this._parentMaterialMenu.closed:Ct(),r=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Kn(a=>this._menuOpen&&a!==this._menuItemInstance)):Ct();return Dn(e,o,r,t)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new dm(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return Vf.get(e)===this}_triggerIsAriaDisabled(){return gt(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(t){l1()};static \u0275dir=ft({type:n})}return n})(),An=(()=>{class n extends Bre{_cleanupTouchstart;_hoverSubscription=fo.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new _e;onMenuOpen=this.menuOpened;menuClosed=new _e;onMenuClose=this.menuClosed;constructor(){super(!0);let e=f(hi);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",t=>{b1(t)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){C1(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let t=e.keyCode;(t===13||t===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(t===39&&this.dir==="ltr"||t===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&this._parentMaterialMenu?._panelAnimationState!=="void"&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(t,o){t&1&&_("click",function(a){return o._handleClick(a)})("mousedown",function(a){return o._handleMousedown(a)})("keydown",function(a){return o._handleKeydown(a)}),t&2&&Wt("aria-haspopup",o.menu?"menu":null)("aria-expanded",o.menuOpen)("aria-controls",o.menuOpen?o.menu==null?null:o.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[di]})}return n})();var Ge=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({imports:[Cc,wh,_i,xd]})}return n})();var Vre=[[["caption"]],[["colgroup"],["col"]],"*"],zre=["caption","colgroup, col","*"];function jre(n,i){n&1&&rn(0,2)}function $re(n,i){n&1&&(s(0,"thead",0),co(1,1),l(),s(2,"tbody",2),co(3,3)(4,4),l(),s(5,"tfoot",0),co(6,5),l())}function Hre(n,i){n&1&&co(0,1)(1,3)(2,4)(3,5)}var On=(()=>{class n extends FP{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275cmp=R({type:n,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,o){t&2&&ze("mat-table-fixed-layout",o.fixedLayout)},exportAs:["matTable"],features:[Cn([{provide:FP,useExisting:n},{provide:Yl,useExisting:n},{provide:rv,useValue:null}]),di],ngContentSelectors:zre,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(ri(Vre),rn(0),rn(1,1),A(2,jre,1,0),A(3,$re,7,0)(4,Hre,4,0)),t&2&&(p(2),O(o._isServer?2:-1),p(),O(o._isNativeHtmlTable?3:4))},dependencies:[OP,AP,RP,NP],styles:[`.mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:var(--mat-table-header-container-height, 56px)}mat-row{min-height:var(--mat-table-row-item-container-height, 52px)}mat-footer-row{min-height:var(--mat-table-footer-container-height, 52px)}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-sys-surface))}.mat-table-fixed-layout{table-layout:fixed}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:start;text-overflow:ellipsis}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-sys-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:start}.mdc-data-table__row:last-child>.mat-mdc-header-cell{border-bottom:none}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child>.mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch} -`],encapsulation:2})}return n})(),Nn=(()=>{class n extends wx{static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matCellDef",""]],features:[Cn([{provide:wx,useExisting:n}]),di]})}return n})(),Rn=(()=>{class n extends Mx{static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matHeaderCellDef",""]],features:[Cn([{provide:Mx,useExisting:n}]),di]})}return n})();var Fn=(()=>{class n extends Vm{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[Cn([{provide:Vm,useExisting:n}]),di]})}return n})(),Ln=(()=>{class n extends hL{static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[di]})}return n})();var Bn=(()=>{class n extends fL{static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[di]})}return n})();var Vn=(()=>{class n extends av{static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",gt]},features:[Cn([{provide:av,useExisting:n}]),di]})}return n})();var zn=(()=>{class n extends kx{static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[Cn([{provide:kx,useExisting:n}]),di]})}return n})(),jn=(()=>{class n extends PP{static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275cmp=R({type:n,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[Cn([{provide:PP,useExisting:n}]),di],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&co(0,0)},dependencies:[Eu],encapsulation:2})}return n})();var $n=(()=>{class n extends IP{static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275cmp=R({type:n,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[Cn([{provide:IP,useExisting:n}]),di],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&co(0,0)},dependencies:[Eu],encapsulation:2})}return n})();var Mn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({imports:[Tx,_i]})}return n})(),Ure=9007199254740991,gr=class extends Ul{_data;_renderData=new zt([]);_filter=new zt("");_internalPageChanges=new je;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(i){i=Array.isArray(i)?i:[],this._data.next(i),this._renderChangesSubscription||this._filterData(i)}get filter(){return this._filter.value}set filter(i){this._filter.next(i),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(i){this._sort=i,this._updateChangeSubscription()}_sort;get paginator(){return this._paginator}set paginator(i){this._paginator=i,this._updateChangeSubscription()}_paginator;sortingDataAccessor=(i,e)=>{let t=i[e];if(S5(t)){let o=Number(t);return o{let t=e.active,o=e.direction;return!t||o==""?i:i.sort((r,a)=>{let c=this.sortingDataAccessor(r,t),m=this.sortingDataAccessor(a,t),u=typeof c,h=typeof m;u!==h&&(u==="number"&&(c+=""),h==="number"&&(m+=""));let g=0;return c!=null&&m!=null?c>m?g=1:c{let t=e.trim().toLowerCase();return Object.values(i).some(o=>`${o}`.toLowerCase().includes(t))};constructor(i=[]){super(),this._data=new zt(i),this._updateChangeSubscription()}_updateChangeSubscription(){let i=this._sort?Dn(this._sort.sortChange,this._sort.initialized):Ct(null),e=this._paginator?Dn(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Ct(null),t=this._data,o=ir([t,this._filter]).pipe(_t(([c])=>this._filterData(c))),r=ir([o,i]).pipe(_t(([c])=>this._orderData(c))),a=ir([r,e]).pipe(_t(([c])=>this._pageData(c)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=a.subscribe(c=>this._renderData.next(c))}_filterData(i){return this.filteredData=this.filter==null||this.filter===""?i:i.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(i){return this.sort?this.sortData(i.slice(),this.sort):i}_pageData(i){if(!this.paginator)return i;let e=this.paginator.pageIndex*this.paginator.pageSize;return i.slice(e,e+this.paginator.pageSize)}_updatePaginator(i){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=i,e.pageIndex>0)){let t=Math.ceil(e.length/e.pageSize)-1||0,o=Math.min(e.pageIndex,t);o!==e.pageIndex&&(e.pageIndex=o,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}};var Gre=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms} -`],encapsulation:2,changeDetection:0})}return n})(),Wre={passive:!0},kB=(()=>{class n{_platform=f(Zs);_ngZone=f(Ii);_renderer=f(vd).createRenderer(null,null);_styleLoader=f(ur);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return Ur;this._styleLoader.load(Gre);let t=Hl(e),o=this._monitoredElements.get(t);if(o)return o.subject;let r=new je,a="cdk-text-field-autofilled",c=u=>{u.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(a)?(t.classList.add(a),this._ngZone.run(()=>r.next({target:u.target,isAutofilled:!0}))):u.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(a)&&(t.classList.remove(a),this._ngZone.run(()=>r.next({target:u.target,isAutofilled:!1})))},m=this._ngZone.runOutsideAngular(()=>(t.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(t,"animationstart",c,Wre)));return this._monitoredElements.set(t,{subject:r,unlisten:m}),r}stopMonitoring(e){let t=Hl(e),o=this._monitoredElements.get(t);o&&(o.unlisten(),o.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var TB=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({})}return n})();var EB=new jt("MAT_INPUT_VALUE_ACCESSOR");var qre=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Qre=new jt("MAT_INPUT_CONFIG"),De=(()=>{class n{_elementRef=f(Yt);_platform=f(Zs);ngControl=f(T1,{optional:!0,self:!0});_autofillMonitor=f(kB);_ngZone=f(Ii);_formField=f(Th,{optional:!0});_renderer=f(hi);_uid=f(Eo).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=f(Qre,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=!1;_isNativeSelect=!1;_isTextarea=!1;_isInFormField=!1;focused=!1;stateChanges=new je;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=N1(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(Ue.required)??!1}set required(e){this._required=N1(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&QT().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=N1(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>QT().has(e));constructor(){let e=f(Wn,{optional:!0}),t=f(Lt,{optional:!0}),o=f(wd),r=f(EB,{optional:!0,self:!0}),a=this._elementRef.nativeElement,c=a.nodeName.toLowerCase();r?YN(r.value)?this._signalBasedValueAccessor=r:this._inputValueAccessor=r:this._inputValueAccessor=a,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(a,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new L1(o,this.ngControl,t,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=c==="select",this._isTextarea=c==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=a.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&Ds(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let t=this._elementRef.nativeElement;t.type==="number"?(t.type="text",t.setSelectionRange(0,0),t.type="number"):t.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){qre.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let t=e.target;!t.value&&t.selectionStart===0&&t.selectionEnd===0&&(t.setSelectionRange(1,1),t.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(t,o){t&1&&_("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),t&2&&(qo("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),Wt("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),ze("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",gt]},exportAs:["matInput"],features:[Cn([{provide:F1,useExisting:n}]),dn]})}return n})(),ye=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({imports:[we,we,TB,_i]})}return n})();var qm=(()=>{class n{data;dialogRef=f(Ie);templateName=ce("");constructor(e){this.data=e,this.templateName.set(e.templateName)}onNoClick(){this.dialogRef.close(!1)}onYesClick(){this.dialogRef.close(!0)}static \u0275fac=function(t){return new(t||n)(Ye(xt))};static \u0275cmp=R({type:n,selectors:[["app-delete-confirmation-dialog"]],decls:9,vars:1,consts:[["mat-dialog-title",""],[1,"mat-mdc-dialog-content"],["mat-dialog-actions",""],["mat-button","",3,"click"],["mat-button","","tabindex","2","mat-raised-button","","color","primary",3,"click"]],template:function(t,o){t&1&&(s(0,"h2",0),d(1,"Delete template"),l(),s(2,"div",1),d(3),l(),s(4,"div",2)(5,"button",3),_("click",function(){return o.onNoClick()}),d(6,"No, cancel"),l(),s(7,"button",4),_("click",function(){return o.onYesClick()}),d(8,"Yes, delete!"),l()()),t&2&&(p(3),te("Are you sure you want to delete template ",o.templateName(),"?"))},dependencies:[ve,Ne,Re,W,he],encapsulation:2,changeDetection:0})}return n})();var Xre=(n,i)=>i.compute_id;function Yre(n,i){if(n&1&&(s(0,"button",3)(1,"mat-icon"),d(2,"arrow_back"),l()()),n&2){let e=v();b("routerLink","/controller/"+e.controller.id+"/projects")}}function Kre(n,i){if(n&1){let e=z();s(0,"button",13),_("click",function(){T(e);let o=v();return E(o.openAddDialog())}),s(1,"mat-icon"),d(2,"add_circle_outline"),l()()}}function Zre(n,i){n&1&&(s(0,"div",10),d(1,"Loading..."),l())}function Jre(n,i){n&1&&(s(0,"div",11)(1,"mat-icon",14),d(2,"cloud_off"),l(),s(3,"p"),d(4,"No computes found. Click + to add one."),l()())}function eae(n,i){if(n&1&&(s(0,"span",22)(1,"mat-icon",23),d(2,"memory"),l(),d(3),l(),s(4,"span",22)(5,"mat-icon",23),d(6,"storage"),l(),d(7),l(),s(8,"span",22)(9,"mat-icon",23),d(10,"disc_full"),l(),d(11),l()),n&2){let e=v().$implicit,t=v(2);p(3),te(" ",t.formatPercent(e.cpu_usage_percent)," "),p(4),te(" ",t.formatPercent(e.memory_usage_percent)," "),p(4),te(" ",t.formatPercent(e.disk_usage_percent)," ")}}function tae(n,i){n&1&&(s(0,"span",21),d(1,"Offline"),l())}function nae(n,i){if(n&1){let e=z();s(0,"button",24),_("click",function(o){return o.stopPropagation()}),s(1,"mat-icon"),d(2,"more_vert"),l()(),s(3,"mat-menu",25,0)(5,"button",26),_("click",function(){T(e);let o=v().$implicit,r=v(2);return E(r.openEditDialog(o))}),s(6,"mat-icon"),d(7,"edit"),l(),s(8,"span"),d(9,"Edit"),l()(),s(10,"button",26),_("click",function(){T(e);let o=v().$implicit,r=v(2);return E(r.connectCompute(o))}),s(11,"mat-icon"),d(12,"link"),l(),s(13,"span"),d(14,"Connect"),l()(),s(15,"button",26),_("click",function(){T(e);let o=v().$implicit,r=v(2);return E(r.deleteCompute(o))}),s(16,"mat-icon"),d(17,"delete"),l(),s(18,"span"),d(19,"Delete"),l()()()}if(n&2){let e=Pe(4);b("matMenuTriggerFor",e)}}function iae(n,i){if(n&1&&(s(0,"div",15)(1,"mat-icon",16),d(2),l(),s(3,"div",17)(4,"span",18),d(5),l(),s(6,"span",19),d(7),l()(),s(8,"div",20),A(9,eae,12,3)(10,tae,2,0,"span",21),l(),A(11,nae,20,1),l()),n&2){let e=i.$implicit,t=v(2);p(),yn("color",t.getStatusColor(e)),b("matTooltip",e.connected?"Connected":"Disconnected"),p(),te(" ",t.getStatusIcon(e)," "),p(3),$(e.name||e.compute_id),p(2),$(t.formatHost(e)),p(2),O(e.connected?9:10),p(2),O(e.compute_id!=="local"?11:-1)}}function oae(n,i){if(n&1&&(s(0,"nav",12),Z(1,iae,12,8,"div",15,Xre),l()),n&2){let e=v();p(),J(e.computes())}}var rae=(n,i)=>i.key;function aae(n,i){if(n&1&&(s(0,"mat-option",6),d(1),l()),n&2){let e=i.$implicit;b("value",e.key),p(),$(e.name)}}function sae(n,i){n&1&&(s(0,"mat-error"),d(1,"You must select a protocol"),l())}function lae(n,i){n&1&&(s(0,"mat-error"),d(1,"You must enter a host"),l())}function cae(n,i){n&1&&(s(0,"mat-error"),d(1,"You must enter a port"),l())}function dae(n,i){n&1&&(s(0,"mat-error"),d(1,"Port must be between 1 and 65535"),l())}var PB=(()=>{class n{route=f(rt);controllerService=f(nt);computeService=f(Do);notificationService=f(xc);toasterService=f(ee);dialog=f(ot);cd=f(X);controller;_computes=ce([]);computes=sn(()=>[...this._computes()].sort((t,o)=>t.compute_id==="local"?-1:o.compute_id==="local"?1:(t.name||"").localeCompare(o.name||"")));displayedColumns=["status","name","host","connected","cpu","memory","disk","actions"];loading=ce(!0);subscription=new fo;ngOnInit(){this.loadControllerAndComputes()}ngOnDestroy(){this.subscription.unsubscribe()}loadControllerAndComputes(){let e=this.route.snapshot.paramMap.get("controller_id");this.controllerService.get(parseInt(e,10)).then(t=>{if(this.controller=t,this.cd.markForCheck(),this.notificationService.hasCachedData()){let o=this.notificationService.getCachedComputes();this._computes.set(o),this.loading.set(!1),this.cd.markForCheck()}else this.loadComputes();this.subscription.add(this.notificationService.computeNotificationEmitter.subscribe(o=>{this.handleComputeNotification(o)})),this.subscription.add(this.notificationService.computeCacheUpdated.subscribe(o=>{this._computes.set(o),this.loading.set(!1),this.cd.markForCheck()}))},t=>{let o=t.error?.message||t.message||"Failed to load controller";this.toasterService.error(o),this.loading.set(!1),this.cd.markForCheck()})}handleComputeNotification(e){switch(e.action){case"compute.created":this._computes.update(t=>[...t,e.event]),this.toasterService.success(`Compute "${e.event.name}" added`);break;case"compute.updated":this._computes.update(t=>t.map(o=>o.compute_id===e.event.compute_id?e.event:o));break;case"compute.deleted":this._computes.update(t=>t.filter(o=>o.compute_id!==e.event.compute_id)),this.toasterService.success(`Compute "${e.event.name}" deleted`);break}this.cd.markForCheck()}loadComputes(){this.loading.set(!0),this.computeService.getComputes(this.controller).subscribe({next:e=>{this.notificationService.setInitialComputes(e),this._computes.set(e),this.loading.set(!1),this.cd.markForCheck()},error:e=>{let t=e.error?.message||e.message||"Failed to load computes";this.loading.set(!1),this.toasterService.error(t),this.cd.markForCheck()}})}openAddDialog(){this.dialog.open(DB,{panelClass:["base-dialog-panel","simple-dialog-panel"],autoFocus:!1,disableClose:!0,data:{controller:this.controller}}).afterClosed().subscribe(t=>{t&&this.computeService.createCompute(this.controller,t).subscribe({next:()=>{this.toasterService.success("Compute added successfully"),this.loadComputes()},error:o=>{let r=o.error?.message||o.message||"Failed to add compute";this.toasterService.error(r),this.cd.markForCheck()}})})}openEditDialog(e){this.computeService.getCompute(this.controller,e.compute_id).subscribe({next:t=>{this.dialog.open(DB,{panelClass:["base-dialog-panel","simple-dialog-panel"],autoFocus:!1,disableClose:!0,data:{controller:this.controller,compute:t}}).afterClosed().subscribe(r=>{r&&this.computeService.updateCompute(this.controller,e.compute_id,r).subscribe({next:()=>{this.toasterService.success("Compute updated successfully"),this.loadComputes()},error:a=>{let c=a.error?.message||a.message||"Failed to update compute";this.toasterService.error(c),this.cd.markForCheck()}})})},error:t=>{let o=t.error?.message||t.message||"Failed to load compute details";this.toasterService.error(o),this.cd.markForCheck()}})}deleteCompute(e){this.dialog.open(qm,{panelClass:["base-confirmation-dialog-panel","confirmation-danger-panel"],autoFocus:!1,disableClose:!0,data:{templateName:e.name||e.compute_id}}).afterClosed().subscribe(o=>{o&&this.computeService.deleteCompute(this.controller,e.compute_id).subscribe({next:()=>{this.toasterService.success("Compute deleted successfully"),this.loadComputes()},error:r=>{let a=r.error?.message||r.message||"Failed to delete compute";this.toasterService.error(a),this.cd.markForCheck()}})})}connectCompute(e){this.computeService.connectCompute(this.controller,e.compute_id).subscribe({next:()=>{this.toasterService.success("Connection request sent"),this.computeService.getCompute(this.controller,e.compute_id).subscribe({next:t=>{let o=this.computes().map(r=>r.compute_id===t.compute_id?t:r);this._computes.set(o),this.cd.markForCheck()},error:()=>{this.loadComputes()}})},error:t=>{let o=t.error?.message||t.message||"Failed to connect compute";this.toasterService.error(o),this.cd.markForCheck()}})}getStatusIcon(e){return e.connected?"check_circle":"cancel"}getStatusColor(e){return e.connected?"var(--mat-sys-primary)":"var(--mat-sys-error)"}formatPercent(e){return e!=null?`${e.toFixed(1)}%`:"--"}formatHost(e){return`${e.host}:${e.port}`}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["app-computes"]],decls:15,vars:5,consts:[["menu","matMenu"],[1,"computes"],[1,"computes__header"],["mat-icon-button","",1,"computes__back-btn",3,"routerLink"],[1,"computes__title"],["matTooltip","Add Compute","matTooltipClass","custom-tooltip","mat-icon-button","",1,"computes__add-btn"],[1,"computes__content"],[1,"computes__info"],[1,"computes__info-icon"],[1,"computes__info-text"],[1,"computes__loading"],[1,"computes__empty"],[1,"computes__list"],["matTooltip","Add Compute","matTooltipClass","custom-tooltip","mat-icon-button","",1,"computes__add-btn",3,"click"],[1,"computes__empty-icon"],[1,"computes__list-item"],[1,"computes__list-icon",3,"matTooltip"],[1,"computes__list-info"],[1,"computes__list-name"],[1,"computes__list-host"],[1,"computes__list-stats"],[1,"computes__stat","computes__stat--offline"],[1,"computes__stat"],[1,"computes__stat-icon"],["mat-icon-button","",1,"computes__menu-btn",3,"click","matMenuTriggerFor"],["xPosition","before"],["mat-menu-item","",3,"click"]],template:function(t,o){t&1&&(s(0,"div",1)(1,"header",2),A(2,Yre,3,1,"button",3),s(3,"h1",4),d(4,"Computes"),l(),A(5,Kre,3,0,"button",5),l(),s(6,"main",6)(7,"div",7)(8,"mat-icon",8),d(9,"info"),l(),s(10,"p",9),d(11," Once configured and connected, the backend maintains the connection to Compute nodes automatically. This page is used to add/delete/update node configurations and view node status. "),l()(),A(12,Zre,2,0,"div",10),A(13,Jre,5,0,"div",11),A(14,oae,3,0,"nav",12),l()()),t&2&&(p(2),O(o.controller?2:-1),p(3),O(o.controller?5:-1),p(7),O(o.loading()?12:-1),p(),O(!o.loading()&&!o.computes().length?13:-1),p(),O(!o.loading()&&o.computes().length?14:-1))},dependencies:[ie,pt,mn,W,$e,oe,de,Ge,ii,et,An,Mn,Mt,Ot,ve,we,ye,bt,It],styles:["[_nghost-%COMP%]{display:block;width:100%;background:transparent}.computes__header[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:32px 20px 16px;display:flex;align-items:center;gap:16px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out}.computes__back-btn[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:12px;color:var(--mat-sys-on-surface);transition:all .2s cubic-bezier(.4,0,.2,1)}.computes__back-btn[_ngcontent-%COMP%]:hover{background-color:color-mix(in srgb,var(--mat-sys-on-surface) 8%,transparent)}.computes__title[_ngcontent-%COMP%]{font-size:32px;font-weight:500;color:var(--mat-sys-on-surface);margin:0;padding-bottom:8px}.computes__add-btn[_ngcontent-%COMP%]{margin-left:auto;color:var(--mat-sys-primary)}.computes__content[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:0 20px 20px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out .1s both}.computes__info[_ngcontent-%COMP%]{display:flex;gap:12px;padding:16px;margin-bottom:20px;background:var(--mat-sys-primary-container);border-radius:12px;border-left:4px solid var(--mat-sys-primary);animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out .15s both}.computes__info-icon[_ngcontent-%COMP%]{color:var(--mat-sys-on-primary-container);flex-shrink:0;font-size:20px;width:20px;height:20px}.computes__info-text[_ngcontent-%COMP%]{margin:0;font-size:14px;color:var(--mat-sys-on-primary-container);line-height:1.5}.computes__loading[_ngcontent-%COMP%], .computes__empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;color:var(--mat-sys-on-surface-variant);background:var(--mat-sys-surface);border-radius:16px;box-shadow:0 8px 32px color-mix(in srgb,var(--mat-sys-shadow) 20%,transparent),0 2px 8px color-mix(in srgb,var(--mat-sys-shadow) 10%,transparent)}.computes__empty-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;margin-bottom:16px;color:var(--mat-sys-on-surface-variant)}.computes__list[_ngcontent-%COMP%]{background:var(--mat-sys-surface);border-radius:16px;overflow:hidden;box-shadow:0 8px 32px color-mix(in srgb,var(--mat-sys-shadow) 20%,transparent),0 2px 8px color-mix(in srgb,var(--mat-sys-shadow) 10%,transparent)}.computes__list-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;padding:16px 24px;border-bottom:1px solid var(--mat-sys-outline-variant);transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer}.computes__list-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.computes__list-item[_ngcontent-%COMP%]:hover{background-color:color-mix(in srgb,var(--mat-sys-on-surface) 5%,transparent)}.computes__list-icon[_ngcontent-%COMP%]{flex-shrink:0}.computes__list-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-width:0}.computes__list-name[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:var(--mat-sys-on-surface);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.computes__list-host[_ngcontent-%COMP%]{font-size:13px;color:var(--mat-sys-on-surface-variant)}.computes__list-stats[_ngcontent-%COMP%]{display:flex;gap:16px;flex-shrink:0}.computes__stat[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:13px;color:var(--mat-sys-on-surface)}.computes__stat--offline[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font-style:italic}.computes__stat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:var(--mat-sys-on-surface-variant)}.computes__menu-btn[_ngcontent-%COMP%]{flex-shrink:0}@keyframes _ngcontent-%COMP%_fadeInSlideIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){.computes__header[_ngcontent-%COMP%]{padding:24px 16px 12px;gap:12px}.computes__back-btn[_ngcontent-%COMP%]{width:44px;height:44px}.computes__title[_ngcontent-%COMP%]{font-size:24px}.computes__content[_ngcontent-%COMP%]{padding:0 16px 16px}.computes__list-item[_ngcontent-%COMP%]{padding:14px 16px}.computes__list-stats[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})}return n})(),DB=(()=>{class n{dialogRef=f(Ie);data=f(xt);protocols=[{key:"http",name:"HTTP"},{key:"https",name:"HTTPS"}];computeForm=new xr({name:new Ze(""),protocol:new Ze("http",[Ue.required]),host:new Ze("",[Ue.required]),port:new Ze(3080,[Ue.required,Ue.min(1),Ue.max(65535)]),user:new Ze("gns3"),password:new Ze("gns3")});isEditMode=!1;constructor(){this.data.compute&&(this.isEditMode=!0,this.computeForm.patchValue({name:this.data.compute.name,protocol:this.data.compute.protocol,host:this.data.compute.host,port:this.data.compute.port,user:this.data.compute.user,password:""}))}onSaveClick(){if(!this.computeForm.valid)return;let e=this.computeForm.value,t={protocol:e.protocol,host:e.host,port:e.port,user:e.user||void 0,name:e.name||void 0};e.password&&e.password.trim()!==""&&(t.password=e.password),this.dialogRef.close(t)}onCancelClick(){this.dialogRef.close()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["app-add-compute-dialog"]],decls:39,vars:8,consts:[["mat-dialog-title",""],[3,"formGroup"],["mat-dialog-content",""],["appearance","fill",1,"full-width-field"],["matInput","","tabindex","1","formControlName","name","placeholder","My Compute"],["formControlName","protocol"],[3,"value"],["matInput","","tabindex","1","formControlName","host","placeholder","192.168.1.100"],["matInput","","type","number","tabindex","1","formControlName","port","placeholder","3080"],["matInput","","tabindex","1","formControlName","user","placeholder","gns3"],["matInput","","type","password","tabindex","1","formControlName","password","placeholder","gns3"],["mat-dialog-actions","","align","end"],["mat-button","","tabindex","-1","color","accent",3,"click"],["mat-button","","tabindex","2","mat-raised-button","","color","primary",3,"click","disabled"]],template:function(t,o){t&1&&(s(0,"h2",0),d(1),l(),s(2,"form",1)(3,"div",2)(4,"mat-form-field",3)(5,"mat-label"),d(6,"Name (optional)"),l(),L(7,"input",4),l(),s(8,"mat-form-field",3)(9,"mat-label"),d(10,"Protocol"),l(),s(11,"mat-select",5),Z(12,aae,2,2,"mat-option",6,rae),l(),A(14,sae,2,0,"mat-error"),l(),s(15,"mat-form-field",3)(16,"mat-label"),d(17,"Host"),l(),L(18,"input",7),A(19,lae,2,0,"mat-error"),l(),s(20,"mat-form-field",3)(21,"mat-label"),d(22,"Port"),l(),L(23,"input",8),A(24,cae,2,0,"mat-error"),A(25,dae,2,0,"mat-error"),l(),s(26,"mat-form-field",3)(27,"mat-label"),d(28,"User"),l(),L(29,"input",9),l(),s(30,"mat-form-field",3)(31,"mat-label"),d(32,"Password"),l(),L(33,"input",10),l()(),s(34,"div",11)(35,"button",12),_("click",function(){return o.onCancelClick()}),d(36,"Cancel"),l(),s(37,"button",13),_("click",function(){return o.onSaveClick()}),d(38),l()()()),t&2&&(p(),$(o.isEditMode?"Edit Compute":"Add Compute"),p(),b("formGroup",o.computeForm),p(10),J(o.protocols),p(2),O(o.computeForm.get("protocol").hasError("required")?14:-1),p(5),O(o.computeForm.get("host").hasError("required")?19:-1),p(5),O(o.computeForm.get("port").hasError("required")?24:-1),p(),O(o.computeForm.get("port").hasError("min")||o.computeForm.get("port").hasError("max")?25:-1),p(12),b("disabled",o.computeForm.invalid),p(),te(" ",o.isEditMode?"Update":"Add"," "))},dependencies:[ie,It,st,Ft,yr,At,at,Lt,Vt,ve,Ne,Re,Tt,W,he,we,Te,it,vi,ye,De,bt,Nt,vt],encapsulation:2,changeDetection:0})}return n})();var mae=["*"];var pae=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],uae=["[mat-card-avatar], [matCardAvatar]",`mat-card-title, mat-card-subtitle, + `)),requestAnimationFrame(()=>{this.document.head.appendChild(o)});let r=this.getScrollPosition(),a=new Dr(x=>{let b=this.scrollContainer?this.scrollContainer.elementRef.nativeElement:"window";return this.renderer.listen(b,"scroll",M=>x.next(M))}).pipe(pi(r),Lt(()=>this.getScrollPosition())),c=new He,p=new Hd;this.dragPointerDown.observers.length>0&&this.zone.run(()=>{this.dragPointerDown.next({x:0,y:0})});let u=Hn(this.pointerUp$,this.pointerDown$,p,this.destroy$).pipe(Dl()),h=Pr([this.pointerMove$,a]).pipe(Lt(([x,b])=>({currentDrag$:c,transformX:x.clientX-t.clientX,transformY:x.clientY-t.clientY,clientX:x.clientX,clientY:x.clientY,scrollLeft:b.left,scrollTop:b.top,target:x.event.target})),Lt(x=>(this.dragSnapGrid.x&&(x.transformX=Math.round(x.transformX/this.dragSnapGrid.x)*this.dragSnapGrid.x),this.dragSnapGrid.y&&(x.transformY=Math.round(x.transformY/this.dragSnapGrid.y)*this.dragSnapGrid.y),x)),Lt(x=>(this.dragAxis.x||(x.transformX=0),this.dragAxis.y||(x.transformY=0),x)),Lt(x=>{let b=x.scrollLeft-r.left,M=x.scrollTop-r.top;return it(K({},x),{x:x.transformX+b,y:x.transformY+M})}),ai(({x,y:b,transformX:M,transformY:w})=>!this.validateDrag||this.validateDrag({x,y:b,transform:{x:M,y:w}})),tt(u),Dl()),_=h.pipe(Ao(1),Dl()),S=h.pipe(xO(1),Dl());return _.subscribe(({clientX:x,clientY:b,x:M,y:w})=>{if(this.dragStart.observers.length>0&&this.zone.run(()=>{this.dragStart.next({cancelDrag$:p})}),this.scroller=XR([this.scrollContainer?this.scrollContainer.elementRef.nativeElement:this.document.defaultView],it(K({},this.autoScroll),{autoScroll(){return!0}})),fee(this.renderer,this.element,this.dragActiveClass),this.ghostDragEnabled){let y=this.element.nativeElement.getBoundingClientRect(),E=this.element.nativeElement.cloneNode(!0);if(this.showOriginalElementWhileDragging||this.renderer.setStyle(this.element.nativeElement,"visibility","hidden"),this.ghostElementAppendTo?this.ghostElementAppendTo.appendChild(E):this.element.nativeElement.parentNode.insertBefore(E,this.element.nativeElement.nextSibling),this.ghostElement=E,this.document.body.style.cursor=this.dragCursor,this.setElementStyles(E,{position:"fixed",top:`${y.top}px`,left:`${y.left}px`,width:`${y.width}px`,height:`${y.height}px`,cursor:this.dragCursor,margin:"0",willChange:"transform",pointerEvents:"none"}),this.ghostElementTemplate){let I=this.vcr.createEmbeddedView(this.ghostElementTemplate);E.innerHTML="",I.rootNodes.filter(D=>D instanceof Node).forEach(D=>{E.appendChild(D)}),S.subscribe(()=>{this.vcr.remove(this.vcr.indexOf(I))})}this.ghostElementCreated.observers.length>0&&this.zone.run(()=>{this.ghostElementCreated.emit({clientX:x-M,clientY:b-w,element:E})}),S.subscribe(()=>{E.parentElement.removeChild(E),this.ghostElement=null,this.renderer.setStyle(this.element.nativeElement,"visibility","")})}this.draggableHelper.currentDrag.next(c)}),S.pipe(ic(x=>{let b=p.pipe(_O(),Ao(1),Lt(M=>it(K({},x),{dragCancelled:M>0})));return p.complete(),b})).subscribe(({x,y:b,dragCancelled:M})=>{this.scroller.destroy(),this.dragEnd.observers.length>0&&this.zone.run(()=>{this.dragEnd.next({x,y:b,dragCancelled:M})}),gee(this.renderer,this.element,this.dragActiveClass),c.complete()}),Hn(u,S).pipe(Ao(1)).subscribe(()=>{requestAnimationFrame(()=>{this.document.head.removeChild(o)})}),h}),Dl());Hn(e.pipe(Ao(1),Lt(t=>[,t])),e.pipe(Yv())).pipe(ai(([t,o])=>t?t.x!==o.x||t.y!==o.y:!0),Lt(([t,o])=>o)).subscribe(({x:t,y:o,currentDrag$:r,clientX:a,clientY:c,transformX:p,transformY:u,target:h})=>{this.dragging.observers.length>0&&this.zone.run(()=>{this.dragging.next({x:t,y:o})}),requestAnimationFrame(()=>{if(this.ghostElement){let _=`translate3d(${p}px, ${u}px, 0px)`;this.setElementStyles(this.ghostElement,{transform:_,"-webkit-transform":_,"-ms-transform":_,"-moz-transform":_,"-o-transform":_})}}),r.next({clientX:a,clientY:c,dropData:this.dropData,target:h})})}ngOnChanges(e){e.dragAxis&&this.checkEventListeners()}ngOnDestroy(){this.unsubscribeEventListeners(),this.pointerDown$.complete(),this.pointerMove$.complete(),this.pointerUp$.complete(),this.destroy$.next()}checkEventListeners(){let e=this.canDrag(),t=Object.keys(this.eventListenerSubscriptions).length>0;e&&!t?this.zone.runOutsideAngular(()=>{this.eventListenerSubscriptions.mousedown=this.renderer.listen(this.element.nativeElement,"mousedown",o=>{this.onMouseDown(o)}),this.eventListenerSubscriptions.mouseup=this.renderer.listen("document","mouseup",o=>{this.onMouseUp(o)}),this.eventListenerSubscriptions.touchstart=this.renderer.listen(this.element.nativeElement,"touchstart",o=>{this.onTouchStart(o)}),this.eventListenerSubscriptions.touchend=this.renderer.listen("document","touchend",o=>{this.onTouchEnd(o)}),this.eventListenerSubscriptions.touchcancel=this.renderer.listen("document","touchcancel",o=>{this.onTouchEnd(o)}),this.eventListenerSubscriptions.mouseenter=this.renderer.listen(this.element.nativeElement,"mouseenter",()=>{this.onMouseEnter()}),this.eventListenerSubscriptions.mouseleave=this.renderer.listen(this.element.nativeElement,"mouseleave",()=>{this.onMouseLeave()})}):!e&&t&&this.unsubscribeEventListeners()}onMouseDown(e){e.button===0&&(this.eventListenerSubscriptions.mousemove||(this.eventListenerSubscriptions.mousemove=this.renderer.listen("document","mousemove",t=>{this.pointerMove$.next({event:t,clientX:t.clientX,clientY:t.clientY})})),this.pointerDown$.next({event:e,clientX:e.clientX,clientY:e.clientY}))}onMouseUp(e){e.button===0&&(this.eventListenerSubscriptions.mousemove&&(this.eventListenerSubscriptions.mousemove(),delete this.eventListenerSubscriptions.mousemove),this.pointerUp$.next({event:e,clientX:e.clientX,clientY:e.clientY}))}onTouchStart(e){let t,o,r;if(this.touchStartLongPress&&(this.timeLongPress.timerBegin=Date.now(),o=!1,r=this.hasScrollbar(),t=this.getScrollPosition()),!this.eventListenerSubscriptions.touchmove){let a=sr(this.document,"contextmenu").subscribe(p=>{p.preventDefault()}),c=sr(this.document,"touchmove",{passive:!1}).subscribe(p=>{this.touchStartLongPress&&!o&&r&&(o=this.shouldBeginDrag(e,p,t)),(!this.touchStartLongPress||!r||o)&&(p.preventDefault(),this.pointerMove$.next({event:p,clientX:p.targetTouches[0].clientX,clientY:p.targetTouches[0].clientY}))});this.eventListenerSubscriptions.touchmove=()=>{a.unsubscribe(),c.unsubscribe()}}this.pointerDown$.next({event:e,clientX:e.touches[0].clientX,clientY:e.touches[0].clientY})}onTouchEnd(e){this.eventListenerSubscriptions.touchmove&&(this.eventListenerSubscriptions.touchmove(),delete this.eventListenerSubscriptions.touchmove,this.touchStartLongPress&&this.enableScroll()),this.pointerUp$.next({event:e,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY})}onMouseEnter(){this.setCursor(this.dragCursor)}onMouseLeave(){this.setCursor("")}canDrag(){return this.dragAxis.x||this.dragAxis.y}setCursor(e){this.eventListenerSubscriptions.mousemove||this.renderer.setStyle(this.element.nativeElement,"cursor",e)}unsubscribeEventListeners(){Object.keys(this.eventListenerSubscriptions).forEach(e=>{this.eventListenerSubscriptions[e](),delete this.eventListenerSubscriptions[e]})}setElementStyles(e,t){Object.keys(t).forEach(o=>{this.renderer.setStyle(e,o,t[o])})}getScrollElement(){return this.scrollContainer?this.scrollContainer.elementRef.nativeElement:this.document.body}getScrollPosition(){return this.scrollContainer?{top:this.scrollContainer.elementRef.nativeElement.scrollTop,left:this.scrollContainer.elementRef.nativeElement.scrollLeft}:{top:window.pageYOffset||this.document.documentElement.scrollTop,left:window.pageXOffset||this.document.documentElement.scrollLeft}}shouldBeginDrag(e,t,o){let r=this.getScrollPosition(),a={top:Math.abs(r.top-o.top),left:Math.abs(r.left-o.left)},c=Math.abs(t.targetTouches[0].clientX-e.touches[0].clientX)-a.left,p=Math.abs(t.targetTouches[0].clientY-e.touches[0].clientY)-a.top,u=c+p,h=this.touchStartLongPress;return(u>h.delta||a.top>0||a.left>0)&&(this.timeLongPress.timerBegin=Date.now()),this.timeLongPress.timerEnd=Date.now(),this.timeLongPress.timerEnd-this.timeLongPress.timerBegin>=h.delay?(this.disableScroll(),!0):!1}enableScroll(){this.scrollContainer&&this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement,"overflow",""),this.renderer.setStyle(this.document.body,"overflow","")}disableScroll(){this.scrollContainer&&this.renderer.setStyle(this.scrollContainer.elementRef.nativeElement,"overflow","hidden"),this.renderer.setStyle(this.document.body,"overflow","hidden")}hasScrollbar(){let e=this.getScrollElement(),t=e.scrollWidth>e.clientWidth,o=e.scrollHeight>e.clientHeight;return t||o}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275dir=ft({type:n,selectors:[["","mwlDraggable",""]],inputs:{dropData:"dropData",dragAxis:"dragAxis",dragSnapGrid:"dragSnapGrid",ghostDragEnabled:"ghostDragEnabled",showOriginalElementWhileDragging:"showOriginalElementWhileDragging",validateDrag:"validateDrag",dragCursor:"dragCursor",dragActiveClass:"dragActiveClass",ghostElementAppendTo:"ghostElementAppendTo",ghostElementTemplate:"ghostElementTemplate",touchStartLongPress:"touchStartLongPress",autoScroll:"autoScroll"},outputs:{dragPointerDown:"dragPointerDown",dragStart:"dragStart",ghostElementCreated:"ghostElementCreated",dragging:"dragging",dragEnd:"dragEnd"},features:[bn]})}}return n})();var Bb=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=Ht({type:n})}static{this.\u0275inj=$t({})}}return n})();var M0=class{constructor(i){this.rawFile=i;let e=i instanceof HTMLInputElement?i.value:i;this[`_createFrom${typeof e=="string"?"FakePath":"Object"}`](e)}_createFromFakePath(i){this.lastModifiedDate=void 0,this.size=void 0,this.type=`like/${i.slice(i.lastIndexOf(".")+1).toLowerCase()}`,this.name=i.slice(i.lastIndexOf("/")+i.lastIndexOf("\\")+2)}_createFromObject(i){this.size=i.size,this.type=i.type,this.name=i.name}},BD=class{constructor(i,e,t){this.url="/",this.headers=[],this.withCredentials=!0,this.formData=[],this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.uploader=i,this.some=e,this.options=t,this.file=new M0(e),this._file=e,i.options&&(this.method=i.options.method||"POST",this.alias=i.options.itemAlias||"file"),this.url=i.options.url}upload(){try{this.uploader.uploadItem(this)}catch{this.uploader._onCompleteItem(this,"",0,{}),this.uploader._onErrorItem(this,"",0,{})}}cancel(){this.uploader.cancelItem(this)}remove(){this.uploader.removeFromQueue(this)}onBeforeUpload(){}onBuildForm(i){return{form:i}}onProgress(i){return{progress:i}}onSuccess(i,e,t){return{response:i,status:e,headers:t}}onError(i,e,t){return{response:i,status:e,headers:t}}onCancel(i,e,t){return{response:i,status:e,headers:t}}onComplete(i,e,t){return{response:i,status:e,headers:t}}_onBeforeUpload(){this.isReady=!0,this.isUploading=!0,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.onBeforeUpload()}_onBuildForm(i){this.onBuildForm(i)}_onProgress(i){this.progress=i,this.onProgress(i)}_onSuccess(i,e,t){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!0,this.isCancel=!1,this.isError=!1,this.progress=100,this.index=void 0,this.onSuccess(i,e,t)}_onError(i,e,t){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!1,this.isCancel=!1,this.isError=!0,this.progress=0,this.index=void 0,this.onError(i,e,t)}_onCancel(i,e,t){this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!0,this.isError=!1,this.progress=0,this.index=void 0,this.onCancel(i,e,t)}_onComplete(i,e,t){this.onComplete(i,e,t),this.uploader.options.removeAfterUpload&&this.remove()}_prepareToUploading(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0}},vee=(()=>{class n{static getMimeClass(e){let t="application";return e?.type&&this.mime_psd.indexOf(e.type)!==-1||e?.type?.match("image.*")?t="image":e?.type?.match("video.*")?t="video":e?.type?.match("audio.*")?t="audio":e?.type==="application/pdf"?t="pdf":e?.type&&this.mime_compress.indexOf(e.type)!==-1?t="compress":e?.type&&this.mime_doc.indexOf(e.type)!==-1?t="doc":e?.type&&this.mime_xsl.indexOf(e.type)!==-1?t="xls":e?.type&&this.mime_ppt.indexOf(e.type)!==-1&&(t="ppt"),t==="application"&&e?.name&&(t=this.fileTypeDetection(e.name)),t}static fileTypeDetection(e){let t={jpg:"image",jpeg:"image",tif:"image",psd:"image",bmp:"image",png:"image",nef:"image",tiff:"image",cr2:"image",dwg:"image",cdr:"image",ai:"image",indd:"image",pin:"image",cdp:"image",skp:"image",stp:"image","3dm":"image",mp3:"audio",wav:"audio",wma:"audio",mod:"audio",m4a:"audio",compress:"compress",zip:"compress",rar:"compress","7z":"compress",lz:"compress",z01:"compress",bz2:"compress",gz:"compress",pdf:"pdf",xls:"xls",xlsx:"xls",ods:"xls",mp4:"video",avi:"video",wmv:"video",mpg:"video",mts:"video",flv:"video","3gp":"video",vob:"video",m4v:"video",mpeg:"video",m2ts:"video",mov:"video",doc:"doc",docx:"doc",eps:"doc",txt:"doc",odt:"doc",rtf:"doc",ppt:"ppt",pptx:"ppt",pps:"ppt",ppsx:"ppt",odp:"ppt"},o=e.split(".");if(o.length<2)return"application";let r=o[o.length-1].toLowerCase();return t[r]===void 0?"application":t[r]}}return n.mime_doc=["application/msword","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/vnd.ms-word.document.macroEnabled.12","application/vnd.ms-word.template.macroEnabled.12"],n.mime_xsl=["application/vnd.ms-excel","application/vnd.ms-excel","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/vnd.ms-excel.sheet.macroEnabled.12","application/vnd.ms-excel.template.macroEnabled.12","application/vnd.ms-excel.addin.macroEnabled.12","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],n.mime_ppt=["application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.presentationml.template","application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/vnd.ms-powerpoint.addin.macroEnabled.12","application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],n.mime_psd=["image/photoshop","image/x-photoshop","image/psd","application/photoshop","application/psd","zz-application/zz-winassoc-psd"],n.mime_compress=["application/x-gtar","application/x-gcompress","application/compress","application/x-tar","application/x-rar-compressed","application/octet-stream","application/x-zip-compressed","application/zip-compressed","application/x-7z-compressed","application/gzip","application/x-bzip2"],n})();function Cee(n){return File&&n instanceof File}var $a=class{constructor(i){this.isUploading=!1,this.queue=[],this.progress=0,this._nextIndex=0,this.options={autoUpload:!1,isHTML5:!0,filters:[],removeAfterUpload:!1,disableMultipart:!1,formatDataFunction:e=>e._file,formatDataFunctionIsAsync:!1,url:""},this.setOptions(i),this.response=new ve}setOptions(i){this.options=Object.assign(this.options,i),this.authToken=this.options.authToken,this.authTokenHeader=this.options.authTokenHeader||"Authorization",this.autoUpload=this.options.autoUpload,this.options.filters?.unshift({name:"queueLimit",fn:this._queueLimitFilter}),this.options.maxFileSize&&this.options.filters?.unshift({name:"fileSize",fn:this._fileSizeFilter}),this.options.allowedFileType&&this.options.filters?.unshift({name:"fileType",fn:this._fileTypeFilter}),this.options.allowedMimeType&&this.options.filters?.unshift({name:"mimeType",fn:this._mimeTypeFilter});for(let e=0;e{o||(o=this.options);let h=new M0(u);if(this._isValidFile(h,a,o)){let _=new BD(this,u,o);p.push(_),this.queue.push(_),this._onAfterAddingFile(_)}else if(this._failFilterIndex){let _=a[this._failFilterIndex];this._onWhenAddingFileFailed(h,_,o)}}),this.queue.length!==c&&(this._onAfterAddingAll(p),this.progress=this._getTotalProgress()),this._render(),this.options.autoUpload&&this.uploadAll()}removeFromQueue(i){let e=this.getIndexOfItem(i),t=this.queue[e];t.isUploading&&t.cancel(),this.queue.splice(e,1),this.progress=this._getTotalProgress()}clearQueue(){for(;this.queue.length;)this.queue[0].remove();this.progress=0}uploadItem(i){let e=this.getIndexOfItem(i),t=this.queue[e],o=this.options.isHTML5?"_xhrTransport":"_iframeTransport";t._prepareToUploading(),!this.isUploading&&(this.isUploading=!0,this[o](t))}cancelItem(i){let e=this.getIndexOfItem(i),t=this.queue[e],o=this.options.isHTML5?t._xhr:t._form;t&&t.isUploading&&o.abort()}uploadAll(){let i=this.getNotUploadedItems().filter(e=>!e.isUploading);i.length&&(i.map(e=>e._prepareToUploading()),i[0].upload())}cancelAll(){this.getNotUploadedItems().map(e=>e.cancel())}isFile(i){return Cee(i)}isFileLikeObject(i){return i instanceof M0}getIndexOfItem(i){return typeof i=="number"?i:this.queue.indexOf(i)}getNotUploadedItems(){return this.queue.filter(i=>!i.isUploaded)}getReadyItems(){return this.queue.filter(i=>i.isReady&&!i.isUploading).sort((i,e)=>i.index-e.index)}onAfterAddingAll(i){return{fileItems:i}}onBuildItemForm(i,e){return{fileItem:i,form:e}}onAfterAddingFile(i){return{fileItem:i}}onWhenAddingFileFailed(i,e,t){return{item:i,filter:e,options:t}}onBeforeUploadItem(i){return{fileItem:i}}onProgressItem(i,e){return{fileItem:i,progress:e}}onProgressAll(i){return{progress:i}}onSuccessItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onErrorItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onCancelItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onCompleteItem(i,e,t,o){return{item:i,response:e,status:t,headers:o}}onCompleteAll(){}_mimeTypeFilter(i){return!(i?.type&&this.options.allowedMimeType&&this.options.allowedMimeType?.indexOf(i.type)===-1)}_fileSizeFilter(i){return!(this.options.maxFileSize&&i.size>this.options.maxFileSize)}_fileTypeFilter(i){return!(this.options.allowedFileType&&this.options.allowedFileType.indexOf(vee.getMimeClass(i))===-1)}_onErrorItem(i,e,t,o){i._onError(e,t,o),this.onErrorItem(i,e,t,o)}_onCompleteItem(i,e,t,o){i._onComplete(e,t,o),this.onCompleteItem(i,e,t,o);let r=this.getReadyItems()[0];if(this.isUploading=!1,r){r.upload();return}this.onCompleteAll(),this.progress=this._getTotalProgress(),this._render()}_headersGetter(i){return e=>e?i[e.toLowerCase()]||void 0:i}_xhrTransport(i){let e=this,t=i._xhr=new XMLHttpRequest,o;if(this._onBeforeUploadItem(i),typeof i._file.size!="number")throw new TypeError("The file specified is no longer valid");if(this.options.disableMultipart)this.options.formatDataFunction&&(o=this.options.formatDataFunction(i));else{o=new FormData,this._onBuildItemForm(i,o);let r=()=>o.append(i.alias,i._file,i.file.name);this.options.parametersBeforeFiles||r(),this.options.additionalParameter!==void 0&&Object.keys(this.options.additionalParameter).forEach(a=>{let c=this.options.additionalParameter?.[a];typeof c=="string"&&c.indexOf("{{file_name}}")>=0&&i.file?.name&&(c=c.replace("{{file_name}}",i.file.name)),o.append(a,c)}),r&&this.options.parametersBeforeFiles&&r()}if(t.upload.onprogress=r=>{let a=Math.round(r.lengthComputable?r.loaded*100/r.total:0);this._onProgressItem(i,a)},t.onload=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),a=this._transformResponse(t.response,r),p=`_on${this._isSuccessCode(t.status)?"Success":"Error"}Item`;this[p](i,a,t.status,r),this._onCompleteItem(i,a,t.status,r)},t.onerror=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),a=this._transformResponse(t.response,r);this._onErrorItem(i,a,t.status,r),this._onCompleteItem(i,a,t.status,r)},t.onabort=()=>{let r=this._parseHeaders(t.getAllResponseHeaders()),a=this._transformResponse(t.response,r);this._onCancelItem(i,a,t.status,r),this._onCompleteItem(i,a,t.status,r)},i.method&&i.url&&t.open(i.method,i.url,!0),t.withCredentials=i.withCredentials,this.options.headers)for(let r of this.options.headers)t.setRequestHeader(r.name,r.value);if(i.headers.length)for(let r of i.headers)t.setRequestHeader(r.name,r.value);this.authToken&&this.authTokenHeader&&t.setRequestHeader(this.authTokenHeader,this.authToken),t.onreadystatechange=function(){t.readyState==XMLHttpRequest.DONE&&e.response.emit(t.responseText)},this.options.formatDataFunctionIsAsync?o.then(r=>t.send(JSON.stringify(r))):t.send(o),this._render()}_getTotalProgress(i=0){if(this.options.removeAfterUpload)return i;let e=this.getNotUploadedItems().length,t=e?this.queue.length-e:this.queue.length,o=100/this.queue.length,r=i*o/100;return Math.round(t*o+r)}_getFilters(i){if(!i)return this.options?.filters||[];if(Array.isArray(i))return i;if(typeof i=="string"){let e=i.match(/[^\s,]+/g);return this.options?.filters||[].filter(t=>e?.indexOf(t.name)!==-1)}return this.options?.filters||[]}_render(){}_queueLimitFilter(){return this.options.queueLimit===void 0||this.queue.length(this._failFilterIndex&&this._failFilterIndex++,o.fn.call(this,i,t))):!0}_isSuccessCode(i){return i>=200&&i<300||i===304}_transformResponse(i,e){return i}_parseHeaders(i){let e={},t,o,r;return i&&i.split(` +`).map(a=>{r=a.indexOf(":"),t=a.slice(0,r).trim().toLowerCase(),o=a.slice(r+1).trim(),t&&(e[t]=e[t]?e[t]+", "+o:o)}),e}_onWhenAddingFileFailed(i,e,t){this.onWhenAddingFileFailed(i,e,t)}_onAfterAddingFile(i){this.onAfterAddingFile(i)}_onAfterAddingAll(i){this.onAfterAddingAll(i)}_onBeforeUploadItem(i){i._onBeforeUpload(),this.onBeforeUploadItem(i)}_onBuildItemForm(i,e){i._onBuildForm(e),this.onBuildItemForm(i,e)}_onProgressItem(i,e){let t=this._getTotalProgress(e);this.progress=t,i._onProgress(e),this.onProgressItem(i,e),this.onProgressAll(t),this._render()}_onSuccessItem(i,e,t,o){i._onSuccess(e,t,o),this.onSuccessItem(i,e,t,o)}_onCancelItem(i,e,t,o){i._onCancel(e,t,o),this.onCancelItem(i,e,t,o)}};var Ac=(()=>{class n{constructor(e){this.onFileSelected=new ve,this.element=e}getOptions(){return this.uploader?.options}getFilters(){return""}isEmptyAfterSelection(){return!!this.element.nativeElement.attributes.multiple}onChange(){let e=this.element.nativeElement.files,t=this.getOptions(),o=this.getFilters();this.uploader?.addToQueue(e,t,o),this.onFileSelected.emit(e),this.isEmptyAfterSelection()&&(this.element.nativeElement.value="")}}return n.\u0275fac=function(e){return new(e||n)(ot(Zt))},n.\u0275dir=ft({type:n,selectors:[["","ng2FileSelect",""]],hostBindings:function(e,t){e&1&&g("change",function(){return t.onChange()})},inputs:{uploader:"uploader"},outputs:{onFileSelected:"onFileSelected"},standalone:!1}),n})(),sl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ht({type:n}),n.\u0275inj=$t({imports:[ne]}),n})();var du=class{visible;error;clear;constructor(i,e,t=!1){this.visible=i,this.error=e,this.clear=t}},no=(()=>{class n{state=new an(new du(!1));constructor(){}setError(e){this.state.next(new du(!1,e.error))}clear(){this.state.next(new du(!1,null,!0))}activate(){this.state.next(new du(!0))}deactivate(){this.state.next(new du(!1))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();function bee(n,i){n&1&&(s(0,"div",1),R(1,"mat-spinner",3),l())}function xee(n,i){if(n&1){let e=z();s(0,"div",2)(1,"div",4)(2,"mat-icon"),d(3,"error_outline"),l()(),s(4,"div"),d(5),l(),s(6,"div")(7,"button",5),g("click",function(){k(e);let o=v(2);return T(o.refresh())}),s(8,"mat-icon"),d(9,"refresh"),l()(),s(10,"button",6)(11,"mat-icon"),d(12,"home"),l()()()()}if(n&2){let e,t=v(2);m(5),ee("Error occurred: ",(e=t.error())==null?null:e.message)}}function yee(n,i){if(n&1&&(s(0,"div",0),A(1,bee,2,0,"div",1),A(2,xee,13,1,"div",2),l()),n&2){let e=v();m(),O(e.visible()&&!e.error()?1:-1),m(),O(e.error()?2:-1)}}var xm=(()=>{class n{progressService=f(no);router=f(ht);visible=ae(!1);error=ae(null);routerSubscription;ngOnInit(){this.progressService.state.subscribe(e=>{this.visible.set(e.visible),e.error&&!this.error()&&this.error.set(e.error),e.clear&&this.error.set(null)}),this.routerSubscription=this.router.events.subscribe(()=>{this.progressService.clear()})}refresh(){this.router.navigateByUrl(this.router.url)}ngOnDestroy(){this.routerSubscription.unsubscribe()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["app-progress"]],decls:1,vars:1,consts:[[1,"overlay"],[1,"loading-spinner"],[1,"error-state"],["color","primary"],[1,"error-icon"],["mat-button","","matTooltip","Refresh page","matTooltipClass","custom-tooltip",3,"click"],["mat-button","","routerLink","/","matTooltip","Go to home","matTooltipClass","custom-tooltip"]],template:function(t,o){t&1&&A(0,yee,3,2,"div",0),t&2&&O(o.visible()||o.error()?0:-1)},dependencies:[ne,pn,li,ie,de,W,pe,wt,It,vn],styles:[".overlay[_ngcontent-%COMP%]{position:fixed;width:100%;height:100%;inset:0;background-color:color-mix(in srgb,var(--mat-sys-shadow) 50%,transparent);z-index:2000}.loading-spinner[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.error-state[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{text-align:center}.error-icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:64px;width:64px;height:64px}"],changeDetection:0})}return n})();var zb=(()=>{class n{document;router=f(ht);controllerService=f(Je);progressService=f(no);constructor(e){this.document=e}ngOnInit(){this.progressService.activate(),setTimeout(()=>{let e;parseInt(this.document.location.port,10)?e=parseInt(this.document.location.port,10):this.document.location.protocol=="https:"?e=443:e=80,this.controllerService.getLocalController(this.document.location.hostname,e).then(t=>{this.router.navigate(["/controller",t.id,"projects"]),this.progressService.deactivate()})},100)}static \u0275fac=function(t){return new(t||n)(ot(Xi))};static \u0275cmp=F({type:n,selectors:[["app-bundled-controller-finder"]],decls:1,vars:0,template:function(t,o){t&1&&R(0,"app-progress")},dependencies:[xm],encapsulation:2,changeDetection:0})}return n})();var See=["mat-menu-item",""],wee=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],Mee=["mat-icon, [matMenuItemIcon]","*"];function kee(n,i){n&1&&(ei(),s(0,"svg",2),R(1,"polygon",3),l())}var Tee=["*"];function Eee(n,i){if(n&1){let e=z();vo(0,"div",0),Jv("click",function(){k(e);let o=v();return T(o.closed.emit("click"))})("animationstart",function(o){k(e);let r=v();return T(r._onAnimationStart(o.animationName))})("animationend",function(o){k(e);let r=v();return T(r._onAnimationDone(o.animationName))})("animationcancel",function(o){k(e);let r=v();return T(r._onAnimationDone(o.animationName))}),vo(1,"div",1),on(2),wo()()}if(n&2){let e=v();er(e._classList),Be("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),Wo("id",e.panelId),qt("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var jD=new cn("MAT_MENU_PANEL"),Ze=(()=>{class n{_elementRef=f(Zt);_document=f(Xi);_focusMonitor=f(Aa);_parentMenu=f(jD,{optional:!0});_changeDetectorRef=f(Q);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new He;_focused=new He;_highlighted=!1;_triggersSubmenu=!1;constructor(){f(cr).load(ia),this._parentMenu?.addItem?.(this)}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),t=e.querySelectorAll("mat-icon, .material-icons");for(let o=0;o{class n{_template=f(Oo);_appRef=f(TO);_injector=f(Jo);_viewContainerRef=f(oo);_document=f(Xi);_changeDetectorRef=f(Q);_portal;_outlet;_attached=new He;constructor(){}attach(e={}){this._portal||(this._portal=new pd(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new e4(this._document.createElement("div"),this._appRef,this._injector));let t=this._template.elementRef.nativeElement;t.parentNode.insertBefore(this._outlet.outletElement,t),this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,e),this._attached.next()}detach(){this._portal?.isAttached&&this._portal.detach()}ngOnDestroy(){this.detach(),this._outlet?.dispose()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["ng-template","matMenuContent",""]],features:[fn([{provide:JR,useExisting:n}])]})}return n})(),Dee=new cn("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),zD="_mat-menu-enter",jb="_mat-menu-exit",Qn=(()=>{class n{_elementRef=f(Zt);_changeDetectorRef=f(Q);_injector=f(Jo);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=qo();_allItems;_directDescendantItems=new Il;_classList={};_panelAnimationState="void";_animationDone=new He;_isAnimating=ae(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;set panelClass(e){let t=this._previousPanelClass,o=K({},this._classList);t&&t.length&&t.split(" ").forEach(r=>{o[r]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(r=>{o[r]=!0}),this._elementRef.nativeElement.className=""),this._classList=o}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new ve;close=this.closed;panelId=f(Mo).getId("mat-menu-panel-");constructor(){let e=f(Dee);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Gd(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(pi(this._directDescendantItems),Un(e=>Hn(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let o=e.toArray(),r=Math.max(0,Math.min(o.length-1,t.activeItemIndex||0));o[r]&&!o[r].disabled?t.setActiveItem(r):t.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(pi(this._directDescendantItems),Un(t=>Hn(...t.map(o=>o._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,o=this._keyManager;switch(t){case 27:fa(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Xa(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(e).setFirstItemActive(),!o.activeItem&&t&&t.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=it(K({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let t=e===jb;(t||e===zD)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===zD||e===jb)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(jb),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?zD:jb)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(pi(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["mat-menu"]],contentQueries:function(t,o,r){if(t&1&&Ki(r,JR,5)(r,Ze,5)(r,Ze,4),t&2){let a;mt(a=pt())&&(o.lazyContent=a.first),mt(a=pt())&&(o._allItems=a),mt(a=pt())&&(o.items=a)}},viewQuery:function(t,o){if(t&1&&xn(Oo,5),t&2){let r;mt(r=pt())&&(o.templateRef=r.first)}},hostVars:3,hostBindings:function(t,o){t&2&&qt("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",Ct],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:Ct(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[fn([{provide:jD,useExisting:n}])],ngContentSelectors:Tee,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,o){t&1&&(ii(),ju(0,Eee,3,12,"ng-template"))},styles:[`mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{border-top-color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none} +`],encapsulation:2,changeDetection:0})}return n})(),Pee=new cn("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let n=f(Jo);return()=>pC(n)}});var Kh=new WeakMap,Iee=(()=>{class n{_canHaveBackdrop;_element=f(Zt);_viewContainerRef=f(oo);_menuItemInstance=f(Ze,{optional:!0,self:!0});_dir=f(Ka,{optional:!0});_focusMonitor=f(Aa);_ngZone=f(Vi);_injector=f(Jo);_scrollStrategy=f(Pee);_changeDetectorRef=f(Q);_animationsDisabled=qo();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=So.EMPTY;_menuCloseSubscription=So.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(t=>{this._destroyMenu(t),(t==="click"||t==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(t)})),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal=null;constructor(e){this._canHaveBackdrop=e;let t=f(jD,{optional:!0});this._parentMaterialMenu=t instanceof Qn?t:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&Kh.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){if(this._triggerIsAriaDisabled())return;let t=this._menu;if(this._menuOpen||!t)return;this._pendingRemoval?.unsubscribe();let o=Kh.get(t);Kh.set(t,this),o&&o!==this&&o._closeMenu();let r=this._createOverlay(t),a=r.getConfig(),c=a.positionStrategy;this._setPosition(t,c),this._canHaveBackdrop?a.hasBackdrop=t.hasBackdrop==null?!this._triggersSubmenu():t.hasBackdrop:a.hasBackdrop=t.hasBackdrop??!1,r.hasAttached()||(r.attach(this._getPortal(t)),t.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),t.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,e&&t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),t instanceof Qn&&(t._setIsOpen(!0),t._directDescendantItems.changes.pipe(tt(t.close)).subscribe(()=>{c.withLockedPosition(!1).reapplyLastPosition(),c.withLockedPosition(!0)}))}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}_destroyMenu(e){let t=this._overlayRef,o=this._menu;!t||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),o instanceof Qn&&this._ownsMenu(o)?(this._pendingRemoval=o._animationDone.pipe(Ao(1)).subscribe(()=>{t.detach(),Kh.has(o)||o.lazyContent?.detach()}),o._setIsOpen(!1)):(t.detach(),o?.lazyContent?.detach()),o&&this._ownsMenu(o)&&Kh.delete(o),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let t=this._getOverlayConfig(e);this._subscribeToPositions(e,t.positionStrategy),this._overlayRef=fC(this._injector,t),this._overlayRef.keydownEvents().subscribe(o=>{this._menu instanceof Qn&&this._menu._handleKeydown(o)})}return this._overlayRef}_getOverlayConfig(e){return new uC({positionStrategy:hC(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,t){e.setPositionClasses&&t.positionChanges.subscribe(o=>{this._ngZone.run(()=>{let r=o.connectionPair.overlayX==="start"?"after":"before",a=o.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(r,a)})})}_setPosition(e,t){let[o,r]=e.xPosition==="before"?["end","start"]:["start","end"],[a,c]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[p,u]=[a,c],[h,_]=[o,r],S=0;if(this._triggersSubmenu()){if(_=o=e.xPosition==="before"?"start":"end",r=h=o==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let x=this._parentMaterialMenu.items.first;this._parentInnerPadding=x?x._getHostElement().offsetTop:0}S=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(p=a==="top"?"bottom":"top",u=c==="top"?"bottom":"top");t.withPositions([{originX:o,originY:p,overlayX:h,overlayY:a,offsetY:S},{originX:r,originY:p,overlayX:_,overlayY:a,offsetY:S},{originX:o,originY:u,overlayX:h,overlayY:c,offsetY:-S},{originX:r,originY:u,overlayX:_,overlayY:c,offsetY:-S}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),t=this._overlayRef.detachments(),o=this._parentMaterialMenu?this._parentMaterialMenu.closed:Nn(),r=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(ai(a=>this._menuOpen&&a!==this._menuItemInstance)):Nn();return Hn(e,o,r,t)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new pd(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return Kh.get(e)===this}_triggerIsAriaDisabled(){return Ct(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(t){MO()};static \u0275dir=ft({type:n})}return n})(),Fn=(()=>{class n extends Iee{_cleanupTouchstart;_hoverSubscription=So.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new ve;onMenuOpen=this.menuOpened;menuClosed=new ve;onMenuClose=this.menuClosed;constructor(){super(!0);let e=f(Si);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",t=>{dC(t)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){cC(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let t=e.keyCode;(t===13||t===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(t===39&&this.dir==="ltr"||t===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&this._parentMaterialMenu?._panelAnimationState!=="void"&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(t,o){t&1&&g("click",function(a){return o._handleClick(a)})("mousedown",function(a){return o._handleMousedown(a)})("keydown",function(a){return o._handleKeydown(a)}),t&2&&qt("aria-haspopup",o.menu?"menu":null)("aria-expanded",o.menuOpen)("aria-controls",o.menuOpen?o.menu==null?null:o.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[si]})}return n})();var Ge=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[mc,Qu,hi,md]})}return n})();var Aee=[[["caption"]],[["colgroup"],["col"]],"*"],Oee=["caption","colgroup, col","*"];function Nee(n,i){n&1&&on(0,2)}function Fee(n,i){n&1&&(s(0,"thead",0),ro(1,1),l(),s(2,"tbody",2),ro(3,3)(4,4),l(),s(5,"tfoot",0),ro(6,5),l())}function Ree(n,i){n&1&&ro(0,1)(1,3)(2,4)(3,5)}var Sn=(()=>{class n extends JE{stickyCssClass="mat-mdc-table-sticky";needsPositionStickyOnElement=!1;static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275cmp=F({type:n,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(t,o){t&2&&Be("mat-table-fixed-layout",o.fixedLayout)},exportAs:["matTable"],features:[fn([{provide:JE,useExisting:n},{provide:Vl,useExisting:n},{provide:h0,useValue:null}]),si],ngContentSelectors:Oee,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,o){t&1&&(ii(Aee),on(0),on(1,1),A(2,Nee,1,0),A(3,Fee,7,0)(4,Ree,4,0)),t&2&&(m(2),O(o._isServer?2:-1),m(),O(o._isNativeHtmlTable?3:4))},dependencies:[KE,XE,ZE,YE],styles:[`.mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:var(--mat-table-header-container-height, 56px)}mat-row{min-height:var(--mat-table-row-item-container-height, 52px)}mat-footer-row{min-height:var(--mat-table-footer-container-height, 52px)}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-sys-surface))}.mat-table-fixed-layout{table-layout:fixed}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:start;text-overflow:ellipsis}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-sys-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:start}.mdc-data-table__row:last-child>.mat-mdc-header-cell{border-bottom:none}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child>.mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch} +`],encapsulation:2})}return n})(),wn=(()=>{class n extends hb{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matCellDef",""]],features:[fn([{provide:hb,useExisting:n}]),si]})}return n})(),Mn=(()=>{class n extends fb{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matHeaderCellDef",""]],features:[fn([{provide:fb,useExisting:n}]),si]})}return n})();var kn=(()=>{class n extends Cm{get name(){return this._name}set name(e){this._setNameInput(e)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matColumnDef",""]],inputs:{name:[0,"matColumnDef","name"]},features:[fn([{provide:Cm,useExisting:n}]),si]})}return n})(),Tn=(()=>{class n extends $6{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],features:[si]})}return n})();var En=(()=>{class n extends H6{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],features:[si]})}return n})();var Dn=(()=>{class n extends f0{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[0,"matHeaderRowDef","columns"],sticky:[2,"matHeaderRowDefSticky","sticky",Ct]},features:[fn([{provide:f0,useExisting:n}]),si]})}return n})();var Pn=(()=>{class n extends gb{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["","matRowDef",""]],inputs:{columns:[0,"matRowDefColumns","columns"],when:[0,"matRowDefWhen","when"]},features:[fn([{provide:gb,useExisting:n}]),si]})}return n})(),In=(()=>{class n extends qE{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275cmp=F({type:n,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],features:[fn([{provide:qE,useExisting:n}]),si],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&ro(0,0)},dependencies:[nu],encapsulation:2})}return n})();var An=(()=>{class n extends QE{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275cmp=F({type:n,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],features:[fn([{provide:QE,useExisting:n}]),si],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,o){t&1&&ro(0,0)},dependencies:[nu],encapsulation:2})}return n})();var hn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[_b,hi]})}return n})(),Lee=9007199254740991,pr=class extends cd{_data;_renderData=new an([]);_filter=new an("");_internalPageChanges=new He;_renderChangesSubscription=null;filteredData;get data(){return this._data.value}set data(i){i=Array.isArray(i)?i:[],this._data.next(i),this._renderChangesSubscription||this._filterData(i)}get filter(){return this._filter.value}set filter(i){this._filter.next(i),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(i){this._sort=i,this._updateChangeSubscription()}_sort;get paginator(){return this._paginator}set paginator(i){this._paginator=i,this._updateChangeSubscription()}_paginator;sortingDataAccessor=(i,e)=>{let t=i[e];if(WO(t)){let o=Number(t);return o{let t=e.active,o=e.direction;return!t||o==""?i:i.sort((r,a)=>{let c=this.sortingDataAccessor(r,t),p=this.sortingDataAccessor(a,t),u=typeof c,h=typeof p;u!==h&&(u==="number"&&(c+=""),h==="number"&&(p+=""));let _=0;return c!=null&&p!=null?c>p?_=1:c{let t=e.trim().toLowerCase();return Object.values(i).some(o=>`${o}`.toLowerCase().includes(t))};constructor(i=[]){super(),this._data=new an(i),this._updateChangeSubscription()}_updateChangeSubscription(){let i=this._sort?Hn(this._sort.sortChange,this._sort.initialized):Nn(null),e=this._paginator?Hn(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Nn(null),t=this._data,o=Pr([t,this._filter]).pipe(Lt(([c])=>this._filterData(c))),r=Pr([o,i]).pipe(Lt(([c])=>this._orderData(c))),a=Pr([r,e]).pipe(Lt(([c])=>this._pageData(c)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=a.subscribe(c=>this._renderData.next(c))}_filterData(i){return this.filteredData=this.filter==null||this.filter===""?i:i.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(i){return this.sort?this.sortData(i.slice(),this.sort):i}_pageData(i){if(!this.paginator)return i;let e=this.paginator.pageIndex*this.paginator.pageSize;return i.slice(e,e+this.paginator.pageSize)}_updatePaginator(i){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=i,e.pageIndex>0)){let t=Math.ceil(e.length/e.pageSize)-1||0,o=Math.min(e.pageIndex,t);o!==e.pageIndex&&(e.pageIndex=o,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}};var Vee=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms} +`],encapsulation:2,changeDetection:0})}return n})(),Bee={passive:!0},t8=(()=>{class n{_platform=f($s);_ngZone=f(Vi);_renderer=f(sd).createRenderer(null,null);_styleLoader=f(cr);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return Lu;this._styleLoader.load(Vee);let t=Al(e),o=this._monitoredElements.get(t);if(o)return o.subject;let r=new He,a="cdk-text-field-autofilled",c=u=>{u.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(a)?(t.classList.add(a),this._ngZone.run(()=>r.next({target:u.target,isAutofilled:!0}))):u.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(a)&&(t.classList.remove(a),this._ngZone.run(()=>r.next({target:u.target,isAutofilled:!1})))},p=this._ngZone.runOutsideAngular(()=>(t.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(t,"animationstart",c,Bee)));return this._monitoredElements.set(t,{subject:r,unlisten:p}),r}stopMonitoring(e){let t=Al(e),o=this._monitoredElements.get(t);o&&(o.unlisten(),o.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var n8=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({})}return n})();var i8=new cn("MAT_INPUT_VALUE_ACCESSOR");var zee=["button","checkbox","file","hidden","image","radio","range","reset","submit"],jee=new cn("MAT_INPUT_CONFIG"),Ee=(()=>{class n{_elementRef=f(Zt);_platform=f($s);ngControl=f(_C,{optional:!0,self:!0});_autofillMonitor=f(t8);_ngZone=f(Vi);_formField=f(Zu,{optional:!0});_renderer=f(Si);_uid=f(Mo).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder=null;_errorStateTracker;_config=f(jee,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer=!1;_isNativeSelect=!1;_isTextarea=!1;_isInFormField=!1;focused=!1;stateChanges=new He;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=wC(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(Ue.required)??!1}set required(e){this._required=wC(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&mk().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=wC(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>mk().has(e));constructor(){let e=f(Gn,{optional:!0}),t=f(Rt,{optional:!0}),o=f(fd),r=f(i8,{optional:!0,self:!0}),a=this._elementRef.nativeElement,c=a.nodeName.toLowerCase();r?kO(r.value)?this._signalBasedValueAccessor=r:this._inputValueAccessor=r:this._inputValueAccessor=a,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(a,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new TC(o,this.ngControl,t,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=c==="select",this._isTextarea=c==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=a.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&ha(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let t=this._elementRef.nativeElement;t.type==="number"?(t.type="text",t.setSelectionRange(0,0),t.type="number"):t.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){zee.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let t=e.target;!t.value&&t.selectionStart===0&&t.selectionEnd===0&&(t.setSelectionRange(1,1),t.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(t,o){t&1&&g("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),t&2&&(Wo("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),qt("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),Be("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Ct]},exportAs:["matInput"],features:[fn([{provide:kC,useExisting:n}]),bn]})}return n})(),Se=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[we,we,n8,hi]})}return n})();var Sm=(()=>{class n{data;dialogRef=f(Ie);templateName=ae("");constructor(e){this.data=e,this.templateName.set(e.templateName)}onNoClick(){this.dialogRef.close(!1)}onYesClick(){this.dialogRef.close(!0)}static \u0275fac=function(t){return new(t||n)(ot(gt))};static \u0275cmp=F({type:n,selectors:[["app-delete-confirmation-dialog"]],decls:9,vars:1,consts:[["mat-dialog-title",""],[1,"mat-mdc-dialog-content"],["mat-dialog-actions",""],["mat-button","",3,"click"],["mat-button","","tabindex","2","mat-raised-button","","color","primary",3,"click"]],template:function(t,o){t&1&&(s(0,"h2",0),d(1,"Delete template"),l(),s(2,"div",1),d(3),l(),s(4,"div",2)(5,"button",3),g("click",function(){return o.onNoClick()}),d(6,"No, cancel"),l(),s(7,"button",4),g("click",function(){return o.onYesClick()}),d(8,"Yes, delete!"),l()()),t&2&&(m(3),ee("Are you sure you want to delete template ",o.templateName(),"?"))},dependencies:[_e,Ne,Fe,W,pe],encapsulation:2,changeDetection:0})}return n})();var $ee=(n,i)=>i.compute_id;function Hee(n,i){if(n&1&&(s(0,"button",3)(1,"mat-icon"),d(2,"arrow_back"),l()()),n&2){let e=v();C("routerLink","/controller/"+e.controller.id+"/projects")}}function Uee(n,i){if(n&1){let e=z();s(0,"button",13),g("click",function(){k(e);let o=v();return T(o.openAddDialog())}),s(1,"mat-icon"),d(2,"add_circle_outline"),l()()}}function Gee(n,i){n&1&&(s(0,"div",10),d(1,"Loading..."),l())}function Wee(n,i){n&1&&(s(0,"div",11)(1,"mat-icon",14),d(2,"cloud_off"),l(),s(3,"p"),d(4,"No computes found. Click + to add one."),l()())}function qee(n,i){if(n&1&&(s(0,"span",22)(1,"mat-icon",23),d(2,"memory"),l(),d(3),l(),s(4,"span",22)(5,"mat-icon",23),d(6,"storage"),l(),d(7),l(),s(8,"span",22)(9,"mat-icon",23),d(10,"disc_full"),l(),d(11),l()),n&2){let e=v().$implicit,t=v(2);m(3),ee(" ",t.formatPercent(e.cpu_usage_percent)," "),m(4),ee(" ",t.formatPercent(e.memory_usage_percent)," "),m(4),ee(" ",t.formatPercent(e.disk_usage_percent)," ")}}function Qee(n,i){n&1&&(s(0,"span",21),d(1,"Offline"),l())}function Xee(n,i){if(n&1){let e=z();s(0,"button",24),g("click",function(o){return o.stopPropagation()}),s(1,"mat-icon"),d(2,"more_vert"),l()(),s(3,"mat-menu",25,0)(5,"button",26),g("click",function(){k(e);let o=v().$implicit,r=v(2);return T(r.openEditDialog(o))}),s(6,"mat-icon"),d(7,"edit"),l(),s(8,"span"),d(9,"Edit"),l()(),s(10,"button",26),g("click",function(){k(e);let o=v().$implicit,r=v(2);return T(r.connectCompute(o))}),s(11,"mat-icon"),d(12,"link"),l(),s(13,"span"),d(14,"Connect"),l()(),s(15,"button",26),g("click",function(){k(e);let o=v().$implicit,r=v(2);return T(r.deleteCompute(o))}),s(16,"mat-icon"),d(17,"delete"),l(),s(18,"span"),d(19,"Delete"),l()()()}if(n&2){let e=Pe(4);C("matMenuTriggerFor",e)}}function Kee(n,i){if(n&1&&(s(0,"div",15)(1,"mat-icon",16),d(2),l(),s(3,"div",17)(4,"span",18),d(5),l(),s(6,"span",19),d(7),l()(),s(8,"div",20),A(9,qee,12,3)(10,Qee,2,0,"span",21),l(),A(11,Xee,20,1),l()),n&2){let e=i.$implicit,t=v(2);m(),nn("color",t.getStatusColor(e)),C("matTooltip",e.connected?"Connected":"Disconnected"),m(),ee(" ",t.getStatusIcon(e)," "),m(3),j(e.name||e.compute_id),m(2),j(t.formatHost(e)),m(2),O(e.connected?9:10),m(2),O(e.compute_id!=="local"?11:-1)}}function Yee(n,i){if(n&1&&(s(0,"nav",12),Y(1,Kee,12,8,"div",15,$ee),l()),n&2){let e=v();m(),Z(e.computes())}}var Zee=(n,i)=>i.key;function Jee(n,i){if(n&1&&(s(0,"mat-option",6),d(1),l()),n&2){let e=i.$implicit;C("value",e.key),m(),j(e.name)}}function ete(n,i){n&1&&(s(0,"mat-error"),d(1,"You must select a protocol"),l())}function tte(n,i){n&1&&(s(0,"mat-error"),d(1,"You must enter a host"),l())}function nte(n,i){n&1&&(s(0,"mat-error"),d(1,"You must enter a port"),l())}function ite(n,i){n&1&&(s(0,"mat-error"),d(1,"Port must be between 1 and 65535"),l())}var r8=(()=>{class n{route=f(lt);controllerService=f(Je);computeService=f(ko);notificationService=f(Ws);toasterService=f(te);dialog=f(nt);cd=f(Q);controller;_computes=ae([]);computes=Jt(()=>[...this._computes()].sort((t,o)=>t.compute_id==="local"?-1:o.compute_id==="local"?1:(t.name||"").localeCompare(o.name||"")));displayedColumns=["status","name","host","connected","cpu","memory","disk","actions"];loading=ae(!0);subscription=new So;ngOnInit(){this.loadControllerAndComputes()}ngOnDestroy(){this.subscription.unsubscribe()}loadControllerAndComputes(){let e=this.route.snapshot.paramMap.get("controller_id");this.controllerService.get(parseInt(e,10)).then(t=>{if(this.controller=t,this.cd.markForCheck(),this.notificationService.hasCachedData()){let o=this.notificationService.getCachedComputes();this._computes.set(o),this.loading.set(!1),this.cd.markForCheck()}else this.loadComputes();this.subscription.add(this.notificationService.computeNotificationEmitter.subscribe(o=>{this.handleComputeNotification(o)})),this.subscription.add(this.notificationService.computeCacheUpdated.subscribe(o=>{this._computes.set(o),this.loading.set(!1),this.cd.markForCheck()}))},t=>{let o=t.error?.message||t.message||"Failed to load controller";this.toasterService.error(o),this.loading.set(!1),this.cd.markForCheck()})}handleComputeNotification(e){switch(e.action){case"compute.created":this._computes.update(t=>[...t,e.event]),this.toasterService.success(`Compute "${e.event.name}" added`);break;case"compute.updated":this._computes.update(t=>t.map(o=>o.compute_id===e.event.compute_id?e.event:o));break;case"compute.deleted":this._computes.update(t=>t.filter(o=>o.compute_id!==e.event.compute_id)),this.toasterService.success(`Compute "${e.event.name}" deleted`);break}this.cd.markForCheck()}loadComputes(){this.loading.set(!0),this.computeService.getComputes(this.controller).subscribe({next:e=>{this.notificationService.setInitialComputes(e),this._computes.set(e),this.loading.set(!1),this.cd.markForCheck()},error:e=>{let t=e.error?.message||e.message||"Failed to load computes";this.loading.set(!1),this.toasterService.error(t),this.cd.markForCheck()}})}openAddDialog(){this.dialog.open(o8,{panelClass:["base-dialog-panel","simple-dialog-panel"],autoFocus:!1,disableClose:!0,data:{controller:this.controller}}).afterClosed().subscribe(t=>{t&&this.computeService.createCompute(this.controller,t).subscribe({next:()=>{this.toasterService.success("Compute added successfully"),this.loadComputes()},error:o=>{let r=o.error?.message||o.message||"Failed to add compute";this.toasterService.error(r),this.cd.markForCheck()}})})}openEditDialog(e){this.computeService.getCompute(this.controller,e.compute_id).subscribe({next:t=>{this.dialog.open(o8,{panelClass:["base-dialog-panel","simple-dialog-panel"],autoFocus:!1,disableClose:!0,data:{controller:this.controller,compute:t}}).afterClosed().subscribe(r=>{r&&this.computeService.updateCompute(this.controller,e.compute_id,r).subscribe({next:()=>{this.toasterService.success("Compute updated successfully"),this.loadComputes()},error:a=>{let c=a.error?.message||a.message||"Failed to update compute";this.toasterService.error(c),this.cd.markForCheck()}})})},error:t=>{let o=t.error?.message||t.message||"Failed to load compute details";this.toasterService.error(o),this.cd.markForCheck()}})}deleteCompute(e){this.dialog.open(Sm,{panelClass:["base-confirmation-dialog-panel","confirmation-danger-panel"],autoFocus:!1,disableClose:!0,data:{templateName:e.name||e.compute_id}}).afterClosed().subscribe(o=>{o&&this.computeService.deleteCompute(this.controller,e.compute_id).subscribe({next:()=>{this.toasterService.success("Compute deleted successfully"),this.loadComputes()},error:r=>{let a=r.error?.message||r.message||"Failed to delete compute";this.toasterService.error(a),this.cd.markForCheck()}})})}connectCompute(e){this.computeService.connectCompute(this.controller,e.compute_id).subscribe({next:()=>{this.toasterService.success("Connection request sent"),this.computeService.getCompute(this.controller,e.compute_id).subscribe({next:t=>{let o=this.computes().map(r=>r.compute_id===t.compute_id?t:r);this._computes.set(o),this.cd.markForCheck()},error:()=>{this.loadComputes()}})},error:t=>{let o=t.error?.message||t.message||"Failed to connect compute";this.toasterService.error(o),this.cd.markForCheck()}})}getStatusIcon(e){return e.connected?"check_circle":"cancel"}getStatusColor(e){return e.connected?"var(--mat-sys-primary)":"var(--mat-sys-error)"}formatPercent(e){return e!=null?`${e.toFixed(1)}%`:"--"}formatHost(e){return`${e.host}:${e.port}`}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["app-computes"]],decls:15,vars:5,consts:[["menu","matMenu"],[1,"computes"],[1,"computes__header"],["mat-icon-button","",1,"computes__back-btn",3,"routerLink"],[1,"computes__title"],["matTooltip","Add Compute","matTooltipClass","custom-tooltip","mat-icon-button","",1,"computes__add-btn"],[1,"computes__content"],[1,"computes__info"],[1,"computes__info-icon"],[1,"computes__info-text"],[1,"computes__loading"],[1,"computes__empty"],[1,"computes__list"],["matTooltip","Add Compute","matTooltipClass","custom-tooltip","mat-icon-button","",1,"computes__add-btn",3,"click"],[1,"computes__empty-icon"],[1,"computes__list-item"],[1,"computes__list-icon",3,"matTooltip"],[1,"computes__list-info"],[1,"computes__list-name"],[1,"computes__list-host"],[1,"computes__list-stats"],[1,"computes__stat","computes__stat--offline"],[1,"computes__stat"],[1,"computes__stat-icon"],["mat-icon-button","",1,"computes__menu-btn",3,"click","matMenuTriggerFor"],["xPosition","before"],["mat-menu-item","",3,"click"]],template:function(t,o){t&1&&(s(0,"div",1)(1,"header",2),A(2,Hee,3,1,"button",3),s(3,"h1",4),d(4,"Computes"),l(),A(5,Uee,3,0,"button",5),l(),s(6,"main",6)(7,"div",7)(8,"mat-icon",8),d(9,"info"),l(),s(10,"p",9),d(11," Once configured and connected, the backend maintains the connection to Compute nodes automatically. This page is used to add/delete/update node configurations and view node status. "),l()(),A(12,Gee,2,0,"div",10),A(13,Wee,5,0,"div",11),A(14,Yee,3,0,"nav",12),l()()),t&2&&(m(2),O(o.controller?2:-1),m(3),O(o.controller?5:-1),m(7),O(o.loading()?12:-1),m(),O(!o.loading()&&!o.computes().length?13:-1),m(),O(!o.loading()&&o.computes().length?14:-1))},dependencies:[ne,dt,vn,W,je,ie,de,Ge,Qn,Ze,Fn,hn,wt,It,_e,we,Se,vt,Dt],styles:["[_nghost-%COMP%]{display:block;width:100%;background:transparent}.computes__header[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:32px 20px 16px;display:flex;align-items:center;gap:16px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out}.computes__back-btn[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:12px;color:var(--mat-sys-on-surface);transition:all .2s cubic-bezier(.4,0,.2,1)}.computes__back-btn[_ngcontent-%COMP%]:hover{background-color:color-mix(in srgb,var(--mat-sys-on-surface) 8%,transparent)}.computes__title[_ngcontent-%COMP%]{font-size:32px;font-weight:500;color:var(--mat-sys-on-surface);margin:0;padding-bottom:8px}.computes__add-btn[_ngcontent-%COMP%]{margin-left:auto;color:var(--mat-sys-primary)}.computes__content[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:0 20px 20px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out .1s both}.computes__info[_ngcontent-%COMP%]{display:flex;gap:12px;padding:16px;margin-bottom:20px;background:var(--mat-sys-primary-container);border-radius:12px;border-left:4px solid var(--mat-sys-primary);animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out .15s both}.computes__info-icon[_ngcontent-%COMP%]{color:var(--mat-sys-on-primary-container);flex-shrink:0;font-size:20px;width:20px;height:20px}.computes__info-text[_ngcontent-%COMP%]{margin:0;font-size:14px;color:var(--mat-sys-on-primary-container);line-height:1.5}.computes__loading[_ngcontent-%COMP%], .computes__empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;color:var(--mat-sys-on-surface-variant);background:var(--mat-sys-surface);border-radius:16px;box-shadow:0 8px 32px color-mix(in srgb,var(--mat-sys-shadow) 20%,transparent),0 2px 8px color-mix(in srgb,var(--mat-sys-shadow) 10%,transparent)}.computes__empty-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;margin-bottom:16px;color:var(--mat-sys-on-surface-variant)}.computes__list[_ngcontent-%COMP%]{background:var(--mat-sys-surface);border-radius:16px;overflow:hidden;box-shadow:0 8px 32px color-mix(in srgb,var(--mat-sys-shadow) 20%,transparent),0 2px 8px color-mix(in srgb,var(--mat-sys-shadow) 10%,transparent)}.computes__list-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;padding:16px 24px;border-bottom:1px solid var(--mat-sys-outline-variant);transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer}.computes__list-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.computes__list-item[_ngcontent-%COMP%]:hover{background-color:color-mix(in srgb,var(--mat-sys-on-surface) 5%,transparent)}.computes__list-icon[_ngcontent-%COMP%]{flex-shrink:0}.computes__list-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-width:0}.computes__list-name[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:var(--mat-sys-on-surface);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.computes__list-host[_ngcontent-%COMP%]{font-size:13px;color:var(--mat-sys-on-surface-variant)}.computes__list-stats[_ngcontent-%COMP%]{display:flex;gap:16px;flex-shrink:0}.computes__stat[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:13px;color:var(--mat-sys-on-surface)}.computes__stat--offline[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant);font-style:italic}.computes__stat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:var(--mat-sys-on-surface-variant)}.computes__menu-btn[_ngcontent-%COMP%]{flex-shrink:0}@keyframes _ngcontent-%COMP%_fadeInSlideIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){.computes__header[_ngcontent-%COMP%]{padding:24px 16px 12px;gap:12px}.computes__back-btn[_ngcontent-%COMP%]{width:44px;height:44px}.computes__title[_ngcontent-%COMP%]{font-size:24px}.computes__content[_ngcontent-%COMP%]{padding:0 16px 16px}.computes__list-item[_ngcontent-%COMP%]{padding:14px 16px}.computes__list-stats[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})}return n})(),o8=(()=>{class n{dialogRef=f(Ie);data=f(gt);protocols=[{key:"http",name:"HTTP"},{key:"https",name:"HTTPS"}];computeForm=new gr({name:new Ye(""),protocol:new Ye("http",[Ue.required]),host:new Ye("",[Ue.required]),port:new Ye(3080,[Ue.required,Ue.min(1),Ue.max(65535)]),user:new Ye("gns3"),password:new Ye("gns3")});isEditMode=!1;constructor(){this.data.compute&&(this.isEditMode=!0,this.computeForm.patchValue({name:this.data.compute.name,protocol:this.data.compute.protocol,host:this.data.compute.host,port:this.data.compute.port,user:this.data.compute.user,password:""}))}onSaveClick(){if(!this.computeForm.valid)return;let e=this.computeForm.value,t={protocol:e.protocol,host:e.host,port:e.port,user:e.user||void 0,name:e.name||void 0};e.password&&e.password.trim()!==""&&(t.password=e.password),this.dialogRef.close(t)}onCancelClick(){this.dialogRef.close()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["app-add-compute-dialog"]],decls:39,vars:8,consts:[["mat-dialog-title",""],[3,"formGroup"],["mat-dialog-content",""],["appearance","fill",1,"full-width-field"],["matInput","","tabindex","1","formControlName","name","placeholder","My Compute"],["formControlName","protocol"],[3,"value"],["matInput","","tabindex","1","formControlName","host","placeholder","192.168.1.100"],["matInput","","type","number","tabindex","1","formControlName","port","placeholder","3080"],["matInput","","tabindex","1","formControlName","user","placeholder","gns3"],["matInput","","type","password","tabindex","1","formControlName","password","placeholder","gns3"],["mat-dialog-actions","","align","end"],["mat-button","","tabindex","-1","color","accent",3,"click"],["mat-button","","tabindex","2","mat-raised-button","","color","primary",3,"click","disabled"]],template:function(t,o){t&1&&(s(0,"h2",0),d(1),l(),s(2,"form",1)(3,"div",2)(4,"mat-form-field",3)(5,"mat-label"),d(6,"Name (optional)"),l(),R(7,"input",4),l(),s(8,"mat-form-field",3)(9,"mat-label"),d(10,"Protocol"),l(),s(11,"mat-select",5),Y(12,Jee,2,2,"mat-option",6,Zee),l(),A(14,ete,2,0,"mat-error"),l(),s(15,"mat-form-field",3)(16,"mat-label"),d(17,"Host"),l(),R(18,"input",7),A(19,tte,2,0,"mat-error"),l(),s(20,"mat-form-field",3)(21,"mat-label"),d(22,"Port"),l(),R(23,"input",8),A(24,nte,2,0,"mat-error"),A(25,ite,2,0,"mat-error"),l(),s(26,"mat-form-field",3)(27,"mat-label"),d(28,"User"),l(),R(29,"input",9),l(),s(30,"mat-form-field",3)(31,"mat-label"),d(32,"Password"),l(),R(33,"input",10),l()(),s(34,"div",11)(35,"button",12),g("click",function(){return o.onCancelClick()}),d(36,"Cancel"),l(),s(37,"button",13),g("click",function(){return o.onSaveClick()}),d(38),l()()()),t&2&&(m(),j(o.isEditMode?"Edit Compute":"Add Compute"),m(),C("formGroup",o.computeForm),m(10),Z(o.protocols),m(2),O(o.computeForm.get("protocol").hasError("required")?14:-1),m(5),O(o.computeForm.get("host").hasError("required")?19:-1),m(5),O(o.computeForm.get("port").hasError("required")?24:-1),m(),O(o.computeForm.get("port").hasError("min")||o.computeForm.get("port").hasError("max")?25:-1),m(12),C("disabled",o.computeForm.invalid),m(),ee(" ",o.isEditMode?"Update":"Add"," "))},dependencies:[ne,Dt,at,Ft,_r,Pt,rt,Rt,zt,_e,Ne,Fe,bt,W,pe,we,Me,et,fi,Se,Ee,vt,At,_t],encapsulation:2,changeDetection:0})}return n})();var ote=["*"];var rte=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],ate=["[mat-card-avatar], [matCardAvatar]",`mat-card-title, mat-card-subtitle, [mat-card-title], [mat-card-subtitle], - [matCardTitle], [matCardSubtitle]`,"*"],hae=new jt("MAT_CARD_CONFIG"),kn=(()=>{class n{appearance;constructor(){let e=f(hae,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(t,o){t&2&&ze("mat-mdc-card-outlined",o.appearance==="outlined")("mdc-card--outlined",o.appearance==="outlined")("mat-mdc-card-filled",o.appearance==="filled")("mdc-card--filled",o.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:mae,decls:1,vars:0,template:function(t,o){t&1&&(ri(),rn(0))},styles:[`.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-elevated-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mat-card-outlined-container-color, var(--mat-sys-surface));border-radius:var(--mat-card-outlined-container-shape, var(--mat-sys-corner-medium));border-width:var(--mat-card-outlined-outline-width, 1px);border-color:var(--mat-card-outlined-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mat-card-outlined-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mat-mdc-card-filled{background-color:var(--mat-card-filled-container-color, var(--mat-sys-surface-container-highest));border-radius:var(--mat-card-filled-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-filled-container-elevation, var(--mat-sys-level0))}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end} -`],encapsulation:2,changeDetection:0})}return n})(),Wc=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"]})}return n})();var vl=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}return n})();var Ty=(()=>{class n{align="start";static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(t,o){t&2&&ze("mat-mdc-card-actions-align-end",o.align==="end")},inputs:{align:"align"},exportAs:["matCardActions"]})}return n})(),qc=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],ngContentSelectors:uae,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(t,o){t&1&&(ri(pae),rn(0),yo(1,"div",0),rn(2,1),To(),rn(3,2))},encapsulation:2,changeDetection:0})}return n})();var kt=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({imports:[_i]})}return n})();var Qm=(()=>{class n{dataChange=new zt([]);constructor(){}get data(){return this.dataChange.value}addController(e){let t=this.data.slice();t.push(e),this.dataChange.next(t)}addControllers(e){this.dataChange.next(e)}remove(e){let t=this.data.indexOf(e);t>=0&&(this.data.splice(t,1),this.dataChange.next(this.data.slice()))}find(e){return this.data.find(t=>t.name===e)}findById(e){return this.data.find(t=>t.id===e)}findIndex(e){return this.data.findIndex(t=>t.name===e)}findIndexById(e){return this.data.findIndex(t=>t.id===e)}update(e){let t=this.findIndexById(e.id);t>=0&&(this.data[t]=e,this.dataChange.next(this.data.slice()))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac})}return n})();var IB=(n,i)=>i.key;function fae(n,i){n&1&&(s(0,"mat-error"),d(1,"You must enter a value"),l())}function gae(n,i){if(n&1&&(s(0,"mat-option",9),d(1),l()),n&2){let e=i.$implicit;b("value",e.key),p(),te(" ",e.name," ")}}function _ae(n,i){if(n&1&&(s(0,"mat-option",9),d(1),l()),n&2){let e=i.$implicit;b("value",e.key),p(),te(" ",e.name," ")}}var Ey=(()=>{class n{controllerService=f(nt);controllerDatabase=f(Qm);route=f(rt);router=f(ut);toasterService=f(ee);cdr=f(X);controllerOptionsVisibility=ce(!1);controllerIp;controllerPort;projectId;protocols=[{key:"http:",name:"HTTP"},{key:"https:",name:"HTTPS"}];locations=[{key:"local",name:"Local"},{key:"remote",name:"Remote"}];controllerForm=new xr({name:new Ze("",[Ue.required]),location:new Ze(""),protocol:new Ze("http:")});constructor(){}async ngOnInit(){this.controllerService.isServiceInitialized&&this.getControllers(),this.controllerService.serviceInitialized.subscribe(async e=>{e&&this.getControllers()})}async getControllers(){this.controllerIp=this.route.snapshot.paramMap.get("controller_ip"),this.controllerPort=+this.route.snapshot.paramMap.get("controller_port"),this.projectId=this.route.snapshot.paramMap.get("project_id");try{let t=(await this.controllerService.findAll()).filter(o=>o.host===this.controllerIp&&o.port===this.controllerPort)[0];t?this.router.navigate(["/controller",t.id,"project",this.projectId]):(this.controllerOptionsVisibility.set(!0),this.cdr.markForCheck())}catch(e){let t=e.error?.message||e.message||"Failed to load controllers";this.toasterService.error(t),this.cdr.markForCheck()}}createController(){if(!this.controllerForm.get("name").hasError&&!this.controllerForm.get("location").hasError&&!this.controllerForm.get("protocol").hasError){this.toasterService.error("Please use correct values");return}let e=new Q5;e.host=this.controllerIp,e.port=this.controllerPort,e.name=this.controllerForm.get("name").value,e.location=this.controllerForm.get("location").value,e.protocol=this.controllerForm.get("protocol").value,this.controllerService.create(e).then(t=>{this.router.navigate(["/controller",t.id,"project",this.projectId])},t=>{let o=t.error?.message||t.message||"Failed to create controller";this.toasterService.error(o),this.cdr.markForCheck()})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["app-direct-link"]],decls:22,vars:3,consts:[[1,"content",3,"hidden"],[1,"default-header"],[1,"row"],[1,"col"],[1,"default-content"],[1,"matCard"],[3,"formGroup"],["matInput","","tabindex","1","formControlName","name","placeholder","Name"],["placeholder","Location","formControlName","location"],[3,"value"],["placeholder","Protocol","formControlName","protocol"],[1,"buttons-bar"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,o){t&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),d(4,"Add new controller"),l()()(),s(5,"div",4)(6,"mat-card",5)(7,"form",6)(8,"mat-form-field"),L(9,"input",7),A(10,fae,2,0,"mat-error"),l(),s(11,"mat-form-field")(12,"mat-select",8),Z(13,gae,2,2,"mat-option",9,IB),l()(),s(15,"mat-form-field")(16,"mat-select",10),Z(17,_ae,2,2,"mat-option",9,IB),l()()()(),s(19,"div",11)(20,"button",12),_("click",function(){return o.createController()}),d(21,"Add controller"),l()()()()),t&2&&(b("hidden",!o.controllerOptionsVisibility()),p(7),b("formGroup",o.controllerForm),p(3),O(o.controllerForm.get("name").hasError("required")?10:-1),p(3),J(o.locations),p(4),J(o.protocols))},dependencies:[ie,It,st,Ft,At,at,Lt,Vt,pt,kt,kn,we,Te,vi,ye,De,bt,Nt,vt,Fo,W,he],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})}return n})();var o3=new jt("CdkAccordion"),AB=(()=>{class n{_stateChanges=new je;_openCloseAllActions=new je;id=f(Eo).getId("cdk-accordion-");multi=!1;openAll(){this.multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(e){this._stateChanges.next(e)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[2,"multi","multi",gt]},exportAs:["cdkAccordion"],features:[Cn([{provide:o3,useExisting:n}]),dn]})}return n})(),OB=(()=>{class n{accordion=f(o3,{optional:!0,skipSelf:!0});_changeDetectorRef=f(X);_expansionDispatcher=f(kh);_openCloseAllSubscription=fo.EMPTY;closed=new _e;opened=new _e;destroyed=new _e;expandedChange=new _e;id=f(Eo).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let t=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,t)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=ce(!1);_removeUniqueSelectionListener=()=>{};constructor(){}ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,t)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===t&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",gt],disabled:[2,"disabled","disabled",gt]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Cn([{provide:o3,useValue:void 0}])]})}return n})(),Dy=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({})}return n})();var vae=["body"],Cae=["bodyWrapper"],bae=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],xae=["mat-expansion-panel-header","*","mat-action-row"];function yae(n,i){}var Sae=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],wae=["mat-panel-title","mat-panel-description","*"];function Mae(n,i){n&1&&(yo(0,"span",1),ni(),yo(1,"svg",2),Ps(2,"path",3),To()())}var r3=new jt("MAT_ACCORDION"),NB=new jt("MAT_EXPANSION_PANEL"),kae=(()=>{class n{_template=f(zo);_expansionPanel=f(NB,{optional:!0});constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]})}return n})(),RB=new jt("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),Vd=(()=>{class n extends OB{_viewContainerRef=f(to);_animationsDisabled=Qo();_document=f(qi);_ngZone=f(Ii);_elementRef=f(Yt);_renderer=f(hi);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new _e;afterCollapse=new _e;_inputChanges=new je;accordion=f(r3,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=f(Eo).getId("mat-expansion-panel-header-");constructor(){super();let e=f(RB,{optional:!0});this._expansionDispatcher=f(kh),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(ci(null),Kn(()=>this.expanded&&!this._portal),Wi(1)).subscribe(()=>{this._portal=new dm(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,t=this._body.nativeElement;return e===t||t.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:t})=>{e===this._bodyWrapper?.nativeElement&&t==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["mat-expansion-panel"]],contentQueries:function(t,o,r){if(t&1&&Hi(r,kae,5),t&2){let a;dt(a=mt())&&(o._lazyContent=a.first)}},viewQuery:function(t,o){if(t&1&&xn(vae,5)(Cae,5),t&2){let r;dt(r=mt())&&(o._body=r.first),dt(r=mt())&&(o._bodyWrapper=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(t,o){t&2&&ze("mat-expanded",o.expanded)("mat-expansion-panel-spacing",o._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",gt],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[Cn([{provide:r3,useValue:void 0},{provide:NB,useExisting:n}]),di,dn],ngContentSelectors:xae,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,o){t&1&&(ri(bae),rn(0),s(1,"div",2,0)(3,"div",3,1)(5,"div",4),rn(6,1),Se(7,yae,0,0,"ng-template",5),l(),rn(8,2),l()()),t&2&&(p(),Wt("inert",o.expanded?null:""),p(2),b("id",o.id),Wt("aria-labelledby",o._headerId),p(4),b("cdkPortalOutlet",o._portal))},dependencies:[xh],styles:[`.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden}.mat-expansion-panel.mat-expansion-panel-animations-enabled{transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel{position:relative;background:var(--mat-expansion-container-background-color, var(--mat-sys-surface));color:var(--mat-expansion-container-text-color, var(--mat-sys-on-surface));border-radius:var(--mat-expansion-container-shape, 12px)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:var(--mat-expansion-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape, 12px);border-top-left-radius:var(--mat-expansion-container-shape, 12px)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape, 12px);border-bottom-left-radius:var(--mat-expansion-container-shape, 12px)}@media(forced-colors: active){.mat-expansion-panel{outline:solid 1px}}.mat-expansion-panel-content-wrapper{display:grid;grid-template-rows:0fr;grid-template-columns:100%}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content-wrapper{transition:grid-template-rows 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{grid-template-rows:1fr}@supports not (grid-template-rows: 0fr){.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}@media print{.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;min-height:0;visibility:hidden}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content{transition:visibility 190ms linear}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper>.mat-expansion-panel-content{visibility:visible}.mat-expansion-panel-content{font-family:var(--mat-expansion-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-sys-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-sys-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-sys-body-large-tracking))}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-sys-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px} -`],encapsulation:2,changeDetection:0})}return n})();var zd=(()=>{class n{panel=f(Vd,{host:!0});_element=f(Yt);_focusMonitor=f(za);_changeDetectorRef=f(X);_parentChangeSubscription=fo.EMPTY;constructor(){f(ur).load(da);let e=this.panel,t=f(RB,{optional:!0}),o=f(new Ks("tabindex"),{optional:!0}),r=e.accordion?e.accordion._stateChanges.pipe(Kn(a=>!!(a.hideToggle||a.togglePosition))):Ur;this.tabIndex=parseInt(o||"")||0,this._parentChangeSubscription=Dn(e.opened,e.closed,r,e._inputChanges.pipe(Kn(a=>!!(a.hideToggle||a.disabled||a.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(Kn(()=>e._containsFocus())).subscribe(()=>this._focusMonitor.focusVia(this._element,"program")),t&&(this.expandedHeight=t.expandedHeight,this.collapsedHeight=t.collapsedHeight)}expandedHeight;collapsedHeight;tabIndex=0;get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){let e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:ya(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,t){e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:13,hostBindings:function(t,o){t&1&&_("click",function(){return o._toggle()})("keydown",function(a){return o._keydown(a)}),t&2&&(Wt("id",o.panel._headerId)("tabindex",o.disabled?-1:o.tabIndex)("aria-controls",o._getPanelId())("aria-expanded",o._isExpanded())("aria-disabled",o.panel.disabled),yn("height",o._getHeaderHeight()),ze("mat-expanded",o._isExpanded())("mat-expansion-toggle-indicator-after",o._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",o._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Ro(e)]},ngContentSelectors:wae,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(t,o){t&1&&(ri(Sae),yo(0,"span",0),rn(1),rn(2,1),rn(3,2),To(),A(4,Mae,3,0,"span",1)),t&2&&(ze("mat-content-hide-toggle",!o._showToggle()),p(4),O(o._showToggle()?4:-1))},styles:[`.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit}.mat-expansion-panel-animations-enabled .mat-expansion-panel-header{transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header::before{border-radius:inherit}.mat-expansion-panel-header{height:var(--mat-expansion-header-collapsed-state-height, 48px);font-family:var(--mat-expansion-header-text-font, var(--mat-sys-title-medium-font));font-size:var(--mat-expansion-header-text-size, var(--mat-sys-title-medium-size));font-weight:var(--mat-expansion-header-text-weight, var(--mat-sys-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-sys-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-sys-title-medium-tracking))}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height, 64px)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color, var(--mat-sys-surface))}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color, var(--mat-sys-on-surface))}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color, var(--mat-sys-on-surface-variant))}.mat-expansion-panel-animations-enabled .mat-expansion-indicator{transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header.mat-expanded .mat-expansion-indicator{transform:rotate(180deg)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-legacy-header-indicator-display, none)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-header-indicator-display, inline-block)}@media(forced-colors: active){.mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}} -`],encapsulation:2,changeDetection:0})}return n})(),Py=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]})}return n})(),Xm=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]})}return n})(),Ym=(()=>{class n extends AB{_keyManager;_ownHeaders=new $l;_headers;hideToggle=!1;displayMode="default";togglePosition="after";ngAfterContentInit(){this._headers.changes.pipe(ci(this._headers)).subscribe(e=>{this._ownHeaders.reset(e.filter(t=>t.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new mm(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(e){this._keyManager.onKeydown(e)}_handleHeaderFocus(e){this._keyManager.updateActiveItem(e)}ngOnDestroy(){super.ngOnDestroy(),this._keyManager?.destroy(),this._ownHeaders.destroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=wi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["mat-accordion"]],contentQueries:function(t,o,r){if(t&1&&Hi(r,zd,5),t&2){let a;dt(a=mt())&&(o._headers=a)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(t,o){t&2&&ze("mat-accordion-multi",o.multi)},inputs:{hideToggle:[2,"hideToggle","hideToggle",gt],displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],features:[Cn([{provide:r3,useExisting:n}]),di]})}return n})(),Cl=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ut({type:n});static \u0275inj=Ht({imports:[Dy,yh,_i]})}return n})();var Ay=(()=>{class n{httpClient=f(gc);sanitizer=f(br);toasterService=f(ee);cd=f(X);thirdpartylicenses=ce("");releasenotes=ce("");ngOnInit(){this.httpClient.get(window.location.href+"/3rdpartylicenses.txt",{responseType:"text"}).subscribe({next:e=>{let t=e.replace(new RegExp(` + [matCardTitle], [matCardSubtitle]`,"*"],ste=new cn("MAT_CARD_CONFIG"),On=(()=>{class n{appearance;constructor(){let e=f(ste,{optional:!0});this.appearance=e?.appearance||"raised"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:8,hostBindings:function(t,o){t&2&&Be("mat-mdc-card-outlined",o.appearance==="outlined")("mdc-card--outlined",o.appearance==="outlined")("mat-mdc-card-filled",o.appearance==="filled")("mdc-card--filled",o.appearance==="filled")},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:ote,decls:1,vars:0,template:function(t,o){t&1&&(ii(),on(0))},styles:[`.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-color:var(--mat-card-elevated-container-color, var(--mat-sys-surface-container-low));border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-elevated-container-elevation, var(--mat-sys-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mat-card-elevated-container-shape, var(--mat-sys-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mat-card-outlined-container-color, var(--mat-sys-surface));border-radius:var(--mat-card-outlined-container-shape, var(--mat-sys-corner-medium));border-width:var(--mat-card-outlined-outline-width, 1px);border-color:var(--mat-card-outlined-outline-color, var(--mat-sys-outline-variant));box-shadow:var(--mat-card-outlined-container-elevation, var(--mat-sys-level0))}.mat-mdc-card-outlined::after{border:none}.mat-mdc-card-filled{background-color:var(--mat-card-filled-container-color, var(--mat-sys-surface-container-highest));border-radius:var(--mat-card-filled-container-shape, var(--mat-sys-corner-medium));box-shadow:var(--mat-card-filled-container-elevation, var(--mat-sys-level0))}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-sys-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-sys-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-sys-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-sys-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-sys-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-sys-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-sys-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-sys-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-sys-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-sys-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-sys-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end} +`],encapsulation:2,changeDetection:0})}return n})(),Oc=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"]})}return n})();var ll=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}return n})();var $b=(()=>{class n{align="start";static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(t,o){t&2&&Be("mat-mdc-card-actions-align-end",o.align==="end")},inputs:{align:"align"},exportAs:["matCardActions"]})}return n})(),Nc=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],ngContentSelectors:ate,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(t,o){t&1&&(ii(rte),on(0),vo(1,"div",0),on(2,1),wo(),on(3,2))},encapsulation:2,changeDetection:0})}return n})();var Mt=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[hi]})}return n})();var wm=(()=>{class n{dataChange=new an([]);constructor(){}get data(){return this.dataChange.value}addController(e){let t=this.data.slice();t.push(e),this.dataChange.next(t)}addControllers(e){this.dataChange.next(e)}remove(e){let t=this.data.indexOf(e);t>=0&&(this.data.splice(t,1),this.dataChange.next(this.data.slice()))}find(e){return this.data.find(t=>t.name===e)}findById(e){return this.data.find(t=>t.id===e)}findIndex(e){return this.data.findIndex(t=>t.name===e)}findIndexById(e){return this.data.findIndex(t=>t.id===e)}update(e){let t=this.findIndexById(e.id);t>=0&&(this.data[t]=e,this.dataChange.next(this.data.slice()))}static \u0275fac=function(t){return new(t||n)};static \u0275prov=J({token:n,factory:n.\u0275fac})}return n})();var a8=(n,i)=>i.key;function lte(n,i){n&1&&(s(0,"mat-error"),d(1,"You must enter a value"),l())}function cte(n,i){if(n&1&&(s(0,"mat-option",9),d(1),l()),n&2){let e=i.$implicit;C("value",e.key),m(),ee(" ",e.name," ")}}function dte(n,i){if(n&1&&(s(0,"mat-option",9),d(1),l()),n&2){let e=i.$implicit;C("value",e.key),m(),ee(" ",e.name," ")}}var Hb=(()=>{class n{controllerService=f(Je);controllerDatabase=f(wm);route=f(lt);router=f(ht);toasterService=f(te);cdr=f(Q);controllerOptionsVisibility=ae(!1);controllerIp;controllerPort;projectId;protocols=[{key:"http:",name:"HTTP"},{key:"https:",name:"HTTPS"}];locations=[{key:"local",name:"Local"},{key:"remote",name:"Remote"}];controllerForm=new gr({name:new Ye("",[Ue.required]),location:new Ye(""),protocol:new Ye("http:")});constructor(){}async ngOnInit(){this.controllerService.isServiceInitialized&&this.getControllers(),this.controllerService.serviceInitialized.subscribe(async e=>{e&&this.getControllers()})}async getControllers(){this.controllerIp=this.route.snapshot.paramMap.get("controller_ip"),this.controllerPort=+this.route.snapshot.paramMap.get("controller_port"),this.projectId=this.route.snapshot.paramMap.get("project_id");try{let t=(await this.controllerService.findAll()).filter(o=>o.host===this.controllerIp&&o.port===this.controllerPort)[0];t?this.router.navigate(["/controller",t.id,"project",this.projectId]):(this.controllerOptionsVisibility.set(!0),this.cdr.markForCheck())}catch(e){let t=e.error?.message||e.message||"Failed to load controllers";this.toasterService.error(t),this.cdr.markForCheck()}}createController(){if(!this.controllerForm.get("name").hasError&&!this.controllerForm.get("location").hasError&&!this.controllerForm.get("protocol").hasError){this.toasterService.error("Please use correct values");return}let e=new y4;e.host=this.controllerIp,e.port=this.controllerPort,e.name=this.controllerForm.get("name").value,e.location=this.controllerForm.get("location").value,e.protocol=this.controllerForm.get("protocol").value,this.controllerService.create(e).then(t=>{this.router.navigate(["/controller",t.id,"project",this.projectId])},t=>{let o=t.error?.message||t.message||"Failed to create controller";this.toasterService.error(o),this.cdr.markForCheck()})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["app-direct-link"]],decls:22,vars:3,consts:[[1,"content",3,"hidden"],[1,"default-header"],[1,"row"],[1,"col"],[1,"default-content"],[1,"matCard"],[3,"formGroup"],["matInput","","tabindex","1","formControlName","name","placeholder","Name"],["placeholder","Location","formControlName","location"],[3,"value"],["placeholder","Protocol","formControlName","protocol"],[1,"buttons-bar"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,o){t&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),d(4,"Add new controller"),l()()(),s(5,"div",4)(6,"mat-card",5)(7,"form",6)(8,"mat-form-field"),R(9,"input",7),A(10,lte,2,0,"mat-error"),l(),s(11,"mat-form-field")(12,"mat-select",8),Y(13,cte,2,2,"mat-option",9,a8),l()(),s(15,"mat-form-field")(16,"mat-select",10),Y(17,dte,2,2,"mat-option",9,a8),l()()()(),s(19,"div",11)(20,"button",12),g("click",function(){return o.createController()}),d(21,"Add controller"),l()()()()),t&2&&(C("hidden",!o.controllerOptionsVisibility()),m(7),C("formGroup",o.controllerForm),m(3),O(o.controllerForm.get("name").hasError("required")?10:-1),m(3),Z(o.locations),m(4),Z(o.protocols))},dependencies:[ne,Dt,at,Ft,Pt,rt,Rt,zt,dt,Mt,On,we,Me,fi,Se,Ee,vt,At,_t,Fo,W,pe],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})}return n})();var $D=new cn("CdkAccordion"),s8=(()=>{class n{_stateChanges=new He;_openCloseAllActions=new He;id=f(Mo).getId("cdk-accordion-");multi=!1;openAll(){this.multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(e){this._stateChanges.next(e)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[2,"multi","multi",Ct]},exportAs:["cdkAccordion"],features:[fn([{provide:$D,useExisting:n}]),bn]})}return n})(),l8=(()=>{class n{accordion=f($D,{optional:!0,skipSelf:!0});_changeDetectorRef=f(Q);_expansionDispatcher=f(Yu);_openCloseAllSubscription=So.EMPTY;closed=new ve;opened=new ve;destroyed=new ve;expandedChange=new ve;id=f(Mo).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let t=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,t)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=ae(!1);_removeUniqueSelectionListener=()=>{};constructor(){}ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,t)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===t&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",Ct],disabled:[2,"disabled","disabled",Ct]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[fn([{provide:$D,useValue:void 0}])]})}return n})(),Ub=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({})}return n})();var mte=["body"],pte=["bodyWrapper"],ute=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],hte=["mat-expansion-panel-header","*","mat-action-row"];function fte(n,i){}var gte=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],_te=["mat-panel-title","mat-panel-description","*"];function vte(n,i){n&1&&(vo(0,"span",1),ei(),vo(1,"svg",2),bs(2,"path",3),wo()())}var HD=new cn("MAT_ACCORDION"),c8=new cn("MAT_EXPANSION_PANEL"),Cte=(()=>{class n{_template=f(Oo);_expansionPanel=f(c8,{optional:!0});constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]})}return n})(),d8=new cn("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),kd=(()=>{class n extends l8{_viewContainerRef=f(oo);_animationsDisabled=qo();_document=f(Xi);_ngZone=f(Vi);_elementRef=f(Zt);_renderer=f(Si);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new ve;afterCollapse=new ve;_inputChanges=new He;accordion=f(HD,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=f(Mo).getId("mat-expansion-panel-header-");constructor(){super();let e=f(d8,{optional:!0});this._expansionDispatcher=f(Yu),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(pi(null),ai(()=>this.expanded&&!this._portal),Ao(1)).subscribe(()=>{this._portal=new pd(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,t=this._body.nativeElement;return e===t||t.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:t})=>{e===this._bodyWrapper?.nativeElement&&t==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["mat-expansion-panel"]],contentQueries:function(t,o,r){if(t&1&&Ki(r,Cte,5),t&2){let a;mt(a=pt())&&(o._lazyContent=a.first)}},viewQuery:function(t,o){if(t&1&&xn(mte,5)(pte,5),t&2){let r;mt(r=pt())&&(o._body=r.first),mt(r=pt())&&(o._bodyWrapper=r.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(t,o){t&2&&Be("mat-expanded",o.expanded)("mat-expansion-panel-spacing",o._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",Ct],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[fn([{provide:HD,useValue:void 0},{provide:c8,useExisting:n}]),si,bn],ngContentSelectors:hte,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,o){t&1&&(ii(ute),on(0),s(1,"div",2,0)(3,"div",3,1)(5,"div",4),on(6,1),xe(7,fte,0,0,"ng-template",5),l(),on(8,2),l()()),t&2&&(m(),qt("inert",o.expanded?null:""),m(2),C("id",o.id),qt("aria-labelledby",o._headerId),m(4),C("cdkPortalOutlet",o._portal))},dependencies:[Gu],styles:[`.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden}.mat-expansion-panel.mat-expansion-panel-animations-enabled{transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel{position:relative;background:var(--mat-expansion-container-background-color, var(--mat-sys-surface));color:var(--mat-expansion-container-text-color, var(--mat-sys-on-surface));border-radius:var(--mat-expansion-container-shape, 12px)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:var(--mat-expansion-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape, 12px);border-top-left-radius:var(--mat-expansion-container-shape, 12px)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape, 12px);border-bottom-left-radius:var(--mat-expansion-container-shape, 12px)}@media(forced-colors: active){.mat-expansion-panel{outline:solid 1px}}.mat-expansion-panel-content-wrapper{display:grid;grid-template-rows:0fr;grid-template-columns:100%}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content-wrapper{transition:grid-template-rows 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{grid-template-rows:1fr}@supports not (grid-template-rows: 0fr){.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}@media print{.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;min-height:0;visibility:hidden}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content{transition:visibility 190ms linear}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper>.mat-expansion-panel-content{visibility:visible}.mat-expansion-panel-content{font-family:var(--mat-expansion-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-sys-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-sys-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-sys-body-large-tracking))}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-sys-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px} +`],encapsulation:2,changeDetection:0})}return n})();var Td=(()=>{class n{panel=f(kd,{host:!0});_element=f(Zt);_focusMonitor=f(Aa);_changeDetectorRef=f(Q);_parentChangeSubscription=So.EMPTY;constructor(){f(cr).load(ia);let e=this.panel,t=f(d8,{optional:!0}),o=f(new sc("tabindex"),{optional:!0}),r=e.accordion?e.accordion._stateChanges.pipe(ai(a=>!!(a.hideToggle||a.togglePosition))):Lu;this.tabIndex=parseInt(o||"")||0,this._parentChangeSubscription=Hn(e.opened,e.closed,r,e._inputChanges.pipe(ai(a=>!!(a.hideToggle||a.disabled||a.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),e.closed.pipe(ai(()=>e._containsFocus())).subscribe(()=>this._focusMonitor.focusVia(this._element,"program")),t&&(this.expandedHeight=t.expandedHeight,this.collapsedHeight=t.collapsedHeight)}expandedHeight;collapsedHeight;tabIndex=0;get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){let e=this._isExpanded();return e&&this.expandedHeight?this.expandedHeight:!e&&this.collapsedHeight?this.collapsedHeight:null}_keydown(e){switch(e.keyCode){case 32:case 13:fa(e)||(e.preventDefault(),this._toggle());break;default:this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(e);return}}focus(e,t){e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(e=>{e&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=F({type:n,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:13,hostBindings:function(t,o){t&1&&g("click",function(){return o._toggle()})("keydown",function(a){return o._keydown(a)}),t&2&&(qt("id",o.panel._headerId)("tabindex",o.disabled?-1:o.tabIndex)("aria-controls",o._getPanelId())("aria-expanded",o._isExpanded())("aria-disabled",o.panel.disabled),nn("height",o._getHeaderHeight()),Be("mat-expanded",o._isExpanded())("mat-expansion-toggle-indicator-after",o._getTogglePosition()==="after")("mat-expansion-toggle-indicator-before",o._getTogglePosition()==="before"))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:No(e)]},ngContentSelectors:_te,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(t,o){t&1&&(ii(gte),vo(0,"span",0),on(1),on(2,1),on(3,2),wo(),A(4,vte,3,0,"span",1)),t&2&&(Be("mat-content-hide-toggle",!o._showToggle()),m(4),O(o._showToggle()?4:-1))},styles:[`.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit}.mat-expansion-panel-animations-enabled .mat-expansion-panel-header{transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header::before{border-radius:inherit}.mat-expansion-panel-header{height:var(--mat-expansion-header-collapsed-state-height, 48px);font-family:var(--mat-expansion-header-text-font, var(--mat-sys-title-medium-font));font-size:var(--mat-expansion-header-text-size, var(--mat-sys-title-medium-size));font-weight:var(--mat-expansion-header-text-weight, var(--mat-sys-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-sys-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-sys-title-medium-tracking))}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height, 64px)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color, var(--mat-sys-surface))}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color, var(--mat-sys-on-surface))}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color, var(--mat-sys-on-surface-variant))}.mat-expansion-panel-animations-enabled .mat-expansion-indicator{transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header.mat-expanded .mat-expansion-indicator{transform:rotate(180deg)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-legacy-header-indicator-display, none)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-header-indicator-display, inline-block)}@media(forced-colors: active){.mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}} +`],encapsulation:2,changeDetection:0})}return n})(),Gb=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]})}return n})(),Mm=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ft({type:n,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]})}return n})(),km=(()=>{class n extends s8{_keyManager;_ownHeaders=new Il;_headers;hideToggle=!1;displayMode="default";togglePosition="after";ngAfterContentInit(){this._headers.changes.pipe(pi(this._headers)).subscribe(e=>{this._ownHeaders.reset(e.filter(t=>t.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new Gd(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(e){this._keyManager.onKeydown(e)}_handleHeaderFocus(e){this._keyManager.updateActiveItem(e)}ngOnDestroy(){super.ngOnDestroy(),this._keyManager?.destroy(),this._ownHeaders.destroy()}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Pi(n)))(o||n)}})();static \u0275dir=ft({type:n,selectors:[["mat-accordion"]],contentQueries:function(t,o,r){if(t&1&&Ki(r,Td,5),t&2){let a;mt(a=pt())&&(o._headers=a)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(t,o){t&2&&Be("mat-accordion-multi",o.multi)},inputs:{hideToggle:[2,"hideToggle","hideToggle",Ct],displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],features:[fn([{provide:HD,useExisting:n}]),si]})}return n})(),cl=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Ht({type:n});static \u0275inj=$t({imports:[Ub,Wu,hi]})}return n})();var qb=(()=>{class n{httpClient=f(js);sanitizer=f(fr);toasterService=f(te);cd=f(Q);thirdpartylicenses=ae("");releasenotes=ae("");ngOnInit(){this.httpClient.get(window.location.href+"/3rdpartylicenses.txt",{responseType:"text"}).subscribe({next:e=>{let t=e.replace(new RegExp(` `,"g"),"
");this.thirdpartylicenses.set(this.sanitizer.bypassSecurityTrustHtml(t))},error:e=>{if(e.status===404)this.thirdpartylicenses.set("Download Solar-PuTTY");else{let t=e.error?.message||e.message||"Failed to load third party licenses";this.toasterService.error(t)}this.cd.markForCheck()}}),this.httpClient.get("ReleaseNotes.txt",{responseType:"text"}).subscribe({next:e=>{let t=e.replace(new RegExp(` -`,"g"),"
");this.releasenotes.set(this.sanitizer.bypassSecurityTrustHtml(t))},error:e=>{let t=e.error?.message||e.message||"Failed to load release notes";this.toasterService.error(t),this.cd.markForCheck()}})}goToDocumentation(){window.location.href="https://docs.gns3.com/docs/"}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=R({type:n,selectors:[["app-help"]],decls:39,vars:2,consts:[[1,"help"],[1,"help__header"],[1,"help__title"],[1,"help__content"],[1,"help__card"],["href","https://downloads.solarwinds.com/solarwinds/GNS3/Solar-PuTTY/Solar-PuTTY-Optional.exe",1,"help__link"],[3,"innerHTML"],["mat-button","","color","primary",1,"help__doc-button",3,"click"]],template:function(t,o){t&1&&(s(0,"div",0)(1,"header",1)(2,"h1",2),d(3,"Help"),l()(),s(4,"main",3)(5,"section",4)(6,"mat-accordion")(7,"mat-expansion-panel")(8,"mat-expansion-panel-header")(9,"mat-panel-title"),d(10," Useful shortcuts "),l()(),s(11,"mat-list")(12,"mat-list-item"),d(13," ctrl + + to zoom in "),l(),s(14,"mat-list-item"),d(15," ctrl + - to zoom out "),l(),s(16,"mat-list-item"),d(17," ctrl + 0 to reset zoom "),l(),s(18,"mat-list-item"),d(19," ctrl + h to hide toolbar "),l(),s(20,"mat-list-item"),d(21," ctrl + a to select all items on map "),l(),s(22,"mat-list-item"),d(23," ctrl + shift + a to deselect all items on map "),l(),s(24,"mat-list-item"),d(25," ctrl + shift + s to go to preferences "),l()()(),s(26,"mat-expansion-panel")(27,"mat-expansion-panel-header")(28,"mat-panel-title"),d(29," Third party components "),l()(),s(30,"a",5),L(31,"div",6),l()(),s(32,"mat-expansion-panel")(33,"mat-expansion-panel-header")(34,"mat-panel-title"),d(35," Release notes "),l()(),L(36,"div",6),l()()(),s(37,"button",7),_("click",function(){return o.goToDocumentation()}),d(38," Go to documentation "),l()()()),t&2&&(p(31),b("innerHTML",o.thirdpartylicenses(),Gp),p(5),b("innerHTML",o.releasenotes(),Gp))},dependencies:[W,he,Cl,Ym,Vd,zd,Xm,io,sR,pm],styles:["[_nghost-%COMP%]{display:block;width:100%;background:transparent}.help__header[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:32px 20px 16px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out}.help__title[_ngcontent-%COMP%]{font-size:32px;font-weight:500;color:var(--mat-sys-on-surface);margin:0;padding-bottom:8px}.help__content[_ngcontent-%COMP%]{max-width:800px;margin:0 auto;padding:0 20px 20px;animation:_ngcontent-%COMP%_fadeInSlideIn .4s ease-out .1s both}.help__card[_ngcontent-%COMP%]{background:var(--mat-sys-surface);border-radius:16px;overflow:hidden;box-shadow:0 8px 32px color-mix(in srgb,var(--mat-sys-shadow) 20%,transparent),0 2px 8px color-mix(in srgb,var(--mat-sys-shadow) 10%,transparent)}.mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:none;border-bottom:1px solid var(--mat-sys-outline-variant)}.mat-expansion-panel[_ngcontent-%COMP%]:first-of-type{border-top:none}.mat-expansion-panel-header[_ngcontent-%COMP%]{font-weight:500;color:var(--mat-sys-on-surface)}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface)}.help__doc-button[_ngcontent-%COMP%]{display:block;width:100%;margin-top:20px;height:48px;border-radius:12px;font-size:16px;font-weight:500;text-transform:none;letter-spacing:.5px}.help__link[_ngcontent-%COMP%]{color:var(--mat-sys-primary);text-decoration:none;font-size:14px;font-weight:400}.help__link[_ngcontent-%COMP%]:hover{text-decoration:underline}@keyframes _ngcontent-%COMP%_fadeInSlideIn{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){.help__header[_ngcontent-%COMP%]{padding:24px 16px 12px}.help__title[_ngcontent-%COMP%]{font-size:24px}.help__content[_ngcontent-%COMP%]{padding:0 16px 16px}.help__doc-button[_ngcontent-%COMP%]{height:44px;font-size:15px}}"],changeDetection:0})}return n})();var Oy=(()=>{class n{constructor(){}isWindows(){return navigator.platform.indexOf("Win")>-1}isLinux(){return navigator.platform.indexOf("Linux")>-1}isDarwin(){return navigator.platform.indexOf("Mac")>-1}static \u0275fac=function(t){return new(t||n)};static \u0275prov=Y({token:n,factory:n.\u0275fac})}return n})();var Ny=(()=>{class n{platformService;constructor(e){this.platformService=e}get(){return this.platformService.isWindows()?this.getForWindows():this.platformService.isDarwin()?this.getForDarwin():this.getForLinux()}getForWindows(){let e=[{name:"Wireshark",locations:["C:\\Program Files\\Wireshark\\Wireshark.exe"],type:"web",resource:"https://1.na.dl.wireshark.org/win64/all-versions/Wireshark-win64-2.6.3.exe",binary:"Wireshark.exe",sudo:!0,installation_arguments:[],installed:!1,installer:!0}],t={name:"SolarPuTTY",locations:["SolarPuTTY.exe","external\\SolarPuTTY.exe"],type:"web",resource:"",binary:"SolarPuTTY.exe",sudo:!1,installation_arguments:["--only-ask"],installed:!1,installer:!1};return zi.solarputty_download_url&&(t.resource=zi.solarputty_download_url,e.push(t)),e}getForLinux(){return[]}getForDarwin(){return[]}static \u0275fac=function(t){return new(t||n)(ge(Oy))};static \u0275prov=Y({token:n,factory:n.\u0275fac})}return n})();var Ry=(()=>{class n{externalSoftwareDefinition;constructor(e){this.externalSoftwareDefinition=e}list(){return this.externalSoftwareDefinition.get().map(t=>(t.installed=!1,t))}static \u0275fac=function(t){return new(t||n)(ge(Ny))};static \u0275prov=Y({token:n,factory:n.\u0275fac})}return n})();var Dae=(n,i)=>({hidden:n,lightTheme:i}),Pae=/(.*)<\/a>(.*)\s*