diff --git a/coverage-baseline.json b/coverage-baseline.json index 6c2fbf09..7897b50c 100644 --- a/coverage-baseline.json +++ b/coverage-baseline.json @@ -66,10 +66,10 @@ "statements": 30 }, "src/config/migrations.py": { - "covered": 243, + "covered": 294, "missing": 0, "percent": 100.0, - "statements": 243 + "statements": 294 }, "src/config/schema.py": { "covered": 706, @@ -870,10 +870,10 @@ "statements": 45 }, "src/tools/autonomous_loop.py": { - "covered": 155, - "missing": 83, - "percent": 65.13, - "statements": 238 + "covered": 197, + "missing": 72, + "percent": 73.23, + "statements": 269 }, "src/tools/branch_freshness.py": { "covered": 99, diff --git a/scripts/check-config-center-ui2.mjs b/scripts/check-config-center-ui2.mjs index f7db3922..22b6c9c5 100644 --- a/scripts/check-config-center-ui2.mjs +++ b/scripts/check-config-center-ui2.mjs @@ -364,6 +364,8 @@ assert.match(llm, /saveCodexAdvancedConfig\(\)[\s\S]*codexAdvancedPayload\(codex assert.match(llm, /Context budgets<\/strong>/, 'Codex Advanced panel lost the Context budgets table'); assert.match(llm, /api\.get\('\/api\/context\/windows'\)/, 'Context budgets do not load backend derivation truth'); assert.match(llm, /api\.post\('\/api\/context\/windows\/clear'/, 'Context budgets lost account-scoped clamp clearing'); +assert.match(llm, /formatContextCeiling\(llmStatus\.codex\.effective_context_compression\?\.max_context_chars\)/, 'Context-compression status lost truthful automatic-ceiling formatting'); +assert.doesNotMatch(llm, /effective_context_compression\?\.max_context_chars\s*\|\|\s*0/, 'Automatic context ceiling regressed to 0 characters'); assert.match(llm, /details\.effective\?\.effective_budget/, 'effective budget is recomputed or not data-bound'); assert.match(llm, /details\.effective\?\.primary_chars/, 'resulting target is recomputed or not data-bound'); assert.doesNotMatch(llm, /921601|917506|270001|262146|124001/, 'browser duplicated the backend context-budget catalog'); diff --git a/scripts/check-config-save-boundaries.mjs b/scripts/check-config-save-boundaries.mjs index 0c86f3f7..7a247ba0 100644 --- a/scripts/check-config-save-boundaries.mjs +++ b/scripts/check-config-save-boundaries.mjs @@ -34,6 +34,8 @@ const llmState = { retry: { max_retries: 3, base_delay: 1, max_delay: 30 }, connection_pool: { max_connections: 10, keepalive_timeout: 30 }, context_compression: { enabled: true, max_context_chars: 750000, keep_recent_iterations: 30 }, + effective_context_compression: { enabled: false, max_context_chars: null, keep_recent_iterations: 30 }, + context_compression_pending_restart: true, }, ollama: { configured: true, @@ -172,9 +174,21 @@ console.warn = message => { }; const { default: LLMConfigPage } = await import('../ui/js/pages/llm-config.js'); +assert.match( + LLMConfigPage.template, + /formatContextCeiling\(llmStatus\.codex\.effective_context_compression\?\.max_context_chars\)/, + 'pending-restart template does not consume the truthful ceiling formatter', +); +assert.doesNotMatch( + LLMConfigPage.template, + /effective_context_compression\?\.max_context_chars\s*\|\|\s*0/, + 'pending-restart template renders automatic context as zero characters', +); const llm = LLMConfigPage.setup(); await llm.fetchAll(); assert.equal(llm.contextBudgetRows.value[0].primaryChars, 1277400, 'Context target did not come from GET /api/context/windows'); +assert.equal(llm.formatContextCeiling(null), 'automatic (model-derived)', 'automatic runtime ceiling rendered as a numeric zero'); +assert.equal(llm.formatContextCeiling(500000), '500,000 characters', 'explicit runtime ceiling lost its unit/value'); const lateContextRefresh = defer('GET /api/context/windows'); const contextRefresh = llm.fetchContextWindows(); await Promise.resolve(); diff --git a/src/config/migrations.py b/src/config/migrations.py index 216450c6..49110452 100644 --- a/src/config/migrations.py +++ b/src/config/migrations.py @@ -41,6 +41,7 @@ _CEILING_PATH = ("openai_codex", "context_compression", "max_context_chars") _MIGRATION_ID = "legacy_max_context_chars_to_auto" _MARKER_VERSION = 3 +_LEGACY_CLAIM_SUFFIX = ".claim" _COMPLETION_REASONS = frozenset( { "migrated", @@ -311,6 +312,85 @@ def _atomic_write_marker(marker: Path, record: dict[str, object]) -> None: os.close(directory_fd) +def _legacy_claim_path(legacy_marker: Path) -> Path: + """Exclusive ownership record for one directory-wide legacy marker.""" + return legacy_marker.with_name(legacy_marker.name + _LEGACY_CLAIM_SUFFIX) + + +def _read_claim_owner(claim: Path) -> str | None: + """Read one strict claim owner; malformed claims fail closed.""" + try: + raw = claim.read_text(encoding="ascii") + except FileNotFoundError: + return None + except (OSError, UnicodeError) as exc: + raise MigrationCompletionError( + "legacy ceiling-migration claim is invalid or unreadable; inspect it before retrying" + ) from exc + owner = raw.rstrip("\n") + if len(owner) != 64 or any(ch not in "0123456789abcdef" for ch in owner): + raise MigrationCompletionError( + "legacy ceiling-migration claim is invalid or unreadable; inspect it before retrying" + ) + return owner + + +def _claim_legacy_marker(legacy_marker: Path, config_id: str) -> bool: + """Atomically claim ambiguous legacy provenance for one config identity. + + A fully written, fsynced temporary file is hard-linked into place. The + link is fail-if-exists, so losers can only observe the winner's complete + owner value — never a partially written O_EXCL destination. A crash may + conservatively strand the claim with its owner, but can never grant one + legacy completion to a second config identity. + """ + claim = _legacy_claim_path(legacy_marker) + temporary: Path | None = None + fd = -1 + stream = None + try: + claim.parent.mkdir(parents=True, exist_ok=True) + fd, temporary_name = tempfile.mkstemp( + dir=claim.parent, + prefix=f".{claim.name}.", + suffix=".tmp", + ) + temporary = Path(temporary_name) + os.fchmod(fd, 0o600) + stream = os.fdopen(fd, "w", encoding="ascii") + fd = -1 + with stream: + stream.write(config_id + "\n") + stream.flush() + os.fsync(stream.fileno()) + stream = None + try: + os.link(temporary, claim) + except FileExistsError: + return _read_claim_owner(claim) == config_id + with contextlib.suppress(OSError): + directory_fd = os.open(claim.parent, os.O_RDONLY) + try: + os.fsync(directory_fd) + finally: + os.close(directory_fd) + return True + except OSError as exc: + raise MigrationCompletionError( + "could not claim legacy ceiling-migration provenance" + ) from exc + finally: + if stream is not None: + with contextlib.suppress(OSError): + stream.close() + if fd >= 0: + with contextlib.suppress(OSError): + os.close(fd) + if temporary is not None: + with contextlib.suppress(OSError): + temporary.unlink() + + def _completion_record(reason: str, config_id: str) -> dict[str, object]: return { "version": _MARKER_VERSION, @@ -444,23 +524,12 @@ def apply_legacy_ceiling_migration(data: dict, config_path: str | Path, original if marker_kind is _MarkerKind.ROUND1_LEGACY: log.info("Upgrading round-1 legacy migration provenance at %s.", marker) - # Upgrade the old launch-directory marker only when no identity-bound marker - # exists. Its provenance remains fail-closed, but it no longer suppresses a - # distinct config in the same directory once one identity has been bound. - # A legacy marker plus any new identity marker is an already-upgraded - # directory; sibling identities must not inspect or inherit the old record. + # Upgrade the old launch-directory marker through an exclusive claim. + # Directory scans are not arbitration: debris is irrelevant, and two sibling + # processes must not both inherit one ambiguous v1/v2 completion record. legacy_marker = _legacy_ceiling_marker_path(config_path) - identity_dir = marker.parent - identity_markers_exist = False - try: - identity_markers_exist = identity_dir.is_dir() and any(identity_dir.iterdir()) - except OSError as exc: - raise MigrationCompletionError( - "could not inspect identity-bound ceiling-migration records" - ) from exc - legacy_kind = ( - _MarkerKind.MISSING if identity_markers_exist else _read_marker(legacy_marker) - ) + claim_owner = _read_claim_owner(_legacy_claim_path(legacy_marker)) + legacy_kind = _read_marker(legacy_marker) if legacy_kind is _MarkerKind.COMPLETE: # A v3 legacy-path record is already bound. A different config in the # same launch directory must ignore it rather than inherit completion. @@ -471,6 +540,21 @@ def apply_legacy_ceiling_migration(data: dict, config_path: str | Path, original else: if legacy_record.get("config_id") != config_id: legacy_kind = _MarkerKind.MISSING + elif ( + claim_owner is not None + and claim_owner != config_id + and legacy_kind + in { + _MarkerKind.ROUND1_LEGACY, + _MarkerKind.ROUND1_OPERATOR, + _MarkerKind.PREVERSIONED_COMPLETE, + } + ): + # Another config won valid pre-versioned provenance. This identity must + # evaluate and migrate its own literal rather than inherit completion. + # Invalid legacy material remains fail-closed; a foreign claim cannot + # launder a corrupt or unknown marker into "missing". + legacy_kind = _MarkerKind.MISSING if legacy_kind in invalid: raise MigrationCompletionError( "legacy ceiling-migration record is invalid or unreadable; inspect it before retrying" @@ -480,22 +564,35 @@ def apply_legacy_ceiling_migration(data: dict, config_path: str | Path, original _MarkerKind.ROUND1_OPERATOR, _MarkerKind.PREVERSIONED_COMPLETE, }: - reason = ( - "prior_operator_saved" - if legacy_kind is _MarkerKind.ROUND1_OPERATOR - else "upgraded_preversioned_completion" - ) - _write_completion_pair(marker, shared_marker, reason, - "upgrade the ceiling-migration completion record", config_id) - # Bind the previously directory-wide provenance to the one config that - # adopted it. Later sibling configs can no longer inherit it. - _write_required( - legacy_marker, - reason, - "bind legacy ceiling-migration completion to its config", - config_id, - ) - return + if legacy_kind is not _MarkerKind.COMPLETE and not _claim_legacy_marker( + legacy_marker, config_id + ): + # A sibling won between our read and claim. Its value is irrelevant + # to this config; proceed through the ordinary lexical migration. + legacy_kind = _MarkerKind.MISSING + else: + reason = ( + "prior_operator_saved" + if legacy_kind is _MarkerKind.ROUND1_OPERATOR + else "upgraded_preversioned_completion" + ) + _write_completion_pair( + marker, + shared_marker, + reason, + "upgrade the ceiling-migration completion record", + config_id, + ) + # Bind the old marker after the exclusive claim. The claim remains + # durable as the arbitration record; replacing the marker cannot + # grant another sibling the already-consumed provenance. + _write_required( + legacy_marker, + reason, + "bind legacy ceiling-migration completion to its config", + config_id, + ) + return if legacy_kind is _MarkerKind.ROUND1_LEGACY: log.info("Upgrading round-1 legacy migration provenance at %s.", legacy_marker) diff --git a/src/tools/autonomous_loop.py b/src/tools/autonomous_loop.py index 4c529517..d610f7ce 100644 --- a/src/tools/autonomous_loop.py +++ b/src/tools/autonomous_loop.py @@ -11,6 +11,7 @@ import uuid from collections import deque from collections.abc import Awaitable, Callable +from contextvars import ContextVar from dataclasses import dataclass, field from datetime import datetime from typing import Any @@ -41,6 +42,14 @@ LOOP_STOP_SENTINEL = "LOOP_STOP" +# Logical loop ownership follows child tasks created by the iteration pipeline. +# asyncio.current_task() cannot identify self-stop from a gathered tool child: the +# child is not LoopInfo._task, but cancelling/awaiting the parent from that child +# creates a parent/child cancellation cycle. Context propagation is the authority. +_current_loop: ContextVar[tuple[int, str] | None] = ContextVar( + "odin_current_autonomous_loop", default=None +) + @dataclass class LoopInfo: @@ -61,6 +70,7 @@ class LoopInfo: status: str = "running" # running, stopped, completed, error _task: asyncio.Task | None = field(default=None, repr=False) _cancel_event: asyncio.Event = field(default_factory=asyncio.Event) + _stop_requested: bool = field(default=False, repr=False) _iteration_history: deque[str] = field( default_factory=lambda: deque(maxlen=MAX_CONTEXT_HISTORY * 2), ) @@ -140,26 +150,36 @@ async def stop_loop(self, loop_id: str) -> str: contract: once this method says ``stopped``, no retry or tool side effect from that loop can begin afterward. """ + logical_current = _current_loop.get() + current_loop_id = ( + logical_current[1] + if logical_current is not None and logical_current[0] == id(self) + else None + ) if loop_id == "all": running = [info for info in self._loops.values() if info.status == "running"] if not running: return "No active loops to stop." - current = asyncio.current_task() for running_info in running: - self._request_stop(running_info) + if running_info.id == current_loop_id: + # The real tool path runs in an asyncio.gather() child. It + # must stop its logical parent cooperatively, never cancel + # and await that parent from below it. + running_info._stop_requested = True + running_info._cancel_event.set() + else: + self._request_stop(running_info) await asyncio.gather( *( running_info._task for running_info in running - if running_info._task is not None and running_info._task is not current + if running_info.id != current_loop_id + and running_info._task is not None ), return_exceptions=True, ) ids = ", ".join(running_info.id for running_info in running) - if any(running_info._task is current for running_info in running): - for running_info in running: - if running_info._task is current: - running_info.status = "stopped" + if current_loop_id is not None: return f"Stop requested for {len(running)} loop(s): {ids}" return f"Stopped {len(running)} loop(s): {ids}" @@ -168,19 +188,23 @@ async def stop_loop(self, loop_id: str) -> str: return f"No loop found with ID `{loop_id}`." if info.status != "running": return f"Loop `{loop_id}` is not running (status: {info.status})." - self._request_stop(info) - if info._task is asyncio.current_task(): - info.status = "stopped" - # A loop may invoke stop_loop on itself. It cannot await/cancel its - # own manager task from inside that task; cooperative cancellation - # stops the pipeline immediately after this tool call returns. + if info.id == current_loop_id: + info._stop_requested = True + info._cancel_event.set() + # ContextVar ownership reaches gathered tool children. The tool is + # allowed to return, then run_autonomous observes the event and the + # manager task settles without any parent/child cancellation cycle. return f"Loop `{loop_id}` stop requested." + self._request_stop(info) if info._task is not None: await asyncio.gather(info._task, return_exceptions=True) + if info.status == "running": + info.status = "stopped" return f"Loop `{loop_id}` stopped." @staticmethod def _request_stop(info: LoopInfo) -> None: + info._stop_requested = True info._cancel_event.set() task = info._task if task is not None and task is not asyncio.current_task() and not task.done(): @@ -306,11 +330,13 @@ async def _run_loop( turn_id=f"loop:{info.id}:{info.iteration_count}", channel_id=info.channel_id, ) + _loop_token = _current_loop.set((id(self), info.id)) try: response = await iteration_callback( prompt, channel, prev_context, info._cancel_event ) finally: + _current_loop.reset(_loop_token) reset_turn(_turn_token) response = scrub_output_secrets(response.strip()) if response else "" if info._cancel_event.is_set(): @@ -420,15 +446,21 @@ async def _run_loop( if await self._interruptible_wait(info, info.interval_seconds): break # Cancel was set during the wait - # Loop ended normally (max iterations reached) + # Distinguish cooperative cancellation from natural exhaustion. + # A self-stop tool sets the event from a gathered child and cannot + # mark its logical parent settled; only this owner task publishes + # the terminal status after the callback/tool pipeline has unwound. if info.status == "running": - info.status = "completed" - try: - await channel.send( - f"Loop `{info.id}` completed after {info.iteration_count} iterations." - ) - except Exception: - pass + if info._stop_requested: + info.status = "stopped" + else: + info.status = "completed" + try: + await channel.send( + f"Loop `{info.id}` completed after {info.iteration_count} iterations." + ) + except Exception: + pass except asyncio.CancelledError: info.status = "stopped" diff --git a/src/web/api/llm_admin.py b/src/web/api/llm_admin.py index c6b2633b..a5c587c7 100644 --- a/src/web/api/llm_admin.py +++ b/src/web/api/llm_admin.py @@ -974,7 +974,14 @@ async def get_context_windows(_request: web.Request) -> web.Response: # truth directly from the compressor rather than pretending the saved # restart-bound value is effective. if effective_compression is not None: - runtime_ceiling = effective_compression.get("max_context_chars") + # Disabled-at-boot means the runtime has no compressor and generation + # applies no explicit ceiling. The saved scalar remains configuration, + # not runtime policy, until compression is enabled by a restart. + runtime_ceiling = ( + effective_compression.get("max_context_chars") + if effective_compression.get("enabled") + else None + ) else: compressor = getattr(bot, "context_compressor", None) # Production stores the boot-frozen ContextCompressionConfig object @@ -983,10 +990,14 @@ async def get_context_windows(_request: web.Request) -> web.Response: runtime_available = runtime_cfg is not None and hasattr( runtime_cfg, "max_context_chars" ) + # With no boot snapshot and no runtime compressor, the only safe + # runtime ceiling is none: generation applies the model-derived + # target. Restart-pending provenance remains unknown rather than + # guessing from a mutable saved config object. runtime_ceiling = ( getattr(runtime_cfg, "max_context_chars", None) if runtime_available - else configured_ceiling + else None ) ceiling_pending_restart = ( runtime_ceiling != configured_ceiling if runtime_available else None diff --git a/tests/characterization/test_autonomous_loop.py b/tests/characterization/test_autonomous_loop.py index 3b357e6d..d5102f51 100644 --- a/tests/characterization/test_autonomous_loop.py +++ b/tests/characterization/test_autonomous_loop.py @@ -5,6 +5,7 @@ from __future__ import annotations +import asyncio from unittest.mock import AsyncMock import pytest @@ -65,6 +66,71 @@ async def test_natural_finish_returns_final_text(self): assert result == "iteration complete" assert len(fake.calls) == 2 + async def test_stop_loop_tool_self_stop_settles_without_cancellation_cycle(self): + """The REAL loop tool path runs stop_loop in a gather child task. + + Logical loop ownership, not asyncio.current_task identity, must make + this cooperative self-stop. It must return from the native handler, + settle the manager task, and never start another model attempt. + """ + bot = None + + def stop_current_loop(): + assert bot is not None + loop_id = next(iter(bot.loop_manager._loops)) + return tool_call_response(("stop_loop", {"loop_id": loop_id})) + + bot, fake = build([stop_current_loop]) + stop_entered = asyncio.Event() + release_stop = asyncio.Event() + real_stop = bot.loop_manager.stop_loop + + async def barrier_stop(loop_id): + stop_entered.set() + await release_stop.wait() + return await real_stop(loop_id) + + # Keep the production native-dispatch path intact; this barrier only + # holds the real manager call long enough to expose parent/child task + # topology deterministically. + bot.loop_manager.stop_loop = barrier_stop + channel = FakeChannel(id=777) + message = type( + "LoopStartMessage", + (), + { + "channel": channel, + "author": type( + "LoopStartAuthor", + (), + {"id": 4242, "__str__": lambda self: "tester"}, + )(), + }, + )() + started = bot.agent_task_tools._handle_start_loop( + message, + { + "goal": "stop yourself through the tool path", + "interval_seconds": 10, + "mode": "silent", + "max_iterations": 2, + }, + ) + assert started.startswith("Loop started") + loop_id = next(iter(bot.loop_manager._loops)) + task = bot.loop_manager._loops[loop_id]._task + assert task is not None + await asyncio.wait_for(stop_entered.wait(), timeout=2) + assert not task.done() + release_stop.set() + + await asyncio.wait_for(task, timeout=2) + + assert task.done() + assert bot.loop_manager._loops[loop_id].status == "stopped" + assert bot.loop_manager._loops[loop_id]._cancel_event.is_set() + assert len(fake.calls) == 1 + async def test_prev_context_synthetic_exchange_shape(self): bot, fake = build([text_response("ok")]) await run_iteration(bot, prompt="continue the work", prev="found 3 issues") diff --git a/tests/test_config_ceiling_migration.py b/tests/test_config_ceiling_migration.py index 38baf39e..6ae829a2 100644 --- a/tests/test_config_ceiling_migration.py +++ b/tests/test_config_ceiling_migration.py @@ -14,6 +14,8 @@ import json import logging import os +import threading +from concurrent.futures import ThreadPoolExecutor from datetime import UTC, datetime import pytest @@ -695,6 +697,130 @@ def spy_close(fd): assert closed assert not list(tmp_path.glob("*.tmp")) +class TestLegacyMarkerClaim: + def test_invalid_and_unreadable_claims_fail_closed(self, tmp_path, monkeypatch): + import src.config.migrations as migrations + + legacy = tmp_path / "context_ceiling_migration.json" + claim = migrations._legacy_claim_path(legacy) + claim.write_text("not-a-config-id\n") + with pytest.raises(MigrationCompletionError, match="claim is invalid"): + migrations._read_claim_owner(claim) + + real_read = type(claim).read_text + + def unreadable(self, *args, **kwargs): + if self == claim: + raise OSError("unreadable") + return real_read(self, *args, **kwargs) + + monkeypatch.setattr(type(claim), "read_text", unreadable) + with pytest.raises(MigrationCompletionError, match="claim is invalid"): + migrations._read_claim_owner(claim) + + def test_claim_fchmod_failure_closes_fd_and_removes_temp(self, tmp_path, monkeypatch): + import src.config.migrations as migrations + + legacy = tmp_path / "context_ceiling_migration.json" + closed = [] + real_close = os.close + + def fail_fchmod(_fd, _mode): + raise OSError("fchmod failed") + + def spy_close(fd): + closed.append(fd) + return real_close(fd) + + monkeypatch.setattr(migrations.os, "fchmod", fail_fchmod) + monkeypatch.setattr(migrations.os, "close", spy_close) + with pytest.raises(MigrationCompletionError, match="could not claim"): + migrations._claim_legacy_marker(legacy, "a" * 64) + assert closed + assert not list(tmp_path.glob("*.tmp")) + + def test_claim_stream_failure_closes_stream_and_removes_temp(self, tmp_path, monkeypatch): + import src.config.migrations as migrations + + legacy = tmp_path / "context_ceiling_migration.json" + + class BrokenStream: + def __init__(self, fd): + self.fd = fd + self.closed = False + + def __enter__(self): + return self + + def __exit__(self, *_args): + return None + + def write(self, _value): + raise OSError("write failed") + + def close(self): + if not self.closed: + os.close(self.fd) + self.closed = True + + streams = [] + + def broken_fdopen(fd, *_args, **_kwargs): + stream = BrokenStream(fd) + streams.append(stream) + return stream + + monkeypatch.setattr(migrations.os, "fdopen", broken_fdopen) + with pytest.raises(MigrationCompletionError, match="could not claim"): + migrations._claim_legacy_marker(legacy, "a" * 64) + assert streams[0].closed is True + assert not list(tmp_path.glob("*.tmp")) + + def test_foreign_claim_does_not_launder_corrupt_legacy_marker(self, tmp_path): + import src.config.migrations as migrations + + path = tmp_path / "config.yml" + path.write_text(_LEGACY_YAML) + legacy = tmp_path / "data" / "context_ceiling_migration.json" + legacy.parent.mkdir() + legacy.write_text("{broken") + assert migrations._claim_legacy_marker(legacy, "f" * 64) + + with pytest.raises(MigrationCompletionError, match="legacy ceiling-migration"): + _migrate(path) + + def test_existing_foreign_claim_forces_own_literal_migration(self, tmp_path): + import src.config.migrations as migrations + + first = tmp_path / "first.yml" + second = tmp_path / "second.yml" + first.write_text(_LEGACY_YAML) + second.write_text(_LEGACY_YAML) + legacy = tmp_path / "data" / "context_ceiling_migration.json" + legacy.parent.mkdir() + legacy.write_text( + json.dumps( + { + "version": 2, + "migration": "legacy_max_context_chars_to_auto", + "state": "completed", + "reason": "not_applicable", + "completed_at": datetime.now(UTC).isoformat(), + } + ) + ) + assert migrations._claim_legacy_marker( + legacy, migrations._config_identity(first) + ) + + second_data = _migrate(second) + + assert second_data["openai_codex"]["context_compression"]["max_context_chars"] is None + assert yaml.safe_load(second.read_text())["openai_codex"]["context_compression"][ + "max_context_chars" + ] is None + + class TestConfigIdentityBinding: def test_symlink_aliases_in_different_directories_share_completion(self, tmp_path): real_dir = tmp_path / "real" @@ -751,6 +877,62 @@ def test_distinct_configs_in_one_directory_do_not_share_completion(self, tmp_pat second_record = json.loads(ceiling_marker_path(second).read_text()) assert first_record["config_id"] != second_record["config_id"] + def test_concurrent_siblings_cannot_both_adopt_one_legacy_marker( + self, tmp_path, monkeypatch + ): + """The exact integration race: both readers reach claim together.""" + import src.config.migrations as migrations + + first = tmp_path / "first.yml" + second = tmp_path / "second.yml" + first.write_text(_LEGACY_YAML) + second.write_text(_LEGACY_YAML) + legacy = tmp_path / "data" / "context_ceiling_migration.json" + legacy.parent.mkdir() + legacy.write_text( + json.dumps( + { + "version": 2, + "migration": "legacy_max_context_chars_to_auto", + "state": "completed", + "reason": "not_applicable", + "completed_at": datetime.now(UTC).isoformat(), + } + ) + ) + barrier = threading.Barrier(2) + real_claim = migrations._claim_legacy_marker + + def synchronized_claim(marker, config_id): + barrier.wait(timeout=2) + return real_claim(marker, config_id) + + monkeypatch.setattr(migrations, "_claim_legacy_marker", synchronized_claim) + with ThreadPoolExecutor(max_workers=2) as executor: + first_future = executor.submit(_migrate, first) + second_future = executor.submit(_migrate, second) + results = [first_future.result(timeout=3), second_future.result(timeout=3)] + + values = sorted( + result["openai_codex"]["context_compression"]["max_context_chars"] + if result["openai_codex"]["context_compression"]["max_context_chars"] is not None + else -1 + for result in results + ) + assert values == [-1, 750_000] + disk_values = { + yaml.safe_load(path.read_text())["openai_codex"]["context_compression"][ + "max_context_chars" + ] + for path in (first, second) + } + assert disk_values == {None, 750_000} + first_record = json.loads(ceiling_marker_path(first).read_text()) + second_record = json.loads(ceiling_marker_path(second).read_text()) + assert first_record["config_id"] != second_record["config_id"] + bound = json.loads(legacy.read_text()) + assert bound["config_id"] in {first_record["config_id"], second_record["config_id"]} + def test_preidentity_directory_marker_is_bound_not_shared(self, tmp_path): first = tmp_path / "first.yml" second = tmp_path / "second.yml" @@ -822,21 +1004,28 @@ def fail_second_read(self, *args, **kwargs): with pytest.raises(MigrationCompletionError): _migrate(path) - def test_identity_directory_inspection_failure_is_fail_closed(self, tmp_path, monkeypatch): + def test_unrelated_identity_directory_debris_does_not_change_adoption(self, tmp_path): path = tmp_path / "config.yml" path.write_text(_LEGACY_YAML) marker = ceiling_marker_path(path) marker.parent.mkdir(parents=True) - real_iterdir = type(marker).iterdir + (marker.parent / "unrelated.tmp").write_text("debris") + legacy = tmp_path / "data" / "context_ceiling_migration.json" + legacy.write_text( + json.dumps( + { + "version": 2, + "migration": "legacy_max_context_chars_to_auto", + "state": "completed", + "reason": "not_applicable", + "completed_at": datetime.now(UTC).isoformat(), + } + ) + ) - def fail_iterdir(self): - if self == marker.parent: - raise OSError("cannot inspect") - return real_iterdir(self) + data = _migrate(path) - monkeypatch.setattr(type(marker), "iterdir", fail_iterdir) - with pytest.raises(MigrationCompletionError, match="inspect identity-bound"): - _migrate(path) + assert data["openai_codex"]["context_compression"]["max_context_chars"] == 750_000 def test_corrupt_bound_legacy_marker_is_fail_closed(self, tmp_path): path = tmp_path / "config.yml" diff --git a/tests/test_scheduler_agents_reliability.py b/tests/test_scheduler_agents_reliability.py index 4ae6eef5..5ec4b5c2 100644 --- a/tests/test_scheduler_agents_reliability.py +++ b/tests/test_scheduler_agents_reliability.py @@ -397,6 +397,89 @@ async def _recovering(_prompt, _channel, _prev, cancel_event): await asyncio.sleep(0) assert effects == [] +async def test_self_stop_single_direct_callback_uses_logical_owner(): + manager = LoopManager() + outcome: list[str] = [] + holder: dict[str, str] = {} + + async def _self_stop(_prompt, _channel, _prev, cancel_event): + assert not cancel_event.is_set() + outcome.append(await manager.stop_loop(holder["id"])) + return "settled" + + loop_id = manager.start_loop( + goal="g", + channel=_SilentChannel(), + requester_id="u", + requester_name="U", + iteration_callback=_self_stop, + interval_seconds=10, + mode="silent", + max_iterations=2, + ) + holder["id"] = loop_id + task = manager._loops[loop_id]._task + assert task is not None + await asyncio.wait_for(task, timeout=2) + + assert outcome == [f"Loop `{loop_id}` stop requested."] + assert manager._loops[loop_id].status == "stopped" + + +async def test_stop_all_from_one_loop_cancels_and_awaits_other_loops(): + manager = LoopManager() + other_started = asyncio.Event() + other_cancelled = asyncio.Event() + release_self = asyncio.Event() + outcome: list[str] = [] + + async def _other(_prompt, _channel, _prev, cancel_event): + other_started.set() + try: + await asyncio.sleep(3600) + except asyncio.CancelledError: + assert cancel_event.is_set() + other_cancelled.set() + raise + + other_id = manager.start_loop( + goal="other", + channel=_SilentChannel(), + requester_id="u", + requester_name="U", + iteration_callback=_other, + interval_seconds=10, + mode="silent", + max_iterations=2, + ) + await asyncio.wait_for(other_started.wait(), timeout=2) + + async def _self(_prompt, _channel, _prev, _cancel): + await release_self.wait() + outcome.append(await manager.stop_loop("all")) + return "settled" + + self_id = manager.start_loop( + goal="self", + channel=_SilentChannel(), + requester_id="u", + requester_name="U", + iteration_callback=_self, + interval_seconds=10, + mode="silent", + max_iterations=2, + ) + release_self.set() + self_task = manager._loops[self_id]._task + assert self_task is not None + await asyncio.wait_for(self_task, timeout=2) + + assert other_cancelled.is_set() + assert manager._loops[other_id].status == "stopped" + assert manager._loops[self_id].status == "stopped" + assert outcome == [f"Stop requested for 2 loop(s): {other_id}, {self_id}"] + + async def test_self_stop_all_never_awaits_its_own_manager_task(): manager = LoopManager() outcome: list[str] = [] diff --git a/tests/test_window_observer.py b/tests/test_window_observer.py index 1a90d4b3..19e8b012 100644 --- a/tests/test_window_observer.py +++ b/tests/test_window_observer.py @@ -931,6 +931,69 @@ async def test_get_without_boot_snapshot_uses_configured_runtime_truth(self, tmp assert body["runtime_max_context_chars"] == 500_000 assert body["max_context_chars_pending_restart"] is False + async def test_disabled_at_boot_reports_model_derived_runtime_target(self, tmp_path): + """A saved ceiling is inert when boot disabled the compressor.""" + from src.web.api.llm_admin import register_context_windows + + observer = _observer(tmp_path) + saved = ContextCompressionConfig(enabled=False, max_context_chars=500_000) + bot = SimpleNamespace( + config=SimpleNamespace( + openai_codex=SimpleNamespace( + context_budget_overrides={}, + context_utilization=60, + context_compression=saved, + ) + ), + context_compressor=None, + services=SimpleNamespace(window_observer=observer), + ) + bot.boot_config_snapshot = { + "openai_codex": {"context_compression": saved.model_dump()} + } + routes = web.RouteTableDef() + register_context_windows(routes, bot) + app = web.Application() + app.router.add_routes(routes) + async with TestClient(TestServer(app)) as client: + body = await (await client.get("/api/context/windows")).json() + + assert body["max_context_chars"] == 500_000 + assert body["runtime_max_context_chars"] is None + assert body["max_context_chars_pending_restart"] is False + assert body["models"]["gpt-5.6-sol"]["configured"]["primary_chars"] == 500_000 + assert body["models"]["gpt-5.6-sol"]["effective"]["primary_chars"] == 1_277_400 + + async def test_disabled_without_boot_snapshot_still_reports_runtime_truth( + self, tmp_path + ): + """No compressor means model-derived runtime math, never saved math.""" + from src.web.api.llm_admin import register_context_windows + + observer = _observer(tmp_path) + saved = ContextCompressionConfig(enabled=False, max_context_chars=500_000) + bot = SimpleNamespace( + config=SimpleNamespace( + openai_codex=SimpleNamespace( + context_budget_overrides={}, + context_utilization=60, + context_compression=saved, + ) + ), + context_compressor=None, + services=SimpleNamespace(window_observer=observer), + ) + routes = web.RouteTableDef() + register_context_windows(routes, bot) + app = web.Application() + app.router.add_routes(routes) + async with TestClient(TestServer(app)) as client: + body = await (await client.get("/api/context/windows")).json() + + assert body["runtime_max_context_chars"] is None + assert body["max_context_chars_pending_restart"] is None + assert body["models"]["gpt-5.6-sol"]["effective"]["primary_chars"] == 1_277_400 + async def test_get_prefers_boot_snapshot_for_runtime_ceiling(self, tmp_path): from src.web.api.llm_admin import register_context_windows diff --git a/ui/dist/assets/index-1m7Kadw1.js b/ui/dist/assets/index-0WAOnBOa.js similarity index 80% rename from ui/dist/assets/index-1m7Kadw1.js rename to ui/dist/assets/index-0WAOnBOa.js index 5f9eaac0..43ce8914 100644 --- a/ui/dist/assets/index-1m7Kadw1.js +++ b/ui/dist/assets/index-0WAOnBOa.js @@ -1,40 +1,40 @@ -var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var rt=(e,t,s)=>Km(e,typeof t!="symbol"?t+"":t,s);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=s(a);fetch(a.href,i)}})();class Wm{constructor(){this._persist=localStorage.getItem("odin_persist")==="1",this._token=this._persist?localStorage.getItem("odin_token")||"":sessionStorage.getItem("odin_token")||"";const t=this._persist?localStorage:sessionStorage;this._sessionTimeout=parseInt(t.getItem("odin_session_timeout")||"0",10),this._lastActivity=Date.now(),this._activityTimer=null,this.onSessionExpired=null,this._token&&this._sessionTimeout>0&&this._startActivityMonitor()}get token(){return this._token}get sessionTimeout(){return this._sessionTimeout}setToken(t,s=0){if(this._token=t,this._sessionTimeout=s,this._lastActivity=Date.now(),t){const n=this._persist?localStorage:sessionStorage;n.setItem("odin_token",t),this._persist&&localStorage.setItem("odin_persist","1"),s>0?n.setItem("odin_session_timeout",String(s)):n.removeItem("odin_session_timeout"),this._startActivityMonitor()}else sessionStorage.removeItem("odin_token"),sessionStorage.removeItem("odin_session_timeout"),localStorage.removeItem("odin_token"),localStorage.removeItem("odin_persist"),localStorage.removeItem("odin_session_timeout"),this._stopActivityMonitor()}setPersist(t){this._persist=t}_startActivityMonitor(){this._stopActivityMonitor(),!(this._sessionTimeout<=0)&&(this._activityTimer=setInterval(()=>{(Date.now()-this._lastActivity)/1e3>=this._sessionTimeout&&(this._stopActivityMonitor(),this.onSessionExpired&&this.onSessionExpired())},1e4))}_stopActivityMonitor(){this._activityTimer&&(clearInterval(this._activityTimer),this._activityTimer=null)}_headers(t={}){const s={"Content-Type":"application/json",...t};return this._token&&(s.Authorization=`Bearer ${this._token}`),s}async _request(t,s,n=null,{signal:a}={}){this._lastActivity=Date.now();const i={method:t,headers:this._headers(),signal:a};n!==null&&(i.body=JSON.stringify(n));const l=await fetch(s,i);if(l.status===401)throw new ol("Unauthorized");const r=await l.json().catch(()=>null);if(!l.ok){const o=(r==null?void 0:r.error)||`HTTP ${l.status}`;throw new ld(o,l.status,r)}return r}get(t,s={}){return this._request("GET",t,null,s)}async getBlob(t){this._lastActivity=Date.now();const s=await fetch(t,{method:"GET",headers:this._headers()});if(s.status===401)throw new ol("Unauthorized");if(!s.ok){const n=await s.json().catch(()=>null);throw new ld((n==null?void 0:n.error)||`HTTP ${s.status}`,s.status,n)}return s.blob()}post(t,s){return this._request("POST",t,s)}put(t,s){return this._request("PUT",t,s)}del(t){return this._request("DELETE",t)}async login(t){const s=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t})}),n=await s.json().catch(()=>null);if(!s.ok)throw new ol((n==null?void 0:n.error)||"Login failed");return this.setToken(n.session_id,n.timeout_seconds||0),n}async logout(){try{await this.post("/api/auth/logout",{})}catch{}this.setToken("")}async check(){try{return await this.get("/api/status"),{ok:!0,needsAuth:!1}}catch(t){return t instanceof ol?{ok:!1,needsAuth:!0}:{ok:!1,needsAuth:!1,error:t.message}}}}class ol extends Error{constructor(t){super(t),this.name="AuthError"}}class ld extends Error{constructor(t,s,n){super(t),this.name="ApiError",this.status=s,this.data=n}}class Zm{constructor(t){this._api=t,this._ws=null,this._handlers={logs:[],events:[],chat:[]},this._reconnectDelay=1e3,this._maxReconnectDelay=3e4,this._shouldConnect=!1,this._subscriptions=new Set,this._reconnectAttempt=0,this._lastPongTime=0,this._pingInterval=null,this._latency=-1,this._chatPending=!1,this._state="disconnected",this.onStatusChange=null,this.onStateChange=null,this.onLatency=null}get connected(){var t;return((t=this._ws)==null?void 0:t.readyState)===WebSocket.OPEN}get state(){return this._state}get reconnectAttempt(){return this._reconnectAttempt}get latency(){return this._latency}_resetLatency(){if(this._latency=-1,this.onLatency)try{this.onLatency(-1)}catch{}}connect(){this._shouldConnect=!0,this._setState("connecting"),this._open()}disconnect(){this._shouldConnect=!1,this._reconnectAttempt=0,this._resetLatency(),this._stopPing(),this._ws&&(this._ws.close(),this._ws=null),this._setState("disconnected")}_setState(t){this._state!==t&&(this._state=t,this.onStateChange&&this.onStateChange(t,{attempt:this._reconnectAttempt,latency:this._latency}))}_startPing(){this._stopPing(),this._pingInterval=setInterval(()=>{if(this.connected)try{this._ws.send(JSON.stringify({type:"ping",ts:Date.now()}))}catch{}},15e3)}_stopPing(){this._pingInterval&&(clearInterval(this._pingInterval),this._pingInterval=null)}subscribe(t,s){this._handlers[t]||(this._handlers[t]=[]),this._handlers[t].push(s),t!=="chat"&&(this._subscriptions.add(t),this.connected&&this._ws.send(JSON.stringify({subscribe:t})))}unsubscribe(t,s){const n=this._handlers[t];if(n){const a=n.indexOf(s);a>=0&&n.splice(a,1),n.length===0&&t!=="chat"&&(this._subscriptions.delete(t),this.connected&&this._ws.send(JSON.stringify({unsubscribe:t})))}}on(t,s){return this.subscribe(t,s)}off(t,s){return this.unsubscribe(t,s)}sendChat(t,{channelId:s,userId:n,username:a}={}){return this.connected?(this._ws.send(JSON.stringify({type:"chat",content:t,channel_id:s||"web-default",user_id:n||void 0,username:a||void 0})),this._chatPending=!0,!0):!1}_open(){if(this._ws)return;let s=`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/api/ws`;this._api.token&&(s+=`?token=${encodeURIComponent(this._api.token)}`);const n=new WebSocket(s);this._ws=n;const a=()=>this._ws===n;n.onopen=()=>{if(a()){this._reconnectDelay=1e3,this._reconnectAttempt=0;for(const i of this._subscriptions)n.send(JSON.stringify({subscribe:i}));this._startPing(),this._setState("connected"),this.onStatusChange&&this.onStatusChange(!0)}},n.onmessage=i=>{if(!a())return;let l;try{l=JSON.parse(i.data)}catch{return}const r=l.type;if(r==="pong"){if(l.ts&&(this._latency=Date.now()-l.ts,this._lastPongTime=Date.now(),this.onLatency))try{this.onLatency(this._latency)}catch{}return}if(r==="log")for(const o of this._handlers.logs||[])o(l);else if(r==="event")for(const o of this._handlers.events||[])o(l);else if(r==="chat_response"||r==="chat_error"){this._chatPending=!1;for(const o of this._handlers.chat||[])o(l)}},n.onclose=()=>{if(a()){if(this._ws=null,this._stopPing(),this._resetLatency(),this._chatPending){this._chatPending=!1;const i={type:"chat_error",error:"Connection lost — the response may still complete; check session history."};for(const l of this._handlers.chat||[])l(i)}this.onStatusChange&&this.onStatusChange(!1),this._shouldConnect?(this._reconnectAttempt++,this._setState("reconnecting"),setTimeout(()=>this._open(),this._reconnectDelay),this._reconnectDelay=Math.min(this._reconnectDelay*2,this._maxReconnectDelay)):this._setState("disconnected")}},n.onerror=()=>{}}}const K=new Wm,Ke=new Zm(K);/** +var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var rt=(e,t,s)=>Km(e,typeof t!="symbol"?t+"":t,s);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=s(a);fetch(a.href,i)}})();class Wm{constructor(){this._persist=localStorage.getItem("odin_persist")==="1",this._token=this._persist?localStorage.getItem("odin_token")||"":sessionStorage.getItem("odin_token")||"";const t=this._persist?localStorage:sessionStorage;this._sessionTimeout=parseInt(t.getItem("odin_session_timeout")||"0",10),this._lastActivity=Date.now(),this._activityTimer=null,this.onSessionExpired=null,this._token&&this._sessionTimeout>0&&this._startActivityMonitor()}get token(){return this._token}get sessionTimeout(){return this._sessionTimeout}setToken(t,s=0){if(this._token=t,this._sessionTimeout=s,this._lastActivity=Date.now(),t){const n=this._persist?localStorage:sessionStorage;n.setItem("odin_token",t),this._persist&&localStorage.setItem("odin_persist","1"),s>0?n.setItem("odin_session_timeout",String(s)):n.removeItem("odin_session_timeout"),this._startActivityMonitor()}else sessionStorage.removeItem("odin_token"),sessionStorage.removeItem("odin_session_timeout"),localStorage.removeItem("odin_token"),localStorage.removeItem("odin_persist"),localStorage.removeItem("odin_session_timeout"),this._stopActivityMonitor()}setPersist(t){this._persist=t}_startActivityMonitor(){this._stopActivityMonitor(),!(this._sessionTimeout<=0)&&(this._activityTimer=setInterval(()=>{(Date.now()-this._lastActivity)/1e3>=this._sessionTimeout&&(this._stopActivityMonitor(),this.onSessionExpired&&this.onSessionExpired())},1e4))}_stopActivityMonitor(){this._activityTimer&&(clearInterval(this._activityTimer),this._activityTimer=null)}_headers(t={}){const s={"Content-Type":"application/json",...t};return this._token&&(s.Authorization=`Bearer ${this._token}`),s}async _request(t,s,n=null,{signal:a}={}){this._lastActivity=Date.now();const i={method:t,headers:this._headers(),signal:a};n!==null&&(i.body=JSON.stringify(n));const l=await fetch(s,i);if(l.status===401)throw new ol("Unauthorized");const r=await l.json().catch(()=>null);if(!l.ok){const o=(r==null?void 0:r.error)||`HTTP ${l.status}`;throw new ld(o,l.status,r)}return r}get(t,s={}){return this._request("GET",t,null,s)}async getBlob(t){this._lastActivity=Date.now();const s=await fetch(t,{method:"GET",headers:this._headers()});if(s.status===401)throw new ol("Unauthorized");if(!s.ok){const n=await s.json().catch(()=>null);throw new ld((n==null?void 0:n.error)||`HTTP ${s.status}`,s.status,n)}return s.blob()}post(t,s){return this._request("POST",t,s)}put(t,s){return this._request("PUT",t,s)}del(t){return this._request("DELETE",t)}async login(t){const s=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t})}),n=await s.json().catch(()=>null);if(!s.ok)throw new ol((n==null?void 0:n.error)||"Login failed");return this.setToken(n.session_id,n.timeout_seconds||0),n}async logout(){try{await this.post("/api/auth/logout",{})}catch{}this.setToken("")}async check(){try{return await this.get("/api/status"),{ok:!0,needsAuth:!1}}catch(t){return t instanceof ol?{ok:!1,needsAuth:!0}:{ok:!1,needsAuth:!1,error:t.message}}}}class ol extends Error{constructor(t){super(t),this.name="AuthError"}}class ld extends Error{constructor(t,s,n){super(t),this.name="ApiError",this.status=s,this.data=n}}class Zm{constructor(t){this._api=t,this._ws=null,this._handlers={logs:[],events:[],chat:[]},this._reconnectDelay=1e3,this._maxReconnectDelay=3e4,this._shouldConnect=!1,this._subscriptions=new Set,this._reconnectAttempt=0,this._lastPongTime=0,this._pingInterval=null,this._latency=-1,this._chatPending=!1,this._state="disconnected",this.onStatusChange=null,this.onStateChange=null,this.onLatency=null}get connected(){var t;return((t=this._ws)==null?void 0:t.readyState)===WebSocket.OPEN}get state(){return this._state}get reconnectAttempt(){return this._reconnectAttempt}get latency(){return this._latency}_resetLatency(){if(this._latency=-1,this.onLatency)try{this.onLatency(-1)}catch{}}connect(){this._shouldConnect=!0,this._setState("connecting"),this._open()}disconnect(){this._shouldConnect=!1,this._reconnectAttempt=0,this._resetLatency(),this._stopPing(),this._ws&&(this._ws.close(),this._ws=null),this._setState("disconnected")}_setState(t){this._state!==t&&(this._state=t,this.onStateChange&&this.onStateChange(t,{attempt:this._reconnectAttempt,latency:this._latency}))}_startPing(){this._stopPing(),this._pingInterval=setInterval(()=>{if(this.connected)try{this._ws.send(JSON.stringify({type:"ping",ts:Date.now()}))}catch{}},15e3)}_stopPing(){this._pingInterval&&(clearInterval(this._pingInterval),this._pingInterval=null)}subscribe(t,s){this._handlers[t]||(this._handlers[t]=[]),this._handlers[t].push(s),t!=="chat"&&(this._subscriptions.add(t),this.connected&&this._ws.send(JSON.stringify({subscribe:t})))}unsubscribe(t,s){const n=this._handlers[t];if(n){const a=n.indexOf(s);a>=0&&n.splice(a,1),n.length===0&&t!=="chat"&&(this._subscriptions.delete(t),this.connected&&this._ws.send(JSON.stringify({unsubscribe:t})))}}on(t,s){return this.subscribe(t,s)}off(t,s){return this.unsubscribe(t,s)}sendChat(t,{channelId:s,userId:n,username:a}={}){return this.connected?(this._ws.send(JSON.stringify({type:"chat",content:t,channel_id:s||"web-default",user_id:n||void 0,username:a||void 0})),this._chatPending=!0,!0):!1}_open(){if(this._ws)return;let s=`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/api/ws`;this._api.token&&(s+=`?token=${encodeURIComponent(this._api.token)}`);const n=new WebSocket(s);this._ws=n;const a=()=>this._ws===n;n.onopen=()=>{if(a()){this._reconnectDelay=1e3,this._reconnectAttempt=0;for(const i of this._subscriptions)n.send(JSON.stringify({subscribe:i}));this._startPing(),this._setState("connected"),this.onStatusChange&&this.onStatusChange(!0)}},n.onmessage=i=>{if(!a())return;let l;try{l=JSON.parse(i.data)}catch{return}const r=l.type;if(r==="pong"){if(l.ts&&(this._latency=Date.now()-l.ts,this._lastPongTime=Date.now(),this.onLatency))try{this.onLatency(this._latency)}catch{}return}if(r==="log")for(const o of this._handlers.logs||[])o(l);else if(r==="event")for(const o of this._handlers.events||[])o(l);else if(r==="chat_response"||r==="chat_error"){this._chatPending=!1;for(const o of this._handlers.chat||[])o(l)}},n.onclose=()=>{if(a()){if(this._ws=null,this._stopPing(),this._resetLatency(),this._chatPending){this._chatPending=!1;const i={type:"chat_error",error:"Connection lost — the response may still complete; check session history."};for(const l of this._handlers.chat||[])l(i)}this.onStatusChange&&this.onStatusChange(!1),this._shouldConnect?(this._reconnectAttempt++,this._setState("reconnecting"),setTimeout(()=>this._open(),this._reconnectDelay),this._reconnectDelay=Math.min(this._reconnectDelay*2,this._maxReconnectDelay)):this._setState("disconnected")}},n.onerror=()=>{}}}const G=new Wm,Ke=new Zm(G);/** * @vue/shared v3.5.38 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function ws(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const je={},Oa=[],Ut=()=>{},Ra=()=>!1,oa=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cr=e=>e.startsWith("onUpdate:"),ze=Object.assign,Jo=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Jm=Object.prototype.hasOwnProperty,et=(e,t)=>Jm.call(e,t),xe=Array.isArray,Na=e=>Xa(e)==="[object Map]",ca=e=>Xa(e)==="[object Set]",rd=e=>Xa(e)==="[object Date]",Ym=e=>Xa(e)==="[object RegExp]",Re=e=>typeof e=="function",Me=e=>typeof e=="string",Wt=e=>typeof e=="symbol",Qe=e=>e!==null&&typeof e=="object",Yo=e=>(Qe(e)||Re(e))&&Re(e.then)&&Re(e.catch),df=Object.prototype.toString,Xa=e=>df.call(e),Qm=e=>Xa(e).slice(8,-1),dr=e=>Xa(e)==="[object Object]",ur=e=>Me(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xn=ws(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xm=ws("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),fr=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},eg=/-\w/g,it=fr(e=>e.replace(eg,t=>t.slice(1).toUpperCase())),tg=/\B([A-Z])/g,hs=fr(e=>e.replace(tg,"-$1").toLowerCase()),da=fr(e=>e.charAt(0).toUpperCase()+e.slice(1)),La=fr(e=>e?`on${da(e)}`:""),Lt=(e,t)=>!Object.is(e,t),Da=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},pr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ll=e=>{const t=Me(e)?Number(e):NaN;return isNaN(t)?e:t};let od;const hr=()=>od||(od=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function sg(e,t){return e+JSON.stringify(t,(s,n)=>typeof n=="function"?n.toString():n)}const ng="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",ag=ws(ng);function Zi(e){if(xe(e)){const t={};for(let s=0;s{if(s){const n=s.split(lg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ji(e){let t="";if(Me(e))t=e;else if(xe(e))for(let s=0;sSn(s,t))}const hf=e=>!!(e&&e.__v_isRef===!0),mf=e=>Me(e)?e:e==null?"":xe(e)||Qe(e)&&(e.toString===df||!Re(e.toString))?hf(e)?mf(e.value):JSON.stringify(e,gf,2):String(e),gf=(e,t)=>hf(t)?gf(e,t.value):Na(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,a],i)=>(s[Ur(n,i)+" =>"]=a,s),{})}:ca(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ur(s))}:Wt(t)?Ur(t):Qe(t)&&!xe(t)&&!dr(t)?String(t):t,Ur=(e,t="")=>{var s;return Wt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};function xg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** +**/function ks(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const je={},Na=[],Ht=()=>{},Ia=()=>!1,ca=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cr=e=>e.startsWith("onUpdate:"),ze=Object.assign,Jo=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Jm=Object.prototype.hasOwnProperty,tt=(e,t)=>Jm.call(e,t),be=Array.isArray,La=e=>ei(e)==="[object Map]",da=e=>ei(e)==="[object Set]",rd=e=>ei(e)==="[object Date]",Ym=e=>ei(e)==="[object RegExp]",Ie=e=>typeof e=="function",Me=e=>typeof e=="string",Jt=e=>typeof e=="symbol",Xe=e=>e!==null&&typeof e=="object",Yo=e=>(Xe(e)||Ie(e))&&Ie(e.then)&&Ie(e.catch),df=Object.prototype.toString,ei=e=>df.call(e),Qm=e=>ei(e).slice(8,-1),dr=e=>ei(e)==="[object Object]",ur=e=>Me(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bn=ks(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xm=ks("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),fr=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},eg=/-\w/g,it=fr(e=>e.replace(eg,t=>t.slice(1).toUpperCase())),tg=/\B([A-Z])/g,ps=fr(e=>e.replace(tg,"-$1").toLowerCase()),ua=fr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Da=fr(e=>e?`on${ua(e)}`:""),Lt=(e,t)=>!Object.is(e,t),Ma=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},pr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ll=e=>{const t=Me(e)?Number(e):NaN;return isNaN(t)?e:t};let od;const hr=()=>od||(od=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function sg(e,t){return e+JSON.stringify(t,(s,n)=>typeof n=="function"?n.toString():n)}const ng="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",ag=ks(ng);function Ji(e){if(be(e)){const t={};for(let s=0;s{if(s){const n=s.split(lg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Yi(e){let t="";if(Me(e))t=e;else if(be(e))for(let s=0;skn(s,t))}const hf=e=>!!(e&&e.__v_isRef===!0),mf=e=>Me(e)?e:e==null?"":be(e)||Xe(e)&&(e.toString===df||!Ie(e.toString))?hf(e)?mf(e.value):JSON.stringify(e,gf,2):String(e),gf=(e,t)=>hf(t)?gf(e,t.value):La(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,a],i)=>(s[Ur(n,i)+" =>"]=a,s),{})}:da(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ur(s))}:Jt(t)?Ur(t):Xe(t)&&!be(t)&&!dr(t)?String(t):t,Ur=(e,t="")=>{var s;return Jt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};function xg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** * @vue/reactivity v3.5.38 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Rt;class Qo{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Rt&&(Rt.active?(this.parent=Rt,this.index=(Rt.scopes||(Rt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t0&&--this._on===0){if(Rt===this)Rt=this.prevScope;else{let t=Rt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s0)return;if(_i){let t=_i;for(_i=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;xi;){let t=xi;for(xi=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function xf(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function _f(e){let t,s=e.depsTail,n=s;for(;n;){const a=n.prevDep;n.version===-1?(n===s&&(s=a),tc(n),wg(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=a}e.deps=t,e.depsTail=s}function mo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(kf(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function kf(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ni)||(e.globalVersion=Ni,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!mo(e))))return;e.flags|=2;const t=e.dep,s=ot,n=zs;ot=e,zs=!0;try{xf(e);const a=e.fn(e._value);(t.version===0||Lt(a,e._value))&&(e.flags|=128,e._value=a,t.version++)}catch(a){throw t.version++,a}finally{ot=s,zs=n,_f(e),e.flags&=-3}}function tc(e,t=!1){const{dep:s,prevSub:n,nextSub:a}=e;if(n&&(n.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)tc(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function wg(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}function Sg(e,t){e.effect instanceof Oi&&(e=e.effect.fn);const s=new Oi(e);t&&ze(s,t);try{s.run()}catch(a){throw s.stop(),a}const n=s.run.bind(s);return n.effect=s,n}function Tg(e){e.effect.stop()}let zs=!0;const wf=[];function Tn(){wf.push(zs),zs=!1}function Cn(){const e=wf.pop();zs=e===void 0?!0:e}function cd(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=ot;ot=void 0;try{t()}finally{ot=s}}}let Ni=0;class Cg{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class gr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ot||!zs||ot===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==ot)s=this.activeLink=new Cg(ot,this),ot.deps?(s.prevDep=ot.depsTail,ot.depsTail.nextDep=s,ot.depsTail=s):ot.deps=ot.depsTail=s,Sf(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=ot.depsTail,s.nextDep=void 0,ot.depsTail.nextDep=s,ot.depsTail=s,ot.deps===s&&(ot.deps=n)}return s}trigger(t){this.version++,Ni++,this.notify(t)}notify(t){Xo();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{ec()}}}function Sf(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Sf(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Dl=new WeakMap,Xn=Symbol(""),go=Symbol(""),Li=Symbol("");function qt(e,t,s){if(zs&&ot){let n=Dl.get(e);n||Dl.set(e,n=new Map);let a=n.get(s);a||(n.set(s,a=new gr),a.map=n,a.key=s),a.track()}}function mn(e,t,s,n,a,i){const l=Dl.get(e);if(!l){Ni++;return}const r=o=>{o&&o.trigger()};if(Xo(),t==="clear")l.forEach(r);else{const o=xe(e),c=o&&ur(s);if(o&&s==="length"){const d=Number(n);l.forEach((u,f)=>{(f==="length"||f===Li||!Wt(f)&&f>=d)&&r(u)})}else switch((s!==void 0||l.has(void 0))&&r(l.get(s)),c&&r(l.get(Li)),t){case"add":o?c&&r(l.get("length")):(r(l.get(Xn)),Na(e)&&r(l.get(go)));break;case"delete":o||(r(l.get(Xn)),Na(e)&&r(l.get(go)));break;case"set":Na(e)&&r(l.get(Xn));break}}ec()}function Eg(e,t){const s=Dl.get(e);return s&&s.get(t)}function ya(e){const t=Je(e);return t===e?t:(qt(t,"iterate",Li),gs(e)?t:t.map(js))}function vr(e){return qt(e=Je(e),"iterate",Li),e}function tn(e,t){return nn(e)?Ha(_n(e)?js(t):t):js(t)}const Ag={__proto__:null,[Symbol.iterator](){return zr(this,Symbol.iterator,e=>tn(this,e))},concat(...e){return ya(this).concat(...e.map(t=>xe(t)?ya(t):t))},entries(){return zr(this,"entries",e=>(e[1]=tn(this,e[1]),e))},every(e,t){return rn(this,"every",e,t,void 0,arguments)},filter(e,t){return rn(this,"filter",e,t,s=>s.map(n=>tn(this,n)),arguments)},find(e,t){return rn(this,"find",e,t,s=>tn(this,s),arguments)},findIndex(e,t){return rn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rn(this,"findLast",e,t,s=>tn(this,s),arguments)},findLastIndex(e,t){return rn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rn(this,"forEach",e,t,void 0,arguments)},includes(...e){return Vr(this,"includes",e)},indexOf(...e){return Vr(this,"indexOf",e)},join(e){return ya(this).join(e)},lastIndexOf(...e){return Vr(this,"lastIndexOf",e)},map(e,t){return rn(this,"map",e,t,void 0,arguments)},pop(){return li(this,"pop")},push(...e){return li(this,"push",e)},reduce(e,...t){return dd(this,"reduce",e,t)},reduceRight(e,...t){return dd(this,"reduceRight",e,t)},shift(){return li(this,"shift")},some(e,t){return rn(this,"some",e,t,void 0,arguments)},splice(...e){return li(this,"splice",e)},toReversed(){return ya(this).toReversed()},toSorted(e){return ya(this).toSorted(e)},toSpliced(...e){return ya(this).toSpliced(...e)},unshift(...e){return li(this,"unshift",e)},values(){return zr(this,"values",e=>tn(this,e))}};function zr(e,t,s){const n=vr(e),a=n[t]();return n!==e&&!gs(e)&&(a._next=a.next,a.next=()=>{const i=a._next();return i.done||(i.value=s(i.value)),i}),a}const Rg=Array.prototype;function rn(e,t,s,n,a,i){const l=vr(e),r=l!==e&&!gs(e),o=l[t];if(o!==Rg[t]){const u=o.apply(e,i);return r?js(u):u}let c=s;l!==e&&(r?c=function(u,f){return s.call(this,tn(e,u),f,e)}:s.length>2&&(c=function(u,f){return s.call(this,u,f,e)}));const d=o.call(l,c,n);return r&&a?a(d):d}function dd(e,t,s,n){const a=vr(e),i=a!==e&&!gs(e);let l=s,r=!1;a!==e&&(i?(r=n.length===0,l=function(c,d,u){return r&&(r=!1,c=tn(e,c)),s.call(this,c,tn(e,d),u,e)}):s.length>3&&(l=function(c,d,u){return s.call(this,c,d,u,e)}));const o=a[t](l,...n);return r?tn(e,o):o}function Vr(e,t,s){const n=Je(e);qt(n,"iterate",Li);const a=n[t](...s);return(a===-1||a===!1)&&Yi(s[0])?(s[0]=Je(s[0]),n[t](...s)):a}function li(e,t,s=[]){Tn(),Xo();const n=Je(e)[t].apply(e,s);return ec(),Cn(),n}const Ig=ws("__proto__,__v_isRef,__isVue"),Tf=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Wt));function Og(e){Wt(e)||(e=String(e));const t=Je(this);return qt(t,"has",e),t.hasOwnProperty(e)}class Cf{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const a=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!a;if(s==="__v_isReadonly")return a;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(a?i?Nf:Of:i?If:Rf).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=xe(t);if(!a){let o;if(l&&(o=Ag[s]))return o;if(s==="hasOwnProperty")return Og}const r=Reflect.get(t,s,St(t)?t:n);if((Wt(s)?Tf.has(s):Ig(s))||(a||qt(t,"get",s),i))return r;if(St(r)){const o=l&&ur(s)?r:r.value;return a&&Qe(o)?Ml(o):o}return Qe(r)?a?Ml(r):zn(r):r}}class Ef extends Cf{constructor(t=!1){super(!1,t)}set(t,s,n,a){let i=t[s];const l=xe(t)&&ur(s);if(!this._isShallow){const c=nn(i);if(!gs(n)&&!nn(n)&&(i=Je(i),n=Je(n)),!l&&St(i)&&!St(n))return c||(i.value=n),!0}const r=l?Number(s)e,cl=e=>Reflect.getPrototypeOf(e);function Pg(e,t,s){return function(...n){const a=this.__v_raw,i=Je(a),l=Na(i),r=e==="entries"||e===Symbol.iterator&&l,o=e==="keys"&&l,c=a[e](...n),d=s?vo:t?Ha:js;return!t&&qt(i,"iterate",o?go:Xn),ze(Object.create(c),{next(){const{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:r?[d(u[0]),d(u[1])]:d(u),done:f}}})}}function dl(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Fg(e,t){const s={get(a){const i=this.__v_raw,l=Je(i),r=Je(a);e||(Lt(a,r)&&qt(l,"get",a),qt(l,"get",r));const{has:o}=cl(l),c=t?vo:e?Ha:js;if(o.call(l,a))return c(i.get(a));if(o.call(l,r))return c(i.get(r));i!==l&&i.get(a)},get size(){const a=this.__v_raw;return!e&&qt(Je(a),"iterate",Xn),a.size},has(a){const i=this.__v_raw,l=Je(i),r=Je(a);return e||(Lt(a,r)&&qt(l,"has",a),qt(l,"has",r)),a===r?i.has(a):i.has(a)||i.has(r)},forEach(a,i){const l=this,r=l.__v_raw,o=Je(r),c=t?vo:e?Ha:js;return!e&&qt(o,"iterate",Xn),r.forEach((d,u)=>a.call(i,c(d),c(u),l))}};return ze(s,e?{add:dl("add"),set:dl("set"),delete:dl("delete"),clear:dl("clear")}:{add(a){const i=Je(this),l=cl(i),r=Je(a),o=!t&&!gs(a)&&!nn(a)?r:a;return l.has.call(i,o)||Lt(a,o)&&l.has.call(i,a)||Lt(r,o)&&l.has.call(i,r)||(i.add(o),mn(i,"add",o,o)),this},set(a,i){!t&&!gs(i)&&!nn(i)&&(i=Je(i));const l=Je(this),{has:r,get:o}=cl(l);let c=r.call(l,a);c||(a=Je(a),c=r.call(l,a));const d=o.call(l,a);return l.set(a,i),c?Lt(i,d)&&mn(l,"set",a,i):mn(l,"add",a,i),this},delete(a){const i=Je(this),{has:l,get:r}=cl(i);let o=l.call(i,a);o||(a=Je(a),o=l.call(i,a)),r&&r.call(i,a);const c=i.delete(a);return o&&mn(i,"delete",a,void 0),c},clear(){const a=Je(this),i=a.size!==0,l=a.clear();return i&&mn(a,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(a=>{s[a]=Pg(a,e,t)}),s}function br(e,t){const s=Fg(e,t);return(n,a,i)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?n:Reflect.get(et(s,a)&&a in n?s:n,a,i)}const $g={get:br(!1,!1)},Bg={get:br(!1,!0)},Ug={get:br(!0,!1)},Hg={get:br(!0,!0)},Rf=new WeakMap,If=new WeakMap,Of=new WeakMap,Nf=new WeakMap;function zg(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function zn(e){return nn(e)?e:yr(e,!1,Ng,$g,Rf)}function sc(e){return yr(e,!1,Dg,Bg,If)}function Ml(e){return yr(e,!0,Lg,Ug,Of)}function Vg(e){return yr(e,!0,Mg,Hg,Nf)}function yr(e,t,s,n,a){if(!Qe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=a.get(e);if(i)return i;const l=zg(Qm(e));if(l===0)return e;const r=new Proxy(e,l===2?n:s);return a.set(e,r),r}function _n(e){return nn(e)?_n(e.__v_raw):!!(e&&e.__v_isReactive)}function nn(e){return!!(e&&e.__v_isReadonly)}function gs(e){return!!(e&&e.__v_isShallow)}function Yi(e){return e?!!e.__v_raw:!1}function Je(e){const t=e&&e.__v_raw;return t?Je(t):e}function Lf(e){return!et(e,"__v_skip")&&Object.isExtensible(e)&&uf(e,"__v_skip",!0),e}const js=e=>Qe(e)?zn(e):e,Ha=e=>Qe(e)?Ml(e):e;function St(e){return e?e.__v_isRef===!0:!1}function h(e){return Df(e,!1)}function nc(e){return Df(e,!0)}function Df(e,t){return St(e)?e:new jg(e,t)}class jg{constructor(t,s){this.dep=new gr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:Je(t),this._value=s?t:js(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||gs(t)||nn(t);t=n?t:Je(t),Lt(t,s)&&(this._rawValue=t,this._value=n?t:js(t),this.dep.trigger())}}function qg(e){e.dep&&e.dep.trigger()}function sn(e){return St(e)?e.value:e}function Gg(e){return Re(e)?e():sn(e)}const Kg={get:(e,t,s)=>t==="__v_raw"?e:sn(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const a=e[t];return St(a)&&!St(s)?(a.value=s,!0):Reflect.set(e,t,s,n)}};function ac(e){return _n(e)?e:new Proxy(e,Kg)}class Wg{constructor(t){this.__v_isRef=!0,this._value=void 0;const s=this.dep=new gr,{get:n,set:a}=t(s.track.bind(s),s.trigger.bind(s));this._get=n,this._set=a}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Mf(e){return new Wg(e)}function Zg(e){const t=xe(e)?new Array(e.length):{};for(const s in e)t[s]=Pf(e,s);return t}class Jg{constructor(t,s,n){this._object=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=Wt(s)?s:String(s),this._raw=Je(t);let a=!0,i=t;if(!xe(t)||Wt(this._key)||!ur(this._key))do a=!Yi(i)||gs(i);while(a&&(i=i.__v_raw));this._shallow=a}get value(){let t=this._object[this._key];return this._shallow&&(t=sn(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&St(this._raw[this._key])){const s=this._object[this._key];if(St(s)){s.value=t;return}}this._object[this._key]=t}get dep(){return Eg(this._raw,this._key)}}class Yg{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Qg(e,t,s){return St(e)?e:Re(e)?new Yg(e):Qe(e)&&arguments.length>1?Pf(e,t,s):h(e)}function Pf(e,t,s){return new Jg(e,t,s)}class Xg{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new gr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ni-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&ot!==this)return yf(this,!0),!0}get value(){const t=this.dep.track();return kf(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ev(e,t,s=!1){let n,a;return Re(e)?n=e:(n=e.get,a=e.set),new Xg(n,a,s)}const tv={GET:"get",HAS:"has",ITERATE:"iterate"},sv={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},ul={},Pl=new WeakMap;let Mn;function nv(){return Mn}function Ff(e,t=!1,s=Mn){if(s){let n=Pl.get(s);n||Pl.set(s,n=[]),n.push(e)}}function av(e,t,s=je){const{immediate:n,deep:a,once:i,scheduler:l,augmentJob:r,call:o}=s,c=_=>a?_:gs(_)||a===!1||a===0?gn(_,1):gn(_);let d,u,f,p,b=!1,y=!1;if(St(e)?(u=()=>e.value,b=gs(e)):_n(e)?(u=()=>c(e),b=!0):xe(e)?(y=!0,b=e.some(_=>_n(_)||gs(_)),u=()=>e.map(_=>{if(St(_))return _.value;if(_n(_))return c(_);if(Re(_))return o?o(_,2):_()})):Re(e)?t?u=o?()=>o(e,2):e:u=()=>{if(f){Tn();try{f()}finally{Cn()}}const _=Mn;Mn=d;try{return o?o(e,3,[p]):e(p)}finally{Mn=_}}:u=Ut,t&&a){const _=u,S=a===!0?1/0:a;u=()=>gn(_(),S)}const E=vf(),I=()=>{d.stop(),E&&E.active&&Jo(E.effects,d)};if(i&&t){const _=t;t=(...S)=>{const g=_(...S);return I(),g}}let x=y?new Array(e.length).fill(ul):ul;const m=_=>{if(!(!(d.flags&1)||!d.dirty&&!_))if(t){const S=d.run();if(_||a||b||(y?S.some((g,w)=>Lt(g,x[w])):Lt(S,x))){f&&f();const g=Mn;Mn=d;try{const w=[S,x===ul?void 0:y&&x[0]===ul?[]:x,p];x=S,o?o(t,3,w):t(...w)}finally{Mn=g}}}else d.run()};return r&&r(m),d=new Oi(u),d.scheduler=l?()=>l(m,!1):m,p=_=>Ff(_,!1,d),f=d.onStop=()=>{const _=Pl.get(d);if(_){if(o)o(_,4);else for(const S of _)S();Pl.delete(d)}},t?n?m(!0):x=d.run():l?l(m.bind(null,!0),!0):d.run(),I.pause=d.pause.bind(d),I.resume=d.resume.bind(d),I.stop=I,I}function gn(e,t=1/0,s){if(t<=0||!Qe(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,St(e))gn(e.value,t,s);else if(xe(e))for(let n=0;n{gn(n,t,s)});else if(dr(e)){for(const n in e)gn(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&gn(e[n],t,s)}return e}/** +**/let At;class Qo{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&At&&(At.active?(this.parent=At,this.index=(At.scopes||(At.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t0&&--this._on===0){if(At===this)At=this.prevScope;else{let t=At;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s0)return;if(ki){let t=ki;for(ki=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;_i;){let t=_i;for(_i=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function xf(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function _f(e){let t,s=e.depsTail,n=s;for(;n;){const a=n.prevDep;n.version===-1?(n===s&&(s=a),tc(n),wg(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=a}e.deps=t,e.depsTail=s}function mo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(kf(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function kf(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Li)||(e.globalVersion=Li,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!mo(e))))return;e.flags|=2;const t=e.dep,s=ot,n=zs;ot=e,zs=!0;try{xf(e);const a=e.fn(e._value);(t.version===0||Lt(a,e._value))&&(e.flags|=128,e._value=a,t.version++)}catch(a){throw t.version++,a}finally{ot=s,zs=n,_f(e),e.flags&=-3}}function tc(e,t=!1){const{dep:s,prevSub:n,nextSub:a}=e;if(n&&(n.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)tc(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function wg(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}function Sg(e,t){e.effect instanceof Ni&&(e=e.effect.fn);const s=new Ni(e);t&&ze(s,t);try{s.run()}catch(a){throw s.stop(),a}const n=s.run.bind(s);return n.effect=s,n}function Tg(e){e.effect.stop()}let zs=!0;const wf=[];function wn(){wf.push(zs),zs=!1}function Sn(){const e=wf.pop();zs=e===void 0?!0:e}function cd(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=ot;ot=void 0;try{t()}finally{ot=s}}}let Li=0;class Cg{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class gr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ot||!zs||ot===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==ot)s=this.activeLink=new Cg(ot,this),ot.deps?(s.prevDep=ot.depsTail,ot.depsTail.nextDep=s,ot.depsTail=s):ot.deps=ot.depsTail=s,Sf(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=ot.depsTail,s.nextDep=void 0,ot.depsTail.nextDep=s,ot.depsTail=s,ot.deps===s&&(ot.deps=n)}return s}trigger(t){this.version++,Li++,this.notify(t)}notify(t){Xo();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{ec()}}}function Sf(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Sf(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Dl=new WeakMap,ea=Symbol(""),go=Symbol(""),Di=Symbol("");function Kt(e,t,s){if(zs&&ot){let n=Dl.get(e);n||Dl.set(e,n=new Map);let a=n.get(s);a||(n.set(s,a=new gr),a.map=n,a.key=s),a.track()}}function pn(e,t,s,n,a,i){const l=Dl.get(e);if(!l){Li++;return}const r=o=>{o&&o.trigger()};if(Xo(),t==="clear")l.forEach(r);else{const o=be(e),c=o&&ur(s);if(o&&s==="length"){const d=Number(n);l.forEach((u,f)=>{(f==="length"||f===Di||!Jt(f)&&f>=d)&&r(u)})}else switch((s!==void 0||l.has(void 0))&&r(l.get(s)),c&&r(l.get(Di)),t){case"add":o?c&&r(l.get("length")):(r(l.get(ea)),La(e)&&r(l.get(go)));break;case"delete":o||(r(l.get(ea)),La(e)&&r(l.get(go)));break;case"set":La(e)&&r(l.get(ea));break}}ec()}function Eg(e,t){const s=Dl.get(e);return s&&s.get(t)}function xa(e){const t=Je(e);return t===e?t:(Kt(t,"iterate",Di),ms(e)?t:t.map(js))}function vr(e){return Kt(e=Je(e),"iterate",Di),e}function Xs(e,t){return tn(e)?za(yn(e)?js(t):t):js(t)}const Ag={__proto__:null,[Symbol.iterator](){return zr(this,Symbol.iterator,e=>Xs(this,e))},concat(...e){return xa(this).concat(...e.map(t=>be(t)?xa(t):t))},entries(){return zr(this,"entries",e=>(e[1]=Xs(this,e[1]),e))},every(e,t){return an(this,"every",e,t,void 0,arguments)},filter(e,t){return an(this,"filter",e,t,s=>s.map(n=>Xs(this,n)),arguments)},find(e,t){return an(this,"find",e,t,s=>Xs(this,s),arguments)},findIndex(e,t){return an(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return an(this,"findLast",e,t,s=>Xs(this,s),arguments)},findLastIndex(e,t){return an(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return an(this,"forEach",e,t,void 0,arguments)},includes(...e){return Vr(this,"includes",e)},indexOf(...e){return Vr(this,"indexOf",e)},join(e){return xa(this).join(e)},lastIndexOf(...e){return Vr(this,"lastIndexOf",e)},map(e,t){return an(this,"map",e,t,void 0,arguments)},pop(){return ri(this,"pop")},push(...e){return ri(this,"push",e)},reduce(e,...t){return dd(this,"reduce",e,t)},reduceRight(e,...t){return dd(this,"reduceRight",e,t)},shift(){return ri(this,"shift")},some(e,t){return an(this,"some",e,t,void 0,arguments)},splice(...e){return ri(this,"splice",e)},toReversed(){return xa(this).toReversed()},toSorted(e){return xa(this).toSorted(e)},toSpliced(...e){return xa(this).toSpliced(...e)},unshift(...e){return ri(this,"unshift",e)},values(){return zr(this,"values",e=>Xs(this,e))}};function zr(e,t,s){const n=vr(e),a=n[t]();return n!==e&&!ms(e)&&(a._next=a.next,a.next=()=>{const i=a._next();return i.done||(i.value=s(i.value)),i}),a}const Rg=Array.prototype;function an(e,t,s,n,a,i){const l=vr(e),r=l!==e&&!ms(e),o=l[t];if(o!==Rg[t]){const u=o.apply(e,i);return r?js(u):u}let c=s;l!==e&&(r?c=function(u,f){return s.call(this,Xs(e,u),f,e)}:s.length>2&&(c=function(u,f){return s.call(this,u,f,e)}));const d=o.call(l,c,n);return r&&a?a(d):d}function dd(e,t,s,n){const a=vr(e),i=a!==e&&!ms(e);let l=s,r=!1;a!==e&&(i?(r=n.length===0,l=function(c,d,u){return r&&(r=!1,c=Xs(e,c)),s.call(this,c,Xs(e,d),u,e)}):s.length>3&&(l=function(c,d,u){return s.call(this,c,d,u,e)}));const o=a[t](l,...n);return r?Xs(e,o):o}function Vr(e,t,s){const n=Je(e);Kt(n,"iterate",Di);const a=n[t](...s);return(a===-1||a===!1)&&Qi(s[0])?(s[0]=Je(s[0]),n[t](...s)):a}function ri(e,t,s=[]){wn(),Xo();const n=Je(e)[t].apply(e,s);return ec(),Sn(),n}const Ig=ks("__proto__,__v_isRef,__isVue"),Tf=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Jt));function Og(e){Jt(e)||(e=String(e));const t=Je(this);return Kt(t,"has",e),t.hasOwnProperty(e)}class Cf{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const a=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!a;if(s==="__v_isReadonly")return a;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(a?i?Nf:Of:i?If:Rf).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=be(t);if(!a){let o;if(l&&(o=Ag[s]))return o;if(s==="hasOwnProperty")return Og}const r=Reflect.get(t,s,St(t)?t:n);if((Jt(s)?Tf.has(s):Ig(s))||(a||Kt(t,"get",s),i))return r;if(St(r)){const o=l&&ur(s)?r:r.value;return a&&Xe(o)?Ml(o):o}return Xe(r)?a?Ml(r):Hn(r):r}}class Ef extends Cf{constructor(t=!1){super(!1,t)}set(t,s,n,a){let i=t[s];const l=be(t)&&ur(s);if(!this._isShallow){const c=tn(i);if(!ms(n)&&!tn(n)&&(i=Je(i),n=Je(n)),!l&&St(i)&&!St(n))return c||(i.value=n),!0}const r=l?Number(s)e,cl=e=>Reflect.getPrototypeOf(e);function Pg(e,t,s){return function(...n){const a=this.__v_raw,i=Je(a),l=La(i),r=e==="entries"||e===Symbol.iterator&&l,o=e==="keys"&&l,c=a[e](...n),d=s?vo:t?za:js;return!t&&Kt(i,"iterate",o?go:ea),ze(Object.create(c),{next(){const{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:r?[d(u[0]),d(u[1])]:d(u),done:f}}})}}function dl(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Fg(e,t){const s={get(a){const i=this.__v_raw,l=Je(i),r=Je(a);e||(Lt(a,r)&&Kt(l,"get",a),Kt(l,"get",r));const{has:o}=cl(l),c=t?vo:e?za:js;if(o.call(l,a))return c(i.get(a));if(o.call(l,r))return c(i.get(r));i!==l&&i.get(a)},get size(){const a=this.__v_raw;return!e&&Kt(Je(a),"iterate",ea),a.size},has(a){const i=this.__v_raw,l=Je(i),r=Je(a);return e||(Lt(a,r)&&Kt(l,"has",a),Kt(l,"has",r)),a===r?i.has(a):i.has(a)||i.has(r)},forEach(a,i){const l=this,r=l.__v_raw,o=Je(r),c=t?vo:e?za:js;return!e&&Kt(o,"iterate",ea),r.forEach((d,u)=>a.call(i,c(d),c(u),l))}};return ze(s,e?{add:dl("add"),set:dl("set"),delete:dl("delete"),clear:dl("clear")}:{add(a){const i=Je(this),l=cl(i),r=Je(a),o=!t&&!ms(a)&&!tn(a)?r:a;return l.has.call(i,o)||Lt(a,o)&&l.has.call(i,a)||Lt(r,o)&&l.has.call(i,r)||(i.add(o),pn(i,"add",o,o)),this},set(a,i){!t&&!ms(i)&&!tn(i)&&(i=Je(i));const l=Je(this),{has:r,get:o}=cl(l);let c=r.call(l,a);c||(a=Je(a),c=r.call(l,a));const d=o.call(l,a);return l.set(a,i),c?Lt(i,d)&&pn(l,"set",a,i):pn(l,"add",a,i),this},delete(a){const i=Je(this),{has:l,get:r}=cl(i);let o=l.call(i,a);o||(a=Je(a),o=l.call(i,a)),r&&r.call(i,a);const c=i.delete(a);return o&&pn(i,"delete",a,void 0),c},clear(){const a=Je(this),i=a.size!==0,l=a.clear();return i&&pn(a,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(a=>{s[a]=Pg(a,e,t)}),s}function br(e,t){const s=Fg(e,t);return(n,a,i)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?n:Reflect.get(tt(s,a)&&a in n?s:n,a,i)}const $g={get:br(!1,!1)},Bg={get:br(!1,!0)},Ug={get:br(!0,!1)},Hg={get:br(!0,!0)},Rf=new WeakMap,If=new WeakMap,Of=new WeakMap,Nf=new WeakMap;function zg(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Hn(e){return tn(e)?e:yr(e,!1,Ng,$g,Rf)}function sc(e){return yr(e,!1,Dg,Bg,If)}function Ml(e){return yr(e,!0,Lg,Ug,Of)}function Vg(e){return yr(e,!0,Mg,Hg,Nf)}function yr(e,t,s,n,a){if(!Xe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=a.get(e);if(i)return i;const l=zg(Qm(e));if(l===0)return e;const r=new Proxy(e,l===2?n:s);return a.set(e,r),r}function yn(e){return tn(e)?yn(e.__v_raw):!!(e&&e.__v_isReactive)}function tn(e){return!!(e&&e.__v_isReadonly)}function ms(e){return!!(e&&e.__v_isShallow)}function Qi(e){return e?!!e.__v_raw:!1}function Je(e){const t=e&&e.__v_raw;return t?Je(t):e}function Lf(e){return!tt(e,"__v_skip")&&Object.isExtensible(e)&&uf(e,"__v_skip",!0),e}const js=e=>Xe(e)?Hn(e):e,za=e=>Xe(e)?Ml(e):e;function St(e){return e?e.__v_isRef===!0:!1}function h(e){return Df(e,!1)}function nc(e){return Df(e,!0)}function Df(e,t){return St(e)?e:new jg(e,t)}class jg{constructor(t,s){this.dep=new gr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:Je(t),this._value=s?t:js(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||ms(t)||tn(t);t=n?t:Je(t),Lt(t,s)&&(this._rawValue=t,this._value=n?t:js(t),this.dep.trigger())}}function qg(e){e.dep&&e.dep.trigger()}function en(e){return St(e)?e.value:e}function Gg(e){return Ie(e)?e():en(e)}const Kg={get:(e,t,s)=>t==="__v_raw"?e:en(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const a=e[t];return St(a)&&!St(s)?(a.value=s,!0):Reflect.set(e,t,s,n)}};function ac(e){return yn(e)?e:new Proxy(e,Kg)}class Wg{constructor(t){this.__v_isRef=!0,this._value=void 0;const s=this.dep=new gr,{get:n,set:a}=t(s.track.bind(s),s.trigger.bind(s));this._get=n,this._set=a}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Mf(e){return new Wg(e)}function Zg(e){const t=be(e)?new Array(e.length):{};for(const s in e)t[s]=Pf(e,s);return t}class Jg{constructor(t,s,n){this._object=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=Jt(s)?s:String(s),this._raw=Je(t);let a=!0,i=t;if(!be(t)||Jt(this._key)||!ur(this._key))do a=!Qi(i)||ms(i);while(a&&(i=i.__v_raw));this._shallow=a}get value(){let t=this._object[this._key];return this._shallow&&(t=en(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&St(this._raw[this._key])){const s=this._object[this._key];if(St(s)){s.value=t;return}}this._object[this._key]=t}get dep(){return Eg(this._raw,this._key)}}class Yg{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Qg(e,t,s){return St(e)?e:Ie(e)?new Yg(e):Xe(e)&&arguments.length>1?Pf(e,t,s):h(e)}function Pf(e,t,s){return new Jg(e,t,s)}class Xg{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new gr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Li-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&ot!==this)return yf(this,!0),!0}get value(){const t=this.dep.track();return kf(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ev(e,t,s=!1){let n,a;return Ie(e)?n=e:(n=e.get,a=e.set),new Xg(n,a,s)}const tv={GET:"get",HAS:"has",ITERATE:"iterate"},sv={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},ul={},Pl=new WeakMap;let Dn;function nv(){return Dn}function Ff(e,t=!1,s=Dn){if(s){let n=Pl.get(s);n||Pl.set(s,n=[]),n.push(e)}}function av(e,t,s=je){const{immediate:n,deep:a,once:i,scheduler:l,augmentJob:r,call:o}=s,c=_=>a?_:ms(_)||a===!1||a===0?hn(_,1):hn(_);let d,u,f,p,b=!1,y=!1;if(St(e)?(u=()=>e.value,b=ms(e)):yn(e)?(u=()=>c(e),b=!0):be(e)?(y=!0,b=e.some(_=>yn(_)||ms(_)),u=()=>e.map(_=>{if(St(_))return _.value;if(yn(_))return c(_);if(Ie(_))return o?o(_,2):_()})):Ie(e)?t?u=o?()=>o(e,2):e:u=()=>{if(f){wn();try{f()}finally{Sn()}}const _=Dn;Dn=d;try{return o?o(e,3,[p]):e(p)}finally{Dn=_}}:u=Ht,t&&a){const _=u,S=a===!0?1/0:a;u=()=>hn(_(),S)}const E=vf(),I=()=>{d.stop(),E&&E.active&&Jo(E.effects,d)};if(i&&t){const _=t;t=(...S)=>{const g=_(...S);return I(),g}}let x=y?new Array(e.length).fill(ul):ul;const m=_=>{if(!(!(d.flags&1)||!d.dirty&&!_))if(t){const S=d.run();if(_||a||b||(y?S.some((g,w)=>Lt(g,x[w])):Lt(S,x))){f&&f();const g=Dn;Dn=d;try{const w=[S,x===ul?void 0:y&&x[0]===ul?[]:x,p];x=S,o?o(t,3,w):t(...w)}finally{Dn=g}}}else d.run()};return r&&r(m),d=new Ni(u),d.scheduler=l?()=>l(m,!1):m,p=_=>Ff(_,!1,d),f=d.onStop=()=>{const _=Pl.get(d);if(_){if(o)o(_,4);else for(const S of _)S();Pl.delete(d)}},t?n?m(!0):x=d.run():l?l(m.bind(null,!0),!0):d.run(),I.pause=d.pause.bind(d),I.resume=d.resume.bind(d),I.stop=I,I}function hn(e,t=1/0,s){if(t<=0||!Xe(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,St(e))hn(e.value,t,s);else if(be(e))for(let n=0;n{hn(n,t,s)});else if(dr(e)){for(const n in e)hn(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&hn(e[n],t,s)}return e}/** * @vue/runtime-core v3.5.38 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const $f=[];function iv(e){$f.push(e)}function lv(){$f.pop()}function rv(e,t){}const ov={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},cv={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function ei(e,t,s,n){try{return n?e(...n):e()}catch(a){ua(a,t,s)}}function _s(e,t,s,n){if(Re(e)){const a=ei(e,t,s,n);return a&&Yo(a)&&a.catch(i=>{ua(i,t,s)}),a}if(xe(e)){const a=[];for(let i=0;i>>1,a=Xt[n],i=Mi(a);i=Mi(s)?Xt.push(e):Xt.splice(uv(t),0,e),e.flags|=1,Uf()}}function Uf(){Fl||(Fl=Bf.then(Hf))}function Di(e){xe(e)?Ma.push(...e):Pn&&e.id===-1?Pn.splice(Ta+1,0,e):e.flags&1||(Ma.push(e),e.flags|=1),Uf()}function ud(e,t,s=Xs+1){for(;sMi(s)-Mi(n));if(Ma.length=0,Pn){Pn.push(...t);return}for(Pn=t,Ta=0;Tae.id==null?e.flags&2?-1:1/0:e.id;function Hf(e){try{for(Xs=0;XsCa.emit(a,...i)),fl=[]):typeof window<"u"&&window.HTMLElement&&!((n=(s=window.navigator)==null?void 0:s.userAgent)!=null&&n.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{zf(i,t)}),setTimeout(()=>{Ca||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,fl=[])},3e3)):fl=[]}let Bt=null,xr=null;function Pi(e){const t=Bt;return Bt=e,xr=e&&e.type.__scopeId||null,t}function fv(e){xr=e}function pv(){xr=null}const hv=e=>lc;function lc(e,t=Bt,s){if(!t||e._n)return e;const n=(...a)=>{n._d&&Ui(-1);const i=Pi(t);let l;try{l=e(...a)}finally{Pi(i),n._d&&Ui(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function mv(e,t){if(Bt===null)return e;const s=tl(Bt),n=e.dirs||(e.dirs=[]);for(let a=0;a1)return s&&Re(t)?t.call(n&&n.proxy):t}}function gv(){return!!(ss()||ea)}const Vf=Symbol.for("v-scx"),jf=()=>Ns(Vf);function vv(e,t){return Qi(e,null,t)}function bv(e,t){return Qi(e,null,{flush:"post"})}function qf(e,t){return Qi(e,null,{flush:"sync"})}function ts(e,t,s){return Qi(e,t,s)}function Qi(e,t,s=je){const{immediate:n,deep:a,flush:i,once:l}=s,r=ze({},s),o=t&&n||!t&&i!=="post";let c;if(ia){if(i==="sync"){const p=jf();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!o){const p=()=>{};return p.stop=Ut,p.resume=Ut,p.pause=Ut,p}}const d=$t;r.call=(p,b,y)=>_s(p,d,b,y);let u=!1;i==="post"?r.scheduler=p=>{kt(p,d&&d.suspense)}:i!=="sync"&&(u=!0,r.scheduler=(p,b)=>{b?p():ic(p)}),r.augmentJob=p=>{t&&(p.flags|=4),u&&(p.flags|=2,d&&(p.id=d.uid,p.i=d))};const f=av(e,t,r);return ia&&(c?c.push(f):o&&f()),f}function yv(e,t,s){const n=this.proxy,a=Me(e)?e.includes(".")?Gf(n,e):()=>n[e]:e.bind(n,n);let i;Re(t)?i=t:(i=t.handler,s=t);const l=ti(this),r=Qi(a,i.bind(n),s);return l(),r}function Gf(e,t){const s=t.split(".");return()=>{let n=e;for(let a=0;ae.__isTeleport,Zn=e=>e&&(e.disabled||e.disabled===""),xv=e=>e&&(e.defer||e.defer===""),fd=e=>typeof SVGElement<"u"&&e instanceof SVGElement,pd=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,bo=(e,t)=>{const s=e&&e.to;return Me(s)?t?t(s):null:s},_v={name:"Teleport",__isTeleport:!0,process(e,t,s,n,a,i,l,r,o,c){const{mc:d,pc:u,pbc:f,o:{insert:p,querySelector:b,createText:y,createComment:E,parentNode:I}}=c,x=Zn(t.props);let{dynamicChildren:m}=t;const _=(w,T,C)=>{w.shapeFlag&16&&d(w.children,T,C,a,i,l,r,o)},S=(w=t)=>{const T=Zn(w.props),C=w.target=bo(w.props,b),M=yo(C,w,y,p);C&&(l!=="svg"&&fd(C)?l="svg":l!=="mathml"&&pd(C)&&(l="mathml"),a&&a.isCE&&(a.ce._teleportTargets||(a.ce._teleportTargets=new Set)).add(C),T||(_(w,C,M),mi(w,!1)))},g=w=>{const T=()=>{if(Ln.get(w)===T){if(Ln.delete(w),Zn(w.props)){const C=I(w.el)||s;_(w,C,w.anchor),mi(w,!0)}S(w)}};Ln.set(w,T),kt(T,i)};if(e==null){const w=t.el=y(""),T=t.anchor=y("");if(p(w,s,n),p(T,s,n),xv(t.props)||i&&i.pendingBranch){g(t);return}x&&(_(t,s,T),mi(t,!0)),S()}else{t.el=e.el;const w=t.anchor=e.anchor,T=Ln.get(e);if(T){T.flags|=8,Ln.delete(e),g(t);return}t.targetStart=e.targetStart;const C=t.target=e.target,M=t.targetAnchor=e.targetAnchor,H=Zn(e.props),P=H?s:C,R=H?w:M;if(l==="svg"||fd(C)?l="svg":(l==="mathml"||pd(C))&&(l="mathml"),m?(f(e.dynamicChildren,m,P,a,i,l,r),vc(e,t,!0)):o||u(e,t,P,R,a,i,l,r,!1),x)H?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):pl(t,s,w,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const j=t.target=bo(t.props,b);j&&pl(t,j,null,c,0)}else H&&pl(t,C,M,c,1);mi(t,x)}},remove(e,t,s,{um:n,o:{remove:a}},i){const{shapeFlag:l,children:r,anchor:o,targetStart:c,targetAnchor:d,target:u,props:f}=e,p=i||!Zn(f),b=Ln.get(e);if(b&&(b.flags|=8,Ln.delete(e)),u&&(a(c),a(d)),i&&a(o),!b&&l&16)for(let y=0;y{e.isMounted=!0}),Sr(()=>{e.isUnmounting=!0}),e}const As=[Function,Array],oc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:As,onEnter:As,onAfterEnter:As,onEnterCancelled:As,onBeforeLeave:As,onLeave:As,onAfterLeave:As,onLeaveCancelled:As,onBeforeAppear:As,onAppear:As,onAfterAppear:As,onAppearCancelled:As},Zf=e=>{const t=e.subTree;return t.component?Zf(t.component):t},Sv={name:"BaseTransition",props:oc,setup(e,{slots:t}){const s=ss(),n=rc();return()=>{const a=t.default&&_r(t.default(),!0),i=a&&a.length?Jf(a):s.subTree?Np():void 0;if(!i)return;const l=Je(e),{mode:r}=l;if(n.isLeaving)return jr(i);const o=hd(i);if(!o)return jr(i);let c=za(o,l,n,s,u=>c=u);o.type!==yt&&En(o,c);let d=s.subTree&&hd(s.subTree);if(d&&d.type!==yt&&!Hs(d,o)&&Zf(s).type!==yt){let u=za(d,l,n,s);if(En(d,u),r==="out-in"&&o.type!==yt)return n.isLeaving=!0,u.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete u.afterLeave,d=void 0},jr(i);r==="in-out"&&o.type!==yt?u.delayLeave=(f,p,b)=>{const y=Qf(n,d);y[String(d.key)]=d,f[Rs]=()=>{p(),f[Rs]=void 0,delete c.delayedLeave,d=void 0},c.delayedLeave=()=>{b(),delete c.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return i}}};function Jf(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==yt){t=s;break}}return t}const Yf=Sv;function Qf(e,t){const{leavingVNodes:s}=e;let n=s.get(t.type);return n||(n=Object.create(null),s.set(t.type,n)),n}function za(e,t,s,n,a){const{appear:i,mode:l,persisted:r=!1,onBeforeEnter:o,onEnter:c,onAfterEnter:d,onEnterCancelled:u,onBeforeLeave:f,onLeave:p,onAfterLeave:b,onLeaveCancelled:y,onBeforeAppear:E,onAppear:I,onAfterAppear:x,onAppearCancelled:m}=t,_=String(e.key),S=Qf(s,e),g=(C,M)=>{C&&_s(C,n,9,M)},w=(C,M)=>{const H=M[1];g(C,M),xe(C)?C.every(P=>P.length<=1)&&H():C.length<=1&&H()},T={mode:l,persisted:r,beforeEnter(C){let M=o;if(!s.isMounted)if(i)M=E||o;else return;C[Rs]&&C[Rs](!0);const H=S[_];H&&Hs(e,H)&&H.el[Rs]&&H.el[Rs](),g(M,[C])},enter(C){if(S[_]===e)return;let M=c,H=d,P=u;if(!s.isMounted)if(i)M=I||c,H=x||d,P=m||u;else return;let R=!1;C[ri]=Q=>{R||(R=!0,Q?g(P,[C]):g(H,[C]),T.delayedLeave&&T.delayedLeave(),C[ri]=void 0)};const j=C[ri].bind(null,!1);M?w(M,[C,j]):j()},leave(C,M){const H=String(e.key);if(C[ri]&&C[ri](!0),s.isUnmounting)return M();g(f,[C]);let P=!1;C[Rs]=j=>{P||(P=!0,M(),j?g(y,[C]):g(b,[C]),C[Rs]=void 0,S[H]===e&&delete S[H])};const R=C[Rs].bind(null,!1);S[H]=e,p?w(p,[C,R]):R()},clone(C){const M=za(C,t,s,n,a);return a&&a(M),M}};return T}function jr(e){if(el(e))return e=an(e),e.children=null,e}function hd(e){if(!el(e))return Wf(e.type)&&e.children?Jf(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&Re(s.default))return s.default()}}function En(e,t){e.shapeFlag&6&&e.component?(e.transition=t,En(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function _r(e,t=!1,s){let n=[],a=0;for(let i=0;i1)for(let i=0;is.value,set:i=>s.value=i})}return s}function md(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Bl=new WeakMap;function Pa(e,t,s,n,a=!1){if(xe(e)){e.forEach((y,E)=>Pa(y,t&&(xe(t)?t[E]:t),s,n,a));return}if(kn(n)&&!a){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Pa(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?tl(n.component):n.el,l=a?null:i,{i:r,r:o}=e,c=t&&t.r,d=r.refs===je?r.refs={}:r.refs,u=r.setupState,f=Je(u),p=u===je?Ra:y=>md(d,y)?!1:et(f,y),b=(y,E)=>!(E&&md(d,E));if(c!=null&&c!==o){if(gd(t),Me(c))d[c]=null,p(c)&&(u[c]=null);else if(St(c)){const y=t;b(c,y.k)&&(c.value=null),y.k&&(d[y.k]=null)}}if(Re(o))ei(o,r,12,[l,d]);else{const y=Me(o),E=St(o);if(y||E){const I=()=>{if(e.f){const x=y?p(o)?u[o]:d[o]:b()||!e.k?o.value:d[e.k];if(a)xe(x)&&Jo(x,i);else if(xe(x))x.includes(i)||x.push(i);else if(y)d[o]=[i],p(o)&&(u[o]=d[o]);else{const m=[i];b(o,e.k)&&(o.value=m),e.k&&(d[e.k]=m)}}else y?(d[o]=l,p(o)&&(u[o]=l)):E&&(b(o,e.k)&&(o.value=l),e.k&&(d[e.k]=l))};if(l){const x=()=>{I(),Bl.delete(e)};x.id=-1,Bl.set(e,x),kt(x,s)}else gd(e),I()}}}function gd(e){const t=Bl.get(e);t&&(t.flags|=8,Bl.delete(e))}let vd=!1;const xa=()=>{vd||(console.error("Hydration completed but contains mismatches."),vd=!0)},Ev=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Av=e=>e.namespaceURI.includes("MathML"),hl=e=>{if(e.nodeType===1){if(Ev(e))return"svg";if(Av(e))return"mathml"}},Ia=e=>e.nodeType===8;function Rv(e){const{mt:t,p:s,o:{patchProp:n,createText:a,nextSibling:i,parentNode:l,remove:r,insert:o,createComment:c}}=e,d=(m,_)=>{if(!_.hasChildNodes()){s(null,m,_),$l(),_._vnode=m;return}u(_.firstChild,m,null,null,null),$l(),_._vnode=m},u=(m,_,S,g,w,T=!1)=>{T=T||!!_.dynamicChildren;const C=Ia(m)&&m.data==="[",M=()=>y(m,_,S,g,w,C),{type:H,ref:P,shapeFlag:R,patchFlag:j}=_;let Q=m.nodeType;_.el=m,j===-2&&(T=!1,_.dynamicChildren=null);let U=null;switch(H){case Bn:Q!==3?_.children===""?(o(_.el=a(""),l(m),m),U=m):U=M():(m.data!==_.children&&(xa(),m.data=_.children),U=i(m));break;case yt:x(m)?(U=i(m),I(_.el=m.content.firstChild,m,S)):Q!==8||C?U=M():U=i(m);break;case ta:if(C&&(m=i(m),Q=m.nodeType),Q===1||Q===3){U=m;const O=!_.children.length;for(let N=0;N<_.staticCount;N++)O&&(_.children+=U.nodeType===1?U.outerHTML:U.data),N===_.staticCount-1&&(_.anchor=U),U=i(U);return C?i(U):U}else M();break;case Dt:C?U=b(m,_,S,g,w,T):U=M();break;default:if(R&1)(Q!==1||_.type.toLowerCase()!==m.tagName.toLowerCase())&&!x(m)?U=M():U=f(m,_,S,g,w,T);else if(R&6){_.slotScopeIds=w;const O=l(m);if(C?U=E(m):Ia(m)&&m.data==="teleport start"?U=E(m,m.data,"teleport end"):U=i(m),t(_,O,null,S,g,hl(O),T),kn(_)&&!_.type.__asyncResolved){let N;C?(N=ft(Dt),N.anchor=U?U.previousSibling:O.lastChild):N=m.nodeType===3?yc(""):ft("div"),N.el=m,_.component.subTree=N}}else R&64?Q!==8?U=M():U=_.type.hydrate(m,_,S,g,w,T,e,p):R&128&&(U=_.type.hydrate(m,_,S,g,hl(l(m)),w,T,e,u))}return P!=null&&Pa(P,null,g,_),U},f=(m,_,S,g,w,T)=>{T=T||!!_.dynamicChildren;const{type:C,props:M,patchFlag:H,shapeFlag:P,dirs:R,transition:j}=_,Q=C==="input"||C==="option";if(Q||H!==-1){R&&en(_,null,S,"created");let U=!1;if(x(m)){U=wp(null,j)&&S&&S.vnode.props&&S.vnode.props.appear;const N=m.content.firstChild;if(U){const Y=N.getAttribute("class");Y&&(N.$cls=Y),j.beforeEnter(N)}I(N,m,S),_.el=m=N}if(P&16&&!(M&&(M.innerHTML||M.textContent))){let N=p(m.firstChild,_,m,S,g,w,T);for(N&&!ml(m,1)&&xa();N;){const Y=N;N=N.nextSibling,r(Y)}}else if(P&8){let N=_.children;N[0]===` +**/const $f=[];function iv(e){$f.push(e)}function lv(){$f.pop()}function rv(e,t){}const ov={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},cv={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function ti(e,t,s,n){try{return n?e(...n):e()}catch(a){fa(a,t,s)}}function xs(e,t,s,n){if(Ie(e)){const a=ti(e,t,s,n);return a&&Yo(a)&&a.catch(i=>{fa(i,t,s)}),a}if(be(e)){const a=[];for(let i=0;i>>1,a=ts[n],i=Pi(a);i=Pi(s)?ts.push(e):ts.splice(uv(t),0,e),e.flags|=1,Uf()}}function Uf(){Fl||(Fl=Bf.then(Hf))}function Mi(e){be(e)?Pa.push(...e):Mn&&e.id===-1?Mn.splice(Ca+1,0,e):e.flags&1||(Pa.push(e),e.flags|=1),Uf()}function ud(e,t,s=Ys+1){for(;sPi(s)-Pi(n));if(Pa.length=0,Mn){Mn.push(...t);return}for(Mn=t,Ca=0;Cae.id==null?e.flags&2?-1:1/0:e.id;function Hf(e){try{for(Ys=0;YsEa.emit(a,...i)),fl=[]):typeof window<"u"&&window.HTMLElement&&!((n=(s=window.navigator)==null?void 0:s.userAgent)!=null&&n.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{zf(i,t)}),setTimeout(()=>{Ea||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,fl=[])},3e3)):fl=[]}let Ut=null,xr=null;function Fi(e){const t=Ut;return Ut=e,xr=e&&e.type.__scopeId||null,t}function fv(e){xr=e}function pv(){xr=null}const hv=e=>lc;function lc(e,t=Ut,s){if(!t||e._n)return e;const n=(...a)=>{n._d&&Hi(-1);const i=Fi(t);let l;try{l=e(...a)}finally{Fi(i),n._d&&Hi(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function mv(e,t){if(Ut===null)return e;const s=sl(Ut),n=e.dirs||(e.dirs=[]);for(let a=0;a1)return s&&Ie(t)?t.call(n&&n.proxy):t}}function gv(){return!!(as()||ta)}const Vf=Symbol.for("v-scx"),jf=()=>Os(Vf);function vv(e,t){return Xi(e,null,t)}function bv(e,t){return Xi(e,null,{flush:"post"})}function qf(e,t){return Xi(e,null,{flush:"sync"})}function ns(e,t,s){return Xi(e,t,s)}function Xi(e,t,s=je){const{immediate:n,deep:a,flush:i,once:l}=s,r=ze({},s),o=t&&n||!t&&i!=="post";let c;if(la){if(i==="sync"){const p=jf();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!o){const p=()=>{};return p.stop=Ht,p.resume=Ht,p.pause=Ht,p}}const d=Bt;r.call=(p,b,y)=>xs(p,d,b,y);let u=!1;i==="post"?r.scheduler=p=>{kt(p,d&&d.suspense)}:i!=="sync"&&(u=!0,r.scheduler=(p,b)=>{b?p():ic(p)}),r.augmentJob=p=>{t&&(p.flags|=4),u&&(p.flags|=2,d&&(p.id=d.uid,p.i=d))};const f=av(e,t,r);return la&&(c?c.push(f):o&&f()),f}function yv(e,t,s){const n=this.proxy,a=Me(e)?e.includes(".")?Gf(n,e):()=>n[e]:e.bind(n,n);let i;Ie(t)?i=t:(i=t.handler,s=t);const l=si(this),r=Xi(a,i.bind(n),s);return l(),r}function Gf(e,t){const s=t.split(".");return()=>{let n=e;for(let a=0;ae.__isTeleport,Jn=e=>e&&(e.disabled||e.disabled===""),xv=e=>e&&(e.defer||e.defer===""),fd=e=>typeof SVGElement<"u"&&e instanceof SVGElement,pd=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,bo=(e,t)=>{const s=e&&e.to;return Me(s)?t?t(s):null:s},_v={name:"Teleport",__isTeleport:!0,process(e,t,s,n,a,i,l,r,o,c){const{mc:d,pc:u,pbc:f,o:{insert:p,querySelector:b,createText:y,createComment:E,parentNode:I}}=c,x=Jn(t.props);let{dynamicChildren:m}=t;const _=(w,T,C)=>{w.shapeFlag&16&&d(w.children,T,C,a,i,l,r,o)},S=(w=t)=>{const T=Jn(w.props),C=w.target=bo(w.props,b),M=yo(C,w,y,p);C&&(l!=="svg"&&fd(C)?l="svg":l!=="mathml"&&pd(C)&&(l="mathml"),a&&a.isCE&&(a.ce._teleportTargets||(a.ce._teleportTargets=new Set)).add(C),T||(_(w,C,M),gi(w,!1)))},g=w=>{const T=()=>{if(Nn.get(w)===T){if(Nn.delete(w),Jn(w.props)){const C=I(w.el)||s;_(w,C,w.anchor),gi(w,!0)}S(w)}};Nn.set(w,T),kt(T,i)};if(e==null){const w=t.el=y(""),T=t.anchor=y("");if(p(w,s,n),p(T,s,n),xv(t.props)||i&&i.pendingBranch){g(t);return}x&&(_(t,s,T),gi(t,!0)),S()}else{t.el=e.el;const w=t.anchor=e.anchor,T=Nn.get(e);if(T){T.flags|=8,Nn.delete(e),g(t);return}t.targetStart=e.targetStart;const C=t.target=e.target,M=t.targetAnchor=e.targetAnchor,H=Jn(e.props),P=H?s:C,R=H?w:M;if(l==="svg"||fd(C)?l="svg":(l==="mathml"||pd(C))&&(l="mathml"),m?(f(e.dynamicChildren,m,P,a,i,l,r),vc(e,t,!0)):o||u(e,t,P,R,a,i,l,r,!1),x)H?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):pl(t,s,w,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const j=t.target=bo(t.props,b);j&&pl(t,j,null,c,0)}else H&&pl(t,C,M,c,1);gi(t,x)}},remove(e,t,s,{um:n,o:{remove:a}},i){const{shapeFlag:l,children:r,anchor:o,targetStart:c,targetAnchor:d,target:u,props:f}=e,p=i||!Jn(f),b=Nn.get(e);if(b&&(b.flags|=8,Nn.delete(e)),u&&(a(c),a(d)),i&&a(o),!b&&l&16)for(let y=0;y{e.isMounted=!0}),Sr(()=>{e.isUnmounting=!0}),e}const Es=[Function,Array],oc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Es,onEnter:Es,onAfterEnter:Es,onEnterCancelled:Es,onBeforeLeave:Es,onLeave:Es,onAfterLeave:Es,onLeaveCancelled:Es,onBeforeAppear:Es,onAppear:Es,onAfterAppear:Es,onAppearCancelled:Es},Zf=e=>{const t=e.subTree;return t.component?Zf(t.component):t},Sv={name:"BaseTransition",props:oc,setup(e,{slots:t}){const s=as(),n=rc();return()=>{const a=t.default&&_r(t.default(),!0),i=a&&a.length?Jf(a):s.subTree?Np():void 0;if(!i)return;const l=Je(e),{mode:r}=l;if(n.isLeaving)return jr(i);const o=hd(i);if(!o)return jr(i);let c=Va(o,l,n,s,u=>c=u);o.type!==yt&&Tn(o,c);let d=s.subTree&&hd(s.subTree);if(d&&d.type!==yt&&!Hs(d,o)&&Zf(s).type!==yt){let u=Va(d,l,n,s);if(Tn(d,u),r==="out-in"&&o.type!==yt)return n.isLeaving=!0,u.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete u.afterLeave,d=void 0},jr(i);r==="in-out"&&o.type!==yt?u.delayLeave=(f,p,b)=>{const y=Qf(n,d);y[String(d.key)]=d,f[As]=()=>{p(),f[As]=void 0,delete c.delayedLeave,d=void 0},c.delayedLeave=()=>{b(),delete c.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return i}}};function Jf(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==yt){t=s;break}}return t}const Yf=Sv;function Qf(e,t){const{leavingVNodes:s}=e;let n=s.get(t.type);return n||(n=Object.create(null),s.set(t.type,n)),n}function Va(e,t,s,n,a){const{appear:i,mode:l,persisted:r=!1,onBeforeEnter:o,onEnter:c,onAfterEnter:d,onEnterCancelled:u,onBeforeLeave:f,onLeave:p,onAfterLeave:b,onLeaveCancelled:y,onBeforeAppear:E,onAppear:I,onAfterAppear:x,onAppearCancelled:m}=t,_=String(e.key),S=Qf(s,e),g=(C,M)=>{C&&xs(C,n,9,M)},w=(C,M)=>{const H=M[1];g(C,M),be(C)?C.every(P=>P.length<=1)&&H():C.length<=1&&H()},T={mode:l,persisted:r,beforeEnter(C){let M=o;if(!s.isMounted)if(i)M=E||o;else return;C[As]&&C[As](!0);const H=S[_];H&&Hs(e,H)&&H.el[As]&&H.el[As](),g(M,[C])},enter(C){if(S[_]===e)return;let M=c,H=d,P=u;if(!s.isMounted)if(i)M=I||c,H=x||d,P=m||u;else return;let R=!1;C[oi]=Q=>{R||(R=!0,Q?g(P,[C]):g(H,[C]),T.delayedLeave&&T.delayedLeave(),C[oi]=void 0)};const j=C[oi].bind(null,!1);M?w(M,[C,j]):j()},leave(C,M){const H=String(e.key);if(C[oi]&&C[oi](!0),s.isUnmounting)return M();g(f,[C]);let P=!1;C[As]=j=>{P||(P=!0,M(),j?g(y,[C]):g(b,[C]),C[As]=void 0,S[H]===e&&delete S[H])};const R=C[As].bind(null,!1);S[H]=e,p?w(p,[C,R]):R()},clone(C){const M=Va(C,t,s,n,a);return a&&a(M),M}};return T}function jr(e){if(tl(e))return e=sn(e),e.children=null,e}function hd(e){if(!tl(e))return Wf(e.type)&&e.children?Jf(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&Ie(s.default))return s.default()}}function Tn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Tn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function _r(e,t=!1,s){let n=[],a=0;for(let i=0;i1)for(let i=0;is.value,set:i=>s.value=i})}return s}function md(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Bl=new WeakMap;function Fa(e,t,s,n,a=!1){if(be(e)){e.forEach((y,E)=>Fa(y,t&&(be(t)?t[E]:t),s,n,a));return}if(xn(n)&&!a){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Fa(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?sl(n.component):n.el,l=a?null:i,{i:r,r:o}=e,c=t&&t.r,d=r.refs===je?r.refs={}:r.refs,u=r.setupState,f=Je(u),p=u===je?Ia:y=>md(d,y)?!1:tt(f,y),b=(y,E)=>!(E&&md(d,E));if(c!=null&&c!==o){if(gd(t),Me(c))d[c]=null,p(c)&&(u[c]=null);else if(St(c)){const y=t;b(c,y.k)&&(c.value=null),y.k&&(d[y.k]=null)}}if(Ie(o))ti(o,r,12,[l,d]);else{const y=Me(o),E=St(o);if(y||E){const I=()=>{if(e.f){const x=y?p(o)?u[o]:d[o]:b()||!e.k?o.value:d[e.k];if(a)be(x)&&Jo(x,i);else if(be(x))x.includes(i)||x.push(i);else if(y)d[o]=[i],p(o)&&(u[o]=d[o]);else{const m=[i];b(o,e.k)&&(o.value=m),e.k&&(d[e.k]=m)}}else y?(d[o]=l,p(o)&&(u[o]=l)):E&&(b(o,e.k)&&(o.value=l),e.k&&(d[e.k]=l))};if(l){const x=()=>{I(),Bl.delete(e)};x.id=-1,Bl.set(e,x),kt(x,s)}else gd(e),I()}}}function gd(e){const t=Bl.get(e);t&&(t.flags|=8,Bl.delete(e))}let vd=!1;const _a=()=>{vd||(console.error("Hydration completed but contains mismatches."),vd=!0)},Ev=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Av=e=>e.namespaceURI.includes("MathML"),hl=e=>{if(e.nodeType===1){if(Ev(e))return"svg";if(Av(e))return"mathml"}},Oa=e=>e.nodeType===8;function Rv(e){const{mt:t,p:s,o:{patchProp:n,createText:a,nextSibling:i,parentNode:l,remove:r,insert:o,createComment:c}}=e,d=(m,_)=>{if(!_.hasChildNodes()){s(null,m,_),$l(),_._vnode=m;return}u(_.firstChild,m,null,null,null),$l(),_._vnode=m},u=(m,_,S,g,w,T=!1)=>{T=T||!!_.dynamicChildren;const C=Oa(m)&&m.data==="[",M=()=>y(m,_,S,g,w,C),{type:H,ref:P,shapeFlag:R,patchFlag:j}=_;let Q=m.nodeType;_.el=m,j===-2&&(T=!1,_.dynamicChildren=null);let U=null;switch(H){case $n:Q!==3?_.children===""?(o(_.el=a(""),l(m),m),U=m):U=M():(m.data!==_.children&&(_a(),m.data=_.children),U=i(m));break;case yt:x(m)?(U=i(m),I(_.el=m.content.firstChild,m,S)):Q!==8||C?U=M():U=i(m);break;case sa:if(C&&(m=i(m),Q=m.nodeType),Q===1||Q===3){U=m;const O=!_.children.length;for(let N=0;N<_.staticCount;N++)O&&(_.children+=U.nodeType===1?U.outerHTML:U.data),N===_.staticCount-1&&(_.anchor=U),U=i(U);return C?i(U):U}else M();break;case Dt:C?U=b(m,_,S,g,w,T):U=M();break;default:if(R&1)(Q!==1||_.type.toLowerCase()!==m.tagName.toLowerCase())&&!x(m)?U=M():U=f(m,_,S,g,w,T);else if(R&6){_.slotScopeIds=w;const O=l(m);if(C?U=E(m):Oa(m)&&m.data==="teleport start"?U=E(m,m.data,"teleport end"):U=i(m),t(_,O,null,S,g,hl(O),T),xn(_)&&!_.type.__asyncResolved){let N;C?(N=ft(Dt),N.anchor=U?U.previousSibling:O.lastChild):N=m.nodeType===3?yc(""):ft("div"),N.el=m,_.component.subTree=N}}else R&64?Q!==8?U=M():U=_.type.hydrate(m,_,S,g,w,T,e,p):R&128&&(U=_.type.hydrate(m,_,S,g,hl(l(m)),w,T,e,u))}return P!=null&&Fa(P,null,g,_),U},f=(m,_,S,g,w,T)=>{T=T||!!_.dynamicChildren;const{type:C,props:M,patchFlag:H,shapeFlag:P,dirs:R,transition:j}=_,Q=C==="input"||C==="option";if(Q||H!==-1){R&&Qs(_,null,S,"created");let U=!1;if(x(m)){U=wp(null,j)&&S&&S.vnode.props&&S.vnode.props.appear;const N=m.content.firstChild;if(U){const Y=N.getAttribute("class");Y&&(N.$cls=Y),j.beforeEnter(N)}I(N,m,S),_.el=m=N}if(P&16&&!(M&&(M.innerHTML||M.textContent))){let N=p(m.firstChild,_,m,S,g,w,T);for(N&&!ml(m,1)&&_a();N;){const Y=N;N=N.nextSibling,r(Y)}}else if(P&8){let N=_.children;N[0]===` `&&(m.tagName==="PRE"||m.tagName==="TEXTAREA")&&(N=N.slice(1));const{textContent:Y}=m;Y!==N&&Y!==N.replace(/\r\n|\r/g,` -`)&&(ml(m,0)||xa(),m.textContent=_.children)}if(M){if(Q||!T||H&48){const N=m.tagName.includes("-");for(const Y in M)(Q&&(Y.endsWith("value")||Y==="indeterminate")||oa(Y)&&!xn(Y)||Y[0]==="."||N&&!xn(Y))&&n(m,Y,null,M[Y],void 0,S)}else if(M.onClick)n(m,"onClick",null,M.onClick,void 0,S);else if(H&4&&_n(M.style))for(const N in M.style)M.style[N]}let O;(O=M&&M.onVnodeBeforeMount)&&us(O,S,_),R&&en(_,null,S,"beforeMount"),((O=M&&M.onVnodeMounted)||R||U)&&Ep(()=>{O&&us(O,S,_),U&&j.enter(m),R&&en(_,null,S,"mounted")},g)}return m.nextSibling},p=(m,_,S,g,w,T,C)=>{C=C||!!_.dynamicChildren;const M=_.children,H=M.length;let P=!1;for(let R=0;R{const{slotScopeIds:C}=_;C&&(w=w?w.concat(C):C);const M=l(m),H=p(i(m),_,M,S,g,w,T);return H&&Ia(H)&&H.data==="]"?i(_.anchor=H):(xa(),o(_.anchor=c("]"),M,H),H)},y=(m,_,S,g,w,T)=>{if(ml(m.parentElement,1)||xa(),_.el=null,T){const H=E(m);for(;;){const P=i(m);if(P&&P!==H)r(P);else break}}const C=i(m),M=l(m);return r(m),s(null,_,M,C,S,g,hl(M),w),S&&(S.vnode.el=_.el,Cr(S,_.el)),C},E=(m,_="[",S="]")=>{let g=0;for(;m;)if(m=i(m),m&&Ia(m)&&(m.data===_&&g++,m.data===S)){if(g===0)return i(m);g--}return m},I=(m,_,S)=>{const g=_.parentNode;g&&g.replaceChild(m,_);let w=S;for(;w;)w.vnode.el===_&&(w.vnode.el=w.subTree.el=m),w=w.parent},x=m=>m.nodeType===1&&m.tagName==="TEMPLATE";return[d,u]}const bd="data-allow-mismatch",Iv={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function ml(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(bd);)e=e.parentElement;const s=e&&e.getAttribute(bd);if(s==null)return!1;if(s==="")return!0;{const n=s.split(",");return t===0&&n.includes("children")?!0:n.includes(Iv[t])}}const Ov=hr().requestIdleCallback||(e=>setTimeout(e,1)),Nv=hr().cancelIdleCallback||(e=>clearTimeout(e)),Lv=(e=1e4)=>t=>{const s=Ov(t,{timeout:e});return()=>Nv(s)};function Dv(e){const{top:t,left:s,bottom:n,right:a}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:l}=window;return(t>0&&t0&&n0&&s0&&a(t,s)=>{const n=new IntersectionObserver(a=>{for(const i of a)if(i.isIntersecting){n.disconnect(),t();break}},e);return s(a=>{if(a instanceof Element){if(Dv(a))return t(),n.disconnect(),!1;n.observe(a)}}),()=>n.disconnect()},Pv=e=>t=>{if(e){const s=matchMedia(e);if(s.matches)t();else return s.addEventListener("change",t,{once:!0}),()=>s.removeEventListener("change",t)}},Fv=(e=[])=>(t,s)=>{Me(e)&&(e=[e]);let n=!1;const a=l=>{n||(n=!0,i(),t(),l.target.dispatchEvent(new l.constructor(l.type,l)))},i=()=>{s(l=>{for(const r of e)l.removeEventListener(r,a)})};return s(l=>{for(const r of e)l.addEventListener(r,a,{once:!0})}),i};function $v(e,t){if(Ia(e)&&e.data==="["){let s=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(Ia(n))if(n.data==="]"){if(--s===0)break}else n.data==="["&&s++;n=n.nextSibling}}else t(e)}const kn=e=>!!e.type.__asyncLoader;function Bv(e){Re(e)&&(e={loader:e});const{loader:t,loadingComponent:s,errorComponent:n,delay:a=200,hydrate:i,timeout:l,suspensible:r=!0,onError:o}=e;let c=null,d,u=0;const f=()=>(u++,c=null,p()),p=()=>{let b;return c||(b=c=t().catch(y=>{if(y=y instanceof Error?y:new Error(String(y)),o)return new Promise((E,I)=>{o(y,()=>E(f()),()=>I(y),u+1)});throw y}).then(y=>b!==c&&c?c:(y&&(y.__esModule||y[Symbol.toStringTag]==="Module")&&(y=y.default),d=y,y)))};return Xi({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(b,y,E){let I=!1;(y.bu||(y.bu=[])).push(()=>I=!0);const x=()=>{I||E()},m=i?()=>{const _=i(x,S=>$v(b,S));_&&(y.bum||(y.bum=[])).push(_)}:x;d?m():p().then(()=>!y.isUnmounted&&m())},get __asyncResolved(){return d},setup(){const b=$t;if(cc(b),d)return()=>gl(d,b);const y=S=>{c=null,ua(S,b,13,!n)};if(r&&b.suspense||ia)return p().then(S=>()=>gl(S,b)).catch(S=>(y(S),()=>n?ft(n,{error:S}):null));const E=h(!1),I=h(),x=h(!!a);let m,_;return xt(()=>{m!=null&&clearTimeout(m),_!=null&&clearTimeout(_)}),a&&(_=setTimeout(()=>{b.isUnmounted||(x.value=!1)},a)),l!=null&&(m=setTimeout(()=>{if(!b.isUnmounted&&!E.value&&!I.value){const S=new Error(`Async component timed out after ${l}ms.`);y(S),I.value=S}},l)),p().then(()=>{b.isUnmounted||(E.value=!0,b.parent&&el(b.parent.vnode)&&b.parent.update())}).catch(S=>{if(b.isUnmounted){c=null;return}y(S),I.value=S}),()=>{if(E.value&&d)return gl(d,b);if(I.value&&n)return ft(n,{error:I.value});if(s&&!x.value)return gl(s,b)}}})}function gl(e,t){const{ref:s,props:n,children:a,ce:i}=t.vnode,l=ft(e,n,a);return l.ref=s,l.ce=i,delete t.vnode.ce,l}const el=e=>e.type.__isKeepAlive,Uv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const s=ss(),n=s.ctx;if(!n.renderer)return()=>{const x=t.default&&t.default();return x&&x.length===1?x[0]:x};const a=new Map,i=new Set;let l=null;const r=s.suspense,{renderer:{p:o,m:c,um:d,o:{createElement:u}}}=n,f=u("div");n.activate=(x,m,_,S,g)=>{const w=x.component;c(x,m,_,0,r),o(w.vnode,x,m,_,w,r,S,x.slotScopeIds,g),kt(()=>{w.isDeactivated=!1,w.a&&Da(w.a);const T=x.props&&x.props.onVnodeMounted;T&&us(T,w.parent,x)},r)},n.deactivate=x=>{const m=x.component;Hl(m.m),Hl(m.a),c(x,f,null,1,r),kt(()=>{m.da&&Da(m.da);const _=x.props&&x.props.onVnodeUnmounted;_&&us(_,m.parent,x),m.isDeactivated=!0},r)};function p(x){qr(x),d(x,s,r,!0)}function b(x){a.forEach((m,_)=>{const S=Ao(kn(m)?m.type.__asyncResolved||{}:m.type);S&&!x(S)&&y(_)})}function y(x){const m=a.get(x);m&&(!l||!Hs(m,l))?p(m):l&&qr(l),a.delete(x),i.delete(x)}ts(()=>[e.include,e.exclude],([x,m])=>{x&&b(_=>gi(x,_)),m&&b(_=>!gi(m,_))},{flush:"post",deep:!0});let E=null;const I=()=>{E!=null&&(zl(s.subTree.type)?kt(()=>{a.set(E,vl(s.subTree))},s.subTree.suspense):a.set(E,vl(s.subTree)))};return We(I),wr(I),Sr(()=>{a.forEach(x=>{const{subTree:m,suspense:_}=s,S=vl(m);if(x.type===S.type&&x.key===S.key){qr(S);const g=S.component.da;g&&kt(g,_);return}p(x)})}),()=>{if(E=null,!t.default)return l=null;const x=t.default(),m=x[0];if(x.length>1)return l=null,x;if(!An(m)||!(m.shapeFlag&4)&&!(m.shapeFlag&128))return l=null,m;let _=vl(m);if(_.type===yt)return l=null,_;const S=_.type,g=Ao(kn(_)?_.type.__asyncResolved||{}:S),{include:w,exclude:T,max:C}=e;if(w&&(!g||!gi(w,g))||T&&g&&gi(T,g))return _.shapeFlag&=-257,l=_,m;const M=_.key==null?S:_.key,H=a.get(M);return _.el&&(_=an(_),m.shapeFlag&128&&(m.ssContent=_)),E=M,H?(_.el=H.el,_.component=H.component,_.transition&&En(_,_.transition),_.shapeFlag|=512,i.delete(M),i.add(M)):(i.add(M),C&&i.size>parseInt(C,10)&&y(i.values().next().value)),_.shapeFlag|=256,l=_,zl(m.type)?m:_}}},Hv=Uv;function gi(e,t){return xe(e)?e.some(s=>gi(s,t)):Me(e)?e.split(",").includes(t):Ym(e)?(e.lastIndex=0,e.test(t)):!1}function Ms(e,t){Xf(e,"a",t)}function Ps(e,t){Xf(e,"da",t)}function Xf(e,t,s=$t){const n=e.__wdc||(e.__wdc=()=>{let a=s;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(kr(t,n,s),s){let a=s.parent;for(;a&&a.parent;)el(a.parent.vnode)&&zv(n,t,s,a),a=a.parent}}function zv(e,t,s,n){const a=kr(t,e,n,!0);xt(()=>{Jo(n[t],a)},s)}function qr(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function vl(e){return e.shapeFlag&128?e.ssContent:e}function kr(e,t,s=$t,n=!1){if(s){const a=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...l)=>{Tn();const r=ti(s),o=_s(t,s,e,l);return r(),Cn(),o});return n?a.unshift(i):a.push(i),i}}const Rn=e=>(t,s=$t)=>{(!ia||e==="sp")&&kr(e,(...n)=>t(...n),s)},ep=Rn("bm"),We=Rn("m"),dc=Rn("bu"),wr=Rn("u"),Sr=Rn("bum"),xt=Rn("um"),tp=Rn("sp"),sp=Rn("rtg"),np=Rn("rtc");function ap(e,t=$t){kr("ec",e,t)}const uc="components",Vv="directives";function jv(e,t){return fc(uc,e,!0,t)||e}const ip=Symbol.for("v-ndc");function qv(e){return Me(e)?fc(uc,e,!1)||e:e||ip}function Gv(e){return fc(Vv,e)}function fc(e,t,s=!0,n=!1){const a=Bt||$t;if(a){const i=a.type;if(e===uc){const r=Ao(i,!1);if(r&&(r===t||r===it(t)||r===da(it(t))))return i}const l=yd(a[e]||i[e],t)||yd(a.appContext[e],t);return!l&&n?i:l}}function yd(e,t){return e&&(e[t]||e[it(t)]||e[da(it(t))])}function Kv(e,t,s,n){let a;const i=s&&s[n],l=xe(e);if(l||Me(e)){const r=l&&_n(e);let o=!1,c=!1;r&&(o=!gs(e),c=nn(e),e=vr(e)),a=new Array(e.length);for(let d=0,u=e.length;dt(r,o,void 0,i&&i[o]));else{const r=Object.keys(e);a=new Array(r.length);for(let o=0,c=r.length;o{const i=n.fn(...a);return i&&(i.key=n.key),i}:n.fn)}return e}function Zv(e,t,s={},n,a){if(Bt.ce||Bt.parent&&kn(Bt.parent)&&Bt.parent.ce){const c=Object.keys(s).length>0;return t!=="default"&&(s.name=t),Bi(),Vl(Dt,null,[ft("slot",s,n&&n())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),Bi();const l=i&&pc(i(s)),r=s.key||l&&l.key,o=Vl(Dt,{key:(r&&!Wt(r)?r:`_${t}`)+(!l&&n?"_fb":"")},l||(n?n():[]),l&&e._===1?64:-2);return!a&&o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),i&&i._c&&(i._d=!0),o}function pc(e){return e.some(t=>An(t)?!(t.type===yt||t.type===Dt&&!pc(t.children)):!0)?e:null}function Jv(e,t){const s={};for(const n in e)s[t&&/[A-Z]/.test(n)?`on:${n}`:La(n)]=e[n];return s}const xo=e=>e?Mp(e)?tl(e):xo(e.parent):null,wi=ze(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>xo(e.parent),$root:e=>xo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>hc(e),$forceUpdate:e=>e.f||(e.f=()=>{ic(e.update)}),$nextTick:e=>e.n||(e.n=It.bind(e.proxy)),$watch:e=>yv.bind(e)}),Gr=(e,t)=>e!==je&&!e.__isScriptSetup&&et(e,t),_o={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:a,props:i,accessCache:l,type:r,appContext:o}=e;if(t[0]!=="$"){const f=l[t];if(f!==void 0)switch(f){case 1:return n[t];case 2:return a[t];case 4:return s[t];case 3:return i[t]}else{if(Gr(n,t))return l[t]=1,n[t];if(a!==je&&et(a,t))return l[t]=2,a[t];if(et(i,t))return l[t]=3,i[t];if(s!==je&&et(s,t))return l[t]=4,s[t];ko&&(l[t]=0)}}const c=wi[t];let d,u;if(c)return t==="$attrs"&&qt(e.attrs,"get",""),c(e);if((d=r.__cssModules)&&(d=d[t]))return d;if(s!==je&&et(s,t))return l[t]=4,s[t];if(u=o.config.globalProperties,et(u,t))return u[t]},set({_:e},t,s){const{data:n,setupState:a,ctx:i}=e;return Gr(a,t)?(a[t]=s,!0):n!==je&&et(n,t)?(n[t]=s,!0):et(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:a,props:i,type:l}},r){let o;return!!(s[r]||e!==je&&r[0]!=="$"&&et(e,r)||Gr(t,r)||et(i,r)||et(n,r)||et(wi,r)||et(a.config.globalProperties,r)||(o=l.__cssModules)&&o[r])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:et(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}},Yv=ze({},_o,{get(e,t){if(t!==Symbol.unscopables)return _o.get(e,t,e)},has(e,t){return t[0]!=="_"&&!ag(t)}});function Qv(){return null}function Xv(){return null}function eb(e){}function tb(e){}function sb(){return null}function nb(){}function ab(e,t){return null}function ib(){return lp().slots}function lb(){return lp().attrs}function lp(e){const t=ss();return t.setupContext||(t.setupContext=Bp(t))}function Fi(e){return xe(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}function rb(e,t){const s=Fi(e);for(const n in t){if(n.startsWith("__skip"))continue;let a=s[n];a?xe(a)||Re(a)?a=s[n]={type:a,default:t[n]}:a.default=t[n]:a===null&&(a=s[n]={default:t[n]}),a&&t[`__skip_${n}`]&&(a.skipFactory=!0)}return s}function ob(e,t){return!e||!t?e||t:xe(e)&&xe(t)?e.concat(t):ze({},Fi(e),Fi(t))}function cb(e,t){const s={};for(const n in e)t.includes(n)||Object.defineProperty(s,n,{enumerable:!0,get:()=>e[n]});return s}function db(e){const t=ss(),s=ia;let n=e();Hi(),s&&$a(!1);const a=()=>{ti(t),s&&$a(!0)},i=()=>{ss()!==t&&t.scope.off(),Hi(),s&&$a(!1)};return Yo(n)&&(n=n.catch(l=>{throw a(),Promise.resolve().then(()=>Promise.resolve().then(i)),l})),[n,()=>{a(),Promise.resolve().then(i)}]}let ko=!0;function ub(e){const t=hc(e),s=e.proxy,n=e.ctx;ko=!1,t.beforeCreate&&xd(t.beforeCreate,e,"bc");const{data:a,computed:i,methods:l,watch:r,provide:o,inject:c,created:d,beforeMount:u,mounted:f,beforeUpdate:p,updated:b,activated:y,deactivated:E,beforeDestroy:I,beforeUnmount:x,destroyed:m,unmounted:_,render:S,renderTracked:g,renderTriggered:w,errorCaptured:T,serverPrefetch:C,expose:M,inheritAttrs:H,components:P,directives:R,filters:j}=t;if(c&&fb(c,n,null),l)for(const O in l){const N=l[O];Re(N)&&(n[O]=N.bind(s))}if(a){const O=a.call(s,s);Qe(O)&&(e.data=zn(O))}if(ko=!0,i)for(const O in i){const N=i[O],Y=Re(N)?N.bind(s,s):Re(N.get)?N.get.bind(s,s):Ut,we=!Re(N)&&Re(N.set)?N.set.bind(s):Ut,ke=J({get:Y,set:we});Object.defineProperty(n,O,{enumerable:!0,configurable:!0,get:()=>ke.value,set:ie=>ke.value=ie})}if(r)for(const O in r)rp(r[O],n,s,O);if(o){const O=Re(o)?o.call(s):o;Reflect.ownKeys(O).forEach(N=>{ki(N,O[N])})}d&&xd(d,e,"c");function U(O,N){xe(N)?N.forEach(Y=>O(Y.bind(s))):N&&O(N.bind(s))}if(U(ep,u),U(We,f),U(dc,p),U(wr,b),U(Ms,y),U(Ps,E),U(ap,T),U(np,g),U(sp,w),U(Sr,x),U(xt,_),U(tp,C),xe(M))if(M.length){const O=e.exposed||(e.exposed={});M.forEach(N=>{Object.defineProperty(O,N,{get:()=>s[N],set:Y=>s[N]=Y,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===Ut&&(e.render=S),H!=null&&(e.inheritAttrs=H),P&&(e.components=P),R&&(e.directives=R),C&&cc(e)}function fb(e,t,s=Ut){xe(e)&&(e=wo(e));for(const n in e){const a=e[n];let i;Qe(a)?"default"in a?i=Ns(a.from||n,a.default,!0):i=Ns(a.from||n):i=Ns(a),St(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[n]=i}}function xd(e,t,s){_s(xe(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function rp(e,t,s,n){let a=n.includes(".")?Gf(s,n):()=>s[n];if(Me(e)){const i=t[e];Re(i)&&ts(a,i)}else if(Re(e))ts(a,e.bind(s));else if(Qe(e))if(xe(e))e.forEach(i=>rp(i,t,s,n));else{const i=Re(e.handler)?e.handler.bind(s):t[e.handler];Re(i)&&ts(a,i,e)}}function hc(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:a,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,r=i.get(t);let o;return r?o=r:!a.length&&!s&&!n?o=t:(o={},a.length&&a.forEach(c=>Ul(o,c,l,!0)),Ul(o,t,l)),Qe(t)&&i.set(t,o),o}function Ul(e,t,s,n=!1){const{mixins:a,extends:i}=t;i&&Ul(e,i,s,!0),a&&a.forEach(l=>Ul(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const r=pb[l]||s&&s[l];e[l]=r?r(e[l],t[l]):t[l]}return e}const pb={data:_d,props:kd,emits:kd,methods:vi,computed:vi,beforeCreate:Jt,created:Jt,beforeMount:Jt,mounted:Jt,beforeUpdate:Jt,updated:Jt,beforeDestroy:Jt,beforeUnmount:Jt,destroyed:Jt,unmounted:Jt,activated:Jt,deactivated:Jt,errorCaptured:Jt,serverPrefetch:Jt,components:vi,directives:vi,watch:mb,provide:_d,inject:hb};function _d(e,t){return t?e?function(){return ze(Re(e)?e.call(this,this):e,Re(t)?t.call(this,this):t)}:t:e}function hb(e,t){return vi(wo(e),wo(t))}function wo(e){if(xe(e)){const t={};for(let s=0;s{let d,u=je,f;return qf(()=>{const p=e[a];Lt(d,p)&&(d=p,c())}),{get(){return o(),s.get?s.get(d):d},set(p){const b=s.set?s.set(p):p;if(!Lt(b,d)&&!(u!==je&&Lt(p,u)))return;const y=n.vnode.props,E=!!(y&&(t in y||a in y||i in y)&&(`onUpdate:${t}`in y||`onUpdate:${a}`in y||`onUpdate:${i}`in y));E||(d=p,c()),n.emit(`update:${t}`,b),Lt(p,u)&&(Lt(p,b)&&!Lt(b,f)||E&&u!==je&&!Lt(b,d))&&c(),u=p,f=b}}});return r[Symbol.iterator]=()=>{let o=0;return{next(){return o<2?{value:o++?l||je:r,done:!1}:{done:!0}}}},r}const cp=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${it(t)}Modifiers`]||e[`${hs(t)}Modifiers`];function yb(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||je;let a=s;const i=t.startsWith("update:"),l=i&&cp(n,t.slice(7));l&&(l.trim&&(a=s.map(d=>Me(d)?d.trim():d)),l.number&&(a=s.map(pr)));let r,o=n[r=La(t)]||n[r=La(it(t))];!o&&i&&(o=n[r=La(hs(t))]),o&&_s(o,e,6,a);const c=n[r+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,_s(c,e,6,a)}}const xb=new WeakMap;function dp(e,t,s=!1){const n=s?xb:t.emitsCache,a=n.get(e);if(a!==void 0)return a;const i=e.emits;let l={},r=!1;if(!Re(e)){const o=c=>{const d=dp(c,t,!0);d&&(r=!0,ze(l,d))};!s&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return!i&&!r?(Qe(e)&&n.set(e,null),null):(xe(i)?i.forEach(o=>l[o]=null):ze(l,i),Qe(e)&&n.set(e,l),l)}function Tr(e,t){return!e||!oa(t)?!1:(t=t.slice(2).replace(/Once$/,""),et(e,t[0].toLowerCase()+t.slice(1))||et(e,hs(t))||et(e,t))}function Cl(e){const{type:t,vnode:s,proxy:n,withProxy:a,propsOptions:[i],slots:l,attrs:r,emit:o,render:c,renderCache:d,props:u,data:f,setupState:p,ctx:b,inheritAttrs:y}=e,E=Pi(e);let I,x;try{if(s.shapeFlag&4){const _=a||n,S=_;I=ps(c.call(S,_,d,u,p,f,b)),x=r}else{const _=t;I=ps(_.length>1?_(u,{attrs:r,slots:l,emit:o}):_(u,null)),x=t.props?r:kb(r)}}catch(_){Si.length=0,ua(_,e,1),I=ft(yt)}let m=I;if(x&&y!==!1){const _=Object.keys(x),{shapeFlag:S}=m;_.length&&S&7&&(i&&_.some(cr)&&(x=wb(x,i)),m=an(m,x,!1,!0))}return s.dirs&&(m=an(m,null,!1,!0),m.dirs=m.dirs?m.dirs.concat(s.dirs):s.dirs),s.transition&&En(m,s.transition),I=m,Pi(E),I}function _b(e,t=!0){let s;for(let n=0;n{let t;for(const s in e)(s==="class"||s==="style"||oa(s))&&((t||(t={}))[s]=e[s]);return t},wb=(e,t)=>{const s={};for(const n in e)(!cr(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Sb(e,t,s){const{props:n,children:a,component:i}=e,{props:l,children:r,patchFlag:o}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&o>=0){if(o&1024)return!0;if(o&16)return n?wd(n,l,c):!!l;if(o&8){const d=t.dynamicProps;for(let u=0;uObject.create(fp),hp=e=>Object.getPrototypeOf(e)===fp;function Tb(e,t,s,n=!1){const a={},i=pp();e.propsDefaults=Object.create(null),mp(e,t,a,i);for(const l in e.propsOptions[0])l in a||(a[l]=void 0);s?e.props=n?a:sc(a):e.type.props?e.props=a:e.props=i,e.attrs=i}function Cb(e,t,s,n){const{props:a,attrs:i,vnode:{patchFlag:l}}=e,r=Je(a),[o]=e.propsOptions;let c=!1;if((n||l>0)&&!(l&16)){if(l&8){const d=e.vnode.dynamicProps;for(let u=0;u{o=!0;const[f,p]=gp(u,t,!0);ze(l,f),p&&r.push(...p)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!o)return Qe(e)&&n.set(e,Oa),Oa;if(xe(i))for(let d=0;de==="_"||e==="_ctx"||e==="$stable",gc=e=>xe(e)?e.map(ps):[ps(e)],Ab=(e,t,s)=>{if(t._n)return t;const n=lc((...a)=>gc(t(...a)),s);return n._c=!1,n},vp=(e,t,s)=>{const n=e._ctx;for(const a in e){if(mc(a))continue;const i=e[a];if(Re(i))t[a]=Ab(a,i,n);else if(i!=null){const l=gc(i);t[a]=()=>l}}},bp=(e,t)=>{const s=gc(t);e.slots.default=()=>s},yp=(e,t,s)=>{for(const n in t)(s||!mc(n))&&(e[n]=t[n])},Rb=(e,t,s)=>{const n=e.slots=pp();if(e.vnode.shapeFlag&32){const a=t._;a?(yp(n,t,s),s&&uf(n,"_",a,!0)):vp(t,n)}else t&&bp(e,t)},Ib=(e,t,s)=>{const{vnode:n,slots:a}=e;let i=!0,l=je;if(n.shapeFlag&32){const r=t._;r?s&&r===1?i=!1:yp(a,t,s):(i=!t.$stable,vp(t,a)),l=t}else t&&(bp(e,t),l={default:1});if(i)for(const r in a)!mc(r)&&l[r]==null&&delete a[r]},kt=Ep;function xp(e){return kp(e)}function _p(e){return kp(e,Rv)}function kp(e,t){const s=hr();s.__VUE__=!0;const{insert:n,remove:a,patchProp:i,createElement:l,createText:r,createComment:o,setText:c,setElementText:d,parentNode:u,nextSibling:f,setScopeId:p=Ut,insertStaticContent:b}=e,y=(k,L,$,ee=null,Z=null,X=null,ue=void 0,oe=null,le=!!L.dynamicChildren)=>{if(k===L)return;k&&!Hs(k,L)&&(ee=V(k),ie(k,Z,X,!0),k=null),L.patchFlag===-2&&(le=!1,L.dynamicChildren=null);const{type:te,ref:ne,shapeFlag:fe}=L;switch(te){case Bn:E(k,L,$,ee);break;case yt:I(k,L,$,ee);break;case ta:k==null&&x(L,$,ee,ue);break;case Dt:P(k,L,$,ee,Z,X,ue,oe,le);break;default:fe&1?S(k,L,$,ee,Z,X,ue,oe,le):fe&6?R(k,L,$,ee,Z,X,ue,oe,le):(fe&64||fe&128)&&te.process(k,L,$,ee,Z,X,ue,oe,le,_e)}ne!=null&&Z?Pa(ne,k&&k.ref,X,L||k,!L):ne==null&&k&&k.ref!=null&&Pa(k.ref,null,X,k,!0)},E=(k,L,$,ee)=>{if(k==null)n(L.el=r(L.children),$,ee);else{const Z=L.el=k.el;L.children!==k.children&&c(Z,L.children)}},I=(k,L,$,ee)=>{k==null?n(L.el=o(L.children||""),$,ee):L.el=k.el},x=(k,L,$,ee)=>{[k.el,k.anchor]=b(k.children,L,$,ee,k.el,k.anchor)},m=({el:k,anchor:L},$,ee)=>{let Z;for(;k&&k!==L;)Z=f(k),n(k,$,ee),k=Z;n(L,$,ee)},_=({el:k,anchor:L})=>{let $;for(;k&&k!==L;)$=f(k),a(k),k=$;a(L)},S=(k,L,$,ee,Z,X,ue,oe,le)=>{if(L.type==="svg"?ue="svg":L.type==="math"&&(ue="mathml"),k==null)g(L,$,ee,Z,X,ue,oe,le);else{const te=k.el&&k.el._isVueCE?k.el:null;try{te&&te._beginPatch(),C(k,L,Z,X,ue,oe,le)}finally{te&&te._endPatch()}}},g=(k,L,$,ee,Z,X,ue,oe)=>{let le,te;const{props:ne,shapeFlag:fe,transition:be,dirs:Te}=k;if(le=k.el=l(k.type,X,ne&&ne.is,ne),fe&8?d(le,k.children):fe&16&&T(k.children,le,null,ee,Z,Kr(k,X),ue,oe),Te&&en(k,null,ee,"created"),w(le,k,k.scopeId,ue,ee),ne){for(const Le in ne)Le!=="value"&&!xn(Le)&&i(le,Le,null,ne[Le],X,ee);"value"in ne&&i(le,"value",null,ne.value,X),(te=ne.onVnodeBeforeMount)&&us(te,ee,k)}Te&&en(k,null,ee,"beforeMount");const Ie=wp(Z,be);Ie&&be.beforeEnter(le),n(le,L,$),((te=ne&&ne.onVnodeMounted)||Ie||Te)&&kt(()=>{try{te&&us(te,ee,k),Ie&&be.enter(le),Te&&en(k,null,ee,"mounted")}finally{}},Z)},w=(k,L,$,ee,Z)=>{if($&&p(k,$),ee)for(let X=0;X{for(let te=le;te{const oe=L.el=k.el;let{patchFlag:le,dynamicChildren:te,dirs:ne}=L;le|=k.patchFlag&16;const fe=k.props||je,be=L.props||je;let Te;if($&&jn($,!1),(Te=be.onVnodeBeforeUpdate)&&us(Te,$,L,k),ne&&en(L,k,$,"beforeUpdate"),$&&jn($,!0),(fe.innerHTML&&be.innerHTML==null||fe.textContent&&be.textContent==null)&&d(oe,""),te?M(k.dynamicChildren,te,oe,$,ee,Kr(L,Z),X):ue||N(k,L,oe,null,$,ee,Kr(L,Z),X,!1),le>0){if(le&16)H(oe,fe,be,$,Z);else if(le&2&&fe.class!==be.class&&i(oe,"class",null,be.class,Z),le&4&&i(oe,"style",fe.style,be.style,Z),le&8){const Ie=L.dynamicProps;for(let Le=0;Le{Te&&us(Te,$,L,k),ne&&en(L,k,$,"updated")},ee)},M=(k,L,$,ee,Z,X,ue)=>{for(let oe=0;oe{if(L!==$){if(L!==je)for(const X in L)!xn(X)&&!(X in $)&&i(k,X,L[X],null,Z,ee);for(const X in $){if(xn(X))continue;const ue=$[X],oe=L[X];ue!==oe&&X!=="value"&&i(k,X,oe,ue,Z,ee)}"value"in $&&i(k,"value",L.value,$.value,Z)}},P=(k,L,$,ee,Z,X,ue,oe,le)=>{const te=L.el=k?k.el:r(""),ne=L.anchor=k?k.anchor:r("");let{patchFlag:fe,dynamicChildren:be,slotScopeIds:Te}=L;Te&&(oe=oe?oe.concat(Te):Te),k==null?(n(te,$,ee),n(ne,$,ee),T(L.children||[],$,ne,Z,X,ue,oe,le)):fe>0&&fe&64&&be&&k.dynamicChildren&&k.dynamicChildren.length===be.length?(M(k.dynamicChildren,be,$,Z,X,ue,oe),(L.key!=null||Z&&L===Z.subTree)&&vc(k,L,!0)):N(k,L,$,ne,Z,X,ue,oe,le)},R=(k,L,$,ee,Z,X,ue,oe,le)=>{L.slotScopeIds=oe,k==null?L.shapeFlag&512?Z.ctx.activate(L,$,ee,ue,le):j(L,$,ee,Z,X,ue,le):Q(k,L,le)},j=(k,L,$,ee,Z,X,ue)=>{const oe=k.component=Dp(k,ee,Z);if(el(k)&&(oe.ctx.renderer=_e),Pp(oe,!1,ue),oe.asyncDep){if(Z&&Z.registerDep(oe,U,ue),!k.el){const le=oe.subTree=ft(yt);I(null,le,L,$),k.placeholder=le.el}}else U(oe,k,L,$,Z,X,ue)},Q=(k,L,$)=>{const ee=L.component=k.component;if(Sb(k,L,$))if(ee.asyncDep&&!ee.asyncResolved){O(ee,L,$);return}else ee.next=L,ee.update();else L.el=k.el,ee.vnode=L},U=(k,L,$,ee,Z,X,ue)=>{const oe=()=>{if(k.isMounted){let{next:fe,bu:be,u:Te,parent:Ie,vnode:Le}=k;{const G=Sp(k);if(G){fe&&(fe.el=Le.el,O(k,fe,ue)),G.asyncDep.then(()=>{kt(()=>{k.isUnmounted||te()},Z)});return}}let De=fe,Be;jn(k,!1),fe?(fe.el=Le.el,O(k,fe,ue)):fe=Le,be&&Da(be),(Be=fe.props&&fe.props.onVnodeBeforeUpdate)&&us(Be,Ie,fe,Le),jn(k,!0);const qe=Cl(k),ct=k.subTree;k.subTree=qe,y(ct,qe,u(ct.el),V(ct),k,Z,X),fe.el=qe.el,De===null&&Cr(k,qe.el),Te&&kt(Te,Z),(Be=fe.props&&fe.props.onVnodeUpdated)&&kt(()=>us(Be,Ie,fe,Le),Z)}else{let fe;const{el:be,props:Te}=L,{bm:Ie,m:Le,parent:De,root:Be,type:qe}=k,ct=kn(L);if(jn(k,!1),Ie&&Da(Ie),!ct&&(fe=Te&&Te.onVnodeBeforeMount)&&us(fe,De,L),jn(k,!0),be&&He){const G=()=>{k.subTree=Cl(k),He(be,k.subTree,k,Z,null)};ct&&qe.__asyncHydrate?qe.__asyncHydrate(be,k,G):G()}else{Be.ce&&Be.ce._hasShadowRoot()&&Be.ce._injectChildStyle(qe,k.parent?k.parent.type:void 0);const G=k.subTree=Cl(k);y(null,G,$,ee,k,Z,X),L.el=G.el}if(Le&&kt(Le,Z),!ct&&(fe=Te&&Te.onVnodeMounted)){const G=L;kt(()=>us(fe,De,G),Z)}(L.shapeFlag&256||De&&kn(De.vnode)&&De.vnode.shapeFlag&256)&&k.a&&kt(k.a,Z),k.isMounted=!0,L=$=ee=null}};k.scope.on();const le=k.effect=new Oi(oe);k.scope.off();const te=k.update=le.run.bind(le),ne=k.job=le.runIfDirty.bind(le);ne.i=k,ne.id=k.uid,le.scheduler=()=>ic(ne),jn(k,!0),te()},O=(k,L,$)=>{L.component=k;const ee=k.vnode.props;k.vnode=L,k.next=null,Cb(k,L.props,ee,$),Ib(k,L.children,$),Tn(),ud(k),Cn()},N=(k,L,$,ee,Z,X,ue,oe,le=!1)=>{const te=k&&k.children,ne=k?k.shapeFlag:0,fe=L.children,{patchFlag:be,shapeFlag:Te}=L;if(be>0){if(be&128){we(te,fe,$,ee,Z,X,ue,oe,le);return}else if(be&256){Y(te,fe,$,ee,Z,X,ue,oe,le);return}}Te&8?(ne&16&&Se(te,Z,X),fe!==te&&d($,fe)):ne&16?Te&16?we(te,fe,$,ee,Z,X,ue,oe,le):Se(te,Z,X,!0):(ne&8&&d($,""),Te&16&&T(fe,$,ee,Z,X,ue,oe,le))},Y=(k,L,$,ee,Z,X,ue,oe,le)=>{k=k||Oa,L=L||Oa;const te=k.length,ne=L.length,fe=Math.min(te,ne);let be;for(be=0;bene?Se(k,Z,X,!0,!1,fe):T(L,$,ee,Z,X,ue,oe,le,fe)},we=(k,L,$,ee,Z,X,ue,oe,le)=>{let te=0;const ne=L.length;let fe=k.length-1,be=ne-1;for(;te<=fe&&te<=be;){const Te=k[te],Ie=L[te]=le?pn(L[te]):ps(L[te]);if(Hs(Te,Ie))y(Te,Ie,$,null,Z,X,ue,oe,le);else break;te++}for(;te<=fe&&te<=be;){const Te=k[fe],Ie=L[be]=le?pn(L[be]):ps(L[be]);if(Hs(Te,Ie))y(Te,Ie,$,null,Z,X,ue,oe,le);else break;fe--,be--}if(te>fe){if(te<=be){const Te=be+1,Ie=Tebe)for(;te<=fe;)ie(k[te],Z,X,!0),te++;else{const Te=te,Ie=te,Le=new Map;for(te=Ie;te<=be;te++){const Ne=L[te]=le?pn(L[te]):ps(L[te]);Ne.key!=null&&Le.set(Ne.key,te)}let De,Be=0;const qe=be-Ie+1;let ct=!1,G=0;const me=new Array(qe);for(te=0;te=qe){ie(Ne,Z,X,!0);continue}let Pe;if(Ne.key!=null)Pe=Le.get(Ne.key);else for(De=Ie;De<=be;De++)if(me[De-Ie]===0&&Hs(Ne,L[De])){Pe=De;break}Pe===void 0?ie(Ne,Z,X,!0):(me[Pe-Ie]=te+1,Pe>=G?G=Pe:ct=!0,y(Ne,L[Pe],$,null,Z,X,ue,oe,le),Be++)}const Ce=ct?Ob(me):Oa;for(De=Ce.length-1,te=qe-1;te>=0;te--){const Ne=Ie+te,Pe=L[Ne],Ve=L[Ne+1],pt=Ne+1{const{el:X,type:ue,transition:oe,children:le,shapeFlag:te}=k;if(te&6){ke(k.component.subTree,L,$,ee);return}if(te&128){k.suspense.move(L,$,ee);return}if(te&64){ue.move(k,L,$,_e);return}if(ue===Dt){n(X,L,$);for(let fe=0;feoe.enter(X),Z));else{const{leave:fe,delayLeave:be,afterLeave:Te}=oe,Ie=()=>{k.ctx.isUnmounted?a(X):n(X,L,$)},Le=()=>{const De=X._isLeaving||!!X[Rs];X._isLeaving&&X[Rs](!0),oe.persisted&&!De?Ie():fe(X,()=>{Ie(),Te&&Te()})};be?be(X,Ie,Le):Le()}else n(X,L,$)},ie=(k,L,$,ee=!1,Z=!1)=>{const{type:X,props:ue,ref:oe,children:le,dynamicChildren:te,shapeFlag:ne,patchFlag:fe,dirs:be,cacheIndex:Te,memo:Ie}=k;if(fe===-2&&(Z=!1),oe!=null&&(Tn(),Pa(oe,null,$,k,!0),Cn()),Te!=null&&(L.renderCache[Te]=void 0),ne&256){L.ctx.deactivate(k);return}const Le=ne&1&&be,De=!kn(k);let Be;if(De&&(Be=ue&&ue.onVnodeBeforeUnmount)&&us(Be,L,k),ne&6)se(k.component,$,ee);else{if(ne&128){k.suspense.unmount($,ee);return}Le&&en(k,null,L,"beforeUnmount"),ne&64?k.type.remove(k,L,$,_e,ee):te&&!te.hasOnce&&(X!==Dt||fe>0&&fe&64)?Se(te,L,$,!1,!0):(X===Dt&&fe&384||!Z&&ne&16)&&Se(le,L,$),ee&&pe(k)}const qe=Ie!=null&&Te==null;(De&&(Be=ue&&ue.onVnodeUnmounted)||Le||qe)&&kt(()=>{Be&&us(Be,L,k),Le&&en(k,null,L,"unmounted"),qe&&(k.el=null)},$)},pe=k=>{const{type:L,el:$,anchor:ee,transition:Z}=k;if(L===Dt){F($,ee);return}if(L===ta){_(k);return}const X=()=>{a($),Z&&!Z.persisted&&Z.afterLeave&&Z.afterLeave()};if(k.shapeFlag&1&&Z&&!Z.persisted){const{leave:ue,delayLeave:oe}=Z,le=()=>ue($,X);oe?oe(k.el,X,le):le()}else X()},F=(k,L)=>{let $;for(;k!==L;)$=f(k),a(k),k=$;a(L)},se=(k,L,$)=>{const{bum:ee,scope:Z,job:X,subTree:ue,um:oe,m:le,a:te}=k;Hl(le),Hl(te),ee&&Da(ee),Z.stop(),X&&(X.flags|=8,ie(ue,k,L,$)),oe&&kt(oe,L),kt(()=>{k.isUnmounted=!0},L)},Se=(k,L,$,ee=!1,Z=!1,X=0)=>{for(let ue=X;ue{if(k.shapeFlag&6)return V(k.component.subTree);if(k.shapeFlag&128)return k.suspense.next();const L=f(k.anchor||k.el),$=L&&L[Kf];return $?f($):L};let de=!1;const ce=(k,L,$)=>{let ee;k==null?L._vnode&&(ie(L._vnode,null,null,!0),ee=L._vnode.component):y(L._vnode||null,k,L,null,null,null,$),L._vnode=k,de||(de=!0,ud(ee),$l(),de=!1)},_e={p:y,um:ie,m:ke,r:pe,mt:j,mc:T,pc:N,pbc:M,n:V,o:e};let ve,He;return t&&([ve,He]=t(_e)),{render:ce,hydrate:ve,createApp:vb(ce,ve)}}function Kr({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function jn({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function wp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function vc(e,t,s=!1){const n=e.children,a=t.children;if(xe(n)&&xe(a))for(let i=0;i>1,e[s[r]]0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,l=s[i-1];i-- >0;)s[i]=l,l=t[l];return s}function Sp(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Sp(t)}function Hl(e){if(e)for(let t=0;te.__isSuspense;let To=0;const Nb={name:"Suspense",__isSuspense:!0,process(e,t,s,n,a,i,l,r,o,c){if(e==null)Db(t,s,n,a,i,l,r,o,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Mb(e,t,s,n,a,l,r,o,c)}},hydrate:Pb,normalize:Fb},Lb=Nb;function $i(e,t){const s=e.props&&e.props[t];Re(s)&&s()}function Db(e,t,s,n,a,i,l,r,o){const{p:c,o:{createElement:d}}=o,u=d("div"),f=e.suspense=Cp(e,a,n,t,u,s,i,l,r,o);c(null,f.pendingBranch=e.ssContent,u,null,n,f,i,l),f.deps>0?($i(e,"onPending"),$i(e,"onFallback"),c(null,e.ssFallback,t,s,n,null,i,l),Fa(f,e.ssFallback)):f.resolve(!1,!0)}function Mb(e,t,s,n,a,i,l,r,{p:o,um:c,o:{createElement:d}}){const u=t.suspense=e.suspense;u.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:b,pendingBranch:y,isInFallback:E,isHydrating:I}=u;if(y)u.pendingBranch=f,Hs(y,f)?(o(y,f,u.hiddenContainer,null,a,u,i,l,r),u.deps<=0?u.resolve():E&&(I||(o(b,p,s,n,a,null,i,l,r),Fa(u,p)))):(u.pendingId=To++,I?(u.isHydrating=!1,u.activeBranch=y):c(y,a,u),u.deps=0,u.effects.length=0,u.hiddenContainer=d("div"),E?(o(null,f,u.hiddenContainer,null,a,u,i,l,r),u.deps<=0?u.resolve():(o(b,p,s,n,a,null,i,l,r),Fa(u,p))):b&&Hs(b,f)?(o(b,f,s,n,a,u,i,l,r),u.resolve(!0)):(o(null,f,u.hiddenContainer,null,a,u,i,l,r),u.deps<=0&&u.resolve()));else if(b&&Hs(b,f))o(b,f,s,n,a,u,i,l,r),Fa(u,f);else if($i(t,"onPending"),u.pendingBranch=f,f.shapeFlag&512?u.pendingId=f.component.suspenseId:u.pendingId=To++,o(null,f,u.hiddenContainer,null,a,u,i,l,r),u.deps<=0)u.resolve();else{const{timeout:x,pendingId:m}=u;x>0?setTimeout(()=>{u.pendingId===m&&u.fallback(p)},x):x===0&&u.fallback(p)}}function Cp(e,t,s,n,a,i,l,r,o,c,d=!1){const{p:u,m:f,um:p,n:b,o:{parentNode:y,remove:E}}=c;let I;const x=$b(e);x&&t&&t.pendingBranch&&(I=t.pendingId,t.deps++);const m=e.props?Ll(e.props.timeout):void 0,_=i,S={vnode:e,parent:t,parentComponent:s,namespace:l,container:n,hiddenContainer:a,deps:0,pendingId:To++,timeout:typeof m=="number"?m:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!d,isHydrating:d,isUnmounted:!1,effects:[],resolve(g=!1,w=!1){const{vnode:T,activeBranch:C,pendingBranch:M,pendingId:H,effects:P,parentComponent:R,container:j,isInFallback:Q}=S;let U=!1;if(S.isHydrating)S.isHydrating=!1;else if(!g){U=C&&M.transition&&M.transition.mode==="out-in";let Y=!1;U&&(C.transition.afterLeave=()=>{H===S.pendingId&&(f(M,j,i===_&&!Y?b(C):i,0),Di(P),Q&&T.ssFallback&&(T.ssFallback.el=null))}),C&&!S.isFallbackMountPending&&(y(C.el)===j&&(i=b(C),Y=!0),p(C,R,S,!0),!U&&Q&&T.ssFallback&&kt(()=>T.ssFallback.el=null,S)),U||f(M,j,i,0)}S.isFallbackMountPending=!1,Fa(S,M),S.pendingBranch=null,S.isInFallback=!1;let O=S.parent,N=!1;for(;O;){if(O.pendingBranch){O.effects.push(...P),N=!0;break}O=O.parent}!N&&!U&&Di(P),S.effects=[],x&&t&&t.pendingBranch&&I===t.pendingId&&(t.deps--,t.deps===0&&!w&&t.resolve()),$i(T,"onResolve")},fallback(g){if(!S.pendingBranch)return;const{vnode:w,activeBranch:T,parentComponent:C,container:M,namespace:H}=S;$i(w,"onFallback");const P=b(T),R=()=>{S.isFallbackMountPending=!1,S.isInFallback&&(u(null,g,M,P,C,null,H,r,o),Fa(S,g))},j=g.transition&&g.transition.mode==="out-in";j&&(S.isFallbackMountPending=!0,T.transition.afterLeave=R),S.isInFallback=!0,p(T,C,null,!0),j||R()},move(g,w,T){S.activeBranch&&f(S.activeBranch,g,w,T),S.container=g},next(){return S.activeBranch&&b(S.activeBranch)},registerDep(g,w,T){const C=!!S.pendingBranch;C&&S.deps++;const M=g.vnode.el;g.asyncDep.catch(H=>{ua(H,g,0)}).then(H=>{if(g.isUnmounted||S.isUnmounted||S.pendingId!==g.suspenseId)return;Hi(),g.asyncResolved=!0;const{vnode:P}=g;Co(g,H,!1),M&&(P.el=M);const R=!M&&g.subTree.el;w(g,P,y(M||g.subTree.el),M?null:b(g.subTree),S,l,T),R&&(P.placeholder=null,E(R)),Cr(g,P.el),C&&--S.deps===0&&S.resolve()})},unmount(g,w){S.isUnmounted=!0,S.activeBranch&&p(S.activeBranch,s,g,w),S.pendingBranch&&p(S.pendingBranch,s,g,w)}};return S}function Pb(e,t,s,n,a,i,l,r,o){const c=t.suspense=Cp(t,n,s,e.parentNode,document.createElement("div"),null,a,i,l,r,!0),d=o(e,c.pendingBranch=t.ssContent,s,c,i,l);return c.deps===0&&c.resolve(!1,!0),d}function Fb(e){const{shapeFlag:t,children:s}=e,n=t&32;e.ssContent=Td(n?s.default:s),e.ssFallback=n?Td(s.fallback):ft(yt)}function Td(e){let t;if(Re(e)){const s=aa&&e._c;s&&(e._d=!1,Bi()),e=e(),s&&(e._d=!0,t=Gt,Ap())}return xe(e)&&(e=_b(e)),e=ps(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(s=>s!==e)),e}function Ep(e,t){t&&t.pendingBranch?xe(e)?t.effects.push(...e):t.effects.push(e):Di(e)}function Fa(e,t){e.activeBranch=t;const{vnode:s,parentComponent:n}=e;let a=t.el;for(;!a&&t.component;)t=t.component.subTree,a=t.el;s.el=a,n&&n.subTree===s&&(n.vnode.el=a,Cr(n,a))}function $b(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Dt=Symbol.for("v-fgt"),Bn=Symbol.for("v-txt"),yt=Symbol.for("v-cmt"),ta=Symbol.for("v-stc"),Si=[];let Gt=null;function Bi(e=!1){Si.push(Gt=e?null:[])}function Ap(){Si.pop(),Gt=Si[Si.length-1]||null}let aa=1;function Ui(e,t=!1){aa+=e,e<0&&Gt&&t&&(Gt.hasOnce=!0)}function Rp(e){return e.dynamicChildren=aa>0?Gt||Oa:null,Ap(),aa>0&&Gt&&Gt.push(e),e}function Bb(e,t,s,n,a,i){return Rp(bc(e,t,s,n,a,i,!0))}function Vl(e,t,s,n,a){return Rp(ft(e,t,s,n,a,!0))}function An(e){return e?e.__v_isVNode===!0:!1}function Hs(e,t){return e.type===t.type&&e.key===t.key}function Ub(e){}const Ip=({key:e})=>e??null,El=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Me(e)||St(e)||Re(e)?{i:Bt,r:e,k:t,f:!!s}:e:null);function bc(e,t=null,s=null,n=0,a=null,i=e===Dt?0:1,l=!1,r=!1){const o={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ip(t),ref:t&&El(t),scopeId:xr,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Bt};return r?(xc(o,s),i&128&&e.normalize(o)):s&&(o.shapeFlag|=Me(s)?8:16),aa>0&&!l&&Gt&&(o.patchFlag>0||i&6)&&o.patchFlag!==32&&Gt.push(o),o}const ft=Hb;function Hb(e,t=null,s=null,n=0,a=null,i=!1){if((!e||e===ip)&&(e=yt),An(e)){const r=an(e,t,!0);return s&&xc(r,s),aa>0&&!i&&Gt&&(r.shapeFlag&6?Gt[Gt.indexOf(e)]=r:Gt.push(r)),r.patchFlag=-2,r}if(Wb(e)&&(e=e.__vccOpts),t){t=Op(t);let{class:r,style:o}=t;r&&!Me(r)&&(t.class=Ji(r)),Qe(o)&&(Yi(o)&&!xe(o)&&(o=ze({},o)),t.style=Zi(o))}const l=Me(e)?1:zl(e)?128:Wf(e)?64:Qe(e)?4:Re(e)?2:0;return bc(e,t,s,n,a,l,i,!0)}function Op(e){return e?Yi(e)||hp(e)?ze({},e):e:null}function an(e,t,s=!1,n=!1){const{props:a,ref:i,patchFlag:l,children:r,transition:o}=e,c=t?Lp(a||{},t):a,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Ip(c),ref:t&&t.ref?s&&i?xe(i)?i.concat(El(t)):[i,El(t)]:El(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Dt?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:o,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&an(e.ssContent),ssFallback:e.ssFallback&&an(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return o&&n&&En(d,o.clone(d)),d}function yc(e=" ",t=0){return ft(Bn,null,e,t)}function zb(e,t){const s=ft(ta,null,e);return s.staticCount=t,s}function Np(e="",t=!1){return t?(Bi(),Vl(yt,null,e)):ft(yt,null,e)}function ps(e){return e==null||typeof e=="boolean"?ft(yt):xe(e)?ft(Dt,null,e.slice()):An(e)?pn(e):ft(Bn,null,String(e))}function pn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:an(e)}function xc(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(xe(t))s=16;else if(typeof t=="object")if(n&65){const a=t.default;a&&(a._c&&(a._d=!1),xc(e,a()),a._c&&(a._d=!0));return}else{s=32;const a=t._;!a&&!hp(t)?t._ctx=Bt:a===3&&Bt&&(Bt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Re(t)?(t={default:t,_ctx:Bt},s=32):(t=String(t),n&64?(s=16,t=[yc(t)]):s=8);e.children=t,e.shapeFlag|=s}function Lp(...e){const t={};for(let s=0;s$t||Bt;let jl,$a;{const e=hr(),t=(s,n)=>{let a;return(a=e[s])||(a=e[s]=[]),a.push(n),i=>{a.length>1?a.forEach(l=>l(i)):a[0](i)}};jl=t("__VUE_INSTANCE_SETTERS__",s=>$t=s),$a=t("__VUE_SSR_SETTERS__",s=>ia=s)}const ti=e=>{const t=$t;return jl(e),e.scope.on(),()=>{e.scope.off(),jl(t)}},Hi=()=>{$t&&$t.scope.off(),jl(null)};function Mp(e){return e.vnode.shapeFlag&4}let ia=!1;function Pp(e,t=!1,s=!1){t&&$a(t);const{props:n,children:a}=e.vnode,i=Mp(e);Tb(e,n,i,t),Rb(e,a,s||t);const l=i?qb(e,t):void 0;return t&&$a(!1),l}function qb(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,_o);const{setup:n}=s;if(n){Tn();const a=e.setupContext=n.length>1?Bp(e):null,i=ti(e),l=ei(n,e,0,[e.props,a]),r=Yo(l);if(Cn(),i(),(r||e.sp)&&!kn(e)&&cc(e),r){if(l.then(Hi,Hi),t)return l.then(o=>{Co(e,o,t)}).catch(o=>{ua(o,e,0)});e.asyncDep=l}else Co(e,l,t)}else $p(e,t)}function Co(e,t,s){Re(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Qe(t)&&(e.setupState=ac(t)),$p(e,s)}let ql,Eo;function Fp(e){ql=e,Eo=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,Yv))}}const Gb=()=>!ql;function $p(e,t,s){const n=e.type;if(!e.render){if(!t&&ql&&!n.render){const a=n.template||hc(e).template;if(a){const{isCustomElement:i,compilerOptions:l}=e.appContext.config,{delimiters:r,compilerOptions:o}=n,c=ze(ze({isCustomElement:i,delimiters:r},l),o);n.render=ql(a,c)}}e.render=n.render||Ut,Eo&&Eo(e)}{const a=ti(e);Tn();try{ub(e)}finally{Cn(),a()}}}const Kb={get(e,t){return qt(e,"get",""),e[t]}};function Bp(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Kb),slots:e.slots,emit:e.emit,expose:t}}function tl(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ac(Lf(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in wi)return wi[s](e)},has(t,s){return s in t||s in wi}})):e.proxy}function Ao(e,t=!0){return Re(e)?e.displayName||e.name:e.name||t&&e.__name}function Wb(e){return Re(e)&&"__vccOpts"in e}const J=(e,t)=>ev(e,t,ia);function Va(e,t,s){try{Ui(-1);const n=arguments.length;return n===2?Qe(t)&&!xe(t)?An(t)?ft(e,null,[t]):ft(e,t):ft(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&An(s)&&(s=[s]),ft(e,t,s))}finally{Ui(1)}}function Zb(){}function Jb(e,t,s,n){const a=s[n];if(a&&Up(a,e))return a;const i=t();return i.memo=e.slice(),i.cacheIndex=n,s[n]=i}function Up(e,t){const s=e.memo;if(s.length!=t.length)return!1;for(let n=0;n0&&Gt&&Gt.push(e),!0}const Hp="3.5.38",Yb=Ut,Qb=cv,Xb=Ca,ey=zf,ty={createComponentInstance:Dp,setupComponent:Pp,renderComponentRoot:Cl,setCurrentRenderingInstance:Pi,isVNode:An,normalizeVNode:ps,getComponentPublicInstance:tl,ensureValidVNode:pc,pushWarningContext:iv,popWarningContext:lv},sy=ty,ny=null,ay=null,iy=null;/** +`)&&(ml(m,0)||_a(),m.textContent=_.children)}if(M){if(Q||!T||H&48){const N=m.tagName.includes("-");for(const Y in M)(Q&&(Y.endsWith("value")||Y==="indeterminate")||ca(Y)&&!bn(Y)||Y[0]==="."||N&&!bn(Y))&&n(m,Y,null,M[Y],void 0,S)}else if(M.onClick)n(m,"onClick",null,M.onClick,void 0,S);else if(H&4&&yn(M.style))for(const N in M.style)M.style[N]}let O;(O=M&&M.onVnodeBeforeMount)&&ds(O,S,_),R&&Qs(_,null,S,"beforeMount"),((O=M&&M.onVnodeMounted)||R||U)&&Ep(()=>{O&&ds(O,S,_),U&&j.enter(m),R&&Qs(_,null,S,"mounted")},g)}return m.nextSibling},p=(m,_,S,g,w,T,C)=>{C=C||!!_.dynamicChildren;const M=_.children,H=M.length;let P=!1;for(let R=0;R{const{slotScopeIds:C}=_;C&&(w=w?w.concat(C):C);const M=l(m),H=p(i(m),_,M,S,g,w,T);return H&&Oa(H)&&H.data==="]"?i(_.anchor=H):(_a(),o(_.anchor=c("]"),M,H),H)},y=(m,_,S,g,w,T)=>{if(ml(m.parentElement,1)||_a(),_.el=null,T){const H=E(m);for(;;){const P=i(m);if(P&&P!==H)r(P);else break}}const C=i(m),M=l(m);return r(m),s(null,_,M,C,S,g,hl(M),w),S&&(S.vnode.el=_.el,Cr(S,_.el)),C},E=(m,_="[",S="]")=>{let g=0;for(;m;)if(m=i(m),m&&Oa(m)&&(m.data===_&&g++,m.data===S)){if(g===0)return i(m);g--}return m},I=(m,_,S)=>{const g=_.parentNode;g&&g.replaceChild(m,_);let w=S;for(;w;)w.vnode.el===_&&(w.vnode.el=w.subTree.el=m),w=w.parent},x=m=>m.nodeType===1&&m.tagName==="TEMPLATE";return[d,u]}const bd="data-allow-mismatch",Iv={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function ml(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(bd);)e=e.parentElement;const s=e&&e.getAttribute(bd);if(s==null)return!1;if(s==="")return!0;{const n=s.split(",");return t===0&&n.includes("children")?!0:n.includes(Iv[t])}}const Ov=hr().requestIdleCallback||(e=>setTimeout(e,1)),Nv=hr().cancelIdleCallback||(e=>clearTimeout(e)),Lv=(e=1e4)=>t=>{const s=Ov(t,{timeout:e});return()=>Nv(s)};function Dv(e){const{top:t,left:s,bottom:n,right:a}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:l}=window;return(t>0&&t0&&n0&&s0&&a(t,s)=>{const n=new IntersectionObserver(a=>{for(const i of a)if(i.isIntersecting){n.disconnect(),t();break}},e);return s(a=>{if(a instanceof Element){if(Dv(a))return t(),n.disconnect(),!1;n.observe(a)}}),()=>n.disconnect()},Pv=e=>t=>{if(e){const s=matchMedia(e);if(s.matches)t();else return s.addEventListener("change",t,{once:!0}),()=>s.removeEventListener("change",t)}},Fv=(e=[])=>(t,s)=>{Me(e)&&(e=[e]);let n=!1;const a=l=>{n||(n=!0,i(),t(),l.target.dispatchEvent(new l.constructor(l.type,l)))},i=()=>{s(l=>{for(const r of e)l.removeEventListener(r,a)})};return s(l=>{for(const r of e)l.addEventListener(r,a,{once:!0})}),i};function $v(e,t){if(Oa(e)&&e.data==="["){let s=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(Oa(n))if(n.data==="]"){if(--s===0)break}else n.data==="["&&s++;n=n.nextSibling}}else t(e)}const xn=e=>!!e.type.__asyncLoader;function Bv(e){Ie(e)&&(e={loader:e});const{loader:t,loadingComponent:s,errorComponent:n,delay:a=200,hydrate:i,timeout:l,suspensible:r=!0,onError:o}=e;let c=null,d,u=0;const f=()=>(u++,c=null,p()),p=()=>{let b;return c||(b=c=t().catch(y=>{if(y=y instanceof Error?y:new Error(String(y)),o)return new Promise((E,I)=>{o(y,()=>E(f()),()=>I(y),u+1)});throw y}).then(y=>b!==c&&c?c:(y&&(y.__esModule||y[Symbol.toStringTag]==="Module")&&(y=y.default),d=y,y)))};return el({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(b,y,E){let I=!1;(y.bu||(y.bu=[])).push(()=>I=!0);const x=()=>{I||E()},m=i?()=>{const _=i(x,S=>$v(b,S));_&&(y.bum||(y.bum=[])).push(_)}:x;d?m():p().then(()=>!y.isUnmounted&&m())},get __asyncResolved(){return d},setup(){const b=Bt;if(cc(b),d)return()=>gl(d,b);const y=S=>{c=null,fa(S,b,13,!n)};if(r&&b.suspense||la)return p().then(S=>()=>gl(S,b)).catch(S=>(y(S),()=>n?ft(n,{error:S}):null));const E=h(!1),I=h(),x=h(!!a);let m,_;return xt(()=>{m!=null&&clearTimeout(m),_!=null&&clearTimeout(_)}),a&&(_=setTimeout(()=>{b.isUnmounted||(x.value=!1)},a)),l!=null&&(m=setTimeout(()=>{if(!b.isUnmounted&&!E.value&&!I.value){const S=new Error(`Async component timed out after ${l}ms.`);y(S),I.value=S}},l)),p().then(()=>{b.isUnmounted||(E.value=!0,b.parent&&tl(b.parent.vnode)&&b.parent.update())}).catch(S=>{if(b.isUnmounted){c=null;return}y(S),I.value=S}),()=>{if(E.value&&d)return gl(d,b);if(I.value&&n)return ft(n,{error:I.value});if(s&&!x.value)return gl(s,b)}}})}function gl(e,t){const{ref:s,props:n,children:a,ce:i}=t.vnode,l=ft(e,n,a);return l.ref=s,l.ce=i,delete t.vnode.ce,l}const tl=e=>e.type.__isKeepAlive,Uv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const s=as(),n=s.ctx;if(!n.renderer)return()=>{const x=t.default&&t.default();return x&&x.length===1?x[0]:x};const a=new Map,i=new Set;let l=null;const r=s.suspense,{renderer:{p:o,m:c,um:d,o:{createElement:u}}}=n,f=u("div");n.activate=(x,m,_,S,g)=>{const w=x.component;c(x,m,_,0,r),o(w.vnode,x,m,_,w,r,S,x.slotScopeIds,g),kt(()=>{w.isDeactivated=!1,w.a&&Ma(w.a);const T=x.props&&x.props.onVnodeMounted;T&&ds(T,w.parent,x)},r)},n.deactivate=x=>{const m=x.component;Hl(m.m),Hl(m.a),c(x,f,null,1,r),kt(()=>{m.da&&Ma(m.da);const _=x.props&&x.props.onVnodeUnmounted;_&&ds(_,m.parent,x),m.isDeactivated=!0},r)};function p(x){qr(x),d(x,s,r,!0)}function b(x){a.forEach((m,_)=>{const S=Ao(xn(m)?m.type.__asyncResolved||{}:m.type);S&&!x(S)&&y(_)})}function y(x){const m=a.get(x);m&&(!l||!Hs(m,l))?p(m):l&&qr(l),a.delete(x),i.delete(x)}ns(()=>[e.include,e.exclude],([x,m])=>{x&&b(_=>vi(x,_)),m&&b(_=>!vi(m,_))},{flush:"post",deep:!0});let E=null;const I=()=>{E!=null&&(zl(s.subTree.type)?kt(()=>{a.set(E,vl(s.subTree))},s.subTree.suspense):a.set(E,vl(s.subTree)))};return We(I),wr(I),Sr(()=>{a.forEach(x=>{const{subTree:m,suspense:_}=s,S=vl(m);if(x.type===S.type&&x.key===S.key){qr(S);const g=S.component.da;g&&kt(g,_);return}p(x)})}),()=>{if(E=null,!t.default)return l=null;const x=t.default(),m=x[0];if(x.length>1)return l=null,x;if(!Cn(m)||!(m.shapeFlag&4)&&!(m.shapeFlag&128))return l=null,m;let _=vl(m);if(_.type===yt)return l=null,_;const S=_.type,g=Ao(xn(_)?_.type.__asyncResolved||{}:S),{include:w,exclude:T,max:C}=e;if(w&&(!g||!vi(w,g))||T&&g&&vi(T,g))return _.shapeFlag&=-257,l=_,m;const M=_.key==null?S:_.key,H=a.get(M);return _.el&&(_=sn(_),m.shapeFlag&128&&(m.ssContent=_)),E=M,H?(_.el=H.el,_.component=H.component,_.transition&&Tn(_,_.transition),_.shapeFlag|=512,i.delete(M),i.add(M)):(i.add(M),C&&i.size>parseInt(C,10)&&y(i.values().next().value)),_.shapeFlag|=256,l=_,zl(m.type)?m:_}}},Hv=Uv;function vi(e,t){return be(e)?e.some(s=>vi(s,t)):Me(e)?e.split(",").includes(t):Ym(e)?(e.lastIndex=0,e.test(t)):!1}function Ds(e,t){Xf(e,"a",t)}function Ms(e,t){Xf(e,"da",t)}function Xf(e,t,s=Bt){const n=e.__wdc||(e.__wdc=()=>{let a=s;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(kr(t,n,s),s){let a=s.parent;for(;a&&a.parent;)tl(a.parent.vnode)&&zv(n,t,s,a),a=a.parent}}function zv(e,t,s,n){const a=kr(t,e,n,!0);xt(()=>{Jo(n[t],a)},s)}function qr(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function vl(e){return e.shapeFlag&128?e.ssContent:e}function kr(e,t,s=Bt,n=!1){if(s){const a=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...l)=>{wn();const r=si(s),o=xs(t,s,e,l);return r(),Sn(),o});return n?a.unshift(i):a.push(i),i}}const En=e=>(t,s=Bt)=>{(!la||e==="sp")&&kr(e,(...n)=>t(...n),s)},ep=En("bm"),We=En("m"),dc=En("bu"),wr=En("u"),Sr=En("bum"),xt=En("um"),tp=En("sp"),sp=En("rtg"),np=En("rtc");function ap(e,t=Bt){kr("ec",e,t)}const uc="components",Vv="directives";function jv(e,t){return fc(uc,e,!0,t)||e}const ip=Symbol.for("v-ndc");function qv(e){return Me(e)?fc(uc,e,!1)||e:e||ip}function Gv(e){return fc(Vv,e)}function fc(e,t,s=!0,n=!1){const a=Ut||Bt;if(a){const i=a.type;if(e===uc){const r=Ao(i,!1);if(r&&(r===t||r===it(t)||r===ua(it(t))))return i}const l=yd(a[e]||i[e],t)||yd(a.appContext[e],t);return!l&&n?i:l}}function yd(e,t){return e&&(e[t]||e[it(t)]||e[ua(it(t))])}function Kv(e,t,s,n){let a;const i=s&&s[n],l=be(e);if(l||Me(e)){const r=l&&yn(e);let o=!1,c=!1;r&&(o=!ms(e),c=tn(e),e=vr(e)),a=new Array(e.length);for(let d=0,u=e.length;dt(r,o,void 0,i&&i[o]));else{const r=Object.keys(e);a=new Array(r.length);for(let o=0,c=r.length;o{const i=n.fn(...a);return i&&(i.key=n.key),i}:n.fn)}return e}function Zv(e,t,s={},n,a){if(Ut.ce||Ut.parent&&xn(Ut.parent)&&Ut.parent.ce){const c=Object.keys(s).length>0;return t!=="default"&&(s.name=t),Ui(),Vl(Dt,null,[ft("slot",s,n&&n())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),Ui();const l=i&&pc(i(s)),r=s.key||l&&l.key,o=Vl(Dt,{key:(r&&!Jt(r)?r:`_${t}`)+(!l&&n?"_fb":"")},l||(n?n():[]),l&&e._===1?64:-2);return!a&&o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),i&&i._c&&(i._d=!0),o}function pc(e){return e.some(t=>Cn(t)?!(t.type===yt||t.type===Dt&&!pc(t.children)):!0)?e:null}function Jv(e,t){const s={};for(const n in e)s[t&&/[A-Z]/.test(n)?`on:${n}`:Da(n)]=e[n];return s}const xo=e=>e?Mp(e)?sl(e):xo(e.parent):null,Si=ze(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>xo(e.parent),$root:e=>xo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>hc(e),$forceUpdate:e=>e.f||(e.f=()=>{ic(e.update)}),$nextTick:e=>e.n||(e.n=Rt.bind(e.proxy)),$watch:e=>yv.bind(e)}),Gr=(e,t)=>e!==je&&!e.__isScriptSetup&&tt(e,t),_o={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:a,props:i,accessCache:l,type:r,appContext:o}=e;if(t[0]!=="$"){const f=l[t];if(f!==void 0)switch(f){case 1:return n[t];case 2:return a[t];case 4:return s[t];case 3:return i[t]}else{if(Gr(n,t))return l[t]=1,n[t];if(a!==je&&tt(a,t))return l[t]=2,a[t];if(tt(i,t))return l[t]=3,i[t];if(s!==je&&tt(s,t))return l[t]=4,s[t];ko&&(l[t]=0)}}const c=Si[t];let d,u;if(c)return t==="$attrs"&&Kt(e.attrs,"get",""),c(e);if((d=r.__cssModules)&&(d=d[t]))return d;if(s!==je&&tt(s,t))return l[t]=4,s[t];if(u=o.config.globalProperties,tt(u,t))return u[t]},set({_:e},t,s){const{data:n,setupState:a,ctx:i}=e;return Gr(a,t)?(a[t]=s,!0):n!==je&&tt(n,t)?(n[t]=s,!0):tt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:a,props:i,type:l}},r){let o;return!!(s[r]||e!==je&&r[0]!=="$"&&tt(e,r)||Gr(t,r)||tt(i,r)||tt(n,r)||tt(Si,r)||tt(a.config.globalProperties,r)||(o=l.__cssModules)&&o[r])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:tt(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}},Yv=ze({},_o,{get(e,t){if(t!==Symbol.unscopables)return _o.get(e,t,e)},has(e,t){return t[0]!=="_"&&!ag(t)}});function Qv(){return null}function Xv(){return null}function eb(e){}function tb(e){}function sb(){return null}function nb(){}function ab(e,t){return null}function ib(){return lp().slots}function lb(){return lp().attrs}function lp(e){const t=as();return t.setupContext||(t.setupContext=Bp(t))}function $i(e){return be(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}function rb(e,t){const s=$i(e);for(const n in t){if(n.startsWith("__skip"))continue;let a=s[n];a?be(a)||Ie(a)?a=s[n]={type:a,default:t[n]}:a.default=t[n]:a===null&&(a=s[n]={default:t[n]}),a&&t[`__skip_${n}`]&&(a.skipFactory=!0)}return s}function ob(e,t){return!e||!t?e||t:be(e)&&be(t)?e.concat(t):ze({},$i(e),$i(t))}function cb(e,t){const s={};for(const n in e)t.includes(n)||Object.defineProperty(s,n,{enumerable:!0,get:()=>e[n]});return s}function db(e){const t=as(),s=la;let n=e();zi(),s&&Ba(!1);const a=()=>{si(t),s&&Ba(!0)},i=()=>{as()!==t&&t.scope.off(),zi(),s&&Ba(!1)};return Yo(n)&&(n=n.catch(l=>{throw a(),Promise.resolve().then(()=>Promise.resolve().then(i)),l})),[n,()=>{a(),Promise.resolve().then(i)}]}let ko=!0;function ub(e){const t=hc(e),s=e.proxy,n=e.ctx;ko=!1,t.beforeCreate&&xd(t.beforeCreate,e,"bc");const{data:a,computed:i,methods:l,watch:r,provide:o,inject:c,created:d,beforeMount:u,mounted:f,beforeUpdate:p,updated:b,activated:y,deactivated:E,beforeDestroy:I,beforeUnmount:x,destroyed:m,unmounted:_,render:S,renderTracked:g,renderTriggered:w,errorCaptured:T,serverPrefetch:C,expose:M,inheritAttrs:H,components:P,directives:R,filters:j}=t;if(c&&fb(c,n,null),l)for(const O in l){const N=l[O];Ie(N)&&(n[O]=N.bind(s))}if(a){const O=a.call(s,s);Xe(O)&&(e.data=Hn(O))}if(ko=!0,i)for(const O in i){const N=i[O],Y=Ie(N)?N.bind(s,s):Ie(N.get)?N.get.bind(s,s):Ht,we=!Ie(N)&&Ie(N.set)?N.set.bind(s):Ht,ke=J({get:Y,set:we});Object.defineProperty(n,O,{enumerable:!0,configurable:!0,get:()=>ke.value,set:ie=>ke.value=ie})}if(r)for(const O in r)rp(r[O],n,s,O);if(o){const O=Ie(o)?o.call(s):o;Reflect.ownKeys(O).forEach(N=>{wi(N,O[N])})}d&&xd(d,e,"c");function U(O,N){be(N)?N.forEach(Y=>O(Y.bind(s))):N&&O(N.bind(s))}if(U(ep,u),U(We,f),U(dc,p),U(wr,b),U(Ds,y),U(Ms,E),U(ap,T),U(np,g),U(sp,w),U(Sr,x),U(xt,_),U(tp,C),be(M))if(M.length){const O=e.exposed||(e.exposed={});M.forEach(N=>{Object.defineProperty(O,N,{get:()=>s[N],set:Y=>s[N]=Y,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===Ht&&(e.render=S),H!=null&&(e.inheritAttrs=H),P&&(e.components=P),R&&(e.directives=R),C&&cc(e)}function fb(e,t,s=Ht){be(e)&&(e=wo(e));for(const n in e){const a=e[n];let i;Xe(a)?"default"in a?i=Os(a.from||n,a.default,!0):i=Os(a.from||n):i=Os(a),St(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[n]=i}}function xd(e,t,s){xs(be(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function rp(e,t,s,n){let a=n.includes(".")?Gf(s,n):()=>s[n];if(Me(e)){const i=t[e];Ie(i)&&ns(a,i)}else if(Ie(e))ns(a,e.bind(s));else if(Xe(e))if(be(e))e.forEach(i=>rp(i,t,s,n));else{const i=Ie(e.handler)?e.handler.bind(s):t[e.handler];Ie(i)&&ns(a,i,e)}}function hc(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:a,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,r=i.get(t);let o;return r?o=r:!a.length&&!s&&!n?o=t:(o={},a.length&&a.forEach(c=>Ul(o,c,l,!0)),Ul(o,t,l)),Xe(t)&&i.set(t,o),o}function Ul(e,t,s,n=!1){const{mixins:a,extends:i}=t;i&&Ul(e,i,s,!0),a&&a.forEach(l=>Ul(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const r=pb[l]||s&&s[l];e[l]=r?r(e[l],t[l]):t[l]}return e}const pb={data:_d,props:kd,emits:kd,methods:bi,computed:bi,beforeCreate:Qt,created:Qt,beforeMount:Qt,mounted:Qt,beforeUpdate:Qt,updated:Qt,beforeDestroy:Qt,beforeUnmount:Qt,destroyed:Qt,unmounted:Qt,activated:Qt,deactivated:Qt,errorCaptured:Qt,serverPrefetch:Qt,components:bi,directives:bi,watch:mb,provide:_d,inject:hb};function _d(e,t){return t?e?function(){return ze(Ie(e)?e.call(this,this):e,Ie(t)?t.call(this,this):t)}:t:e}function hb(e,t){return bi(wo(e),wo(t))}function wo(e){if(be(e)){const t={};for(let s=0;s{let d,u=je,f;return qf(()=>{const p=e[a];Lt(d,p)&&(d=p,c())}),{get(){return o(),s.get?s.get(d):d},set(p){const b=s.set?s.set(p):p;if(!Lt(b,d)&&!(u!==je&&Lt(p,u)))return;const y=n.vnode.props,E=!!(y&&(t in y||a in y||i in y)&&(`onUpdate:${t}`in y||`onUpdate:${a}`in y||`onUpdate:${i}`in y));E||(d=p,c()),n.emit(`update:${t}`,b),Lt(p,u)&&(Lt(p,b)&&!Lt(b,f)||E&&u!==je&&!Lt(b,d))&&c(),u=p,f=b}}});return r[Symbol.iterator]=()=>{let o=0;return{next(){return o<2?{value:o++?l||je:r,done:!1}:{done:!0}}}},r}const cp=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${it(t)}Modifiers`]||e[`${ps(t)}Modifiers`];function yb(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||je;let a=s;const i=t.startsWith("update:"),l=i&&cp(n,t.slice(7));l&&(l.trim&&(a=s.map(d=>Me(d)?d.trim():d)),l.number&&(a=s.map(pr)));let r,o=n[r=Da(t)]||n[r=Da(it(t))];!o&&i&&(o=n[r=Da(ps(t))]),o&&xs(o,e,6,a);const c=n[r+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,xs(c,e,6,a)}}const xb=new WeakMap;function dp(e,t,s=!1){const n=s?xb:t.emitsCache,a=n.get(e);if(a!==void 0)return a;const i=e.emits;let l={},r=!1;if(!Ie(e)){const o=c=>{const d=dp(c,t,!0);d&&(r=!0,ze(l,d))};!s&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return!i&&!r?(Xe(e)&&n.set(e,null),null):(be(i)?i.forEach(o=>l[o]=null):ze(l,i),Xe(e)&&n.set(e,l),l)}function Tr(e,t){return!e||!ca(t)?!1:(t=t.slice(2).replace(/Once$/,""),tt(e,t[0].toLowerCase()+t.slice(1))||tt(e,ps(t))||tt(e,t))}function Cl(e){const{type:t,vnode:s,proxy:n,withProxy:a,propsOptions:[i],slots:l,attrs:r,emit:o,render:c,renderCache:d,props:u,data:f,setupState:p,ctx:b,inheritAttrs:y}=e,E=Fi(e);let I,x;try{if(s.shapeFlag&4){const _=a||n,S=_;I=fs(c.call(S,_,d,u,p,f,b)),x=r}else{const _=t;I=fs(_.length>1?_(u,{attrs:r,slots:l,emit:o}):_(u,null)),x=t.props?r:kb(r)}}catch(_){Ti.length=0,fa(_,e,1),I=ft(yt)}let m=I;if(x&&y!==!1){const _=Object.keys(x),{shapeFlag:S}=m;_.length&&S&7&&(i&&_.some(cr)&&(x=wb(x,i)),m=sn(m,x,!1,!0))}return s.dirs&&(m=sn(m,null,!1,!0),m.dirs=m.dirs?m.dirs.concat(s.dirs):s.dirs),s.transition&&Tn(m,s.transition),I=m,Fi(E),I}function _b(e,t=!0){let s;for(let n=0;n{let t;for(const s in e)(s==="class"||s==="style"||ca(s))&&((t||(t={}))[s]=e[s]);return t},wb=(e,t)=>{const s={};for(const n in e)(!cr(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Sb(e,t,s){const{props:n,children:a,component:i}=e,{props:l,children:r,patchFlag:o}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&o>=0){if(o&1024)return!0;if(o&16)return n?wd(n,l,c):!!l;if(o&8){const d=t.dynamicProps;for(let u=0;uObject.create(fp),hp=e=>Object.getPrototypeOf(e)===fp;function Tb(e,t,s,n=!1){const a={},i=pp();e.propsDefaults=Object.create(null),mp(e,t,a,i);for(const l in e.propsOptions[0])l in a||(a[l]=void 0);s?e.props=n?a:sc(a):e.type.props?e.props=a:e.props=i,e.attrs=i}function Cb(e,t,s,n){const{props:a,attrs:i,vnode:{patchFlag:l}}=e,r=Je(a),[o]=e.propsOptions;let c=!1;if((n||l>0)&&!(l&16)){if(l&8){const d=e.vnode.dynamicProps;for(let u=0;u{o=!0;const[f,p]=gp(u,t,!0);ze(l,f),p&&r.push(...p)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!o)return Xe(e)&&n.set(e,Na),Na;if(be(i))for(let d=0;de==="_"||e==="_ctx"||e==="$stable",gc=e=>be(e)?e.map(fs):[fs(e)],Ab=(e,t,s)=>{if(t._n)return t;const n=lc((...a)=>gc(t(...a)),s);return n._c=!1,n},vp=(e,t,s)=>{const n=e._ctx;for(const a in e){if(mc(a))continue;const i=e[a];if(Ie(i))t[a]=Ab(a,i,n);else if(i!=null){const l=gc(i);t[a]=()=>l}}},bp=(e,t)=>{const s=gc(t);e.slots.default=()=>s},yp=(e,t,s)=>{for(const n in t)(s||!mc(n))&&(e[n]=t[n])},Rb=(e,t,s)=>{const n=e.slots=pp();if(e.vnode.shapeFlag&32){const a=t._;a?(yp(n,t,s),s&&uf(n,"_",a,!0)):vp(t,n)}else t&&bp(e,t)},Ib=(e,t,s)=>{const{vnode:n,slots:a}=e;let i=!0,l=je;if(n.shapeFlag&32){const r=t._;r?s&&r===1?i=!1:yp(a,t,s):(i=!t.$stable,vp(t,a)),l=t}else t&&(bp(e,t),l={default:1});if(i)for(const r in a)!mc(r)&&l[r]==null&&delete a[r]},kt=Ep;function xp(e){return kp(e)}function _p(e){return kp(e,Rv)}function kp(e,t){const s=hr();s.__VUE__=!0;const{insert:n,remove:a,patchProp:i,createElement:l,createText:r,createComment:o,setText:c,setElementText:d,parentNode:u,nextSibling:f,setScopeId:p=Ht,insertStaticContent:b}=e,y=(k,L,$,ee=null,Z=null,X=null,ue=void 0,oe=null,le=!!L.dynamicChildren)=>{if(k===L)return;k&&!Hs(k,L)&&(ee=V(k),ie(k,Z,X,!0),k=null),L.patchFlag===-2&&(le=!1,L.dynamicChildren=null);const{type:te,ref:ne,shapeFlag:fe}=L;switch(te){case $n:E(k,L,$,ee);break;case yt:I(k,L,$,ee);break;case sa:k==null&&x(L,$,ee,ue);break;case Dt:P(k,L,$,ee,Z,X,ue,oe,le);break;default:fe&1?S(k,L,$,ee,Z,X,ue,oe,le):fe&6?R(k,L,$,ee,Z,X,ue,oe,le):(fe&64||fe&128)&&te.process(k,L,$,ee,Z,X,ue,oe,le,ye)}ne!=null&&Z?Fa(ne,k&&k.ref,X,L||k,!L):ne==null&&k&&k.ref!=null&&Fa(k.ref,null,X,k,!0)},E=(k,L,$,ee)=>{if(k==null)n(L.el=r(L.children),$,ee);else{const Z=L.el=k.el;L.children!==k.children&&c(Z,L.children)}},I=(k,L,$,ee)=>{k==null?n(L.el=o(L.children||""),$,ee):L.el=k.el},x=(k,L,$,ee)=>{[k.el,k.anchor]=b(k.children,L,$,ee,k.el,k.anchor)},m=({el:k,anchor:L},$,ee)=>{let Z;for(;k&&k!==L;)Z=f(k),n(k,$,ee),k=Z;n(L,$,ee)},_=({el:k,anchor:L})=>{let $;for(;k&&k!==L;)$=f(k),a(k),k=$;a(L)},S=(k,L,$,ee,Z,X,ue,oe,le)=>{if(L.type==="svg"?ue="svg":L.type==="math"&&(ue="mathml"),k==null)g(L,$,ee,Z,X,ue,oe,le);else{const te=k.el&&k.el._isVueCE?k.el:null;try{te&&te._beginPatch(),C(k,L,Z,X,ue,oe,le)}finally{te&&te._endPatch()}}},g=(k,L,$,ee,Z,X,ue,oe)=>{let le,te;const{props:ne,shapeFlag:fe,transition:ve,dirs:Te}=k;if(le=k.el=l(k.type,X,ne&&ne.is,ne),fe&8?d(le,k.children):fe&16&&T(k.children,le,null,ee,Z,Kr(k,X),ue,oe),Te&&Qs(k,null,ee,"created"),w(le,k,k.scopeId,ue,ee),ne){for(const Le in ne)Le!=="value"&&!bn(Le)&&i(le,Le,null,ne[Le],X,ee);"value"in ne&&i(le,"value",null,ne.value,X),(te=ne.onVnodeBeforeMount)&&ds(te,ee,k)}Te&&Qs(k,null,ee,"beforeMount");const Oe=wp(Z,ve);Oe&&ve.beforeEnter(le),n(le,L,$),((te=ne&&ne.onVnodeMounted)||Oe||Te)&&kt(()=>{try{te&&ds(te,ee,k),Oe&&ve.enter(le),Te&&Qs(k,null,ee,"mounted")}finally{}},Z)},w=(k,L,$,ee,Z)=>{if($&&p(k,$),ee)for(let X=0;X{for(let te=le;te{const oe=L.el=k.el;let{patchFlag:le,dynamicChildren:te,dirs:ne}=L;le|=k.patchFlag&16;const fe=k.props||je,ve=L.props||je;let Te;if($&&qn($,!1),(Te=ve.onVnodeBeforeUpdate)&&ds(Te,$,L,k),ne&&Qs(L,k,$,"beforeUpdate"),$&&qn($,!0),(fe.innerHTML&&ve.innerHTML==null||fe.textContent&&ve.textContent==null)&&d(oe,""),te?M(k.dynamicChildren,te,oe,$,ee,Kr(L,Z),X):ue||N(k,L,oe,null,$,ee,Kr(L,Z),X,!1),le>0){if(le&16)H(oe,fe,ve,$,Z);else if(le&2&&fe.class!==ve.class&&i(oe,"class",null,ve.class,Z),le&4&&i(oe,"style",fe.style,ve.style,Z),le&8){const Oe=L.dynamicProps;for(let Le=0;Le{Te&&ds(Te,$,L,k),ne&&Qs(L,k,$,"updated")},ee)},M=(k,L,$,ee,Z,X,ue)=>{for(let oe=0;oe{if(L!==$){if(L!==je)for(const X in L)!bn(X)&&!(X in $)&&i(k,X,L[X],null,Z,ee);for(const X in $){if(bn(X))continue;const ue=$[X],oe=L[X];ue!==oe&&X!=="value"&&i(k,X,oe,ue,Z,ee)}"value"in $&&i(k,"value",L.value,$.value,Z)}},P=(k,L,$,ee,Z,X,ue,oe,le)=>{const te=L.el=k?k.el:r(""),ne=L.anchor=k?k.anchor:r("");let{patchFlag:fe,dynamicChildren:ve,slotScopeIds:Te}=L;Te&&(oe=oe?oe.concat(Te):Te),k==null?(n(te,$,ee),n(ne,$,ee),T(L.children||[],$,ne,Z,X,ue,oe,le)):fe>0&&fe&64&&ve&&k.dynamicChildren&&k.dynamicChildren.length===ve.length?(M(k.dynamicChildren,ve,$,Z,X,ue,oe),(L.key!=null||Z&&L===Z.subTree)&&vc(k,L,!0)):N(k,L,$,ne,Z,X,ue,oe,le)},R=(k,L,$,ee,Z,X,ue,oe,le)=>{L.slotScopeIds=oe,k==null?L.shapeFlag&512?Z.ctx.activate(L,$,ee,ue,le):j(L,$,ee,Z,X,ue,le):Q(k,L,le)},j=(k,L,$,ee,Z,X,ue)=>{const oe=k.component=Dp(k,ee,Z);if(tl(k)&&(oe.ctx.renderer=ye),Pp(oe,!1,ue),oe.asyncDep){if(Z&&Z.registerDep(oe,U,ue),!k.el){const le=oe.subTree=ft(yt);I(null,le,L,$),k.placeholder=le.el}}else U(oe,k,L,$,Z,X,ue)},Q=(k,L,$)=>{const ee=L.component=k.component;if(Sb(k,L,$))if(ee.asyncDep&&!ee.asyncResolved){O(ee,L,$);return}else ee.next=L,ee.update();else L.el=k.el,ee.vnode=L},U=(k,L,$,ee,Z,X,ue)=>{const oe=()=>{if(k.isMounted){let{next:fe,bu:ve,u:Te,parent:Oe,vnode:Le}=k;{const K=Sp(k);if(K){fe&&(fe.el=Le.el,O(k,fe,ue)),K.asyncDep.then(()=>{kt(()=>{k.isUnmounted||te()},Z)});return}}let De=fe,Be;qn(k,!1),fe?(fe.el=Le.el,O(k,fe,ue)):fe=Le,ve&&Ma(ve),(Be=fe.props&&fe.props.onVnodeBeforeUpdate)&&ds(Be,Oe,fe,Le),qn(k,!0);const qe=Cl(k),ct=k.subTree;k.subTree=qe,y(ct,qe,u(ct.el),V(ct),k,Z,X),fe.el=qe.el,De===null&&Cr(k,qe.el),Te&&kt(Te,Z),(Be=fe.props&&fe.props.onVnodeUpdated)&&kt(()=>ds(Be,Oe,fe,Le),Z)}else{let fe;const{el:ve,props:Te}=L,{bm:Oe,m:Le,parent:De,root:Be,type:qe}=k,ct=xn(L);if(qn(k,!1),Oe&&Ma(Oe),!ct&&(fe=Te&&Te.onVnodeBeforeMount)&&ds(fe,De,L),qn(k,!0),ve&&He){const K=()=>{k.subTree=Cl(k),He(ve,k.subTree,k,Z,null)};ct&&qe.__asyncHydrate?qe.__asyncHydrate(ve,k,K):K()}else{Be.ce&&Be.ce._hasShadowRoot()&&Be.ce._injectChildStyle(qe,k.parent?k.parent.type:void 0);const K=k.subTree=Cl(k);y(null,K,$,ee,k,Z,X),L.el=K.el}if(Le&&kt(Le,Z),!ct&&(fe=Te&&Te.onVnodeMounted)){const K=L;kt(()=>ds(fe,De,K),Z)}(L.shapeFlag&256||De&&xn(De.vnode)&&De.vnode.shapeFlag&256)&&k.a&&kt(k.a,Z),k.isMounted=!0,L=$=ee=null}};k.scope.on();const le=k.effect=new Ni(oe);k.scope.off();const te=k.update=le.run.bind(le),ne=k.job=le.runIfDirty.bind(le);ne.i=k,ne.id=k.uid,le.scheduler=()=>ic(ne),qn(k,!0),te()},O=(k,L,$)=>{L.component=k;const ee=k.vnode.props;k.vnode=L,k.next=null,Cb(k,L.props,ee,$),Ib(k,L.children,$),wn(),ud(k),Sn()},N=(k,L,$,ee,Z,X,ue,oe,le=!1)=>{const te=k&&k.children,ne=k?k.shapeFlag:0,fe=L.children,{patchFlag:ve,shapeFlag:Te}=L;if(ve>0){if(ve&128){we(te,fe,$,ee,Z,X,ue,oe,le);return}else if(ve&256){Y(te,fe,$,ee,Z,X,ue,oe,le);return}}Te&8?(ne&16&&Se(te,Z,X),fe!==te&&d($,fe)):ne&16?Te&16?we(te,fe,$,ee,Z,X,ue,oe,le):Se(te,Z,X,!0):(ne&8&&d($,""),Te&16&&T(fe,$,ee,Z,X,ue,oe,le))},Y=(k,L,$,ee,Z,X,ue,oe,le)=>{k=k||Na,L=L||Na;const te=k.length,ne=L.length,fe=Math.min(te,ne);let ve;for(ve=0;vene?Se(k,Z,X,!0,!1,fe):T(L,$,ee,Z,X,ue,oe,le,fe)},we=(k,L,$,ee,Z,X,ue,oe,le)=>{let te=0;const ne=L.length;let fe=k.length-1,ve=ne-1;for(;te<=fe&&te<=ve;){const Te=k[te],Oe=L[te]=le?un(L[te]):fs(L[te]);if(Hs(Te,Oe))y(Te,Oe,$,null,Z,X,ue,oe,le);else break;te++}for(;te<=fe&&te<=ve;){const Te=k[fe],Oe=L[ve]=le?un(L[ve]):fs(L[ve]);if(Hs(Te,Oe))y(Te,Oe,$,null,Z,X,ue,oe,le);else break;fe--,ve--}if(te>fe){if(te<=ve){const Te=ve+1,Oe=Teve)for(;te<=fe;)ie(k[te],Z,X,!0),te++;else{const Te=te,Oe=te,Le=new Map;for(te=Oe;te<=ve;te++){const Re=L[te]=le?un(L[te]):fs(L[te]);Re.key!=null&&Le.set(Re.key,te)}let De,Be=0;const qe=ve-Oe+1;let ct=!1,K=0;const xe=new Array(qe);for(te=0;te=qe){ie(Re,Z,X,!0);continue}let Ve;if(Re.key!=null)Ve=Le.get(Re.key);else for(De=Oe;De<=ve;De++)if(xe[De-Oe]===0&&Hs(Re,L[De])){Ve=De;break}Ve===void 0?ie(Re,Z,X,!0):(xe[Ve-Oe]=te+1,Ve>=K?K=Ve:ct=!0,y(Re,L[Ve],$,null,Z,X,ue,oe,le),Be++)}const Ce=ct?Ob(xe):Na;for(De=Ce.length-1,te=qe-1;te>=0;te--){const Re=Oe+te,Ve=L[Re],Pe=L[Re+1],pt=Re+1{const{el:X,type:ue,transition:oe,children:le,shapeFlag:te}=k;if(te&6){ke(k.component.subTree,L,$,ee);return}if(te&128){k.suspense.move(L,$,ee);return}if(te&64){ue.move(k,L,$,ye);return}if(ue===Dt){n(X,L,$);for(let fe=0;feoe.enter(X),Z));else{const{leave:fe,delayLeave:ve,afterLeave:Te}=oe,Oe=()=>{k.ctx.isUnmounted?a(X):n(X,L,$)},Le=()=>{const De=X._isLeaving||!!X[As];X._isLeaving&&X[As](!0),oe.persisted&&!De?Oe():fe(X,()=>{Oe(),Te&&Te()})};ve?ve(X,Oe,Le):Le()}else n(X,L,$)},ie=(k,L,$,ee=!1,Z=!1)=>{const{type:X,props:ue,ref:oe,children:le,dynamicChildren:te,shapeFlag:ne,patchFlag:fe,dirs:ve,cacheIndex:Te,memo:Oe}=k;if(fe===-2&&(Z=!1),oe!=null&&(wn(),Fa(oe,null,$,k,!0),Sn()),Te!=null&&(L.renderCache[Te]=void 0),ne&256){L.ctx.deactivate(k);return}const Le=ne&1&&ve,De=!xn(k);let Be;if(De&&(Be=ue&&ue.onVnodeBeforeUnmount)&&ds(Be,L,k),ne&6)se(k.component,$,ee);else{if(ne&128){k.suspense.unmount($,ee);return}Le&&Qs(k,null,L,"beforeUnmount"),ne&64?k.type.remove(k,L,$,ye,ee):te&&!te.hasOnce&&(X!==Dt||fe>0&&fe&64)?Se(te,L,$,!1,!0):(X===Dt&&fe&384||!Z&&ne&16)&&Se(le,L,$),ee&&he(k)}const qe=Oe!=null&&Te==null;(De&&(Be=ue&&ue.onVnodeUnmounted)||Le||qe)&&kt(()=>{Be&&ds(Be,L,k),Le&&Qs(k,null,L,"unmounted"),qe&&(k.el=null)},$)},he=k=>{const{type:L,el:$,anchor:ee,transition:Z}=k;if(L===Dt){F($,ee);return}if(L===sa){_(k);return}const X=()=>{a($),Z&&!Z.persisted&&Z.afterLeave&&Z.afterLeave()};if(k.shapeFlag&1&&Z&&!Z.persisted){const{leave:ue,delayLeave:oe}=Z,le=()=>ue($,X);oe?oe(k.el,X,le):le()}else X()},F=(k,L)=>{let $;for(;k!==L;)$=f(k),a(k),k=$;a(L)},se=(k,L,$)=>{const{bum:ee,scope:Z,job:X,subTree:ue,um:oe,m:le,a:te}=k;Hl(le),Hl(te),ee&&Ma(ee),Z.stop(),X&&(X.flags|=8,ie(ue,k,L,$)),oe&&kt(oe,L),kt(()=>{k.isUnmounted=!0},L)},Se=(k,L,$,ee=!1,Z=!1,X=0)=>{for(let ue=X;ue{if(k.shapeFlag&6)return V(k.component.subTree);if(k.shapeFlag&128)return k.suspense.next();const L=f(k.anchor||k.el),$=L&&L[Kf];return $?f($):L};let de=!1;const ce=(k,L,$)=>{let ee;k==null?L._vnode&&(ie(L._vnode,null,null,!0),ee=L._vnode.component):y(L._vnode||null,k,L,null,null,null,$),L._vnode=k,de||(de=!0,ud(ee),$l(),de=!1)},ye={p:y,um:ie,m:ke,r:he,mt:j,mc:T,pc:N,pbc:M,n:V,o:e};let ge,He;return t&&([ge,He]=t(ye)),{render:ce,hydrate:ge,createApp:vb(ce,ge)}}function Kr({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function qn({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function wp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function vc(e,t,s=!1){const n=e.children,a=t.children;if(be(n)&&be(a))for(let i=0;i>1,e[s[r]]0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,l=s[i-1];i-- >0;)s[i]=l,l=t[l];return s}function Sp(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Sp(t)}function Hl(e){if(e)for(let t=0;te.__isSuspense;let To=0;const Nb={name:"Suspense",__isSuspense:!0,process(e,t,s,n,a,i,l,r,o,c){if(e==null)Db(t,s,n,a,i,l,r,o,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Mb(e,t,s,n,a,l,r,o,c)}},hydrate:Pb,normalize:Fb},Lb=Nb;function Bi(e,t){const s=e.props&&e.props[t];Ie(s)&&s()}function Db(e,t,s,n,a,i,l,r,o){const{p:c,o:{createElement:d}}=o,u=d("div"),f=e.suspense=Cp(e,a,n,t,u,s,i,l,r,o);c(null,f.pendingBranch=e.ssContent,u,null,n,f,i,l),f.deps>0?(Bi(e,"onPending"),Bi(e,"onFallback"),c(null,e.ssFallback,t,s,n,null,i,l),$a(f,e.ssFallback)):f.resolve(!1,!0)}function Mb(e,t,s,n,a,i,l,r,{p:o,um:c,o:{createElement:d}}){const u=t.suspense=e.suspense;u.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:b,pendingBranch:y,isInFallback:E,isHydrating:I}=u;if(y)u.pendingBranch=f,Hs(y,f)?(o(y,f,u.hiddenContainer,null,a,u,i,l,r),u.deps<=0?u.resolve():E&&(I||(o(b,p,s,n,a,null,i,l,r),$a(u,p)))):(u.pendingId=To++,I?(u.isHydrating=!1,u.activeBranch=y):c(y,a,u),u.deps=0,u.effects.length=0,u.hiddenContainer=d("div"),E?(o(null,f,u.hiddenContainer,null,a,u,i,l,r),u.deps<=0?u.resolve():(o(b,p,s,n,a,null,i,l,r),$a(u,p))):b&&Hs(b,f)?(o(b,f,s,n,a,u,i,l,r),u.resolve(!0)):(o(null,f,u.hiddenContainer,null,a,u,i,l,r),u.deps<=0&&u.resolve()));else if(b&&Hs(b,f))o(b,f,s,n,a,u,i,l,r),$a(u,f);else if(Bi(t,"onPending"),u.pendingBranch=f,f.shapeFlag&512?u.pendingId=f.component.suspenseId:u.pendingId=To++,o(null,f,u.hiddenContainer,null,a,u,i,l,r),u.deps<=0)u.resolve();else{const{timeout:x,pendingId:m}=u;x>0?setTimeout(()=>{u.pendingId===m&&u.fallback(p)},x):x===0&&u.fallback(p)}}function Cp(e,t,s,n,a,i,l,r,o,c,d=!1){const{p:u,m:f,um:p,n:b,o:{parentNode:y,remove:E}}=c;let I;const x=$b(e);x&&t&&t.pendingBranch&&(I=t.pendingId,t.deps++);const m=e.props?Ll(e.props.timeout):void 0,_=i,S={vnode:e,parent:t,parentComponent:s,namespace:l,container:n,hiddenContainer:a,deps:0,pendingId:To++,timeout:typeof m=="number"?m:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!d,isHydrating:d,isUnmounted:!1,effects:[],resolve(g=!1,w=!1){const{vnode:T,activeBranch:C,pendingBranch:M,pendingId:H,effects:P,parentComponent:R,container:j,isInFallback:Q}=S;let U=!1;if(S.isHydrating)S.isHydrating=!1;else if(!g){U=C&&M.transition&&M.transition.mode==="out-in";let Y=!1;U&&(C.transition.afterLeave=()=>{H===S.pendingId&&(f(M,j,i===_&&!Y?b(C):i,0),Mi(P),Q&&T.ssFallback&&(T.ssFallback.el=null))}),C&&!S.isFallbackMountPending&&(y(C.el)===j&&(i=b(C),Y=!0),p(C,R,S,!0),!U&&Q&&T.ssFallback&&kt(()=>T.ssFallback.el=null,S)),U||f(M,j,i,0)}S.isFallbackMountPending=!1,$a(S,M),S.pendingBranch=null,S.isInFallback=!1;let O=S.parent,N=!1;for(;O;){if(O.pendingBranch){O.effects.push(...P),N=!0;break}O=O.parent}!N&&!U&&Mi(P),S.effects=[],x&&t&&t.pendingBranch&&I===t.pendingId&&(t.deps--,t.deps===0&&!w&&t.resolve()),Bi(T,"onResolve")},fallback(g){if(!S.pendingBranch)return;const{vnode:w,activeBranch:T,parentComponent:C,container:M,namespace:H}=S;Bi(w,"onFallback");const P=b(T),R=()=>{S.isFallbackMountPending=!1,S.isInFallback&&(u(null,g,M,P,C,null,H,r,o),$a(S,g))},j=g.transition&&g.transition.mode==="out-in";j&&(S.isFallbackMountPending=!0,T.transition.afterLeave=R),S.isInFallback=!0,p(T,C,null,!0),j||R()},move(g,w,T){S.activeBranch&&f(S.activeBranch,g,w,T),S.container=g},next(){return S.activeBranch&&b(S.activeBranch)},registerDep(g,w,T){const C=!!S.pendingBranch;C&&S.deps++;const M=g.vnode.el;g.asyncDep.catch(H=>{fa(H,g,0)}).then(H=>{if(g.isUnmounted||S.isUnmounted||S.pendingId!==g.suspenseId)return;zi(),g.asyncResolved=!0;const{vnode:P}=g;Co(g,H,!1),M&&(P.el=M);const R=!M&&g.subTree.el;w(g,P,y(M||g.subTree.el),M?null:b(g.subTree),S,l,T),R&&(P.placeholder=null,E(R)),Cr(g,P.el),C&&--S.deps===0&&S.resolve()})},unmount(g,w){S.isUnmounted=!0,S.activeBranch&&p(S.activeBranch,s,g,w),S.pendingBranch&&p(S.pendingBranch,s,g,w)}};return S}function Pb(e,t,s,n,a,i,l,r,o){const c=t.suspense=Cp(t,n,s,e.parentNode,document.createElement("div"),null,a,i,l,r,!0),d=o(e,c.pendingBranch=t.ssContent,s,c,i,l);return c.deps===0&&c.resolve(!1,!0),d}function Fb(e){const{shapeFlag:t,children:s}=e,n=t&32;e.ssContent=Td(n?s.default:s),e.ssFallback=n?Td(s.fallback):ft(yt)}function Td(e){let t;if(Ie(e)){const s=ia&&e._c;s&&(e._d=!1,Ui()),e=e(),s&&(e._d=!0,t=Wt,Ap())}return be(e)&&(e=_b(e)),e=fs(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(s=>s!==e)),e}function Ep(e,t){t&&t.pendingBranch?be(e)?t.effects.push(...e):t.effects.push(e):Mi(e)}function $a(e,t){e.activeBranch=t;const{vnode:s,parentComponent:n}=e;let a=t.el;for(;!a&&t.component;)t=t.component.subTree,a=t.el;s.el=a,n&&n.subTree===s&&(n.vnode.el=a,Cr(n,a))}function $b(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Dt=Symbol.for("v-fgt"),$n=Symbol.for("v-txt"),yt=Symbol.for("v-cmt"),sa=Symbol.for("v-stc"),Ti=[];let Wt=null;function Ui(e=!1){Ti.push(Wt=e?null:[])}function Ap(){Ti.pop(),Wt=Ti[Ti.length-1]||null}let ia=1;function Hi(e,t=!1){ia+=e,e<0&&Wt&&t&&(Wt.hasOnce=!0)}function Rp(e){return e.dynamicChildren=ia>0?Wt||Na:null,Ap(),ia>0&&Wt&&Wt.push(e),e}function Bb(e,t,s,n,a,i){return Rp(bc(e,t,s,n,a,i,!0))}function Vl(e,t,s,n,a){return Rp(ft(e,t,s,n,a,!0))}function Cn(e){return e?e.__v_isVNode===!0:!1}function Hs(e,t){return e.type===t.type&&e.key===t.key}function Ub(e){}const Ip=({key:e})=>e??null,El=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Me(e)||St(e)||Ie(e)?{i:Ut,r:e,k:t,f:!!s}:e:null);function bc(e,t=null,s=null,n=0,a=null,i=e===Dt?0:1,l=!1,r=!1){const o={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ip(t),ref:t&&El(t),scopeId:xr,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Ut};return r?(xc(o,s),i&128&&e.normalize(o)):s&&(o.shapeFlag|=Me(s)?8:16),ia>0&&!l&&Wt&&(o.patchFlag>0||i&6)&&o.patchFlag!==32&&Wt.push(o),o}const ft=Hb;function Hb(e,t=null,s=null,n=0,a=null,i=!1){if((!e||e===ip)&&(e=yt),Cn(e)){const r=sn(e,t,!0);return s&&xc(r,s),ia>0&&!i&&Wt&&(r.shapeFlag&6?Wt[Wt.indexOf(e)]=r:Wt.push(r)),r.patchFlag=-2,r}if(Wb(e)&&(e=e.__vccOpts),t){t=Op(t);let{class:r,style:o}=t;r&&!Me(r)&&(t.class=Yi(r)),Xe(o)&&(Qi(o)&&!be(o)&&(o=ze({},o)),t.style=Ji(o))}const l=Me(e)?1:zl(e)?128:Wf(e)?64:Xe(e)?4:Ie(e)?2:0;return bc(e,t,s,n,a,l,i,!0)}function Op(e){return e?Qi(e)||hp(e)?ze({},e):e:null}function sn(e,t,s=!1,n=!1){const{props:a,ref:i,patchFlag:l,children:r,transition:o}=e,c=t?Lp(a||{},t):a,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Ip(c),ref:t&&t.ref?s&&i?be(i)?i.concat(El(t)):[i,El(t)]:El(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Dt?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:o,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&sn(e.ssContent),ssFallback:e.ssFallback&&sn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return o&&n&&Tn(d,o.clone(d)),d}function yc(e=" ",t=0){return ft($n,null,e,t)}function zb(e,t){const s=ft(sa,null,e);return s.staticCount=t,s}function Np(e="",t=!1){return t?(Ui(),Vl(yt,null,e)):ft(yt,null,e)}function fs(e){return e==null||typeof e=="boolean"?ft(yt):be(e)?ft(Dt,null,e.slice()):Cn(e)?un(e):ft($n,null,String(e))}function un(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:sn(e)}function xc(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(be(t))s=16;else if(typeof t=="object")if(n&65){const a=t.default;a&&(a._c&&(a._d=!1),xc(e,a()),a._c&&(a._d=!0));return}else{s=32;const a=t._;!a&&!hp(t)?t._ctx=Ut:a===3&&Ut&&(Ut.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ie(t)?(t={default:t,_ctx:Ut},s=32):(t=String(t),n&64?(s=16,t=[yc(t)]):s=8);e.children=t,e.shapeFlag|=s}function Lp(...e){const t={};for(let s=0;sBt||Ut;let jl,Ba;{const e=hr(),t=(s,n)=>{let a;return(a=e[s])||(a=e[s]=[]),a.push(n),i=>{a.length>1?a.forEach(l=>l(i)):a[0](i)}};jl=t("__VUE_INSTANCE_SETTERS__",s=>Bt=s),Ba=t("__VUE_SSR_SETTERS__",s=>la=s)}const si=e=>{const t=Bt;return jl(e),e.scope.on(),()=>{e.scope.off(),jl(t)}},zi=()=>{Bt&&Bt.scope.off(),jl(null)};function Mp(e){return e.vnode.shapeFlag&4}let la=!1;function Pp(e,t=!1,s=!1){t&&Ba(t);const{props:n,children:a}=e.vnode,i=Mp(e);Tb(e,n,i,t),Rb(e,a,s||t);const l=i?qb(e,t):void 0;return t&&Ba(!1),l}function qb(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,_o);const{setup:n}=s;if(n){wn();const a=e.setupContext=n.length>1?Bp(e):null,i=si(e),l=ti(n,e,0,[e.props,a]),r=Yo(l);if(Sn(),i(),(r||e.sp)&&!xn(e)&&cc(e),r){if(l.then(zi,zi),t)return l.then(o=>{Co(e,o,t)}).catch(o=>{fa(o,e,0)});e.asyncDep=l}else Co(e,l,t)}else $p(e,t)}function Co(e,t,s){Ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Xe(t)&&(e.setupState=ac(t)),$p(e,s)}let ql,Eo;function Fp(e){ql=e,Eo=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,Yv))}}const Gb=()=>!ql;function $p(e,t,s){const n=e.type;if(!e.render){if(!t&&ql&&!n.render){const a=n.template||hc(e).template;if(a){const{isCustomElement:i,compilerOptions:l}=e.appContext.config,{delimiters:r,compilerOptions:o}=n,c=ze(ze({isCustomElement:i,delimiters:r},l),o);n.render=ql(a,c)}}e.render=n.render||Ht,Eo&&Eo(e)}{const a=si(e);wn();try{ub(e)}finally{Sn(),a()}}}const Kb={get(e,t){return Kt(e,"get",""),e[t]}};function Bp(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Kb),slots:e.slots,emit:e.emit,expose:t}}function sl(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ac(Lf(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Si)return Si[s](e)},has(t,s){return s in t||s in Si}})):e.proxy}function Ao(e,t=!0){return Ie(e)?e.displayName||e.name:e.name||t&&e.__name}function Wb(e){return Ie(e)&&"__vccOpts"in e}const J=(e,t)=>ev(e,t,la);function ja(e,t,s){try{Hi(-1);const n=arguments.length;return n===2?Xe(t)&&!be(t)?Cn(t)?ft(e,null,[t]):ft(e,t):ft(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&Cn(s)&&(s=[s]),ft(e,t,s))}finally{Hi(1)}}function Zb(){}function Jb(e,t,s,n){const a=s[n];if(a&&Up(a,e))return a;const i=t();return i.memo=e.slice(),i.cacheIndex=n,s[n]=i}function Up(e,t){const s=e.memo;if(s.length!=t.length)return!1;for(let n=0;n0&&Wt&&Wt.push(e),!0}const Hp="3.5.38",Yb=Ht,Qb=cv,Xb=Ea,ey=zf,ty={createComponentInstance:Dp,setupComponent:Pp,renderComponentRoot:Cl,setCurrentRenderingInstance:Fi,isVNode:Cn,normalizeVNode:fs,getComponentPublicInstance:sl,ensureValidVNode:pc,pushWarningContext:iv,popWarningContext:lv},sy=ty,ny=null,ay=null,iy=null;/** * @vue/runtime-dom v3.5.38 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Ro;const Cd=typeof window<"u"&&window.trustedTypes;if(Cd)try{Ro=Cd.createPolicy("vue",{createHTML:e=>e})}catch{}const zp=Ro?e=>Ro.createHTML(e):e=>e,ly="http://www.w3.org/2000/svg",ry="http://www.w3.org/1998/Math/MathML",fn=typeof document<"u"?document:null,Ed=fn&&fn.createElement("template"),Vp={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const a=t==="svg"?fn.createElementNS(ly,e):t==="mathml"?fn.createElementNS(ry,e):s?fn.createElement(e,{is:s}):fn.createElement(e);return e==="select"&&n&&n.multiple!=null&&a.setAttribute("multiple",n.multiple),a},createText:e=>fn.createTextNode(e),createComment:e=>fn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>fn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,a,i){const l=s?s.previousSibling:t.lastChild;if(a&&(a===i||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),s),!(a===i||!(a=a.nextSibling)););else{Ed.innerHTML=zp(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const r=Ed.content;if(n==="svg"||n==="mathml"){const o=r.firstChild;for(;o.firstChild;)r.appendChild(o.firstChild);r.removeChild(o)}t.insertBefore(r,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},In="transition",oi="animation",ja=Symbol("_vtc"),jp={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},qp=ze({},oc,jp),oy=e=>(e.displayName="Transition",e.props=qp,e),cy=oy((e,{slots:t})=>Va(Yf,Gp(e),t)),qn=(e,t=[])=>{xe(e)?e.forEach(s=>s(...t)):e&&e(...t)},Ad=e=>e?xe(e)?e.some(t=>t.length>1):e.length>1:!1;function Gp(e){const t={};for(const P in e)P in jp||(t[P]=e[P]);if(e.css===!1)return t;const{name:s="v",type:n,duration:a,enterFromClass:i=`${s}-enter-from`,enterActiveClass:l=`${s}-enter-active`,enterToClass:r=`${s}-enter-to`,appearFromClass:o=i,appearActiveClass:c=l,appearToClass:d=r,leaveFromClass:u=`${s}-leave-from`,leaveActiveClass:f=`${s}-leave-active`,leaveToClass:p=`${s}-leave-to`}=e,b=dy(a),y=b&&b[0],E=b&&b[1],{onBeforeEnter:I,onEnter:x,onEnterCancelled:m,onLeave:_,onLeaveCancelled:S,onBeforeAppear:g=I,onAppear:w=x,onAppearCancelled:T=m}=t,C=(P,R,j,Q)=>{P._enterCancelled=Q,Dn(P,R?d:r),Dn(P,R?c:l),j&&j()},M=(P,R)=>{P._isLeaving=!1,Dn(P,u),Dn(P,p),Dn(P,f),R&&R()},H=P=>(R,j)=>{const Q=P?w:x,U=()=>C(R,P,j);qn(Q,[R,U]),Rd(()=>{Dn(R,P?o:i),Js(R,P?d:r),Ad(Q)||Id(R,n,y,U)})};return ze(t,{onBeforeEnter(P){qn(I,[P]),Js(P,i),Js(P,l)},onBeforeAppear(P){qn(g,[P]),Js(P,o),Js(P,c)},onEnter:H(!1),onAppear:H(!0),onLeave(P,R){P._isLeaving=!0;const j=()=>M(P,R);Js(P,u),P._enterCancelled?(Js(P,f),Io(P)):(Io(P),Js(P,f)),Rd(()=>{P._isLeaving&&(Dn(P,u),Js(P,p),Ad(_)||Id(P,n,E,j))}),qn(_,[P,j])},onEnterCancelled(P){C(P,!1,void 0,!0),qn(m,[P])},onAppearCancelled(P){C(P,!0,void 0,!0),qn(T,[P])},onLeaveCancelled(P){M(P),qn(S,[P])}})}function dy(e){if(e==null)return null;if(Qe(e))return[Wr(e.enter),Wr(e.leave)];{const t=Wr(e);return[t,t]}}function Wr(e){return Ll(e)}function Js(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[ja]||(e[ja]=new Set)).add(t)}function Dn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[ja];s&&(s.delete(t),s.size||(e[ja]=void 0))}function Rd(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let uy=0;function Id(e,t,s,n){const a=e._endId=++uy,i=()=>{a===e._endId&&n()};if(s!=null)return setTimeout(i,s);const{type:l,timeout:r,propCount:o}=Kp(e,t);if(!l)return n();const c=l+"end";let d=0;const u=()=>{e.removeEventListener(c,f),i()},f=p=>{p.target===e&&++d>=o&&u()};setTimeout(()=>{d(s[b]||"").split(", "),a=n(`${In}Delay`),i=n(`${In}Duration`),l=Od(a,i),r=n(`${oi}Delay`),o=n(`${oi}Duration`),c=Od(r,o);let d=null,u=0,f=0;t===In?l>0&&(d=In,u=l,f=i.length):t===oi?c>0&&(d=oi,u=c,f=o.length):(u=Math.max(l,c),d=u>0?l>c?In:oi:null,f=d?d===In?i.length:o.length:0);const p=d===In&&/\b(?:transform|all)(?:,|$)/.test(n(`${In}Property`).toString());return{type:d,timeout:u,propCount:f,hasTransform:p}}function Od(e,t){for(;e.lengthNd(s)+Nd(e[n])))}function Nd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Io(e){return(e?e.ownerDocument:document).body.offsetHeight}function fy(e,t,s){const n=e[ja];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Gl=Symbol("_vod"),_c=Symbol("_vsh"),Wp={name:"show",beforeMount(e,{value:t},{transition:s}){e[Gl]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):ci(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),ci(e,!0),n.enter(e)):n.leave(e,()=>{ci(e,!1)}):ci(e,t))},beforeUnmount(e,{value:t}){ci(e,t)}};function ci(e,t){e.style.display=t?e[Gl]:"none",e[_c]=!t}function py(){Wp.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Zp=Symbol("");function hy(e){const t=ss();if(!t)return;const s=t.ut=(a=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Kl(i,a))},n=()=>{const a=e(t.proxy);t.ce?Kl(t.ce,a):Oo(t.subTree,a),s(a)};dc(()=>{Di(n)}),We(()=>{ts(n,Ut,{flush:"post"});const a=new MutationObserver(n);a.observe(t.subTree.el.parentNode,{childList:!0}),xt(()=>a.disconnect())})}function Oo(e,t){if(e.shapeFlag&128){const s=e.suspense;e=s.activeBranch,s.pendingBranch&&!s.isHydrating&&s.effects.push(()=>{Oo(s.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Kl(e.el,t);else if(e.type===Dt)e.children.forEach(s=>Oo(s,t));else if(e.type===ta){let{el:s,anchor:n}=e;for(;s&&(Kl(s,t),s!==n);)s=s.nextSibling}}function Kl(e,t){if(e.nodeType===1){const s=e.style;let n="";for(const a in t){const i=xg(t[a]);s.setProperty(`--${a}`,i),n+=`--${a}: ${i};`}s[Zp]=n}}const my=/(?:^|;)\s*display\s*:/;function gy(e,t,s){const n=e.style,a=Me(s);let i=!1;if(s&&!a){if(t)if(Me(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();s[r]==null&&bi(n,r,"")}else for(const l in t)s[l]==null&&bi(n,l,"");for(const l in s){l==="display"&&(i=!0);const r=s[l];r!=null?by(e,l,!Me(t)&&t?t[l]:void 0,r)||bi(n,l,r):bi(n,l,"")}}else if(a){if(t!==s){const l=n[Zp];l&&(s+=";"+l),n.cssText=s,i=my.test(s)}}else t&&e.removeAttribute("style");Gl in e&&(e[Gl]=i?n.display:"",e[_c]&&(n.display="none"))}const Ld=/\s*!important$/;function bi(e,t,s){if(xe(s))s.forEach(n=>bi(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=vy(e,t);Ld.test(s)?e.setProperty(hs(n),s.replace(Ld,""),"important"):e[n]=s}}const Dd=["Webkit","Moz","ms"],Zr={};function vy(e,t){const s=Zr[t];if(s)return s;let n=it(t);if(n!=="filter"&&n in e)return Zr[t]=n;n=da(n);for(let a=0;aJr||(ky.then(()=>Jr=0),Jr=Date.now());function Sy(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const a=s.value;if(xe(a)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const l=a.slice(),r=[n];for(let o=0;oe.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Jp=(e,t,s,n,a,i)=>{const l=a==="svg";t==="class"?fy(e,n,l):t==="style"?gy(e,s,n):oa(t)?cr(t)||xy(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ty(e,t,n,l))?(Fd(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Pd(e,t,n,l,i,t!=="value")):e._isVueCE&&(Cy(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Me(n)))?Fd(e,it(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Pd(e,t,n,l))};function Ty(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ud(t)&&Re(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return Ud(t)&&Me(s)?!1:t in e}function Cy(e,t){const s=e._def.props;if(!s)return!1;const n=it(t);return Array.isArray(s)?s.some(a=>it(a)===n):Object.keys(s).some(a=>it(a)===n)}const Hd={};function Yp(e,t,s){let n=Xi(e,t);dr(n)&&(n=ze({},n,t));class a extends Er{constructor(l){super(n,l,s)}}return a.def=n,a}const Ey=((e,t)=>Yp(e,t,dh)),Ay=typeof HTMLElement<"u"?HTMLElement:class{};class Er extends Ay{constructor(t,s={},n=Jl){super(),this._def=t,this._props=s,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==Jl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(ze({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof Er){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,It(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const s of t)this._setAttr(s.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:l}=n;let r;if(i&&!xe(i))for(const o in i){const c=i[o];(c===Number||c&&c.type===Number)&&(o in this._props&&(this._props[o]=Ll(this._props[o])),(r||(r=Object.create(null)))[it(o)]=!0)}this._numberProps=r,this._resolveProps(n),this.shadowRoot&&this._applyStyles(l),this._mount(n)},s=this._def.__asyncLoader;s?this._pendingResolve=s().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const s=this._instance&&this._instance.exposed;if(s)for(const n in s)et(this,n)||Object.defineProperty(this,n,{get:()=>sn(s[n])})}_resolveProps(t){const{props:s}=t,n=xe(s)?s:Object.keys(s||{});for(const a of Object.keys(this))a[0]!=="_"&&n.includes(a)&&this._setProp(a,this[a]);for(const a of n.map(it))Object.defineProperty(this,a,{get(){return this._getProp(a)},set(i){this._setProp(a,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const s=this.hasAttribute(t);let n=s?this.getAttribute(t):Hd;const a=it(t);s&&this._numberProps&&this._numberProps[a]&&(n=Ll(n)),this._setProp(a,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,s,n=!0,a=!1){if(s!==this._props[t]&&(this._dirty=!0,s===Hd?delete this._props[t]:(this._props[t]=s,t==="key"&&this._app&&(this._app._ceVNode.key=s)),a&&this._instance&&this._update(),n)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),s===!0?this.setAttribute(hs(t),""):typeof s=="string"||typeof s=="number"?this.setAttribute(hs(t),s+""):s||this.removeAttribute(hs(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),ch(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const s=ft(this._def,ze(t,this._props));return this._instance||(s.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const a=(i,l)=>{this.dispatchEvent(new CustomEvent(i,dr(l[0])?ze({detail:l},l[0]):{detail:l}))};n.emit=(i,...l)=>{a(i,l),hs(i)!==i&&a(hs(i),l)},this._setParent()}),s}_applyStyles(t,s,n){if(!t)return;if(s){if(s===this._def||this._styleChildren.has(s))return;this._styleChildren.add(s)}const a=this._nonce,i=this.shadowRoot,l=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let r=null;for(let o=t.length-1;o>=0;o--){const c=document.createElement("style");a&&c.setAttribute("nonce",a),c.textContent=t[o],i.insertBefore(c,r||l),r=c,o===0&&(n||this._styleAnchors.set(this._def,c),s&&this._styleAnchors.set(s,c))}}_getStyleAnchor(t){if(!t)return null;const s=this._styleAnchors.get(t);return s&&s.parentNode===this.shadowRoot?s:(s&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let s=0;s(delete e.props.mode,e),Ny=Oy({name:"TransitionGroup",props:ze({},qp,{tag:String,moveClass:String}),setup(e,{slots:t}){const s=ss(),n=rc();let a,i;return wr(()=>{if(!a.length)return;const l=e.moveClass||`${e.name||"v"}-move`;if(!Fy(a[0].el,s.vnode.el,l)){a=[];return}a.forEach(Dy),a.forEach(My);const r=a.filter(Py);Io(s.vnode.el),r.forEach(o=>{const c=o.el,d=c.style;Js(c,l),d.transform=d.webkitTransform=d.transitionDuration="";const u=c[Wl]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",u),c[Wl]=null,Dn(c,l))};c.addEventListener("transitionend",u)}),a=[]}),()=>{const l=Je(e),r=Gp(l);let o=l.tag||Dt;if(a=[],i)for(let c=0;c{r.split(/\s+/).forEach(o=>o&&n.classList.remove(o))}),s.split(/\s+/).forEach(r=>r&&n.classList.add(r)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:l}=Kp(n);return i.removeChild(n),l}const Hn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return xe(t)?s=>Da(t,s):t};function $y(e){e.target.composing=!0}function Vd(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ls=Symbol("_assign");function jd(e,t,s){return t&&(e=e.trim()),s&&(e=pr(e)),e}const Zl={created(e,{modifiers:{lazy:t,trim:s,number:n}},a){e[Ls]=Hn(a);const i=n||a.props&&a.props.type==="number";vn(e,t?"change":"input",l=>{l.target.composing||e[Ls](jd(e.value,s,i))}),(s||i)&&vn(e,"change",()=>{e.value=jd(e.value,s,i)}),t||(vn(e,"compositionstart",$y),vn(e,"compositionend",Vd),vn(e,"change",Vd))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:a,number:i}},l){if(e[Ls]=Hn(l),e.composing)return;const r=(i||e.type==="number")&&!/^0\d/.test(e.value)?pr(e.value):e.value,o=t??"";if(r===o)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(n&&t===s||a&&e.value.trim()===o)||(e.value=o)}},kc={deep:!0,created(e,t,s){e[Ls]=Hn(s),vn(e,"change",()=>{const n=e._modelValue,a=qa(e),i=e.checked,l=e[Ls];if(xe(n)){const r=mr(n,a),o=r!==-1;if(i&&!o)l(n.concat(a));else if(!i&&o){const c=[...n];c.splice(r,1),l(c)}}else if(ca(n)){const r=new Set(n);i?r.add(a):r.delete(a),l(r)}else l(nh(e,i))})},mounted:qd,beforeUpdate(e,t,s){e[Ls]=Hn(s),qd(e,t,s)}};function qd(e,{value:t,oldValue:s},n){e._modelValue=t;let a;if(xe(t))a=mr(t,n.props.value)>-1;else if(ca(t))a=t.has(n.props.value);else{if(t===s)return;a=Sn(t,nh(e,!0))}e.checked!==a&&(e.checked=a)}const wc={created(e,{value:t},s){e.checked=Sn(t,s.props.value),e[Ls]=Hn(s),vn(e,"change",()=>{e[Ls](qa(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[Ls]=Hn(n),t!==s&&(e.checked=Sn(t,n.props.value))}},sh={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const a=ca(t);vn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?pr(qa(l)):qa(l));e[Ls](e.multiple?a?new Set(i):i:i[0]),e._assigning=!0,It(()=>{e._assigning=!1})}),e[Ls]=Hn(n)},mounted(e,{value:t}){Gd(e,t)},beforeUpdate(e,t,s){e[Ls]=Hn(s)},updated(e,{value:t}){e._assigning||Gd(e,t)}};function Gd(e,t){const s=e.multiple,n=xe(t);if(!(s&&!n&&!ca(t))){for(let a=0,i=e.options.length;aString(c)===String(r)):l.selected=mr(t,r)>-1}else l.selected=t.has(r);else if(Sn(qa(l),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function qa(e){return"_value"in e?e._value:e.value}function nh(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const ah={created(e,t,s){bl(e,t,s,null,"created")},mounted(e,t,s){bl(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){bl(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){bl(e,t,s,n,"updated")}};function ih(e,t){switch(e){case"SELECT":return sh;case"TEXTAREA":return Zl;default:switch(t){case"checkbox":return kc;case"radio":return wc;default:return Zl}}}function bl(e,t,s,n,a){const l=ih(e.tagName,s.props&&s.props.type)[a];l&&l(e,t,s,n)}function By(){Zl.getSSRProps=({value:e})=>({value:e}),wc.getSSRProps=({value:e},t)=>{if(t.props&&Sn(t.props.value,e))return{checked:!0}},kc.getSSRProps=({value:e},t)=>{if(xe(e)){if(t.props&&mr(e,t.props.value)>-1)return{checked:!0}}else if(ca(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},ah.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const s=ih(t.type.toUpperCase(),t.props&&t.props.type);if(s.getSSRProps)return s.getSSRProps(e,t)}}const Uy=["ctrl","shift","alt","meta"],Hy={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Uy.some(s=>e[`${s}Key`]&&!t.includes(s))},zy=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((a,...i)=>{for(let l=0;l{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(a=>{if(!("key"in a))return;const i=hs(a.key);if(t.some(l=>l===i||Vy[l]===i))return e(a)}))},lh=ze({patchProp:Jp},Vp);let Ti,Kd=!1;function rh(){return Ti||(Ti=xp(lh))}function oh(){return Ti=Kd?Ti:_p(lh),Kd=!0,Ti}const ch=((...e)=>{rh().render(...e)}),qy=((...e)=>{oh().hydrate(...e)}),Jl=((...e)=>{const t=rh().createApp(...e),{mount:s}=t;return t.mount=n=>{const a=fh(n);if(!a)return;const i=t._component;!Re(i)&&!i.render&&!i.template&&(i.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const l=s(a,!1,uh(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),l},t}),dh=((...e)=>{const t=oh().createApp(...e),{mount:s}=t;return t.mount=n=>{const a=fh(n);if(a)return s(a,!0,uh(a))},t});function uh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function fh(e){return Me(e)?document.querySelector(e):e}let Wd=!1;const Gy=()=>{Wd||(Wd=!0,By(),py())},Ky=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Yf,BaseTransitionPropsValidators:oc,Comment:yt,DeprecationTypes:iy,EffectScope:Qo,ErrorCodes:ov,ErrorTypeStrings:Qb,Fragment:Dt,KeepAlive:Hv,ReactiveEffect:Oi,Static:ta,Suspense:Lb,Teleport:wv,Text:Bn,TrackOpTypes:tv,Transition:cy,TransitionGroup:Ly,TriggerOpTypes:sv,VueElement:Er,assertNumber:rv,callWithAsyncErrorHandling:_s,callWithErrorHandling:ei,camelize:it,capitalize:da,cloneVNode:an,compatUtils:ay,computed:J,createApp:Jl,createBlock:Vl,createCommentVNode:Np,createElementBlock:Bb,createElementVNode:bc,createHydrationRenderer:_p,createPropsRestProxy:cb,createRenderer:xp,createSSRApp:dh,createSlots:Wv,createStaticVNode:zb,createTextVNode:yc,createVNode:ft,customRef:Mf,defineAsyncComponent:Bv,defineComponent:Xi,defineCustomElement:Yp,defineEmits:Xv,defineExpose:eb,defineModel:nb,defineOptions:tb,defineProps:Qv,defineSSRCustomElement:Ey,defineSlots:sb,devtools:Xb,effect:Sg,effectScope:_g,getCurrentInstance:ss,getCurrentScope:vf,getCurrentWatcher:nv,getTransitionRawChildren:_r,guardReactiveProps:Op,h:Va,handleError:ua,hasInjectionContext:gv,hydrate:qy,hydrateOnIdle:Lv,hydrateOnInteraction:Fv,hydrateOnMediaQuery:Pv,hydrateOnVisible:Mv,initCustomFormatter:Zb,initDirectivesForSSR:Gy,inject:Ns,isMemoSame:Up,isProxy:Yi,isReactive:_n,isReadonly:nn,isRef:St,isRuntimeOnly:Gb,isShallow:gs,isVNode:An,markRaw:Lf,mergeDefaults:rb,mergeModels:ob,mergeProps:Lp,nextTick:It,nodeOps:Vp,normalizeClass:Ji,normalizeProps:og,normalizeStyle:Zi,onActivated:Ms,onBeforeMount:ep,onBeforeUnmount:Sr,onBeforeUpdate:dc,onDeactivated:Ps,onErrorCaptured:ap,onMounted:We,onRenderTracked:np,onRenderTriggered:sp,onScopeDispose:kg,onServerPrefetch:tp,onUnmounted:xt,onUpdated:wr,onWatcherCleanup:Ff,openBlock:Bi,patchProp:Jp,popScopeId:pv,provide:ki,proxyRefs:ac,pushScopeId:fv,queuePostFlushCb:Di,reactive:zn,readonly:Ml,ref:h,registerRuntimeCompiler:Fp,render:ch,renderList:Kv,renderSlot:Zv,resolveComponent:jv,resolveDirective:Gv,resolveDynamicComponent:qv,resolveFilter:ny,resolveTransitionHooks:za,setBlockTracking:Ui,setDevtoolsHook:ey,setTransitionHooks:En,shallowReactive:sc,shallowReadonly:Vg,shallowRef:nc,ssrContextKey:Vf,ssrUtils:sy,stop:Tg,toDisplayString:mf,toHandlerKey:La,toHandlers:Jv,toRaw:Je,toRef:Qg,toRefs:Zg,toValue:Gg,transformVNodeArgs:Ub,triggerRef:qg,unref:sn,useAttrs:lb,useCssModule:Iy,useCssVars:hy,useHost:Qp,useId:Tv,useModel:bb,useSSRContext:jf,useShadowRoot:Ry,useSlots:ib,useTemplateRef:Cv,useTransitionState:rc,vModelCheckbox:kc,vModelDynamic:ah,vModelRadio:wc,vModelSelect:sh,vModelText:Zl,vShow:Wp,version:Hp,warn:Yb,watch:ts,watchEffect:vv,watchPostEffect:bv,watchSyncEffect:qf,withAsyncContext:db,withCtx:lc,withDefaults:ab,withDirectives:mv,withKeys:jy,withMemo:Jb,withModifiers:zy,withScopeId:hv},Symbol.toStringTag,{value:"Module"}));/** +**/let Ro;const Cd=typeof window<"u"&&window.trustedTypes;if(Cd)try{Ro=Cd.createPolicy("vue",{createHTML:e=>e})}catch{}const zp=Ro?e=>Ro.createHTML(e):e=>e,ly="http://www.w3.org/2000/svg",ry="http://www.w3.org/1998/Math/MathML",dn=typeof document<"u"?document:null,Ed=dn&&dn.createElement("template"),Vp={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const a=t==="svg"?dn.createElementNS(ly,e):t==="mathml"?dn.createElementNS(ry,e):s?dn.createElement(e,{is:s}):dn.createElement(e);return e==="select"&&n&&n.multiple!=null&&a.setAttribute("multiple",n.multiple),a},createText:e=>dn.createTextNode(e),createComment:e=>dn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>dn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,a,i){const l=s?s.previousSibling:t.lastChild;if(a&&(a===i||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),s),!(a===i||!(a=a.nextSibling)););else{Ed.innerHTML=zp(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const r=Ed.content;if(n==="svg"||n==="mathml"){const o=r.firstChild;for(;o.firstChild;)r.appendChild(o.firstChild);r.removeChild(o)}t.insertBefore(r,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Rn="transition",ci="animation",qa=Symbol("_vtc"),jp={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},qp=ze({},oc,jp),oy=e=>(e.displayName="Transition",e.props=qp,e),cy=oy((e,{slots:t})=>ja(Yf,Gp(e),t)),Gn=(e,t=[])=>{be(e)?e.forEach(s=>s(...t)):e&&e(...t)},Ad=e=>e?be(e)?e.some(t=>t.length>1):e.length>1:!1;function Gp(e){const t={};for(const P in e)P in jp||(t[P]=e[P]);if(e.css===!1)return t;const{name:s="v",type:n,duration:a,enterFromClass:i=`${s}-enter-from`,enterActiveClass:l=`${s}-enter-active`,enterToClass:r=`${s}-enter-to`,appearFromClass:o=i,appearActiveClass:c=l,appearToClass:d=r,leaveFromClass:u=`${s}-leave-from`,leaveActiveClass:f=`${s}-leave-active`,leaveToClass:p=`${s}-leave-to`}=e,b=dy(a),y=b&&b[0],E=b&&b[1],{onBeforeEnter:I,onEnter:x,onEnterCancelled:m,onLeave:_,onLeaveCancelled:S,onBeforeAppear:g=I,onAppear:w=x,onAppearCancelled:T=m}=t,C=(P,R,j,Q)=>{P._enterCancelled=Q,Ln(P,R?d:r),Ln(P,R?c:l),j&&j()},M=(P,R)=>{P._isLeaving=!1,Ln(P,u),Ln(P,p),Ln(P,f),R&&R()},H=P=>(R,j)=>{const Q=P?w:x,U=()=>C(R,P,j);Gn(Q,[R,U]),Rd(()=>{Ln(R,P?o:i),Ws(R,P?d:r),Ad(Q)||Id(R,n,y,U)})};return ze(t,{onBeforeEnter(P){Gn(I,[P]),Ws(P,i),Ws(P,l)},onBeforeAppear(P){Gn(g,[P]),Ws(P,o),Ws(P,c)},onEnter:H(!1),onAppear:H(!0),onLeave(P,R){P._isLeaving=!0;const j=()=>M(P,R);Ws(P,u),P._enterCancelled?(Ws(P,f),Io(P)):(Io(P),Ws(P,f)),Rd(()=>{P._isLeaving&&(Ln(P,u),Ws(P,p),Ad(_)||Id(P,n,E,j))}),Gn(_,[P,j])},onEnterCancelled(P){C(P,!1,void 0,!0),Gn(m,[P])},onAppearCancelled(P){C(P,!0,void 0,!0),Gn(T,[P])},onLeaveCancelled(P){M(P),Gn(S,[P])}})}function dy(e){if(e==null)return null;if(Xe(e))return[Wr(e.enter),Wr(e.leave)];{const t=Wr(e);return[t,t]}}function Wr(e){return Ll(e)}function Ws(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[qa]||(e[qa]=new Set)).add(t)}function Ln(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[qa];s&&(s.delete(t),s.size||(e[qa]=void 0))}function Rd(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let uy=0;function Id(e,t,s,n){const a=e._endId=++uy,i=()=>{a===e._endId&&n()};if(s!=null)return setTimeout(i,s);const{type:l,timeout:r,propCount:o}=Kp(e,t);if(!l)return n();const c=l+"end";let d=0;const u=()=>{e.removeEventListener(c,f),i()},f=p=>{p.target===e&&++d>=o&&u()};setTimeout(()=>{d(s[b]||"").split(", "),a=n(`${Rn}Delay`),i=n(`${Rn}Duration`),l=Od(a,i),r=n(`${ci}Delay`),o=n(`${ci}Duration`),c=Od(r,o);let d=null,u=0,f=0;t===Rn?l>0&&(d=Rn,u=l,f=i.length):t===ci?c>0&&(d=ci,u=c,f=o.length):(u=Math.max(l,c),d=u>0?l>c?Rn:ci:null,f=d?d===Rn?i.length:o.length:0);const p=d===Rn&&/\b(?:transform|all)(?:,|$)/.test(n(`${Rn}Property`).toString());return{type:d,timeout:u,propCount:f,hasTransform:p}}function Od(e,t){for(;e.lengthNd(s)+Nd(e[n])))}function Nd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Io(e){return(e?e.ownerDocument:document).body.offsetHeight}function fy(e,t,s){const n=e[qa];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Gl=Symbol("_vod"),_c=Symbol("_vsh"),Wp={name:"show",beforeMount(e,{value:t},{transition:s}){e[Gl]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):di(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),di(e,!0),n.enter(e)):n.leave(e,()=>{di(e,!1)}):di(e,t))},beforeUnmount(e,{value:t}){di(e,t)}};function di(e,t){e.style.display=t?e[Gl]:"none",e[_c]=!t}function py(){Wp.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Zp=Symbol("");function hy(e){const t=as();if(!t)return;const s=t.ut=(a=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Kl(i,a))},n=()=>{const a=e(t.proxy);t.ce?Kl(t.ce,a):Oo(t.subTree,a),s(a)};dc(()=>{Mi(n)}),We(()=>{ns(n,Ht,{flush:"post"});const a=new MutationObserver(n);a.observe(t.subTree.el.parentNode,{childList:!0}),xt(()=>a.disconnect())})}function Oo(e,t){if(e.shapeFlag&128){const s=e.suspense;e=s.activeBranch,s.pendingBranch&&!s.isHydrating&&s.effects.push(()=>{Oo(s.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Kl(e.el,t);else if(e.type===Dt)e.children.forEach(s=>Oo(s,t));else if(e.type===sa){let{el:s,anchor:n}=e;for(;s&&(Kl(s,t),s!==n);)s=s.nextSibling}}function Kl(e,t){if(e.nodeType===1){const s=e.style;let n="";for(const a in t){const i=xg(t[a]);s.setProperty(`--${a}`,i),n+=`--${a}: ${i};`}s[Zp]=n}}const my=/(?:^|;)\s*display\s*:/;function gy(e,t,s){const n=e.style,a=Me(s);let i=!1;if(s&&!a){if(t)if(Me(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();s[r]==null&&yi(n,r,"")}else for(const l in t)s[l]==null&&yi(n,l,"");for(const l in s){l==="display"&&(i=!0);const r=s[l];r!=null?by(e,l,!Me(t)&&t?t[l]:void 0,r)||yi(n,l,r):yi(n,l,"")}}else if(a){if(t!==s){const l=n[Zp];l&&(s+=";"+l),n.cssText=s,i=my.test(s)}}else t&&e.removeAttribute("style");Gl in e&&(e[Gl]=i?n.display:"",e[_c]&&(n.display="none"))}const Ld=/\s*!important$/;function yi(e,t,s){if(be(s))s.forEach(n=>yi(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=vy(e,t);Ld.test(s)?e.setProperty(ps(n),s.replace(Ld,""),"important"):e[n]=s}}const Dd=["Webkit","Moz","ms"],Zr={};function vy(e,t){const s=Zr[t];if(s)return s;let n=it(t);if(n!=="filter"&&n in e)return Zr[t]=n;n=ua(n);for(let a=0;aJr||(ky.then(()=>Jr=0),Jr=Date.now());function Sy(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const a=s.value;if(be(a)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const l=a.slice(),r=[n];for(let o=0;oe.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Jp=(e,t,s,n,a,i)=>{const l=a==="svg";t==="class"?fy(e,n,l):t==="style"?gy(e,s,n):ca(t)?cr(t)||xy(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ty(e,t,n,l))?(Fd(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Pd(e,t,n,l,i,t!=="value")):e._isVueCE&&(Cy(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Me(n)))?Fd(e,it(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Pd(e,t,n,l))};function Ty(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ud(t)&&Ie(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return Ud(t)&&Me(s)?!1:t in e}function Cy(e,t){const s=e._def.props;if(!s)return!1;const n=it(t);return Array.isArray(s)?s.some(a=>it(a)===n):Object.keys(s).some(a=>it(a)===n)}const Hd={};function Yp(e,t,s){let n=el(e,t);dr(n)&&(n=ze({},n,t));class a extends Er{constructor(l){super(n,l,s)}}return a.def=n,a}const Ey=((e,t)=>Yp(e,t,dh)),Ay=typeof HTMLElement<"u"?HTMLElement:class{};class Er extends Ay{constructor(t,s={},n=Jl){super(),this._def=t,this._props=s,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==Jl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(ze({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof Er){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,Rt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const s of t)this._setAttr(s.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:l}=n;let r;if(i&&!be(i))for(const o in i){const c=i[o];(c===Number||c&&c.type===Number)&&(o in this._props&&(this._props[o]=Ll(this._props[o])),(r||(r=Object.create(null)))[it(o)]=!0)}this._numberProps=r,this._resolveProps(n),this.shadowRoot&&this._applyStyles(l),this._mount(n)},s=this._def.__asyncLoader;s?this._pendingResolve=s().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const s=this._instance&&this._instance.exposed;if(s)for(const n in s)tt(this,n)||Object.defineProperty(this,n,{get:()=>en(s[n])})}_resolveProps(t){const{props:s}=t,n=be(s)?s:Object.keys(s||{});for(const a of Object.keys(this))a[0]!=="_"&&n.includes(a)&&this._setProp(a,this[a]);for(const a of n.map(it))Object.defineProperty(this,a,{get(){return this._getProp(a)},set(i){this._setProp(a,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const s=this.hasAttribute(t);let n=s?this.getAttribute(t):Hd;const a=it(t);s&&this._numberProps&&this._numberProps[a]&&(n=Ll(n)),this._setProp(a,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,s,n=!0,a=!1){if(s!==this._props[t]&&(this._dirty=!0,s===Hd?delete this._props[t]:(this._props[t]=s,t==="key"&&this._app&&(this._app._ceVNode.key=s)),a&&this._instance&&this._update(),n)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),s===!0?this.setAttribute(ps(t),""):typeof s=="string"||typeof s=="number"?this.setAttribute(ps(t),s+""):s||this.removeAttribute(ps(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),ch(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const s=ft(this._def,ze(t,this._props));return this._instance||(s.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const a=(i,l)=>{this.dispatchEvent(new CustomEvent(i,dr(l[0])?ze({detail:l},l[0]):{detail:l}))};n.emit=(i,...l)=>{a(i,l),ps(i)!==i&&a(ps(i),l)},this._setParent()}),s}_applyStyles(t,s,n){if(!t)return;if(s){if(s===this._def||this._styleChildren.has(s))return;this._styleChildren.add(s)}const a=this._nonce,i=this.shadowRoot,l=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let r=null;for(let o=t.length-1;o>=0;o--){const c=document.createElement("style");a&&c.setAttribute("nonce",a),c.textContent=t[o],i.insertBefore(c,r||l),r=c,o===0&&(n||this._styleAnchors.set(this._def,c),s&&this._styleAnchors.set(s,c))}}_getStyleAnchor(t){if(!t)return null;const s=this._styleAnchors.get(t);return s&&s.parentNode===this.shadowRoot?s:(s&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let s=0;s(delete e.props.mode,e),Ny=Oy({name:"TransitionGroup",props:ze({},qp,{tag:String,moveClass:String}),setup(e,{slots:t}){const s=as(),n=rc();let a,i;return wr(()=>{if(!a.length)return;const l=e.moveClass||`${e.name||"v"}-move`;if(!Fy(a[0].el,s.vnode.el,l)){a=[];return}a.forEach(Dy),a.forEach(My);const r=a.filter(Py);Io(s.vnode.el),r.forEach(o=>{const c=o.el,d=c.style;Ws(c,l),d.transform=d.webkitTransform=d.transitionDuration="";const u=c[Wl]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",u),c[Wl]=null,Ln(c,l))};c.addEventListener("transitionend",u)}),a=[]}),()=>{const l=Je(e),r=Gp(l);let o=l.tag||Dt;if(a=[],i)for(let c=0;c{r.split(/\s+/).forEach(o=>o&&n.classList.remove(o))}),s.split(/\s+/).forEach(r=>r&&n.classList.add(r)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:l}=Kp(n);return i.removeChild(n),l}const Un=e=>{const t=e.props["onUpdate:modelValue"]||!1;return be(t)?s=>Ma(t,s):t};function $y(e){e.target.composing=!0}function Vd(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ns=Symbol("_assign");function jd(e,t,s){return t&&(e=e.trim()),s&&(e=pr(e)),e}const Zl={created(e,{modifiers:{lazy:t,trim:s,number:n}},a){e[Ns]=Un(a);const i=n||a.props&&a.props.type==="number";mn(e,t?"change":"input",l=>{l.target.composing||e[Ns](jd(e.value,s,i))}),(s||i)&&mn(e,"change",()=>{e.value=jd(e.value,s,i)}),t||(mn(e,"compositionstart",$y),mn(e,"compositionend",Vd),mn(e,"change",Vd))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:a,number:i}},l){if(e[Ns]=Un(l),e.composing)return;const r=(i||e.type==="number")&&!/^0\d/.test(e.value)?pr(e.value):e.value,o=t??"";if(r===o)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(n&&t===s||a&&e.value.trim()===o)||(e.value=o)}},kc={deep:!0,created(e,t,s){e[Ns]=Un(s),mn(e,"change",()=>{const n=e._modelValue,a=Ga(e),i=e.checked,l=e[Ns];if(be(n)){const r=mr(n,a),o=r!==-1;if(i&&!o)l(n.concat(a));else if(!i&&o){const c=[...n];c.splice(r,1),l(c)}}else if(da(n)){const r=new Set(n);i?r.add(a):r.delete(a),l(r)}else l(nh(e,i))})},mounted:qd,beforeUpdate(e,t,s){e[Ns]=Un(s),qd(e,t,s)}};function qd(e,{value:t,oldValue:s},n){e._modelValue=t;let a;if(be(t))a=mr(t,n.props.value)>-1;else if(da(t))a=t.has(n.props.value);else{if(t===s)return;a=kn(t,nh(e,!0))}e.checked!==a&&(e.checked=a)}const wc={created(e,{value:t},s){e.checked=kn(t,s.props.value),e[Ns]=Un(s),mn(e,"change",()=>{e[Ns](Ga(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[Ns]=Un(n),t!==s&&(e.checked=kn(t,n.props.value))}},sh={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const a=da(t);mn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?pr(Ga(l)):Ga(l));e[Ns](e.multiple?a?new Set(i):i:i[0]),e._assigning=!0,Rt(()=>{e._assigning=!1})}),e[Ns]=Un(n)},mounted(e,{value:t}){Gd(e,t)},beforeUpdate(e,t,s){e[Ns]=Un(s)},updated(e,{value:t}){e._assigning||Gd(e,t)}};function Gd(e,t){const s=e.multiple,n=be(t);if(!(s&&!n&&!da(t))){for(let a=0,i=e.options.length;aString(c)===String(r)):l.selected=mr(t,r)>-1}else l.selected=t.has(r);else if(kn(Ga(l),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ga(e){return"_value"in e?e._value:e.value}function nh(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const ah={created(e,t,s){bl(e,t,s,null,"created")},mounted(e,t,s){bl(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){bl(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){bl(e,t,s,n,"updated")}};function ih(e,t){switch(e){case"SELECT":return sh;case"TEXTAREA":return Zl;default:switch(t){case"checkbox":return kc;case"radio":return wc;default:return Zl}}}function bl(e,t,s,n,a){const l=ih(e.tagName,s.props&&s.props.type)[a];l&&l(e,t,s,n)}function By(){Zl.getSSRProps=({value:e})=>({value:e}),wc.getSSRProps=({value:e},t)=>{if(t.props&&kn(t.props.value,e))return{checked:!0}},kc.getSSRProps=({value:e},t)=>{if(be(e)){if(t.props&&mr(e,t.props.value)>-1)return{checked:!0}}else if(da(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},ah.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const s=ih(t.type.toUpperCase(),t.props&&t.props.type);if(s.getSSRProps)return s.getSSRProps(e,t)}}const Uy=["ctrl","shift","alt","meta"],Hy={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Uy.some(s=>e[`${s}Key`]&&!t.includes(s))},zy=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((a,...i)=>{for(let l=0;l{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(a=>{if(!("key"in a))return;const i=ps(a.key);if(t.some(l=>l===i||Vy[l]===i))return e(a)}))},lh=ze({patchProp:Jp},Vp);let Ci,Kd=!1;function rh(){return Ci||(Ci=xp(lh))}function oh(){return Ci=Kd?Ci:_p(lh),Kd=!0,Ci}const ch=((...e)=>{rh().render(...e)}),qy=((...e)=>{oh().hydrate(...e)}),Jl=((...e)=>{const t=rh().createApp(...e),{mount:s}=t;return t.mount=n=>{const a=fh(n);if(!a)return;const i=t._component;!Ie(i)&&!i.render&&!i.template&&(i.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const l=s(a,!1,uh(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),l},t}),dh=((...e)=>{const t=oh().createApp(...e),{mount:s}=t;return t.mount=n=>{const a=fh(n);if(a)return s(a,!0,uh(a))},t});function uh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function fh(e){return Me(e)?document.querySelector(e):e}let Wd=!1;const Gy=()=>{Wd||(Wd=!0,By(),py())},Ky=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Yf,BaseTransitionPropsValidators:oc,Comment:yt,DeprecationTypes:iy,EffectScope:Qo,ErrorCodes:ov,ErrorTypeStrings:Qb,Fragment:Dt,KeepAlive:Hv,ReactiveEffect:Ni,Static:sa,Suspense:Lb,Teleport:wv,Text:$n,TrackOpTypes:tv,Transition:cy,TransitionGroup:Ly,TriggerOpTypes:sv,VueElement:Er,assertNumber:rv,callWithAsyncErrorHandling:xs,callWithErrorHandling:ti,camelize:it,capitalize:ua,cloneVNode:sn,compatUtils:ay,computed:J,createApp:Jl,createBlock:Vl,createCommentVNode:Np,createElementBlock:Bb,createElementVNode:bc,createHydrationRenderer:_p,createPropsRestProxy:cb,createRenderer:xp,createSSRApp:dh,createSlots:Wv,createStaticVNode:zb,createTextVNode:yc,createVNode:ft,customRef:Mf,defineAsyncComponent:Bv,defineComponent:el,defineCustomElement:Yp,defineEmits:Xv,defineExpose:eb,defineModel:nb,defineOptions:tb,defineProps:Qv,defineSSRCustomElement:Ey,defineSlots:sb,devtools:Xb,effect:Sg,effectScope:_g,getCurrentInstance:as,getCurrentScope:vf,getCurrentWatcher:nv,getTransitionRawChildren:_r,guardReactiveProps:Op,h:ja,handleError:fa,hasInjectionContext:gv,hydrate:qy,hydrateOnIdle:Lv,hydrateOnInteraction:Fv,hydrateOnMediaQuery:Pv,hydrateOnVisible:Mv,initCustomFormatter:Zb,initDirectivesForSSR:Gy,inject:Os,isMemoSame:Up,isProxy:Qi,isReactive:yn,isReadonly:tn,isRef:St,isRuntimeOnly:Gb,isShallow:ms,isVNode:Cn,markRaw:Lf,mergeDefaults:rb,mergeModels:ob,mergeProps:Lp,nextTick:Rt,nodeOps:Vp,normalizeClass:Yi,normalizeProps:og,normalizeStyle:Ji,onActivated:Ds,onBeforeMount:ep,onBeforeUnmount:Sr,onBeforeUpdate:dc,onDeactivated:Ms,onErrorCaptured:ap,onMounted:We,onRenderTracked:np,onRenderTriggered:sp,onScopeDispose:kg,onServerPrefetch:tp,onUnmounted:xt,onUpdated:wr,onWatcherCleanup:Ff,openBlock:Ui,patchProp:Jp,popScopeId:pv,provide:wi,proxyRefs:ac,pushScopeId:fv,queuePostFlushCb:Mi,reactive:Hn,readonly:Ml,ref:h,registerRuntimeCompiler:Fp,render:ch,renderList:Kv,renderSlot:Zv,resolveComponent:jv,resolveDirective:Gv,resolveDynamicComponent:qv,resolveFilter:ny,resolveTransitionHooks:Va,setBlockTracking:Hi,setDevtoolsHook:ey,setTransitionHooks:Tn,shallowReactive:sc,shallowReadonly:Vg,shallowRef:nc,ssrContextKey:Vf,ssrUtils:sy,stop:Tg,toDisplayString:mf,toHandlerKey:Da,toHandlers:Jv,toRaw:Je,toRef:Qg,toRefs:Zg,toValue:Gg,transformVNodeArgs:Ub,triggerRef:qg,unref:en,useAttrs:lb,useCssModule:Iy,useCssVars:hy,useHost:Qp,useId:Tv,useModel:bb,useSSRContext:jf,useShadowRoot:Ry,useSlots:ib,useTemplateRef:Cv,useTransitionState:rc,vModelCheckbox:kc,vModelDynamic:ah,vModelRadio:wc,vModelSelect:sh,vModelText:Zl,vShow:Wp,version:Hp,warn:Yb,watch:ns,watchEffect:vv,watchPostEffect:bv,watchSyncEffect:qf,withAsyncContext:db,withCtx:lc,withDefaults:ab,withDirectives:mv,withKeys:jy,withMemo:Jb,withModifiers:zy,withScopeId:hv},Symbol.toStringTag,{value:"Module"}));/** * @vue/compiler-core v3.5.38 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const zi=Symbol(""),Ci=Symbol(""),Sc=Symbol(""),Yl=Symbol(""),ph=Symbol(""),la=Symbol(""),hh=Symbol(""),mh=Symbol(""),Tc=Symbol(""),Cc=Symbol(""),sl=Symbol(""),Ec=Symbol(""),gh=Symbol(""),Ac=Symbol(""),Rc=Symbol(""),Ic=Symbol(""),Oc=Symbol(""),Nc=Symbol(""),Lc=Symbol(""),vh=Symbol(""),bh=Symbol(""),Ar=Symbol(""),Ql=Symbol(""),Dc=Symbol(""),Mc=Symbol(""),Vi=Symbol(""),nl=Symbol(""),Pc=Symbol(""),No=Symbol(""),Wy=Symbol(""),Lo=Symbol(""),Xl=Symbol(""),Zy=Symbol(""),Jy=Symbol(""),Fc=Symbol(""),Yy=Symbol(""),Qy=Symbol(""),$c=Symbol(""),yh=Symbol(""),Ga={[zi]:"Fragment",[Ci]:"Teleport",[Sc]:"Suspense",[Yl]:"KeepAlive",[ph]:"BaseTransition",[la]:"openBlock",[hh]:"createBlock",[mh]:"createElementBlock",[Tc]:"createVNode",[Cc]:"createElementVNode",[sl]:"createCommentVNode",[Ec]:"createTextVNode",[gh]:"createStaticVNode",[Ac]:"resolveComponent",[Rc]:"resolveDynamicComponent",[Ic]:"resolveDirective",[Oc]:"resolveFilter",[Nc]:"withDirectives",[Lc]:"renderList",[vh]:"renderSlot",[bh]:"createSlots",[Ar]:"toDisplayString",[Ql]:"mergeProps",[Dc]:"normalizeClass",[Mc]:"normalizeStyle",[Vi]:"normalizeProps",[nl]:"guardReactiveProps",[Pc]:"toHandlers",[No]:"camelize",[Wy]:"capitalize",[Lo]:"toHandlerKey",[Xl]:"setBlockTracking",[Zy]:"pushScopeId",[Jy]:"popScopeId",[Fc]:"withCtx",[Yy]:"unref",[Qy]:"isRef",[$c]:"withMemo",[yh]:"isMemoSame"};function Xy(e){Object.getOwnPropertySymbols(e).forEach(t=>{Ga[t]=e[t]})}const Ss={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function ex(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Ss}}function ji(e,t,s,n,a,i,l,r=!1,o=!1,c=!1,d=Ss){return e&&(r?(e.helper(la),e.helper(Za(e.inSSR,c))):e.helper(Wa(e.inSSR,c)),l&&e.helper(Nc)),{type:13,tag:t,props:s,children:n,patchFlag:a,dynamicProps:i,directives:l,isBlock:r,disableTracking:o,isComponent:c,loc:d}}function sa(e,t=Ss){return{type:17,loc:t,elements:e}}function Os(e,t=Ss){return{type:15,loc:t,properties:e}}function wt(e,t){return{type:16,loc:Ss,key:Me(e)?Fe(e,!0):e,value:t}}function Fe(e,t=!1,s=Ss,n=0){return{type:4,loc:s,content:e,isStatic:t,constType:t?3:n}}function Vs(e,t=Ss){return{type:8,loc:t,children:e}}function Ot(e,t=[],s=Ss){return{type:14,loc:s,callee:e,arguments:t}}function Ka(e,t=void 0,s=!1,n=!1,a=Ss){return{type:18,params:e,returns:t,newline:s,isSlot:n,loc:a}}function Do(e,t,s,n=!0){return{type:19,test:e,consequent:t,alternate:s,newline:n,loc:Ss}}function tx(e,t,s=!1,n=!1){return{type:20,index:e,value:t,needPauseTracking:s,inVOnce:n,needArraySpread:!1,loc:Ss}}function sx(e){return{type:21,body:e,loc:Ss}}function Wa(e,t){return e||t?Tc:Cc}function Za(e,t){return e||t?hh:mh}function Bc(e,{helper:t,removeHelper:s,inSSR:n}){e.isBlock||(e.isBlock=!0,s(Wa(n,e.isComponent)),t(la),t(Za(n,e.isComponent)))}const Zd=new Uint8Array([123,123]),Jd=new Uint8Array([125,125]);function Yd(e){return e>=97&&e<=122||e>=65&&e<=90}function ys(e){return e===32||e===10||e===9||e===12||e===13}function On(e){return e===47||e===62||ys(e)}function er(e){const t=new Uint8Array(e.length);for(let s=0;s100){let l=-1,r=a;for(;l+1>>1;this.newlines[o]=0;l--)if(t>this.newlines[l]){i=l;break}return i>=0&&(s=i+2,n=t-this.newlines[i]),{column:n,line:s,offset:t}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(t){t===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t))}stateInterpolationOpen(t){if(t===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const s=this.index+1-this.delimiterOpen.length;s>this.sectionStart&&this.cbs.ontext(this.sectionStart,s),this.state=3,this.sectionStart=s}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(t)):(this.state=1,this.stateText(t))}stateInterpolation(t){t===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(t))}stateInterpolationClose(t){t===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(t))}stateSpecialStartSequence(t){const s=this.sequenceIndex===this.currentSequence.length;if(!(s?On(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!s){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(t)}stateInRCDATA(t){if(this.sequenceIndex===this.currentSequence.length){if(t===62||ys(t)){const s=this.index-this.currentSequence.length;if(this.sectionStart=t||(this.state===28?this.currentSequence===zt.CdataEnd?this.cbs.oncdata(this.sectionStart,t):this.cbs.oncomment(this.sectionStart,t):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,s){}}function Qd(e,{compatConfig:t}){const s=t&&t[e];return e==="MODE"?s||3:s}function na(e,t){const s=Qd("MODE",t),n=Qd(e,t);return s===3?n===!0:n!==!1}function qi(e,t,s,...n){return na(e,t)}function Uc(e){throw e}function xh(e){}function ut(e,t,s,n){const a=`https://vuejs.org/error-reference/#compiler-${e}`,i=new SyntaxError(String(a));return i.code=e,i.loc=t,i}const ms=e=>e.type===4&&e.isStatic;function _h(e){switch(e){case"Teleport":case"teleport":return Ci;case"Suspense":case"suspense":return Sc;case"KeepAlive":case"keep-alive":return Yl;case"BaseTransition":case"base-transition":return ph}}const ax=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Hc=e=>!ax.test(e),kh=/[A-Za-z_$\xA0-\uFFFF]/,ix=/[\.\?\w$\xA0-\uFFFF]/,lx=/\s+[.[]\s*|\s*[.[]\s+/g,wh=e=>e.type===4?e.content:e.loc.source,rx=e=>{const t=wh(e).trim().replace(lx,r=>r.trim());let s=0,n=[],a=0,i=0,l=null;for(let r=0;r|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,cx=e=>ox.test(wh(e)),dx=cx;function Is(e,t,s=!1){for(let n=0;nt.type===7&&t.name==="bind"&&(!t.arg||t.arg.type!==4||!t.arg.isStatic))}function Yr(e){return e.type===5||e.type===2}function Xd(e){return e.type===7&&e.name==="pre"}function fx(e){return e.type===7&&e.name==="slot"}function tr(e){return e.type===1&&e.tagType===3}function sr(e){return e.type===1&&e.tagType===2}const px=new Set([Vi,nl]);function Th(e,t=[]){if(e&&!Me(e)&&e.type===14){const s=e.callee;if(!Me(s)&&px.has(s))return Th(e.arguments[0],t.concat(e))}return[e,t]}function nr(e,t,s){let n,a=e.type===13?e.props:e.arguments[2],i=[],l;if(a&&!Me(a)&&a.type===14){const r=Th(a);a=r[0],i=r[1],l=i[i.length-1]}if(a==null||Me(a))n=Os([t]);else if(a.type===14){const r=a.arguments[0];!Me(r)&&r.type===15?eu(t,r)||r.properties.unshift(t):a.callee===Pc?n=Ot(s.helper(Ql),[Os([t]),a]):a.arguments.unshift(Os([t])),!n&&(n=a)}else a.type===15?(eu(t,a)||a.properties.unshift(t),n=a):(n=Ot(s.helper(Ql),[Os([t]),a]),l&&l.callee===nl&&(l=i[i.length-2]));e.type===13?l?l.arguments[0]=n:e.props=n:l?l.arguments[0]=n:e.arguments[2]=n}function eu(e,t){let s=!1;if(e.key.type===4){const n=e.key.content;s=t.properties.some(a=>a.key.type===4&&a.key.content===n)}return s}function Gi(e,t){return`_${t}_${e.replace(/[^\w]/g,(s,n)=>s==="-"?"_":e.charCodeAt(n).toString())}`}function hx(e){return e.type===14&&e.callee===$c?e.arguments[1].returns:e}const mx=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function Ch(e){for(let t=0;t0,isVoidTag:Ra,isPreTag:Ra,isIgnoreNewlineTag:Ra,isCustomElement:Ra,onError:Uc,onWarn:xh,comments:!1,prefixIdentifiers:!1};let Ye=Ah,Ki=null,wn="",jt=null,Ge=null,ds="",un=-1,Kn=-1,Vc=0,Fn=!1,Mo=null;const dt=[],gt=new nx(dt,{onerr:on,ontext(e,t){yl(Ft(e,t),e,t)},ontextentity(e,t,s){yl(e,t,s)},oninterpolation(e,t){if(Fn)return yl(Ft(e,t),e,t);let s=e+gt.delimiterOpen.length,n=t-gt.delimiterClose.length;for(;ys(wn.charCodeAt(s));)s++;for(;ys(wn.charCodeAt(n-1));)n--;let a=Ft(s,n);a.includes("&")&&(a=Ye.decodeEntities(a,!1)),Po({type:5,content:Rl(a,!1,bt(s,n)),loc:bt(e,t)})},onopentagname(e,t){const s=Ft(e,t);jt={type:1,tag:s,ns:Ye.getNamespace(s,dt[0],Ye.ns),tagType:0,props:[],children:[],loc:bt(e-1,t),codegenNode:void 0}},onopentagend(e){su(e)},onclosetag(e,t){const s=Ft(e,t);if(!Ye.isVoidTag(s)){let n=!1;for(let a=0;a0&&on(24,dt[0].loc.start.offset);for(let l=0;l<=a;l++){const r=dt.shift();Al(r,t,l(n.type===7?n.rawName:n.name)===s)&&on(2,t)},onattribend(e,t){if(jt&&Ge){if(Yn(Ge.loc,t),e!==0)if(ds.includes("&")&&(ds=Ye.decodeEntities(ds,!0)),Ge.type===6)Ge.name==="class"&&(ds=Oh(ds).trim()),e===1&&!ds&&on(13,t),Ge.value={type:2,content:ds,loc:e===1?bt(un,Kn):bt(un-1,Kn+1)},gt.inSFCRoot&&jt.tag==="template"&&Ge.name==="lang"&&ds&&ds!=="html"&>.enterRCDATA(er("a.content==="sync"))>-1&&qi("COMPILER_V_BIND_SYNC",Ye,Ge.loc,Ge.arg.loc.source)&&(Ge.name="model",Ge.modifiers.splice(n,1))}(Ge.type!==7||Ge.name!=="pre")&&jt.props.push(Ge)}ds="",un=Kn=-1},oncomment(e,t){Ye.comments&&Po({type:3,content:Ft(e,t),loc:bt(e-4,t+3)})},onend(){const e=wn.length;for(let t=0;t{const b=t.start.offset+f,y=b+u.length;return Rl(u,!1,bt(b,y),0,p?1:0)},r={source:l(i.trim(),s.indexOf(i,a.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let o=a.trim().replace(gx,"").trim();const c=a.indexOf(o),d=o.match(tu);if(d){o=o.replace(tu,"").trim();const u=d[1].trim();let f;if(u&&(f=s.indexOf(u,c+o.length),r.key=l(u,f,!0)),d[2]){const p=d[2].trim();p&&(r.index=l(p,s.indexOf(p,r.key?f+u.length:c+o.length),!0))}}return o&&(r.value=l(o,c,!0)),r}function Ft(e,t){return wn.slice(e,t)}function su(e){gt.inSFCRoot&&(jt.innerLoc=bt(e+1,e+1)),Po(jt);const{tag:t,ns:s}=jt;s===0&&Ye.isPreTag(t)&&Vc++,Ye.isVoidTag(t)?Al(jt,e):(dt.unshift(jt),(s===1||s===2)&&(gt.inXML=!0)),jt=null}function yl(e,t,s){{const i=dt[0]&&dt[0].tag;i!=="script"&&i!=="style"&&e.includes("&")&&(e=Ye.decodeEntities(e,!1))}const n=dt[0]||Ki,a=n.children[n.children.length-1];a&&a.type===2?(a.content+=e,Yn(a.loc,s)):n.children.push({type:2,content:e,loc:bt(t,s)})}function Al(e,t,s=!1){s?Yn(e.loc,Rh(t,60)):Yn(e.loc,bx(t,62)+1),gt.inSFCRoot&&(e.children.length?e.innerLoc.end=ze({},e.children[e.children.length-1].loc.end):e.innerLoc.end=ze({},e.innerLoc.start),e.innerLoc.source=Ft(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:n,ns:a,children:i}=e;if(Fn||(n==="slot"?e.tagType=2:nu(e)?e.tagType=3:xx(e)&&(e.tagType=1)),gt.inRCDATA||(e.children=Ih(i)),a===0&&Ye.isIgnoreNewlineTag(n)){const l=i[0];l&&l.type===2&&(l.content=l.content.replace(/^\r?\n/,""))}a===0&&Ye.isPreTag(n)&&Vc--,Mo===e&&(Fn=gt.inVPre=!1,Mo=null),gt.inXML&&(dt[0]?dt[0].ns:Ye.ns)===0&&(gt.inXML=!1);{const l=e.props;if(!gt.inSFCRoot&&na("COMPILER_NATIVE_TEMPLATE",Ye)&&e.tag==="template"&&!nu(e)){const o=dt[0]||Ki,c=o.children.indexOf(e);o.children.splice(c,1,...e.children)}const r=l.find(o=>o.type===6&&o.name==="inline-template");r&&qi("COMPILER_INLINE_TEMPLATE",Ye,r.loc)&&e.children.length&&(r.value={type:2,content:Ft(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:r.loc})}}function bx(e,t){let s=e;for(;wn.charCodeAt(s)!==t&&s=0;)s--;return s}const yx=new Set(["if","else","else-if","for","slot"]);function nu({tag:e,props:t}){if(e==="template"){for(let s=0;s64&&e<91}const kx=/\r\n/g;function Ih(e){const t=Ye.whitespace!=="preserve";let s=!1;for(let n=0;ns.type!==3);return t.length===1&&t[0].type===1&&!sr(t[0])?t[0]:null}function Il(e,t,s,n=!1,a=!1){const{children:i}=e,l=[];for(let d=0;d0){if(f>=2){u.codegenNode.patchFlag=-1,l.push(u);continue}}else{const p=u.codegenNode;if(p.type===13){const b=p.patchFlag;if((b===void 0||b===512||b===1)&&Dh(u,s)>=2){const y=Mh(u);y&&(p.props=s.hoist(y))}p.dynamicProps&&(p.dynamicProps=s.hoist(p.dynamicProps))}}}else if(u.type===12&&(n?0:xs(u,s))>=2){u.codegenNode.type===14&&u.codegenNode.arguments.length>0&&u.codegenNode.arguments.push("-1"),l.push(u);continue}if(u.type===1){const f=u.tagType===1;f&&s.scopes.vSlot++,Il(u,e,s,!1,a),f&&s.scopes.vSlot--}else if(u.type===11)Il(u,e,s,u.children.length===1,!0);else if(u.type===9)for(let f=0;fp.key===u||p.key.content===u);return f&&f.value}}l.length&&s.transformHoist&&s.transformHoist(i,s,e)}function xs(e,t){const{constantCache:s}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;const n=s.get(e);if(n!==void 0)return n;const a=e.codegenNode;if(a.type!==13||a.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject"&&e.tag!=="math")return 0;if(a.patchFlag===void 0){let l=3;const r=Dh(e,t);if(r===0)return s.set(e,0),0;r1)for(let o=0;oH&&(T.childIndex--,T.onNodeRemoved()),T.parent.children.splice(H,1)},onNodeRemoved:Ut,addIdentifiers(C){},removeIdentifiers(C){},hoist(C){Me(C)&&(C=Fe(C)),T.hoists.push(C);const M=Fe(`_hoisted_${T.hoists.length}`,!1,C.loc,2);return M.hoisted=C,M},cache(C,M=!1,H=!1){const P=tx(T.cached.length,C,M,H);return T.cached.push(P),P}};return T.filters=new Set,T}function Ox(e,t){const s=Ix(e,t);Ir(e,s),t.hoistStatic&&Ax(e,s),t.ssr||Nx(e,s),e.helpers=new Set([...s.helpers.keys()]),e.components=[...s.components],e.directives=[...s.directives],e.imports=s.imports,e.hoists=s.hoists,e.temps=s.temps,e.cached=s.cached,e.transformed=!0,e.filters=[...s.filters]}function Nx(e,t){const{helper:s}=t,{children:n}=e;if(n.length===1){const a=Nh(e);if(a&&a.codegenNode){const i=a.codegenNode;i.type===13&&Bc(i,t),e.codegenNode=i}else e.codegenNode=n[0]}else if(n.length>1){let a=64;e.codegenNode=ji(t,s(zi),void 0,e.children,a,void 0,void 0,!0,void 0,!1)}}function Lx(e,t){let s=0;const n=()=>{s--};for(;sn===e:n=>e.test(n);return(n,a)=>{if(n.type===1){const{props:i}=n;if(n.tagType===3&&i.some(fx))return;const l=[];for(let r=0;r`${Ga[e]}: _${Ga[e]}`;function Dx(e,{mode:t="function",prefixIdentifiers:s=t==="module",sourceMap:n=!1,filename:a="template.vue.html",scopeId:i=null,optimizeImports:l=!1,runtimeGlobalName:r="Vue",runtimeModuleName:o="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:d=!1,isTS:u=!1,inSSR:f=!1}){const p={mode:t,prefixIdentifiers:s,sourceMap:n,filename:a,scopeId:i,optimizeImports:l,runtimeGlobalName:r,runtimeModuleName:o,ssrRuntimeModuleName:c,ssr:d,isTS:u,inSSR:f,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(y){return`_${Ga[y]}`},push(y,E=-2,I){p.code+=y},indent(){b(++p.indentLevel)},deindent(y=!1){y?--p.indentLevel:b(--p.indentLevel)},newline(){b(p.indentLevel)}};function b(y){p.push(` +**/const Vi=Symbol(""),Ei=Symbol(""),Sc=Symbol(""),Yl=Symbol(""),ph=Symbol(""),ra=Symbol(""),hh=Symbol(""),mh=Symbol(""),Tc=Symbol(""),Cc=Symbol(""),nl=Symbol(""),Ec=Symbol(""),gh=Symbol(""),Ac=Symbol(""),Rc=Symbol(""),Ic=Symbol(""),Oc=Symbol(""),Nc=Symbol(""),Lc=Symbol(""),vh=Symbol(""),bh=Symbol(""),Ar=Symbol(""),Ql=Symbol(""),Dc=Symbol(""),Mc=Symbol(""),ji=Symbol(""),al=Symbol(""),Pc=Symbol(""),No=Symbol(""),Wy=Symbol(""),Lo=Symbol(""),Xl=Symbol(""),Zy=Symbol(""),Jy=Symbol(""),Fc=Symbol(""),Yy=Symbol(""),Qy=Symbol(""),$c=Symbol(""),yh=Symbol(""),Ka={[Vi]:"Fragment",[Ei]:"Teleport",[Sc]:"Suspense",[Yl]:"KeepAlive",[ph]:"BaseTransition",[ra]:"openBlock",[hh]:"createBlock",[mh]:"createElementBlock",[Tc]:"createVNode",[Cc]:"createElementVNode",[nl]:"createCommentVNode",[Ec]:"createTextVNode",[gh]:"createStaticVNode",[Ac]:"resolveComponent",[Rc]:"resolveDynamicComponent",[Ic]:"resolveDirective",[Oc]:"resolveFilter",[Nc]:"withDirectives",[Lc]:"renderList",[vh]:"renderSlot",[bh]:"createSlots",[Ar]:"toDisplayString",[Ql]:"mergeProps",[Dc]:"normalizeClass",[Mc]:"normalizeStyle",[ji]:"normalizeProps",[al]:"guardReactiveProps",[Pc]:"toHandlers",[No]:"camelize",[Wy]:"capitalize",[Lo]:"toHandlerKey",[Xl]:"setBlockTracking",[Zy]:"pushScopeId",[Jy]:"popScopeId",[Fc]:"withCtx",[Yy]:"unref",[Qy]:"isRef",[$c]:"withMemo",[yh]:"isMemoSame"};function Xy(e){Object.getOwnPropertySymbols(e).forEach(t=>{Ka[t]=e[t]})}const ws={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function ex(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:ws}}function qi(e,t,s,n,a,i,l,r=!1,o=!1,c=!1,d=ws){return e&&(r?(e.helper(ra),e.helper(Ja(e.inSSR,c))):e.helper(Za(e.inSSR,c)),l&&e.helper(Nc)),{type:13,tag:t,props:s,children:n,patchFlag:a,dynamicProps:i,directives:l,isBlock:r,disableTracking:o,isComponent:c,loc:d}}function na(e,t=ws){return{type:17,loc:t,elements:e}}function Is(e,t=ws){return{type:15,loc:t,properties:e}}function wt(e,t){return{type:16,loc:ws,key:Me(e)?Fe(e,!0):e,value:t}}function Fe(e,t=!1,s=ws,n=0){return{type:4,loc:s,content:e,isStatic:t,constType:t?3:n}}function Vs(e,t=ws){return{type:8,loc:t,children:e}}function It(e,t=[],s=ws){return{type:14,loc:s,callee:e,arguments:t}}function Wa(e,t=void 0,s=!1,n=!1,a=ws){return{type:18,params:e,returns:t,newline:s,isSlot:n,loc:a}}function Do(e,t,s,n=!0){return{type:19,test:e,consequent:t,alternate:s,newline:n,loc:ws}}function tx(e,t,s=!1,n=!1){return{type:20,index:e,value:t,needPauseTracking:s,inVOnce:n,needArraySpread:!1,loc:ws}}function sx(e){return{type:21,body:e,loc:ws}}function Za(e,t){return e||t?Tc:Cc}function Ja(e,t){return e||t?hh:mh}function Bc(e,{helper:t,removeHelper:s,inSSR:n}){e.isBlock||(e.isBlock=!0,s(Za(n,e.isComponent)),t(ra),t(Ja(n,e.isComponent)))}const Zd=new Uint8Array([123,123]),Jd=new Uint8Array([125,125]);function Yd(e){return e>=97&&e<=122||e>=65&&e<=90}function bs(e){return e===32||e===10||e===9||e===12||e===13}function In(e){return e===47||e===62||bs(e)}function er(e){const t=new Uint8Array(e.length);for(let s=0;s100){let l=-1,r=a;for(;l+1>>1;this.newlines[o]=0;l--)if(t>this.newlines[l]){i=l;break}return i>=0&&(s=i+2,n=t-this.newlines[i]),{column:n,line:s,offset:t}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(t){t===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t))}stateInterpolationOpen(t){if(t===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const s=this.index+1-this.delimiterOpen.length;s>this.sectionStart&&this.cbs.ontext(this.sectionStart,s),this.state=3,this.sectionStart=s}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(t)):(this.state=1,this.stateText(t))}stateInterpolation(t){t===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(t))}stateInterpolationClose(t){t===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(t))}stateSpecialStartSequence(t){const s=this.sequenceIndex===this.currentSequence.length;if(!(s?In(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!s){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(t)}stateInRCDATA(t){if(this.sequenceIndex===this.currentSequence.length){if(t===62||bs(t)){const s=this.index-this.currentSequence.length;if(this.sectionStart=t||(this.state===28?this.currentSequence===jt.CdataEnd?this.cbs.oncdata(this.sectionStart,t):this.cbs.oncomment(this.sectionStart,t):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,s){}}function Qd(e,{compatConfig:t}){const s=t&&t[e];return e==="MODE"?s||3:s}function aa(e,t){const s=Qd("MODE",t),n=Qd(e,t);return s===3?n===!0:n!==!1}function Gi(e,t,s,...n){return aa(e,t)}function Uc(e){throw e}function xh(e){}function ut(e,t,s,n){const a=`https://vuejs.org/error-reference/#compiler-${e}`,i=new SyntaxError(String(a));return i.code=e,i.loc=t,i}const hs=e=>e.type===4&&e.isStatic;function _h(e){switch(e){case"Teleport":case"teleport":return Ei;case"Suspense":case"suspense":return Sc;case"KeepAlive":case"keep-alive":return Yl;case"BaseTransition":case"base-transition":return ph}}const ax=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Hc=e=>!ax.test(e),kh=/[A-Za-z_$\xA0-\uFFFF]/,ix=/[\.\?\w$\xA0-\uFFFF]/,lx=/\s+[.[]\s*|\s*[.[]\s+/g,wh=e=>e.type===4?e.content:e.loc.source,rx=e=>{const t=wh(e).trim().replace(lx,r=>r.trim());let s=0,n=[],a=0,i=0,l=null;for(let r=0;r|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,cx=e=>ox.test(wh(e)),dx=cx;function Rs(e,t,s=!1){for(let n=0;nt.type===7&&t.name==="bind"&&(!t.arg||t.arg.type!==4||!t.arg.isStatic))}function Yr(e){return e.type===5||e.type===2}function Xd(e){return e.type===7&&e.name==="pre"}function fx(e){return e.type===7&&e.name==="slot"}function tr(e){return e.type===1&&e.tagType===3}function sr(e){return e.type===1&&e.tagType===2}const px=new Set([ji,al]);function Th(e,t=[]){if(e&&!Me(e)&&e.type===14){const s=e.callee;if(!Me(s)&&px.has(s))return Th(e.arguments[0],t.concat(e))}return[e,t]}function nr(e,t,s){let n,a=e.type===13?e.props:e.arguments[2],i=[],l;if(a&&!Me(a)&&a.type===14){const r=Th(a);a=r[0],i=r[1],l=i[i.length-1]}if(a==null||Me(a))n=Is([t]);else if(a.type===14){const r=a.arguments[0];!Me(r)&&r.type===15?eu(t,r)||r.properties.unshift(t):a.callee===Pc?n=It(s.helper(Ql),[Is([t]),a]):a.arguments.unshift(Is([t])),!n&&(n=a)}else a.type===15?(eu(t,a)||a.properties.unshift(t),n=a):(n=It(s.helper(Ql),[Is([t]),a]),l&&l.callee===al&&(l=i[i.length-2]));e.type===13?l?l.arguments[0]=n:e.props=n:l?l.arguments[0]=n:e.arguments[2]=n}function eu(e,t){let s=!1;if(e.key.type===4){const n=e.key.content;s=t.properties.some(a=>a.key.type===4&&a.key.content===n)}return s}function Ki(e,t){return`_${t}_${e.replace(/[^\w]/g,(s,n)=>s==="-"?"_":e.charCodeAt(n).toString())}`}function hx(e){return e.type===14&&e.callee===$c?e.arguments[1].returns:e}const mx=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function Ch(e){for(let t=0;t0,isVoidTag:Ia,isPreTag:Ia,isIgnoreNewlineTag:Ia,isCustomElement:Ia,onError:Uc,onWarn:xh,comments:!1,prefixIdentifiers:!1};let Qe=Ah,Wi=null,_n="",Gt=null,Ge=null,cs="",cn=-1,Wn=-1,Vc=0,Pn=!1,Mo=null;const dt=[],gt=new nx(dt,{onerr:ln,ontext(e,t){yl($t(e,t),e,t)},ontextentity(e,t,s){yl(e,t,s)},oninterpolation(e,t){if(Pn)return yl($t(e,t),e,t);let s=e+gt.delimiterOpen.length,n=t-gt.delimiterClose.length;for(;bs(_n.charCodeAt(s));)s++;for(;bs(_n.charCodeAt(n-1));)n--;let a=$t(s,n);a.includes("&")&&(a=Qe.decodeEntities(a,!1)),Po({type:5,content:Rl(a,!1,bt(s,n)),loc:bt(e,t)})},onopentagname(e,t){const s=$t(e,t);Gt={type:1,tag:s,ns:Qe.getNamespace(s,dt[0],Qe.ns),tagType:0,props:[],children:[],loc:bt(e-1,t),codegenNode:void 0}},onopentagend(e){su(e)},onclosetag(e,t){const s=$t(e,t);if(!Qe.isVoidTag(s)){let n=!1;for(let a=0;a0&&ln(24,dt[0].loc.start.offset);for(let l=0;l<=a;l++){const r=dt.shift();Al(r,t,l(n.type===7?n.rawName:n.name)===s)&&ln(2,t)},onattribend(e,t){if(Gt&&Ge){if(Qn(Ge.loc,t),e!==0)if(cs.includes("&")&&(cs=Qe.decodeEntities(cs,!0)),Ge.type===6)Ge.name==="class"&&(cs=Oh(cs).trim()),e===1&&!cs&&ln(13,t),Ge.value={type:2,content:cs,loc:e===1?bt(cn,Wn):bt(cn-1,Wn+1)},gt.inSFCRoot&&Gt.tag==="template"&&Ge.name==="lang"&&cs&&cs!=="html"&>.enterRCDATA(er("a.content==="sync"))>-1&&Gi("COMPILER_V_BIND_SYNC",Qe,Ge.loc,Ge.arg.loc.source)&&(Ge.name="model",Ge.modifiers.splice(n,1))}(Ge.type!==7||Ge.name!=="pre")&&Gt.props.push(Ge)}cs="",cn=Wn=-1},oncomment(e,t){Qe.comments&&Po({type:3,content:$t(e,t),loc:bt(e-4,t+3)})},onend(){const e=_n.length;for(let t=0;t{const b=t.start.offset+f,y=b+u.length;return Rl(u,!1,bt(b,y),0,p?1:0)},r={source:l(i.trim(),s.indexOf(i,a.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let o=a.trim().replace(gx,"").trim();const c=a.indexOf(o),d=o.match(tu);if(d){o=o.replace(tu,"").trim();const u=d[1].trim();let f;if(u&&(f=s.indexOf(u,c+o.length),r.key=l(u,f,!0)),d[2]){const p=d[2].trim();p&&(r.index=l(p,s.indexOf(p,r.key?f+u.length:c+o.length),!0))}}return o&&(r.value=l(o,c,!0)),r}function $t(e,t){return _n.slice(e,t)}function su(e){gt.inSFCRoot&&(Gt.innerLoc=bt(e+1,e+1)),Po(Gt);const{tag:t,ns:s}=Gt;s===0&&Qe.isPreTag(t)&&Vc++,Qe.isVoidTag(t)?Al(Gt,e):(dt.unshift(Gt),(s===1||s===2)&&(gt.inXML=!0)),Gt=null}function yl(e,t,s){{const i=dt[0]&&dt[0].tag;i!=="script"&&i!=="style"&&e.includes("&")&&(e=Qe.decodeEntities(e,!1))}const n=dt[0]||Wi,a=n.children[n.children.length-1];a&&a.type===2?(a.content+=e,Qn(a.loc,s)):n.children.push({type:2,content:e,loc:bt(t,s)})}function Al(e,t,s=!1){s?Qn(e.loc,Rh(t,60)):Qn(e.loc,bx(t,62)+1),gt.inSFCRoot&&(e.children.length?e.innerLoc.end=ze({},e.children[e.children.length-1].loc.end):e.innerLoc.end=ze({},e.innerLoc.start),e.innerLoc.source=$t(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:n,ns:a,children:i}=e;if(Pn||(n==="slot"?e.tagType=2:nu(e)?e.tagType=3:xx(e)&&(e.tagType=1)),gt.inRCDATA||(e.children=Ih(i)),a===0&&Qe.isIgnoreNewlineTag(n)){const l=i[0];l&&l.type===2&&(l.content=l.content.replace(/^\r?\n/,""))}a===0&&Qe.isPreTag(n)&&Vc--,Mo===e&&(Pn=gt.inVPre=!1,Mo=null),gt.inXML&&(dt[0]?dt[0].ns:Qe.ns)===0&&(gt.inXML=!1);{const l=e.props;if(!gt.inSFCRoot&&aa("COMPILER_NATIVE_TEMPLATE",Qe)&&e.tag==="template"&&!nu(e)){const o=dt[0]||Wi,c=o.children.indexOf(e);o.children.splice(c,1,...e.children)}const r=l.find(o=>o.type===6&&o.name==="inline-template");r&&Gi("COMPILER_INLINE_TEMPLATE",Qe,r.loc)&&e.children.length&&(r.value={type:2,content:$t(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:r.loc})}}function bx(e,t){let s=e;for(;_n.charCodeAt(s)!==t&&s<_n.length-1;)s++;return s}function Rh(e,t){let s=e;for(;_n.charCodeAt(s)!==t&&s>=0;)s--;return s}const yx=new Set(["if","else","else-if","for","slot"]);function nu({tag:e,props:t}){if(e==="template"){for(let s=0;s64&&e<91}const kx=/\r\n/g;function Ih(e){const t=Qe.whitespace!=="preserve";let s=!1;for(let n=0;ns.type!==3);return t.length===1&&t[0].type===1&&!sr(t[0])?t[0]:null}function Il(e,t,s,n=!1,a=!1){const{children:i}=e,l=[];for(let d=0;d0){if(f>=2){u.codegenNode.patchFlag=-1,l.push(u);continue}}else{const p=u.codegenNode;if(p.type===13){const b=p.patchFlag;if((b===void 0||b===512||b===1)&&Dh(u,s)>=2){const y=Mh(u);y&&(p.props=s.hoist(y))}p.dynamicProps&&(p.dynamicProps=s.hoist(p.dynamicProps))}}}else if(u.type===12&&(n?0:ys(u,s))>=2){u.codegenNode.type===14&&u.codegenNode.arguments.length>0&&u.codegenNode.arguments.push("-1"),l.push(u);continue}if(u.type===1){const f=u.tagType===1;f&&s.scopes.vSlot++,Il(u,e,s,!1,a),f&&s.scopes.vSlot--}else if(u.type===11)Il(u,e,s,u.children.length===1,!0);else if(u.type===9)for(let f=0;fp.key===u||p.key.content===u);return f&&f.value}}l.length&&s.transformHoist&&s.transformHoist(i,s,e)}function ys(e,t){const{constantCache:s}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;const n=s.get(e);if(n!==void 0)return n;const a=e.codegenNode;if(a.type!==13||a.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject"&&e.tag!=="math")return 0;if(a.patchFlag===void 0){let l=3;const r=Dh(e,t);if(r===0)return s.set(e,0),0;r1)for(let o=0;oH&&(T.childIndex--,T.onNodeRemoved()),T.parent.children.splice(H,1)},onNodeRemoved:Ht,addIdentifiers(C){},removeIdentifiers(C){},hoist(C){Me(C)&&(C=Fe(C)),T.hoists.push(C);const M=Fe(`_hoisted_${T.hoists.length}`,!1,C.loc,2);return M.hoisted=C,M},cache(C,M=!1,H=!1){const P=tx(T.cached.length,C,M,H);return T.cached.push(P),P}};return T.filters=new Set,T}function Ox(e,t){const s=Ix(e,t);Ir(e,s),t.hoistStatic&&Ax(e,s),t.ssr||Nx(e,s),e.helpers=new Set([...s.helpers.keys()]),e.components=[...s.components],e.directives=[...s.directives],e.imports=s.imports,e.hoists=s.hoists,e.temps=s.temps,e.cached=s.cached,e.transformed=!0,e.filters=[...s.filters]}function Nx(e,t){const{helper:s}=t,{children:n}=e;if(n.length===1){const a=Nh(e);if(a&&a.codegenNode){const i=a.codegenNode;i.type===13&&Bc(i,t),e.codegenNode=i}else e.codegenNode=n[0]}else if(n.length>1){let a=64;e.codegenNode=qi(t,s(Vi),void 0,e.children,a,void 0,void 0,!0,void 0,!1)}}function Lx(e,t){let s=0;const n=()=>{s--};for(;sn===e:n=>e.test(n);return(n,a)=>{if(n.type===1){const{props:i}=n;if(n.tagType===3&&i.some(fx))return;const l=[];for(let r=0;r`${Ka[e]}: _${Ka[e]}`;function Dx(e,{mode:t="function",prefixIdentifiers:s=t==="module",sourceMap:n=!1,filename:a="template.vue.html",scopeId:i=null,optimizeImports:l=!1,runtimeGlobalName:r="Vue",runtimeModuleName:o="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:d=!1,isTS:u=!1,inSSR:f=!1}){const p={mode:t,prefixIdentifiers:s,sourceMap:n,filename:a,scopeId:i,optimizeImports:l,runtimeGlobalName:r,runtimeModuleName:o,ssrRuntimeModuleName:c,ssr:d,isTS:u,inSSR:f,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(y){return`_${Ka[y]}`},push(y,E=-2,I){p.code+=y},indent(){b(++p.indentLevel)},deindent(y=!1){y?--p.indentLevel:b(--p.indentLevel)},newline(){b(p.indentLevel)}};function b(y){p.push(` `+" ".repeat(y),0)}return p}function Mx(e,t={}){const s=Dx(e,t);t.onContextCreated&&t.onContextCreated(s);const{mode:n,push:a,prefixIdentifiers:i,indent:l,deindent:r,newline:o,scopeId:c,ssr:d}=s,u=Array.from(e.helpers),f=u.length>0,p=!i&&n!=="module";Px(e,s);const y=d?"ssrRender":"render",I=(d?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(a(`function ${y}(${I}) {`),l(),p&&(a("with (_ctx) {"),l(),f&&(a(`const { ${u.map(Fh).join(", ")} } = _Vue `,-1),o())),e.components.length&&(Qr(e.components,"component",s),(e.directives.length||e.temps>0)&&o()),e.directives.length&&(Qr(e.directives,"directive",s),e.temps>0&&o()),e.filters&&e.filters.length&&(o(),Qr(e.filters,"filter",s),o()),e.temps>0){a("let ");for(let x=0;x0?", ":""}_temp${x}`)}return(e.components.length||e.directives.length||e.temps)&&(a(` -`,0),o()),d||a("return "),e.codegenNode?Kt(e.codegenNode,s):a("null"),p&&(r(),a("}")),r(),a("}"),{ast:e,code:s.code,preamble:"",map:s.map?s.map.toJSON():void 0}}function Px(e,t){const{ssr:s,prefixIdentifiers:n,push:a,newline:i,runtimeModuleName:l,runtimeGlobalName:r,ssrRuntimeModuleName:o}=t,c=r,d=Array.from(e.helpers);if(d.length>0&&(a(`const _Vue = ${c} -`,-1),e.hoists.length)){const u=[Tc,Cc,sl,Ec,gh].filter(f=>d.includes(f)).map(Fh).join(", ");a(`const { ${u} } = _Vue -`,-1)}Fx(e.hoists,t),i(),a("return ")}function Qr(e,t,{helper:s,push:n,newline:a,isTS:i}){const l=s(t==="filter"?Oc:t==="component"?Ac:Ic);for(let r=0;r3||!1;t.push("["),s&&t.indent(),al(e,t,s),s&&t.deindent(),t.push("]")}function al(e,t,s=!1,n=!0){const{push:a,newline:i}=t;for(let l=0;ls||"null")}function jx(e,t){const{push:s,helper:n,pure:a}=t,i=Me(e.callee)?e.callee:n(e.callee);a&&s(Or),s(i+"(",-2,e),al(e.arguments,t),s(")")}function qx(e,t){const{push:s,indent:n,deindent:a,newline:i}=t,{properties:l}=e;if(!l.length){s("{}",-2,e);return}const r=l.length>1||!1;s(r?"{":"{ "),r&&n();for(let o=0;o "),(o||r)&&(s("{"),n()),l?(o&&s("return "),xe(l)?jc(l,t):Kt(l,t)):r&&Kt(r,t),(o||r)&&(a(),s("}")),c&&(e.isNonScopedSlot&&s(", undefined, true"),s(")"))}function Wx(e,t){const{test:s,consequent:n,alternate:a,newline:i}=e,{push:l,indent:r,deindent:o,newline:c}=t;if(s.type===4){const u=!Hc(s.content);u&&l("("),$h(s,t),u&&l(")")}else l("("),Kt(s,t),l(")");i&&r(),t.indentLevel++,i||l(" "),l("? "),Kt(n,t),t.indentLevel--,i&&c(),i||l(" "),l(": ");const d=a.type===19;d||t.indentLevel++,Kt(a,t),d||t.indentLevel--,i&&o(!0)}function Zx(e,t){const{push:s,helper:n,indent:a,deindent:i,newline:l}=t,{needPauseTracking:r,needArraySpread:o}=e;o&&s("[...("),s(`_cache[${e.index}] || (`),r&&(a(),s(`${n(Xl)}(-1`),e.inVOnce&&s(", true"),s("),"),l(),s("(")),s(`_cache[${e.index}] = `),Kt(e.value,t),r&&(s(`).cacheIndex = ${e.index},`),l(),s(`${n(Xl)}(1),`),l(),s(`_cache[${e.index}]`),i()),s(")"),o&&s(")]")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const Jx=Ph(/^(?:if|else|else-if)$/,(e,t,s)=>Yx(e,t,s,(n,a,i)=>{const l=s.parent.children;let r=l.indexOf(n),o=0;for(;r-->=0;){const c=l[r];c&&c.type===9&&(o+=c.branches.length)}return()=>{if(i)n.codegenNode=iu(a,o,s);else{const c=Qx(n.codegenNode);c.alternate=iu(a,o+n.branches.length-1,s)}}}));function Yx(e,t,s,n){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){const a=t.exp?t.exp.loc:e.loc;s.onError(ut(28,t.loc)),t.exp=Fe("true",!1,a)}if(t.name==="if"){const a=au(e,t),i={type:9,loc:Sx(e.loc),branches:[a]};if(s.replaceNode(i),n)return n(i,a,!0)}else{const a=s.parent.children;let i=a.indexOf(e);for(;i-->=-1;){const l=a[i];if(l&&Eh(l)){s.removeNode(l);continue}if(l&&l.type===9){(t.name==="else-if"||t.name==="else")&&l.branches[l.branches.length-1].condition===void 0&&s.onError(ut(30,e.loc)),s.removeNode();const r=au(e,t);l.branches.push(r);const o=n&&n(l,r,!1);Ir(r,s),o&&o(),s.currentNode=null}else s.onError(ut(30,e.loc));break}}}function au(e,t){const s=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:s&&!Is(e,"for")?e.children:[e],userKey:Rr(e,"key"),isTemplateIf:s}}function iu(e,t,s){return e.condition?Do(e.condition,lu(e,t,s),Ot(s.helper(sl),['""',"true"])):lu(e,t,s)}function lu(e,t,s){const{helper:n}=s,a=wt("key",Fe(`${t}`,!1,Ss,2)),{children:i}=e,l=i[0];if(i.length!==1||l.type!==1)if(i.length===1&&l.type===11){const o=l.codegenNode;return nr(o,a,s),o}else return ji(s,n(zi),Os([a]),i,64,void 0,void 0,!0,!1,!1,e.loc);else{const o=l.codegenNode,c=hx(o);return c.type===13&&Bc(c,s),nr(c,a,s),o}}function Qx(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}const Xx=Ph("for",(e,t,s)=>{const{helper:n,removeHelper:a}=s;return e0(e,t,s,i=>{const l=Ot(n(Lc),[i.source]),r=tr(e),o=Is(e,"memo"),c=Rr(e,"key",!1,!0);c&&c.type;let d=c&&(c.type===6?c.value?Fe(c.value.content,!0):void 0:c.exp);const u=d?wt("key",d):null,f=i.source.type===4&&i.source.constType>0,p=f?64:c?128:256;return i.codegenNode=ji(s,n(zi),void 0,l,p,void 0,void 0,!0,!f,!1,e.loc),()=>{let b;const{children:y}=i,E=y.length!==1||y[0].type!==1,I=sr(e)?e:r&&e.children.length===1&&sr(e.children[0])?e.children[0]:null;if(I?(b=I.codegenNode,r&&u&&nr(b,u,s)):E?b=ji(s,n(zi),u?Os([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(b=y[0].codegenNode,r&&u&&nr(b,u,s),b.isBlock!==!f&&(b.isBlock?(a(la),a(Za(s.inSSR,b.isComponent))):a(Wa(s.inSSR,b.isComponent))),b.isBlock=!f,b.isBlock?(n(la),n(Za(s.inSSR,b.isComponent))):n(Wa(s.inSSR,b.isComponent))),o){const x=Ka(Fo(i.parseResult,[Fe("_cached")]));x.body=sx([Vs(["const _memo = (",o.exp,")"]),Vs(["if (_cached && _cached.el",...d?[" && _cached.key === ",d]:[],` && ${s.helperString(yh)}(_cached, _memo)) return _cached`]),Vs(["const _item = ",b]),Fe("_item.memo = _memo"),Fe("return _item")]),l.arguments.push(x,Fe("_cache"),Fe(String(s.cached.length))),s.cached.push(null)}else l.arguments.push(Ka(Fo(i.parseResult),b,!0))}})});function e0(e,t,s,n){if(!t.exp){s.onError(ut(31,t.loc));return}const a=t.forParseResult;if(!a){s.onError(ut(32,t.loc));return}Uh(a);const{addIdentifiers:i,removeIdentifiers:l,scopes:r}=s,{source:o,value:c,key:d,index:u}=a,f={type:11,loc:t.loc,source:o,valueAlias:c,keyAlias:d,objectIndexAlias:u,parseResult:a,children:tr(e)?e.children:[e]};s.replaceNode(f),r.vFor++;const p=n&&n(f);return()=>{r.vFor--,p&&p()}}function Uh(e,t){e.finalized||(e.finalized=!0)}function Fo({value:e,key:t,index:s},n=[]){return t0([e,t,s,...n])}function t0(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((s,n)=>s||Fe("_".repeat(n+1),!1))}const ru=Fe("undefined",!1),s0=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const s=Is(e,"slot");if(s)return s.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},n0=(e,t,s,n)=>Ka(e,s,!1,!0,s.length?s[0].loc:n);function a0(e,t,s=n0){t.helper(Fc);const{children:n,loc:a}=e,i=[],l=[];let r=t.scopes.vSlot>0||t.scopes.vFor>0;const o=Is(e,"slot",!0);if(o){const{arg:E,exp:I}=o;E&&!ms(E)&&(r=!0),i.push(wt(E||Fe("default",!0),s(I,void 0,n,a)))}let c=!1,d=!1;const u=[],f=new Set;let p=0;for(let E=0;E{const m=s(I,void 0,x,a);return t.compatConfig&&(m.isNonScopedSlot=!0),wt("default",m)};c?u.length&&!u.every(zc)&&(d?t.onError(ut(39,u[0].loc)):i.push(E(void 0,u))):i.push(E(void 0,n))}const b=r?2:Ol(e.children)?3:1;let y=Os(i.concat(wt("_",Fe(b+"",!1))),a);return l.length&&(y=Ot(t.helper(bh),[y,sa(l)])),{slots:y,hasDynamicSlots:r}}function xl(e,t,s){const n=[wt("name",e),wt("fn",t)];return s!=null&&n.push(wt("key",Fe(String(s),!0))),Os(n)}function Ol(e){for(let t=0;tfunction(){if(e=t.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:n,props:a}=e,i=e.tagType===1;let l=i?l0(e,t):`"${n}"`;const r=Qe(l)&&l.callee===Rc;let o,c,d=0,u,f,p,b=r||l===Ci||l===Sc||!i&&(n==="svg"||n==="foreignObject"||n==="math");if(a.length>0){const y=zh(e,t,void 0,i,r);o=y.props,d=y.patchFlag,f=y.dynamicPropNames;const E=y.directives;p=E&&E.length?sa(E.map(I=>o0(I,t))):void 0,y.shouldUseBlock&&(b=!0)}if(e.children.length>0)if(l===Yl&&(b=!0,d|=1024),i&&l!==Ci&&l!==Yl){const{slots:E,hasDynamicSlots:I}=a0(e,t);c=E,I&&(d|=1024)}else if(e.children.length===1&&l!==Ci){const E=e.children[0],I=E.type,x=I===5||I===8;x&&xs(E,t)===0&&(d|=1),x||I===2?c=E:c=e.children}else c=e.children;f&&f.length&&(u=c0(f)),e.codegenNode=ji(t,l,o,c,d===0?void 0:d,u,p,!!b,!1,i,e.loc)};function l0(e,t,s=!1){let{tag:n}=e;const a=$o(n),i=Rr(e,"is",!1,!0);if(i)if(a||na("COMPILER_IS_ON_ELEMENT",t)){let r;if(i.type===6?r=i.value&&Fe(i.value.content,!0):(r=i.exp,r||(r=Fe("is",!1,i.arg.loc))),r)return Ot(t.helper(Rc),[r])}else i.type===6&&i.value.content.startsWith("vue:")&&(n=i.value.content.slice(4));const l=_h(n)||t.isBuiltInComponent(n);return l?(s||t.helper(l),l):(t.helper(Ac),t.components.add(n),Gi(n,"component"))}function zh(e,t,s=e.props,n,a,i=!1){const{tag:l,loc:r,children:o}=e;let c=[];const d=[],u=[],f=o.length>0;let p=!1,b=0,y=!1,E=!1,I=!1,x=!1,m=!1,_=!1;const S=[],g=M=>{c.length&&(d.push(Os(ou(c),r)),c=[]),M&&d.push(M)},w=()=>{t.scopes.vFor>0&&c.push(wt(Fe("ref_for",!0),Fe("true")))},T=({key:M,value:H})=>{if(ms(M)){const P=M.content,R=oa(P);if(R&&(!n||a)&&P.toLowerCase()!=="onclick"&&P!=="onUpdate:modelValue"&&!xn(P)&&(x=!0),R&&xn(P)&&(_=!0),R&&H.type===14&&(H=H.arguments[0]),H.type===20||(H.type===4||H.type===8)&&xs(H,t)>0)return;P==="ref"?y=!0:P==="class"?E=!0:P==="style"?I=!0:P!=="key"&&!S.includes(P)&&S.push(P),n&&(P==="class"||P==="style")&&!S.includes(P)&&S.push(P)}else m=!0};for(let M=0;Mwe.content==="prop")&&(b|=32);const Y=t.directiveTransforms[P];if(Y){const{props:we,needRuntime:ke}=Y(H,e,t);!i&&we.forEach(T),N&&R&&!ms(R)?g(Os(we,r)):c.push(...we),ke&&(u.push(H),Wt(ke)&&Hh.set(H,ke))}else Xm(P)||(u.push(H),f&&(p=!0))}}let C;if(d.length?(g(),d.length>1?C=Ot(t.helper(Ql),d,r):C=d[0]):c.length&&(C=Os(ou(c),r)),m?b|=16:(E&&!n&&(b|=2),I&&!n&&(b|=4),S.length&&(b|=8),x&&(b|=32)),!p&&(b===0||b===32)&&(y||_||u.length>0)&&(b|=512),!t.inSSR&&C)switch(C.type){case 15:let M=-1,H=-1,P=!1;for(let Q=0;Qwt(l,i)),a))}return sa(s,e.loc)}function c0(e){let t="[";for(let s=0,n=e.length;s{if(sr(e)){const{children:s,loc:n}=e,{slotName:a,slotProps:i}=u0(e,t),l=[t.prefixIdentifiers?"_ctx.$slots":"$slots",a,"{}","undefined","true"];let r=2;i&&(l[2]=i,r=3),s.length&&(l[3]=Ka([],s,!1,!1,n),r=4),t.scopeId&&!t.slotted&&(r=5),l.splice(r),e.codegenNode=Ot(t.helper(vh),l,n)}};function u0(e,t){let s='"default"',n;const a=[];for(let i=0;i0){const{props:i,directives:l}=zh(e,t,a,!1,!1);n=i,l.length&&t.onError(ut(36,l[0].loc))}return{slotName:s,slotProps:n}}const Vh=(e,t,s,n)=>{const{loc:a,modifiers:i,arg:l}=e;!e.exp&&!i.length&&s.onError(ut(35,a));let r;if(l.type===4)if(l.isStatic){let u=l.content;u.startsWith("vue:")&&(u=`vnode-${u.slice(4)}`);const f=t.tagType!==0||u.startsWith("vnode")||!/[A-Z]/.test(u)?La(it(u)):`on:${u}`;r=Fe(f,!0,l.loc)}else r=Vs([`${s.helperString(Lo)}(`,l,")"]);else r=l,r.children.unshift(`${s.helperString(Lo)}(`),r.children.push(")");let o=e.exp;o&&!o.content.trim()&&(o=void 0);let c=s.cacheHandlers&&!o&&!s.inVOnce;if(o){const u=Sh(o),f=!(u||dx(o)),p=o.content.includes(";");(f||c&&u)&&(o=Vs([`${f?"$event":"(...args)"} => ${p?"{":"("}`,o,p?"}":")"]))}let d={props:[wt(r,o||Fe("() => {}",!1,a))]};return n&&(d=n(d)),c&&(d.props[0].value=s.cache(d.props[0].value)),d.props.forEach(u=>u.key.isHandlerKey=!0),d},f0=(e,t,s)=>{const{modifiers:n,loc:a}=e,i=e.arg;let{exp:l}=e;return l&&l.type===4&&!l.content.trim()&&(l=void 0),i.type!==4?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=i.content?`${i.content} || ""`:'""'),n.some(r=>r.content==="camel")&&(i.type===4?i.isStatic?i.content=it(i.content):i.content=`${s.helperString(No)}(${i.content})`:(i.children.unshift(`${s.helperString(No)}(`),i.children.push(")"))),s.inSSR||(n.some(r=>r.content==="prop")&&cu(i,"."),n.some(r=>r.content==="attr")&&cu(i,"^")),{props:[wt(i,l)]}},cu=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},p0=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const s=e.children;let n,a=!1;for(let i=0;ii.type===7&&!t.directiveTransforms[i.name])&&e.tag!=="template")))for(let i=0;i{if(e.type===1&&Is(e,"once",!0))return du.has(e)||t.inVOnce||t.inSSR?void 0:(du.add(e),t.inVOnce=!0,t.helper(Xl),()=>{t.inVOnce=!1;const s=t.currentNode;s.codegenNode&&(s.codegenNode=t.cache(s.codegenNode,!0,!0))})},jh=(e,t,s)=>{const{exp:n,arg:a}=e;if(!n)return s.onError(ut(41,e.loc)),di();const i=n.loc.source.trim(),l=n.type===4?n.content:i,r=s.bindingMetadata[i];if(r==="props"||r==="props-aliased")return s.onError(ut(44,n.loc)),di();if(r==="literal-const"||r==="setup-const")return s.onError(ut(45,n.loc)),di();if(!l.trim()||!Sh(n))return s.onError(ut(42,n.loc)),di();const o=a||Fe("modelValue",!0),c=a?ms(a)?`onUpdate:${it(a.content)}`:Vs(['"onUpdate:" + ',a]):"onUpdate:modelValue";let d;const u=s.isTS?"($event: any)":"$event";d=Vs([`${u} => ((`,n,") = $event)"]);const f=[wt(o,e.exp),wt(c,d)];if(e.modifiers.length&&t.tagType===1){const p=e.modifiers.map(y=>y.content).map(y=>(Hc(y)?y:JSON.stringify(y))+": true").join(", "),b=a?ms(a)?`${a.content}Modifiers`:Vs([a,' + "Modifiers"']):"modelModifiers";f.push(wt(b,Fe(`{ ${p} }`,!1,e.loc,2)))}return di(f)};function di(e=[]){return{props:e}}const m0=/[\w).+\-_$\]]/,g0=(e,t)=>{na("COMPILER_FILTERS",t)&&(e.type===5?ar(e.content,t):e.type===1&&e.props.forEach(s=>{s.type===7&&s.name!=="for"&&s.exp&&ar(s.exp,t)}))};function ar(e,t){if(e.type===4)uu(e,t);else for(let s=0;s=0&&(x=s.charAt(I),x===" ");I--);(!x||!m0.test(x))&&(l=!0)}}b===void 0?b=s.slice(0,p).trim():d!==0&&E();function E(){y.push(s.slice(d,p).trim()),d=p+1}if(y.length){for(p=0;p{if(e.type===1){const s=Is(e,"memo");return!s||fu.has(e)||t.inSSR?void 0:(fu.add(e),()=>{const n=e.codegenNode||t.currentNode.codegenNode;n&&n.type===13&&(e.tagType!==1&&Bc(n,t),e.codegenNode=Ot(t.helper($c),[s.exp,Ka(void 0,n),"_cache",String(t.cached.length)]),t.cached.push(null))})}},y0=(e,t)=>{if(e.type===1){for(const s of e.props)if(s.type===7&&s.name==="bind"&&(!s.exp||s.exp.type===4&&!s.exp.content.trim())&&s.arg){const n=s.arg;if(n.type!==4||!n.isStatic)t.onError(ut(53,n.loc)),s.exp=Fe("",!0,n.loc);else{const a=it(n.content);(kh.test(a[0])||a[0]==="-")&&(s.exp=Fe(a,!1,n.loc))}}}};function x0(e){return[[y0,h0,Jx,b0,Xx,g0,d0,i0,s0,p0],{on:Vh,bind:f0,model:jh}]}function _0(e,t={}){const s=t.onError||Uc,n=t.mode==="module";t.prefixIdentifiers===!0?s(ut(48)):n&&s(ut(49));const a=!1;t.cacheHandlers&&s(ut(50)),t.scopeId&&!n&&s(ut(51));const i=ze({},t,{prefixIdentifiers:a}),l=Me(e)?Ex(e,i):e,[r,o]=x0();return Ox(l,ze({},i,{nodeTransforms:[...r,...t.nodeTransforms||[]],directiveTransforms:ze({},o,t.directiveTransforms||{})})),Mx(l,i)}const k0=()=>({props:[]});/** +`,0),o()),d||a("return "),e.codegenNode?Zt(e.codegenNode,s):a("null"),p&&(r(),a("}")),r(),a("}"),{ast:e,code:s.code,preamble:"",map:s.map?s.map.toJSON():void 0}}function Px(e,t){const{ssr:s,prefixIdentifiers:n,push:a,newline:i,runtimeModuleName:l,runtimeGlobalName:r,ssrRuntimeModuleName:o}=t,c=r,d=Array.from(e.helpers);if(d.length>0&&(a(`const _Vue = ${c} +`,-1),e.hoists.length)){const u=[Tc,Cc,nl,Ec,gh].filter(f=>d.includes(f)).map(Fh).join(", ");a(`const { ${u} } = _Vue +`,-1)}Fx(e.hoists,t),i(),a("return ")}function Qr(e,t,{helper:s,push:n,newline:a,isTS:i}){const l=s(t==="filter"?Oc:t==="component"?Ac:Ic);for(let r=0;r3||!1;t.push("["),s&&t.indent(),il(e,t,s),s&&t.deindent(),t.push("]")}function il(e,t,s=!1,n=!0){const{push:a,newline:i}=t;for(let l=0;ls||"null")}function jx(e,t){const{push:s,helper:n,pure:a}=t,i=Me(e.callee)?e.callee:n(e.callee);a&&s(Or),s(i+"(",-2,e),il(e.arguments,t),s(")")}function qx(e,t){const{push:s,indent:n,deindent:a,newline:i}=t,{properties:l}=e;if(!l.length){s("{}",-2,e);return}const r=l.length>1||!1;s(r?"{":"{ "),r&&n();for(let o=0;o "),(o||r)&&(s("{"),n()),l?(o&&s("return "),be(l)?jc(l,t):Zt(l,t)):r&&Zt(r,t),(o||r)&&(a(),s("}")),c&&(e.isNonScopedSlot&&s(", undefined, true"),s(")"))}function Wx(e,t){const{test:s,consequent:n,alternate:a,newline:i}=e,{push:l,indent:r,deindent:o,newline:c}=t;if(s.type===4){const u=!Hc(s.content);u&&l("("),$h(s,t),u&&l(")")}else l("("),Zt(s,t),l(")");i&&r(),t.indentLevel++,i||l(" "),l("? "),Zt(n,t),t.indentLevel--,i&&c(),i||l(" "),l(": ");const d=a.type===19;d||t.indentLevel++,Zt(a,t),d||t.indentLevel--,i&&o(!0)}function Zx(e,t){const{push:s,helper:n,indent:a,deindent:i,newline:l}=t,{needPauseTracking:r,needArraySpread:o}=e;o&&s("[...("),s(`_cache[${e.index}] || (`),r&&(a(),s(`${n(Xl)}(-1`),e.inVOnce&&s(", true"),s("),"),l(),s("(")),s(`_cache[${e.index}] = `),Zt(e.value,t),r&&(s(`).cacheIndex = ${e.index},`),l(),s(`${n(Xl)}(1),`),l(),s(`_cache[${e.index}]`),i()),s(")"),o&&s(")]")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const Jx=Ph(/^(?:if|else|else-if)$/,(e,t,s)=>Yx(e,t,s,(n,a,i)=>{const l=s.parent.children;let r=l.indexOf(n),o=0;for(;r-->=0;){const c=l[r];c&&c.type===9&&(o+=c.branches.length)}return()=>{if(i)n.codegenNode=iu(a,o,s);else{const c=Qx(n.codegenNode);c.alternate=iu(a,o+n.branches.length-1,s)}}}));function Yx(e,t,s,n){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){const a=t.exp?t.exp.loc:e.loc;s.onError(ut(28,t.loc)),t.exp=Fe("true",!1,a)}if(t.name==="if"){const a=au(e,t),i={type:9,loc:Sx(e.loc),branches:[a]};if(s.replaceNode(i),n)return n(i,a,!0)}else{const a=s.parent.children;let i=a.indexOf(e);for(;i-->=-1;){const l=a[i];if(l&&Eh(l)){s.removeNode(l);continue}if(l&&l.type===9){(t.name==="else-if"||t.name==="else")&&l.branches[l.branches.length-1].condition===void 0&&s.onError(ut(30,e.loc)),s.removeNode();const r=au(e,t);l.branches.push(r);const o=n&&n(l,r,!1);Ir(r,s),o&&o(),s.currentNode=null}else s.onError(ut(30,e.loc));break}}}function au(e,t){const s=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:s&&!Rs(e,"for")?e.children:[e],userKey:Rr(e,"key"),isTemplateIf:s}}function iu(e,t,s){return e.condition?Do(e.condition,lu(e,t,s),It(s.helper(nl),['""',"true"])):lu(e,t,s)}function lu(e,t,s){const{helper:n}=s,a=wt("key",Fe(`${t}`,!1,ws,2)),{children:i}=e,l=i[0];if(i.length!==1||l.type!==1)if(i.length===1&&l.type===11){const o=l.codegenNode;return nr(o,a,s),o}else return qi(s,n(Vi),Is([a]),i,64,void 0,void 0,!0,!1,!1,e.loc);else{const o=l.codegenNode,c=hx(o);return c.type===13&&Bc(c,s),nr(c,a,s),o}}function Qx(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}const Xx=Ph("for",(e,t,s)=>{const{helper:n,removeHelper:a}=s;return e0(e,t,s,i=>{const l=It(n(Lc),[i.source]),r=tr(e),o=Rs(e,"memo"),c=Rr(e,"key",!1,!0);c&&c.type;let d=c&&(c.type===6?c.value?Fe(c.value.content,!0):void 0:c.exp);const u=d?wt("key",d):null,f=i.source.type===4&&i.source.constType>0,p=f?64:c?128:256;return i.codegenNode=qi(s,n(Vi),void 0,l,p,void 0,void 0,!0,!f,!1,e.loc),()=>{let b;const{children:y}=i,E=y.length!==1||y[0].type!==1,I=sr(e)?e:r&&e.children.length===1&&sr(e.children[0])?e.children[0]:null;if(I?(b=I.codegenNode,r&&u&&nr(b,u,s)):E?b=qi(s,n(Vi),u?Is([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(b=y[0].codegenNode,r&&u&&nr(b,u,s),b.isBlock!==!f&&(b.isBlock?(a(ra),a(Ja(s.inSSR,b.isComponent))):a(Za(s.inSSR,b.isComponent))),b.isBlock=!f,b.isBlock?(n(ra),n(Ja(s.inSSR,b.isComponent))):n(Za(s.inSSR,b.isComponent))),o){const x=Wa(Fo(i.parseResult,[Fe("_cached")]));x.body=sx([Vs(["const _memo = (",o.exp,")"]),Vs(["if (_cached && _cached.el",...d?[" && _cached.key === ",d]:[],` && ${s.helperString(yh)}(_cached, _memo)) return _cached`]),Vs(["const _item = ",b]),Fe("_item.memo = _memo"),Fe("return _item")]),l.arguments.push(x,Fe("_cache"),Fe(String(s.cached.length))),s.cached.push(null)}else l.arguments.push(Wa(Fo(i.parseResult),b,!0))}})});function e0(e,t,s,n){if(!t.exp){s.onError(ut(31,t.loc));return}const a=t.forParseResult;if(!a){s.onError(ut(32,t.loc));return}Uh(a);const{addIdentifiers:i,removeIdentifiers:l,scopes:r}=s,{source:o,value:c,key:d,index:u}=a,f={type:11,loc:t.loc,source:o,valueAlias:c,keyAlias:d,objectIndexAlias:u,parseResult:a,children:tr(e)?e.children:[e]};s.replaceNode(f),r.vFor++;const p=n&&n(f);return()=>{r.vFor--,p&&p()}}function Uh(e,t){e.finalized||(e.finalized=!0)}function Fo({value:e,key:t,index:s},n=[]){return t0([e,t,s,...n])}function t0(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((s,n)=>s||Fe("_".repeat(n+1),!1))}const ru=Fe("undefined",!1),s0=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const s=Rs(e,"slot");if(s)return s.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},n0=(e,t,s,n)=>Wa(e,s,!1,!0,s.length?s[0].loc:n);function a0(e,t,s=n0){t.helper(Fc);const{children:n,loc:a}=e,i=[],l=[];let r=t.scopes.vSlot>0||t.scopes.vFor>0;const o=Rs(e,"slot",!0);if(o){const{arg:E,exp:I}=o;E&&!hs(E)&&(r=!0),i.push(wt(E||Fe("default",!0),s(I,void 0,n,a)))}let c=!1,d=!1;const u=[],f=new Set;let p=0;for(let E=0;E{const m=s(I,void 0,x,a);return t.compatConfig&&(m.isNonScopedSlot=!0),wt("default",m)};c?u.length&&!u.every(zc)&&(d?t.onError(ut(39,u[0].loc)):i.push(E(void 0,u))):i.push(E(void 0,n))}const b=r?2:Ol(e.children)?3:1;let y=Is(i.concat(wt("_",Fe(b+"",!1))),a);return l.length&&(y=It(t.helper(bh),[y,na(l)])),{slots:y,hasDynamicSlots:r}}function xl(e,t,s){const n=[wt("name",e),wt("fn",t)];return s!=null&&n.push(wt("key",Fe(String(s),!0))),Is(n)}function Ol(e){for(let t=0;tfunction(){if(e=t.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:n,props:a}=e,i=e.tagType===1;let l=i?l0(e,t):`"${n}"`;const r=Xe(l)&&l.callee===Rc;let o,c,d=0,u,f,p,b=r||l===Ei||l===Sc||!i&&(n==="svg"||n==="foreignObject"||n==="math");if(a.length>0){const y=zh(e,t,void 0,i,r);o=y.props,d=y.patchFlag,f=y.dynamicPropNames;const E=y.directives;p=E&&E.length?na(E.map(I=>o0(I,t))):void 0,y.shouldUseBlock&&(b=!0)}if(e.children.length>0)if(l===Yl&&(b=!0,d|=1024),i&&l!==Ei&&l!==Yl){const{slots:E,hasDynamicSlots:I}=a0(e,t);c=E,I&&(d|=1024)}else if(e.children.length===1&&l!==Ei){const E=e.children[0],I=E.type,x=I===5||I===8;x&&ys(E,t)===0&&(d|=1),x||I===2?c=E:c=e.children}else c=e.children;f&&f.length&&(u=c0(f)),e.codegenNode=qi(t,l,o,c,d===0?void 0:d,u,p,!!b,!1,i,e.loc)};function l0(e,t,s=!1){let{tag:n}=e;const a=$o(n),i=Rr(e,"is",!1,!0);if(i)if(a||aa("COMPILER_IS_ON_ELEMENT",t)){let r;if(i.type===6?r=i.value&&Fe(i.value.content,!0):(r=i.exp,r||(r=Fe("is",!1,i.arg.loc))),r)return It(t.helper(Rc),[r])}else i.type===6&&i.value.content.startsWith("vue:")&&(n=i.value.content.slice(4));const l=_h(n)||t.isBuiltInComponent(n);return l?(s||t.helper(l),l):(t.helper(Ac),t.components.add(n),Ki(n,"component"))}function zh(e,t,s=e.props,n,a,i=!1){const{tag:l,loc:r,children:o}=e;let c=[];const d=[],u=[],f=o.length>0;let p=!1,b=0,y=!1,E=!1,I=!1,x=!1,m=!1,_=!1;const S=[],g=M=>{c.length&&(d.push(Is(ou(c),r)),c=[]),M&&d.push(M)},w=()=>{t.scopes.vFor>0&&c.push(wt(Fe("ref_for",!0),Fe("true")))},T=({key:M,value:H})=>{if(hs(M)){const P=M.content,R=ca(P);if(R&&(!n||a)&&P.toLowerCase()!=="onclick"&&P!=="onUpdate:modelValue"&&!bn(P)&&(x=!0),R&&bn(P)&&(_=!0),R&&H.type===14&&(H=H.arguments[0]),H.type===20||(H.type===4||H.type===8)&&ys(H,t)>0)return;P==="ref"?y=!0:P==="class"?E=!0:P==="style"?I=!0:P!=="key"&&!S.includes(P)&&S.push(P),n&&(P==="class"||P==="style")&&!S.includes(P)&&S.push(P)}else m=!0};for(let M=0;Mwe.content==="prop")&&(b|=32);const Y=t.directiveTransforms[P];if(Y){const{props:we,needRuntime:ke}=Y(H,e,t);!i&&we.forEach(T),N&&R&&!hs(R)?g(Is(we,r)):c.push(...we),ke&&(u.push(H),Jt(ke)&&Hh.set(H,ke))}else Xm(P)||(u.push(H),f&&(p=!0))}}let C;if(d.length?(g(),d.length>1?C=It(t.helper(Ql),d,r):C=d[0]):c.length&&(C=Is(ou(c),r)),m?b|=16:(E&&!n&&(b|=2),I&&!n&&(b|=4),S.length&&(b|=8),x&&(b|=32)),!p&&(b===0||b===32)&&(y||_||u.length>0)&&(b|=512),!t.inSSR&&C)switch(C.type){case 15:let M=-1,H=-1,P=!1;for(let Q=0;Qwt(l,i)),a))}return na(s,e.loc)}function c0(e){let t="[";for(let s=0,n=e.length;s{if(sr(e)){const{children:s,loc:n}=e,{slotName:a,slotProps:i}=u0(e,t),l=[t.prefixIdentifiers?"_ctx.$slots":"$slots",a,"{}","undefined","true"];let r=2;i&&(l[2]=i,r=3),s.length&&(l[3]=Wa([],s,!1,!1,n),r=4),t.scopeId&&!t.slotted&&(r=5),l.splice(r),e.codegenNode=It(t.helper(vh),l,n)}};function u0(e,t){let s='"default"',n;const a=[];for(let i=0;i0){const{props:i,directives:l}=zh(e,t,a,!1,!1);n=i,l.length&&t.onError(ut(36,l[0].loc))}return{slotName:s,slotProps:n}}const Vh=(e,t,s,n)=>{const{loc:a,modifiers:i,arg:l}=e;!e.exp&&!i.length&&s.onError(ut(35,a));let r;if(l.type===4)if(l.isStatic){let u=l.content;u.startsWith("vue:")&&(u=`vnode-${u.slice(4)}`);const f=t.tagType!==0||u.startsWith("vnode")||!/[A-Z]/.test(u)?Da(it(u)):`on:${u}`;r=Fe(f,!0,l.loc)}else r=Vs([`${s.helperString(Lo)}(`,l,")"]);else r=l,r.children.unshift(`${s.helperString(Lo)}(`),r.children.push(")");let o=e.exp;o&&!o.content.trim()&&(o=void 0);let c=s.cacheHandlers&&!o&&!s.inVOnce;if(o){const u=Sh(o),f=!(u||dx(o)),p=o.content.includes(";");(f||c&&u)&&(o=Vs([`${f?"$event":"(...args)"} => ${p?"{":"("}`,o,p?"}":")"]))}let d={props:[wt(r,o||Fe("() => {}",!1,a))]};return n&&(d=n(d)),c&&(d.props[0].value=s.cache(d.props[0].value)),d.props.forEach(u=>u.key.isHandlerKey=!0),d},f0=(e,t,s)=>{const{modifiers:n,loc:a}=e,i=e.arg;let{exp:l}=e;return l&&l.type===4&&!l.content.trim()&&(l=void 0),i.type!==4?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=i.content?`${i.content} || ""`:'""'),n.some(r=>r.content==="camel")&&(i.type===4?i.isStatic?i.content=it(i.content):i.content=`${s.helperString(No)}(${i.content})`:(i.children.unshift(`${s.helperString(No)}(`),i.children.push(")"))),s.inSSR||(n.some(r=>r.content==="prop")&&cu(i,"."),n.some(r=>r.content==="attr")&&cu(i,"^")),{props:[wt(i,l)]}},cu=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},p0=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const s=e.children;let n,a=!1;for(let i=0;ii.type===7&&!t.directiveTransforms[i.name])&&e.tag!=="template")))for(let i=0;i{if(e.type===1&&Rs(e,"once",!0))return du.has(e)||t.inVOnce||t.inSSR?void 0:(du.add(e),t.inVOnce=!0,t.helper(Xl),()=>{t.inVOnce=!1;const s=t.currentNode;s.codegenNode&&(s.codegenNode=t.cache(s.codegenNode,!0,!0))})},jh=(e,t,s)=>{const{exp:n,arg:a}=e;if(!n)return s.onError(ut(41,e.loc)),ui();const i=n.loc.source.trim(),l=n.type===4?n.content:i,r=s.bindingMetadata[i];if(r==="props"||r==="props-aliased")return s.onError(ut(44,n.loc)),ui();if(r==="literal-const"||r==="setup-const")return s.onError(ut(45,n.loc)),ui();if(!l.trim()||!Sh(n))return s.onError(ut(42,n.loc)),ui();const o=a||Fe("modelValue",!0),c=a?hs(a)?`onUpdate:${it(a.content)}`:Vs(['"onUpdate:" + ',a]):"onUpdate:modelValue";let d;const u=s.isTS?"($event: any)":"$event";d=Vs([`${u} => ((`,n,") = $event)"]);const f=[wt(o,e.exp),wt(c,d)];if(e.modifiers.length&&t.tagType===1){const p=e.modifiers.map(y=>y.content).map(y=>(Hc(y)?y:JSON.stringify(y))+": true").join(", "),b=a?hs(a)?`${a.content}Modifiers`:Vs([a,' + "Modifiers"']):"modelModifiers";f.push(wt(b,Fe(`{ ${p} }`,!1,e.loc,2)))}return ui(f)};function ui(e=[]){return{props:e}}const m0=/[\w).+\-_$\]]/,g0=(e,t)=>{aa("COMPILER_FILTERS",t)&&(e.type===5?ar(e.content,t):e.type===1&&e.props.forEach(s=>{s.type===7&&s.name!=="for"&&s.exp&&ar(s.exp,t)}))};function ar(e,t){if(e.type===4)uu(e,t);else for(let s=0;s=0&&(x=s.charAt(I),x===" ");I--);(!x||!m0.test(x))&&(l=!0)}}b===void 0?b=s.slice(0,p).trim():d!==0&&E();function E(){y.push(s.slice(d,p).trim()),d=p+1}if(y.length){for(p=0;p{if(e.type===1){const s=Rs(e,"memo");return!s||fu.has(e)||t.inSSR?void 0:(fu.add(e),()=>{const n=e.codegenNode||t.currentNode.codegenNode;n&&n.type===13&&(e.tagType!==1&&Bc(n,t),e.codegenNode=It(t.helper($c),[s.exp,Wa(void 0,n),"_cache",String(t.cached.length)]),t.cached.push(null))})}},y0=(e,t)=>{if(e.type===1){for(const s of e.props)if(s.type===7&&s.name==="bind"&&(!s.exp||s.exp.type===4&&!s.exp.content.trim())&&s.arg){const n=s.arg;if(n.type!==4||!n.isStatic)t.onError(ut(53,n.loc)),s.exp=Fe("",!0,n.loc);else{const a=it(n.content);(kh.test(a[0])||a[0]==="-")&&(s.exp=Fe(a,!1,n.loc))}}}};function x0(e){return[[y0,h0,Jx,b0,Xx,g0,d0,i0,s0,p0],{on:Vh,bind:f0,model:jh}]}function _0(e,t={}){const s=t.onError||Uc,n=t.mode==="module";t.prefixIdentifiers===!0?s(ut(48)):n&&s(ut(49));const a=!1;t.cacheHandlers&&s(ut(50)),t.scopeId&&!n&&s(ut(51));const i=ze({},t,{prefixIdentifiers:a}),l=Me(e)?Ex(e,i):e,[r,o]=x0();return Ox(l,ze({},i,{nodeTransforms:[...r,...t.nodeTransforms||[]],directiveTransforms:ze({},o,t.directiveTransforms||{})})),Mx(l,i)}const k0=()=>({props:[]});/** * @vue/compiler-dom v3.5.38 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const qh=Symbol(""),Gh=Symbol(""),Kh=Symbol(""),Wh=Symbol(""),Bo=Symbol(""),Zh=Symbol(""),Jh=Symbol(""),Yh=Symbol(""),Qh=Symbol(""),Xh=Symbol("");Xy({[qh]:"vModelRadio",[Gh]:"vModelCheckbox",[Kh]:"vModelText",[Wh]:"vModelSelect",[Bo]:"vModelDynamic",[Zh]:"withModifiers",[Jh]:"withKeys",[Yh]:"vShow",[Qh]:"Transition",[Xh]:"TransitionGroup"});let _a;function w0(e,t=!1){return _a||(_a=document.createElement("div")),t?(_a.innerHTML=`
`,_a.children[0].getAttribute("foo")):(_a.innerHTML=e,_a.textContent)}const S0={parseMode:"html",isVoidTag:gg,isNativeTag:e=>pg(e)||hg(e)||mg(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:w0,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return Qh;if(e==="TransitionGroup"||e==="transition-group")return Xh},getNamespace(e,t,s){let n=t?t.ns:s;if(t&&n===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(a=>a.type===6&&a.name==="encoding"&&a.value!=null&&(a.value.content==="text/html"||a.value.content==="application/xhtml+xml"))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(n=0);else t&&n===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(n=0);if(n===0){if(e==="svg")return 1;if(e==="math")return 2}return n}},T0=e=>{e.type===1&&e.props.forEach((t,s)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[s]={type:7,name:"bind",arg:Fe("style",!0,t.loc),exp:C0(t.value.content,t.loc),modifiers:[],loc:t.loc})})},C0=(e,t)=>{const s=ff(e);return Fe(JSON.stringify(s),!1,t,3)};function Un(e,t){return ut(e,t)}const E0=(e,t,s)=>{const{exp:n,loc:a}=e;return n||s.onError(Un(54,a)),t.children.length&&(s.onError(Un(55,a)),t.children.length=0),{props:[wt(Fe("innerHTML",!0,a),n||Fe("",!0))]}},A0=(e,t,s)=>{const{exp:n,loc:a}=e;return n||s.onError(Un(56,a)),t.children.length&&(s.onError(Un(57,a)),t.children.length=0),{props:[wt(Fe("textContent",!0),n?xs(n,s)>0?n:Ot(s.helperString(Ar),[n],a):Fe("",!0))]}},R0=(e,t,s)=>{const n=jh(e,t,s);if(!n.props.length||t.tagType===1)return n;e.arg&&s.onError(Un(59,e.arg.loc));const{tag:a}=t,i=s.isCustomElement(a);if(a==="input"||a==="textarea"||a==="select"||i){let l=Kh,r=!1;if(a==="input"||i){const o=Rr(t,"type");if(o){if(o.type===7)l=Bo;else if(o.value)switch(o.value.content){case"radio":l=qh;break;case"checkbox":l=Gh;break;case"file":r=!0,s.onError(Un(60,e.loc));break}}else ux(t)&&(l=Bo)}else a==="select"&&(l=Wh);r||(n.needRuntime=s.helper(l))}else s.onError(Un(58,e.loc));return n.props=n.props.filter(l=>!(l.key.type===4&&l.key.content==="modelValue")),n},I0=ws("passive,once,capture"),O0=ws("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),N0=ws("left,right"),em=ws("onkeyup,onkeydown,onkeypress"),L0=(e,t,s,n)=>{const a=[],i=[],l=[];for(let r=0;rms(e)&&e.content.toLowerCase()==="onclick"?Fe(t,!0):e.type!==4?Vs(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,D0=(e,t,s)=>Vh(e,t,s,n=>{const{modifiers:a}=e;if(!a.length)return n;let{key:i,value:l}=n.props[0];const{keyModifiers:r,nonKeyModifiers:o,eventOptionModifiers:c}=L0(i,a,s,e.loc);if(o.includes("right")&&(i=pu(i,"onContextmenu")),o.includes("middle")&&(i=pu(i,"onMouseup")),o.length&&(l=Ot(s.helper(Zh),[l,JSON.stringify(o)])),r.length&&(!ms(i)||em(i.content.toLowerCase()))&&(l=Ot(s.helper(Jh),[l,JSON.stringify(r)])),c.length){const d=c.map(da).join("");i=ms(i)?Fe(`${i.content}${d}`,!0):Vs(["(",i,`) + "${d}"`])}return{props:[wt(i,l)]}}),M0=(e,t,s)=>{const{exp:n,loc:a}=e;return n||s.onError(Un(62,a)),{props:[],needRuntime:s.helper(Yh)}},P0=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&t.removeNode()},F0=[T0],$0={cloak:k0,html:E0,text:A0,model:R0,on:D0,show:M0};function B0(e,t={}){return _0(e,ze({},S0,t,{nodeTransforms:[P0,...F0,...t.nodeTransforms||[]],directiveTransforms:ze({},$0,t.directiveTransforms||{}),transformHoist:null}))}/** +**/const qh=Symbol(""),Gh=Symbol(""),Kh=Symbol(""),Wh=Symbol(""),Bo=Symbol(""),Zh=Symbol(""),Jh=Symbol(""),Yh=Symbol(""),Qh=Symbol(""),Xh=Symbol("");Xy({[qh]:"vModelRadio",[Gh]:"vModelCheckbox",[Kh]:"vModelText",[Wh]:"vModelSelect",[Bo]:"vModelDynamic",[Zh]:"withModifiers",[Jh]:"withKeys",[Yh]:"vShow",[Qh]:"Transition",[Xh]:"TransitionGroup"});let ka;function w0(e,t=!1){return ka||(ka=document.createElement("div")),t?(ka.innerHTML=`
`,ka.children[0].getAttribute("foo")):(ka.innerHTML=e,ka.textContent)}const S0={parseMode:"html",isVoidTag:gg,isNativeTag:e=>pg(e)||hg(e)||mg(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:w0,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return Qh;if(e==="TransitionGroup"||e==="transition-group")return Xh},getNamespace(e,t,s){let n=t?t.ns:s;if(t&&n===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(a=>a.type===6&&a.name==="encoding"&&a.value!=null&&(a.value.content==="text/html"||a.value.content==="application/xhtml+xml"))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(n=0);else t&&n===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(n=0);if(n===0){if(e==="svg")return 1;if(e==="math")return 2}return n}},T0=e=>{e.type===1&&e.props.forEach((t,s)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[s]={type:7,name:"bind",arg:Fe("style",!0,t.loc),exp:C0(t.value.content,t.loc),modifiers:[],loc:t.loc})})},C0=(e,t)=>{const s=ff(e);return Fe(JSON.stringify(s),!1,t,3)};function Bn(e,t){return ut(e,t)}const E0=(e,t,s)=>{const{exp:n,loc:a}=e;return n||s.onError(Bn(54,a)),t.children.length&&(s.onError(Bn(55,a)),t.children.length=0),{props:[wt(Fe("innerHTML",!0,a),n||Fe("",!0))]}},A0=(e,t,s)=>{const{exp:n,loc:a}=e;return n||s.onError(Bn(56,a)),t.children.length&&(s.onError(Bn(57,a)),t.children.length=0),{props:[wt(Fe("textContent",!0),n?ys(n,s)>0?n:It(s.helperString(Ar),[n],a):Fe("",!0))]}},R0=(e,t,s)=>{const n=jh(e,t,s);if(!n.props.length||t.tagType===1)return n;e.arg&&s.onError(Bn(59,e.arg.loc));const{tag:a}=t,i=s.isCustomElement(a);if(a==="input"||a==="textarea"||a==="select"||i){let l=Kh,r=!1;if(a==="input"||i){const o=Rr(t,"type");if(o){if(o.type===7)l=Bo;else if(o.value)switch(o.value.content){case"radio":l=qh;break;case"checkbox":l=Gh;break;case"file":r=!0,s.onError(Bn(60,e.loc));break}}else ux(t)&&(l=Bo)}else a==="select"&&(l=Wh);r||(n.needRuntime=s.helper(l))}else s.onError(Bn(58,e.loc));return n.props=n.props.filter(l=>!(l.key.type===4&&l.key.content==="modelValue")),n},I0=ks("passive,once,capture"),O0=ks("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),N0=ks("left,right"),em=ks("onkeyup,onkeydown,onkeypress"),L0=(e,t,s,n)=>{const a=[],i=[],l=[];for(let r=0;rhs(e)&&e.content.toLowerCase()==="onclick"?Fe(t,!0):e.type!==4?Vs(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,D0=(e,t,s)=>Vh(e,t,s,n=>{const{modifiers:a}=e;if(!a.length)return n;let{key:i,value:l}=n.props[0];const{keyModifiers:r,nonKeyModifiers:o,eventOptionModifiers:c}=L0(i,a,s,e.loc);if(o.includes("right")&&(i=pu(i,"onContextmenu")),o.includes("middle")&&(i=pu(i,"onMouseup")),o.length&&(l=It(s.helper(Zh),[l,JSON.stringify(o)])),r.length&&(!hs(i)||em(i.content.toLowerCase()))&&(l=It(s.helper(Jh),[l,JSON.stringify(r)])),c.length){const d=c.map(ua).join("");i=hs(i)?Fe(`${i.content}${d}`,!0):Vs(["(",i,`) + "${d}"`])}return{props:[wt(i,l)]}}),M0=(e,t,s)=>{const{exp:n,loc:a}=e;return n||s.onError(Bn(62,a)),{props:[],needRuntime:s.helper(Yh)}},P0=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&t.removeNode()},F0=[T0],$0={cloak:k0,html:E0,text:A0,model:R0,on:D0,show:M0};function B0(e,t={}){return _0(e,ze({},S0,t,{nodeTransforms:[P0,...F0,...t.nodeTransforms||[]],directiveTransforms:ze({},$0,t.directiveTransforms||{}),transformHoist:null}))}/** * vue v3.5.38 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const hu=Object.create(null);function U0(e,t){if(!Me(e))if(e.nodeType)e=e.innerHTML;else return Ut;const s=sg(e,t),n=hu[s];if(n)return n;if(e[0]==="#"){const r=document.querySelector(e);e=r?r.innerHTML:""}const a=ze({hoistStatic:!0,onError:void 0,onWarn:Ut},t);!a.isCustomElement&&typeof customElements<"u"&&(a.isCustomElement=r=>!!customElements.get(r));const{code:i}=B0(e,a),l=new Function("Vue",i)(Ky);return l._rc=!0,hu[s]=l}Fp(U0);const ir=zn({items:[]});let H0=1;function Nr(e,t="info",s=3e3){const n=H0++;return ir.items.push({id:n,message:String(e),type:t}),s>0&&setTimeout(()=>qc(n),s),n}function qc(e){const t=ir.items.findIndex(s=>s.id===e);t>=0&&ir.items.splice(t,1)}function Ae(e,t="info",s=3e3){return Nr(e,t,s)}Ae.success=(e,t=3e3)=>Nr(e,"success",t);Ae.error=(e,t=5e3)=>Nr(e,"error",t);Ae.info=(e,t=3e3)=>Nr(e,"info",t);Ae.dismiss=qc;const z0={setup(){return{state:ir,dismiss:qc}},template:` +**/const hu=Object.create(null);function U0(e,t){if(!Me(e))if(e.nodeType)e=e.innerHTML;else return Ht;const s=sg(e,t),n=hu[s];if(n)return n;if(e[0]==="#"){const r=document.querySelector(e);e=r?r.innerHTML:""}const a=ze({hoistStatic:!0,onError:void 0,onWarn:Ht},t);!a.isCustomElement&&typeof customElements<"u"&&(a.isCustomElement=r=>!!customElements.get(r));const{code:i}=B0(e,a),l=new Function("Vue",i)(Ky);return l._rc=!0,hu[s]=l}Fp(U0);const ir=Hn({items:[]});let H0=1;function Nr(e,t="info",s=3e3){const n=H0++;return ir.items.push({id:n,message:String(e),type:t}),s>0&&setTimeout(()=>qc(n),s),n}function qc(e){const t=ir.items.findIndex(s=>s.id===e);t>=0&&ir.items.splice(t,1)}function Ae(e,t="info",s=3e3){return Nr(e,t,s)}Ae.success=(e,t=3e3)=>Nr(e,"success",t);Ae.error=(e,t=5e3)=>Nr(e,"error",t);Ae.info=(e,t=3e3)=>Nr(e,"info",t);Ae.dismiss=qc;const z0={setup(){return{state:ir,dismiss:qc}},template:`
t in e?Gm(e,t,{enumerable:!0,config
- `},hn=zn({open:!1,title:"Confirm",message:"",confirmLabel:"Confirm",cancelLabel:"Cancel",danger:!1});let Ba=null;function ks({title:e="Confirm",message:t="",confirmLabel:s="Confirm",cancelLabel:n="Cancel",danger:a=!1}={}){return Ba&&Ba(!1),hn.title=e,hn.message=t,hn.confirmLabel=s,hn.cancelLabel=n,hn.danger=a,hn.open=!0,new Promise(i=>{Ba=i})}function mu(e){hn.open=!1,Ba&&(Ba(e),Ba=null)}const V0={setup(){function e(t){hn.open&&t.key==="Escape"&&(t.stopPropagation(),mu(!1))}return We(()=>document.addEventListener("keydown",e,!0)),xt(()=>document.removeEventListener("keydown",e,!0)),{state:hn,settle:mu}},template:` + `},fn=Hn({open:!1,title:"Confirm",message:"",confirmLabel:"Confirm",cancelLabel:"Cancel",danger:!1});let Ua=null;function _s({title:e="Confirm",message:t="",confirmLabel:s="Confirm",cancelLabel:n="Cancel",danger:a=!1}={}){return Ua&&Ua(!1),fn.title=e,fn.message=t,fn.confirmLabel=s,fn.cancelLabel=n,fn.danger=a,fn.open=!0,new Promise(i=>{Ua=i})}function mu(e){fn.open=!1,Ua&&(Ua(e),Ua=null)}const V0={setup(){function e(t){fn.open&&t.key==="Escape"&&(t.stopPropagation(),mu(!1))}return We(()=>document.addEventListener("keydown",e,!0)),xt(()=>document.removeEventListener("keydown",e,!0)),{state:fn,settle:mu}},template:`
@@ -71,11 +71,11 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const Ea=typeof document<"u";function tm(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function j0(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&tm(e.default)}const st=Object.assign;function Xr(e,t){const s={};for(const n in t){const a=t[n];s[n]=qs(a)?a.map(e):e(a)}return s}const Ei=()=>{},qs=Array.isArray;function gu(e,t){const s={};for(const n in e)s[n]=n in t?t[n]:e[n];return s}const sm=/#/g,q0=/&/g,G0=/\//g,K0=/=/g,W0=/\?/g,nm=/\+/g,Z0=/%5B/g,J0=/%5D/g,am=/%5E/g,Y0=/%60/g,im=/%7B/g,Q0=/%7C/g,lm=/%7D/g,X0=/%20/g;function Gc(e){return e==null?"":encodeURI(""+e).replace(Q0,"|").replace(Z0,"[").replace(J0,"]")}function e_(e){return Gc(e).replace(im,"{").replace(lm,"}").replace(am,"^")}function Uo(e){return Gc(e).replace(nm,"%2B").replace(X0,"+").replace(sm,"%23").replace(q0,"%26").replace(Y0,"`").replace(im,"{").replace(lm,"}").replace(am,"^")}function t_(e){return Uo(e).replace(K0,"%3D")}function s_(e){return Gc(e).replace(sm,"%23").replace(W0,"%3F")}function n_(e){return s_(e).replace(G0,"%2F")}function Wi(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const a_=/\/$/,i_=e=>e.replace(a_,"");function eo(e,t,s="/"){let n,a={},i="",l="";const r=t.indexOf("#");let o=t.indexOf("?");return o=r>=0&&o>r?-1:o,o>=0&&(n=t.slice(0,o),i=t.slice(o,r>0?r:t.length),a=e(i.slice(1))),r>=0&&(n=n||t.slice(0,r),l=t.slice(r,t.length)),n=c_(n??t,s),{fullPath:n+i+l,path:n,query:a,hash:Wi(l)}}function l_(e,t){const s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function vu(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function r_(e,t,s){const n=t.matched.length-1,a=s.matched.length-1;return n>-1&&n===a&&Ja(t.matched[n],s.matched[a])&&rm(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function Ja(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function rm(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var s in e)if(!o_(e[s],t[s]))return!1;return!0}function o_(e,t){return qs(e)?bu(e,t):qs(t)?bu(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function bu(e,t){return qs(t)?e.length===t.length&&e.every((s,n)=>s===t[n]):e.length===1&&e[0]===t}function c_(e,t){if(e.startsWith("/"))return e;if(!e)return t;const s=t.split("/"),n=e.split("/"),a=n[n.length-1];(a===".."||a===".")&&n.push("");let i=s.length-1,l,r;for(l=0;l1&&i--;else break;return s.slice(0,i).join("/")+"/"+n.slice(l).join("/")}const Nn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Ho=(function(e){return e.pop="pop",e.push="push",e})({}),to=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function d_(e){if(!e)if(Ea){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),i_(e)}const u_=/^[^#]+#/;function f_(e,t){return e.replace(u_,"#")+t}function p_(e,t){const s=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-s.left-(t.left||0),top:n.top-s.top-(t.top||0)}}const Lr=()=>({left:window.scrollX,top:window.scrollY});function h_(e){let t;if("el"in e){const s=e.el,n=typeof s=="string"&&s.startsWith("#"),a=typeof s=="string"?n?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!a)return;t=p_(a,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function yu(e,t){return(history.state?history.state.position-t:-1)+e}const zo=new Map;function m_(e,t){zo.set(e,t)}function g_(e){const t=zo.get(e);return zo.delete(e),t}function v_(e){return typeof e=="string"||e&&typeof e=="object"}function om(e){return typeof e=="string"||typeof e=="symbol"}let mt=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const cm=Symbol("");mt.MATCHER_NOT_FOUND+"",mt.NAVIGATION_GUARD_REDIRECT+"",mt.NAVIGATION_ABORTED+"",mt.NAVIGATION_CANCELLED+"",mt.NAVIGATION_DUPLICATED+"";function Ya(e,t){return st(new Error,{type:e,[cm]:!0},t)}function cn(e,t){return e instanceof Error&&cm in e&&(t==null||!!(e.type&t))}const b_=["params","query","hash"];function y_(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const s of b_)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function x_(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let n=0;na&&Uo(a)):[n&&Uo(n)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+s,a!=null&&(t+="="+a))})}return t}function __(e){const t={};for(const s in e){const n=e[s];n!==void 0&&(t[s]=qs(n)?n.map(a=>a==null?null:""+a):n==null?n:""+n)}return t}const k_=Symbol(""),_u=Symbol(""),Dr=Symbol(""),Kc=Symbol(""),Vo=Symbol("");function ui(){let e=[];function t(n){return e.push(n),()=>{const a=e.indexOf(n);a>-1&&e.splice(a,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function $n(e,t,s,n,a,i=l=>l()){const l=n&&(n.enterCallbacks[a]=n.enterCallbacks[a]||[]);return()=>new Promise((r,o)=>{const c=f=>{f===!1?o(Ya(mt.NAVIGATION_ABORTED,{from:s,to:t})):f instanceof Error?o(f):v_(f)?o(Ya(mt.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(l&&n.enterCallbacks[a]===l&&typeof f=="function"&&l.push(f),r())},d=i(()=>e.call(n&&n.instances[a],t,s,c));let u=Promise.resolve(d);e.length<3&&(u=u.then(c)),u.catch(f=>o(f))})}function so(e,t,s,n,a=i=>i()){const i=[];for(const l of e)for(const r in l.components){let o=l.components[r];if(!(t!=="beforeRouteEnter"&&!l.instances[r]))if(tm(o)){const c=(o.__vccOpts||o)[t];c&&i.push($n(c,s,n,l,r,a))}else{let c=o();i.push(()=>c.then(d=>{if(!d)throw new Error(`Couldn't resolve component "${r}" at "${l.path}"`);const u=j0(d)?d.default:d;l.mods[r]=d,l.components[r]=u;const f=(u.__vccOpts||u)[t];return f&&$n(f,s,n,l,r,a)()}))}}return i}function w_(e,t){const s=[],n=[],a=[],i=Math.max(t.matched.length,e.matched.length);for(let l=0;lJa(c,r))?n.push(r):s.push(r));const o=e.matched[l];o&&(t.matched.find(c=>Ja(c,o))||a.push(o))}return[s,n,a]}/*! + */const Aa=typeof document<"u";function tm(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function j0(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&tm(e.default)}const nt=Object.assign;function Xr(e,t){const s={};for(const n in t){const a=t[n];s[n]=qs(a)?a.map(e):e(a)}return s}const Ai=()=>{},qs=Array.isArray;function gu(e,t){const s={};for(const n in e)s[n]=n in t?t[n]:e[n];return s}const sm=/#/g,q0=/&/g,G0=/\//g,K0=/=/g,W0=/\?/g,nm=/\+/g,Z0=/%5B/g,J0=/%5D/g,am=/%5E/g,Y0=/%60/g,im=/%7B/g,Q0=/%7C/g,lm=/%7D/g,X0=/%20/g;function Gc(e){return e==null?"":encodeURI(""+e).replace(Q0,"|").replace(Z0,"[").replace(J0,"]")}function e_(e){return Gc(e).replace(im,"{").replace(lm,"}").replace(am,"^")}function Uo(e){return Gc(e).replace(nm,"%2B").replace(X0,"+").replace(sm,"%23").replace(q0,"%26").replace(Y0,"`").replace(im,"{").replace(lm,"}").replace(am,"^")}function t_(e){return Uo(e).replace(K0,"%3D")}function s_(e){return Gc(e).replace(sm,"%23").replace(W0,"%3F")}function n_(e){return s_(e).replace(G0,"%2F")}function Zi(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const a_=/\/$/,i_=e=>e.replace(a_,"");function eo(e,t,s="/"){let n,a={},i="",l="";const r=t.indexOf("#");let o=t.indexOf("?");return o=r>=0&&o>r?-1:o,o>=0&&(n=t.slice(0,o),i=t.slice(o,r>0?r:t.length),a=e(i.slice(1))),r>=0&&(n=n||t.slice(0,r),l=t.slice(r,t.length)),n=c_(n??t,s),{fullPath:n+i+l,path:n,query:a,hash:Zi(l)}}function l_(e,t){const s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function vu(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function r_(e,t,s){const n=t.matched.length-1,a=s.matched.length-1;return n>-1&&n===a&&Ya(t.matched[n],s.matched[a])&&rm(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function Ya(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function rm(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var s in e)if(!o_(e[s],t[s]))return!1;return!0}function o_(e,t){return qs(e)?bu(e,t):qs(t)?bu(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function bu(e,t){return qs(t)?e.length===t.length&&e.every((s,n)=>s===t[n]):e.length===1&&e[0]===t}function c_(e,t){if(e.startsWith("/"))return e;if(!e)return t;const s=t.split("/"),n=e.split("/"),a=n[n.length-1];(a===".."||a===".")&&n.push("");let i=s.length-1,l,r;for(l=0;l1&&i--;else break;return s.slice(0,i).join("/")+"/"+n.slice(l).join("/")}const On={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Ho=(function(e){return e.pop="pop",e.push="push",e})({}),to=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function d_(e){if(!e)if(Aa){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),i_(e)}const u_=/^[^#]+#/;function f_(e,t){return e.replace(u_,"#")+t}function p_(e,t){const s=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-s.left-(t.left||0),top:n.top-s.top-(t.top||0)}}const Lr=()=>({left:window.scrollX,top:window.scrollY});function h_(e){let t;if("el"in e){const s=e.el,n=typeof s=="string"&&s.startsWith("#"),a=typeof s=="string"?n?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!a)return;t=p_(a,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function yu(e,t){return(history.state?history.state.position-t:-1)+e}const zo=new Map;function m_(e,t){zo.set(e,t)}function g_(e){const t=zo.get(e);return zo.delete(e),t}function v_(e){return typeof e=="string"||e&&typeof e=="object"}function om(e){return typeof e=="string"||typeof e=="symbol"}let mt=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const cm=Symbol("");mt.MATCHER_NOT_FOUND+"",mt.NAVIGATION_GUARD_REDIRECT+"",mt.NAVIGATION_ABORTED+"",mt.NAVIGATION_CANCELLED+"",mt.NAVIGATION_DUPLICATED+"";function Qa(e,t){return nt(new Error,{type:e,[cm]:!0},t)}function rn(e,t){return e instanceof Error&&cm in e&&(t==null||!!(e.type&t))}const b_=["params","query","hash"];function y_(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const s of b_)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function x_(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let n=0;na&&Uo(a)):[n&&Uo(n)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+s,a!=null&&(t+="="+a))})}return t}function __(e){const t={};for(const s in e){const n=e[s];n!==void 0&&(t[s]=qs(n)?n.map(a=>a==null?null:""+a):n==null?n:""+n)}return t}const k_=Symbol(""),_u=Symbol(""),Dr=Symbol(""),Kc=Symbol(""),Vo=Symbol("");function fi(){let e=[];function t(n){return e.push(n),()=>{const a=e.indexOf(n);a>-1&&e.splice(a,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Fn(e,t,s,n,a,i=l=>l()){const l=n&&(n.enterCallbacks[a]=n.enterCallbacks[a]||[]);return()=>new Promise((r,o)=>{const c=f=>{f===!1?o(Qa(mt.NAVIGATION_ABORTED,{from:s,to:t})):f instanceof Error?o(f):v_(f)?o(Qa(mt.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(l&&n.enterCallbacks[a]===l&&typeof f=="function"&&l.push(f),r())},d=i(()=>e.call(n&&n.instances[a],t,s,c));let u=Promise.resolve(d);e.length<3&&(u=u.then(c)),u.catch(f=>o(f))})}function so(e,t,s,n,a=i=>i()){const i=[];for(const l of e)for(const r in l.components){let o=l.components[r];if(!(t!=="beforeRouteEnter"&&!l.instances[r]))if(tm(o)){const c=(o.__vccOpts||o)[t];c&&i.push(Fn(c,s,n,l,r,a))}else{let c=o();i.push(()=>c.then(d=>{if(!d)throw new Error(`Couldn't resolve component "${r}" at "${l.path}"`);const u=j0(d)?d.default:d;l.mods[r]=d,l.components[r]=u;const f=(u.__vccOpts||u)[t];return f&&Fn(f,s,n,l,r,a)()}))}}return i}function w_(e,t){const s=[],n=[],a=[],i=Math.max(t.matched.length,e.matched.length);for(let l=0;lYa(c,r))?n.push(r):s.push(r));const o=e.matched[l];o&&(t.matched.find(c=>Ya(c,o))||a.push(o))}return[s,n,a]}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let S_=()=>location.protocol+"//"+location.host;function dm(e,t){const{pathname:s,search:n,hash:a}=t,i=e.indexOf("#");if(i>-1){let l=a.includes(e.slice(i))?e.slice(i).length:1,r=a.slice(l);return r[0]!=="/"&&(r="/"+r),vu(r,"")}return vu(s,e)+n+a}function T_(e,t,s,n){let a=[],i=[],l=null;const r=({state:f})=>{const p=dm(e,location),b=s.value,y=t.value;let E=0;if(f){if(s.value=p,t.value=f,l&&l===b){l=null;return}E=y?f.position-y.position:0}else n(p);a.forEach(I=>{I(s.value,b,{delta:E,type:Ho.pop,direction:E?E>0?to.forward:to.back:to.unknown})})};function o(){l=s.value}function c(f){a.push(f);const p=()=>{const b=a.indexOf(f);b>-1&&a.splice(b,1)};return i.push(p),p}function d(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(st({},f.state,{scroll:Lr()}),"")}}function u(){for(const f of i)f();i=[],window.removeEventListener("popstate",r),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d)}return window.addEventListener("popstate",r),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d),{pauseListeners:o,listen:c,destroy:u}}function ku(e,t,s,n=!1,a=!1){return{back:e,current:t,forward:s,replaced:n,position:window.history.length,scroll:a?Lr():null}}function C_(e){const{history:t,location:s}=window,n={value:dm(e,s)},a={value:t.state};a.value||i(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(o,c,d){const u=e.indexOf("#"),f=u>-1?(s.host&&document.querySelector("base")?e:e.slice(u))+o:S_()+e+o;try{t[d?"replaceState":"pushState"](c,"",f),a.value=c}catch(p){console.error(p),s[d?"replace":"assign"](f)}}function l(o,c){i(o,st({},t.state,ku(a.value.back,o,a.value.forward,!0),c,{position:a.value.position}),!0),n.value=o}function r(o,c){const d=st({},a.value,t.state,{forward:o,scroll:Lr()});i(d.current,d,!0),i(o,st({},ku(n.value,o,null),{position:d.position+1},c),!1),n.value=o}return{location:n,state:a,push:r,replace:l}}function E_(e){e=d_(e);const t=C_(e),s=T_(e,t.state,t.location,t.replace);function n(i,l=!0){l||s.pauseListeners(),history.go(i)}const a=st({location:"",base:e,go:n,createHref:f_.bind(null,e)},t,s);return Object.defineProperty(a,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(a,"state",{enumerable:!0,get:()=>t.state.value}),a}function A_(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),E_(e)}let Qn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var At=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(At||{});const R_={type:Qn.Static,value:""},I_=/[a-zA-Z0-9_]/;function O_(e){if(!e)return[[]];if(e==="/")return[[R_]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${s})/"${c}": ${p}`)}let s=At.Static,n=s;const a=[];let i;function l(){i&&a.push(i),i=[]}let r=0,o,c="",d="";function u(){c&&(s===At.Static?i.push({type:Qn.Static,value:c}):s===At.Param||s===At.ParamRegExp||s===At.ParamRegExpEnd?(i.length>1&&(o==="*"||o==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Qn.Param,value:c,regexp:d,repeatable:o==="*"||o==="+",optional:o==="*"||o==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=o}for(;rt.length?t.length===1&&t[0]===Qt.Static+Qt.Segment?1:-1:0}function um(e,t){let s=0;const n=e.score,a=t.score;for(;s0&&t[t.length-1]<0}const P_={strict:!1,end:!0,sensitive:!1};function F_(e,t,s){const n=D_(O_(e.path),s),a=st(n,{record:e,parent:t,children:[],alias:[]});return t&&!a.record.aliasOf==!t.record.aliasOf&&t.children.push(a),a}function $_(e,t){const s=[],n=new Map;t=gu(P_,t);function a(u){return n.get(u)}function i(u,f,p){const b=!p,y=Cu(u);y.aliasOf=p&&p.record;const E=gu(t,u),I=[y];if("alias"in u){const _=typeof u.alias=="string"?[u.alias]:u.alias;for(const S of _)I.push(Cu(st({},y,{components:p?p.record.components:y.components,path:S,aliasOf:p?p.record:y})))}let x,m;for(const _ of I){const{path:S}=_;if(f&&S[0]!=="/"){const g=f.record.path,w=g[g.length-1]==="/"?"":"/";_.path=f.record.path+(S&&w+S)}if(x=F_(_,f,E),p?p.alias.push(x):(m=m||x,m!==x&&m.alias.push(x),b&&u.name&&!Eu(x)&&l(u.name)),fm(x)&&o(x),y.children){const g=y.children;for(let w=0;w{l(m)}:Ei}function l(u){if(om(u)){const f=n.get(u);f&&(n.delete(u),s.splice(s.indexOf(f),1),f.children.forEach(l),f.alias.forEach(l))}else{const f=s.indexOf(u);f>-1&&(s.splice(f,1),u.record.name&&n.delete(u.record.name),u.children.forEach(l),u.alias.forEach(l))}}function r(){return s}function o(u){const f=H_(u,s);s.splice(f,0,u),u.record.name&&!Eu(u)&&n.set(u.record.name,u)}function c(u,f){let p,b={},y,E;if("name"in u&&u.name){if(p=n.get(u.name),!p)throw Ya(mt.MATCHER_NOT_FOUND,{location:u});E=p.record.name,b=st(Tu(f.params,p.keys.filter(m=>!m.optional).concat(p.parent?p.parent.keys.filter(m=>m.optional):[]).map(m=>m.name)),u.params&&Tu(u.params,p.keys.map(m=>m.name))),y=p.stringify(b)}else if(u.path!=null)y=u.path,p=s.find(m=>m.re.test(y)),p&&(b=p.parse(y),E=p.record.name);else{if(p=f.name?n.get(f.name):s.find(m=>m.re.test(f.path)),!p)throw Ya(mt.MATCHER_NOT_FOUND,{location:u,currentLocation:f});E=p.record.name,b=st({},f.params,u.params),y=p.stringify(b)}const I=[];let x=p;for(;x;)I.unshift(x.record),x=x.parent;return{name:E,path:y,params:b,matched:I,meta:U_(I)}}e.forEach(u=>i(u));function d(){s.length=0,n.clear()}return{addRoute:i,resolve:c,removeRoute:l,clearRoutes:d,getRoutes:r,getRecordMatcher:a}}function Tu(e,t){const s={};for(const n of t)n in e&&(s[n]=e[n]);return s}function Cu(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:B_(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function B_(e){const t={},s=e.props||!1;if("component"in e)t.default=s;else for(const n in e.components)t[n]=typeof s=="object"?s[n]:s;return t}function Eu(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function U_(e){return e.reduce((t,s)=>st(t,s.meta),{})}function H_(e,t){let s=0,n=t.length;for(;s!==n;){const i=s+n>>1;um(e,t[i])<0?n=i:s=i+1}const a=z_(e);return a&&(n=t.lastIndexOf(a,n-1)),n}function z_(e){let t=e;for(;t=t.parent;)if(fm(t)&&um(e,t)===0)return t}function fm({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Au(e){const t=Ns(Dr),s=Ns(Kc),n=J(()=>{const o=sn(e.to);return t.resolve(o)}),a=J(()=>{const{matched:o}=n.value,{length:c}=o,d=o[c-1],u=s.matched;if(!d||!u.length)return-1;const f=u.findIndex(Ja.bind(null,d));if(f>-1)return f;const p=Ru(o[c-2]);return c>1&&Ru(d)===p&&u[u.length-1].path!==p?u.findIndex(Ja.bind(null,o[c-2])):f}),i=J(()=>a.value>-1&&K_(s.params,n.value.params)),l=J(()=>a.value>-1&&a.value===s.matched.length-1&&rm(s.params,n.value.params));function r(o={}){if(G_(o)){const c=t[sn(e.replace)?"replace":"push"](sn(e.to)).catch(Ei);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:n,href:J(()=>n.value.href),isActive:i,isExactActive:l,navigate:r}}function V_(e){return e.length===1?e[0]:e}const j_=Xi({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Au,setup(e,{slots:t}){const s=zn(Au(e)),{options:n}=Ns(Dr),a=J(()=>({[Iu(e.activeClass,n.linkActiveClass,"router-link-active")]:s.isActive,[Iu(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{const i=t.default&&V_(t.default(s));return e.custom?i:Va("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:a.value},i)}}}),q_=j_;function G_(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function K_(e,t){for(const s in t){const n=t[s],a=e[s];if(typeof n=="string"){if(n!==a)return!1}else if(!qs(a)||a.length!==n.length||n.some((i,l)=>i.valueOf()!==a[l].valueOf()))return!1}return!0}function Ru(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Iu=(e,t,s)=>e??t??s,W_=Xi({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){const n=Ns(Vo),a=J(()=>e.route||n.value),i=Ns(_u,0),l=J(()=>{let c=sn(i);const{matched:d}=a.value;let u;for(;(u=d[c])&&!u.components;)c++;return c}),r=J(()=>a.value.matched[l.value]);ki(_u,J(()=>l.value+1)),ki(k_,r),ki(Vo,a);const o=h();return ts(()=>[o.value,r.value,e.name],([c,d,u],[f,p,b])=>{d&&(d.instances[u]=c,p&&p!==d&&c&&c===f&&(d.leaveGuards.size||(d.leaveGuards=p.leaveGuards),d.updateGuards.size||(d.updateGuards=p.updateGuards))),c&&d&&(!p||!Ja(d,p)||!f)&&(d.enterCallbacks[u]||[]).forEach(y=>y(c))},{flush:"post"}),()=>{const c=a.value,d=e.name,u=r.value,f=u&&u.components[d];if(!f)return Ou(s.default,{Component:f,route:c});const p=u.props[d],b=p?p===!0?c.params:typeof p=="function"?p(c):p:null,E=Va(f,st({},b,t,{onVnodeUnmounted:I=>{I.component.isUnmounted&&(u.instances[d]=null)},ref:o}));return Ou(s.default,{Component:E,route:c})||E}}});function Ou(e,t){if(!e)return null;const s=e(t);return s.length===1?s[0]:s}const Z_=W_;function J_(e){const t=$_(e.routes,e),s=e.parseQuery||x_,n=e.stringifyQuery||xu,a=e.history,i=ui(),l=ui(),r=ui(),o=nc(Nn);let c=Nn;Ea&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=Xr.bind(null,V=>""+V),u=Xr.bind(null,n_),f=Xr.bind(null,Wi);function p(V,de){let ce,_e;return om(V)?(ce=t.getRecordMatcher(V),_e=de):_e=V,t.addRoute(_e,ce)}function b(V){const de=t.getRecordMatcher(V);de&&t.removeRoute(de)}function y(){return t.getRoutes().map(V=>V.record)}function E(V){return!!t.getRecordMatcher(V)}function I(V,de){if(de=st({},de||o.value),typeof V=="string"){const L=eo(s,V,de.path),$=t.resolve({path:L.path},de),ee=a.createHref(L.fullPath);return st(L,$,{params:f($.params),hash:Wi(L.hash),redirectedFrom:void 0,href:ee})}let ce;if(V.path!=null)ce=st({},V,{path:eo(s,V.path,de.path).path});else{const L=st({},V.params);for(const $ in L)L[$]==null&&delete L[$];ce=st({},V,{params:u(L)}),de.params=u(de.params)}const _e=t.resolve(ce,de),ve=V.hash||"";_e.params=d(f(_e.params));const He=l_(n,st({},V,{hash:e_(ve),path:_e.path})),k=a.createHref(He);return st({fullPath:He,hash:ve,query:n===xu?__(V.query):V.query||{}},_e,{redirectedFrom:void 0,href:k})}function x(V){return typeof V=="string"?eo(s,V,o.value.path):st({},V)}function m(V,de){if(c!==V)return Ya(mt.NAVIGATION_CANCELLED,{from:de,to:V})}function _(V){return w(V)}function S(V){return _(st(x(V),{replace:!0}))}function g(V,de){const ce=V.matched[V.matched.length-1];if(ce&&ce.redirect){const{redirect:_e}=ce;let ve=typeof _e=="function"?_e(V,de):_e;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=x(ve):{path:ve},ve.params={}),st({query:V.query,hash:V.hash,params:ve.path!=null?{}:V.params},ve)}}function w(V,de){const ce=c=I(V),_e=o.value,ve=V.state,He=V.force,k=V.replace===!0,L=g(ce,_e);if(L)return w(st(x(L),{state:typeof L=="object"?st({},ve,L.state):ve,force:He,replace:k}),de||ce);const $=ce;$.redirectedFrom=de;let ee;return!He&&r_(n,_e,ce)&&(ee=Ya(mt.NAVIGATION_DUPLICATED,{to:$,from:_e}),ke(_e,_e,!0,!1)),(ee?Promise.resolve(ee):M($,_e)).catch(Z=>cn(Z)?cn(Z,mt.NAVIGATION_GUARD_REDIRECT)?Z:we(Z):N(Z,$,_e)).then(Z=>{if(Z){if(cn(Z,mt.NAVIGATION_GUARD_REDIRECT))return w(st({replace:k},x(Z.to),{state:typeof Z.to=="object"?st({},ve,Z.to.state):ve,force:He}),de||$)}else Z=P($,_e,!0,k,ve);return H($,_e,Z),Z})}function T(V,de){const ce=m(V,de);return ce?Promise.reject(ce):Promise.resolve()}function C(V){const de=F.values().next().value;return de&&typeof de.runWithContext=="function"?de.runWithContext(V):V()}function M(V,de){let ce;const[_e,ve,He]=w_(V,de);ce=so(_e.reverse(),"beforeRouteLeave",V,de);for(const L of _e)L.leaveGuards.forEach($=>{ce.push($n($,V,de))});const k=T.bind(null,V,de);return ce.push(k),Se(ce).then(()=>{ce=[];for(const L of i.list())ce.push($n(L,V,de));return ce.push(k),Se(ce)}).then(()=>{ce=so(ve,"beforeRouteUpdate",V,de);for(const L of ve)L.updateGuards.forEach($=>{ce.push($n($,V,de))});return ce.push(k),Se(ce)}).then(()=>{ce=[];for(const L of He)if(L.beforeEnter)if(qs(L.beforeEnter))for(const $ of L.beforeEnter)ce.push($n($,V,de));else ce.push($n(L.beforeEnter,V,de));return ce.push(k),Se(ce)}).then(()=>(V.matched.forEach(L=>L.enterCallbacks={}),ce=so(He,"beforeRouteEnter",V,de,C),ce.push(k),Se(ce))).then(()=>{ce=[];for(const L of l.list())ce.push($n(L,V,de));return ce.push(k),Se(ce)}).catch(L=>cn(L,mt.NAVIGATION_CANCELLED)?L:Promise.reject(L))}function H(V,de,ce){r.list().forEach(_e=>C(()=>_e(V,de,ce)))}function P(V,de,ce,_e,ve){const He=m(V,de);if(He)return He;const k=de===Nn,L=Ea?history.state:{};ce&&(_e||k?a.replace(V.fullPath,st({scroll:k&&L&&L.scroll},ve)):a.push(V.fullPath,ve)),o.value=V,ke(V,de,ce,k),we()}let R;function j(){R||(R=a.listen((V,de,ce)=>{if(!se.listening)return;const _e=I(V),ve=g(_e,se.currentRoute.value);if(ve){w(st(ve,{replace:!0,force:!0}),_e).catch(Ei);return}c=_e;const He=o.value;Ea&&m_(yu(He.fullPath,ce.delta),Lr()),M(_e,He).catch(k=>cn(k,mt.NAVIGATION_ABORTED|mt.NAVIGATION_CANCELLED)?k:cn(k,mt.NAVIGATION_GUARD_REDIRECT)?(w(st(x(k.to),{force:!0}),_e).then(L=>{cn(L,mt.NAVIGATION_ABORTED|mt.NAVIGATION_DUPLICATED)&&!ce.delta&&ce.type===Ho.pop&&a.go(-1,!1)}).catch(Ei),Promise.reject()):(ce.delta&&a.go(-ce.delta,!1),N(k,_e,He))).then(k=>{k=k||P(_e,He,!1),k&&(ce.delta&&!cn(k,mt.NAVIGATION_CANCELLED)?a.go(-ce.delta,!1):ce.type===Ho.pop&&cn(k,mt.NAVIGATION_ABORTED|mt.NAVIGATION_DUPLICATED)&&a.go(-1,!1)),H(_e,He,k)}).catch(Ei)}))}let Q=ui(),U=ui(),O;function N(V,de,ce){we(V);const _e=U.list();return _e.length?_e.forEach(ve=>ve(V,de,ce)):console.error(V),Promise.reject(V)}function Y(){return O&&o.value!==Nn?Promise.resolve():new Promise((V,de)=>{Q.add([V,de])})}function we(V){return O||(O=!V,j(),Q.list().forEach(([de,ce])=>V?ce(V):de()),Q.reset()),V}function ke(V,de,ce,_e){const{scrollBehavior:ve}=e;if(!Ea||!ve)return Promise.resolve();const He=!ce&&g_(yu(V.fullPath,0))||(_e||!ce)&&history.state&&history.state.scroll||null;return It().then(()=>ve(V,de,He)).then(k=>k&&h_(k)).catch(k=>N(k,V,de))}const ie=V=>a.go(V);let pe;const F=new Set,se={currentRoute:o,listening:!0,addRoute:p,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:E,getRoutes:y,resolve:I,options:e,push:_,replace:S,go:ie,back:()=>ie(-1),forward:()=>ie(1),beforeEach:i.add,beforeResolve:l.add,afterEach:r.add,onError:U.add,isReady:Y,install(V){V.component("RouterLink",q_),V.component("RouterView",Z_),V.config.globalProperties.$router=se,Object.defineProperty(V.config.globalProperties,"$route",{enumerable:!0,get:()=>sn(o)}),Ea&&!pe&&o.value===Nn&&(pe=!0,_(a.location).catch(_e=>{}));const de={};for(const _e in Nn)Object.defineProperty(de,_e,{get:()=>o.value[_e],enumerable:!0});V.provide(Dr,se),V.provide(Kc,sc(de)),V.provide(Vo,o);const ce=V.unmount;F.add(V),V.unmount=function(){F.delete(V),F.size<1&&(c=Nn,R&&R(),R=null,o.value=Nn,pe=!1,O=!1),ce()}}};function Se(V){return V.reduce((de,ce)=>de.then(()=>C(ce)),Promise.resolve())}return se}function pm(){return Ns(Dr)}function Y_(e){return Ns(Kc)}const Mr={props:{tabs:{type:Array,required:!0},defaultTab:{type:String,default:""},groupLabel:{type:String,default:""}},setup(e){const t=Y_(),s=pm(),n=J({get(){var o;const r=t.query.tab;return r&&e.tabs.some(c=>c.id===r)?r:e.defaultTab||((o=e.tabs[0])==null?void 0:o.id)||""},set(r){s.replace({query:{...t.query,tab:r}})}}),a=J(()=>{var r;return((r=e.tabs.find(o=>o.id===n.value))==null?void 0:r.component)||null}),i=J(()=>{var r;return((r=e.tabs.find(o=>o.id===n.value))==null?void 0:r.label)||""});ts(i,r=>{e.groupLabel&&r&&(document.title=`Odin — ${e.groupLabel} › ${r}`)},{immediate:!0});function l(r,o){if(!["ArrowLeft","ArrowRight","Home","End"].includes(r.key))return;r.preventDefault();let c=o;r.key==="ArrowRight"&&(c=(o+1)%e.tabs.length),r.key==="ArrowLeft"&&(c=(o-1+e.tabs.length)%e.tabs.length),r.key==="Home"&&(c=0),r.key==="End"&&(c=e.tabs.length-1),n.value=e.tabs[c].id,requestAnimationFrame(()=>{var d;return(d=document.getElementById("tab-"+e.tabs[c].id))==null?void 0:d.focus()})}return{activeTab:n,activeComponent:a,activeLabel:i,onTabKeydown:l}},template:` + */let S_=()=>location.protocol+"//"+location.host;function dm(e,t){const{pathname:s,search:n,hash:a}=t,i=e.indexOf("#");if(i>-1){let l=a.includes(e.slice(i))?e.slice(i).length:1,r=a.slice(l);return r[0]!=="/"&&(r="/"+r),vu(r,"")}return vu(s,e)+n+a}function T_(e,t,s,n){let a=[],i=[],l=null;const r=({state:f})=>{const p=dm(e,location),b=s.value,y=t.value;let E=0;if(f){if(s.value=p,t.value=f,l&&l===b){l=null;return}E=y?f.position-y.position:0}else n(p);a.forEach(I=>{I(s.value,b,{delta:E,type:Ho.pop,direction:E?E>0?to.forward:to.back:to.unknown})})};function o(){l=s.value}function c(f){a.push(f);const p=()=>{const b=a.indexOf(f);b>-1&&a.splice(b,1)};return i.push(p),p}function d(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(nt({},f.state,{scroll:Lr()}),"")}}function u(){for(const f of i)f();i=[],window.removeEventListener("popstate",r),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d)}return window.addEventListener("popstate",r),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d),{pauseListeners:o,listen:c,destroy:u}}function ku(e,t,s,n=!1,a=!1){return{back:e,current:t,forward:s,replaced:n,position:window.history.length,scroll:a?Lr():null}}function C_(e){const{history:t,location:s}=window,n={value:dm(e,s)},a={value:t.state};a.value||i(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(o,c,d){const u=e.indexOf("#"),f=u>-1?(s.host&&document.querySelector("base")?e:e.slice(u))+o:S_()+e+o;try{t[d?"replaceState":"pushState"](c,"",f),a.value=c}catch(p){console.error(p),s[d?"replace":"assign"](f)}}function l(o,c){i(o,nt({},t.state,ku(a.value.back,o,a.value.forward,!0),c,{position:a.value.position}),!0),n.value=o}function r(o,c){const d=nt({},a.value,t.state,{forward:o,scroll:Lr()});i(d.current,d,!0),i(o,nt({},ku(n.value,o,null),{position:d.position+1},c),!1),n.value=o}return{location:n,state:a,push:r,replace:l}}function E_(e){e=d_(e);const t=C_(e),s=T_(e,t.state,t.location,t.replace);function n(i,l=!0){l||s.pauseListeners(),history.go(i)}const a=nt({location:"",base:e,go:n,createHref:f_.bind(null,e)},t,s);return Object.defineProperty(a,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(a,"state",{enumerable:!0,get:()=>t.state.value}),a}function A_(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),E_(e)}let Xn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Et=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Et||{});const R_={type:Xn.Static,value:""},I_=/[a-zA-Z0-9_]/;function O_(e){if(!e)return[[]];if(e==="/")return[[R_]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${s})/"${c}": ${p}`)}let s=Et.Static,n=s;const a=[];let i;function l(){i&&a.push(i),i=[]}let r=0,o,c="",d="";function u(){c&&(s===Et.Static?i.push({type:Xn.Static,value:c}):s===Et.Param||s===Et.ParamRegExp||s===Et.ParamRegExpEnd?(i.length>1&&(o==="*"||o==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Xn.Param,value:c,regexp:d,repeatable:o==="*"||o==="+",optional:o==="*"||o==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=o}for(;rt.length?t.length===1&&t[0]===es.Static+es.Segment?1:-1:0}function um(e,t){let s=0;const n=e.score,a=t.score;for(;s0&&t[t.length-1]<0}const P_={strict:!1,end:!0,sensitive:!1};function F_(e,t,s){const n=D_(O_(e.path),s),a=nt(n,{record:e,parent:t,children:[],alias:[]});return t&&!a.record.aliasOf==!t.record.aliasOf&&t.children.push(a),a}function $_(e,t){const s=[],n=new Map;t=gu(P_,t);function a(u){return n.get(u)}function i(u,f,p){const b=!p,y=Cu(u);y.aliasOf=p&&p.record;const E=gu(t,u),I=[y];if("alias"in u){const _=typeof u.alias=="string"?[u.alias]:u.alias;for(const S of _)I.push(Cu(nt({},y,{components:p?p.record.components:y.components,path:S,aliasOf:p?p.record:y})))}let x,m;for(const _ of I){const{path:S}=_;if(f&&S[0]!=="/"){const g=f.record.path,w=g[g.length-1]==="/"?"":"/";_.path=f.record.path+(S&&w+S)}if(x=F_(_,f,E),p?p.alias.push(x):(m=m||x,m!==x&&m.alias.push(x),b&&u.name&&!Eu(x)&&l(u.name)),fm(x)&&o(x),y.children){const g=y.children;for(let w=0;w{l(m)}:Ai}function l(u){if(om(u)){const f=n.get(u);f&&(n.delete(u),s.splice(s.indexOf(f),1),f.children.forEach(l),f.alias.forEach(l))}else{const f=s.indexOf(u);f>-1&&(s.splice(f,1),u.record.name&&n.delete(u.record.name),u.children.forEach(l),u.alias.forEach(l))}}function r(){return s}function o(u){const f=H_(u,s);s.splice(f,0,u),u.record.name&&!Eu(u)&&n.set(u.record.name,u)}function c(u,f){let p,b={},y,E;if("name"in u&&u.name){if(p=n.get(u.name),!p)throw Qa(mt.MATCHER_NOT_FOUND,{location:u});E=p.record.name,b=nt(Tu(f.params,p.keys.filter(m=>!m.optional).concat(p.parent?p.parent.keys.filter(m=>m.optional):[]).map(m=>m.name)),u.params&&Tu(u.params,p.keys.map(m=>m.name))),y=p.stringify(b)}else if(u.path!=null)y=u.path,p=s.find(m=>m.re.test(y)),p&&(b=p.parse(y),E=p.record.name);else{if(p=f.name?n.get(f.name):s.find(m=>m.re.test(f.path)),!p)throw Qa(mt.MATCHER_NOT_FOUND,{location:u,currentLocation:f});E=p.record.name,b=nt({},f.params,u.params),y=p.stringify(b)}const I=[];let x=p;for(;x;)I.unshift(x.record),x=x.parent;return{name:E,path:y,params:b,matched:I,meta:U_(I)}}e.forEach(u=>i(u));function d(){s.length=0,n.clear()}return{addRoute:i,resolve:c,removeRoute:l,clearRoutes:d,getRoutes:r,getRecordMatcher:a}}function Tu(e,t){const s={};for(const n of t)n in e&&(s[n]=e[n]);return s}function Cu(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:B_(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function B_(e){const t={},s=e.props||!1;if("component"in e)t.default=s;else for(const n in e.components)t[n]=typeof s=="object"?s[n]:s;return t}function Eu(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function U_(e){return e.reduce((t,s)=>nt(t,s.meta),{})}function H_(e,t){let s=0,n=t.length;for(;s!==n;){const i=s+n>>1;um(e,t[i])<0?n=i:s=i+1}const a=z_(e);return a&&(n=t.lastIndexOf(a,n-1)),n}function z_(e){let t=e;for(;t=t.parent;)if(fm(t)&&um(e,t)===0)return t}function fm({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Au(e){const t=Os(Dr),s=Os(Kc),n=J(()=>{const o=en(e.to);return t.resolve(o)}),a=J(()=>{const{matched:o}=n.value,{length:c}=o,d=o[c-1],u=s.matched;if(!d||!u.length)return-1;const f=u.findIndex(Ya.bind(null,d));if(f>-1)return f;const p=Ru(o[c-2]);return c>1&&Ru(d)===p&&u[u.length-1].path!==p?u.findIndex(Ya.bind(null,o[c-2])):f}),i=J(()=>a.value>-1&&K_(s.params,n.value.params)),l=J(()=>a.value>-1&&a.value===s.matched.length-1&&rm(s.params,n.value.params));function r(o={}){if(G_(o)){const c=t[en(e.replace)?"replace":"push"](en(e.to)).catch(Ai);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:n,href:J(()=>n.value.href),isActive:i,isExactActive:l,navigate:r}}function V_(e){return e.length===1?e[0]:e}const j_=el({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Au,setup(e,{slots:t}){const s=Hn(Au(e)),{options:n}=Os(Dr),a=J(()=>({[Iu(e.activeClass,n.linkActiveClass,"router-link-active")]:s.isActive,[Iu(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{const i=t.default&&V_(t.default(s));return e.custom?i:ja("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:a.value},i)}}}),q_=j_;function G_(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function K_(e,t){for(const s in t){const n=t[s],a=e[s];if(typeof n=="string"){if(n!==a)return!1}else if(!qs(a)||a.length!==n.length||n.some((i,l)=>i.valueOf()!==a[l].valueOf()))return!1}return!0}function Ru(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Iu=(e,t,s)=>e??t??s,W_=el({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){const n=Os(Vo),a=J(()=>e.route||n.value),i=Os(_u,0),l=J(()=>{let c=en(i);const{matched:d}=a.value;let u;for(;(u=d[c])&&!u.components;)c++;return c}),r=J(()=>a.value.matched[l.value]);wi(_u,J(()=>l.value+1)),wi(k_,r),wi(Vo,a);const o=h();return ns(()=>[o.value,r.value,e.name],([c,d,u],[f,p,b])=>{d&&(d.instances[u]=c,p&&p!==d&&c&&c===f&&(d.leaveGuards.size||(d.leaveGuards=p.leaveGuards),d.updateGuards.size||(d.updateGuards=p.updateGuards))),c&&d&&(!p||!Ya(d,p)||!f)&&(d.enterCallbacks[u]||[]).forEach(y=>y(c))},{flush:"post"}),()=>{const c=a.value,d=e.name,u=r.value,f=u&&u.components[d];if(!f)return Ou(s.default,{Component:f,route:c});const p=u.props[d],b=p?p===!0?c.params:typeof p=="function"?p(c):p:null,E=ja(f,nt({},b,t,{onVnodeUnmounted:I=>{I.component.isUnmounted&&(u.instances[d]=null)},ref:o}));return Ou(s.default,{Component:E,route:c})||E}}});function Ou(e,t){if(!e)return null;const s=e(t);return s.length===1?s[0]:s}const Z_=W_;function J_(e){const t=$_(e.routes,e),s=e.parseQuery||x_,n=e.stringifyQuery||xu,a=e.history,i=fi(),l=fi(),r=fi(),o=nc(On);let c=On;Aa&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=Xr.bind(null,V=>""+V),u=Xr.bind(null,n_),f=Xr.bind(null,Zi);function p(V,de){let ce,ye;return om(V)?(ce=t.getRecordMatcher(V),ye=de):ye=V,t.addRoute(ye,ce)}function b(V){const de=t.getRecordMatcher(V);de&&t.removeRoute(de)}function y(){return t.getRoutes().map(V=>V.record)}function E(V){return!!t.getRecordMatcher(V)}function I(V,de){if(de=nt({},de||o.value),typeof V=="string"){const L=eo(s,V,de.path),$=t.resolve({path:L.path},de),ee=a.createHref(L.fullPath);return nt(L,$,{params:f($.params),hash:Zi(L.hash),redirectedFrom:void 0,href:ee})}let ce;if(V.path!=null)ce=nt({},V,{path:eo(s,V.path,de.path).path});else{const L=nt({},V.params);for(const $ in L)L[$]==null&&delete L[$];ce=nt({},V,{params:u(L)}),de.params=u(de.params)}const ye=t.resolve(ce,de),ge=V.hash||"";ye.params=d(f(ye.params));const He=l_(n,nt({},V,{hash:e_(ge),path:ye.path})),k=a.createHref(He);return nt({fullPath:He,hash:ge,query:n===xu?__(V.query):V.query||{}},ye,{redirectedFrom:void 0,href:k})}function x(V){return typeof V=="string"?eo(s,V,o.value.path):nt({},V)}function m(V,de){if(c!==V)return Qa(mt.NAVIGATION_CANCELLED,{from:de,to:V})}function _(V){return w(V)}function S(V){return _(nt(x(V),{replace:!0}))}function g(V,de){const ce=V.matched[V.matched.length-1];if(ce&&ce.redirect){const{redirect:ye}=ce;let ge=typeof ye=="function"?ye(V,de):ye;return typeof ge=="string"&&(ge=ge.includes("?")||ge.includes("#")?ge=x(ge):{path:ge},ge.params={}),nt({query:V.query,hash:V.hash,params:ge.path!=null?{}:V.params},ge)}}function w(V,de){const ce=c=I(V),ye=o.value,ge=V.state,He=V.force,k=V.replace===!0,L=g(ce,ye);if(L)return w(nt(x(L),{state:typeof L=="object"?nt({},ge,L.state):ge,force:He,replace:k}),de||ce);const $=ce;$.redirectedFrom=de;let ee;return!He&&r_(n,ye,ce)&&(ee=Qa(mt.NAVIGATION_DUPLICATED,{to:$,from:ye}),ke(ye,ye,!0,!1)),(ee?Promise.resolve(ee):M($,ye)).catch(Z=>rn(Z)?rn(Z,mt.NAVIGATION_GUARD_REDIRECT)?Z:we(Z):N(Z,$,ye)).then(Z=>{if(Z){if(rn(Z,mt.NAVIGATION_GUARD_REDIRECT))return w(nt({replace:k},x(Z.to),{state:typeof Z.to=="object"?nt({},ge,Z.to.state):ge,force:He}),de||$)}else Z=P($,ye,!0,k,ge);return H($,ye,Z),Z})}function T(V,de){const ce=m(V,de);return ce?Promise.reject(ce):Promise.resolve()}function C(V){const de=F.values().next().value;return de&&typeof de.runWithContext=="function"?de.runWithContext(V):V()}function M(V,de){let ce;const[ye,ge,He]=w_(V,de);ce=so(ye.reverse(),"beforeRouteLeave",V,de);for(const L of ye)L.leaveGuards.forEach($=>{ce.push(Fn($,V,de))});const k=T.bind(null,V,de);return ce.push(k),Se(ce).then(()=>{ce=[];for(const L of i.list())ce.push(Fn(L,V,de));return ce.push(k),Se(ce)}).then(()=>{ce=so(ge,"beforeRouteUpdate",V,de);for(const L of ge)L.updateGuards.forEach($=>{ce.push(Fn($,V,de))});return ce.push(k),Se(ce)}).then(()=>{ce=[];for(const L of He)if(L.beforeEnter)if(qs(L.beforeEnter))for(const $ of L.beforeEnter)ce.push(Fn($,V,de));else ce.push(Fn(L.beforeEnter,V,de));return ce.push(k),Se(ce)}).then(()=>(V.matched.forEach(L=>L.enterCallbacks={}),ce=so(He,"beforeRouteEnter",V,de,C),ce.push(k),Se(ce))).then(()=>{ce=[];for(const L of l.list())ce.push(Fn(L,V,de));return ce.push(k),Se(ce)}).catch(L=>rn(L,mt.NAVIGATION_CANCELLED)?L:Promise.reject(L))}function H(V,de,ce){r.list().forEach(ye=>C(()=>ye(V,de,ce)))}function P(V,de,ce,ye,ge){const He=m(V,de);if(He)return He;const k=de===On,L=Aa?history.state:{};ce&&(ye||k?a.replace(V.fullPath,nt({scroll:k&&L&&L.scroll},ge)):a.push(V.fullPath,ge)),o.value=V,ke(V,de,ce,k),we()}let R;function j(){R||(R=a.listen((V,de,ce)=>{if(!se.listening)return;const ye=I(V),ge=g(ye,se.currentRoute.value);if(ge){w(nt(ge,{replace:!0,force:!0}),ye).catch(Ai);return}c=ye;const He=o.value;Aa&&m_(yu(He.fullPath,ce.delta),Lr()),M(ye,He).catch(k=>rn(k,mt.NAVIGATION_ABORTED|mt.NAVIGATION_CANCELLED)?k:rn(k,mt.NAVIGATION_GUARD_REDIRECT)?(w(nt(x(k.to),{force:!0}),ye).then(L=>{rn(L,mt.NAVIGATION_ABORTED|mt.NAVIGATION_DUPLICATED)&&!ce.delta&&ce.type===Ho.pop&&a.go(-1,!1)}).catch(Ai),Promise.reject()):(ce.delta&&a.go(-ce.delta,!1),N(k,ye,He))).then(k=>{k=k||P(ye,He,!1),k&&(ce.delta&&!rn(k,mt.NAVIGATION_CANCELLED)?a.go(-ce.delta,!1):ce.type===Ho.pop&&rn(k,mt.NAVIGATION_ABORTED|mt.NAVIGATION_DUPLICATED)&&a.go(-1,!1)),H(ye,He,k)}).catch(Ai)}))}let Q=fi(),U=fi(),O;function N(V,de,ce){we(V);const ye=U.list();return ye.length?ye.forEach(ge=>ge(V,de,ce)):console.error(V),Promise.reject(V)}function Y(){return O&&o.value!==On?Promise.resolve():new Promise((V,de)=>{Q.add([V,de])})}function we(V){return O||(O=!V,j(),Q.list().forEach(([de,ce])=>V?ce(V):de()),Q.reset()),V}function ke(V,de,ce,ye){const{scrollBehavior:ge}=e;if(!Aa||!ge)return Promise.resolve();const He=!ce&&g_(yu(V.fullPath,0))||(ye||!ce)&&history.state&&history.state.scroll||null;return Rt().then(()=>ge(V,de,He)).then(k=>k&&h_(k)).catch(k=>N(k,V,de))}const ie=V=>a.go(V);let he;const F=new Set,se={currentRoute:o,listening:!0,addRoute:p,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:E,getRoutes:y,resolve:I,options:e,push:_,replace:S,go:ie,back:()=>ie(-1),forward:()=>ie(1),beforeEach:i.add,beforeResolve:l.add,afterEach:r.add,onError:U.add,isReady:Y,install(V){V.component("RouterLink",q_),V.component("RouterView",Z_),V.config.globalProperties.$router=se,Object.defineProperty(V.config.globalProperties,"$route",{enumerable:!0,get:()=>en(o)}),Aa&&!he&&o.value===On&&(he=!0,_(a.location).catch(ye=>{}));const de={};for(const ye in On)Object.defineProperty(de,ye,{get:()=>o.value[ye],enumerable:!0});V.provide(Dr,se),V.provide(Kc,sc(de)),V.provide(Vo,o);const ce=V.unmount;F.add(V),V.unmount=function(){F.delete(V),F.size<1&&(c=On,R&&R(),R=null,o.value=On,he=!1,O=!1),ce()}}};function Se(V){return V.reduce((de,ce)=>de.then(()=>C(ce)),Promise.resolve())}return se}function pm(){return Os(Dr)}function Y_(e){return Os(Kc)}const Mr={props:{tabs:{type:Array,required:!0},defaultTab:{type:String,default:""},groupLabel:{type:String,default:""}},setup(e){const t=Y_(),s=pm(),n=J({get(){var o;const r=t.query.tab;return r&&e.tabs.some(c=>c.id===r)?r:e.defaultTab||((o=e.tabs[0])==null?void 0:o.id)||""},set(r){s.replace({query:{...t.query,tab:r}})}}),a=J(()=>{var r;return((r=e.tabs.find(o=>o.id===n.value))==null?void 0:r.component)||null}),i=J(()=>{var r;return((r=e.tabs.find(o=>o.id===n.value))==null?void 0:r.label)||""});ns(i,r=>{e.groupLabel&&r&&(document.title=`Odin — ${e.groupLabel} › ${r}`)},{immediate:!0});function l(r,o){if(!["ArrowLeft","ArrowRight","Home","End"].includes(r.key))return;r.preventDefault();let c=o;r.key==="ArrowRight"&&(c=(o+1)%e.tabs.length),r.key==="ArrowLeft"&&(c=(o-1+e.tabs.length)%e.tabs.length),r.key==="Home"&&(c=0),r.key==="End"&&(c=e.tabs.length-1),n.value=e.tabs[c].id,requestAnimationFrame(()=>{var d;return(d=document.getElementById("tab-"+e.tabs[c].id))==null?void 0:d.focus()})}return{activeTab:n,activeComponent:a,activeLabel:i,onTabKeydown:l}},template:`
@@ -92,7 +92,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
`},Q_={setup(){const e=h([]),t=h([]),s=h({}),n=50;function a(f){var y,E,I,x,m;const p=f.payload||f,b=p.type||f.type;if(b==="tool_start"){const _=((y=p.metadata)==null?void 0:y.call_id)||null,S={callId:_,id:_||`${p.action}-${Date.now()}`,tool:p.action,actor:p.actor||"",channel:p.channel_id||"",iteration:((E=p.metadata)==null?void 0:E.iteration)??0,startTime:Date.now(),elapsed:0,status:"running",output:"",result:""};e.value.unshift(S);return}if(b==="tool_end"){const _=((I=p.metadata)==null?void 0:I.call_id)||null;let S=-1;if(_&&(S=e.value.findIndex(g=>g.callId===_&&g.status==="running")),S<0&&!_)for(let g=e.value.length-1;g>=0;g--){const w=e.value[g];if(w.tool===p.action&&w.status==="running"){S=g;break}}if(S>=0){const g=e.value[S];g.status=(x=p.metadata)!=null&&x.error?"error":"success",g.elapsed=((m=p.metadata)==null?void 0:m.elapsed_ms)||Date.now()-g.startTime,g.result=p.detail||"",g.fadingOut=!0,setTimeout(()=>{const w=e.value.indexOf(g);w>=0&&e.value.splice(w,1),t.value.unshift(g),t.value.length>n&&t.value.pop()},5e3)}return}if(b==="tool_stream"){const _=p.call_id||p.tool_name||"unknown";if(p.finished){const S={...s.value};delete S[_],s.value=S}else{const g=((s.value[_]||"")+(p.chunk||"")).split(` `);s.value={...s.value,[_]:g.slice(-30).join(` -`)}}return}}let i=null;function l(){const f=Date.now();e.value.forEach(p=>{p.status==="running"&&(p.elapsed=f-p.startTime)})}let r=!1;function o(){r||(r=!0,Ke.on("events",a),i||(i=setInterval(l,500)))}function c(){r&&(r=!1,Ke.off("events",a),i&&(clearInterval(i),i=null))}We(o),Ms(o),Ps(c),xt(c);function d(f){return f<1e3?`${f}ms`:`${(f/1e3).toFixed(1)}s`}function u(f){return f==="running"?"clock":f==="success"?"success":f==="error"?"error":"info"}return{activeTasks:e,recentHistory:t,streamOutput:s,formatMs:d,statusIcon:u}},template:` +`)}}return}}let i=null;function l(){const f=Date.now();e.value.forEach(p=>{p.status==="running"&&(p.elapsed=f-p.startTime)})}let r=!1;function o(){r||(r=!0,Ke.on("events",a),i||(i=setInterval(l,500)))}function c(){r&&(r=!1,Ke.off("events",a),i&&(clearInterval(i),i=null))}We(o),Ds(o),Ms(c),xt(c);function d(f){return f<1e3?`${f}ms`:`${(f/1e3).toFixed(1)}s`}function u(f){return f==="running"?"clock":f==="success"?"success":f==="error"?"error":"info"}return{activeTasks:e,recentHistory:t,streamOutput:s,formatMs:d,statusIcon:u}},template:`

Execution Viewer @@ -155,7 +155,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config

- `};function Wc(e){if(e instanceof Date)return e;if(typeof e=="string"){const t=new Date(e);return isNaN(t.getTime())?null:t}return typeof e=="number"&&isFinite(e)?new Date(e<1e12?e*1e3:e):null}function fa(e){const t=Wc(e);return t?t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"—"}function hm(e){const t=Wc(e);return t?t.toLocaleTimeString():"—"}function mm(e){const t=Wc(e);if(!t)return"—";const s=Math.max(0,Math.floor((Date.now()-t.getTime())/1e3));return s<60?`${s}s ago`:s<3600?`${Math.floor(s/60)}m ago`:s<86400?`${Math.floor(s/3600)}h ago`:`${Math.floor(s/86400)}d ago`}function X_(e){if(e==null||!isFinite(e))return"—";const t=Math.max(0,Math.floor(Number(e)));return t<60?"less than 1 min ago":t<3600?`${Math.floor(t/60)} min ago`:t<86400?`${Math.floor(t/3600)} hr ago`:`${Math.floor(t/86400)} day ago`}function Qa(e){if(e==null||!isFinite(e))return"—";const t=Math.max(0,Math.round(e));if(t<60)return`${t}s`;if(t<3600){const a=Math.floor(t/60),i=t%60;return i?`${a}m ${i}s`:`${a}m`}const s=Math.floor(t/3600),n=Math.floor(t%3600/60);return n?`${s}h ${n}m`:`${s}h`}function Zc(e,t=200){const s=String(e??"");return s.length>t?s.slice(0,t)+"…":s}function gm(e,t=5e3){const s=String(e??"");return s.length>t?s.slice(0,t)+` + `};function Wc(e){if(e instanceof Date)return e;if(typeof e=="string"){const t=new Date(e);return isNaN(t.getTime())?null:t}return typeof e=="number"&&isFinite(e)?new Date(e<1e12?e*1e3:e):null}function pa(e){const t=Wc(e);return t?t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"—"}function hm(e){const t=Wc(e);return t?t.toLocaleTimeString():"—"}function mm(e){const t=Wc(e);if(!t)return"—";const s=Math.max(0,Math.floor((Date.now()-t.getTime())/1e3));return s<60?`${s}s ago`:s<3600?`${Math.floor(s/60)}m ago`:s<86400?`${Math.floor(s/3600)}h ago`:`${Math.floor(s/86400)}d ago`}function X_(e){if(e==null||!isFinite(e))return"—";const t=Math.max(0,Math.floor(Number(e)));return t<60?"less than 1 min ago":t<3600?`${Math.floor(t/60)} min ago`:t<86400?`${Math.floor(t/3600)} hr ago`:`${Math.floor(t/86400)} day ago`}function Xa(e){if(e==null||!isFinite(e))return"—";const t=Math.max(0,Math.round(e));if(t<60)return`${t}s`;if(t<3600){const a=Math.floor(t/60),i=t%60;return i?`${a}m ${i}s`:`${a}m`}const s=Math.floor(t/3600),n=Math.floor(t%3600/60);return n?`${s}h ${n}m`:`${s}h`}function Zc(e,t=200){const s=String(e??"");return s.length>t?s.slice(0,t)+"…":s}function gm(e,t=5e3){const s=String(e??"");return s.length>t?s.slice(0,t)+` ... (truncated)`:s}function Nu(e){return String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function vm(e){return e==null||!isFinite(e)?"—":Number(e).toLocaleString()}function bm(e){return e==null||!isFinite(e)?"—":e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}const ym=Symbol("agent-detail-cancelled"),ek=15e3;function tk(e,{timeoutMs:t,timeoutLabel:s,scheduleTimeout:n,cancelTimeout:a}){const i=typeof AbortController=="function"?new AbortController:null;let l=null,r=!1,o,c;const d=new Promise((p,b)=>{o=p,c=b});function u(p,b){r||(r=!0,l!==null&&a(l),l=null,(p?o:c)(b))}let f;try{f=e(i==null?void 0:i.signal)}catch(p){u(!1,p)}return r||Promise.resolve(f).then(p=>u(!0,p),p=>u(!1,p)),!r&&Number.isFinite(t)&&t>0&&(l=n(()=>{const p=Math.max(1,Math.round(t/1e3));u(!1,new Error(`${s} request timed out after ${p}s`)),i==null||i.abort()},t)),{promise:d,cancel(){u(!0,ym),i==null||i.abort()}}}function xm({state:e,requestDetail:t,timeoutMs:s=ek,detailLabel:n="Agent detail",scheduleTimeout:a=globalThis.setTimeout.bind(globalThis),cancelTimeout:i=globalThis.clearTimeout.bind(globalThis)}){if(!e||typeof e!="object")throw new TypeError("agent detail state is required");if(typeof t!="function")throw new TypeError("requestDetail must be a function");let l=null;function r(){const f=l;l=null,f==null||f.cancel()}function o(f,{initial:p,coalesce:b}){if(!f)return Promise.resolve();if(b&&l&&l.agentId===f&&e.detailId===f)return l.promise;r();const y={agentId:f,cancel:null,promise:null};l=y,p?(e.detail=null,e.detailError=null,e.detailLoading=!0):e.detail===null&&e.detailError===null&&(e.detailLoading=!0);const E=tk(I=>t(f,{signal:I}),{timeoutMs:s,timeoutLabel:n,scheduleTimeout:a,cancelTimeout:i});return y.cancel=E.cancel,y.promise=(async()=>{let I=null,x=null;try{I=await E.promise}catch(m){x=m}I!==ym&&(l!==y||e.detailId!==f||(l=null,!x&&(I===null||typeof I!="object")&&(x=new Error(`${n} response was empty or invalid`)),x?e.detail===null&&(e.detailError=(x==null?void 0:x.message)||`Failed to load ${n.toLowerCase()}`):(e.detail=I,e.detailError=null),e.detailLoading=!1))})(),y.promise}function c(f){return e.detailId=f,o(f,{initial:!0,coalesce:!1})}function d(){const f=e.detailId;return f?o(f,{initial:!1,coalesce:!0}):Promise.resolve()}function u(){r(),e.detailId=null,e.detail=null,e.detailError=null,e.detailLoading=!1}return{open:c,refresh:d,close:u,hasInFlight:()=>l!==null}}function sk({isEnabled:e,refreshList:t,hasOpenDetail:s,refreshDetail:n,intervalMs:a=5e3,scheduleInterval:i=globalThis.setInterval.bind(globalThis),cancelInterval:l=globalThis.clearInterval.bind(globalThis)}){let r=null;function o(){e()&&(t(),s()&&n())}function c(){r!==null&&(l(r),r=null)}function d(){c(),e()&&(r=i(o,a))}function u(){e()?d():c()}return{start:d,stop:c,sync:u,isRunning:()=>r!==null}}const nk={template:`
@@ -430,7 +430,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
-
`,setup(){const e=h([]),t=h(!0),s=h(null),n=h(null),a=h(!0),i=h("all");let l=!1;const r=J(()=>e.value.filter(N=>N.status==="running").length),o=J(()=>e.value.filter(N=>N.status==="completed").length),c=J(()=>e.value.filter(N=>["failed","timeout","killed"].includes(N.status)).length),d=J(()=>[{value:"all",label:"All",count:e.value.length},{value:"running",label:"Running",count:r.value},{value:"completed",label:"Completed",count:o.value},{value:"failed",label:"Failed",count:c.value}]),u=J(()=>i.value==="all"?e.value:i.value==="failed"?e.value.filter(N=>["failed","timeout","killed"].includes(N.status)):e.value.filter(N=>N.status===i.value));function f(N){const Y=Number(N.max_iterations)||0;return Y<=0?0:Math.min(100,Math.round(N.iteration_count/Y*100))}function p(N){return(Number(N.max_iterations)||0)>0}function b(N,Y){return N?N==="N/A"?"N/A":Y==="current_inheritance"?`inherit (currently ${N})`:N:"unknown"}function y(N){return b(N.display_model,N.display_model_source||N.display_source)}function E(N){return b(N.display_reasoning_effort,N.display_reasoning_effort_source||N.display_source)}function I(N){return{last_execution:"last executed",current_inheritance:"inherited from current config — not yet executed",spawn_override_pending:"requested at spawn — not yet executed",unknown:"no execution data"}[N]||""}const x=h(null),m=h(null),_=h(!1),S=h(null),g=h(""),T=xm({state:{get detail(){return x.value},set detail(N){x.value=N},get detailId(){return m.value},set detailId(N){m.value=N},get detailLoading(){return _.value},set detailLoading(N){_.value=N},get detailError(){return S.value},set detailError(N){S.value=N}},requestDetail:(N,{signal:Y})=>K.get(`/api/agents/${encodeURIComponent(N)}`,{signal:Y})});async function C(N){g.value="",await T.open(N.id)}function M(){T.close(),g.value=""}async function H(){await T.refresh()}async function P(N,Y){try{await navigator.clipboard.writeText(Y||""),g.value=N,setTimeout(()=>{g.value===N&&(g.value="")},1500)}catch{Ae.error("Copy failed")}}async function R(N=!1){N=N===!0,N||(t.value=!0);try{const Y=await K.get("/api/agents");e.value=Array.isArray(Y)?Y:[],s.value=null}catch(Y){N||(s.value=Y.message)}N||(t.value=!1)}async function j(N){const Y=e.value.find(ke=>ke.id===N);if(await ks({title:"Kill agent",message:`Kill agent "${(Y==null?void 0:Y.label)||N}"? Its current work will be lost.`,confirmLabel:"Kill",danger:!0})){n.value=N;try{await K.del(`/api/agents/${encodeURIComponent(N)}`),Ae.success("Agent killed"),await R()}catch(ke){Ae.error(ke.message||"Failed to kill agent")}n.value=null}}const Q=sk({isEnabled:()=>a.value&&l,refreshList:()=>R(!0),hasOpenDetail:()=>!!m.value,refreshDetail:H});function U(){Q.start()}function O(){Q.stop()}return ts(a,()=>Q.sync()),We(()=>{l=!0,R(),U()}),Ms(()=>{l=!0,R(!0),U()}),Ps(()=>{l=!1,O()}),xt(()=>{l=!1,O(),T.close()}),{agents:e,loading:t,error:s,killing:n,autoRefresh:a,statusFilter:i,runningCount:r,completedCount:o,failedCount:c,statusFilters:d,filteredAgents:u,formatTs:fa,formatDuration:Qa,progressPercent:f,hasProgress:p,displayModelText:y,displayEffortText:E,displaySourceLabel:I,detail:x,detailId:m,detailLoading:_,detailError:S,copied:g,openDetail:C,closeDetail:M,copyText:P,fetchAgents:R,killAgent:j,startAutoRefresh:U,stopAutoRefresh:O}}},ak={template:` +
`,setup(){const e=h([]),t=h(!0),s=h(null),n=h(null),a=h(!0),i=h("all");let l=!1;const r=J(()=>e.value.filter(N=>N.status==="running").length),o=J(()=>e.value.filter(N=>N.status==="completed").length),c=J(()=>e.value.filter(N=>["failed","timeout","killed"].includes(N.status)).length),d=J(()=>[{value:"all",label:"All",count:e.value.length},{value:"running",label:"Running",count:r.value},{value:"completed",label:"Completed",count:o.value},{value:"failed",label:"Failed",count:c.value}]),u=J(()=>i.value==="all"?e.value:i.value==="failed"?e.value.filter(N=>["failed","timeout","killed"].includes(N.status)):e.value.filter(N=>N.status===i.value));function f(N){const Y=Number(N.max_iterations)||0;return Y<=0?0:Math.min(100,Math.round(N.iteration_count/Y*100))}function p(N){return(Number(N.max_iterations)||0)>0}function b(N,Y){return N?N==="N/A"?"N/A":Y==="current_inheritance"?`inherit (currently ${N})`:N:"unknown"}function y(N){return b(N.display_model,N.display_model_source||N.display_source)}function E(N){return b(N.display_reasoning_effort,N.display_reasoning_effort_source||N.display_source)}function I(N){return{last_execution:"last executed",current_inheritance:"inherited from current config — not yet executed",spawn_override_pending:"requested at spawn — not yet executed",unknown:"no execution data"}[N]||""}const x=h(null),m=h(null),_=h(!1),S=h(null),g=h(""),T=xm({state:{get detail(){return x.value},set detail(N){x.value=N},get detailId(){return m.value},set detailId(N){m.value=N},get detailLoading(){return _.value},set detailLoading(N){_.value=N},get detailError(){return S.value},set detailError(N){S.value=N}},requestDetail:(N,{signal:Y})=>G.get(`/api/agents/${encodeURIComponent(N)}`,{signal:Y})});async function C(N){g.value="",await T.open(N.id)}function M(){T.close(),g.value=""}async function H(){await T.refresh()}async function P(N,Y){try{await navigator.clipboard.writeText(Y||""),g.value=N,setTimeout(()=>{g.value===N&&(g.value="")},1500)}catch{Ae.error("Copy failed")}}async function R(N=!1){N=N===!0,N||(t.value=!0);try{const Y=await G.get("/api/agents");e.value=Array.isArray(Y)?Y:[],s.value=null}catch(Y){N||(s.value=Y.message)}N||(t.value=!1)}async function j(N){const Y=e.value.find(ke=>ke.id===N);if(await _s({title:"Kill agent",message:`Kill agent "${(Y==null?void 0:Y.label)||N}"? Its current work will be lost.`,confirmLabel:"Kill",danger:!0})){n.value=N;try{await G.del(`/api/agents/${encodeURIComponent(N)}`),Ae.success("Agent killed"),await R()}catch(ke){Ae.error(ke.message||"Failed to kill agent")}n.value=null}}const Q=sk({isEnabled:()=>a.value&&l,refreshList:()=>R(!0),hasOpenDetail:()=>!!m.value,refreshDetail:H});function U(){Q.start()}function O(){Q.stop()}return ns(a,()=>Q.sync()),We(()=>{l=!0,R(),U()}),Ds(()=>{l=!0,R(!0),U()}),Ms(()=>{l=!1,O()}),xt(()=>{l=!1,O(),T.close()}),{agents:e,loading:t,error:s,killing:n,autoRefresh:a,statusFilter:i,runningCount:r,completedCount:o,failedCount:c,statusFilters:d,filteredAgents:u,formatTs:pa,formatDuration:Xa,progressPercent:f,hasProgress:p,displayModelText:y,displayEffortText:E,displaySourceLabel:I,detail:x,detailId:m,detailLoading:_,detailError:S,copied:g,openDetail:C,closeDetail:M,copyText:P,fetchAgents:R,killAgent:j,startAutoRefresh:U,stopAutoRefresh:O}}},ak={template:`

Autonomous Loops

@@ -696,7 +696,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(!1),a=h({goal:"",interval_seconds:60,mode:"notify",max_iterations:50,stop_condition:"",channel_id:""}),i=h(!1),l=h(null),r=h(null),o=h(null),c=h(null),d=h(null),u=h(!1),f=h(null),p=h("");let b=!1;const E=xm({state:{get detail(){return c.value},set detail(O){c.value=O},get detailId(){return d.value},set detailId(O){d.value=O},get detailLoading(){return u.value},set detailLoading(O){u.value=O},get detailError(){return f.value},set detailError(O){f.value=O}},detailLabel:"Loop detail",requestDetail:(O,{signal:N})=>K.get(`/api/loops/${encodeURIComponent(O)}?limit=100`,{signal:N})});async function I(O){p.value="",await E.open(O.id)}function x(){E.close(),p.value=""}async function m(O,N){try{await navigator.clipboard.writeText(N||""),p.value=O,setTimeout(()=>{p.value===O&&(p.value="")},1500)}catch{Ae.error("Copy failed")}}const _=J(()=>e.value.reduce((O,N)=>O+(N.iteration_count||0),0)),S=J(()=>e.value.filter(O=>O.status==="running").length);function g(O){return O==="running"?"loop-status-running":O==="error"?"loop-status-error":"loop-status-stopped"}function w(O){return O==="running"?"badge-success":O==="error"?"badge-danger":O==="completed"?"badge-info":"badge-warning"}function T(O){return O==="act"?"badge-warning":O==="silent"?"badge-info":"badge-success"}async function C(O=!1){O=O===!0,O||(t.value=!0);try{const N=await K.get("/api/loops");e.value=Array.isArray(N)?N:[],s.value=null}catch(N){O||(s.value=N.message)}O||(t.value=!1)}async function M(){l.value=null;const O=a.value;if(!O.goal.trim()){l.value="Goal is required";return}if(!O.channel_id.trim()){l.value="Channel ID is required";return}const N={goal:O.goal.trim(),channel_id:O.channel_id.trim(),interval_seconds:O.interval_seconds||60,mode:O.mode,max_iterations:O.max_iterations||50};O.stop_condition.trim()&&(N.stop_condition=O.stop_condition.trim()),i.value=!0;try{const Y=await K.post("/api/loops",N);Ae.success(`Loop started: ${Y.loop_id}`),a.value={goal:"",interval_seconds:60,mode:"notify",max_iterations:50,stop_condition:"",channel_id:""},n.value=!1,await C()}catch(Y){l.value=Y.message}i.value=!1}async function H(O){if(await ks({title:"Stop loop",message:`Stop loop ${O}? The current iteration will finish before stopping.`,confirmLabel:"Stop Loop",danger:!0})){r.value=O;try{await K.del(`/api/loops/${encodeURIComponent(O)}`),Ae.success("Loop stopped"),await C()}catch(Y){Ae.error(Y.message||"Failed to stop loop")}r.value=null}}async function P(O){o.value=O;try{await K.post(`/api/loops/${encodeURIComponent(O)}/restart`),Ae.success("Loop restarted"),await C()}catch(N){Ae.error(N.message||"Failed to restart loop")}o.value=null}function R(O){b&&O.payload&&(O.payload.loop_id||O.payload.type==="loop")&&(C(!0),d.value&&E.refresh())}let j=null;function Q(){j!==null&&clearInterval(j),j=null}function U(){Q(),b&&(j=setInterval(()=>{C(!0),d.value&&E.refresh()},5e3))}return We(()=>{b=!0,C(),Ke.subscribe("events",R),U()}),Ms(()=>{b=!0,C(!0),U()}),Ps(()=>{b=!1,Q()}),xt(()=>{b=!1,Ke.unsubscribe("events",R),Q(),E.close()}),{loops:e,loading:t,error:s,showCreate:n,form:a,creating:i,createError:l,stoppingId:r,restartingId:o,detail:c,detailId:d,detailLoading:u,detailError:f,copied:p,totalIterations:_,runningCount:S,statusDotClass:g,statusBadge:w,modeBadge:T,formatAge:mm,formatDuration:Qa,formatTs:fa,formatTokens:bm,openDetail:I,closeDetail:x,copyText:m,fetchLoops:C,doCreate:M,doStop:H,doRestart:P}}},ik={template:` + `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(!1),a=h({goal:"",interval_seconds:60,mode:"notify",max_iterations:50,stop_condition:"",channel_id:""}),i=h(!1),l=h(null),r=h(null),o=h(null),c=h(null),d=h(null),u=h(!1),f=h(null),p=h("");let b=!1;const E=xm({state:{get detail(){return c.value},set detail(O){c.value=O},get detailId(){return d.value},set detailId(O){d.value=O},get detailLoading(){return u.value},set detailLoading(O){u.value=O},get detailError(){return f.value},set detailError(O){f.value=O}},detailLabel:"Loop detail",requestDetail:(O,{signal:N})=>G.get(`/api/loops/${encodeURIComponent(O)}?limit=100`,{signal:N})});async function I(O){p.value="",await E.open(O.id)}function x(){E.close(),p.value=""}async function m(O,N){try{await navigator.clipboard.writeText(N||""),p.value=O,setTimeout(()=>{p.value===O&&(p.value="")},1500)}catch{Ae.error("Copy failed")}}const _=J(()=>e.value.reduce((O,N)=>O+(N.iteration_count||0),0)),S=J(()=>e.value.filter(O=>O.status==="running").length);function g(O){return O==="running"?"loop-status-running":O==="error"?"loop-status-error":"loop-status-stopped"}function w(O){return O==="running"?"badge-success":O==="error"?"badge-danger":O==="completed"?"badge-info":"badge-warning"}function T(O){return O==="act"?"badge-warning":O==="silent"?"badge-info":"badge-success"}async function C(O=!1){O=O===!0,O||(t.value=!0);try{const N=await G.get("/api/loops");e.value=Array.isArray(N)?N:[],s.value=null}catch(N){O||(s.value=N.message)}O||(t.value=!1)}async function M(){l.value=null;const O=a.value;if(!O.goal.trim()){l.value="Goal is required";return}if(!O.channel_id.trim()){l.value="Channel ID is required";return}const N={goal:O.goal.trim(),channel_id:O.channel_id.trim(),interval_seconds:O.interval_seconds||60,mode:O.mode,max_iterations:O.max_iterations||50};O.stop_condition.trim()&&(N.stop_condition=O.stop_condition.trim()),i.value=!0;try{const Y=await G.post("/api/loops",N);Ae.success(`Loop started: ${Y.loop_id}`),a.value={goal:"",interval_seconds:60,mode:"notify",max_iterations:50,stop_condition:"",channel_id:""},n.value=!1,await C()}catch(Y){l.value=Y.message}i.value=!1}async function H(O){if(await _s({title:"Stop loop",message:`Stop loop ${O}? The current iteration will finish before stopping.`,confirmLabel:"Stop Loop",danger:!0})){r.value=O;try{await G.del(`/api/loops/${encodeURIComponent(O)}`),Ae.success("Loop stopped"),await C()}catch(Y){Ae.error(Y.message||"Failed to stop loop")}r.value=null}}async function P(O){o.value=O;try{await G.post(`/api/loops/${encodeURIComponent(O)}/restart`),Ae.success("Loop restarted"),await C()}catch(N){Ae.error(N.message||"Failed to restart loop")}o.value=null}function R(O){b&&O.payload&&(O.payload.loop_id||O.payload.type==="loop")&&(C(!0),d.value&&E.refresh())}let j=null;function Q(){j!==null&&clearInterval(j),j=null}function U(){Q(),b&&(j=setInterval(()=>{C(!0),d.value&&E.refresh()},5e3))}return We(()=>{b=!0,C(),Ke.subscribe("events",R),U()}),Ds(()=>{b=!0,C(!0),U()}),Ms(()=>{b=!1,Q()}),xt(()=>{b=!1,Ke.unsubscribe("events",R),Q(),E.close()}),{loops:e,loading:t,error:s,showCreate:n,form:a,creating:i,createError:l,stoppingId:r,restartingId:o,detail:c,detailId:d,detailLoading:u,detailError:f,copied:p,totalIterations:_,runningCount:S,statusDotClass:g,statusBadge:w,modeBadge:T,formatAge:mm,formatDuration:Xa,formatTs:pa,formatTokens:bm,openDetail:I,closeDetail:x,copyText:m,fetchLoops:C,doCreate:M,doStop:H,doRestart:P}}},ik={template:`
@@ -789,7 +789,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
-
`,setup(){const e=h([]),t=h(!0),s=h(null),n=h(!0);let a=null;const i=h(null),l=J(()=>e.value.filter(x=>x.status==="running").length),r=J(()=>e.value.filter(x=>x.status!=="running").length);function o(x){return x==="running"?"loop-status-running":x==="failed"||x==="error"?"loop-status-error":"loop-status-stopped"}function c(x){return x==="running"?"badge-success":x==="completed"||x==="exited"?"badge-info":x==="killed"||x==="error"||x==="failed"?"badge-danger":"badge-warning"}async function d(x=!1){x=x===!0,x||(t.value=!0);try{e.value=await K.get("/api/processes"),s.value=null}catch(m){x||(s.value=m.message)}x||(t.value=!1)}function u(){f(),n.value&&(a=setInterval(()=>{t.value||d(!0)},5e3))}function f(){a&&(clearInterval(a),a=null)}ts(n,x=>{x?u():f()});async function p(x){if(await ks({title:"Kill process",message:`Kill process ${x}?`,confirmLabel:"Kill",danger:!0})){i.value=x;try{await K.del(`/api/processes/${x}`),Ae.success(`Process ${x} killed`),await d()}catch(_){Ae.error(_.message||"Failed to kill process")}i.value=null}}function b(x){x.payload&&(x.payload.pid||x.payload.type==="process")&&d(!0)}let y=!1;function E(){y||(y=!0,d(),Ke.subscribe("events",b),u())}function I(){y&&(y=!1,Ke.unsubscribe("events",b),f())}return We(E),Ms(E),Ps(I),xt(I),{processes:e,loading:t,error:s,autoRefresh:n,killingPid:i,runningCount:l,completedCount:r,procStatusDot:o,statusBadge:c,formatDuration:Qa,fetchProcesses:d,doKill:p}}},lk=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/;function Lu(e,t){return t==="cron"&&String(e.cron||"").trim()?e.run_at="":t==="run_at"&&String(e.run_at||"").trim()&&(e.cron=""),e}function rk(e,t=!1){const s=a=>String(a).padStart(2,"0"),n=`${e.getFullYear()}-${s(e.getMonth()+1)}-${s(e.getDate())}T${s(e.getHours())}:${s(e.getMinutes())}`;return t?`${n}:${s(e.getSeconds())}`:n}function ok(e){const t=-e.getTimezoneOffset(),s=t>=0?"+":"-",n=Math.abs(t),a=Math.floor(n/60),i=n%60;return`UTC${s}${a}${i?`:${String(i).padStart(2,"0")}`:""}`}function ck(e){const t=String(e||"").trim();if(!t)return{state:"empty"};const s=lk.exec(t);if(!s)return{state:"invalid",typed:t};const[,n,a,i,l,r]=s.slice(0,6).map(Number),o=s[6]===void 0?0:Number(s[6]);if(o>59)return{state:"invalid",typed:t};const c=s[6]!==void 0,d=c?t.slice(0,19):t.slice(0,16),u=Date.UTC(n,a-1,i,l,r,o),f=new Date(u-864e5).getTimezoneOffset(),p=new Date(u+864e5).getTimezoneOffset(),b=[];for(const E of new Set([f,p])){const I=new Date(u+E*6e4);rk(I,c)===d&&(b.some(x=>x.getTime()===I.getTime())||b.push(I))}if(b.sort((E,I)=>E.getTime()-I.getTime()),b.length===0)return{state:"nonexistent",typed:t};if(b.length>1)return{state:"ambiguous",typed:t,options:b.map(E=>({instant:E,offset:ok(E),iso:E.toISOString()}))};const y=b[0];return{state:"ok",typed:t,instant:y,iso:y.toISOString()}}const dk={template:` + `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(!0);let a=null;const i=h(null),l=J(()=>e.value.filter(x=>x.status==="running").length),r=J(()=>e.value.filter(x=>x.status!=="running").length);function o(x){return x==="running"?"loop-status-running":x==="failed"||x==="error"?"loop-status-error":"loop-status-stopped"}function c(x){return x==="running"?"badge-success":x==="completed"||x==="exited"?"badge-info":x==="killed"||x==="error"||x==="failed"?"badge-danger":"badge-warning"}async function d(x=!1){x=x===!0,x||(t.value=!0);try{e.value=await G.get("/api/processes"),s.value=null}catch(m){x||(s.value=m.message)}x||(t.value=!1)}function u(){f(),n.value&&(a=setInterval(()=>{t.value||d(!0)},5e3))}function f(){a&&(clearInterval(a),a=null)}ns(n,x=>{x?u():f()});async function p(x){if(await _s({title:"Kill process",message:`Kill process ${x}?`,confirmLabel:"Kill",danger:!0})){i.value=x;try{await G.del(`/api/processes/${x}`),Ae.success(`Process ${x} killed`),await d()}catch(_){Ae.error(_.message||"Failed to kill process")}i.value=null}}function b(x){x.payload&&(x.payload.pid||x.payload.type==="process")&&d(!0)}let y=!1;function E(){y||(y=!0,d(),Ke.subscribe("events",b),u())}function I(){y&&(y=!1,Ke.unsubscribe("events",b),f())}return We(E),Ds(E),Ms(I),xt(I),{processes:e,loading:t,error:s,autoRefresh:n,killingPid:i,runningCount:l,completedCount:r,procStatusDot:o,statusBadge:c,formatDuration:Xa,fetchProcesses:d,doKill:p}}},lk=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/;function Lu(e,t){return t==="cron"&&String(e.cron||"").trim()?e.run_at="":t==="run_at"&&String(e.run_at||"").trim()&&(e.cron=""),e}function rk(e,t=!1){const s=a=>String(a).padStart(2,"0"),n=`${e.getFullYear()}-${s(e.getMonth()+1)}-${s(e.getDate())}T${s(e.getHours())}:${s(e.getMinutes())}`;return t?`${n}:${s(e.getSeconds())}`:n}function ok(e){const t=-e.getTimezoneOffset(),s=t>=0?"+":"-",n=Math.abs(t),a=Math.floor(n/60),i=n%60;return`UTC${s}${a}${i?`:${String(i).padStart(2,"0")}`:""}`}function ck(e){const t=String(e||"").trim();if(!t)return{state:"empty"};const s=lk.exec(t);if(!s)return{state:"invalid",typed:t};const[,n,a,i,l,r]=s.slice(0,6).map(Number),o=s[6]===void 0?0:Number(s[6]);if(o>59)return{state:"invalid",typed:t};const c=s[6]!==void 0,d=c?t.slice(0,19):t.slice(0,16),u=Date.UTC(n,a-1,i,l,r,o),f=new Date(u-864e5).getTimezoneOffset(),p=new Date(u+864e5).getTimezoneOffset(),b=[];for(const E of new Set([f,p])){const I=new Date(u+E*6e4);rk(I,c)===d&&(b.some(x=>x.getTime()===I.getTime())||b.push(I))}if(b.sort((E,I)=>E.getTime()-I.getTime()),b.length===0)return{state:"nonexistent",typed:t};if(b.length>1)return{state:"ambiguous",typed:t,options:b.map(E=>({instant:E,offset:ok(E),iso:E.toISOString()}))};const y=b[0];return{state:"ok",typed:t,instant:y,iso:y.toISOString()}}const dk={template:`
@@ -1103,7 +1103,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
-
`,setup(){const e=h([]),t=h(!0),s=h(null),n=h(!1),a=h({description:"",action:"reminder",channel_id:"",cron:"",run_at:"",message:"",tool_name:"",tool_input_str:""}),i=h(!1),l=h(null),r=h(null),o=J(()=>ck(a.value.run_at));ts(()=>a.value.run_at,()=>{r.value=null});const c=J(()=>{var se;const F=o.value;return F.state==="ok"?F.instant:F.state==="ambiguous"&&r.value!==null&&((se=F.options[r.value])==null?void 0:se.instant)||null}),d=J(()=>{const F=c.value;return F?`${F.toLocaleString()} local — ${F.toISOString()} UTC`:""}),u=h(null),f=h(!1),p=[{label:"Every hour",expr:"0 * * * *"},{label:"Every 6h",expr:"0 */6 * * *"},{label:"Daily 9am",expr:"0 9 * * *"},{label:"Weekly Mon",expr:"0 9 * * 1"},{label:"Every 30m",expr:"*/30 * * * *"}],b=h(null),y=h(null),E=h(null),I=h(null),x=h(null),m=h([]),_=h(!1),S=h("");let g=0;const w=J(()=>e.value.filter(F=>F.cron&&!F.one_time).length),T=J(()=>e.value.filter(F=>F.one_time).length),C=J(()=>e.value.filter(F=>F.trigger).length),M=J(()=>e.value.filter(F=>F.paused).length),H=J(()=>e.value.filter(F=>F.consecutive_failures>0).length);function P(F){if(!F)return"-";const se=Date.now(),V=(new Date(F).getTime()-se)/1e3;if(V<0)return"overdue";if(V<60)return"in < 1 min";if(V<3600)return`in ${Math.floor(V/60)} min`;if(V<86400){const ce=Math.floor(V/3600),_e=Math.floor(V%3600/60);return _e>0?`in ${ce}h ${_e}m`:`in ${ce}h`}const de=Math.floor(V/86400);return`in ${de} day${de!==1?"s":""}`}function R(F){return F==null?"-":F<1e3?`${F}ms`:F<6e4?`${(F/1e3).toFixed(1)}s`:Qa(F/1e3)}function j(F=a.value.cron){a.value.cron=F,Lu(a.value,"cron"),u.value=null}function Q(F=a.value.run_at){a.value.run_at=F,Lu(a.value,"run_at"),u.value=null}async function U(){const F=a.value.cron.trim();if(F){f.value=!0;try{u.value=await K.post("/api/schedules/validate-cron",{expression:F})}catch(se){u.value={valid:!1,error:se.message}}f.value=!1}}async function O(){t.value=!0,s.value=null;try{e.value=await K.get("/api/schedules")}catch(F){s.value=F.message}t.value=!1}async function N(F){if(x.value===F){x.value=null,m.value=[];return}x.value=F,_.value=!0,m.value=[];const se=++g;try{const Se=await K.get(`/api/schedules/${encodeURIComponent(F)}/history?limit=10`);if(se!==g||x.value!==F)return;m.value=Se,S.value=""}catch(Se){if(se!==g||x.value!==F)return;m.value=[],S.value=Se.message||"Failed to load execution history"}se===g&&(_.value=!1)}async function Y(){l.value=null;const F=a.value;if(!F.description.trim()){l.value="Description is required";return}if(!F.channel_id.trim()){l.value="Channel ID is required";return}if(!F.cron.trim()&&!F.run_at.trim()){l.value="Cron expression or run_at time is required";return}if(F.cron.trim()&&F.run_at.trim()){l.value="Choose either Cron or One-Time, not both";return}const se={description:F.description.trim(),action:F.action,channel_id:F.channel_id.trim()};if(F.cron.trim()&&(se.cron=F.cron.trim()),F.run_at.trim()){const Se=o.value;if(Se.state==="nonexistent"){l.value="That local time does not exist (daylight saving gap)";return}if(Se.state==="invalid"){l.value="One-time run time is not a valid date";return}const V=c.value;if(Se.state==="ambiguous"&&r.value===null){l.value="That local time happens twice — choose which occurrence to use";return}if(!V){l.value="One-time run time could not be resolved";return}se.run_at=V.toISOString()}if(F.action==="reminder"&&F.message.trim()&&(se.message=F.message.trim()),F.action==="check"&&(F.tool_name.trim()&&(se.tool_name=F.tool_name.trim()),F.tool_input_str.trim()))try{se.tool_input=JSON.parse(F.tool_input_str.trim())}catch{l.value="Tool input must be valid JSON";return}i.value=!0;try{await K.post("/api/schedules",se),Ae.success("Schedule created"),a.value={description:"",action:"reminder",channel_id:"",cron:"",run_at:"",message:"",tool_name:"",tool_input_str:""},u.value=null,n.value=!1,await O()}catch(Se){l.value=Se.message}i.value=!1}async function we(F){b.value=F;try{const se=await K.post(`/api/schedules/${encodeURIComponent(F)}/run`);if(se.status==="failure")Ae.error(`Execution failed: ${se.error||"unknown error"}`);else{const Se=se.warning?`Executed (${se.warning})`:"Executed successfully";Ae.success(Se)}await O()}catch(se){Ae.error(se.message||"Failed to trigger")}b.value=null}async function ke(F){E.value=F.id;const se=!F.paused;try{await K.put(`/api/schedules/${encodeURIComponent(F.id)}`,{paused:se}),Ae.success(se?"Schedule paused":"Schedule resumed"),await O()}catch(Se){Ae.error(Se.message||"Failed to update schedule")}E.value=null}async function ie(F){I.value=F;try{await K.post(`/api/schedules/${encodeURIComponent(F)}/reset-failures`),Ae.success("Failure counters reset"),await O()}catch(se){Ae.error(se.message||"Failed to reset")}I.value=null}async function pe(F){const se=e.value.find(V=>V.id===F);if(await ks({title:"Delete schedule",message:`Delete "${(se==null?void 0:se.description)||F}"? This cannot be undone.`,confirmLabel:"Delete",danger:!0})){y.value=F;try{await K.del(`/api/schedules/${encodeURIComponent(F)}`),Ae.success("Schedule deleted"),await O()}catch(V){Ae.error(V.message||"Failed to delete schedule")}y.value=null}}return We(()=>{O()}),{schedules:e,loading:t,error:s,showCreate:n,form:a,creating:i,createError:l,runAtUtcPreview:d,runAtAnalysis:o,runAtOccurrence:r,cronResult:u,validatingCron:f,cronPresets:p,runningId:b,deletingId:y,togglingId:E,resettingId:I,expandedId:x,history:m,historyLoading:_,historyError:S,cronCount:w,oneTimeCount:T,webhookCount:C,pausedCount:M,failingCount:H,formatTs:fa,formatAge:mm,formatFuture:P,formatMs:R,formatDuration:Qa,onCronInput:j,onRunAtInput:Q,validateCron:U,toggleExpand:N,fetchSchedules:O,doCreate:Y,doRunNow:we,doTogglePause:ke,doResetFailures:ie,doDelete:pe}}},_m=[{id:"live",label:"Live",component:Q_},{id:"agents",label:"Agents",component:nk},{id:"loops",label:"Loops",component:ak},{id:"processes",label:"Processes",component:ik},{id:"schedules",label:"Schedules",component:dk}],uk={components:{TabbedPage:Mr},setup(){return{tabs:_m}},template:''},fk={template:` + `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(!1),a=h({description:"",action:"reminder",channel_id:"",cron:"",run_at:"",message:"",tool_name:"",tool_input_str:""}),i=h(!1),l=h(null),r=h(null),o=J(()=>ck(a.value.run_at));ns(()=>a.value.run_at,()=>{r.value=null});const c=J(()=>{var se;const F=o.value;return F.state==="ok"?F.instant:F.state==="ambiguous"&&r.value!==null&&((se=F.options[r.value])==null?void 0:se.instant)||null}),d=J(()=>{const F=c.value;return F?`${F.toLocaleString()} local — ${F.toISOString()} UTC`:""}),u=h(null),f=h(!1),p=[{label:"Every hour",expr:"0 * * * *"},{label:"Every 6h",expr:"0 */6 * * *"},{label:"Daily 9am",expr:"0 9 * * *"},{label:"Weekly Mon",expr:"0 9 * * 1"},{label:"Every 30m",expr:"*/30 * * * *"}],b=h(null),y=h(null),E=h(null),I=h(null),x=h(null),m=h([]),_=h(!1),S=h("");let g=0;const w=J(()=>e.value.filter(F=>F.cron&&!F.one_time).length),T=J(()=>e.value.filter(F=>F.one_time).length),C=J(()=>e.value.filter(F=>F.trigger).length),M=J(()=>e.value.filter(F=>F.paused).length),H=J(()=>e.value.filter(F=>F.consecutive_failures>0).length);function P(F){if(!F)return"-";const se=Date.now(),V=(new Date(F).getTime()-se)/1e3;if(V<0)return"overdue";if(V<60)return"in < 1 min";if(V<3600)return`in ${Math.floor(V/60)} min`;if(V<86400){const ce=Math.floor(V/3600),ye=Math.floor(V%3600/60);return ye>0?`in ${ce}h ${ye}m`:`in ${ce}h`}const de=Math.floor(V/86400);return`in ${de} day${de!==1?"s":""}`}function R(F){return F==null?"-":F<1e3?`${F}ms`:F<6e4?`${(F/1e3).toFixed(1)}s`:Xa(F/1e3)}function j(F=a.value.cron){a.value.cron=F,Lu(a.value,"cron"),u.value=null}function Q(F=a.value.run_at){a.value.run_at=F,Lu(a.value,"run_at"),u.value=null}async function U(){const F=a.value.cron.trim();if(F){f.value=!0;try{u.value=await G.post("/api/schedules/validate-cron",{expression:F})}catch(se){u.value={valid:!1,error:se.message}}f.value=!1}}async function O(){t.value=!0,s.value=null;try{e.value=await G.get("/api/schedules")}catch(F){s.value=F.message}t.value=!1}async function N(F){if(x.value===F){x.value=null,m.value=[];return}x.value=F,_.value=!0,m.value=[];const se=++g;try{const Se=await G.get(`/api/schedules/${encodeURIComponent(F)}/history?limit=10`);if(se!==g||x.value!==F)return;m.value=Se,S.value=""}catch(Se){if(se!==g||x.value!==F)return;m.value=[],S.value=Se.message||"Failed to load execution history"}se===g&&(_.value=!1)}async function Y(){l.value=null;const F=a.value;if(!F.description.trim()){l.value="Description is required";return}if(!F.channel_id.trim()){l.value="Channel ID is required";return}if(!F.cron.trim()&&!F.run_at.trim()){l.value="Cron expression or run_at time is required";return}if(F.cron.trim()&&F.run_at.trim()){l.value="Choose either Cron or One-Time, not both";return}const se={description:F.description.trim(),action:F.action,channel_id:F.channel_id.trim()};if(F.cron.trim()&&(se.cron=F.cron.trim()),F.run_at.trim()){const Se=o.value;if(Se.state==="nonexistent"){l.value="That local time does not exist (daylight saving gap)";return}if(Se.state==="invalid"){l.value="One-time run time is not a valid date";return}const V=c.value;if(Se.state==="ambiguous"&&r.value===null){l.value="That local time happens twice — choose which occurrence to use";return}if(!V){l.value="One-time run time could not be resolved";return}se.run_at=V.toISOString()}if(F.action==="reminder"&&F.message.trim()&&(se.message=F.message.trim()),F.action==="check"&&(F.tool_name.trim()&&(se.tool_name=F.tool_name.trim()),F.tool_input_str.trim()))try{se.tool_input=JSON.parse(F.tool_input_str.trim())}catch{l.value="Tool input must be valid JSON";return}i.value=!0;try{await G.post("/api/schedules",se),Ae.success("Schedule created"),a.value={description:"",action:"reminder",channel_id:"",cron:"",run_at:"",message:"",tool_name:"",tool_input_str:""},u.value=null,n.value=!1,await O()}catch(Se){l.value=Se.message}i.value=!1}async function we(F){b.value=F;try{const se=await G.post(`/api/schedules/${encodeURIComponent(F)}/run`);if(se.status==="failure")Ae.error(`Execution failed: ${se.error||"unknown error"}`);else{const Se=se.warning?`Executed (${se.warning})`:"Executed successfully";Ae.success(Se)}await O()}catch(se){Ae.error(se.message||"Failed to trigger")}b.value=null}async function ke(F){E.value=F.id;const se=!F.paused;try{await G.put(`/api/schedules/${encodeURIComponent(F.id)}`,{paused:se}),Ae.success(se?"Schedule paused":"Schedule resumed"),await O()}catch(Se){Ae.error(Se.message||"Failed to update schedule")}E.value=null}async function ie(F){I.value=F;try{await G.post(`/api/schedules/${encodeURIComponent(F)}/reset-failures`),Ae.success("Failure counters reset"),await O()}catch(se){Ae.error(se.message||"Failed to reset")}I.value=null}async function he(F){const se=e.value.find(V=>V.id===F);if(await _s({title:"Delete schedule",message:`Delete "${(se==null?void 0:se.description)||F}"? This cannot be undone.`,confirmLabel:"Delete",danger:!0})){y.value=F;try{await G.del(`/api/schedules/${encodeURIComponent(F)}`),Ae.success("Schedule deleted"),await O()}catch(V){Ae.error(V.message||"Failed to delete schedule")}y.value=null}}return We(()=>{O()}),{schedules:e,loading:t,error:s,showCreate:n,form:a,creating:i,createError:l,runAtUtcPreview:d,runAtAnalysis:o,runAtOccurrence:r,cronResult:u,validatingCron:f,cronPresets:p,runningId:b,deletingId:y,togglingId:E,resettingId:I,expandedId:x,history:m,historyLoading:_,historyError:S,cronCount:w,oneTimeCount:T,webhookCount:C,pausedCount:M,failingCount:H,formatTs:pa,formatAge:mm,formatFuture:P,formatMs:R,formatDuration:Xa,onCronInput:j,onRunAtInput:Q,validateCron:U,toggleExpand:N,fetchSchedules:O,doCreate:Y,doRunNow:we,doTogglePause:ke,doResetFailures:ie,doDelete:he}}},_m=[{id:"live",label:"Live",component:Q_},{id:"agents",label:"Agents",component:nk},{id:"loops",label:"Loops",component:ak},{id:"processes",label:"Processes",component:ik},{id:"schedules",label:"Schedules",component:dk}],uk={components:{TabbedPage:Mr},setup(){return{tabs:_m}},template:''},fk={template:`

Audit Log

@@ -1243,7 +1243,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(null),a=h({tool:"",user:"",keyword:"",date:"",limit:50});function i(c){if(!c)return"";if(typeof c=="string")return c;try{return JSON.stringify(c,null,2)}catch{return String(c)}}function l(c){n.value=n.value===c?null:c}function r(){a.value={tool:"",user:"",keyword:"",date:"",limit:50},o()}async function o(){t.value=!0,s.value=null,n.value=null;try{const c=new URLSearchParams;a.value.tool&&c.set("tool",a.value.tool),a.value.user&&c.set("user",a.value.user),a.value.keyword&&c.set("q",a.value.keyword),a.value.date&&c.set("date",a.value.date),c.set("limit",String(a.value.limit));const d=c.toString(),u=await K.get(`/api/audit${d?"?"+d:""}`);e.value=Array.isArray(u)?u:[]}catch(c){s.value=c.message}t.value=!1}return We(()=>{o()}),{entries:e,loading:t,error:s,expandedIdx:n,filters:a,formatTs:fa,formatDetail:i,truncateBlock:gm,toggleExpand:l,clearFilters:r,fetchAudit:o}}},Du=[{id:"all",name:"All Sessions",icon:"list",filters:{}},{id:"active",name:"Recently Active",icon:"activity",filters:{minAge:0,maxAge:3600}},{id:"discord",name:"Discord Only",icon:"message",filters:{source:"discord"}},{id:"web",name:"Web Only",icon:"globe",filters:{source:"web"}},{id:"long",name:"Long Conversations",icon:"book",filters:{minMessages:10}},{id:"compacted",name:"Compacted",icon:"archive",filters:{hasCompaction:!0}}],pk=[{value:"last_active",label:"Last Active"},{value:"created_at",label:"Created"},{value:"message_count",label:"Message Count"}],hk={template:` + `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(null),a=h({tool:"",user:"",keyword:"",date:"",limit:50});function i(c){if(!c)return"";if(typeof c=="string")return c;try{return JSON.stringify(c,null,2)}catch{return String(c)}}function l(c){n.value=n.value===c?null:c}function r(){a.value={tool:"",user:"",keyword:"",date:"",limit:50},o()}async function o(){t.value=!0,s.value=null,n.value=null;try{const c=new URLSearchParams;a.value.tool&&c.set("tool",a.value.tool),a.value.user&&c.set("user",a.value.user),a.value.keyword&&c.set("q",a.value.keyword),a.value.date&&c.set("date",a.value.date),c.set("limit",String(a.value.limit));const d=c.toString(),u=await G.get(`/api/audit${d?"?"+d:""}`);e.value=Array.isArray(u)?u:[]}catch(c){s.value=c.message}t.value=!1}return We(()=>{o()}),{entries:e,loading:t,error:s,expandedIdx:n,filters:a,formatTs:pa,formatDetail:i,truncateBlock:gm,toggleExpand:l,clearFilters:r,fetchAudit:o}}},Du=[{id:"all",name:"All Sessions",icon:"list",filters:{}},{id:"active",name:"Recently Active",icon:"activity",filters:{minAge:0,maxAge:3600}},{id:"discord",name:"Discord Only",icon:"message",filters:{source:"discord"}},{id:"web",name:"Web Only",icon:"globe",filters:{source:"web"}},{id:"long",name:"Long Conversations",icon:"book",filters:{minMessages:10}},{id:"compacted",name:"Compacted",icon:"archive",filters:{hasCompaction:!0}}],pk=[{value:"last_active",label:"Last Active"},{value:"created_at",label:"Created"},{value:"message_count",label:"Message Count"}],hk={template:`
@@ -1572,8 +1572,8 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(null),a=h(null),i=h(!1);let l=0;const r=h(null),o=h(!1),c=h(new Set),d=h(!1),u=h("all"),f=h(""),p=h("last_active"),b=h(!1),y=Du,E=pk,I=h([]),x=h(!1),m=h(""),_=h("flat"),S=h(new Set),g=h(""),w=h(""),T=h(""),C=h(null),M=h(!1);function H(){try{const G=localStorage.getItem("odin-session-presets");G&&(I.value=JSON.parse(G))}catch{}}function P(){try{localStorage.setItem("odin-session-presets",JSON.stringify(I.value))}catch{}}const R=J(()=>f.value.trim()!==""||u.value!=="all"),j=J(()=>{let G=[...e.value];const me=Du.find(Ve=>Ve.id===u.value),Ce=me?me.filters:{};if(Ce.source&&(G=G.filter(Ve=>Ve.source===Ce.source)),Ce.minMessages&&(G=G.filter(Ve=>Ve.message_count>=Ce.minMessages)),Ce.hasCompaction&&(G=G.filter(Ve=>Ve.has_summary)),Ce.maxAge!=null){const Ve=Date.now()/1e3;G=G.filter(pt=>pt.last_active&&Ve-pt.last_active<=Ce.maxAge)}if(f.value.trim()){const Ve=f.value.toLowerCase().trim();G=G.filter(pt=>(pt.channel_id||"").toLowerCase().includes(Ve)||(pt.last_user_id||"").toLowerCase().includes(Ve)||(pt.source||"").toLowerCase().includes(Ve))}const Ne=p.value,Pe=b.value?1:-1;return G.sort((Ve,pt)=>{const as=Ve[Ne]||0,Fs=pt[Ne]||0;return(as-Fs)*Pe}),G}),Q=J(()=>{if(!a.value||!a.value.messages)return[];const G=a.value.messages;if(G.length===0)return[];const me=[];let Ce=[];for(const Ne of G)Ne.role==="user"&&Ce.length>0&&(me.push(Ce),Ce=[]),Ce.push(Ne);return Ce.length>0&&me.push(Ce),me}),U=J(()=>j.value.length>0&&c.value.size===j.value.length);function O(G){const me=G.find(Ce=>Ce.role==="user");if(me&&me.content){const Ce=me.content.slice(0,120);return Ce.lengthme.id!==G),P(),u.value===G&&(u.value="all")}function pe(){u.value="all",f.value="",p.value="last_active",b.value=!1}function F(G){if(!G)return"—";const me=Date.now()/1e3-G;if(me<60)return"just now";if(me<3600){const Ne=Math.floor(me/60);return`${Ne} minute${Ne!==1?"s":""} ago`}if(me<86400){const Ne=Math.floor(me/3600);return`${Ne} hour${Ne!==1?"s":""} ago`}const Ce=Math.floor(me/86400);return`${Ce} day${Ce!==1?"s":""} ago`}function se(G){if(!G)return"";try{return new Date(G*1e3).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return""}}function Se(G){if(!G)return"";try{return new Date(G*1e3).toLocaleString()}catch{return""}}function V(G){return G==="user"?"bg-gray-900/50 border border-gray-800":G==="assistant"?"bg-indigo-950/30 border border-indigo-900/30":"bg-gray-900/30 border border-gray-800/50"}function de(G){return G==="user"?"sess-msg-user":G==="assistant"?"sess-msg-assistant":"sess-msg-system"}function ce(G){return G==="user"?"badge-info":G==="assistant"?"badge-success":"badge-warning"}function _e(G){return G==="user"?"sess-dot-user":G==="assistant"?"sess-dot-assistant":"sess-dot-system"}function ve(G){return G==="user"?"text-cyan-400":G==="assistant"?"text-indigo-400":"text-gray-500"}function He(G){return G?G.length>2e3?G.slice(0,2e3)+` -... (truncated)`:G:""}async function k(){const G=g.value.trim();if(G){M.value=!0;try{let me=`/api/sessions/search?q=${encodeURIComponent(G)}&limit=50`;w.value.trim()&&(me+=`&channel_id=${encodeURIComponent(w.value.trim())}`),T.value.trim()&&(me+=`&user_id=${encodeURIComponent(T.value.trim())}`);const Ce=await K.get(me);C.value=Ce.results||[]}catch{C.value=[]}M.value=!1}}function L(){g.value="",w.value="",T.value="",C.value=null}function $(G){return G?G.replace(/&/g,"&").replace(//g,">").replace(/>>>/g,'').replace(/<<</g,""):""}function ee(G){return G==="user"?"fts-result-user":G==="assistant"?"fts-result-assistant":G==="summary"?"fts-result-summary":G==="fts"?"fts-result-fts":G==="channel"?"fts-result-channel":"fts-result-default"}function Z(G){return G==="user"?"badge-info":G==="assistant"?"badge-success":G==="summary"?"badge-warning":G==="fts"?"badge-success":"badge-info"}async function X(){t.value=!0,s.value=null;try{e.value=await K.get("/api/sessions")}catch(G){s.value=G.message}t.value=!1}function ue(){s.value=null,X()}async function oe(G){if(n.value===G){n.value=null,a.value=null,S.value=new Set;return}n.value=G,a.value=null,i.value=!0,S.value=new Set;const me=++l;try{const Ce=await K.get(`/api/sessions/${encodeURIComponent(G)}`);me===l&&n.value===G&&(a.value=Ce)}catch(Ce){me===l&&n.value===G&&(a.value={messages:[],summary:"",error:Ce.message||"Failed to load session"})}finally{me===l&&(i.value=!1)}}function le(G){const me=new Set(c.value);me.has(G)?me.delete(G):me.add(G),c.value=me}function te(){U.value?c.value=new Set:c.value=new Set(j.value.map(G=>G.channel_id))}function ne(G){r.value=G}async function fe(){if(r.value){o.value=!0;try{await K.del(`/api/sessions/${encodeURIComponent(r.value)}`),n.value===r.value&&(n.value=null,a.value=null),c.value.delete(r.value),await X()}catch(G){s.value=G.message||"Failed to clear session"}o.value=!1,r.value=null}}function be(){d.value=!0}async function Te(){if(c.value.size!==0){o.value=!0;try{await K.post("/api/sessions/clear-bulk",{channel_ids:[...c.value]}),c.value.has(n.value)&&(n.value=null,a.value=null),c.value=new Set,await X()}catch(G){s.value=G.message||"Failed to clear sessions"}o.value=!1,d.value=!1}}async function Ie(G,me){const Ce=`/api/sessions/${encodeURIComponent(G)}/export?format=${me}`;try{const Ne=await K.getBlob(Ce),Pe=URL.createObjectURL(Ne),Ve=document.createElement("a");Ve.href=Pe,Ve.download=`session-${G}.${me==="text"?"txt":"json"}`,Ve.click(),URL.revokeObjectURL(Pe)}catch(Ne){s.value=Ne.message||"Failed to export session"}}let Le=null;function De(G){G.payload&&G.payload.channel_id&&(clearTimeout(Le),Le=setTimeout(()=>{if(X(),n.value&&G.payload.channel_id===n.value){const me=n.value,Ce=l;K.get(`/api/sessions/${encodeURIComponent(me)}`).then(Ne=>{Ce!==l||n.value!==me||(a.value=Ne)}).catch(()=>{})}},2e3))}let Be=!1;function qe(){Be||(Be=!0,X(),Ke.subscribe("events",De))}We(()=>{H(),qe()}),Ms(()=>{qe()});function ct(){Be&&(Be=!1,Ke.unsubscribe("events",De),clearTimeout(Le))}return Ps(ct),xt(ct),{sessions:e,loading:t,error:s,expandedId:n,detail:a,detailLoading:i,clearTarget:r,clearing:o,selected:c,allSelected:U,bulkClearing:d,activePreset:u,searchQuery:f,sortBy:p,sortAsc:b,filterPresets:y,sortOptions:E,filteredSessions:j,hasActiveFilters:R,customPresets:I,showSavePreset:x,newPresetName:m,threadView:_,threads:Q,collapsedThreads:S,ftsQuery:g,ftsChannelId:w,ftsUserId:T,ftsResults:C,ftsSearching:M,formatAge:F,formatTimestamp:se,formatFullTimestamp:Se,messageClass:V,threadMsgClass:de,roleBadge:ce,roleDotClass:_e,roleLabelClass:ve,truncateContent:He,threadSummary:O,fetchSessions:X,retry:ue,toggleSession:oe,toggleSelect:le,toggleSelectAll:te,confirmClear:ne,clearSession:fe,confirmBulkClear:be,doBulkClear:Te,exportSession:Ie,applyPreset:Y,applyCustomPreset:we,saveCustomPreset:ke,removeCustomPreset:ie,resetFilters:pe,toggleThread:N,runFtsSearch:k,clearFtsSearch:L,highlightSnippet:$,ftsResultClass:ee,ftsTypeBadge:Z}}},mk={props:["trace"],template:` + `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(null),a=h(null),i=h(!1);let l=0;const r=h(null),o=h(!1),c=h(new Set),d=h(!1),u=h("all"),f=h(""),p=h("last_active"),b=h(!1),y=Du,E=pk,I=h([]),x=h(!1),m=h(""),_=h("flat"),S=h(new Set),g=h(""),w=h(""),T=h(""),C=h(null),M=h(!1);function H(){try{const K=localStorage.getItem("odin-session-presets");K&&(I.value=JSON.parse(K))}catch{}}function P(){try{localStorage.setItem("odin-session-presets",JSON.stringify(I.value))}catch{}}const R=J(()=>f.value.trim()!==""||u.value!=="all"),j=J(()=>{let K=[...e.value];const xe=Du.find(Pe=>Pe.id===u.value),Ce=xe?xe.filters:{};if(Ce.source&&(K=K.filter(Pe=>Pe.source===Ce.source)),Ce.minMessages&&(K=K.filter(Pe=>Pe.message_count>=Ce.minMessages)),Ce.hasCompaction&&(K=K.filter(Pe=>Pe.has_summary)),Ce.maxAge!=null){const Pe=Date.now()/1e3;K=K.filter(pt=>pt.last_active&&Pe-pt.last_active<=Ce.maxAge)}if(f.value.trim()){const Pe=f.value.toLowerCase().trim();K=K.filter(pt=>(pt.channel_id||"").toLowerCase().includes(Pe)||(pt.last_user_id||"").toLowerCase().includes(Pe)||(pt.source||"").toLowerCase().includes(Pe))}const Re=p.value,Ve=b.value?1:-1;return K.sort((Pe,pt)=>{const ls=Pe[Re]||0,Ps=pt[Re]||0;return(ls-Ps)*Ve}),K}),Q=J(()=>{if(!a.value||!a.value.messages)return[];const K=a.value.messages;if(K.length===0)return[];const xe=[];let Ce=[];for(const Re of K)Re.role==="user"&&Ce.length>0&&(xe.push(Ce),Ce=[]),Ce.push(Re);return Ce.length>0&&xe.push(Ce),xe}),U=J(()=>j.value.length>0&&c.value.size===j.value.length);function O(K){const xe=K.find(Ce=>Ce.role==="user");if(xe&&xe.content){const Ce=xe.content.slice(0,120);return Ce.lengthxe.id!==K),P(),u.value===K&&(u.value="all")}function he(){u.value="all",f.value="",p.value="last_active",b.value=!1}function F(K){if(!K)return"—";const xe=Date.now()/1e3-K;if(xe<60)return"just now";if(xe<3600){const Re=Math.floor(xe/60);return`${Re} minute${Re!==1?"s":""} ago`}if(xe<86400){const Re=Math.floor(xe/3600);return`${Re} hour${Re!==1?"s":""} ago`}const Ce=Math.floor(xe/86400);return`${Ce} day${Ce!==1?"s":""} ago`}function se(K){if(!K)return"";try{return new Date(K*1e3).toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return""}}function Se(K){if(!K)return"";try{return new Date(K*1e3).toLocaleString()}catch{return""}}function V(K){return K==="user"?"bg-gray-900/50 border border-gray-800":K==="assistant"?"bg-indigo-950/30 border border-indigo-900/30":"bg-gray-900/30 border border-gray-800/50"}function de(K){return K==="user"?"sess-msg-user":K==="assistant"?"sess-msg-assistant":"sess-msg-system"}function ce(K){return K==="user"?"badge-info":K==="assistant"?"badge-success":"badge-warning"}function ye(K){return K==="user"?"sess-dot-user":K==="assistant"?"sess-dot-assistant":"sess-dot-system"}function ge(K){return K==="user"?"text-cyan-400":K==="assistant"?"text-indigo-400":"text-gray-500"}function He(K){return K?K.length>2e3?K.slice(0,2e3)+` +... (truncated)`:K:""}async function k(){const K=g.value.trim();if(K){M.value=!0;try{let xe=`/api/sessions/search?q=${encodeURIComponent(K)}&limit=50`;w.value.trim()&&(xe+=`&channel_id=${encodeURIComponent(w.value.trim())}`),T.value.trim()&&(xe+=`&user_id=${encodeURIComponent(T.value.trim())}`);const Ce=await G.get(xe);C.value=Ce.results||[]}catch{C.value=[]}M.value=!1}}function L(){g.value="",w.value="",T.value="",C.value=null}function $(K){return K?K.replace(/&/g,"&").replace(//g,">").replace(/>>>/g,'').replace(/<<</g,""):""}function ee(K){return K==="user"?"fts-result-user":K==="assistant"?"fts-result-assistant":K==="summary"?"fts-result-summary":K==="fts"?"fts-result-fts":K==="channel"?"fts-result-channel":"fts-result-default"}function Z(K){return K==="user"?"badge-info":K==="assistant"?"badge-success":K==="summary"?"badge-warning":K==="fts"?"badge-success":"badge-info"}async function X(){t.value=!0,s.value=null;try{e.value=await G.get("/api/sessions")}catch(K){s.value=K.message}t.value=!1}function ue(){s.value=null,X()}async function oe(K){if(n.value===K){n.value=null,a.value=null,S.value=new Set;return}n.value=K,a.value=null,i.value=!0,S.value=new Set;const xe=++l;try{const Ce=await G.get(`/api/sessions/${encodeURIComponent(K)}`);xe===l&&n.value===K&&(a.value=Ce)}catch(Ce){xe===l&&n.value===K&&(a.value={messages:[],summary:"",error:Ce.message||"Failed to load session"})}finally{xe===l&&(i.value=!1)}}function le(K){const xe=new Set(c.value);xe.has(K)?xe.delete(K):xe.add(K),c.value=xe}function te(){U.value?c.value=new Set:c.value=new Set(j.value.map(K=>K.channel_id))}function ne(K){r.value=K}async function fe(){if(r.value){o.value=!0;try{await G.del(`/api/sessions/${encodeURIComponent(r.value)}`),n.value===r.value&&(n.value=null,a.value=null),c.value.delete(r.value),await X()}catch(K){s.value=K.message||"Failed to clear session"}o.value=!1,r.value=null}}function ve(){d.value=!0}async function Te(){if(c.value.size!==0){o.value=!0;try{await G.post("/api/sessions/clear-bulk",{channel_ids:[...c.value]}),c.value.has(n.value)&&(n.value=null,a.value=null),c.value=new Set,await X()}catch(K){s.value=K.message||"Failed to clear sessions"}o.value=!1,d.value=!1}}async function Oe(K,xe){const Ce=`/api/sessions/${encodeURIComponent(K)}/export?format=${xe}`;try{const Re=await G.getBlob(Ce),Ve=URL.createObjectURL(Re),Pe=document.createElement("a");Pe.href=Ve,Pe.download=`session-${K}.${xe==="text"?"txt":"json"}`,Pe.click(),URL.revokeObjectURL(Ve)}catch(Re){s.value=Re.message||"Failed to export session"}}let Le=null;function De(K){K.payload&&K.payload.channel_id&&(clearTimeout(Le),Le=setTimeout(()=>{if(X(),n.value&&K.payload.channel_id===n.value){const xe=n.value,Ce=l;G.get(`/api/sessions/${encodeURIComponent(xe)}`).then(Re=>{Ce!==l||n.value!==xe||(a.value=Re)}).catch(()=>{})}},2e3))}let Be=!1;function qe(){Be||(Be=!0,X(),Ke.subscribe("events",De))}We(()=>{H(),qe()}),Ds(()=>{qe()});function ct(){Be&&(Be=!1,Ke.unsubscribe("events",De),clearTimeout(Le))}return Ms(ct),xt(ct),{sessions:e,loading:t,error:s,expandedId:n,detail:a,detailLoading:i,clearTarget:r,clearing:o,selected:c,allSelected:U,bulkClearing:d,activePreset:u,searchQuery:f,sortBy:p,sortAsc:b,filterPresets:y,sortOptions:E,filteredSessions:j,hasActiveFilters:R,customPresets:I,showSavePreset:x,newPresetName:m,threadView:_,threads:Q,collapsedThreads:S,ftsQuery:g,ftsChannelId:w,ftsUserId:T,ftsResults:C,ftsSearching:M,formatAge:F,formatTimestamp:se,formatFullTimestamp:Se,messageClass:V,threadMsgClass:de,roleBadge:ce,roleDotClass:ye,roleLabelClass:ge,truncateContent:He,threadSummary:O,fetchSessions:X,retry:ue,toggleSession:oe,toggleSelect:le,toggleSelectAll:te,confirmClear:ne,clearSession:fe,confirmBulkClear:ve,doBulkClear:Te,exportSession:Oe,applyPreset:Y,applyCustomPreset:we,saveCustomPreset:ke,removeCustomPreset:ie,resetFilters:he,toggleThread:N,runFtsSearch:k,clearFtsSearch:L,highlightSnippet:$,ftsResultClass:ee,ftsTypeBadge:Z}}},mk={props:["trace"],template:`
Context Assembly
@@ -2013,7 +2013,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h([]),t=h([]),s=h(!0),n=h(null),a=h(null),i=h(null),l=h(""),r=h(""),o=h(0),c=h({}),d=h({channel_id:"",user_id:"",tool_name:"",errors_only:!1,limit:50});function u(w){if(!w)return"—";try{const T=new Date(w);return isNaN(T.getTime())?w:T.toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return w}}function f(w){return!w&&w!==0?"—":w<1e3?w+"ms":(w/1e3).toFixed(1)+"s"}function p(w){return!w&&w!==0?"—":w>=1e3?(w/1e3).toFixed(1)+"k":String(w)}function b(w){if(!w)return"";if(typeof w=="string")return w;try{return JSON.stringify(w,null,2)}catch{return String(w)}}function y(w){a.value===w?a.value=null:(a.value=w,c.value={})}function E(w,T){const C=w+"-"+T;c.value={...c.value,[C]:!c.value[C]}}function I(w,T){return!!c.value[w+"-"+T]}function x(){d.value={channel_id:"",user_id:"",tool_name:"",errors_only:!1,limit:50},r.value="",l.value="",i.value=null,S()}async function m(){try{const w=await K.get("/api/trajectories");e.value=w.files||[],o.value=w.count||0}catch{}}let _=0;async function S(){const w=++_;s.value=!0,n.value=null,a.value=null,i.value=null,c.value={};try{if(r.value){const T=await K.get(`/api/trajectories/${encodeURIComponent(r.value)}?limit=${d.value.limit}`);if(w!==_)return;let C=T.entries||[];d.value.tool_name&&(C=C.filter(M=>(M.tools_used||[]).includes(d.value.tool_name))),d.value.errors_only&&(C=C.filter(M=>M.is_error)),d.value.channel_id&&(C=C.filter(M=>M.channel_id===d.value.channel_id)),d.value.user_id&&(C=C.filter(M=>M.user_id===d.value.user_id)),t.value=C}else{const T=new URLSearchParams;d.value.channel_id&&T.set("channel_id",d.value.channel_id),d.value.user_id&&T.set("user_id",d.value.user_id),d.value.tool_name&&T.set("tool_name",d.value.tool_name),d.value.errors_only&&T.set("errors_only","true"),T.set("limit",String(d.value.limit));const C=T.toString(),M=await K.get(`/api/trajectories/search/query?${C}`);if(w!==_)return;t.value=M.results||[]}}catch(T){if(w!==_)return;n.value=T.message}w===_&&(s.value=!1)}async function g(){if(!l.value.trim())return;const w=++_;s.value=!0,n.value=null,c.value={};try{const T=await K.get(`/api/trajectories/message/${encodeURIComponent(l.value.trim())}`);if(w!==_)return;i.value=T.entry||null,i.value||(n.value="No trace found for this message ID")}catch(T){if(w!==_)return;T.status===404?(i.value=null,n.value="No trace found for message ID: "+l.value):n.value=T.message}w===_&&(s.value=!1)}return We(async()=>{await m(),await S()}),{files:e,entries:t,loading:s,error:n,expandedIdx:a,singleTrace:i,messageIdQuery:l,selectedFile:r,totalSaved:o,filters:d,expandedIterations:c,formatTs:u,formatDuration:f,formatTokens:p,formatJSON:b,truncateBlock:gm,toggleExpand:y,toggleIteration:E,isIterationExpanded:I,clearFilters:x,fetchFiles:m,fetchTraces:S,lookupMessage:g}}},vk={template:` + `,setup(){const e=h([]),t=h([]),s=h(!0),n=h(null),a=h(null),i=h(null),l=h(""),r=h(""),o=h(0),c=h({}),d=h({channel_id:"",user_id:"",tool_name:"",errors_only:!1,limit:50});function u(w){if(!w)return"—";try{const T=new Date(w);return isNaN(T.getTime())?w:T.toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return w}}function f(w){return!w&&w!==0?"—":w<1e3?w+"ms":(w/1e3).toFixed(1)+"s"}function p(w){return!w&&w!==0?"—":w>=1e3?(w/1e3).toFixed(1)+"k":String(w)}function b(w){if(!w)return"";if(typeof w=="string")return w;try{return JSON.stringify(w,null,2)}catch{return String(w)}}function y(w){a.value===w?a.value=null:(a.value=w,c.value={})}function E(w,T){const C=w+"-"+T;c.value={...c.value,[C]:!c.value[C]}}function I(w,T){return!!c.value[w+"-"+T]}function x(){d.value={channel_id:"",user_id:"",tool_name:"",errors_only:!1,limit:50},r.value="",l.value="",i.value=null,S()}async function m(){try{const w=await G.get("/api/trajectories");e.value=w.files||[],o.value=w.count||0}catch{}}let _=0;async function S(){const w=++_;s.value=!0,n.value=null,a.value=null,i.value=null,c.value={};try{if(r.value){const T=await G.get(`/api/trajectories/${encodeURIComponent(r.value)}?limit=${d.value.limit}`);if(w!==_)return;let C=T.entries||[];d.value.tool_name&&(C=C.filter(M=>(M.tools_used||[]).includes(d.value.tool_name))),d.value.errors_only&&(C=C.filter(M=>M.is_error)),d.value.channel_id&&(C=C.filter(M=>M.channel_id===d.value.channel_id)),d.value.user_id&&(C=C.filter(M=>M.user_id===d.value.user_id)),t.value=C}else{const T=new URLSearchParams;d.value.channel_id&&T.set("channel_id",d.value.channel_id),d.value.user_id&&T.set("user_id",d.value.user_id),d.value.tool_name&&T.set("tool_name",d.value.tool_name),d.value.errors_only&&T.set("errors_only","true"),T.set("limit",String(d.value.limit));const C=T.toString(),M=await G.get(`/api/trajectories/search/query?${C}`);if(w!==_)return;t.value=M.results||[]}}catch(T){if(w!==_)return;n.value=T.message}w===_&&(s.value=!1)}async function g(){if(!l.value.trim())return;const w=++_;s.value=!0,n.value=null,c.value={};try{const T=await G.get(`/api/trajectories/message/${encodeURIComponent(l.value.trim())}`);if(w!==_)return;i.value=T.entry||null,i.value||(n.value="No trace found for this message ID")}catch(T){if(w!==_)return;T.status===404?(i.value=null,n.value="No trace found for message ID: "+l.value):n.value=T.message}w===_&&(s.value=!1)}return We(async()=>{await m(),await S()}),{files:e,entries:t,loading:s,error:n,expandedIdx:a,singleTrace:i,messageIdQuery:l,selectedFile:r,totalSaved:o,filters:d,expandedIterations:c,formatTs:u,formatDuration:f,formatTokens:p,formatJSON:b,truncateBlock:gm,toggleExpand:y,toggleIteration:E,isIterationExpanded:I,clearFilters:x,fetchFiles:m,fetchTraces:S,lookupMessage:g}}},vk={template:`
@@ -2178,7 +2178,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h(!0),t=h(null),s=h(!1),n=h({by_user:{},by_channel:{},by_tool:{},recent:[],pricing:{}}),a=h({requests:0,input_tokens:0,output_tokens:0,total_tokens:0,cost_usd:0}),i=h("user");let l=null;const r=[{key:"user",label:"By User"},{key:"channel",label:"By Channel"},{key:"tool",label:"By Tool"},{key:"recent",label:"Recent"}],o=J(()=>[...n.value.recent||[]].reverse()),c=async()=>{try{const b=await K.get("/api/usage");n.value=b,a.value=b.totals||a.value,t.value=null,s.value=!0}catch(b){t.value=b.message}finally{e.value=!1}},d=()=>{e.value=!0,c()};let u=!1;function f(){u||(u=!0,c(),l||(l=setInterval(c,15e3)))}function p(){u&&(u=!1,l&&(clearInterval(l),l=null))}return We(f),Ms(f),Ps(p),xt(p),{hasData:s,loading:e,error:t,data:n,totals:a,activeTab:i,tabs:r,recentReversed:o,fmtNum:vm,formatTime:hm,retry:d}}},km=[{id:"audit",label:"Audit",component:fk},{id:"sessions",label:"Sessions",component:hk},{id:"traces",label:"Traces",component:gk},{id:"usage",label:"Usage",component:vk}],bk={components:{TabbedPage:Mr},setup(){return{tabs:km}},template:''},no=[{id:"system",label:"System & Commands",icon:"terminal",match:e=>/^(run_command|run_script|read_file|write_file|list_directory|search_files|manage_process|file_|post_file)/.test(e)},{id:"devops",label:"DevOps & Infrastructure",icon:"server",match:e=>/^(git_ops|docker_ops|kubectl|terraform_ops|http_probe)/.test(e)},{id:"agents",label:"Agents & Orchestration",icon:"bot",match:e=>/^(spawn_agent|send_to_agent|wait_for_agents|get_agent_results|kill_agent|list_agents|spawn_loop_agents|collect_loop_agents)/.test(e)},{id:"workflow",label:"Workflows & Tasks",icon:"workflow",match:e=>/^(delegate_task|cancel_task|list_tasks|schedule_|start_loop|stop_loop|list_loops|delete_schedule|list_schedules|update_schedule|parse_time)/.test(e)},{id:"network",label:"Network & Web",icon:"globe",match:e=>/^(web_|browser_|search_web|fetch_url|http_)/.test(e)},{id:"knowledge",label:"Knowledge & Search",icon:"book",match:e=>/^(search_knowledge|ingest_|knowledge_|search_history|search_audit|bulk_ingest|delete_knowledge|list_knowledge)/.test(e)},{id:"discord",label:"Discord & Admin",icon:"message",match:e=>/^(send_|add_reaction|create_poll|purge_|discord_|embed_|read_channel|set_permission)/.test(e)},{id:"skills",label:"Skills",icon:"puzzle",match:e=>/^(create_skill|edit_skill|delete_skill|enable_skill|disable_skill|install_skill|export_skill|skill_status|invoke_skill|list_skills)/.test(e)},{id:"memory",label:"Memory & State",icon:"brain",match:e=>/^(memory_manage|list_manage)/.test(e)},{id:"ai",label:"AI & Generation",icon:"sparkles",match:e=>/^(generate_|analyze_|claude_|vision_|comfyui_)/.test(e)},{id:"integrations",label:"Integrations",icon:"link",match:e=>/^(issue_tracker|slack_|grafana_|mcp_)/.test(e)},{id:"other",label:"Other Tools",icon:"wrench",match:()=>!0}],yk={template:` + `,setup(){const e=h(!0),t=h(null),s=h(!1),n=h({by_user:{},by_channel:{},by_tool:{},recent:[],pricing:{}}),a=h({requests:0,input_tokens:0,output_tokens:0,total_tokens:0,cost_usd:0}),i=h("user");let l=null;const r=[{key:"user",label:"By User"},{key:"channel",label:"By Channel"},{key:"tool",label:"By Tool"},{key:"recent",label:"Recent"}],o=J(()=>[...n.value.recent||[]].reverse()),c=async()=>{try{const b=await G.get("/api/usage");n.value=b,a.value=b.totals||a.value,t.value=null,s.value=!0}catch(b){t.value=b.message}finally{e.value=!1}},d=()=>{e.value=!0,c()};let u=!1;function f(){u||(u=!0,c(),l||(l=setInterval(c,15e3)))}function p(){u&&(u=!1,l&&(clearInterval(l),l=null))}return We(f),Ds(f),Ms(p),xt(p),{hasData:s,loading:e,error:t,data:n,totals:a,activeTab:i,tabs:r,recentReversed:o,fmtNum:vm,formatTime:hm,retry:d}}},km=[{id:"audit",label:"Audit",component:fk},{id:"sessions",label:"Sessions",component:hk},{id:"traces",label:"Traces",component:gk},{id:"usage",label:"Usage",component:vk}],bk={components:{TabbedPage:Mr},setup(){return{tabs:km}},template:''},no=[{id:"system",label:"System & Commands",icon:"terminal",match:e=>/^(run_command|run_script|read_file|write_file|list_directory|search_files|manage_process|file_|post_file)/.test(e)},{id:"devops",label:"DevOps & Infrastructure",icon:"server",match:e=>/^(git_ops|docker_ops|kubectl|terraform_ops|http_probe)/.test(e)},{id:"agents",label:"Agents & Orchestration",icon:"bot",match:e=>/^(spawn_agent|send_to_agent|wait_for_agents|get_agent_results|kill_agent|list_agents|spawn_loop_agents|collect_loop_agents)/.test(e)},{id:"workflow",label:"Workflows & Tasks",icon:"workflow",match:e=>/^(delegate_task|cancel_task|list_tasks|schedule_|start_loop|stop_loop|list_loops|delete_schedule|list_schedules|update_schedule|parse_time)/.test(e)},{id:"network",label:"Network & Web",icon:"globe",match:e=>/^(web_|browser_|search_web|fetch_url|http_)/.test(e)},{id:"knowledge",label:"Knowledge & Search",icon:"book",match:e=>/^(search_knowledge|ingest_|knowledge_|search_history|search_audit|bulk_ingest|delete_knowledge|list_knowledge)/.test(e)},{id:"discord",label:"Discord & Admin",icon:"message",match:e=>/^(send_|add_reaction|create_poll|purge_|discord_|embed_|read_channel|set_permission)/.test(e)},{id:"skills",label:"Skills",icon:"puzzle",match:e=>/^(create_skill|edit_skill|delete_skill|enable_skill|disable_skill|install_skill|export_skill|skill_status|invoke_skill|list_skills)/.test(e)},{id:"memory",label:"Memory & State",icon:"brain",match:e=>/^(memory_manage|list_manage)/.test(e)},{id:"ai",label:"AI & Generation",icon:"sparkles",match:e=>/^(generate_|analyze_|claude_|vision_|comfyui_)/.test(e)},{id:"integrations",label:"Integrations",icon:"link",match:e=>/^(issue_tracker|slack_|grafana_|mcp_)/.test(e)},{id:"other",label:"Other Tools",icon:"wrench",match:()=>!0}],yk={template:`

Tools

@@ -2343,7 +2343,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config Try a different search term
- `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(""),a=h({}),i=h({}),l=h("cards"),r=h(null),o=J(()=>e.value.filter(x=>x.is_core).length),c=J(()=>e.value.filter(x=>!x.is_core).length),d=J(()=>Object.values(a.value).reduce((x,m)=>x+m,0));function u(x){for(const m of no)if(m.id!=="other"&&m.match(x))return m.id;return"other"}const f=J(()=>{let x=e.value;if(n.value){const m=n.value.toLowerCase();x=x.filter(_=>_.name.toLowerCase().includes(m)||(_.description||"").toLowerCase().includes(m))}return r.value&&(x=x.filter(m=>u(m.name)===r.value)),x}),p=J(()=>{const x=new Set;for(const m of e.value)x.add(u(m.name));return no.filter(m=>x.has(m.id))}),b=J(()=>{const x=f.value,m={};for(const S of x){const g=u(S.name);m[g]||(m[g]=[]),m[g].push(S)}const _=[];for(const S of no)m[S.id]&&m[S.id].length>0&&_.push({label:S.label,icon:S.icon,tools:m[S.id].sort((g,w)=>g.name.localeCompare(w.name))});return _});function y(x){i.value={...i.value,[x]:!i.value[x]}}async function E(){t.value=!0,s.value=null;try{const[x,m]=await Promise.all([K.get("/api/tools"),K.get("/api/tools/stats").catch(()=>({}))]);e.value=x,a.value=m||{};const _=Object.values(m||{}).filter(S=>S>0).sort((S,g)=>S-g)}catch(x){s.value=x.message}t.value=!1}function I(){E()}return We(()=>{E()}),{tools:e,loading:t,error:s,search:n,stats:a,expanded:i,viewMode:l,activeCategory:r,coreCount:o,skillCount:c,totalUsage:d,filteredTools:f,groupedTools:b,usedCategories:p,truncate:Zc,toggleExpand:y,refresh:I}}};function xk(e){if(!e)return"";let t=e.replace(/&/g,"&").replace(//g,">");t=t.replace(/("""[\s\S]*?"""|'''[\s\S]*?'''|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,'$1'),t=t.replace(/(#[^\n]*)/g,'$1');const s="\\b(def|class|return|if|elif|else|for|while|import|from|as|try|except|finally|raise|with|async|await|yield|pass|break|continue|and|or|not|in|is|None|True|False|self|lambda)\\b";t=t.replace(new RegExp(s,"g"),'$1');const n="\\b(print|len|range|str|int|float|list|dict|set|tuple|type|isinstance|hasattr|getattr|setattr|super|property|staticmethod|classmethod|enumerate|zip|map|filter|sorted|reversed|any|all|min|max|sum|abs|round|open|format)\\b";return t=t.replace(new RegExp(n,"g"),'$1'),t=t.replace(/(@\w+)/g,'$1'),t=t.replace(/\b(\d+\.?\d*)\b/g,'$1'),t}function _k(e){if(!e)return"1";const t=e.split(` + `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(""),a=h({}),i=h({}),l=h("cards"),r=h(null),o=J(()=>e.value.filter(x=>x.is_core).length),c=J(()=>e.value.filter(x=>!x.is_core).length),d=J(()=>Object.values(a.value).reduce((x,m)=>x+m,0));function u(x){for(const m of no)if(m.id!=="other"&&m.match(x))return m.id;return"other"}const f=J(()=>{let x=e.value;if(n.value){const m=n.value.toLowerCase();x=x.filter(_=>_.name.toLowerCase().includes(m)||(_.description||"").toLowerCase().includes(m))}return r.value&&(x=x.filter(m=>u(m.name)===r.value)),x}),p=J(()=>{const x=new Set;for(const m of e.value)x.add(u(m.name));return no.filter(m=>x.has(m.id))}),b=J(()=>{const x=f.value,m={};for(const S of x){const g=u(S.name);m[g]||(m[g]=[]),m[g].push(S)}const _=[];for(const S of no)m[S.id]&&m[S.id].length>0&&_.push({label:S.label,icon:S.icon,tools:m[S.id].sort((g,w)=>g.name.localeCompare(w.name))});return _});function y(x){i.value={...i.value,[x]:!i.value[x]}}async function E(){t.value=!0,s.value=null;try{const[x,m]=await Promise.all([G.get("/api/tools"),G.get("/api/tools/stats").catch(()=>({}))]);e.value=x,a.value=m||{};const _=Object.values(m||{}).filter(S=>S>0).sort((S,g)=>S-g)}catch(x){s.value=x.message}t.value=!1}function I(){E()}return We(()=>{E()}),{tools:e,loading:t,error:s,search:n,stats:a,expanded:i,viewMode:l,activeCategory:r,coreCount:o,skillCount:c,totalUsage:d,filteredTools:f,groupedTools:b,usedCategories:p,truncate:Zc,toggleExpand:y,refresh:I}}};function xk(e){if(!e)return"";let t=e.replace(/&/g,"&").replace(//g,">");t=t.replace(/("""[\s\S]*?"""|'''[\s\S]*?'''|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,'$1'),t=t.replace(/(#[^\n]*)/g,'$1');const s="\\b(def|class|return|if|elif|else|for|while|import|from|as|try|except|finally|raise|with|async|await|yield|pass|break|continue|and|or|not|in|is|None|True|False|self|lambda)\\b";t=t.replace(new RegExp(s,"g"),'$1');const n="\\b(print|len|range|str|int|float|list|dict|set|tuple|type|isinstance|hasattr|getattr|setattr|super|property|staticmethod|classmethod|enumerate|zip|map|filter|sorted|reversed|any|all|min|max|sum|abs|round|open|format)\\b";return t=t.replace(new RegExp(n,"g"),'$1'),t=t.replace(/(@\w+)/g,'$1'),t=t.replace(/\b(\d+\.?\d*)\b/g,'$1'),t}function _k(e){if(!e)return"1";const t=e.split(` `).length;return Array.from({length:t},(s,n)=>n+1).join(` `)}const kk={template:`
@@ -2548,7 +2548,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
`,setup(){const e=h([]),t=h(!0),s=h(null),n=h({}),a=h({}),i=h(null),l=h(""),r=h(null),o=h(!1),c=h("create"),d=h(""),u=h(""),f=h(null),p=h(null),b=h(!1),y=h(null),E=h(null),I=h(!1),x=J(()=>e.value.length),m=J(()=>e.value.reduce((F,se)=>F+(se.execution_count||0),0)),_=J(()=>e.value.reduce((F,se)=>F+M(se.code),0)),S=J(()=>{if(!l.value)return e.value;const F=l.value.toLowerCase();return e.value.filter(se=>se.name.toLowerCase().includes(F)||(se.description||"").toLowerCase().includes(F))}),g=J(()=>u.value?u.value.split(` `).length:0),w=J(()=>{const F=Math.max(g.value,1);return Array.from({length:F},(se,Se)=>Se+1).join(` `)}),T=J(()=>{const F=u.value.trim();return F?F.includes("SKILL_DEFINITION")?F.includes("async def execute")?{valid:!0,message:""}:{valid:!1,message:"Missing async def execute function"}:{valid:!1,message:"Missing SKILL_DEFINITION dict"}:null});function C(F){return xk(F)}function M(F){return F?F.split(` -`).length:0}function H(F){return _k(F)}function P(F){n.value={...n.value,[F]:!n.value[F]}}async function R(F){try{await navigator.clipboard.writeText(F);const se=e.value.find(Se=>Se.code===F);se&&(r.value=se.name,setTimeout(()=>{r.value=null},2e3))}catch{}}function j(F){if(F.key==="Tab"){F.preventDefault();const se=F.target,Se=se.selectionStart,V=se.selectionEnd;u.value=u.value.substring(0,Se)+" "+u.value.substring(V),It(()=>{se.selectionStart=se.selectionEnd=Se+4})}}function Q(F){const se=F.target.previousElementSibling;se&&(se.scrollTop=F.target.scrollTop)}async function U(){t.value=!0,s.value=null;try{e.value=await K.get("/api/skills")}catch(F){s.value=F.message}t.value=!1}async function O(F){i.value=F,delete a.value[F],a.value={...a.value};try{const se=await K.post(`/api/skills/${encodeURIComponent(F)}/test`);a.value={...a.value,[F]:se}}catch(se){a.value={...a.value,[F]:{result:se.message,is_error:!0}}}i.value=null}function N(){o.value=!0,c.value="create",d.value="",u.value="",f.value=null,p.value=null}function Y(F){o.value=!0,c.value="edit",d.value=F.name,u.value=F.code||"",f.value=null,p.value=null}function we(){o.value=!1,f.value=null,p.value=null}async function ke(){f.value=null,p.value=null;const F=d.value.trim(),se=u.value.trim();if(!F){f.value="Name is required";return}if(!se){f.value="Code is required";return}b.value=!0;try{c.value==="create"?(await K.post("/api/skills",{name:F,code:se}),p.value="Skill created successfully"):(await K.put(`/api/skills/${encodeURIComponent(F)}`,{code:se}),p.value="Skill updated successfully"),await U(),setTimeout(()=>{o.value=!1},800)}catch(Se){f.value=Se.message}b.value=!1}function ie(F){E.value=F}async function pe(){if(E.value){I.value=!0;try{await K.del(`/api/skills/${encodeURIComponent(E.value)}`),await U()}catch(F){Ae.error(`Failed to delete skill: ${F.message||"unknown error"}`)}I.value=!1,E.value=null}}return We(()=>{U()}),{skills:e,loading:t,error:s,showCode:n,testResults:a,testing:i,search:l,copied:r,editing:o,editMode:c,editName:d,editCode:u,editError:f,editSuccess:p,saving:b,editorRef:y,deleteTarget:E,deleting:I,enabledCount:x,totalExecutions:m,totalLines:_,displayedSkills:S,editLineCount:g,editorLineNums:w,editValidation:T,highlight:C,truncate:Zc,formatTs:fa,countLines:M,getLineNumbers:H,toggleCode:P,copyCode:R,handleEditorKey:j,syncScroll:Q,fetchSkills:U,testSkill:O,showCreate:N,editSkill:Y,cancelEdit:we,saveSkill:ke,confirmDelete:ie,doDelete:pe}}};function wk(e,t){if(!e||!t)return Nu(e);const s=Nu(e),n=t.trim().split(/\s+/).filter(Boolean);if(!n.length)return s;const a=n.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");try{return s.replace(new RegExp(`(${a})`,"gi"),'$1')}catch{return s}}const Sk={template:` +`).length:0}function H(F){return _k(F)}function P(F){n.value={...n.value,[F]:!n.value[F]}}async function R(F){try{await navigator.clipboard.writeText(F);const se=e.value.find(Se=>Se.code===F);se&&(r.value=se.name,setTimeout(()=>{r.value=null},2e3))}catch{}}function j(F){if(F.key==="Tab"){F.preventDefault();const se=F.target,Se=se.selectionStart,V=se.selectionEnd;u.value=u.value.substring(0,Se)+" "+u.value.substring(V),Rt(()=>{se.selectionStart=se.selectionEnd=Se+4})}}function Q(F){const se=F.target.previousElementSibling;se&&(se.scrollTop=F.target.scrollTop)}async function U(){t.value=!0,s.value=null;try{e.value=await G.get("/api/skills")}catch(F){s.value=F.message}t.value=!1}async function O(F){i.value=F,delete a.value[F],a.value={...a.value};try{const se=await G.post(`/api/skills/${encodeURIComponent(F)}/test`);a.value={...a.value,[F]:se}}catch(se){a.value={...a.value,[F]:{result:se.message,is_error:!0}}}i.value=null}function N(){o.value=!0,c.value="create",d.value="",u.value="",f.value=null,p.value=null}function Y(F){o.value=!0,c.value="edit",d.value=F.name,u.value=F.code||"",f.value=null,p.value=null}function we(){o.value=!1,f.value=null,p.value=null}async function ke(){f.value=null,p.value=null;const F=d.value.trim(),se=u.value.trim();if(!F){f.value="Name is required";return}if(!se){f.value="Code is required";return}b.value=!0;try{c.value==="create"?(await G.post("/api/skills",{name:F,code:se}),p.value="Skill created successfully"):(await G.put(`/api/skills/${encodeURIComponent(F)}`,{code:se}),p.value="Skill updated successfully"),await U(),setTimeout(()=>{o.value=!1},800)}catch(Se){f.value=Se.message}b.value=!1}function ie(F){E.value=F}async function he(){if(E.value){I.value=!0;try{await G.del(`/api/skills/${encodeURIComponent(E.value)}`),await U()}catch(F){Ae.error(`Failed to delete skill: ${F.message||"unknown error"}`)}I.value=!1,E.value=null}}return We(()=>{U()}),{skills:e,loading:t,error:s,showCode:n,testResults:a,testing:i,search:l,copied:r,editing:o,editMode:c,editName:d,editCode:u,editError:f,editSuccess:p,saving:b,editorRef:y,deleteTarget:E,deleting:I,enabledCount:x,totalExecutions:m,totalLines:_,displayedSkills:S,editLineCount:g,editorLineNums:w,editValidation:T,highlight:C,truncate:Zc,formatTs:pa,countLines:M,getLineNumbers:H,toggleCode:P,copyCode:R,handleEditorKey:j,syncScroll:Q,fetchSkills:U,testSkill:O,showCreate:N,editSkill:Y,cancelEdit:we,saveSkill:ke,confirmDelete:ie,doDelete:he}}};function wk(e,t){if(!e||!t)return Nu(e);const s=Nu(e),n=t.trim().split(/\s+/).filter(Boolean);if(!n.length)return s;const a=n.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|");try{return s.replace(new RegExp(`(${a})`,"gi"),'$1')}catch{return s}}const Sk={template:`

Knowledge

@@ -2739,7 +2739,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(""),a=h(null),i=h(!1),l=h(""),r=h(null),o=h(!1),c=h(""),d=h(""),u=h(null),f=h(null),p=h(!1),b=h(null),y=h(null);let E=null;const I=h(null),x=h(!1),m=h({}),_=h({}),S=h(null),g=h(null),w=J(()=>e.value.reduce((N,Y)=>N+(Y.chunks||0),0)),T=J(()=>new Set(e.value.map(Y=>Y.uploader).filter(Boolean)).size);function C(N,Y){const we=_.value[Y];if(!we||we.length===0)return 0;const ke=Math.max(...we.map(ie=>ie.char_count||0));return ke===0?0:Math.round(N.char_count/ke*100)}async function M(){t.value=!0,s.value=null;try{const N=await K.get("/api/knowledge");e.value=Array.isArray(N)?N:[]}catch(N){s.value=N.message}t.value=!1}async function H(N){if(m.value[N]){m.value[N]=!1,g.value=null;return}if(m.value[N]=!0,!(_.value[N]||S.value===N)){S.value=N;try{const Y=await K.get(`/api/knowledge/${encodeURIComponent(N)}/chunks`);_.value[N]=Array.isArray(Y)?Y:[]}catch(Y){_.value[N]=[],Ae.error(`Failed to load chunks: ${Y.message}`)}S.value=null}}async function P(){const N=n.value.trim();if(N){i.value=!0,r.value=null,l.value=N;try{const Y=await K.get(`/api/knowledge/search?q=${encodeURIComponent(N)}`);a.value=Array.isArray(Y)?Y:[]}catch(Y){a.value=[],r.value=Y.message||"Search failed"}i.value=!1}}function R(){a.value=null,n.value="",r.value=null}async function j(){u.value=null,f.value=null;const N=c.value.trim(),Y=d.value.trim();if(!N){u.value="Source name is required";return}if(!Y){u.value="Content is required";return}p.value=!0;try{const we=await K.post("/api/knowledge",{source:N,content:Y});f.value=`Ingested ${we.chunks||0} chunks from "${N}"`,c.value="",d.value="",_.value={},await M(),setTimeout(()=>{o.value=!1,f.value=null},1500)}catch(we){u.value=we.message}p.value=!1}async function Q(N){b.value=N,y.value=null,E&&(clearTimeout(E),E=null);try{const Y=await K.post(`/api/knowledge/${encodeURIComponent(N)}/reingest`);y.value={source:N,error:!1,message:`Re-ingested ${Y.chunks||0} chunks`},delete _.value[N],await M(),E=setTimeout(()=>{y.value=null,E=null},3e3)}catch(Y){y.value={source:N,error:!0,message:Y.message}}b.value=null}function U(N){I.value=N}async function O(){if(I.value){x.value=!0;try{await K.del(`/api/knowledge/${encodeURIComponent(I.value)}`),delete _.value[I.value],await M()}catch(N){Ae.error(`Failed to delete source: ${N.message||"unknown error"}`)}x.value=!1,I.value=null}}return We(()=>{M()}),{sources:e,loading:t,error:s,searchQuery:n,searchResults:a,searching:i,lastQuery:l,searchError:r,showIngest:o,ingestSource:c,ingestContent:d,ingestError:u,ingestSuccess:f,ingesting:p,reingesting:b,reingestResult:y,deleteTarget:I,deleting:x,expanded:m,sourceChunks:_,loadingChunks:S,selectedChunk:g,totalChunks:w,uploaderCount:T,truncate:Zc,formatTs:fa,highlightTerms:wk,chunkBarWidth:C,fetchSources:M,toggleSource:H,doSearch:P,clearSearch:R,doIngest:j,doReingest:Q,confirmDelete:U,doDelete:O}}},Tk={template:` + `,setup(){const e=h([]),t=h(!0),s=h(null),n=h(""),a=h(null),i=h(!1),l=h(""),r=h(null),o=h(!1),c=h(""),d=h(""),u=h(null),f=h(null),p=h(!1),b=h(null),y=h(null);let E=null;const I=h(null),x=h(!1),m=h({}),_=h({}),S=h(null),g=h(null),w=J(()=>e.value.reduce((N,Y)=>N+(Y.chunks||0),0)),T=J(()=>new Set(e.value.map(Y=>Y.uploader).filter(Boolean)).size);function C(N,Y){const we=_.value[Y];if(!we||we.length===0)return 0;const ke=Math.max(...we.map(ie=>ie.char_count||0));return ke===0?0:Math.round(N.char_count/ke*100)}async function M(){t.value=!0,s.value=null;try{const N=await G.get("/api/knowledge");e.value=Array.isArray(N)?N:[]}catch(N){s.value=N.message}t.value=!1}async function H(N){if(m.value[N]){m.value[N]=!1,g.value=null;return}if(m.value[N]=!0,!(_.value[N]||S.value===N)){S.value=N;try{const Y=await G.get(`/api/knowledge/${encodeURIComponent(N)}/chunks`);_.value[N]=Array.isArray(Y)?Y:[]}catch(Y){_.value[N]=[],Ae.error(`Failed to load chunks: ${Y.message}`)}S.value=null}}async function P(){const N=n.value.trim();if(N){i.value=!0,r.value=null,l.value=N;try{const Y=await G.get(`/api/knowledge/search?q=${encodeURIComponent(N)}`);a.value=Array.isArray(Y)?Y:[]}catch(Y){a.value=[],r.value=Y.message||"Search failed"}i.value=!1}}function R(){a.value=null,n.value="",r.value=null}async function j(){u.value=null,f.value=null;const N=c.value.trim(),Y=d.value.trim();if(!N){u.value="Source name is required";return}if(!Y){u.value="Content is required";return}p.value=!0;try{const we=await G.post("/api/knowledge",{source:N,content:Y});f.value=`Ingested ${we.chunks||0} chunks from "${N}"`,c.value="",d.value="",_.value={},await M(),setTimeout(()=>{o.value=!1,f.value=null},1500)}catch(we){u.value=we.message}p.value=!1}async function Q(N){b.value=N,y.value=null,E&&(clearTimeout(E),E=null);try{const Y=await G.post(`/api/knowledge/${encodeURIComponent(N)}/reingest`);y.value={source:N,error:!1,message:`Re-ingested ${Y.chunks||0} chunks`},delete _.value[N],await M(),E=setTimeout(()=>{y.value=null,E=null},3e3)}catch(Y){y.value={source:N,error:!0,message:Y.message}}b.value=null}function U(N){I.value=N}async function O(){if(I.value){x.value=!0;try{await G.del(`/api/knowledge/${encodeURIComponent(I.value)}`),delete _.value[I.value],await M()}catch(N){Ae.error(`Failed to delete source: ${N.message||"unknown error"}`)}x.value=!1,I.value=null}}return We(()=>{M()}),{sources:e,loading:t,error:s,searchQuery:n,searchResults:a,searching:i,lastQuery:l,searchError:r,showIngest:o,ingestSource:c,ingestContent:d,ingestError:u,ingestSuccess:f,ingesting:p,reingesting:b,reingestResult:y,deleteTarget:I,deleting:x,expanded:m,sourceChunks:_,loadingChunks:S,selectedChunk:g,totalChunks:w,uploaderCount:T,truncate:Zc,formatTs:pa,highlightTerms:wk,chunkBarWidth:C,fetchSources:M,toggleSource:H,doSearch:P,clearSearch:R,doIngest:j,doReingest:Q,confirmDelete:U,doDelete:O}}},Tk={template:`

Memory

@@ -2931,7 +2931,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h([]),t=h({}),s=h(!0),n=h(null),a=h({}),i=h(null),l=h(""),r=h(!1),o=h({scope:"global",key:"",value:""}),c=h(!1),d=h(null),u=h(null),f=h(null),p=h(""),b=h(!1),y=h(null),E=h(null),I=h(new Set),x=h(null),m=h(!1),_=h(!1),S=J(()=>e.value.reduce((ie,pe)=>ie+pe.count,0)),g=J(()=>I.value.size);function w(ie){const pe=t.value[ie];if(!pe)return[];if(!l.value.trim())return pe;const F=l.value.trim().toLowerCase();return pe.filter(se=>se.key.toLowerCase().includes(F)||se.value&&se.value.toLowerCase().includes(F))}function T(ie,pe){return I.value.has(ie+"/"+pe)}function C(ie,pe){const F=ie+"/"+pe,se=new Set(I.value);se.has(F)?se.delete(F):se.add(F),I.value=se}function M(ie){const pe=t.value[ie];return!pe||pe.length===0?!1:pe.every(F=>I.value.has(ie+"/"+F.key))}function H(ie,pe){const F=t.value[ie];if(!F)return;const se=new Set(I.value);for(const Se of F){const V=ie+"/"+Se.key;pe?se.add(V):se.delete(V)}I.value=se}async function P(){s.value=!0,n.value=null;try{const ie=await K.get("/api/memory");e.value=Object.entries(ie).map(([pe,F])=>({name:pe,keys:F.keys||[],count:F.count||0}))}catch(ie){n.value=ie.message}s.value=!1}async function R(ie){if(a.value[ie]){a.value[ie]=!1;return}a.value[ie]=!0;const pe=e.value.find(se=>se.name===ie);if(!pe||t.value[ie]||i.value===ie)return;i.value=ie;let F;try{const Se=(await K.get(`/api/memory/${encodeURIComponent(ie)}`)).entries||{};F=pe.keys.map(V=>Object.prototype.hasOwnProperty.call(Se,V)?{key:V,value:Se[V]||"",failed:!1}:{key:V,value:"",failed:!0,error:"Not found in scope"})}catch(se){F=pe.keys.map(Se=>({key:Se,value:"",failed:!0,error:se.message||"Failed to load"}))}t.value[ie]=F,i.value=null}function j(ie,pe,F){f.value=ie+"/"+pe,p.value=F}async function Q(ie,pe){b.value=!0,y.value=null;try{await K.put(`/api/memory/${encodeURIComponent(ie)}/${encodeURIComponent(pe)}`,{value:p.value});const F=t.value[ie];if(F){const se=F.find(Se=>Se.key===pe);se&&(se.value=p.value)}f.value=null}catch(F){y.value=`Failed to save: ${F.message||"unknown error"}`}b.value=!1}async function U(ie,pe){try{await navigator.clipboard.writeText(pe.value),E.value=ie+"/"+pe.key,setTimeout(()=>{E.value=null},1500)}catch{}}async function O(){d.value=null,u.value=null;const ie=o.value.scope.trim(),pe=o.value.key.trim(),F=o.value.value.trim();if(!ie){d.value="Scope is required";return}if(!pe){d.value="Key is required";return}if(!F){d.value="Value is required";return}c.value=!0;try{await K.put(`/api/memory/${encodeURIComponent(ie)}/${encodeURIComponent(pe)}`,{value:F}),u.value="Entry saved",o.value={scope:"global",key:"",value:""},t.value={},await P(),setTimeout(()=>{r.value=!1,u.value=null},800)}catch(se){d.value=se.message}c.value=!1}function N(ie,pe){x.value={scope:ie,key:pe}}async function Y(){if(!x.value)return;m.value=!0,y.value=null;const{scope:ie,key:pe}=x.value;try{await K.del(`/api/memory/${encodeURIComponent(ie)}/${encodeURIComponent(pe)}`);const F=t.value[ie];F&&(t.value[ie]=F.filter(V=>V.key!==pe));const se=e.value.find(V=>V.name===ie);se&&(se.count--,se.keys=se.keys.filter(V=>V!==pe));const Se=new Set(I.value);Se.delete(ie+"/"+pe),I.value=Se}catch(F){y.value=`Failed to delete: ${F.message||"unknown error"}`}m.value=!1,x.value=null}function we(){_.value=!0}async function ke(){m.value=!0,y.value=null;const ie=[];for(const pe of I.value){const F=pe.indexOf("/");ie.push({scope:pe.slice(0,F),key:pe.slice(F+1)})}try{await K.post("/api/memory/bulk-delete",{entries:ie}),I.value=new Set,t.value={},await P()}catch(pe){y.value=`Bulk delete failed: ${pe.message||"unknown error"}`}m.value=!1,_.value=!1}return We(()=>{P()}),{scopes:e,scopeEntries:t,loading:s,error:n,expanded:a,loadingScope:i,filterQuery:l,showAdd:r,addForm:o,adding:c,addError:d,addSuccess:u,editingKey:f,editValue:p,saving:b,actionError:y,copied:E,selected:I,selectedCount:g,totalEntries:S,deleteTarget:x,deleting:m,showBulkDelete:_,fetchMemory:P,toggleScope:R,startEdit:j,doEdit:Q,copyValue:U,doAdd:O,confirmDelete:N,doDelete:Y,confirmBulkDelete:we,doBulkDelete:ke,isSelected:T,toggleSelect:C,isScopeAllSelected:M,toggleSelectAll:H,filteredEntries:w}}},Ck={template:` + `,setup(){const e=h([]),t=h({}),s=h(!0),n=h(null),a=h({}),i=h(null),l=h(""),r=h(!1),o=h({scope:"global",key:"",value:""}),c=h(!1),d=h(null),u=h(null),f=h(null),p=h(""),b=h(!1),y=h(null),E=h(null),I=h(new Set),x=h(null),m=h(!1),_=h(!1),S=J(()=>e.value.reduce((ie,he)=>ie+he.count,0)),g=J(()=>I.value.size);function w(ie){const he=t.value[ie];if(!he)return[];if(!l.value.trim())return he;const F=l.value.trim().toLowerCase();return he.filter(se=>se.key.toLowerCase().includes(F)||se.value&&se.value.toLowerCase().includes(F))}function T(ie,he){return I.value.has(ie+"/"+he)}function C(ie,he){const F=ie+"/"+he,se=new Set(I.value);se.has(F)?se.delete(F):se.add(F),I.value=se}function M(ie){const he=t.value[ie];return!he||he.length===0?!1:he.every(F=>I.value.has(ie+"/"+F.key))}function H(ie,he){const F=t.value[ie];if(!F)return;const se=new Set(I.value);for(const Se of F){const V=ie+"/"+Se.key;he?se.add(V):se.delete(V)}I.value=se}async function P(){s.value=!0,n.value=null;try{const ie=await G.get("/api/memory");e.value=Object.entries(ie).map(([he,F])=>({name:he,keys:F.keys||[],count:F.count||0}))}catch(ie){n.value=ie.message}s.value=!1}async function R(ie){if(a.value[ie]){a.value[ie]=!1;return}a.value[ie]=!0;const he=e.value.find(se=>se.name===ie);if(!he||t.value[ie]||i.value===ie)return;i.value=ie;let F;try{const Se=(await G.get(`/api/memory/${encodeURIComponent(ie)}`)).entries||{};F=he.keys.map(V=>Object.prototype.hasOwnProperty.call(Se,V)?{key:V,value:Se[V]||"",failed:!1}:{key:V,value:"",failed:!0,error:"Not found in scope"})}catch(se){F=he.keys.map(Se=>({key:Se,value:"",failed:!0,error:se.message||"Failed to load"}))}t.value[ie]=F,i.value=null}function j(ie,he,F){f.value=ie+"/"+he,p.value=F}async function Q(ie,he){b.value=!0,y.value=null;try{await G.put(`/api/memory/${encodeURIComponent(ie)}/${encodeURIComponent(he)}`,{value:p.value});const F=t.value[ie];if(F){const se=F.find(Se=>Se.key===he);se&&(se.value=p.value)}f.value=null}catch(F){y.value=`Failed to save: ${F.message||"unknown error"}`}b.value=!1}async function U(ie,he){try{await navigator.clipboard.writeText(he.value),E.value=ie+"/"+he.key,setTimeout(()=>{E.value=null},1500)}catch{}}async function O(){d.value=null,u.value=null;const ie=o.value.scope.trim(),he=o.value.key.trim(),F=o.value.value.trim();if(!ie){d.value="Scope is required";return}if(!he){d.value="Key is required";return}if(!F){d.value="Value is required";return}c.value=!0;try{await G.put(`/api/memory/${encodeURIComponent(ie)}/${encodeURIComponent(he)}`,{value:F}),u.value="Entry saved",o.value={scope:"global",key:"",value:""},t.value={},await P(),setTimeout(()=>{r.value=!1,u.value=null},800)}catch(se){d.value=se.message}c.value=!1}function N(ie,he){x.value={scope:ie,key:he}}async function Y(){if(!x.value)return;m.value=!0,y.value=null;const{scope:ie,key:he}=x.value;try{await G.del(`/api/memory/${encodeURIComponent(ie)}/${encodeURIComponent(he)}`);const F=t.value[ie];F&&(t.value[ie]=F.filter(V=>V.key!==he));const se=e.value.find(V=>V.name===ie);se&&(se.count--,se.keys=se.keys.filter(V=>V!==he));const Se=new Set(I.value);Se.delete(ie+"/"+he),I.value=Se}catch(F){y.value=`Failed to delete: ${F.message||"unknown error"}`}m.value=!1,x.value=null}function we(){_.value=!0}async function ke(){m.value=!0,y.value=null;const ie=[];for(const he of I.value){const F=he.indexOf("/");ie.push({scope:he.slice(0,F),key:he.slice(F+1)})}try{await G.post("/api/memory/bulk-delete",{entries:ie}),I.value=new Set,t.value={},await P()}catch(he){y.value=`Bulk delete failed: ${he.message||"unknown error"}`}m.value=!1,_.value=!1}return We(()=>{P()}),{scopes:e,scopeEntries:t,loading:s,error:n,expanded:a,loadingScope:i,filterQuery:l,showAdd:r,addForm:o,adding:c,addError:d,addSuccess:u,editingKey:f,editValue:p,saving:b,actionError:y,copied:E,selected:I,selectedCount:g,totalEntries:S,deleteTarget:x,deleting:m,showBulkDelete:_,fetchMemory:P,toggleScope:R,startEdit:j,doEdit:Q,copyValue:U,doAdd:O,confirmDelete:N,doDelete:Y,confirmBulkDelete:we,doBulkDelete:ke,isSelected:T,toggleSelect:C,isScopeAllSelected:M,toggleSelectAll:H,filteredEntries:w}}},Ck={template:`
@@ -3000,7 +3000,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h([]),t=h(null),s=h(!0),n=h(null),a=h(null),i=h(null),l=h(""),r=J(()=>[...new Set(e.value.map(E=>E.category))].sort()),o=J(()=>{const y={};return e.value.forEach(E=>{y[E.category]=(y[E.category]||0)+1}),y}),c=J(()=>a.value?e.value.filter(y=>y.category===a.value):e.value);function d(y){return y==="correction"?"badge-warning":y==="operational"?"badge-info":y==="preference"?"badge-success":"badge-info"}function u(y){i.value=y.key,l.value=y.content}async function f(y){try{await K.put("/api/learned/"+encodeURIComponent(y),{content:l.value}),i.value=null,Ae.success("Entry updated"),await b()}catch(E){Ae.error(E.message||"Failed to save entry")}}async function p(y){if(await ks({title:"Delete learned entry",message:`Delete "${y}"? Odin will no longer apply this learned context.`,confirmLabel:"Delete",danger:!0}))try{await K.del("/api/learned/"+encodeURIComponent(y)),Ae.success("Entry deleted"),await b()}catch(I){Ae.error(I.message||"Failed to delete entry")}}async function b(){s.value=!0,n.value=null;try{const y=await K.get("/api/learned");e.value=y.entries||[],t.value={last_reflection:y.last_reflection,count:y.count}}catch(y){n.value=y.message}s.value=!1}return We(b),{entries:e,meta:t,loading:s,error:n,filterCat:a,editing:i,editContent:l,categories:r,catCounts:o,filtered:c,catBadge:d,formatTs:fa,startEdit:u,saveEdit:f,deleteEntry:p,fetchEntries:b}}},wm=[{id:"tools",label:"Tools",component:yk},{id:"skills",label:"Skills",component:kk},{id:"knowledge",label:"Knowledge",component:Sk},{id:"memory",label:"Memory",component:Tk},{id:"learned",label:"Learned",component:Ck}],Ek={components:{TabbedPage:Mr},setup(){return{tabs:wm}},template:''},Ak={ok:"text-green-400",degraded:"text-yellow-400",down:"text-red-400",unconfigured:"text-gray-500"},Rk={ok:"success",degraded:"warning",down:"error",unconfigured:"minus"},Ik={healthy:"text-green-400",degraded:"text-yellow-400",unhealthy:"text-red-400"},Ok={template:` + `,setup(){const e=h([]),t=h(null),s=h(!0),n=h(null),a=h(null),i=h(null),l=h(""),r=J(()=>[...new Set(e.value.map(E=>E.category))].sort()),o=J(()=>{const y={};return e.value.forEach(E=>{y[E.category]=(y[E.category]||0)+1}),y}),c=J(()=>a.value?e.value.filter(y=>y.category===a.value):e.value);function d(y){return y==="correction"?"badge-warning":y==="operational"?"badge-info":y==="preference"?"badge-success":"badge-info"}function u(y){i.value=y.key,l.value=y.content}async function f(y){try{await G.put("/api/learned/"+encodeURIComponent(y),{content:l.value}),i.value=null,Ae.success("Entry updated"),await b()}catch(E){Ae.error(E.message||"Failed to save entry")}}async function p(y){if(await _s({title:"Delete learned entry",message:`Delete "${y}"? Odin will no longer apply this learned context.`,confirmLabel:"Delete",danger:!0}))try{await G.del("/api/learned/"+encodeURIComponent(y)),Ae.success("Entry deleted"),await b()}catch(I){Ae.error(I.message||"Failed to delete entry")}}async function b(){s.value=!0,n.value=null;try{const y=await G.get("/api/learned");e.value=y.entries||[],t.value={last_reflection:y.last_reflection,count:y.count}}catch(y){n.value=y.message}s.value=!1}return We(b),{entries:e,meta:t,loading:s,error:n,filterCat:a,editing:i,editContent:l,categories:r,catCounts:o,filtered:c,catBadge:d,formatTs:pa,startEdit:u,saveEdit:f,deleteEntry:p,fetchEntries:b}}},wm=[{id:"tools",label:"Tools",component:yk},{id:"skills",label:"Skills",component:kk},{id:"knowledge",label:"Knowledge",component:Sk},{id:"memory",label:"Memory",component:Tk},{id:"learned",label:"Learned",component:Ck}],Ek={components:{TabbedPage:Mr},setup(){return{tabs:wm}},template:''},Ak={ok:"text-green-400",degraded:"text-yellow-400",down:"text-red-400",unconfigured:"text-gray-500"},Rk={ok:"success",degraded:"warning",down:"error",unconfigured:"minus"},Ik={healthy:"text-green-400",degraded:"text-yellow-400",unhealthy:"text-red-400"},Ok={template:`
@@ -3142,7 +3142,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h({}),t=h(!0),s=h(null),n=h(!1),a=h(!1),i=J(()=>e.value.components||[]),l=J(()=>Ik[e.value.overall]||"text-gray-400"),r=J(()=>e.value.overall==="healthy"?"success":e.value.overall==="degraded"?"warning":e.value.overall==="unhealthy"?"error":"minus"),o=J(()=>{const g=e.value.overall;return g==="healthy"?"All Systems Healthy":g==="degraded"?"Some Systems Degraded":g==="unhealthy"?"System Issues Detected":"Unknown"});function c(g){return Ak[g]||"text-gray-400"}function d(g){return Rk[g]||"info"}function u(g){return g==="ok"?"badge-success":g==="degraded"?"badge-warning":g==="down"?"badge-danger":"badge-info"}function f(g){return g==="closed"?"text-green-400":g==="half_open"?"text-yellow-400":g==="open"?"text-red-400":"text-gray-400"}function p(g){return g.replace(/_/g," ").replace(/\b\w/g,w=>w.toUpperCase())}function b(g){if(!g)return"—";try{return new Date(g).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return g}}function y(g){return g>=1e6?(g/1e6).toFixed(1)+"M":g>=1e3?(g/1e3).toFixed(1)+"K":String(g)}async function E(){a.value=!0;try{e.value=await K.get("/api/health/components"),s.value=null,n.value=!0}catch(g){s.value=g.message}finally{t.value=!1,a.value=!1}}function I(){t.value=!0,s.value=null,E()}let x=null,m=!1;function _(){m||(m=!0,E(),x||(x=setInterval(E,3e4)))}function S(){m&&(m=!1,x&&(clearInterval(x),x=null))}return We(_),Ms(_),Ps(S),xt(S),{data:e,hasData:n,loading:t,error:s,refreshing:a,components:i,overallColor:l,overallIcon:r,overallLabel:o,statusColor:c,statusIcon:d,badgeClass:u,circuitColor:f,formatName:p,formatTime:b,formatNumber:y,fetchHealth:E,retry:I}}},Nk={template:` + `,setup(){const e=h({}),t=h(!0),s=h(null),n=h(!1),a=h(!1),i=J(()=>e.value.components||[]),l=J(()=>Ik[e.value.overall]||"text-gray-400"),r=J(()=>e.value.overall==="healthy"?"success":e.value.overall==="degraded"?"warning":e.value.overall==="unhealthy"?"error":"minus"),o=J(()=>{const g=e.value.overall;return g==="healthy"?"All Systems Healthy":g==="degraded"?"Some Systems Degraded":g==="unhealthy"?"System Issues Detected":"Unknown"});function c(g){return Ak[g]||"text-gray-400"}function d(g){return Rk[g]||"info"}function u(g){return g==="ok"?"badge-success":g==="degraded"?"badge-warning":g==="down"?"badge-danger":"badge-info"}function f(g){return g==="closed"?"text-green-400":g==="half_open"?"text-yellow-400":g==="open"?"text-red-400":"text-gray-400"}function p(g){return g.replace(/_/g," ").replace(/\b\w/g,w=>w.toUpperCase())}function b(g){if(!g)return"—";try{return new Date(g).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return g}}function y(g){return g>=1e6?(g/1e6).toFixed(1)+"M":g>=1e3?(g/1e3).toFixed(1)+"K":String(g)}async function E(){a.value=!0;try{e.value=await G.get("/api/health/components"),s.value=null,n.value=!0}catch(g){s.value=g.message}finally{t.value=!1,a.value=!1}}function I(){t.value=!0,s.value=null,E()}let x=null,m=!1;function _(){m||(m=!0,E(),x||(x=setInterval(E,3e4)))}function S(){m&&(m=!1,x&&(clearInterval(x),x=null))}return We(_),Ds(_),Ms(S),xt(S),{data:e,hasData:n,loading:t,error:s,refreshing:a,components:i,overallColor:l,overallIcon:r,overallLabel:o,statusColor:c,statusIcon:d,badgeClass:u,circuitColor:f,formatName:p,formatTime:b,formatNumber:y,fetchHealth:E,retry:I}}},Nk={template:`
@@ -3385,7 +3385,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h(!0),t=h(null),s=h(!1),n=h(!1),a=h("sessions"),i=h(null);let l=null;const r=[{key:"sessions",label:"Sessions"},{key:"knowledge",label:"Knowledge"},{key:"trajectories",label:"Trajectories"},{key:"storage",label:"Storage"}],o=J(()=>{if(!i.value||!i.value.collected_at)return"";try{return new Date(i.value.collected_at).toLocaleTimeString()}catch{return""}}),c=J(()=>{if(!i.value)return[];const E=i.value,I=E.storage_total_bytes||1;return[{label:"Session Persistence",mb:E.sessions.persist_dir.total_mb,bytes:E.sessions.persist_dir.total_bytes,files:E.sessions.persist_dir.file_count,pct:Math.min(100,Math.round(E.sessions.persist_dir.total_bytes/I*100)),color:"res-bar-blue"},{label:"Knowledge Database",mb:E.knowledge.db_file.total_mb,bytes:E.knowledge.db_file.total_bytes,files:E.knowledge.db_file.file_count,pct:Math.min(100,Math.round(E.knowledge.db_file.total_bytes/I*100)),color:"res-bar-purple"},{label:"Message Trajectories",mb:E.trajectories.message_dir.total_mb,bytes:E.trajectories.message_dir.total_bytes,files:E.trajectories.message_dir.file_count,pct:Math.min(100,Math.round(E.trajectories.message_dir.total_bytes/I*100)),color:"res-bar-emerald"},{label:"Agent Trajectories",mb:E.trajectories.agent_dir.total_mb,bytes:E.trajectories.agent_dir.total_bytes,files:E.trajectories.agent_dir.file_count,pct:Math.min(100,Math.round(E.trajectories.agent_dir.total_bytes/I*100)),color:"res-bar-amber"}]});async function d(){try{const E=await K.get("/api/resource-usage");i.value=E,t.value=null,s.value=!0}catch(E){t.value=E.message||"Failed to load resource usage"}finally{e.value=!1,n.value=!1}}async function u(){n.value=!0,await d()}function f(){e.value=!0,t.value=null,d()}let p=!1;function b(){p||(p=!0,d(),l||(l=setInterval(d,3e4)))}function y(){p&&(p=!1,l&&(clearInterval(l),l=null))}return We(b),Ms(b),Ps(y),xt(y),{hasData:s,loading:e,error:t,refreshing:n,data:i,activeTab:a,tabs:r,collectedAt:o,storageItems:c,fmtNum:vm,refresh:u,retry:f}}},Lk=["INFO","WARNING","ERROR"],Dk=[{id:"all",name:"All Logs",icon:"list",filters:{}},{id:"errors",name:"Errors Only",icon:"error",filters:{level:"ERROR"}},{id:"warnings",name:"Warnings+",icon:"warning",filters:{levels:["WARNING","ERROR"]}},{id:"tools",name:"Tool Activity",icon:"wrench",filters:{hasToolName:!0}},{id:"recent-errors",name:"Recent Errors",icon:"flame",filters:{level:"ERROR",timeRange:"last_1h"}}],ao=[{value:"",label:"All Time"},{value:"last_5m",label:"Last 5 min",seconds:300},{value:"last_15m",label:"Last 15 min",seconds:900},{value:"last_1h",label:"Last 1 hour",seconds:3600},{value:"last_4h",label:"Last 4 hours",seconds:14400},{value:"last_24h",label:"Last 24 hours",seconds:86400}],Mk=[50,100,200,500],Pk={template:` + `,setup(){const e=h(!0),t=h(null),s=h(!1),n=h(!1),a=h("sessions"),i=h(null);let l=null;const r=[{key:"sessions",label:"Sessions"},{key:"knowledge",label:"Knowledge"},{key:"trajectories",label:"Trajectories"},{key:"storage",label:"Storage"}],o=J(()=>{if(!i.value||!i.value.collected_at)return"";try{return new Date(i.value.collected_at).toLocaleTimeString()}catch{return""}}),c=J(()=>{if(!i.value)return[];const E=i.value,I=E.storage_total_bytes||1;return[{label:"Session Persistence",mb:E.sessions.persist_dir.total_mb,bytes:E.sessions.persist_dir.total_bytes,files:E.sessions.persist_dir.file_count,pct:Math.min(100,Math.round(E.sessions.persist_dir.total_bytes/I*100)),color:"res-bar-blue"},{label:"Knowledge Database",mb:E.knowledge.db_file.total_mb,bytes:E.knowledge.db_file.total_bytes,files:E.knowledge.db_file.file_count,pct:Math.min(100,Math.round(E.knowledge.db_file.total_bytes/I*100)),color:"res-bar-purple"},{label:"Message Trajectories",mb:E.trajectories.message_dir.total_mb,bytes:E.trajectories.message_dir.total_bytes,files:E.trajectories.message_dir.file_count,pct:Math.min(100,Math.round(E.trajectories.message_dir.total_bytes/I*100)),color:"res-bar-emerald"},{label:"Agent Trajectories",mb:E.trajectories.agent_dir.total_mb,bytes:E.trajectories.agent_dir.total_bytes,files:E.trajectories.agent_dir.file_count,pct:Math.min(100,Math.round(E.trajectories.agent_dir.total_bytes/I*100)),color:"res-bar-amber"}]});async function d(){try{const E=await G.get("/api/resource-usage");i.value=E,t.value=null,s.value=!0}catch(E){t.value=E.message||"Failed to load resource usage"}finally{e.value=!1,n.value=!1}}async function u(){n.value=!0,await d()}function f(){e.value=!0,t.value=null,d()}let p=!1;function b(){p||(p=!0,d(),l||(l=setInterval(d,3e4)))}function y(){p&&(p=!1,l&&(clearInterval(l),l=null))}return We(b),Ds(b),Ms(y),xt(y),{hasData:s,loading:e,error:t,refreshing:n,data:i,activeTab:a,tabs:r,collectedAt:o,storageItems:c,fmtNum:vm,refresh:u,retry:f}}},Lk=["INFO","WARNING","ERROR"],Dk=[{id:"all",name:"All Logs",icon:"list",filters:{}},{id:"errors",name:"Errors Only",icon:"error",filters:{level:"ERROR"}},{id:"warnings",name:"Warnings+",icon:"warning",filters:{levels:["WARNING","ERROR"]}},{id:"tools",name:"Tool Activity",icon:"wrench",filters:{hasToolName:!0}},{id:"recent-errors",name:"Recent Errors",icon:"flame",filters:{level:"ERROR",timeRange:"last_1h"}}],ao=[{value:"",label:"All Time"},{value:"last_5m",label:"Last 5 min",seconds:300},{value:"last_15m",label:"Last 15 min",seconds:900},{value:"last_1h",label:"Last 1 hour",seconds:3600},{value:"last_4h",label:"Last 4 hours",seconds:14400},{value:"last_24h",label:"Last 24 hours",seconds:86400}],Mk=[50,100,200,500],Pk={template:`
@@ -3743,9 +3743,9 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h("live"),t=h([]),s=h(!1),n=h(!0),a=h(""),i=h(""),l=h(!1),r=h(!1),o=h(Ke.state||"disconnected"),c=J(()=>{switch(o.value){case"connected":return"Live";case"connecting":return"Connecting…";case"reconnecting":return"Reconnecting…";default:return"Disconnected"}}),d=h(null),u=h(!1),f=h(null),p=2e3,b=Lk,y=Dk,E=ao,I=h("all"),x=h(""),m=h([]),_=h(!1),S=h(""),g=h([]);function w(){try{const q=localStorage.getItem("odin-log-presets");q&&(m.value=JSON.parse(q))}catch{}}function T(){try{localStorage.setItem("odin-log-presets",JSON.stringify(m.value))}catch{}}const C=J(()=>a.value!==""||i.value.trim()!==""||x.value!==""),M=J(()=>{const q=ao.find(re=>re.value===x.value);return q?q.label:""}),H=J(()=>{if(!l.value||!i.value)return null;try{return new RegExp(i.value,"i"),null}catch(q){return q.message}}),P=24,R=J(()=>{if(we.value.length===0)return[];const q=[],re=new Date,Ee=3600*1e3;for(let Ze=P-1;Ze>=0;Ze--){const lt=new Date(re.getTime()-(Ze+1)*Ee),Nt=new Date(re.getTime()-Ze*Ee);q.push({start:lt,end:Nt,label:O(lt,Nt),shortLabel:Nt.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),total:0,info:0,warnings:0,errors:0})}for(const Ze of we.value){if(!Ze._time)continue;const lt=Ze._time.getTime();for(const Nt of q)if(lt>=Nt.start.getTime()&<{let q=1;for(const re of R.value)re.total>q&&(q=re.total);return q}),Q=J(()=>{if(R.value.length===0)return"";const q=we.value.map(Ze=>Ze._time&&Ze._time.getTime()).filter(Boolean);if(q.length===0)return"";const re=new Date(Math.min(...q));return`${we.value.length} shown, oldest ${re.toLocaleTimeString()}`}),U=J(()=>Math.ceil(P/8));function O(q,re){const Ee={hour:"2-digit",minute:"2-digit"};return q.toLocaleTimeString([],Ee)+" - "+re.toLocaleTimeString([],Ee)}function N(q,re){return!re||!q?"0px":Math.max(2,q/re*100)+"%"}function Y(q){const re=we.value.findIndex(Ee=>Ee._time&&Ee._time.getTime()>=q.start.getTime()&&Ee._time.getTime()=0&&d.value){const Ee=d.value.querySelectorAll(".log-line");Ee[re]&&(Ee[re].scrollIntoView({behavior:"smooth",block:"center"}),n.value=!1)}}const we=J(()=>{let q=t.value;if(a.value&&(q=q.filter(re=>(re.level||"INFO")===a.value)),x.value){const re=ao.find(Ee=>Ee.value===x.value);if(re&&re.seconds){const Ee=new Date(Date.now()-re.seconds*1e3);q=q.filter(Ze=>Ze._time&&Ze._time>=Ee)}}if(i.value&&!H.value)if(l.value)try{const re=new RegExp(i.value,"i");q=q.filter(Ee=>{const Ze=Ee.text||Ee.raw||"",lt=Ee.tool||"";return re.test(Ze)||re.test(lt)})}catch{}else{const re=i.value.toLowerCase();q=q.filter(Ee=>{const Ze=(Ee.text||Ee.raw||"").toLowerCase(),lt=(Ee.tool||"").toLowerCase();return Ze.includes(re)||lt.includes(re)})}return q});function ke(q){if(q.type==="log"&&q.line)try{const re=typeof q.line=="string"?JSON.parse(q.line):q.line,Ee=re.timestamp?new Date(re.timestamp):new Date;return{ts:Ee.toLocaleTimeString(),_time:Ee,level:re.error?"ERROR":"INFO",text:re.tool_name?`[${re.tool_name}] ${re.result_summary||""}`.trim():re.message||JSON.stringify(re),tool:re.tool_name||"",raw:null}}catch{return{ts:new Date().toLocaleTimeString(),_time:new Date,level:"INFO",text:String(q.line),tool:"",raw:String(q.line)}}if(q.payload){const re=q.payload,Ee=re.timestamp?new Date(re.timestamp):new Date;return{ts:Ee.toLocaleTimeString(),_time:Ee,level:re.error?"ERROR":"INFO",text:re.tool_name?`[${re.tool_name}] ${re.result_summary||""}`.trim():re.message||JSON.stringify(re),tool:re.tool_name||"",raw:null}}return typeof q=="string"?{ts:new Date().toLocaleTimeString(),_time:new Date,level:"INFO",text:q,tool:"",raw:q}:{ts:new Date().toLocaleTimeString(),_time:new Date,level:"INFO",text:JSON.stringify(q),tool:"",raw:null}}function ie(q){const re=ke(q);if(s.value){g.value.push(re);return}pe(re)}function pe(q){t.value.push(q),t.value.length>p&&(t.value=t.value.slice(-p)),n.value&&It(()=>F())}function F(q=!1){const re=d.value;re&&re.scrollTo({top:re.scrollHeight,behavior:q?"smooth":"instant"})}function se(){n.value=!0,u.value=!1,It(()=>F(!0))}const Se=new Set(["PageUp","PageDown","ArrowUp","ArrowDown","Home","End"," "]);function V(){const q=d.value;if(!q)return;const re=q.scrollHeight-q.scrollTop-q.clientHeight<40;u.value=!n.value&&!re&&t.value.length>0,ve.value&&de()}function de(){const q=d.value;!q||!n.value||q.scrollHeight-q.scrollTop-q.clientHeight>=40&&(n.value=!1,u.value=t.value.length>0)}function ce(){n.value&&requestAnimationFrame(de)}function _e(q){Se.has(q.key)&&ce()}const ve=h(!1);function He(){n.value&&(ve.value=!0,requestAnimationFrame(de))}function k(){ve.value&&(ve.value=!1,de())}function L(){n.value&&(u.value=!1,It(()=>F()))}function $(){if(s.value=!s.value,!s.value&&g.value.length>0){for(const q of g.value)pe(q);g.value=[]}}function ee(){t.value=[],g.value=[],u.value=!1}function Z(){let q;e.value==="search"?q=Ve.value.map(lt=>{const Nt=lt.error?"ERROR":"INFO",Mt=lt.tool_name?`[${lt.tool_name}] `:"";return`${lt.timestamp||""} ${Nt} ${Mt}${lt.result_summary||lt.message||""}`}).join(` + `,setup(){const e=h("live"),t=h([]),s=h(!1),n=h(!0),a=h(""),i=h(""),l=h(!1),r=h(!1),o=h(Ke.state||"disconnected"),c=J(()=>{switch(o.value){case"connected":return"Live";case"connecting":return"Connecting…";case"reconnecting":return"Reconnecting…";default:return"Disconnected"}}),d=h(null),u=h(!1),f=h(null),p=2e3,b=Lk,y=Dk,E=ao,I=h("all"),x=h(""),m=h([]),_=h(!1),S=h(""),g=h([]);function w(){try{const q=localStorage.getItem("odin-log-presets");q&&(m.value=JSON.parse(q))}catch{}}function T(){try{localStorage.setItem("odin-log-presets",JSON.stringify(m.value))}catch{}}const C=J(()=>a.value!==""||i.value.trim()!==""||x.value!==""),M=J(()=>{const q=ao.find(re=>re.value===x.value);return q?q.label:""}),H=J(()=>{if(!l.value||!i.value)return null;try{return new RegExp(i.value,"i"),null}catch(q){return q.message}}),P=24,R=J(()=>{if(we.value.length===0)return[];const q=[],re=new Date,Ee=3600*1e3;for(let Ze=P-1;Ze>=0;Ze--){const lt=new Date(re.getTime()-(Ze+1)*Ee),Ot=new Date(re.getTime()-Ze*Ee);q.push({start:lt,end:Ot,label:O(lt,Ot),shortLabel:Ot.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),total:0,info:0,warnings:0,errors:0})}for(const Ze of we.value){if(!Ze._time)continue;const lt=Ze._time.getTime();for(const Ot of q)if(lt>=Ot.start.getTime()&<{let q=1;for(const re of R.value)re.total>q&&(q=re.total);return q}),Q=J(()=>{if(R.value.length===0)return"";const q=we.value.map(Ze=>Ze._time&&Ze._time.getTime()).filter(Boolean);if(q.length===0)return"";const re=new Date(Math.min(...q));return`${we.value.length} shown, oldest ${re.toLocaleTimeString()}`}),U=J(()=>Math.ceil(P/8));function O(q,re){const Ee={hour:"2-digit",minute:"2-digit"};return q.toLocaleTimeString([],Ee)+" - "+re.toLocaleTimeString([],Ee)}function N(q,re){return!re||!q?"0px":Math.max(2,q/re*100)+"%"}function Y(q){const re=we.value.findIndex(Ee=>Ee._time&&Ee._time.getTime()>=q.start.getTime()&&Ee._time.getTime()=0&&d.value){const Ee=d.value.querySelectorAll(".log-line");Ee[re]&&(Ee[re].scrollIntoView({behavior:"smooth",block:"center"}),n.value=!1)}}const we=J(()=>{let q=t.value;if(a.value&&(q=q.filter(re=>(re.level||"INFO")===a.value)),x.value){const re=ao.find(Ee=>Ee.value===x.value);if(re&&re.seconds){const Ee=new Date(Date.now()-re.seconds*1e3);q=q.filter(Ze=>Ze._time&&Ze._time>=Ee)}}if(i.value&&!H.value)if(l.value)try{const re=new RegExp(i.value,"i");q=q.filter(Ee=>{const Ze=Ee.text||Ee.raw||"",lt=Ee.tool||"";return re.test(Ze)||re.test(lt)})}catch{}else{const re=i.value.toLowerCase();q=q.filter(Ee=>{const Ze=(Ee.text||Ee.raw||"").toLowerCase(),lt=(Ee.tool||"").toLowerCase();return Ze.includes(re)||lt.includes(re)})}return q});function ke(q){if(q.type==="log"&&q.line)try{const re=typeof q.line=="string"?JSON.parse(q.line):q.line,Ee=re.timestamp?new Date(re.timestamp):new Date;return{ts:Ee.toLocaleTimeString(),_time:Ee,level:re.error?"ERROR":"INFO",text:re.tool_name?`[${re.tool_name}] ${re.result_summary||""}`.trim():re.message||JSON.stringify(re),tool:re.tool_name||"",raw:null}}catch{return{ts:new Date().toLocaleTimeString(),_time:new Date,level:"INFO",text:String(q.line),tool:"",raw:String(q.line)}}if(q.payload){const re=q.payload,Ee=re.timestamp?new Date(re.timestamp):new Date;return{ts:Ee.toLocaleTimeString(),_time:Ee,level:re.error?"ERROR":"INFO",text:re.tool_name?`[${re.tool_name}] ${re.result_summary||""}`.trim():re.message||JSON.stringify(re),tool:re.tool_name||"",raw:null}}return typeof q=="string"?{ts:new Date().toLocaleTimeString(),_time:new Date,level:"INFO",text:q,tool:"",raw:q}:{ts:new Date().toLocaleTimeString(),_time:new Date,level:"INFO",text:JSON.stringify(q),tool:"",raw:null}}function ie(q){const re=ke(q);if(s.value){g.value.push(re);return}he(re)}function he(q){t.value.push(q),t.value.length>p&&(t.value=t.value.slice(-p)),n.value&&Rt(()=>F())}function F(q=!1){const re=d.value;re&&re.scrollTo({top:re.scrollHeight,behavior:q?"smooth":"instant"})}function se(){n.value=!0,u.value=!1,Rt(()=>F(!0))}const Se=new Set(["PageUp","PageDown","ArrowUp","ArrowDown","Home","End"," "]);function V(){const q=d.value;if(!q)return;const re=q.scrollHeight-q.scrollTop-q.clientHeight<40;u.value=!n.value&&!re&&t.value.length>0,ge.value&&de()}function de(){const q=d.value;!q||!n.value||q.scrollHeight-q.scrollTop-q.clientHeight>=40&&(n.value=!1,u.value=t.value.length>0)}function ce(){n.value&&requestAnimationFrame(de)}function ye(q){Se.has(q.key)&&ce()}const ge=h(!1);function He(){n.value&&(ge.value=!0,requestAnimationFrame(de))}function k(){ge.value&&(ge.value=!1,de())}function L(){n.value&&(u.value=!1,Rt(()=>F()))}function $(){if(s.value=!s.value,!s.value&&g.value.length>0){for(const q of g.value)he(q);g.value=[]}}function ee(){t.value=[],g.value=[],u.value=!1}function Z(){let q;e.value==="search"?q=Pe.value.map(lt=>{const Ot=lt.error?"ERROR":"INFO",Pt=lt.tool_name?`[${lt.tool_name}] `:"";return`${lt.timestamp||""} ${Ot} ${Pt}${lt.result_summary||lt.message||""}`}).join(` `):q=we.value.map(lt=>`${lt.ts} ${lt.level} ${lt.text}`).join(` -`);const re=new Blob([q],{type:"text/plain"}),Ee=URL.createObjectURL(re),Ze=document.createElement("a");Ze.href=Ee,Ze.download=`odin-logs-${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.txt`,Ze.click(),URL.revokeObjectURL(Ee)}function X(q,re){const Ee=`${q.ts} ${q.level} ${q.text||q.raw||""}`;navigator.clipboard.writeText(Ee).then(()=>{f.value=re,setTimeout(()=>{f.value=null},1500)}).catch(()=>{})}function ue(q){a.value=a.value===q?"":q,I.value="all"}function oe(q){return q.level==="ERROR"?"log-line-error":q.level==="WARNING"?"log-line-warning":"text-gray-300"}function le(q){return q==="ERROR"?"text-red-500 font-semibold":q==="WARNING"?"text-yellow-500":"text-blue-500"}function te(q){return q==="ERROR"?"log-chip-error":q==="WARNING"?"log-chip-warning":"log-chip-info"}function ne(q){I.value=q.id;const re=q.filters;a.value=re.level||"",x.value=re.timeRange||"",i.value=re.text||"",re.levels&&(a.value=re.levels[0]||""),re.hasToolName&&(i.value="")}function fe(q){I.value=q.id,a.value=q.filters.level||"",x.value=q.filters.timeRange||"",i.value=q.filters.text||""}function be(){if(!S.value.trim())return;const q={id:"custom-"+Date.now(),name:S.value.trim(),filters:{level:a.value,timeRange:x.value,text:i.value}};m.value=[...m.value,q],T(),_.value=!1,S.value=""}function Te(q){m.value=m.value.filter(re=>re.id!==q),T(),I.value===q&&(I.value="all")}const Ie=h("all"),Le=h(""),De=h(""),Be=h(""),qe=h(""),ct=h(""),G=h(100),me=Mk,Ce=h(!1),Ne=h(!1),Pe=h(""),Ve=h([]),pt=h(null),as=h(null);function Fs(){e.value="search",pt.value||$s()}async function $s(){try{pt.value=await K.get("/api/logs/stats")}catch{}}function Gs(){const q=ct.value;if(!q){Be.value="",qe.value="";return}const Ee={last_5m:300,last_15m:900,last_1h:3600,last_4h:14400,last_24h:86400,last_7d:604800}[q];if(Ee){const Ze=new Date(Date.now()-Ee*1e3);Be.value=Bs(Ze),qe.value=""}}function Bs(q){const re=Ee=>String(Ee).padStart(2,"0");return`${q.getFullYear()}-${re(q.getMonth()+1)}-${re(q.getDate())}T${re(q.getHours())}:${re(q.getMinutes())}`}function Ct(q){if(!q)return"";const re=new Date(q);return isNaN(re.getTime())?"":re.toISOString()}async function is(){Ce.value=!0,Pe.value="",Ne.value=!0,as.value=null;try{const q=new URLSearchParams;Ie.value&&Ie.value!=="all"&&q.set("level",Ie.value),Le.value&&q.set("tool",Le.value),De.value&&q.set("q",De.value);const re=Ct(Be.value),Ee=Ct(qe.value);re&&q.set("start",re),Ee&&q.set("end",Ee),q.set("limit",String(G.value));const Ze=await K.get(`/api/logs/search?${q.toString()}`);Ve.value=Ze.entries||[]}catch(q){Pe.value=q.message||"Search failed",Ve.value=[]}finally{Ce.value=!1}}function Ts(){Ie.value="all",Le.value="",De.value="",Be.value="",qe.value="",ct.value="",G.value=100,Ve.value=[],Ne.value=!1,Pe.value="",as.value=null}function Ks(q){as.value=as.value===q?null:q}function ln(q){if(!q.timestamp)return"";try{return new Date(q.timestamp).toLocaleString()}catch{return q.timestamp}}function Ws(q){return q.type==="web_action"?`${q.status||""} (${q.execution_time_ms||0}ms)`:(q.result_summary||"").slice(0,200)}function Zt(q){return q.error?"log-line-error":"text-gray-300"}function Us(q){try{return JSON.stringify(q,null,2)}catch{return String(q)}}let Et=null,ls=null,rs=!1;function at(){rs||(rs=!0,Ke.subscribe("logs",ie),r.value=Ke.connected,o.value=Ke.state||"disconnected",Et=Ke.onStateChange,ls=(q,re)=>{o.value=q,r.value=q==="connected",Et&&Et(q,re)},Ke.onStateChange=ls)}function vs(){rs&&(rs=!1,Ke.unsubscribe("logs",ie),Ke.onStateChange===ls&&(Ke.onStateChange=Et),ls=null,Et=null)}return We(()=>{w(),window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k)}),Ms(at),Ps(vs),xt(()=>{vs(),window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k)}),{mode:e,logs:t,paused:s,autoScroll:n,levelFilter:a,textFilter:i,useRegex:l,subscribed:r,wsState:o,wsStateLabel:c,logContainer:d,filteredLogs:we,pauseBuffer:g,showJumpBottom:u,copiedIndex:f,regexError:H,levels:b,logPresets:y,timeRanges:E,timeRange:x,activeLogPreset:I,customLogPresets:m,showSaveLogPreset:_,newLogPresetName:S,hasActiveLogFilters:C,timeRangeLabel:M,timelineBuckets:R,timelineMax:j,timelineSpanLabel:Q,timelineLabelSkip:U,togglePause:$,clearLogs:ee,exportLogs:Z,logLineClass:oe,levelClass:le,levelChipClass:te,toggleLevel:ue,copyLine:X,jumpToBottom:se,onScroll:V,onUserScrollIntent:ce,onUserScrollKey:_e,onAutoScrollToggle:L,onPointerDown:He,applyLogPreset:ne,applyCustomLogPreset:fe,saveLogCustomPreset:be,removeLogCustomPreset:Te,segmentHeight:N,jumpToTimelineBucket:Y,searchLevel:Ie,searchTool:Le,searchKeyword:De,searchStart:Be,searchEnd:qe,searchTimePreset:ct,searchLimit:G,searchLimits:me,searching:Ce,searchRan:Ne,searchError:Pe,searchResults:Ve,searchStats:pt,expandedSearch:as,switchToSearch:Fs,runSearch:is,clearSearchFilters:Ts,toggleSearchExpand:Ks,formatSearchTs:ln,searchEntryText:Ws,searchLogLineClass:Zt,formatJson:Us,applySearchTimePreset:Gs}}};function _l(e=[]){const t=[],s=new Set;function n(a){const i=[a.kind,a.label,a.apply_mode||"",a.code||"",a.text||""].join("\0");s.has(i)||(s.add(i),t.push({...a,key:i}))}for(const a of e)for(const i of(a==null?void 0:a.consumers)||[])n({kind:"consumer",label:i.name,apply_mode:i.apply_mode,text:i.detail});for(const a of e)a!=null&&a.apply_handler&&n({kind:"handler",label:"Apply handler",code:a.apply_handler});for(const a of e)a!=null&&a.restart_reason&&n({kind:"restart",label:"Why a restart is required",text:a.restart_reason});for(const a of e)a!=null&&a.activation_policy&&n({kind:"activation",label:"Activation policy",text:a.activation_policy});return t}const Fk=Object.freeze([{key:"all",label:"All fields",short:"All",icon:"grid"},{key:"applied",label:"Applied",short:"Applied",icon:"success"},{key:"pending_restart",label:"Pending restart",short:"Restart",icon:"refresh"},{key:"dormant",label:"Saved, not active",short:"Saved only",icon:"pause"},{key:"invalid",label:"Invalid",short:"Invalid",icon:"error"},{key:"drift",label:"Drift",short:"Drift",icon:"warning"},{key:"unknown",label:"Effective state unknown",short:"Unknown",icon:"info"}]);function $k(e,t={}){var a,i;const s=t.getStyle||(l=>globalThis.getComputedStyle(l)),n=Object.hasOwn(t,"fallback")?t.fallback:(a=globalThis.document)==null?void 0:a.scrollingElement;for(let l=e;l;l=l.parentElement){const r=((i=s(l))==null?void 0:i.overflowY)||"";if(/^(auto|scroll|overlay)$/.test(r)&&l.scrollHeight>l.clientHeight)return l}return n&&n.scrollHeight>n.clientHeight?n:e||n||null}const Ua=[{key:"core",label:"Core",icon:"sliders",sections:["timezone","logging","permissions","graceful_degradation"]},{key:"models",label:"Models & AI",icon:"brain",sections:["image","llm_recovery"]},{key:"runtime",label:"Runtime",icon:"activity",sections:["context","sessions","agents","turn_state"]},{key:"data",label:"Data & Storage",icon:"database",sections:["learning","search","usage","audit","attachments"]},{key:"services",label:"Services",icon:"link",sections:["webhook","observability","email","browser","comfyui","slack","mcp"]},{key:"automation",label:"Automation",icon:"workflow",sections:["message_triggers","reaction_triggers","grafana_alerts","outbound_webhooks","issue_tracker"]},{key:"infrastructure",label:"Infrastructure",icon:"server",sections:["tools","web"]}],Bk={live_read:"Applies immediately",live_apply:"Dedicated live apply",live_for_new_work:"Applies to new work",restart:"Restart required",activation_required:"Saved only — see activation note",legacy_control:"Controlled elsewhere",dormant:"Saved for future support"},io=new Set(["llm_provider","openai_codex","ollama","kimi","personality","discord"]),Uk=Object.freeze(["web.api_tokens","outbound_webhooks.targets"]);function Mu(e){return Uk.some(t=>e===t||e.startsWith(`${t}.`))}const Sm="odin_config_center_expanded_v1",Tm="odin_config_center_category_v1",Hk=50,zk=650,lo=()=>K.get("/api/config/meta");function Wn(e){return e===void 0?void 0:JSON.parse(JSON.stringify(e))}function Ai(e,t){return JSON.stringify(e)===JSON.stringify(t)}function ka(e){return String(e).replace(/[_-]+/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function Vk(e){return e===void 0?"unset":e===null?"null":typeof e=="boolean"?e?"Enabled":"Disabled":Array.isArray(e)?e.length?`${e.length} item${e.length===1?"":"s"}`:"Empty list":typeof e=="object"?Object.keys(e).length?`${Object.keys(e).length} field${Object.keys(e).length===1?"":"s"}`:"Empty object":e===""?"Empty":String(e)}function jk(e){if(e===void 0)return"unset";if(e===null)return"null";if(typeof e=="object")try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}function Cm(e,t){if(Ai(e,t))return;if(!(e&&t&&typeof e=="object"&&typeof t=="object"&&!Array.isArray(e)&&!Array.isArray(t)))return Wn(t);const n={};for(const[a,i]of Object.entries(t)){const l=Cm(e[a],i);l!==void 0&&(n[a]=l)}return Object.keys(n).length?n:void 0}function qk(e,t){const s={};for(const[n,a]of Object.entries(t||{})){const i=Cm(e==null?void 0:e[n],a);i!==void 0&&(s[n]=i)}return s}function Em(e,t,s,n){if(Ai(e,t))return;if(e&&t&&typeof e=="object"&&typeof t=="object"&&!Array.isArray(e)&&!Array.isArray(t)){const i=new Set([...Object.keys(e),...Object.keys(t)]);for(const l of i)Em(e[l],t[l],s?`${s}.${l}`:l,n);return}n.push({path:s,oldVal:e,newVal:t})}function Gk(){try{const e=JSON.parse(localStorage.getItem(Sm)||"{}");return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}catch{return{}}}function Kk(){try{const e=localStorage.getItem(Tm);return Ua.some(t=>t.key===e)?e:Ua[0].key}catch{return Ua[0].key}}const Wk={template:` +`);const re=new Blob([q],{type:"text/plain"}),Ee=URL.createObjectURL(re),Ze=document.createElement("a");Ze.href=Ee,Ze.download=`odin-logs-${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.txt`,Ze.click(),URL.revokeObjectURL(Ee)}function X(q,re){const Ee=`${q.ts} ${q.level} ${q.text||q.raw||""}`;navigator.clipboard.writeText(Ee).then(()=>{f.value=re,setTimeout(()=>{f.value=null},1500)}).catch(()=>{})}function ue(q){a.value=a.value===q?"":q,I.value="all"}function oe(q){return q.level==="ERROR"?"log-line-error":q.level==="WARNING"?"log-line-warning":"text-gray-300"}function le(q){return q==="ERROR"?"text-red-500 font-semibold":q==="WARNING"?"text-yellow-500":"text-blue-500"}function te(q){return q==="ERROR"?"log-chip-error":q==="WARNING"?"log-chip-warning":"log-chip-info"}function ne(q){I.value=q.id;const re=q.filters;a.value=re.level||"",x.value=re.timeRange||"",i.value=re.text||"",re.levels&&(a.value=re.levels[0]||""),re.hasToolName&&(i.value="")}function fe(q){I.value=q.id,a.value=q.filters.level||"",x.value=q.filters.timeRange||"",i.value=q.filters.text||""}function ve(){if(!S.value.trim())return;const q={id:"custom-"+Date.now(),name:S.value.trim(),filters:{level:a.value,timeRange:x.value,text:i.value}};m.value=[...m.value,q],T(),_.value=!1,S.value=""}function Te(q){m.value=m.value.filter(re=>re.id!==q),T(),I.value===q&&(I.value="all")}const Oe=h("all"),Le=h(""),De=h(""),Be=h(""),qe=h(""),ct=h(""),K=h(100),xe=Mk,Ce=h(!1),Re=h(!1),Ve=h(""),Pe=h([]),pt=h(null),ls=h(null);function Ps(){e.value="search",pt.value||nn()}async function nn(){try{pt.value=await G.get("/api/logs/stats")}catch{}}function Ss(){const q=ct.value;if(!q){Be.value="",qe.value="";return}const Ee={last_5m:300,last_15m:900,last_1h:3600,last_4h:14400,last_24h:86400,last_7d:604800}[q];if(Ee){const Ze=new Date(Date.now()-Ee*1e3);Be.value=Fs(Ze),qe.value=""}}function Fs(q){const re=Ee=>String(Ee).padStart(2,"0");return`${q.getFullYear()}-${re(q.getMonth()+1)}-${re(q.getDate())}T${re(q.getHours())}:${re(q.getMinutes())}`}function Mt(q){if(!q)return"";const re=new Date(q);return isNaN(re.getTime())?"":re.toISOString()}async function Yt(){Ce.value=!0,Ve.value="",Re.value=!0,ls.value=null;try{const q=new URLSearchParams;Oe.value&&Oe.value!=="all"&&q.set("level",Oe.value),Le.value&&q.set("tool",Le.value),De.value&&q.set("q",De.value);const re=Mt(Be.value),Ee=Mt(qe.value);re&&q.set("start",re),Ee&&q.set("end",Ee),q.set("limit",String(K.value));const Ze=await G.get(`/api/logs/search?${q.toString()}`);Pe.value=Ze.entries||[]}catch(q){Ve.value=q.message||"Search failed",Pe.value=[]}finally{Ce.value=!1}}function $s(){Oe.value="all",Le.value="",De.value="",Be.value="",qe.value="",ct.value="",K.value=100,Pe.value=[],Re.value=!1,Ve.value="",ls.value=null}function Bs(q){ls.value=ls.value===q?null:q}function An(q){if(!q.timestamp)return"";try{return new Date(q.timestamp).toLocaleString()}catch{return q.timestamp}}function Us(q){return q.type==="web_action"?`${q.status||""} (${q.execution_time_ms||0}ms)`:(q.result_summary||"").slice(0,200)}function zt(q){return q.error?"log-line-error":"text-gray-300"}function Vn(q){try{return JSON.stringify(q,null,2)}catch{return String(q)}}let Ct=null,rs=null,os=!1;function Ye(){os||(os=!0,Ke.subscribe("logs",ie),r.value=Ke.connected,o.value=Ke.state||"disconnected",Ct=Ke.onStateChange,rs=(q,re)=>{o.value=q,r.value=q==="connected",Ct&&Ct(q,re)},Ke.onStateChange=rs)}function gs(){os&&(os=!1,Ke.unsubscribe("logs",ie),Ke.onStateChange===rs&&(Ke.onStateChange=Ct),rs=null,Ct=null)}return We(()=>{w(),window.addEventListener("pointerup",k),window.addEventListener("pointercancel",k)}),Ds(Ye),Ms(gs),xt(()=>{gs(),window.removeEventListener("pointerup",k),window.removeEventListener("pointercancel",k)}),{mode:e,logs:t,paused:s,autoScroll:n,levelFilter:a,textFilter:i,useRegex:l,subscribed:r,wsState:o,wsStateLabel:c,logContainer:d,filteredLogs:we,pauseBuffer:g,showJumpBottom:u,copiedIndex:f,regexError:H,levels:b,logPresets:y,timeRanges:E,timeRange:x,activeLogPreset:I,customLogPresets:m,showSaveLogPreset:_,newLogPresetName:S,hasActiveLogFilters:C,timeRangeLabel:M,timelineBuckets:R,timelineMax:j,timelineSpanLabel:Q,timelineLabelSkip:U,togglePause:$,clearLogs:ee,exportLogs:Z,logLineClass:oe,levelClass:le,levelChipClass:te,toggleLevel:ue,copyLine:X,jumpToBottom:se,onScroll:V,onUserScrollIntent:ce,onUserScrollKey:ye,onAutoScrollToggle:L,onPointerDown:He,applyLogPreset:ne,applyCustomLogPreset:fe,saveLogCustomPreset:ve,removeLogCustomPreset:Te,segmentHeight:N,jumpToTimelineBucket:Y,searchLevel:Oe,searchTool:Le,searchKeyword:De,searchStart:Be,searchEnd:qe,searchTimePreset:ct,searchLimit:K,searchLimits:xe,searching:Ce,searchRan:Re,searchError:Ve,searchResults:Pe,searchStats:pt,expandedSearch:ls,switchToSearch:Ps,runSearch:Yt,clearSearchFilters:$s,toggleSearchExpand:Bs,formatSearchTs:An,searchEntryText:Us,searchLogLineClass:zt,formatJson:Vn,applySearchTimePreset:Ss}}};function _l(e=[]){const t=[],s=new Set;function n(a){const i=[a.kind,a.label,a.apply_mode||"",a.code||"",a.text||""].join("\0");s.has(i)||(s.add(i),t.push({...a,key:i}))}for(const a of e)for(const i of(a==null?void 0:a.consumers)||[])n({kind:"consumer",label:i.name,apply_mode:i.apply_mode,text:i.detail});for(const a of e)a!=null&&a.apply_handler&&n({kind:"handler",label:"Apply handler",code:a.apply_handler});for(const a of e)a!=null&&a.restart_reason&&n({kind:"restart",label:"Why a restart is required",text:a.restart_reason});for(const a of e)a!=null&&a.activation_policy&&n({kind:"activation",label:"Activation policy",text:a.activation_policy});return t}const Fk=Object.freeze([{key:"all",label:"All fields",short:"All",icon:"grid"},{key:"applied",label:"Applied",short:"Applied",icon:"success"},{key:"pending_restart",label:"Pending restart",short:"Restart",icon:"refresh"},{key:"dormant",label:"Saved, not active",short:"Saved only",icon:"pause"},{key:"invalid",label:"Invalid",short:"Invalid",icon:"error"},{key:"drift",label:"Drift",short:"Drift",icon:"warning"},{key:"unknown",label:"Effective state unknown",short:"Unknown",icon:"info"}]);function $k(e,t={}){var a,i;const s=t.getStyle||(l=>globalThis.getComputedStyle(l)),n=Object.hasOwn(t,"fallback")?t.fallback:(a=globalThis.document)==null?void 0:a.scrollingElement;for(let l=e;l;l=l.parentElement){const r=((i=s(l))==null?void 0:i.overflowY)||"";if(/^(auto|scroll|overlay)$/.test(r)&&l.scrollHeight>l.clientHeight)return l}return n&&n.scrollHeight>n.clientHeight?n:e||n||null}const Ha=[{key:"core",label:"Core",icon:"sliders",sections:["timezone","logging","permissions","graceful_degradation"]},{key:"models",label:"Models & AI",icon:"brain",sections:["image","llm_recovery"]},{key:"runtime",label:"Runtime",icon:"activity",sections:["context","sessions","agents","turn_state"]},{key:"data",label:"Data & Storage",icon:"database",sections:["learning","search","usage","audit","attachments"]},{key:"services",label:"Services",icon:"link",sections:["webhook","observability","email","browser","comfyui","slack","mcp"]},{key:"automation",label:"Automation",icon:"workflow",sections:["message_triggers","reaction_triggers","grafana_alerts","outbound_webhooks","issue_tracker"]},{key:"infrastructure",label:"Infrastructure",icon:"server",sections:["tools","web"]}],Bk={live_read:"Applies immediately",live_apply:"Dedicated live apply",live_for_new_work:"Applies to new work",restart:"Restart required",activation_required:"Saved only — see activation note",legacy_control:"Controlled elsewhere",dormant:"Saved for future support"},io=new Set(["llm_provider","openai_codex","ollama","kimi","personality","discord"]),Uk=Object.freeze(["web.api_tokens","outbound_webhooks.targets"]);function Mu(e){return Uk.some(t=>e===t||e.startsWith(`${t}.`))}const Sm="odin_config_center_expanded_v1",Tm="odin_config_center_category_v1",Hk=50,zk=650,lo=()=>G.get("/api/config/meta");function Zn(e){return e===void 0?void 0:JSON.parse(JSON.stringify(e))}function Ri(e,t){return JSON.stringify(e)===JSON.stringify(t)}function wa(e){return String(e).replace(/[_-]+/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function Vk(e){return e===void 0?"unset":e===null?"null":typeof e=="boolean"?e?"Enabled":"Disabled":Array.isArray(e)?e.length?`${e.length} item${e.length===1?"":"s"}`:"Empty list":typeof e=="object"?Object.keys(e).length?`${Object.keys(e).length} field${Object.keys(e).length===1?"":"s"}`:"Empty object":e===""?"Empty":String(e)}function jk(e){if(e===void 0)return"unset";if(e===null)return"null";if(typeof e=="object")try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)}function Cm(e,t){if(Ri(e,t))return;if(!(e&&t&&typeof e=="object"&&typeof t=="object"&&!Array.isArray(e)&&!Array.isArray(t)))return Zn(t);const n={};for(const[a,i]of Object.entries(t)){const l=Cm(e[a],i);l!==void 0&&(n[a]=l)}return Object.keys(n).length?n:void 0}function qk(e,t){const s={};for(const[n,a]of Object.entries(t||{})){const i=Cm(e==null?void 0:e[n],a);i!==void 0&&(s[n]=i)}return s}function Em(e,t,s,n){if(Ri(e,t))return;if(e&&t&&typeof e=="object"&&typeof t=="object"&&!Array.isArray(e)&&!Array.isArray(t)){const i=new Set([...Object.keys(e),...Object.keys(t)]);for(const l of i)Em(e[l],t[l],s?`${s}.${l}`:l,n);return}n.push({path:s,oldVal:e,newVal:t})}function Gk(){try{const e=JSON.parse(localStorage.getItem(Sm)||"{}");return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}catch{return{}}}function Kk(){try{const e=localStorage.getItem(Tm);return Ha.some(t=>t.key===e)?e:Ha[0].key}catch{return Ha[0].key}}const Wk={template:`
@@ -4157,7 +4157,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h(null),t=h(null),s=h(!0),n=h(null),a=h(!1),i=h(null),l=h(null),r=h(null),o=h(!1),c=h(!1),d=h(null),u=h(""),f=h("all"),p=h(Kk()),b=h(Gk()),y=h({}),E=h({}),I=h(""),x=h({}),m=h({}),_=h([]),S=h([]),g=h(!1),w=h(!1),T=h(!1);let C=null,M=null,H={path:null,at:0},P=0;const R=J(()=>{var v;return(((v=t.value)==null?void 0:v.fields)||[]).filter(D=>!io.has(D.path.split(".")[0])&&!Mu(D.path))}),j=J(()=>new Map(R.value.map(v=>[v.path,v]))),Q=J(()=>we.value.reduce((v,D)=>v+D.sections.length,0)),U=J(()=>R.value.length),O=J(()=>Fk),N=J(()=>_.value.length>0),Y=J(()=>S.value.length>0),we=J(()=>{if(!e.value)return[];const v=new Set(Ua.flatMap(ae=>ae.sections)),D=Ua.map(ae=>({...ae,sections:ae.sections.filter(Oe=>Object.hasOwn(e.value,Oe)&&!io.has(Oe))})).filter(ae=>ae.sections.length),B=Object.keys(e.value).filter(ae=>!v.has(ae)&&!io.has(ae));return B.length&&D.push({key:"other",label:"Other",icon:"folder",sections:B}),D}),ke=J(()=>e.value?{...e.value,...y.value}:null),ie=J(()=>{if(!e.value)return[];const v=[];for(const[D,B]of Object.entries(y.value))Em(e.value[D],B,D,v);return v.filter(D=>!Ai(D.oldVal,D.newVal)).map(D=>{const B=L(D.path);return{...D,label:(B==null?void 0:B.label)||ka(D.path.split(".").at(-1)),apply_mode:(B==null?void 0:B.apply_mode)||ue(D.path.split(".")[0])}})}),pe=J(()=>ie.value.length>0),F=J(()=>ie.value.length),se=J(()=>new Set(ie.value.map(v=>v.path.split(".")[0])).size),Se=J(()=>!!u.value||f.value!=="all"),V=J(()=>{const v={...m.value};for(const D of ie.value){const B=L(D.path),ae=Nt(B,D.newVal);ae&&(v[D.path]=ae)}return v}),de=J(()=>Object.keys(V.value).length>0),ce=J(()=>e.value?(Se.value?we.value:we.value.filter(D=>D.key===p.value)).map(D=>({...D,sections:D.sections.filter(B=>G(B))})).filter(D=>D.sections.length):[]),_e=J(()=>{const v=["live_read","live_apply","live_for_new_work","restart","activation_required","legacy_control","dormant"],D=new Map(v.map(B=>[B,[]]));for(const B of ie.value){const ae=D.has(B.apply_mode)?B.apply_mode:"restart";D.get(ae).push(B)}return v.filter(B=>D.get(B).length).map(B=>({key:B,label:z(B),entries:D.get(B)}))}),ve=J(()=>ie.value.filter(v=>v.apply_mode==="restart").length),He=J(()=>R.value.filter(v=>v.pending_restart)),k=J(()=>He.value.length);function L(v){const D=j.value.get(v);return D?{...D,apply_details:_l([D])}:null}function $(v){const D=`${v}.`;return R.value.filter(B=>B.path===v||B.path.startsWith(D))}function ee(v){return $(v).length}function Z(v){return ka(v)}function X(v){const D=$(v);if(!D.length)return`${ka(v)} configuration.`;const B=D.find(Ue=>Ue.sensitivity==="public"&&Ue.description)||D.find(Ue=>Ue.description),ae=(B==null?void 0:B.description)||"";return ae.match(/setting for (.+)\.$/i)?`${ka(v)} settings and runtime behaviour.`:ae}function ue(v){const D=[...new Set($(v).map(B=>B.apply_mode))];return D.length===1?D[0]:D.includes("restart")?"restart":D.includes("activation_required")?"activation_required":D[0]||"restart"}function oe(v){const D=[...new Set($(v).map(B=>z(B.apply_mode)))];return D.length?D.length===1?D[0]:`Mixed apply behaviour: ${D.join(" · ")}`:""}function le(v){return _l($(v))}function te(v,D){return D.split(".").reduce((B,ae)=>B==null?void 0:B[ae],v)}function ne(v){const D=ke.value;return $(v).filter(B=>Mu(B.path)?!1:B.path.split(".").length<=2?!0:!B.path.includes(".*")).map(B=>({...B,key:B.path.split(".").at(-1),value:te(D,B.path),apply_details:_l([B]),editor:B.path==="agents.final_warning_iterations"?"warning-chips":null}))}function fe(v){const D=v.path.split(".");return D.length>2?D.slice(0,2).join("."):null}function be(v){const D=new Map;for(const B of ne(v)){const ae=fe(B),Oe=ae||`${v}.__root`;D.has(Oe)||D.set(Oe,{key:Oe,path:ae,entries:[]}),D.get(Oe).entries.push(B)}return[...D.values()].map(B=>{const ae=B.entries.find(Oe=>Oe.group_description);return{...B,label:B.path?ka(B.path.split(".").at(-1)):null,description:(ae==null?void 0:ae.group_description)||null,apply_details:_l(B.entries),runtime_summaries:Ie(B.entries)}})}function Te(v){return{save:v.save_effect||(v.apply_mode==="dormant"?"Saving records this value in config.yml.":"Saving records this value and validates the section."),runtime:v.runtime_effect||{live_read:"Odin reads the saved value during current work.",live_apply:"Odin reloads this setting without a restart.",live_for_new_work:"New work uses the saved value; existing work keeps its snapshot.",restart:"Odin keeps using its startup value until a clean restart.",activation_required:"Odin keeps the current behavior until you enable this feature separately.",legacy_control:"Odin keeps the existing compatibility behavior until you apply this choice.",dormant:"This version of Odin does not use the saved value. Restarting will not activate it."}[v.apply_mode]||"Effective runtime state is not currently observable."}}function Ie(v){const D=new Map;for(const B of v){const ae=Te(B),Oe=`${B.apply_mode}|${ae.save}|${ae.runtime}`;D.has(Oe)||D.set(Oe,{key:Oe,label:z(B.apply_mode),save:ae.save,runtime:ae.runtime})}return[...D.values()]}function Le(v){if(De(v))return v.runtime_effect||v.activation_policy||"";if(v.apply_mode==="activation_required"){const D=v.activation_policy||v.runtime_effect;return D?`Not active after saving. No activation control exists in this release. ${D}`:"Not active after saving; no activation control exists in this release."}return""}function De(v){return v.action_available===!0&&!!(v.action_label&&v.action_endpoint)}async function Be(v){if(De(v))try{if(Ve(v.path))throw new Error("Save this setting before applying its action.");const D=String(v.action_method||"POST").toLowerCase(),B={post:K.post.bind(K),put:K.put.bind(K),delete:K.del.bind(K)}[D];if(!B)throw new Error("Unsupported configuration action");await B(v.action_endpoint,v.action_body||void 0),await ge(),Es("success",`${v.action_label} completed.`)}catch(D){Es("error",D.message||`${v.action_label} failed`)}}function qe(v,D){return[v.label,v.path,v.description,...v.aliases||[]].filter(Boolean).join(" ").toLowerCase().includes(D)}function ct(v){const D=u.value.trim().toLowerCase();return D?$(v).filter(B=>qe(B,D)):[]}function G(v){const D=$(v);if(f.value!=="all"&&!D.some(ae=>ae.apply_state===f.value))return!1;const B=u.value.trim().toLowerCase();return!B||`${Z(v)} ${v}`.toLowerCase().includes(B)?!0:D.some(ae=>qe(ae,B))}function me(v,D){return $(v).filter(B=>B.apply_state===D).length}function Ce(v){return v==="all"?U.value:R.value.filter(D=>D.apply_state===v).length}function Ne(v){const D=v.sections.flatMap(B=>$(B));return{fields:D.length,modified:ie.value.filter(B=>v.sections.includes(B.path.split(".")[0])).length,pending_restart:D.filter(B=>B.apply_state==="pending_restart").length,invalid:D.filter(B=>B.apply_state==="invalid").length,dormant:D.filter(B=>B.apply_state==="dormant").length}}function Pe(v){var D;return Object.hasOwn(y.value,v)&&!Ai((D=e.value)==null?void 0:D[v],y.value[v])}function Ve(v){return ie.value.some(D=>D.path===v||D.path.startsWith(`${v}.`))}function pt(v){p.value=v,u.value="",f.value="all";try{localStorage.setItem(Tm,v)}catch{}}function as(v){f.value=v}function Fs(){u.value="",f.value="all"}function $s(v){var D;return((D=we.value.find(B=>B.sections.includes(v)))==null?void 0:D.sections)||[]}function Gs(v){const D=$s(v),B=D.find(ae=>b.value[ae]===!0);return B||D.find(ae=>b.value[ae]!==!1)||null}function Bs(v){return u.value&&!T.value&&G(v)?!0:T.value?Gs(v)===v:Object.hasOwn(b.value,v)?b.value[v]===!0:!0}function Ct(v){const D=!Bs(v);if(T.value){const B={...b.value};for(const ae of $s(v))B[ae]===!0&&(B[ae]=!1);B[v]=D,b.value=B;return}b.value={...b.value,[v]:D}}function is(){_.value.push(Wn(y.value)),_.value.length>Hk&&_.value.shift(),S.value=[]}function Ts(){pe.value&&(is(),y.value={},m.value={},g.value=!1)}function Ks(v,D=!1){const B=Date.now();if(D&&H.path===v&&B-H.atOe-ae);I.value="",Zt(v,B)}function q(v,D){Zt(v,(v.value||[]).filter(B=>B!==D))}function re(v){return v.apply_mode==="live_read"?"Odin reads the saved file value on next use.":v.apply_mode==="live_for_new_work"?"New work uses the saved file value.":v.apply_mode==="live_apply"?v.apply_handler?`Apply the saved value through ${v.apply_handler}.`:"Apply it through its dedicated owner page or endpoint.":v.apply_mode==="restart"?"Restart Odin for the saved collection to take effect.":v.apply_mode==="activation_required"?"Saving does not enable it. No activation control exists in this release.":v.apply_mode==="dormant"?"This release does not use the saved collection.":"Follow the runtime details shown for this setting."}function Ee(v){return v.type==="array"&&Array.isArray(v.value)&&!v.structured_container&&!v.structured_container_child&&v.sensitivity==="public"&&v.value.every(D=>["string","number","boolean"].includes(typeof D))}function Ze(v){const D=String(x.value[v.path]??"").trim();if(!D)return;const B=[...new Set([...v.value||[],D])];x.value={...x.value,[v.path]:""},Zt(v,B)}function lt(v,D){Zt(v,(v.value||[]).filter(B=>B!==D))}function Nt(v,D){var ae;if(!v)return null;if((ae=v.enum)!=null&&ae.length&&!v.enum.includes(D))return`Choose one of: ${v.enum.join(", ")}`;if(v.path==="agents.final_warning_iterations"&&(!Array.isArray(D)||!D.length))return"Add at least one warning threshold.";const B=v.constraints||{};if((v.type==="integer"||v.type==="number")&&typeof D=="number"){if(B.minimum!==void 0&&DB.maximum)return`Must be at most ${B.maximum}${v.unit?` ${v.unit}`:""}`}return null}function Mt(v){return V.value[v.path]||null}function ha(v){const D=`${v}.`;return Object.keys(V.value).some(B=>B===v||B.startsWith(D))}function Cs(){_.value.length&&(S.value.push(Wn(y.value)),y.value=_.value.pop(),m.value={},E.value={},H={path:null,at:0})}function ma(){S.value.length&&(_.value.push(Wn(y.value)),y.value=S.value.pop(),m.value={},E.value={},H={path:null,at:0})}function si(){!pe.value||de.value||(g.value=!0,w.value=!1)}function ga(){g.value=!1}function va(){Ts()}function z(v){return Bk[v]||ka(v||"unknown")}function he(v){return`apply-${String(v||"unknown").replaceAll("_","-")}`}function ye(v){return`cfgc-field-${v.replace(/[^a-zA-Z0-9_-]/g,"-")}`}function os(v){return`${ye(v)}-input`}function cs(v){const D=document.getElementById(ye(v))||document.getElementById(ye(v.split(".").slice(0,2).join(".")));D==null||D.scrollIntoView({behavior:"smooth",block:"center"})}function Es(v,D){l.value={type:v,message:D},window.setTimeout(()=>{var B;((B=l.value)==null?void 0:B.message)===D&&(l.value=null)},3500)}function ll(){o.value=!1,f.value="pending_restart",u.value="";const v=$k(n.value);v&&(v.scrollTop=0)}function Br(){o.value=!1}function ni(v=1800){M&&window.clearTimeout(M),M=window.setTimeout(rl,v)}async function rl(){if(c.value){if(P+=1,P>45){c.value=!1,d.value="Odin did not return with the new startup settings within 90 seconds.";return}try{if(t.value=await lo(),k.value===0){c.value=!1,d.value=null,Es("success","Odin restarted and the saved startup settings are active.");return}}catch{}ni(2e3)}}async function ba(){if(!c.value){d.value=null;try{await K.post("/api/restart",{}),c.value=!0,P=0,o.value=!1,ni()}catch(v){d.value=v.message||"Odin could not schedule a restart."}}}async function ai(){if(!(!pe.value||de.value||a.value)){a.value=!0;try{const v=qk(e.value,y.value),D=await K.put("/api/config",v);e.value=D,y.value={},_.value=[],S.value=[],m.value={},g.value=!1;try{t.value=await lo(),r.value=null,o.value=k.value>0,Es("success",k.value?`Configuration saved. ${k.value} setting${k.value===1?"":"s"} still use startup values.`:"Configuration saved. Apply status has been refreshed.")}catch(B){r.value=B.message||"Unknown metadata error.",Es("error",`Configuration saved, but apply status could not be refreshed: ${r.value}`)}}catch(v){Es("error",v.message||"Configuration could not be saved")}finally{a.value=!1}}}async function ge(){var v,D;if(!pe.value){s.value=!0,i.value=null;try{const B=await K.get("/api/config"),ae=await lo();e.value=B,t.value=ae,r.value=null;const Oe=we.value;if(Oe.some(Ue=>Ue.key===p.value)||(p.value=((v=Oe[0])==null?void 0:v.key)||Ua[0].key),T.value){const Xe=(((D=Oe.find(Ht=>Ht.key===p.value))==null?void 0:D.sections)||[]).find(Ht=>b.value[Ht]===!0);b.value=Xe?{...b.value,[Xe]:!0}:{}}}catch(B){i.value=B.message||"Unknown configuration error"}finally{s.value=!1}}}function A(v){if(g.value||!(v.ctrlKey||v.metaKey))return;const D=v.target;D instanceof HTMLElement&&(D.matches("input, textarea, select")||D.isContentEditable)||(!v.shiftKey&&v.key.toLowerCase()==="z"?(v.preventDefault(),Cs()):(v.key.toLowerCase()==="y"||v.shiftKey&&v.key.toLowerCase()==="z")&&(v.preventDefault(),ma()))}function W(v){T.value=v.matches}return ts(b,v=>{try{localStorage.setItem(Sm,JSON.stringify(v))}catch{}},{deep:!0}),We(()=>{var v;ge(),document.addEventListener("keydown",A),C=window.matchMedia("(max-width: 760px)"),W(C),(v=C.addEventListener)==null||v.call(C,"change",W)}),xt(()=>{var v;document.removeEventListener("keydown",A),(v=C==null?void 0:C.removeEventListener)==null||v.call(C,"change",W),M&&window.clearTimeout(M)}),{config:e,meta:t,loading:s,saving:a,error:i,toast:l,metaRefreshError:r,restartPromptOpen:o,restartScheduled:c,restartError:d,configMain:n,searchQuery:u,healthFilter:f,activeCategory:p,reviewOpen:g,mobileOverflowOpen:w,warningThresholdInput:I,arrayInputs:x,healthFilters:O,visibleCategories:we,displayGroups:ce,reviewGroups:_e,sectionCount:Q,fieldCount:U,hasChanges:pe,changeCount:F,changedSectionCount:se,hasDraftErrors:de,canUndo:N,canRedo:Y,globalFilterActive:Se,reviewRestartCount:ve,pendingRestartCount:k,pendingRestartFields:He,healthCount:Ce,categoryStats:Ne,selectCategory:pt,selectHealthFilter:as,clearFilters:Fs,sectionLabel:Z,sectionDescription:X,sectionFieldCount:ee,sectionHealthCount:me,sectionApplySummary:oe,sectionApplyDetails:le,sectionEntries:ne,fieldGroups:be,sectionSearchHits:ct,fieldRuntimeCopy:Te,fieldSpecificRuntimeNote:Le,hasHonestAction:De,runFieldAction:Be,sectionChanged:Pe,fieldChanged:Ve,isSectionExpanded:Bs,toggleSection:Ct,discardAllDrafts:Ts,setFieldValue:Zt,setNumberFieldValue:at,numberInputValue:rs,beginInputEdit:Us,endTextInputEdit:Et,endInputEdit:ls,addWarningThreshold:vs,removeWarningThreshold:q,isScalarArray:Ee,addScalarArrayItem:Ze,removeScalarArrayItem:lt,fieldError:Mt,sectionHasErrors:ha,undo:Cs,redo:ma,openReview:si,closeReview:ga,mobileCancel:va,applyModeLabel:z,applyClass:he,compactValue:Vk,formatValue:jk,structuredApplyCopy:re,fieldId:ye,fieldInputId:os,focusField:cs,fetchConfig:ge,saveConfig:ai,restartOdin:ba,restartLater:Br,reviewPendingRestart:ll}}},Zk=/^\d{15,25}$/;function Am(e){return String((e==null?void 0:e.display_name)||(e==null?void 0:e.username)||(e==null?void 0:e.id)||"Unknown user")}const Rm={props:{members:{type:Array,default:()=>[]},excludedIds:{type:Array,default:()=>[]},placeholder:{type:String,default:"Search Discord users…"},ariaLabel:{type:String,default:"Search Discord users"},optionsId:{type:String,required:!0},autofocus:{type:Boolean,default:!1}},emits:["select"],template:` + `,setup(){const e=h(null),t=h(null),s=h(!0),n=h(null),a=h(!1),i=h(null),l=h(null),r=h(null),o=h(!1),c=h(!1),d=h(null),u=h(""),f=h("all"),p=h(Kk()),b=h(Gk()),y=h({}),E=h({}),I=h(""),x=h({}),m=h({}),_=h([]),S=h([]),g=h(!1),w=h(!1),T=h(!1);let C=null,M=null,H={path:null,at:0},P=0;const R=J(()=>{var v;return(((v=t.value)==null?void 0:v.fields)||[]).filter(D=>!io.has(D.path.split(".")[0])&&!Mu(D.path))}),j=J(()=>new Map(R.value.map(v=>[v.path,v]))),Q=J(()=>we.value.reduce((v,D)=>v+D.sections.length,0)),U=J(()=>R.value.length),O=J(()=>Fk),N=J(()=>_.value.length>0),Y=J(()=>S.value.length>0),we=J(()=>{if(!e.value)return[];const v=new Set(Ha.flatMap(ae=>ae.sections)),D=Ha.map(ae=>({...ae,sections:ae.sections.filter(Ne=>Object.hasOwn(e.value,Ne)&&!io.has(Ne))})).filter(ae=>ae.sections.length),B=Object.keys(e.value).filter(ae=>!v.has(ae)&&!io.has(ae));return B.length&&D.push({key:"other",label:"Other",icon:"folder",sections:B}),D}),ke=J(()=>e.value?{...e.value,...y.value}:null),ie=J(()=>{if(!e.value)return[];const v=[];for(const[D,B]of Object.entries(y.value))Em(e.value[D],B,D,v);return v.filter(D=>!Ri(D.oldVal,D.newVal)).map(D=>{const B=L(D.path);return{...D,label:(B==null?void 0:B.label)||wa(D.path.split(".").at(-1)),apply_mode:(B==null?void 0:B.apply_mode)||ue(D.path.split(".")[0])}})}),he=J(()=>ie.value.length>0),F=J(()=>ie.value.length),se=J(()=>new Set(ie.value.map(v=>v.path.split(".")[0])).size),Se=J(()=>!!u.value||f.value!=="all"),V=J(()=>{const v={...m.value};for(const D of ie.value){const B=L(D.path),ae=Ot(B,D.newVal);ae&&(v[D.path]=ae)}return v}),de=J(()=>Object.keys(V.value).length>0),ce=J(()=>e.value?(Se.value?we.value:we.value.filter(D=>D.key===p.value)).map(D=>({...D,sections:D.sections.filter(B=>K(B))})).filter(D=>D.sections.length):[]),ye=J(()=>{const v=["live_read","live_apply","live_for_new_work","restart","activation_required","legacy_control","dormant"],D=new Map(v.map(B=>[B,[]]));for(const B of ie.value){const ae=D.has(B.apply_mode)?B.apply_mode:"restart";D.get(ae).push(B)}return v.filter(B=>D.get(B).length).map(B=>({key:B,label:Gs(B),entries:D.get(B)}))}),ge=J(()=>ie.value.filter(v=>v.apply_mode==="restart").length),He=J(()=>R.value.filter(v=>v.pending_restart)),k=J(()=>He.value.length);function L(v){const D=j.value.get(v);return D?{...D,apply_details:_l([D])}:null}function $(v){const D=`${v}.`;return R.value.filter(B=>B.path===v||B.path.startsWith(D))}function ee(v){return $(v).length}function Z(v){return wa(v)}function X(v){const D=$(v);if(!D.length)return`${wa(v)} configuration.`;const B=D.find(Ue=>Ue.sensitivity==="public"&&Ue.description)||D.find(Ue=>Ue.description),ae=(B==null?void 0:B.description)||"";return ae.match(/setting for (.+)\.$/i)?`${wa(v)} settings and runtime behaviour.`:ae}function ue(v){const D=[...new Set($(v).map(B=>B.apply_mode))];return D.length===1?D[0]:D.includes("restart")?"restart":D.includes("activation_required")?"activation_required":D[0]||"restart"}function oe(v){const D=[...new Set($(v).map(B=>Gs(B.apply_mode)))];return D.length?D.length===1?D[0]:`Mixed apply behaviour: ${D.join(" · ")}`:""}function le(v){return _l($(v))}function te(v,D){return D.split(".").reduce((B,ae)=>B==null?void 0:B[ae],v)}function ne(v){const D=ke.value;return $(v).filter(B=>Mu(B.path)?!1:B.path.split(".").length<=2?!0:!B.path.includes(".*")).map(B=>({...B,key:B.path.split(".").at(-1),value:te(D,B.path),apply_details:_l([B]),editor:B.path==="agents.final_warning_iterations"?"warning-chips":null}))}function fe(v){const D=v.path.split(".");return D.length>2?D.slice(0,2).join("."):null}function ve(v){const D=new Map;for(const B of ne(v)){const ae=fe(B),Ne=ae||`${v}.__root`;D.has(Ne)||D.set(Ne,{key:Ne,path:ae,entries:[]}),D.get(Ne).entries.push(B)}return[...D.values()].map(B=>{const ae=B.entries.find(Ne=>Ne.group_description);return{...B,label:B.path?wa(B.path.split(".").at(-1)):null,description:(ae==null?void 0:ae.group_description)||null,apply_details:_l(B.entries),runtime_summaries:Oe(B.entries)}})}function Te(v){return{save:v.save_effect||(v.apply_mode==="dormant"?"Saving records this value in config.yml.":"Saving records this value and validates the section."),runtime:v.runtime_effect||{live_read:"Odin reads the saved value during current work.",live_apply:"Odin reloads this setting without a restart.",live_for_new_work:"New work uses the saved value; existing work keeps its snapshot.",restart:"Odin keeps using its startup value until a clean restart.",activation_required:"Odin keeps the current behavior until you enable this feature separately.",legacy_control:"Odin keeps the existing compatibility behavior until you apply this choice.",dormant:"This version of Odin does not use the saved value. Restarting will not activate it."}[v.apply_mode]||"Effective runtime state is not currently observable."}}function Oe(v){const D=new Map;for(const B of v){const ae=Te(B),Ne=`${B.apply_mode}|${ae.save}|${ae.runtime}`;D.has(Ne)||D.set(Ne,{key:Ne,label:Gs(B.apply_mode),save:ae.save,runtime:ae.runtime})}return[...D.values()]}function Le(v){if(De(v))return v.runtime_effect||v.activation_policy||"";if(v.apply_mode==="activation_required"){const D=v.activation_policy||v.runtime_effect;return D?`Not active after saving. No activation control exists in this release. ${D}`:"Not active after saving; no activation control exists in this release."}return""}function De(v){return v.action_available===!0&&!!(v.action_label&&v.action_endpoint)}async function Be(v){if(De(v))try{if(Pe(v.path))throw new Error("Save this setting before applying its action.");const D=String(v.action_method||"POST").toLowerCase(),B={post:G.post.bind(G),put:G.put.bind(G),delete:G.del.bind(G)}[D];if(!B)throw new Error("Unsupported configuration action");await B(v.action_endpoint,v.action_body||void 0),await me(),Cs("success",`${v.action_label} completed.`)}catch(D){Cs("error",D.message||`${v.action_label} failed`)}}function qe(v,D){return[v.label,v.path,v.description,...v.aliases||[]].filter(Boolean).join(" ").toLowerCase().includes(D)}function ct(v){const D=u.value.trim().toLowerCase();return D?$(v).filter(B=>qe(B,D)):[]}function K(v){const D=$(v);if(f.value!=="all"&&!D.some(ae=>ae.apply_state===f.value))return!1;const B=u.value.trim().toLowerCase();return!B||`${Z(v)} ${v}`.toLowerCase().includes(B)?!0:D.some(ae=>qe(ae,B))}function xe(v,D){return $(v).filter(B=>B.apply_state===D).length}function Ce(v){return v==="all"?U.value:R.value.filter(D=>D.apply_state===v).length}function Re(v){const D=v.sections.flatMap(B=>$(B));return{fields:D.length,modified:ie.value.filter(B=>v.sections.includes(B.path.split(".")[0])).length,pending_restart:D.filter(B=>B.apply_state==="pending_restart").length,invalid:D.filter(B=>B.apply_state==="invalid").length,dormant:D.filter(B=>B.apply_state==="dormant").length}}function Ve(v){var D;return Object.hasOwn(y.value,v)&&!Ri((D=e.value)==null?void 0:D[v],y.value[v])}function Pe(v){return ie.value.some(D=>D.path===v||D.path.startsWith(`${v}.`))}function pt(v){p.value=v,u.value="",f.value="all";try{localStorage.setItem(Tm,v)}catch{}}function ls(v){f.value=v}function Ps(){u.value="",f.value="all"}function nn(v){var D;return((D=we.value.find(B=>B.sections.includes(v)))==null?void 0:D.sections)||[]}function Ss(v){const D=nn(v),B=D.find(ae=>b.value[ae]===!0);return B||D.find(ae=>b.value[ae]!==!1)||null}function Fs(v){return u.value&&!T.value&&K(v)?!0:T.value?Ss(v)===v:Object.hasOwn(b.value,v)?b.value[v]===!0:!0}function Mt(v){const D=!Fs(v);if(T.value){const B={...b.value};for(const ae of nn(v))B[ae]===!0&&(B[ae]=!1);B[v]=D,b.value=B;return}b.value={...b.value,[v]:D}}function Yt(){_.value.push(Zn(y.value)),_.value.length>Hk&&_.value.shift(),S.value=[]}function $s(){he.value&&(Yt(),y.value={},m.value={},g.value=!1)}function Bs(v,D=!1){const B=Date.now();if(D&&H.path===v&&B-H.atNe-ae);I.value="",zt(v,B)}function q(v,D){zt(v,(v.value||[]).filter(B=>B!==D))}function re(v){return v.apply_mode==="live_read"?"Odin reads the saved file value on next use.":v.apply_mode==="live_for_new_work"?"New work uses the saved file value.":v.apply_mode==="live_apply"?v.apply_handler?`Apply the saved value through ${v.apply_handler}.`:"Apply it through its dedicated owner page or endpoint.":v.apply_mode==="restart"?"Restart Odin for the saved collection to take effect.":v.apply_mode==="activation_required"?"Saving does not enable it. No activation control exists in this release.":v.apply_mode==="dormant"?"This release does not use the saved collection.":"Follow the runtime details shown for this setting."}function Ee(v){return v.type==="array"&&Array.isArray(v.value)&&!v.structured_container&&!v.structured_container_child&&v.sensitivity==="public"&&v.value.every(D=>["string","number","boolean"].includes(typeof D))}function Ze(v){const D=String(x.value[v.path]??"").trim();if(!D)return;const B=[...new Set([...v.value||[],D])];x.value={...x.value,[v.path]:""},zt(v,B)}function lt(v,D){zt(v,(v.value||[]).filter(B=>B!==D))}function Ot(v,D){var ae;if(!v)return null;if((ae=v.enum)!=null&&ae.length&&!v.enum.includes(D))return`Choose one of: ${v.enum.join(", ")}`;if(v.path==="agents.final_warning_iterations"&&(!Array.isArray(D)||!D.length))return"Add at least one warning threshold.";const B=v.constraints||{};if((v.type==="integer"||v.type==="number")&&typeof D=="number"){if(B.minimum!==void 0&&DB.maximum)return`Must be at most ${B.maximum}${v.unit?` ${v.unit}`:""}`}return null}function Pt(v){return V.value[v.path]||null}function ma(v){const D=`${v}.`;return Object.keys(V.value).some(B=>B===v||B.startsWith(D))}function Ts(){_.value.length&&(S.value.push(Zn(y.value)),y.value=_.value.pop(),m.value={},E.value={},H={path:null,at:0})}function ga(){S.value.length&&(_.value.push(Zn(y.value)),y.value=S.value.pop(),m.value={},E.value={},H={path:null,at:0})}function ni(){!he.value||de.value||(g.value=!0,w.value=!1)}function va(){g.value=!1}function ba(){$s()}function Gs(v){return Bk[v]||wa(v||"unknown")}function z(v){return`apply-${String(v||"unknown").replaceAll("_","-")}`}function pe(v){return`cfgc-field-${v.replace(/[^a-zA-Z0-9_-]/g,"-")}`}function _e(v){return`${pe(v)}-input`}function Nt(v){const D=document.getElementById(pe(v))||document.getElementById(pe(v.split(".").slice(0,2).join(".")));D==null||D.scrollIntoView({behavior:"smooth",block:"center"})}function Cs(v,D){l.value={type:v,message:D},window.setTimeout(()=>{var B;((B=l.value)==null?void 0:B.message)===D&&(l.value=null)},3500)}function jn(){o.value=!1,f.value="pending_restart",u.value="";const v=$k(n.value);v&&(v.scrollTop=0)}function Br(){o.value=!1}function ai(v=1800){M&&window.clearTimeout(M),M=window.setTimeout(rl,v)}async function rl(){if(c.value){if(P+=1,P>45){c.value=!1,d.value="Odin did not return with the new startup settings within 90 seconds.";return}try{if(t.value=await lo(),k.value===0){c.value=!1,d.value=null,Cs("success","Odin restarted and the saved startup settings are active.");return}}catch{}ai(2e3)}}async function ya(){if(!c.value){d.value=null;try{await G.post("/api/restart",{}),c.value=!0,P=0,o.value=!1,ai()}catch(v){d.value=v.message||"Odin could not schedule a restart."}}}async function ii(){if(!(!he.value||de.value||a.value)){a.value=!0;try{const v=qk(e.value,y.value),D=await G.put("/api/config",v);e.value=D,y.value={},_.value=[],S.value=[],m.value={},g.value=!1;try{t.value=await lo(),r.value=null,o.value=k.value>0,Cs("success",k.value?`Configuration saved. ${k.value} setting${k.value===1?"":"s"} still use startup values.`:"Configuration saved. Apply status has been refreshed.")}catch(B){r.value=B.message||"Unknown metadata error.",Cs("error",`Configuration saved, but apply status could not be refreshed: ${r.value}`)}}catch(v){Cs("error",v.message||"Configuration could not be saved")}finally{a.value=!1}}}async function me(){var v,D;if(!he.value){s.value=!0,i.value=null;try{const B=await G.get("/api/config"),ae=await lo();e.value=B,t.value=ae,r.value=null;const Ne=we.value;if(Ne.some(Ue=>Ue.key===p.value)||(p.value=((v=Ne[0])==null?void 0:v.key)||Ha[0].key),T.value){const et=(((D=Ne.find(Vt=>Vt.key===p.value))==null?void 0:D.sections)||[]).find(Vt=>b.value[Vt]===!0);b.value=et?{...b.value,[et]:!0}:{}}}catch(B){i.value=B.message||"Unknown configuration error"}finally{s.value=!1}}}function A(v){if(g.value||!(v.ctrlKey||v.metaKey))return;const D=v.target;D instanceof HTMLElement&&(D.matches("input, textarea, select")||D.isContentEditable)||(!v.shiftKey&&v.key.toLowerCase()==="z"?(v.preventDefault(),Ts()):(v.key.toLowerCase()==="y"||v.shiftKey&&v.key.toLowerCase()==="z")&&(v.preventDefault(),ga()))}function W(v){T.value=v.matches}return ns(b,v=>{try{localStorage.setItem(Sm,JSON.stringify(v))}catch{}},{deep:!0}),We(()=>{var v;me(),document.addEventListener("keydown",A),C=window.matchMedia("(max-width: 760px)"),W(C),(v=C.addEventListener)==null||v.call(C,"change",W)}),xt(()=>{var v;document.removeEventListener("keydown",A),(v=C==null?void 0:C.removeEventListener)==null||v.call(C,"change",W),M&&window.clearTimeout(M)}),{config:e,meta:t,loading:s,saving:a,error:i,toast:l,metaRefreshError:r,restartPromptOpen:o,restartScheduled:c,restartError:d,configMain:n,searchQuery:u,healthFilter:f,activeCategory:p,reviewOpen:g,mobileOverflowOpen:w,warningThresholdInput:I,arrayInputs:x,healthFilters:O,visibleCategories:we,displayGroups:ce,reviewGroups:ye,sectionCount:Q,fieldCount:U,hasChanges:he,changeCount:F,changedSectionCount:se,hasDraftErrors:de,canUndo:N,canRedo:Y,globalFilterActive:Se,reviewRestartCount:ge,pendingRestartCount:k,pendingRestartFields:He,healthCount:Ce,categoryStats:Re,selectCategory:pt,selectHealthFilter:ls,clearFilters:Ps,sectionLabel:Z,sectionDescription:X,sectionFieldCount:ee,sectionHealthCount:xe,sectionApplySummary:oe,sectionApplyDetails:le,sectionEntries:ne,fieldGroups:ve,sectionSearchHits:ct,fieldRuntimeCopy:Te,fieldSpecificRuntimeNote:Le,hasHonestAction:De,runFieldAction:Be,sectionChanged:Ve,fieldChanged:Pe,isSectionExpanded:Fs,toggleSection:Mt,discardAllDrafts:$s,setFieldValue:zt,setNumberFieldValue:Ye,numberInputValue:os,beginInputEdit:Vn,endTextInputEdit:Ct,endInputEdit:rs,addWarningThreshold:gs,removeWarningThreshold:q,isScalarArray:Ee,addScalarArrayItem:Ze,removeScalarArrayItem:lt,fieldError:Pt,sectionHasErrors:ma,undo:Ts,redo:ga,openReview:ni,closeReview:va,mobileCancel:ba,applyModeLabel:Gs,applyClass:z,compactValue:Vk,formatValue:jk,structuredApplyCopy:re,fieldId:pe,fieldInputId:_e,focusField:Nt,fetchConfig:me,saveConfig:ii,restartOdin:ya,restartLater:Br,reviewPendingRestart:jn}}},Zk=/^\d{15,25}$/;function Am(e){return String((e==null?void 0:e.display_name)||(e==null?void 0:e.username)||(e==null?void 0:e.id)||"Unknown user")}const Rm={props:{members:{type:Array,default:()=>[]},excludedIds:{type:Array,default:()=>[]},placeholder:{type:String,default:"Search Discord users…"},ariaLabel:{type:String,default:"Search Discord users"},optionsId:{type:String,required:!0},autofocus:{type:Boolean,default:!1}},emits:["select"],template:`
t in e?Gm(e,t,{enumerable:!0,config
- `,setup(e,{emit:t}){const s=h(""),n=h(!1),a=h(0),i=h(null),l=J(()=>new Set((e.excludedIds||[]).map(String))),r=J(()=>{const S=s.value.toLowerCase().trim();return(e.members||[]).filter(g=>l.value.has(String(g.id))?!1:S?u(g).toLowerCase().includes(S)||String(g.username||"").toLowerCase().includes(S)||String(g.id).includes(S):!0)}),o=J(()=>{const S=s.value.trim();return r.value.length===0&&Zk.test(S)&&!l.value.has(S)?S:""}),c=J(()=>r.value.length+(o.value?1:0)),d=J(()=>{if(n.value){if(r.value[a.value])return`${e.optionsId}-${a.value}`;if(o.value&&a.value===r.value.length)return`${e.optionsId}-raw`}});function u(S){return Am(S)}function f(){n.value=!0,a.value=0}function p(){f()}function b(){const S=Math.max(c.value-1,0);a.value=Math.min(a.value+1,S)}function y(){a.value=Math.max(a.value-1,0)}function E(){const S=r.value[a.value];S?I(S):o.value&&a.value===r.value.length&&x(o.value)}function I(S){x(String(S.id))}function x(S){t("select",S),s.value="",n.value=!1,a.value=0}function m(){n.value=!1}function _(){setTimeout(m,150)}return We(()=>{e.autofocus&&It(()=>{var S;return(S=i.value)==null?void 0:S.focus()})}),{query:s,open:n,highlightedIndex:a,input:i,filteredMembers:r,rawId:o,activeOptionId:d,memberName:u,openOptions:f,onInput:p,highlightNext:b,highlightPrevious:y,selectHighlighted:E,selectMember:I,selectId:x,closeOptions:m,onBlur:_}}};function Pu(e,t,s){var n;return((n=e==null?void 0:e.config)==null?void 0:n[t])!=null?e.config[t]:s==null?void 0:s[t]}const Jk={components:{DiscordUserCombobox:Rm},template:` + `,setup(e,{emit:t}){const s=h(""),n=h(!1),a=h(0),i=h(null),l=J(()=>new Set((e.excludedIds||[]).map(String))),r=J(()=>{const S=s.value.toLowerCase().trim();return(e.members||[]).filter(g=>l.value.has(String(g.id))?!1:S?u(g).toLowerCase().includes(S)||String(g.username||"").toLowerCase().includes(S)||String(g.id).includes(S):!0)}),o=J(()=>{const S=s.value.trim();return r.value.length===0&&Zk.test(S)&&!l.value.has(S)?S:""}),c=J(()=>r.value.length+(o.value?1:0)),d=J(()=>{if(n.value){if(r.value[a.value])return`${e.optionsId}-${a.value}`;if(o.value&&a.value===r.value.length)return`${e.optionsId}-raw`}});function u(S){return Am(S)}function f(){n.value=!0,a.value=0}function p(){f()}function b(){const S=Math.max(c.value-1,0);a.value=Math.min(a.value+1,S)}function y(){a.value=Math.max(a.value-1,0)}function E(){const S=r.value[a.value];S?I(S):o.value&&a.value===r.value.length&&x(o.value)}function I(S){x(String(S.id))}function x(S){t("select",S),s.value="",n.value=!1,a.value=0}function m(){n.value=!1}function _(){setTimeout(m,150)}return We(()=>{e.autofocus&&Rt(()=>{var S;return(S=i.value)==null?void 0:S.focus()})}),{query:s,open:n,highlightedIndex:a,input:i,filteredMembers:r,rawId:o,activeOptionId:d,memberName:u,openOptions:f,onInput:p,highlightNext:b,highlightPrevious:y,selectHighlighted:E,selectMember:I,selectId:x,closeOptions:m,onBlur:_}}};function Pu(e,t,s){var n;return((n=e==null?void 0:e.config)==null?void 0:n[t])!=null?e.config[t]:s==null?void 0:s[t]}const Jk={components:{DiscordUserCombobox:Rm},template:`

Discord Channels

@@ -4360,7 +4360,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h([]),t=h(!0),s=h(null),n=h({}),a=h(null),i=h(null),l=h(!1),r=h(null),o=h({}),c=h([]);let d=0;const u=Object.freeze([{key:"allowed_users",label:"Allowed users",description:"Absolute gate for ordinary conversational intake. Guild/channel settings cannot readmit blocked users; prefix commands use separate authorization and allowed test webhooks bypass this gate.",placeholder:"Search Discord users…",userAutocomplete:!0,fullWidth:!0},{key:"channels",label:"Allowed channels",description:"Absolute gate for ordinary conversational intake. Guild/channel settings cannot readmit blocked channels; prefix commands use separate authorization.",placeholder:"Discord channel ID",fullWidth:!0},{key:"ignore_bot_ids",label:"Ignored bot IDs",description:"Ignored unless the bot explicitly mentions Odin; the effective respond-to-bots policy still applies.",placeholder:"Search Discord users or bots…",userAutocomplete:!0,fullWidth:!0}]),f=J(()=>JSON.stringify(a.value)!==JSON.stringify(i.value)),p=J(()=>new Map(c.value.map(R=>[String(R.id),R])));function b(R){return R.config&&R.config.enabled!==void 0?R.config.enabled:!0}function y(R){return Pu(R,"require_mention",a.value)}function E(R){return Pu(R,"respond_to_bots",a.value)}function I(R){return R.config&&Object.keys(R.config).length>0}function x(R){n.value[R]=!n.value[R]}function m(R){const j=R.discord||{};return{allowed_users:[...j.allowed_users||[]],channels:[...j.channels||[]],respond_to_bots:!!j.respond_to_bots,require_mention:!!j.require_mention,ignore_bot_ids:[...j.ignore_bot_ids||[]]}}async function _({showLoading:R=!0}={}){const j=++d;R&&(t.value=!0),s.value=null;try{const Q=await K.get("/api/discord/guilds");j===d&&(e.value=Q)}catch(Q){j===d&&(s.value=Q.message)}finally{R&&j===d&&(t.value=!1)}}async function S(){t.value=!0,s.value=null;try{const[R,j,Q]=await Promise.all([K.get("/api/discord/guilds"),K.get("/api/discord/members").catch(()=>[]),K.get("/api/config")]),U=m(Q),O=f.value;a.value=U,O||(i.value=JSON.parse(JSON.stringify(U))),c.value=j,e.value=R,r.value=null}catch(R){s.value=R.message}finally{t.value=!1}}async function g(R,j,Q){try{await K.put("/api/discord/guild/"+R+"/config",{[j]:Q}),await _({showLoading:!1})}catch(U){s.value=U.message}}async function w(R,j,Q,U){try{await K.put("/api/discord/channel/"+R+"/config",{[Q]:U}),await _({showLoading:!1})}catch(O){s.value=O.message}}async function T(R,j){try{await K.put("/api/discord/channel/"+R+"/config",{clear:!0}),await _({showLoading:!1})}catch(Q){s.value=Q.message}}function C(R,j){const Q=String(j);if(!R.userAutocomplete)return Q;const U=p.value.get(Q);return U?Am(U):Q}function M(R,j=null){const Q=String(j??o.value[R]??"").trim();!Q||i.value[R].includes(Q)||(i.value[R]=[...i.value[R],Q],o.value={...o.value,[R]:""})}function H(R,j){i.value[R]=i.value[R].filter(Q=>Q!==j)}async function P(){if(!(!f.value||l.value)){l.value=!0,r.value=null;try{const j=(await K.put("/api/config",{discord:i.value})).discord||i.value;a.value={allowed_users:[...j.allowed_users||[]],channels:[...j.channels||[]],respond_to_bots:!!j.respond_to_bots,require_mention:!!j.require_mention,ignore_bot_ids:[...j.ignore_bot_ids||[]]},i.value=JSON.parse(JSON.stringify(a.value))}catch(R){r.value=R.message||"Global defaults could not be saved."}finally{l.value=!1}}}return We(S),{guilds:e,loading:t,error:s,expanded:n,globalDraft:i,globalSaving:l,globalError:r,globalArrayInputs:o,globalMembers:c,globalListEditors:u,globalChanged:f,guildEnabled:b,guildMention:y,guildBots:E,hasOverride:I,toggleGuild:x,fetchAll:S,fetchGuilds:_,setGuildConfig:g,setChannelConfig:w,clearOverride:T,globalItemLabel:C,addGlobalItem:M,removeGlobalItem:H,saveGlobalDefaults:P}}},bs=e=>e==null?e:JSON.parse(JSON.stringify(e));function Yk({applyDefault:e,applyUser:t,applyDelete:s,onDefaultConfirmed:n=()=>{},onDefaultRollback:a=()=>{},onUserConfirmed:i=()=>{},onUserRollback:l=()=>{},onUserDeleted:r=()=>{},onError:o=()=>{}}){let c=Promise.resolve(),d=0,u=0;const f=new Map;let p=null;const b=new Map;function y(g){d+=1;const w=c.then(g,g);return c=w.catch(()=>{}),w}function E(g,w){p=bs(g),b.clear();for(const[T,C]of Object.entries(w||{}))b.set(T,bs(C))}function I(g){const w=bs(g),T=++u;return y(async()=>{try{await e(bs(w)),p=bs(w),T===u&&n(bs(w))}catch(C){T===u&&(a(bs(p)),o(C,{kind:"default"}))}})}function x(g,w){const T=bs(w),C=(f.get(g)||0)+1;return f.set(g,C),y(async()=>{try{await t(g,bs(T)),b.set(g,bs(T)),C===f.get(g)&&i(g,bs(T))}catch(M){C===f.get(g)&&(l(g,bs(b.get(g)??null)),o(M,{kind:"user",uid:g}))}})}function m(g){const w=(f.get(g)||0)+1;return f.set(g,w),y(async()=>{try{await s(g),b.delete(g),w===f.get(g)&&r(g)}catch(T){w===f.get(g)&&(l(g,bs(b.get(g)??null)),o(T,{kind:"delete",uid:g}))}})}async function _(){for(;;){const g=c;if(await g,g===c)return d}}async function S(g){for(;;){const w=await _(),T=await g();if(w===d)return T}}return{seed:E,saveDefault:I,saveUser:x,deleteUser:m,whenIdle:_,readSnapshot:S,get revision(){return d}}}const Qk={components:{DiscordUserCombobox:Rm},template:` + `,setup(){const e=h([]),t=h(!0),s=h(null),n=h({}),a=h(null),i=h(null),l=h(!1),r=h(null),o=h({}),c=h([]);let d=0;const u=Object.freeze([{key:"allowed_users",label:"Allowed users",description:"Absolute gate for ordinary conversational intake. Guild/channel settings cannot readmit blocked users; prefix commands use separate authorization and allowed test webhooks bypass this gate.",placeholder:"Search Discord users…",userAutocomplete:!0,fullWidth:!0},{key:"channels",label:"Allowed channels",description:"Absolute gate for ordinary conversational intake. Guild/channel settings cannot readmit blocked channels; prefix commands use separate authorization.",placeholder:"Discord channel ID",fullWidth:!0},{key:"ignore_bot_ids",label:"Ignored bot IDs",description:"Ignored unless the bot explicitly mentions Odin; the effective respond-to-bots policy still applies.",placeholder:"Search Discord users or bots…",userAutocomplete:!0,fullWidth:!0}]),f=J(()=>JSON.stringify(a.value)!==JSON.stringify(i.value)),p=J(()=>new Map(c.value.map(R=>[String(R.id),R])));function b(R){return R.config&&R.config.enabled!==void 0?R.config.enabled:!0}function y(R){return Pu(R,"require_mention",a.value)}function E(R){return Pu(R,"respond_to_bots",a.value)}function I(R){return R.config&&Object.keys(R.config).length>0}function x(R){n.value[R]=!n.value[R]}function m(R){const j=R.discord||{};return{allowed_users:[...j.allowed_users||[]],channels:[...j.channels||[]],respond_to_bots:!!j.respond_to_bots,require_mention:!!j.require_mention,ignore_bot_ids:[...j.ignore_bot_ids||[]]}}async function _({showLoading:R=!0}={}){const j=++d;R&&(t.value=!0),s.value=null;try{const Q=await G.get("/api/discord/guilds");j===d&&(e.value=Q)}catch(Q){j===d&&(s.value=Q.message)}finally{R&&j===d&&(t.value=!1)}}async function S(){t.value=!0,s.value=null;try{const[R,j,Q]=await Promise.all([G.get("/api/discord/guilds"),G.get("/api/discord/members").catch(()=>[]),G.get("/api/config")]),U=m(Q),O=f.value;a.value=U,O||(i.value=JSON.parse(JSON.stringify(U))),c.value=j,e.value=R,r.value=null}catch(R){s.value=R.message}finally{t.value=!1}}async function g(R,j,Q){try{await G.put("/api/discord/guild/"+R+"/config",{[j]:Q}),await _({showLoading:!1})}catch(U){s.value=U.message}}async function w(R,j,Q,U){try{await G.put("/api/discord/channel/"+R+"/config",{[Q]:U}),await _({showLoading:!1})}catch(O){s.value=O.message}}async function T(R,j){try{await G.put("/api/discord/channel/"+R+"/config",{clear:!0}),await _({showLoading:!1})}catch(Q){s.value=Q.message}}function C(R,j){const Q=String(j);if(!R.userAutocomplete)return Q;const U=p.value.get(Q);return U?Am(U):Q}function M(R,j=null){const Q=String(j??o.value[R]??"").trim();!Q||i.value[R].includes(Q)||(i.value[R]=[...i.value[R],Q],o.value={...o.value,[R]:""})}function H(R,j){i.value[R]=i.value[R].filter(Q=>Q!==j)}async function P(){if(!(!f.value||l.value)){l.value=!0,r.value=null;try{const j=(await G.put("/api/config",{discord:i.value})).discord||i.value;a.value={allowed_users:[...j.allowed_users||[]],channels:[...j.channels||[]],respond_to_bots:!!j.respond_to_bots,require_mention:!!j.require_mention,ignore_bot_ids:[...j.ignore_bot_ids||[]]},i.value=JSON.parse(JSON.stringify(a.value))}catch(R){r.value=R.message||"Global defaults could not be saved."}finally{l.value=!1}}}return We(S),{guilds:e,loading:t,error:s,expanded:n,globalDraft:i,globalSaving:l,globalError:r,globalArrayInputs:o,globalMembers:c,globalListEditors:u,globalChanged:f,guildEnabled:b,guildMention:y,guildBots:E,hasOverride:I,toggleGuild:x,fetchAll:S,fetchGuilds:_,setGuildConfig:g,setChannelConfig:w,clearOverride:T,globalItemLabel:C,addGlobalItem:M,removeGlobalItem:H,saveGlobalDefaults:P}}},vs=e=>e==null?e:JSON.parse(JSON.stringify(e));function Yk({applyDefault:e,applyUser:t,applyDelete:s,onDefaultConfirmed:n=()=>{},onDefaultRollback:a=()=>{},onUserConfirmed:i=()=>{},onUserRollback:l=()=>{},onUserDeleted:r=()=>{},onError:o=()=>{}}){let c=Promise.resolve(),d=0,u=0;const f=new Map;let p=null;const b=new Map;function y(g){d+=1;const w=c.then(g,g);return c=w.catch(()=>{}),w}function E(g,w){p=vs(g),b.clear();for(const[T,C]of Object.entries(w||{}))b.set(T,vs(C))}function I(g){const w=vs(g),T=++u;return y(async()=>{try{await e(vs(w)),p=vs(w),T===u&&n(vs(w))}catch(C){T===u&&(a(vs(p)),o(C,{kind:"default"}))}})}function x(g,w){const T=vs(w),C=(f.get(g)||0)+1;return f.set(g,C),y(async()=>{try{await t(g,vs(T)),b.set(g,vs(T)),C===f.get(g)&&i(g,vs(T))}catch(M){C===f.get(g)&&(l(g,vs(b.get(g)??null)),o(M,{kind:"user",uid:g}))}})}function m(g){const w=(f.get(g)||0)+1;return f.set(g,w),y(async()=>{try{await s(g),b.delete(g),w===f.get(g)&&r(g)}catch(T){w===f.get(g)&&(l(g,vs(b.get(g)??null)),o(T,{kind:"delete",uid:g}))}})}async function _(){for(;;){const g=c;if(await g,g===c)return d}}async function S(g){for(;;){const w=await _(),T=await g();if(w===d)return T}}return{seed:E,saveDefault:I,saveUser:x,deleteUser:m,whenIdle:_,readSnapshot:S,get revision(){return d}}}const Qk={components:{DiscordUserCombobox:Rm},template:`

Host Access Control

@@ -4480,7 +4480,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h(!0),t=h(""),s=h(null),n=h([]),a=h({allowed_hosts:[],default_host:""}),i=h({}),l=h(!1),r=h([]),o=J(()=>{const g={};for(const w of r.value)g[w.id]=w;return g});function c(g){return o.value[g]||null}function d(g,w){return g?g.allowed_hosts===null||g.allowed_hosts===void 0?{allowed_hosts:[...w],default_host:g.default_host||"",allow_all:!0}:{allowed_hosts:g.allowed_hosts,default_host:g.default_host||"",allow_all:!1}:{allowed_hosts:[...w],default_host:w[0]||"",allow_all:!0}}const u=Yk({applyDefault:async g=>{const w=g.allow_all?null:g.allowed_hosts;await K.put("/api/host-access/default-policy",{allowed_hosts:w,default_host:g.default_host})},applyUser:async(g,w)=>{const T=w.allow_all?null:w.allowed_hosts;await K.put(`/api/host-access/user/${g}`,{allowed_hosts:T,default_host:w.default_host})},applyDelete:g=>K.del(`/api/host-access/user/${g}`),onDefaultConfirmed:()=>Ae.success("Default policy updated"),onDefaultRollback:g=>{g&&(a.value=g)},onUserConfirmed:g=>{const w=c(g);Ae.success(`Updated access for ${w?w.display_name:g}`)},onUserRollback:(g,w)=>{const T={...i.value};w?T[g]=w:delete T[g],i.value=T},onUserDeleted:g=>{const w={...i.value};delete w[g],i.value=w},onError:(g,w)=>{var C;const T=w.uid?` ${((C=c(w.uid))==null?void 0:C.display_name)||w.uid}`:"";Ae.error(`${g.message||"Failed to save"} — reverted${T}`)}});let f=0;async function p(){const g=++f;e.value=!0,t.value="";try{const w=await u.readSnapshot(()=>K.get("/api/host-access"));if(g!==f)return;s.value=w,n.value=w.available_hosts||[],a.value=d(w.default_policy,n.value);const T=w.users||{},C={};for(const[M,H]of Object.entries(T))C[M]=d(H,n.value);i.value=C,u.seed(a.value,C)}catch(w){g===f&&(t.value=w.message||"Failed to fetch host access data")}finally{g===f&&(e.value=!1)}try{const w=await K.get("/api/discord/members")||[];g===f&&(r.value=w)}catch{g===f&&(r.value=[])}}function b(){u.saveDefault(a.value)}function y(g,w){a.value.allow_all=!1,w?a.value.allowed_hosts.includes(g)||a.value.allowed_hosts.push(g):(a.value.allowed_hosts=a.value.allowed_hosts.filter(T=>T!==g),a.value.default_host===g&&(a.value.default_host=a.value.allowed_hosts[0]||"")),b()}function E(g){const w=i.value[g];w&&u.saveUser(g,w)}function I(g,w,T){const C=i.value[g];C&&(C.allow_all=!1,T?C.allowed_hosts.includes(w)||C.allowed_hosts.push(w):(C.allowed_hosts=C.allowed_hosts.filter(M=>M!==w),C.default_host===w&&(C.default_host=C.allowed_hosts[0]||"")),E(g))}function x(g,w){const T=i.value[g];T&&(T.default_host=w,E(g))}function m(){l.value=!0}function _(g){!/^\d{15,25}$/.test(g)||i.value[g]||(i.value[g]={allowed_hosts:[...n.value],default_host:n.value[0]||"",allow_all:!1},E(g),l.value=!1)}async function S(g){const w=c(g);await ks({title:"Remove user override",message:`Remove the host access override for ${w?w.display_name:g}? They will fall back to the default policy.`,confirmLabel:"Remove",danger:!0})&&(await u.deleteUser(g),i.value[g]||Ae.success(`Removed override for ${w?w.display_name:g}`))}return We(p),{loading:e,error:t,data:s,availableHosts:n,defaultPolicy:a,users:i,showAddUser:l,members:r,fetchData:p,saveDefaultPolicy:b,toggleDefaultHost:y,getMember:c,toggleUserHost:I,setUserDefault:x,openAddUser:m,addUserById:_,deleteUser:S}}},Xk={template:` + `,setup(){const e=h(!0),t=h(""),s=h(null),n=h([]),a=h({allowed_hosts:[],default_host:""}),i=h({}),l=h(!1),r=h([]),o=J(()=>{const g={};for(const w of r.value)g[w.id]=w;return g});function c(g){return o.value[g]||null}function d(g,w){return g?g.allowed_hosts===null||g.allowed_hosts===void 0?{allowed_hosts:[...w],default_host:g.default_host||"",allow_all:!0}:{allowed_hosts:g.allowed_hosts,default_host:g.default_host||"",allow_all:!1}:{allowed_hosts:[...w],default_host:w[0]||"",allow_all:!0}}const u=Yk({applyDefault:async g=>{const w=g.allow_all?null:g.allowed_hosts;await G.put("/api/host-access/default-policy",{allowed_hosts:w,default_host:g.default_host})},applyUser:async(g,w)=>{const T=w.allow_all?null:w.allowed_hosts;await G.put(`/api/host-access/user/${g}`,{allowed_hosts:T,default_host:w.default_host})},applyDelete:g=>G.del(`/api/host-access/user/${g}`),onDefaultConfirmed:()=>Ae.success("Default policy updated"),onDefaultRollback:g=>{g&&(a.value=g)},onUserConfirmed:g=>{const w=c(g);Ae.success(`Updated access for ${w?w.display_name:g}`)},onUserRollback:(g,w)=>{const T={...i.value};w?T[g]=w:delete T[g],i.value=T},onUserDeleted:g=>{const w={...i.value};delete w[g],i.value=w},onError:(g,w)=>{var C;const T=w.uid?` ${((C=c(w.uid))==null?void 0:C.display_name)||w.uid}`:"";Ae.error(`${g.message||"Failed to save"} — reverted${T}`)}});let f=0;async function p(){const g=++f;e.value=!0,t.value="";try{const w=await u.readSnapshot(()=>G.get("/api/host-access"));if(g!==f)return;s.value=w,n.value=w.available_hosts||[],a.value=d(w.default_policy,n.value);const T=w.users||{},C={};for(const[M,H]of Object.entries(T))C[M]=d(H,n.value);i.value=C,u.seed(a.value,C)}catch(w){g===f&&(t.value=w.message||"Failed to fetch host access data")}finally{g===f&&(e.value=!1)}try{const w=await G.get("/api/discord/members")||[];g===f&&(r.value=w)}catch{g===f&&(r.value=[])}}function b(){u.saveDefault(a.value)}function y(g,w){a.value.allow_all=!1,w?a.value.allowed_hosts.includes(g)||a.value.allowed_hosts.push(g):(a.value.allowed_hosts=a.value.allowed_hosts.filter(T=>T!==g),a.value.default_host===g&&(a.value.default_host=a.value.allowed_hosts[0]||"")),b()}function E(g){const w=i.value[g];w&&u.saveUser(g,w)}function I(g,w,T){const C=i.value[g];C&&(C.allow_all=!1,T?C.allowed_hosts.includes(w)||C.allowed_hosts.push(w):(C.allowed_hosts=C.allowed_hosts.filter(M=>M!==w),C.default_host===w&&(C.default_host=C.allowed_hosts[0]||"")),E(g))}function x(g,w){const T=i.value[g];T&&(T.default_host=w,E(g))}function m(){l.value=!0}function _(g){!/^\d{15,25}$/.test(g)||i.value[g]||(i.value[g]={allowed_hosts:[...n.value],default_host:n.value[0]||"",allow_all:!1},E(g),l.value=!1)}async function S(g){const w=c(g);await _s({title:"Remove user override",message:`Remove the host access override for ${w?w.display_name:g}? They will fall back to the default policy.`,confirmLabel:"Remove",danger:!0})&&(await u.deleteUser(g),i.value[g]||Ae.success(`Removed override for ${w?w.display_name:g}`))}return We(p),{loading:e,error:t,data:s,availableHosts:n,defaultPolicy:a,users:i,showAddUser:l,members:r,fetchData:p,saveDefaultPolicy:b,toggleDefaultHost:y,getMember:c,toggleUserHost:I,setUserDefault:x,openAddUser:m,addUserById:_,deleteUser:S}}},Xk={template:`

API Tokens

@@ -4723,7 +4723,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h(!0),t=h(""),s=h(null),n=h([]),a=h(!1),i=h(!1),l=h(null),r=h(null),o=h(!1),c=h({user_id:"",username:"",tier:"admin",label:"",host_mode:"default",allowed_hosts:[],default_host:"",allowed_tools_str:""}),d=h({username:"",tier:"admin",label:"",host_mode:"default",allowed_hosts:[],default_host:"",allowed_tools_str:""}),u=J(()=>c.value.host_mode==="select"?c.value.allowed_hosts:c.value.host_mode==="none"?[]:n.value),f=J(()=>d.value.host_mode==="select"?d.value.allowed_hosts:d.value.host_mode==="none"?[]:n.value);function p(T){return T==="admin"?"text-xs px-1.5 py-0.5 rounded bg-red-900/50 text-red-400":T==="user"?"text-xs px-1.5 py-0.5 rounded bg-blue-900/50 text-blue-400":"text-xs px-1.5 py-0.5 rounded bg-gray-700 text-gray-400"}async function b(){e.value=!0,t.value="";try{const T=await K.get("/api/tokens");s.value=T.tokens||[],n.value=T.available_hosts||[]}catch(T){t.value=T.message||"Failed to load tokens"}finally{e.value=!1}}function y(T){return!T||!T.trim()?[]:T.split(",").map(C=>C.trim()).filter(Boolean)}function E(T,C){const M=c.value.allowed_hosts;if(C&&!M.includes(T)&&M.push(T),!C){const H=M.indexOf(T);H>=0&&M.splice(H,1)}}function I(T,C){const M=d.value.allowed_hosts;if(C&&!M.includes(T)&&M.push(T),!C){const H=M.indexOf(T);H>=0&&M.splice(H,1)}}async function x(){var T;i.value=!0;try{const C=y(c.value.allowed_tools_str),M=c.value.host_mode,H=M==="none"?[]:M==="select"?c.value.allowed_hosts:null,P={user_id:c.value.user_id.trim(),username:c.value.username.trim()||"API",tier:c.value.tier,label:c.value.label.trim(),allowed_tools:C.length?C:[]};H!==null&&(P.allowed_hosts=H),P.default_host=c.value.default_host||"";const R=await K.post("/api/tokens",P);l.value=R.token,c.value={user_id:"",username:"",tier:"admin",label:"",host_mode:"default",allowed_hosts:[],default_host:"",allowed_tools_str:""},a.value=!1,Ae.success("Token created"),await b()}catch(C){Ae.error(((T=C.data)==null?void 0:T.error)||C.message||"Failed to create token")}finally{i.value=!1}}function m(T){r.value=T;const C=T.allowed_hosts;let M="default";C==null?M="default":Array.isArray(C)&&C.length===0?M="none":Array.isArray(C)&&(M="select"),d.value={username:T.username||"",tier:T.tier||"admin",label:T.label||"",host_mode:M,allowed_hosts:Array.isArray(C)?[...C]:[],default_host:T.default_host||"",allowed_tools_str:(T.allowed_tools||[]).join(", ")}}async function _(){var T;if(r.value){o.value=!0;try{const C=y(d.value.allowed_tools_str),M=d.value.host_mode,H={username:d.value.username,tier:d.value.tier,label:d.value.label,allowed_tools:C};M==="none"?H.allowed_hosts=[]:M==="select"?H.allowed_hosts=d.value.allowed_hosts:H.allowed_hosts=null,H.default_host=d.value.default_host||"",await K.put("/api/tokens/"+encodeURIComponent(r.value.user_id),H),r.value=null,Ae.success("Token updated"),await b()}catch(C){Ae.error(((T=C.data)==null?void 0:T.error)||C.message||"Failed to update")}finally{o.value=!1}}}async function S(T){var M;if(await ks({title:"Regenerate token",message:`Regenerate token for ${T.username||T.user_id}? The old token will stop working immediately.`,confirmLabel:"Regenerate",danger:!0}))try{const H=await K.post("/api/tokens/"+encodeURIComponent(T.user_id)+"/regenerate");l.value=H.token,Ae.success("Token regenerated")}catch(H){Ae.error(((M=H.data)==null?void 0:M.error)||H.message||"Failed to regenerate")}}async function g(T){var M;if(await ks({title:"Delete token",message:`Delete token for ${T.username||T.user_id}? This cannot be undone.`,confirmLabel:"Delete",danger:!0}))try{await K.del("/api/tokens/"+encodeURIComponent(T.user_id)),Ae.success("Token deleted"),await b()}catch(H){Ae.error(((M=H.data)==null?void 0:M.error)||H.message||"Failed to delete")}}async function w(){if(l.value)try{await navigator.clipboard.writeText(l.value),Ae.success("Copied to clipboard")}catch{Ae.error("Copy failed — select and copy manually")}}return We(b),{loading:e,error:t,tokens:s,availableHosts:n,showCreate:a,creating:i,newToken:l,editing:r,saving:o,createForm:c,editForm:d,createDefaultHostOptions:u,editDefaultHostOptions:f,fetchData:b,tierBadge:p,toggleCreateHost:E,toggleEditHost:I,createToken:x,startEdit:m,saveEdit:_,confirmRegenerate:S,confirmDelete:g,copyToken:w}}},ew=Object.freeze(["enabled","model","reasoning_effort","agent_reasoning_effort","agent_model"]),tw=Object.freeze(["request_timeout_seconds","stream_stall_timeout_seconds","retry","connection_pool","context_compression","context_budget_overrides","context_utilization"]),sw=Object.freeze(["enabled","base_url","model","max_tokens"]),nw=Object.freeze(["enabled","model","max_tokens"]);function Pr(e,t){return Object.fromEntries(t.map(s=>[s,e[s]]))}function Fu(e){return Pr(e,ew)}function $u(e){return Pr(e,tw)}function aw(e,{includeApiKey:t=!1}={}){const s=Pr(e,sw);return t&&(s.api_key=e.api_key),s}function iw(e){return{timeout:e.timeout}}function lw(e,{includeApiKey:t=!1}={}){const s=Pr(e,nw);return t&&(s.api_key=e.api_key),s}function rw(e){return{timeout:e.timeout}}function kl(e,t=500){let s=null;const n=(...a)=>{s&&clearTimeout(s),s=setTimeout(()=>{s=null,e(...a)},t)};return n.pending=()=>s!==null,n.cancel=()=>{s&&(clearTimeout(s),s=null)},n}const ow={template:` + `,setup(){const e=h(!0),t=h(""),s=h(null),n=h([]),a=h(!1),i=h(!1),l=h(null),r=h(null),o=h(!1),c=h({user_id:"",username:"",tier:"admin",label:"",host_mode:"default",allowed_hosts:[],default_host:"",allowed_tools_str:""}),d=h({username:"",tier:"admin",label:"",host_mode:"default",allowed_hosts:[],default_host:"",allowed_tools_str:""}),u=J(()=>c.value.host_mode==="select"?c.value.allowed_hosts:c.value.host_mode==="none"?[]:n.value),f=J(()=>d.value.host_mode==="select"?d.value.allowed_hosts:d.value.host_mode==="none"?[]:n.value);function p(T){return T==="admin"?"text-xs px-1.5 py-0.5 rounded bg-red-900/50 text-red-400":T==="user"?"text-xs px-1.5 py-0.5 rounded bg-blue-900/50 text-blue-400":"text-xs px-1.5 py-0.5 rounded bg-gray-700 text-gray-400"}async function b(){e.value=!0,t.value="";try{const T=await G.get("/api/tokens");s.value=T.tokens||[],n.value=T.available_hosts||[]}catch(T){t.value=T.message||"Failed to load tokens"}finally{e.value=!1}}function y(T){return!T||!T.trim()?[]:T.split(",").map(C=>C.trim()).filter(Boolean)}function E(T,C){const M=c.value.allowed_hosts;if(C&&!M.includes(T)&&M.push(T),!C){const H=M.indexOf(T);H>=0&&M.splice(H,1)}}function I(T,C){const M=d.value.allowed_hosts;if(C&&!M.includes(T)&&M.push(T),!C){const H=M.indexOf(T);H>=0&&M.splice(H,1)}}async function x(){var T;i.value=!0;try{const C=y(c.value.allowed_tools_str),M=c.value.host_mode,H=M==="none"?[]:M==="select"?c.value.allowed_hosts:null,P={user_id:c.value.user_id.trim(),username:c.value.username.trim()||"API",tier:c.value.tier,label:c.value.label.trim(),allowed_tools:C.length?C:[]};H!==null&&(P.allowed_hosts=H),P.default_host=c.value.default_host||"";const R=await G.post("/api/tokens",P);l.value=R.token,c.value={user_id:"",username:"",tier:"admin",label:"",host_mode:"default",allowed_hosts:[],default_host:"",allowed_tools_str:""},a.value=!1,Ae.success("Token created"),await b()}catch(C){Ae.error(((T=C.data)==null?void 0:T.error)||C.message||"Failed to create token")}finally{i.value=!1}}function m(T){r.value=T;const C=T.allowed_hosts;let M="default";C==null?M="default":Array.isArray(C)&&C.length===0?M="none":Array.isArray(C)&&(M="select"),d.value={username:T.username||"",tier:T.tier||"admin",label:T.label||"",host_mode:M,allowed_hosts:Array.isArray(C)?[...C]:[],default_host:T.default_host||"",allowed_tools_str:(T.allowed_tools||[]).join(", ")}}async function _(){var T;if(r.value){o.value=!0;try{const C=y(d.value.allowed_tools_str),M=d.value.host_mode,H={username:d.value.username,tier:d.value.tier,label:d.value.label,allowed_tools:C};M==="none"?H.allowed_hosts=[]:M==="select"?H.allowed_hosts=d.value.allowed_hosts:H.allowed_hosts=null,H.default_host=d.value.default_host||"",await G.put("/api/tokens/"+encodeURIComponent(r.value.user_id),H),r.value=null,Ae.success("Token updated"),await b()}catch(C){Ae.error(((T=C.data)==null?void 0:T.error)||C.message||"Failed to update")}finally{o.value=!1}}}async function S(T){var M;if(await _s({title:"Regenerate token",message:`Regenerate token for ${T.username||T.user_id}? The old token will stop working immediately.`,confirmLabel:"Regenerate",danger:!0}))try{const H=await G.post("/api/tokens/"+encodeURIComponent(T.user_id)+"/regenerate");l.value=H.token,Ae.success("Token regenerated")}catch(H){Ae.error(((M=H.data)==null?void 0:M.error)||H.message||"Failed to regenerate")}}async function g(T){var M;if(await _s({title:"Delete token",message:`Delete token for ${T.username||T.user_id}? This cannot be undone.`,confirmLabel:"Delete",danger:!0}))try{await G.del("/api/tokens/"+encodeURIComponent(T.user_id)),Ae.success("Token deleted"),await b()}catch(H){Ae.error(((M=H.data)==null?void 0:M.error)||H.message||"Failed to delete")}}async function w(){if(l.value)try{await navigator.clipboard.writeText(l.value),Ae.success("Copied to clipboard")}catch{Ae.error("Copy failed — select and copy manually")}}return We(b),{loading:e,error:t,tokens:s,availableHosts:n,showCreate:a,creating:i,newToken:l,editing:r,saving:o,createForm:c,editForm:d,createDefaultHostOptions:u,editDefaultHostOptions:f,fetchData:b,tierBadge:p,toggleCreateHost:E,toggleEditHost:I,createToken:x,startEdit:m,saveEdit:_,confirmRegenerate:S,confirmDelete:g,copyToken:w}}},ew=Object.freeze(["enabled","model","reasoning_effort","agent_reasoning_effort","agent_model"]),tw=Object.freeze(["request_timeout_seconds","stream_stall_timeout_seconds","retry","connection_pool","context_compression","context_budget_overrides","context_utilization"]),sw=Object.freeze(["enabled","base_url","model","max_tokens"]),nw=Object.freeze(["enabled","model","max_tokens"]);function Pr(e,t){return Object.fromEntries(t.map(s=>[s,e[s]]))}function Fu(e){return Pr(e,ew)}function $u(e){return Pr(e,tw)}function aw(e,{includeApiKey:t=!1}={}){const s=Pr(e,sw);return t&&(s.api_key=e.api_key),s}function iw(e){return{timeout:e.timeout}}function lw(e,{includeApiKey:t=!1}={}){const s=Pr(e,nw);return t&&(s.api_key=e.api_key),s}function rw(e){return{timeout:e.timeout}}function kl(e,t=500){let s=null;const n=(...a)=>{s&&clearTimeout(s),s=setTimeout(()=>{s=null,e(...a)},t)};return n.pending=()=>s!==null,n.cancel=()=>{s&&(clearTimeout(s),s=null)},n}const ow={template:`
@@ -4933,7 +4933,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
Context compressionLong-conversation compaction

- Saved values need a restart. This process still uses compression {{ llmStatus.codex.effective_context_compression?.enabled ? 'on' : 'off' }}, {{ Number(llmStatus.codex.effective_context_compression?.max_context_chars || 0).toLocaleString() }} characters, and {{ llmStatus.codex.effective_context_compression?.keep_recent_iterations }} recent iterations. + Saved values need a restart. This process still uses compression {{ llmStatus.codex.effective_context_compression?.enabled ? 'on' : 'off' }}, {{ formatContextCeiling(llmStatus.codex.effective_context_compression?.max_context_chars) }}, and {{ llmStatus.codex.effective_context_compression?.keep_recent_iterations }} recent iterations.

Saved values match this process. Future changes take effect after restart. @@ -5280,7 +5280,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config

- `,setup(){const e=h(!0),t=h(null),s=h("codex"),n=h({enabled:!1,model:"gpt-5.6-sol",reasoning_effort:"xhigh",agent_reasoning_effort:"auto",agent_model:"auto",request_timeout_seconds:3600,stream_stall_timeout_seconds:180,retry:{max_retries:3,base_delay:1,max_delay:30},connection_pool:{max_connections:10,keepalive_timeout:30},context_compression:{enabled:!0,max_context_chars:null,keep_recent_iterations:30},context_budget_overrides:{},context_utilization:60}),a=["gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.5"],i=J(()=>{const z=n.value.model;return z&&!a.includes(z)?[z,...a]:a}),l=J(()=>{const z=n.value.agent_model;return z&&z!=="auto"&&!a.includes(z)?[z,...a]:a}),r=["gpt-5.5","gpt-5.4","gpt-5.4-mini"],o=J(()=>!r.includes(n.value.model)&&!(r.includes(n.value.agent_model)&&n.value.agent_reasoning_effort==="")),c=J(()=>{const z=n.value.agent_model;return z==="auto"?!0:!r.includes(z||n.value.model)}),d=J(()=>{const z=n.value.agent_reasoning_effort;return z==="auto"?!1:(z||n.value.reasoning_effort)==="max"}),u=z=>r.includes(z)&&(n.value.reasoning_effort==="max"||n.value.agent_model===""&&d.value),f=z=>r.includes(z)&&d.value,p=h({enabled:!1,model:"gpt-5.6-luna"}),b=h({unavailable_reason:null}),y=J(()=>{const z=p.value.model;return z&&!a.includes(z)?[z,...a]:a});function E(z){const he=z.target.value;p.value.enabled=he!=="",he!==""&&(p.value.model=he),Et()}const I=h(!1),x=h({codex:!1,ollama:!1,kimi:!1}),m=h(null),_=h(!1),S=h(""),g=h(null),w=h(!1);let T=0;const C=J(()=>{var z;return Object.entries(((z=m.value)==null?void 0:z.models)||{}).map(([he,ye])=>{var os,cs,Es;return{model:he,floor:ye.floor,override:ye.override,effectiveBudget:(os=ye.effective)==null?void 0:os.effective_budget,configuredPrimaryChars:(cs=ye.configured)==null?void 0:cs.primary_chars,primaryChars:(Es=ye.effective)==null?void 0:Es.primary_chars,provenance:ye.provenance,clampExpiresAt:ye.clamp_expires_at}})}),M=J(()=>{var z;return((z=m.value)==null?void 0:z.clamps)||[]}),H=J(()=>{var z,he;return((he=(z=m.value)==null?void 0:z.models)==null?void 0:he[n.value.model])||null}),P=h({enabled:!1,base_url:"",model:"",api_key:"",max_tokens:4096,timeout:300}),R=h({enabled:!1,api_key:"",model:"",max_tokens:4096,timeout:300}),j=h(!1),Q=h(!1),U=h(!1),O=h(!1),N=h(!1),Y=h(!1),we=h(!1),ke=h({configured:!1}),ie=h([]),pe=h(""),F=h(!1),se=h(!1),Se=h({configured:!1}),V=h([]),de=h(""),ce=h(!1),_e=h(!1),ve=h(!0),He=h(""),k=h({configured:!1,accounts:[]}),L=h(null),$=h(null),ee=h(""),Z=h(null),X=h(!1),ue=h(null),oe=h(null),le=h("");let te=null;function ne(z,he="success"){Ae(z,he==="error"?"error":"success")}function fe(z){if(!z)return"?";const he=z/(1024*1024*1024);return he>=1?he.toFixed(1)+" GB":(z/(1024*1024)).toFixed(0)+" MB"}function be(z){return Number.isFinite(Number(z))?Number(z).toLocaleString():"—"}function Te(z){const he=new Date(z);return Number.isNaN(he.getTime())?"unknown":he.toLocaleString([],{dateStyle:"medium",timeStyle:"short"})}function Ie(z){return typeof z=="string"&&z.length>12?z.slice(0,8)+"…"+z.slice(-4):z}function Le(z){return z==="temporary learned clamp"?"is-clamp":z==="override"?"is-override":"is-built-in"}function De(z){const he=n.value.context_budget_overrides[z.model];return z.floor!=null&&Number.isFinite(Number(he))&&Number(he)>z.floor}function Be(z,he){const ye={...n.value.context_budget_overrides};he.target.value===""?delete ye[z]:ye[z]=Number(he.target.value),n.value.context_budget_overrides=ye,w.value=!0}function qe(z){n.value.context_utilization=z.target.value===""?"":Number(z.target.value),w.value=!0}function ct(z){const he={...n.value.context_budget_overrides};delete he[z],n.value.context_budget_overrides=he,w.value=!0}async function G(){e.value=!0,await Promise.all([me(),Ne(),$s(),Pe(),Ce()]),e.value=!1}async function me({preserveBasic:z=!1,preserveAdvanced:he=!1}={}){try{const ye=await K.get("/api/llm/status");t.value=ye,s.value=ye.active_provider||"codex",ye.codex&&!Us.pending()&&(z||(n.value.enabled=ye.codex.enabled,n.value.model=ye.codex.model||"gpt-5.6-sol",n.value.reasoning_effort=ye.codex.reasoning_effort||"medium",n.value.agent_reasoning_effort=ye.codex.agent_reasoning_effort||"",n.value.agent_model=ye.codex.agent_model||""),he||(n.value.request_timeout_seconds=ye.codex.request_timeout_seconds??n.value.request_timeout_seconds,n.value.stream_stall_timeout_seconds=ye.codex.stream_stall_timeout_seconds??n.value.stream_stall_timeout_seconds,n.value.retry={...n.value.retry,...ye.codex.retry||{}},n.value.connection_pool={...n.value.connection_pool,...ye.codex.connection_pool||{}},n.value.context_compression={...n.value.context_compression,...ye.codex.context_compression||{}},!w.value&&!U.value&&(n.value.context_budget_overrides={...ye.codex.context_budget_overrides||{}},n.value.context_utilization=ye.codex.context_utilization??n.value.context_utilization))),ye.ollama&&!ls.pending()&&(z||(P.value.enabled=ye.ollama.enabled,P.value.base_url=ye.ollama.base_url||"",P.value.model=ye.ollama.model||"",P.value.max_tokens=ye.ollama.max_tokens||4096),he||(P.value.timeout=ye.ollama.timeout??P.value.timeout)),ye.kimi&&!rs.pending()&&(z||(R.value.enabled=ye.kimi.enabled,R.value.model=ye.kimi.model||"",R.value.max_tokens=ye.kimi.max_tokens||4096),he||(R.value.timeout=ye.kimi.timeout??R.value.timeout)),ye.auxiliary&&(b.value=ye.auxiliary,Et.pending()||(p.value.enabled=ye.auxiliary.enabled,p.value.model=ye.auxiliary.model||"gpt-5.6-luna"))}catch{t.value={active_provider:"codex",codex:{configured:!1},ollama:{configured:!1},kimi:{configured:!1}}}}async function Ce(){const z=++T;_.value=!0,S.value="";try{const he=await K.get("/api/context/windows");if(z!==T)return;m.value=he,!U.value&&!w.value&&(n.value.context_budget_overrides=Object.fromEntries(Object.entries(he.models||{}).filter(([,ye])=>ye.override!=null).map(([ye,os])=>[ye,os.override])),n.value.context_utilization=he.utilization??n.value.context_utilization)}catch(he){z===T&&(S.value=he.message||"Failed to load context budgets")}finally{z===T&&(_.value=!1)}}async function Ne(){try{if(ke.value=await K.get("/api/ollama/status"),ke.value.model&&(pe.value=ke.value.model),ke.value.configured)try{const z=await K.get("/api/ollama/models");ie.value=z.models||[]}catch{ie.value=[]}else if(P.value.base_url)try{const z=await K.post("/api/ollama/probe-models",{base_url:P.value.base_url});ie.value=z.models||[]}catch{ie.value=[]}}catch{ke.value={configured:!1}}}async function Pe(){ve.value=!0,He.value="";try{k.value=await K.get("/api/codex/status")}catch(z){He.value=z.message||"Failed to fetch Codex status"}finally{ve.value=!1}}async function Ve(){const z=t.value?t.value.active_provider:"codex";we.value=!0;try{const he=await K.post("/api/llm/switch",{provider:s.value});he.error?(s.value=z,ne(he.error,"error")):(ne("Switched to "+s.value+" ("+he.model+")"),await G())}catch(he){s.value=z,ne(he.message||"Switch failed","error")}finally{we.value=!1}}async function pt(){F.value=!0;try{const z=await K.post("/api/ollama/reload");ne(z.configured?"Ollama reloaded":z.reason||"Ollama not configured",z.configured?"success":"error"),await G()}catch(z){ne(z.message||"Reload failed","error")}finally{F.value=!1}}async function as(){se.value=!0;try{await K.post("/api/ollama/model",{model:pe.value}),ne("Model set to "+pe.value),await G()}catch(z){ne(z.message||"Failed","error")}finally{se.value=!1}}async function Fs(){const z=P.value.base_url;if(!z){ne("Enter a base URL first","error");return}Y.value=!0;try{const he=await K.post("/api/ollama/probe-models",{base_url:z});ie.value=he.models||[],ie.value.length?(ne(ie.value.length+" model(s) found"),!P.value.model&&ie.value.length&&(P.value.model=ie.value[0].name)):ne("No models found at "+z,"error")}catch(he){ne(he.message||"Could not reach Ollama","error")}finally{Y.value=!1}}async function $s(){try{if(Se.value=await K.get("/api/kimi/status"),Se.value.model&&(de.value=Se.value.model),Se.value.configured)try{const z=await K.get("/api/kimi/models");V.value=z.models||[]}catch{V.value=[]}}catch{Se.value={configured:!1}}}async function Gs(){ce.value=!0;try{const z=await K.post("/api/kimi/reload");ne(z.configured?"Kimi reloaded":z.reason||"Kimi not configured",z.configured?"success":"error"),await G()}catch(z){ne(z.message||"Reload failed","error")}finally{ce.value=!1}}async function Bs(){_e.value=!0;try{await K.post("/api/kimi/model",{model:de.value}),ne("Model set to "+de.value),await G()}catch(z){ne(z.message||"Failed","error")}finally{_e.value=!1}}async function Ct(){if(U.value){Us();return}U.value=!0;const z=Fu(n.value);try{await K.put("/api/llm/codex/config",z),ne("Codex config saved"),await Promise.all([me({preserveBasic:!0,preserveAdvanced:!0}),Pe()])}catch(he){ne(he.message||"Failed","error");const ye=JSON.stringify(Fu(n.value))!==JSON.stringify(z);await Promise.all([me({preserveBasic:ye,preserveAdvanced:!0}),Pe()])}finally{U.value=!1}}async function is(){if(U.value)return;U.value=!0;const z=$u(n.value);try{await K.put("/api/llm/codex/config",z),JSON.stringify({context_budget_overrides:n.value.context_budget_overrides,context_utilization:n.value.context_utilization})===JSON.stringify({context_budget_overrides:z.context_budget_overrides,context_utilization:z.context_utilization})&&(w.value=!1),ne("Codex advanced settings saved"),await Promise.all([me({preserveBasic:!0,preserveAdvanced:!0}),Pe(),Ce()])}catch(he){ne(he.message||"Failed","error");const ye=JSON.stringify($u(n.value))!==JSON.stringify(z);await Promise.all([me({preserveBasic:!0,preserveAdvanced:ye}),Pe(),Ce()])}finally{U.value=!1}}async function Ts(){if(O.value){ls();return}O.value=!0;try{const z=j.value?P.value.api_key:null,he=aw(P.value,{includeApiKey:z!==null});await K.put("/api/llm/ollama/config",he),ne("Ollama config saved"),z!==null&&P.value.api_key===z&&(P.value.api_key="",j.value=!1),await Promise.all([me({preserveBasic:!0,preserveAdvanced:!0}),Ne()])}catch(z){ne(z.message||"Failed","error")}finally{O.value=!1}}async function Ks(){if(!O.value){O.value=!0;try{await K.put("/api/llm/ollama/config",iw(P.value)),ne("Ollama timeout saved"),await Promise.all([me({preserveBasic:!0,preserveAdvanced:!0}),Ne()])}catch(z){ne(z.message||"Failed","error")}finally{O.value=!1}}}async function ln(){if(N.value){rs();return}N.value=!0;try{const z=Q.value?R.value.api_key:null,he=lw(R.value,{includeApiKey:z!==null});await K.put("/api/llm/kimi/config",he),ne("Kimi config saved"),z!==null&&R.value.api_key===z&&(R.value.api_key="",Q.value=!1),await Promise.all([me({preserveBasic:!0,preserveAdvanced:!0}),$s()])}catch(z){ne(z.message||"Failed","error")}finally{N.value=!1}}async function Ws(){if(!N.value){N.value=!0;try{await K.put("/api/llm/kimi/config",rw(R.value)),ne("Kimi timeout saved"),await Promise.all([me({preserveBasic:!0,preserveAdvanced:!0}),$s()])}catch(z){ne(z.message||"Failed","error")}finally{N.value=!1}}}async function Zt(){if(I.value){Et();return}I.value=!0;try{await K.put("/api/llm/auxiliary/config",p.value),ne("Auxiliary config saved"),await me()}catch(z){ne(z.message||"Failed","error"),await me()}finally{I.value=!1}}const Us=kl(Ct),Et=kl(Zt),ls=kl(Ts),rs=kl(ln),at=()=>(Us.cancel(),Ct()),vs=()=>(ls.cancel(),Ts()),q=()=>(rs.cancel(),ln()),re=()=>is(),Ee=()=>Ks(),Ze=()=>Ws();async function lt(z){const he=z.account_key+":"+z.model;g.value=he;try{const ye=await K.post("/api/context/windows/clear",{account_key:z.account_key,model:z.model});ne(ye.cleared?"Temporary clamp cleared":"Clamp was already inactive"),await Ce()}catch(ye){ne(ye.message||"Failed to clear clamp","error"),await Ce()}finally{g.value=null}}async function Nt(z){try{await K.post("/api/codex/account/"+z+"/activate"),ne("Active account switched"),await Pe()}catch(he){ne(he.message||"Failed","error")}}async function Mt(z){L.value=z;try{await K.post("/api/codex/account/"+z+"/refresh"),ne("Token refreshed"),await Pe()}catch(he){ne(he.message||"Refresh failed","error")}finally{L.value=null}}function ha(z,he){$.value=z,ee.value=he||""}async function Cs(z){try{await K.put("/api/codex/account/"+z+"/label",{label:ee.value}),ne("Label updated"),$.value=null,await Pe()}catch(he){ne(he.message||"Failed","error")}}async function ma(z,he){if(await ks({title:"Delete Codex account",message:`Delete ${he||"account #"+(z+1)}? The pool will reload without it.`,confirmLabel:"Delete",danger:!0}))try{await K.del("/api/codex/account/"+z),ne("Deleted. Pool reloaded."),await Pe()}catch(os){ne(os.message||"Failed","error")}}async function si(){X.value=!0;try{const z=await K.post("/api/codex/device-code");ue.value=z,Z.value="pending",ga(z)}catch(z){ne(z.message||"Failed","error")}finally{X.value=!1}}async function ga(z){te={cancelled:!1};const he=te;try{const ye=await K.post("/api/codex/device-poll",{device_auth_id:z.device_auth_id,user_code:z.user_code,interval:z.interval});if(he.cancelled)return;oe.value=ye,Z.value="success",await G()}catch(ye){if(he.cancelled)return;le.value=ye.message||"Device login failed",Z.value="error"}}function va(){te&&(te.cancelled=!0),Z.value=null,ue.value=null}return We(G),xt(()=>{te&&(te.cancelled=!0),Us.cancel(),Et.cancel(),ls.cancel(),rs.cancel()}),{loading:e,llmStatus:t,selectedProvider:s,switching:we,advancedOpen:x,codexForm:n,codexModelOptions:i,codexAgentModelOptions:l,mainMaxAllowed:o,agentMaxAllowed:c,mainModelOptionDisabled:u,agentModelOptionDisabled:f,auxForm:p,auxData:b,auxModelOptions:y,onAuxModelChange:E,savingAux:I,saveAuxConfigDebounced:Et,ollamaForm:P,kimiForm:R,savingCodex:U,savingOllama:O,savingKimi:N,probingOllama:Y,ollamaKeyDirty:j,kimiKeyDirty:Q,ollamaStatus:ke,ollamaModels:ie,ollamaSelectedModel:pe,reloading:F,settingModel:se,kimiStatus:Se,kimiModels:V,kimiSelectedModel:de,reloadingKimi:ce,settingKimiModel:_e,codexLoading:ve,codexError:He,codexData:k,refreshing:L,editingLabel:$,labelValue:ee,contextWindows:m,contextWindowsLoading:_,contextWindowsError:S,contextBudgetRows:C,activeClampRows:M,activeContextBudget:H,clearingClamp:g,contextPolicyDirty:w,deviceState:Z,deviceLoading:X,deviceInfo:ue,deviceResult:oe,deviceError:le,fetchAll:G,switchProvider:Ve,reloadOllama:pt,setOllamaModel:as,reloadKimi:Gs,setKimiModel:Bs,probeOllamaModels:Fs,saveCodexConfig:Ct,saveOllamaConfig:Ts,saveKimiConfig:ln,saveCodexAdvancedConfig:is,saveOllamaAdvancedConfig:Ks,saveKimiAdvancedConfig:Ws,saveCodexConfigDebounced:Us,saveOllamaConfigDebounced:ls,saveKimiConfigDebounced:rs,saveCodexConfigNow:at,saveOllamaConfigNow:vs,saveKimiConfigNow:q,saveCodexAdvancedConfigNow:re,saveOllamaAdvancedConfigNow:Ee,saveKimiAdvancedConfigNow:Ze,activateAccount:Nt,refreshAccount:Mt,startEditLabel:ha,saveLabel:Cs,deleteAccount:ma,startDeviceLogin:si,cancelDeviceLogin:va,formatSize:fe,fetchContextWindows:Ce,clearContextClamp:lt,setContextOverride:Be,setContextUtilization:qe,resetContextOverride:ct,overrideAboveFloor:De,formatCount:be,formatExpiry:Te,shortAccountKey:Ie,provenanceClass:Le}}},Bu={ok:"text-green-400",pass:"text-green-400",degraded:"text-yellow-400",warn:"text-yellow-400",down:"text-red-400",fail:"text-red-400",unconfigured:"text-gray-500",skipped:"text-gray-500"};function cw(e){return Bu[e]||Bu[(e||"").toLowerCase()]||"text-gray-400"}const dw={template:` + `,setup(){const e=h(!0),t=h(null),s=h("codex"),n=h({enabled:!1,model:"gpt-5.6-sol",reasoning_effort:"xhigh",agent_reasoning_effort:"auto",agent_model:"auto",request_timeout_seconds:3600,stream_stall_timeout_seconds:180,retry:{max_retries:3,base_delay:1,max_delay:30},connection_pool:{max_connections:10,keepalive_timeout:30},context_compression:{enabled:!0,max_context_chars:null,keep_recent_iterations:30},context_budget_overrides:{},context_utilization:60}),a=["gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.5"],i=J(()=>{const z=n.value.model;return z&&!a.includes(z)?[z,...a]:a}),l=J(()=>{const z=n.value.agent_model;return z&&z!=="auto"&&!a.includes(z)?[z,...a]:a}),r=["gpt-5.5","gpt-5.4","gpt-5.4-mini"],o=J(()=>!r.includes(n.value.model)&&!(r.includes(n.value.agent_model)&&n.value.agent_reasoning_effort==="")),c=J(()=>{const z=n.value.agent_model;return z==="auto"?!0:!r.includes(z||n.value.model)}),d=J(()=>{const z=n.value.agent_reasoning_effort;return z==="auto"?!1:(z||n.value.reasoning_effort)==="max"}),u=z=>r.includes(z)&&(n.value.reasoning_effort==="max"||n.value.agent_model===""&&d.value),f=z=>r.includes(z)&&d.value,p=h({enabled:!1,model:"gpt-5.6-luna"}),b=h({unavailable_reason:null}),y=J(()=>{const z=p.value.model;return z&&!a.includes(z)?[z,...a]:a});function E(z){const pe=z.target.value;p.value.enabled=pe!=="",pe!==""&&(p.value.model=pe),rs()}const I=h(!1),x=h({codex:!1,ollama:!1,kimi:!1}),m=h(null),_=h(!1),S=h(""),g=h(null),w=h(!1);let T=0;const C=J(()=>{var z;return Object.entries(((z=m.value)==null?void 0:z.models)||{}).map(([pe,_e])=>{var Nt,Cs,jn;return{model:pe,floor:_e.floor,override:_e.override,effectiveBudget:(Nt=_e.effective)==null?void 0:Nt.effective_budget,configuredPrimaryChars:(Cs=_e.configured)==null?void 0:Cs.primary_chars,primaryChars:(jn=_e.effective)==null?void 0:jn.primary_chars,provenance:_e.provenance,clampExpiresAt:_e.clamp_expires_at}})}),M=J(()=>{var z;return((z=m.value)==null?void 0:z.clamps)||[]}),H=J(()=>{var z,pe;return((pe=(z=m.value)==null?void 0:z.models)==null?void 0:pe[n.value.model])||null}),P=h({enabled:!1,base_url:"",model:"",api_key:"",max_tokens:4096,timeout:300}),R=h({enabled:!1,api_key:"",model:"",max_tokens:4096,timeout:300}),j=h(!1),Q=h(!1),U=h(!1),O=h(!1),N=h(!1),Y=h(!1),we=h(!1),ke=h({configured:!1}),ie=h([]),he=h(""),F=h(!1),se=h(!1),Se=h({configured:!1}),V=h([]),de=h(""),ce=h(!1),ye=h(!1),ge=h(!0),He=h(""),k=h({configured:!1,accounts:[]}),L=h(null),$=h(null),ee=h(""),Z=h(null),X=h(!1),ue=h(null),oe=h(null),le=h("");let te=null;function ne(z,pe="success"){Ae(z,pe==="error"?"error":"success")}function fe(z){if(!z)return"?";const pe=z/(1024*1024*1024);return pe>=1?pe.toFixed(1)+" GB":(z/(1024*1024)).toFixed(0)+" MB"}function ve(z){return Number.isFinite(Number(z))?Number(z).toLocaleString():"—"}function Te(z){return z==null?"automatic (model-derived)":Number(z).toLocaleString()+" characters"}function Oe(z){const pe=new Date(z);return Number.isNaN(pe.getTime())?"unknown":pe.toLocaleString([],{dateStyle:"medium",timeStyle:"short"})}function Le(z){return typeof z=="string"&&z.length>12?z.slice(0,8)+"…"+z.slice(-4):z}function De(z){return z==="temporary learned clamp"?"is-clamp":z==="override"?"is-override":"is-built-in"}function Be(z){const pe=n.value.context_budget_overrides[z.model];return z.floor!=null&&Number.isFinite(Number(pe))&&Number(pe)>z.floor}function qe(z,pe){const _e={...n.value.context_budget_overrides};pe.target.value===""?delete _e[z]:_e[z]=Number(pe.target.value),n.value.context_budget_overrides=_e,w.value=!0}function ct(z){n.value.context_utilization=z.target.value===""?"":Number(z.target.value),w.value=!0}function K(z){const pe={...n.value.context_budget_overrides};delete pe[z],n.value.context_budget_overrides=pe,w.value=!0}async function xe(){e.value=!0,await Promise.all([Ce(),Ve(),Ss(),Pe(),Re()]),e.value=!1}async function Ce({preserveBasic:z=!1,preserveAdvanced:pe=!1}={}){try{const _e=await G.get("/api/llm/status");t.value=_e,s.value=_e.active_provider||"codex",_e.codex&&!Ct.pending()&&(z||(n.value.enabled=_e.codex.enabled,n.value.model=_e.codex.model||"gpt-5.6-sol",n.value.reasoning_effort=_e.codex.reasoning_effort||"medium",n.value.agent_reasoning_effort=_e.codex.agent_reasoning_effort||"",n.value.agent_model=_e.codex.agent_model||""),pe||(n.value.request_timeout_seconds=_e.codex.request_timeout_seconds??n.value.request_timeout_seconds,n.value.stream_stall_timeout_seconds=_e.codex.stream_stall_timeout_seconds??n.value.stream_stall_timeout_seconds,n.value.retry={...n.value.retry,..._e.codex.retry||{}},n.value.connection_pool={...n.value.connection_pool,..._e.codex.connection_pool||{}},n.value.context_compression={...n.value.context_compression,..._e.codex.context_compression||{}},!w.value&&!U.value&&(n.value.context_budget_overrides={..._e.codex.context_budget_overrides||{}},n.value.context_utilization=_e.codex.context_utilization??n.value.context_utilization))),_e.ollama&&!os.pending()&&(z||(P.value.enabled=_e.ollama.enabled,P.value.base_url=_e.ollama.base_url||"",P.value.model=_e.ollama.model||"",P.value.max_tokens=_e.ollama.max_tokens||4096),pe||(P.value.timeout=_e.ollama.timeout??P.value.timeout)),_e.kimi&&!Ye.pending()&&(z||(R.value.enabled=_e.kimi.enabled,R.value.model=_e.kimi.model||"",R.value.max_tokens=_e.kimi.max_tokens||4096),pe||(R.value.timeout=_e.kimi.timeout??R.value.timeout)),_e.auxiliary&&(b.value=_e.auxiliary,rs.pending()||(p.value.enabled=_e.auxiliary.enabled,p.value.model=_e.auxiliary.model||"gpt-5.6-luna"))}catch{t.value={active_provider:"codex",codex:{configured:!1},ollama:{configured:!1},kimi:{configured:!1}}}}async function Re(){const z=++T;_.value=!0,S.value="";try{const pe=await G.get("/api/context/windows");if(z!==T)return;m.value=pe,!U.value&&!w.value&&(n.value.context_budget_overrides=Object.fromEntries(Object.entries(pe.models||{}).filter(([,_e])=>_e.override!=null).map(([_e,Nt])=>[_e,Nt.override])),n.value.context_utilization=pe.utilization??n.value.context_utilization)}catch(pe){z===T&&(S.value=pe.message||"Failed to load context budgets")}finally{z===T&&(_.value=!1)}}async function Ve(){try{if(ke.value=await G.get("/api/ollama/status"),ke.value.model&&(he.value=ke.value.model),ke.value.configured)try{const z=await G.get("/api/ollama/models");ie.value=z.models||[]}catch{ie.value=[]}else if(P.value.base_url)try{const z=await G.post("/api/ollama/probe-models",{base_url:P.value.base_url});ie.value=z.models||[]}catch{ie.value=[]}}catch{ke.value={configured:!1}}}async function Pe(){ge.value=!0,He.value="";try{k.value=await G.get("/api/codex/status")}catch(z){He.value=z.message||"Failed to fetch Codex status"}finally{ge.value=!1}}async function pt(){const z=t.value?t.value.active_provider:"codex";we.value=!0;try{const pe=await G.post("/api/llm/switch",{provider:s.value});pe.error?(s.value=z,ne(pe.error,"error")):(ne("Switched to "+s.value+" ("+pe.model+")"),await xe())}catch(pe){s.value=z,ne(pe.message||"Switch failed","error")}finally{we.value=!1}}async function ls(){F.value=!0;try{const z=await G.post("/api/ollama/reload");ne(z.configured?"Ollama reloaded":z.reason||"Ollama not configured",z.configured?"success":"error"),await xe()}catch(z){ne(z.message||"Reload failed","error")}finally{F.value=!1}}async function Ps(){se.value=!0;try{await G.post("/api/ollama/model",{model:he.value}),ne("Model set to "+he.value),await xe()}catch(z){ne(z.message||"Failed","error")}finally{se.value=!1}}async function nn(){const z=P.value.base_url;if(!z){ne("Enter a base URL first","error");return}Y.value=!0;try{const pe=await G.post("/api/ollama/probe-models",{base_url:z});ie.value=pe.models||[],ie.value.length?(ne(ie.value.length+" model(s) found"),!P.value.model&&ie.value.length&&(P.value.model=ie.value[0].name)):ne("No models found at "+z,"error")}catch(pe){ne(pe.message||"Could not reach Ollama","error")}finally{Y.value=!1}}async function Ss(){try{if(Se.value=await G.get("/api/kimi/status"),Se.value.model&&(de.value=Se.value.model),Se.value.configured)try{const z=await G.get("/api/kimi/models");V.value=z.models||[]}catch{V.value=[]}}catch{Se.value={configured:!1}}}async function Fs(){ce.value=!0;try{const z=await G.post("/api/kimi/reload");ne(z.configured?"Kimi reloaded":z.reason||"Kimi not configured",z.configured?"success":"error"),await xe()}catch(z){ne(z.message||"Reload failed","error")}finally{ce.value=!1}}async function Mt(){ye.value=!0;try{await G.post("/api/kimi/model",{model:de.value}),ne("Model set to "+de.value),await xe()}catch(z){ne(z.message||"Failed","error")}finally{ye.value=!1}}async function Yt(){if(U.value){Ct();return}U.value=!0;const z=Fu(n.value);try{await G.put("/api/llm/codex/config",z),ne("Codex config saved"),await Promise.all([Ce({preserveBasic:!0,preserveAdvanced:!0}),Pe()])}catch(pe){ne(pe.message||"Failed","error");const _e=JSON.stringify(Fu(n.value))!==JSON.stringify(z);await Promise.all([Ce({preserveBasic:_e,preserveAdvanced:!0}),Pe()])}finally{U.value=!1}}async function $s(){if(U.value)return;U.value=!0;const z=$u(n.value);try{await G.put("/api/llm/codex/config",z),JSON.stringify({context_budget_overrides:n.value.context_budget_overrides,context_utilization:n.value.context_utilization})===JSON.stringify({context_budget_overrides:z.context_budget_overrides,context_utilization:z.context_utilization})&&(w.value=!1),ne("Codex advanced settings saved"),await Promise.all([Ce({preserveBasic:!0,preserveAdvanced:!0}),Pe(),Re()])}catch(pe){ne(pe.message||"Failed","error");const _e=JSON.stringify($u(n.value))!==JSON.stringify(z);await Promise.all([Ce({preserveBasic:!0,preserveAdvanced:_e}),Pe(),Re()])}finally{U.value=!1}}async function Bs(){if(O.value){os();return}O.value=!0;try{const z=j.value?P.value.api_key:null,pe=aw(P.value,{includeApiKey:z!==null});await G.put("/api/llm/ollama/config",pe),ne("Ollama config saved"),z!==null&&P.value.api_key===z&&(P.value.api_key="",j.value=!1),await Promise.all([Ce({preserveBasic:!0,preserveAdvanced:!0}),Ve()])}catch(z){ne(z.message||"Failed","error")}finally{O.value=!1}}async function An(){if(!O.value){O.value=!0;try{await G.put("/api/llm/ollama/config",iw(P.value)),ne("Ollama timeout saved"),await Promise.all([Ce({preserveBasic:!0,preserveAdvanced:!0}),Ve()])}catch(z){ne(z.message||"Failed","error")}finally{O.value=!1}}}async function Us(){if(N.value){Ye();return}N.value=!0;try{const z=Q.value?R.value.api_key:null,pe=lw(R.value,{includeApiKey:z!==null});await G.put("/api/llm/kimi/config",pe),ne("Kimi config saved"),z!==null&&R.value.api_key===z&&(R.value.api_key="",Q.value=!1),await Promise.all([Ce({preserveBasic:!0,preserveAdvanced:!0}),Ss()])}catch(z){ne(z.message||"Failed","error")}finally{N.value=!1}}async function zt(){if(!N.value){N.value=!0;try{await G.put("/api/llm/kimi/config",rw(R.value)),ne("Kimi timeout saved"),await Promise.all([Ce({preserveBasic:!0,preserveAdvanced:!0}),Ss()])}catch(z){ne(z.message||"Failed","error")}finally{N.value=!1}}}async function Vn(){if(I.value){rs();return}I.value=!0;try{await G.put("/api/llm/auxiliary/config",p.value),ne("Auxiliary config saved"),await Ce()}catch(z){ne(z.message||"Failed","error"),await Ce()}finally{I.value=!1}}const Ct=kl(Yt),rs=kl(Vn),os=kl(Bs),Ye=kl(Us),gs=()=>(Ct.cancel(),Yt()),q=()=>(os.cancel(),Bs()),re=()=>(Ye.cancel(),Us()),Ee=()=>$s(),Ze=()=>An(),lt=()=>zt();async function Ot(z){const pe=z.account_key+":"+z.model;g.value=pe;try{const _e=await G.post("/api/context/windows/clear",{account_key:z.account_key,model:z.model});ne(_e.cleared?"Temporary clamp cleared":"Clamp was already inactive"),await Re()}catch(_e){ne(_e.message||"Failed to clear clamp","error"),await Re()}finally{g.value=null}}async function Pt(z){try{await G.post("/api/codex/account/"+z+"/activate"),ne("Active account switched"),await Pe()}catch(pe){ne(pe.message||"Failed","error")}}async function ma(z){L.value=z;try{await G.post("/api/codex/account/"+z+"/refresh"),ne("Token refreshed"),await Pe()}catch(pe){ne(pe.message||"Refresh failed","error")}finally{L.value=null}}function Ts(z,pe){$.value=z,ee.value=pe||""}async function ga(z){try{await G.put("/api/codex/account/"+z+"/label",{label:ee.value}),ne("Label updated"),$.value=null,await Pe()}catch(pe){ne(pe.message||"Failed","error")}}async function ni(z,pe){if(await _s({title:"Delete Codex account",message:`Delete ${pe||"account #"+(z+1)}? The pool will reload without it.`,confirmLabel:"Delete",danger:!0}))try{await G.del("/api/codex/account/"+z),ne("Deleted. Pool reloaded."),await Pe()}catch(Nt){ne(Nt.message||"Failed","error")}}async function va(){X.value=!0;try{const z=await G.post("/api/codex/device-code");ue.value=z,Z.value="pending",ba(z)}catch(z){ne(z.message||"Failed","error")}finally{X.value=!1}}async function ba(z){te={cancelled:!1};const pe=te;try{const _e=await G.post("/api/codex/device-poll",{device_auth_id:z.device_auth_id,user_code:z.user_code,interval:z.interval});if(pe.cancelled)return;oe.value=_e,Z.value="success",await xe()}catch(_e){if(pe.cancelled)return;le.value=_e.message||"Device login failed",Z.value="error"}}function Gs(){te&&(te.cancelled=!0),Z.value=null,ue.value=null}return We(xe),xt(()=>{te&&(te.cancelled=!0),Ct.cancel(),rs.cancel(),os.cancel(),Ye.cancel()}),{loading:e,llmStatus:t,selectedProvider:s,switching:we,advancedOpen:x,codexForm:n,codexModelOptions:i,codexAgentModelOptions:l,mainMaxAllowed:o,agentMaxAllowed:c,mainModelOptionDisabled:u,agentModelOptionDisabled:f,auxForm:p,auxData:b,auxModelOptions:y,onAuxModelChange:E,savingAux:I,saveAuxConfigDebounced:rs,ollamaForm:P,kimiForm:R,savingCodex:U,savingOllama:O,savingKimi:N,probingOllama:Y,ollamaKeyDirty:j,kimiKeyDirty:Q,ollamaStatus:ke,ollamaModels:ie,ollamaSelectedModel:he,reloading:F,settingModel:se,kimiStatus:Se,kimiModels:V,kimiSelectedModel:de,reloadingKimi:ce,settingKimiModel:ye,codexLoading:ge,codexError:He,codexData:k,refreshing:L,editingLabel:$,labelValue:ee,contextWindows:m,contextWindowsLoading:_,contextWindowsError:S,contextBudgetRows:C,activeClampRows:M,activeContextBudget:H,clearingClamp:g,contextPolicyDirty:w,deviceState:Z,deviceLoading:X,deviceInfo:ue,deviceResult:oe,deviceError:le,fetchAll:xe,switchProvider:pt,reloadOllama:ls,setOllamaModel:Ps,reloadKimi:Fs,setKimiModel:Mt,probeOllamaModels:nn,saveCodexConfig:Yt,saveOllamaConfig:Bs,saveKimiConfig:Us,saveCodexAdvancedConfig:$s,saveOllamaAdvancedConfig:An,saveKimiAdvancedConfig:zt,saveCodexConfigDebounced:Ct,saveOllamaConfigDebounced:os,saveKimiConfigDebounced:Ye,saveCodexConfigNow:gs,saveOllamaConfigNow:q,saveKimiConfigNow:re,saveCodexAdvancedConfigNow:Ee,saveOllamaAdvancedConfigNow:Ze,saveKimiAdvancedConfigNow:lt,activateAccount:Pt,refreshAccount:ma,startEditLabel:Ts,saveLabel:ga,deleteAccount:ni,startDeviceLogin:va,cancelDeviceLogin:Gs,formatSize:fe,fetchContextWindows:Re,clearContextClamp:Ot,setContextOverride:qe,setContextUtilization:ct,resetContextOverride:K,overrideAboveFloor:Be,formatCount:ve,formatContextCeiling:Te,formatExpiry:Oe,shortAccountKey:Le,provenanceClass:De}}},Bu={ok:"text-green-400",pass:"text-green-400",degraded:"text-yellow-400",warn:"text-yellow-400",down:"text-red-400",fail:"text-red-400",unconfigured:"text-gray-500",skipped:"text-gray-500"};function cw(e){return Bu[e]||Bu[(e||"").toLowerCase()]||"text-gray-400"}const dw={template:`
@@ -5448,7 +5448,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h(!0),t=h({}),s=h([]),n=h({}),a=h({}),i=h(null),l=h(null),r=h(null),o=h(null),c=h(null),d=J(()=>{var g;return Object.values(((g=i.value)==null?void 0:g.totals)||{}).reduce((w,T)=>w+Number(T||0),0)}),u=h(""),f=h(0),p=h([]),b=J(()=>p.value.map(g=>`${g.label} (${g.path}${g.reason?`: ${g.reason}`:""})`).join("; ")),y=Object.freeze([{key:"startup",label:"Startup diagnostics",path:"/api/startup/diagnostics"},{key:"subsystems",label:"Subsystem status",path:"/api/subsystems/status"},{key:"sshPool",label:"SSH pool",path:"/api/pools/ssh"},{key:"httpPool",label:"HTTP pool",path:"/api/pools/http"},{key:"riskStats",label:"Risk stats",path:"/api/risk/stats"},{key:"recoveryStats",label:"Recovery stats",path:"/api/recovery/stats"},{key:"compressionStats",label:"Compression stats",path:"/api/compression/stats"},{key:"freshnessStats",label:"Freshness stats",path:"/api/freshness/stats"},{key:"governorStats",label:"Governor stats",path:"/api/governor/stats"}]);let E=null;async function I(){var M;const g=await Promise.allSettled(y.map(H=>K.get(H.path))),w=H=>g[H].status==="fulfilled"?g[H].value:null;t.value=w(0)||{};const T=w(1);s.value=Array.isArray(T)?T:T&&T.subsystems||[],n.value=w(2)||{},a.value=w(3)||{},i.value=w(4),l.value=w(5),r.value=w(6),o.value=w(7),c.value=w(8);const C=g.filter(H=>H.status==="rejected");if(p.value=g.flatMap((H,P)=>{var R;return H.status==="rejected"?[{...y[P],reason:((R=H.reason)==null?void 0:R.message)||"request failed"}]:[]}),f.value=p.value.length,C.length===g.length){const H=(M=C[0])==null?void 0:M.reason;u.value=(H==null?void 0:H.message)||"Failed to load internals"}else u.value="";e.value=!1}function x(){e.value=!0,u.value="",I()}let m=!1;function _(){m||(m=!0,I(),E||(E=setInterval(I,3e4)))}function S(){m&&(m=!1,E&&(clearInterval(E),E=null))}return We(_),Ms(_),Ps(S),xt(S),{loading:e,error:u,failedCount:f,failedEndpoints:p,failedEndpointSummary:b,endpoints:y,retry:x,startup:t,subsystems:s,sshPool:n,httpPool:a,riskStats:i,riskTotal:d,recoveryStats:l,compressionStats:r,freshnessStats:o,governorStats:c,statusColor:cw,formatAgeSeconds:X_}}},uw={setup(){const e=h(""),t=h(""),s=h(!1),n=h(""),a=h(!1),i=h(!1),l=h(!1),r=h(null),o=h(!1);async function c(){a.value=!0,r.value=null,o.value=!1;try{const u=await K.get("/api/update/check");e.value=u.current||"",t.value=u.latest||"",s.value=u.update_available||!1,n.value=u.changelog||"",u.error&&(r.value=u.error),o.value=!0}catch(u){r.value=u.message}finally{a.value=!1}}async function d(){if(await ks({title:"Update & restart",message:"Update Odin and restart? Active tasks will be interrupted.",confirmLabel:"Update & Restart",danger:!0})){i.value=!0,r.value=null;try{await K.post("/api/update/apply",{version:"latest"}),l.value=!0,setTimeout(()=>location.reload(),8e3)}catch(f){r.value=f.message}finally{i.value=!1}}}return We(c),{current:e,latest:t,updateAvailable:s,changelog:n,checking:a,applying:i,applied:l,error:r,checkDone:o,checkUpdate:c,applyUpdate:d}},template:` + `,setup(){const e=h(!0),t=h({}),s=h([]),n=h({}),a=h({}),i=h(null),l=h(null),r=h(null),o=h(null),c=h(null),d=J(()=>{var g;return Object.values(((g=i.value)==null?void 0:g.totals)||{}).reduce((w,T)=>w+Number(T||0),0)}),u=h(""),f=h(0),p=h([]),b=J(()=>p.value.map(g=>`${g.label} (${g.path}${g.reason?`: ${g.reason}`:""})`).join("; ")),y=Object.freeze([{key:"startup",label:"Startup diagnostics",path:"/api/startup/diagnostics"},{key:"subsystems",label:"Subsystem status",path:"/api/subsystems/status"},{key:"sshPool",label:"SSH pool",path:"/api/pools/ssh"},{key:"httpPool",label:"HTTP pool",path:"/api/pools/http"},{key:"riskStats",label:"Risk stats",path:"/api/risk/stats"},{key:"recoveryStats",label:"Recovery stats",path:"/api/recovery/stats"},{key:"compressionStats",label:"Compression stats",path:"/api/compression/stats"},{key:"freshnessStats",label:"Freshness stats",path:"/api/freshness/stats"},{key:"governorStats",label:"Governor stats",path:"/api/governor/stats"}]);let E=null;async function I(){var M;const g=await Promise.allSettled(y.map(H=>G.get(H.path))),w=H=>g[H].status==="fulfilled"?g[H].value:null;t.value=w(0)||{};const T=w(1);s.value=Array.isArray(T)?T:T&&T.subsystems||[],n.value=w(2)||{},a.value=w(3)||{},i.value=w(4),l.value=w(5),r.value=w(6),o.value=w(7),c.value=w(8);const C=g.filter(H=>H.status==="rejected");if(p.value=g.flatMap((H,P)=>{var R;return H.status==="rejected"?[{...y[P],reason:((R=H.reason)==null?void 0:R.message)||"request failed"}]:[]}),f.value=p.value.length,C.length===g.length){const H=(M=C[0])==null?void 0:M.reason;u.value=(H==null?void 0:H.message)||"Failed to load internals"}else u.value="";e.value=!1}function x(){e.value=!0,u.value="",I()}let m=!1;function _(){m||(m=!0,I(),E||(E=setInterval(I,3e4)))}function S(){m&&(m=!1,E&&(clearInterval(E),E=null))}return We(_),Ds(_),Ms(S),xt(S),{loading:e,error:u,failedCount:f,failedEndpoints:p,failedEndpointSummary:b,endpoints:y,retry:x,startup:t,subsystems:s,sshPool:n,httpPool:a,riskStats:i,riskTotal:d,recoveryStats:l,compressionStats:r,freshnessStats:o,governorStats:c,statusColor:cw,formatAgeSeconds:X_}}},uw={setup(){const e=h(""),t=h(""),s=h(!1),n=h(""),a=h(!1),i=h(!1),l=h(!1),r=h(null),o=h(!1);async function c(){a.value=!0,r.value=null,o.value=!1;try{const u=await G.get("/api/update/check");e.value=u.current||"",t.value=u.latest||"",s.value=u.update_available||!1,n.value=u.changelog||"",u.error&&(r.value=u.error),o.value=!0}catch(u){r.value=u.message}finally{a.value=!1}}async function d(){if(await _s({title:"Update & restart",message:"Update Odin and restart? Active tasks will be interrupted.",confirmLabel:"Update & Restart",danger:!0})){i.value=!0,r.value=null;try{await G.post("/api/update/apply",{version:"latest"}),l.value=!0,setTimeout(()=>location.reload(),8e3)}catch(f){r.value=f.message}finally{i.value=!1}}}return We(c),{current:e,latest:t,updateAvailable:s,changelog:n,checking:a,applying:i,applied:l,error:r,checkDone:o,checkUpdate:c,applyUpdate:d}},template:`

Updates

@@ -5503,7 +5503,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config

{{ error }}

- `},Im=[{id:"health",label:"Health",component:Ok},{id:"resources",label:"Resources",component:Nk},{id:"logs",label:"Logs",component:Pk},{id:"config",label:"Config",component:Wk},{id:"discord",label:"Discord",component:Jk},{id:"host-access",label:"Host Access",component:Qk},{id:"api-tokens",label:"API Tokens",component:Xk},{id:"llm",label:"LLM Config",component:ow},{id:"internals",label:"Internals",component:dw},{id:"update",label:"Update",component:uw}],fw={components:{TabbedPage:Mr},setup(){return{tabs:Im}},template:''},wl=(e,t,s,n)=>n.map(({id:a,label:i})=>({group:e,label:i,icon:t,to:{path:s,query:{tab:a}}})),pw=[{group:"Workspace",label:"Dashboard",icon:"dashboard",to:{path:"/dashboard"}},{group:"Workspace",label:"Chat",icon:"chat",to:{path:"/chat"}},...wl("Operations","operations","/operations",_m),...wl("History","history","/history",km),...wl("Capabilities","capabilities","/capabilities",wm),{group:"Manage",label:"Personality",icon:"personality",to:{path:"/personality"}},...wl("System","system","/system",Im)],fs=zn({open:!1,query:"",selected:0});function Uu(){fs.query="",fs.selected=0,fs.open=!0}function ro(){fs.open=!1}function hw(e,t){const s=e.label.toLowerCase(),n=`${e.group} ${e.label}`.toLowerCase();return t?s.startsWith(t)?100:n.startsWith(t)?80:s.includes(t)?60:n.includes(t)?40:0:1}const mw={setup(){const e=pm(),t=h(null),s=J(()=>{const i=fs.query.trim().toLowerCase();return pw.map(l=>({...l,_score:hw(l,i)})).filter(l=>l._score>0).sort((l,r)=>r._score-l._score)});ts(()=>fs.open,async i=>{var l;i&&(await It(),(l=t.value)==null||l.focus())}),ts(()=>fs.query,()=>{fs.selected=0});function n(i){ro(),e.push(i.to)}function a(i){if(i.key==="Escape"){i.preventDefault(),ro();return}if(i.key==="ArrowDown")i.preventDefault(),fs.selected=Math.min(fs.selected+1,s.value.length-1);else if(i.key==="ArrowUp")i.preventDefault(),fs.selected=Math.max(fs.selected-1,0);else if(i.key==="Enter"){i.preventDefault();const l=s.value[fs.selected];l&&n(l)}}return{state:fs,results:s,inputEl:t,go:n,onKeydown:a,closePalette:ro}},template:` + `},Im=[{id:"health",label:"Health",component:Ok},{id:"resources",label:"Resources",component:Nk},{id:"logs",label:"Logs",component:Pk},{id:"config",label:"Config",component:Wk},{id:"discord",label:"Discord",component:Jk},{id:"host-access",label:"Host Access",component:Qk},{id:"api-tokens",label:"API Tokens",component:Xk},{id:"llm",label:"LLM Config",component:ow},{id:"internals",label:"Internals",component:dw},{id:"update",label:"Update",component:uw}],fw={components:{TabbedPage:Mr},setup(){return{tabs:Im}},template:''},wl=(e,t,s,n)=>n.map(({id:a,label:i})=>({group:e,label:i,icon:t,to:{path:s,query:{tab:a}}})),pw=[{group:"Workspace",label:"Dashboard",icon:"dashboard",to:{path:"/dashboard"}},{group:"Workspace",label:"Chat",icon:"chat",to:{path:"/chat"}},...wl("Operations","operations","/operations",_m),...wl("History","history","/history",km),...wl("Capabilities","capabilities","/capabilities",wm),{group:"Manage",label:"Personality",icon:"personality",to:{path:"/personality"}},...wl("System","system","/system",Im)],us=Hn({open:!1,query:"",selected:0});function Uu(){us.query="",us.selected=0,us.open=!0}function ro(){us.open=!1}function hw(e,t){const s=e.label.toLowerCase(),n=`${e.group} ${e.label}`.toLowerCase();return t?s.startsWith(t)?100:n.startsWith(t)?80:s.includes(t)?60:n.includes(t)?40:0:1}const mw={setup(){const e=pm(),t=h(null),s=J(()=>{const i=us.query.trim().toLowerCase();return pw.map(l=>({...l,_score:hw(l,i)})).filter(l=>l._score>0).sort((l,r)=>r._score-l._score)});ns(()=>us.open,async i=>{var l;i&&(await Rt(),(l=t.value)==null||l.focus())}),ns(()=>us.query,()=>{us.selected=0});function n(i){ro(),e.push(i.to)}function a(i){if(i.key==="Escape"){i.preventDefault(),ro();return}if(i.key==="ArrowDown")i.preventDefault(),us.selected=Math.min(us.selected+1,s.value.length-1);else if(i.key==="ArrowUp")i.preventDefault(),us.selected=Math.max(us.selected-1,0);else if(i.key==="Enter"){i.preventDefault();const l=s.value[us.selected];l&&n(l)}}return{state:us,results:s,inputEl:t,go:n,onKeydown:a,closePalette:ro}},template:`
@@ -5527,7 +5527,7 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `},jo={brand:"M12 3 4.5 8v8L12 21l7.5-5V8L12 3Zm0 4.2 4.6 3.1L12 16.8l-4.6-6.5L12 7.2Zm0 3.3v3.7",dashboard:"M4 13h6V4H4v9Zm0 7h6v-4H4v4Zm10 0h6v-9h-6v9Zm0-16v4h6V4h-6Z",chat:"M20 15a3 3 0 0 1-3 3H9l-5 3v-6a3 3 0 0 1-1-2.2V7a3 3 0 0 1 3-3h11a3 3 0 0 1 3 3v8Z",operations:"M5 12h3l2-6 4 12 2-6h3M4 4v16h16",history:"M4 12a8 8 0 1 0 2.3-5.7L4 8.5M4 4v4.5h4.5M12 7v5l3 2",home:"M3 11.5 12 4l9 7.5M5.5 10v10h13V10M9 20v-6h6v6",users:"M16 20v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2m7-10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm13 10v-2a4 4 0 0 0-3-3.9m-2-11.8a4 4 0 0 1 0 7.7",capabilities:"M14.7 6.3a4 4 0 0 0-5.6 5.6L4 17v3h3v-2h2v-2h2l1.1-1.1a4 4 0 0 0 5.6-5.6l-3 3-3-3 3-3Z",personality:"M12 3a8 8 0 0 0-8 8c0 4 3 7 7 7v3h3v-3c3 0 6-3 6-7a8 8 0 0 0-8-8ZM8.5 10h.01M15.5 10h.01M9 14c1.7 1.2 4.3 1.2 6 0",system:"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0-5v2m0 14v2M3 12h2m14 0h2M5.6 5.6 7 7m10 10 1.4 1.4M18.4 5.6 17 7M7 17l-1.4 1.4",menu:"M4 7h16M4 12h16M4 17h16",panelLeft:"M9 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4V4Zm0 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H9M6 8h.01M6 12h.01",chevronLeft:"m15 18-6-6 6-6",chevronRight:"m9 18 6-6-6-6",chevronDown:"m6 9 6 6 6-6",chevronUp:"m18 15-6-6-6 6",search:"m21 21-4.3-4.3M19 11a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z",logout:"M10 17l5-5-5-5m5 5H3m10-8h5a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-5",success:"m5 12 4 4L19 6",warning:"M12 3 2.8 20h18.4L12 3Zm0 6v4m0 3h.01",info:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-8v4m0-8h.01",error:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-3-12 6 6m0-6-6 6",edit:"M4 20h4l11-11-4-4L4 16v4Zm9-13 4 4",trash:"M4 7h16m-10 4v5m4-5v5M9 4h6l1 3H8l1-3Zm-3 3 1 13h10l1-13",brain:"M9 5a3 3 0 0 0-5 2.2A3.5 3.5 0 0 0 4 14a3 3 0 0 0 5 2.2V5Zm6 0a3 3 0 0 1 5 2.2 3.5 3.5 0 0 1 0 6.8 3 3 0 0 1-5 2.2V5ZM9 9H7m2 4H6m9-4h2m-2 4h3M12 4v16",refresh:"M20 6v5h-5M4 18v-5h5M18.5 10A7 7 0 0 0 6 7.5L4 11m16 2-2 3.5A7 7 0 0 1 5.5 14",close:"M6 6l12 12M18 6 6 18",command:"M7 8a3 3 0 1 1-3-3h3v14a3 3 0 1 1-3-3h13a3 3 0 1 1-3 3V5a3 3 0 1 1 3 3H7Z",external:"M14 4h6v6m0-6-9 9M19 13v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h6",activity:"M4 12h4l2-5 4 10 2-5h4",shield:"M12 3 5 6v5c0 4.5 2.8 7.7 7 10 4.2-2.3 7-5.5 7-10V6l-7-3Z",database:"M20 6c0 1.7-3.6 3-8 3S4 7.7 4 6s3.6-3 8-3 8 1.3 8 3Zm0 0v6c0 1.7-3.6 3-8 3s-8-1.3-8-3V6m16 6v6c0 1.7-3.6 3-8 3s-8-1.3-8-3v-6",server:"M4 4h16v6H4V4Zm0 10h16v6H4v-6Zm3-7h.01M7 17h.01",terminal:"M5 7l4 4-4 4m6 1h8M3 4h18v16H3V4Z",wrench:"M14.7 6.3a4 4 0 0 0-5.6 5.6L4 17v3h3v-2h2v-2h2l1.1-1.1a4 4 0 0 0 5.6-5.6l-3 3-3-3 3-3Z",bot:"M8 4h8m-4-2v2M5 8h14a2 2 0 0 1 2 2v8H3v-8a2 2 0 0 1 2-2Zm3 4h.01M16 12h.01M8 16h8M3 13H1m22 0h-2",workflow:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM10 7.5h4a3 3 0 0 1 3 3V14M7.5 10v4a3 3 0 0 0 3 3H14",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-18c2.2 2.5 3.3 5.5 3.3 9S14.2 18.5 12 21m0-18C9.8 5.5 8.7 8.5 8.7 12s1.1 6.5 3.3 9M3 12h18",book:"M4 5a3 3 0 0 1 3-2h5v17H7a3 3 0 0 0-3 1V5Zm16 0a3 3 0 0 0-3-2h-5v17h5a3 3 0 0 1 3 1V5Z",message:"M4 4h16v13H8l-4 4V4Zm4 5h8m-8 4h5",puzzle:"M9 4h3a2 2 0 1 1 4 0h4v5a2 2 0 1 0 0 4v7h-7a2 2 0 1 1-4 0H4v-7a2 2 0 1 0 0-4V4h5",sparkles:"m12 3 1.2 3.8L17 8l-3.8 1.2L12 13l-1.2-3.8L7 8l3.8-1.2L12 3Zm6 10 .8 2.2L21 16l-2.2.8L18 19l-.8-2.2L15 16l2.2-.8L18 13ZM5 14l1 2.8L9 18l-3 1.2L5 22l-1-2.8L1 18l3-1.2L5 14Z",link:"M9.5 14.5 14.5 9m-7 8H6a4 4 0 0 1 0-8h3m6 0h3a4 4 0 0 1 0 8h-3",file:"M6 3h8l4 4v14H6V3Zm8 0v5h5M9 13h6m-6 4h6",folder:"M3 6h7l2 2h9v11H3V6Z",image:"M4 4h16v16H4V4Zm3 12 4-4 3 3 2-2 4 4M9 9h.01",attachment:"m8 12 5-5a3 3 0 1 1 4 4l-7 7a5 5 0 0 1-7-7l7-7",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13v5l3 2",calendar:"M5 5h14v15H5V5Zm3-2v4m8-4v4M5 10h14",chart:"M4 20V10m5 10V4m5 16v-7m5 7V7M2 20h20",sliders:"M4 7h10m4 0h2M4 17h2m4 0h10M16 4v6M8 14v6",code:"m9 6-6 6 6 6m6-12 6 6-6 6",copy:"M8 8h11v12H8V8Zm-3 8H4V4h11v1",play:"m8 5 11 7-11 7V5Z",grid:"M4 4h6v6H4V4Zm10 0h6v6h-6V4ZM4 14h6v6H4v-6Zm10 0h6v6h-6v-6Z",list:"M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01",target:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-5a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0-4h.01",rotate:"M20 6v5h-5M4 18v-5h5M18.5 10A7 7 0 0 0 6 7.5L4 11m16 2-2 3.5A7 7 0 0 1 5.5 14",archive:"M4 8h16v12H4V8Zm-1-4h18v4H3V4Zm6 8h6",flame:"M12 22c4 0 7-3 7-7 0-5-4-7-4-11-3 2-5 5-5 8-1-1-2-3-1-5-3 2-5 5-5 8 0 4 3 7 8 7Z",eye:"M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Zm10 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",upload:"M12 16V4m-5 5 5-5 5 5M5 20h14",download:"M12 4v12m-5-5 5 5 5-5M5 20h14",undo:"M9 7 4 12l5 5m-5-5h10a6 6 0 0 1 6 6",redo:"m15 7 5 5-5 5m5-5H10a6 6 0 0 0-6 6",minus:"M5 12h14",more:"M6 12h.01M12 12h.01M18 12h.01",pause:"M9 5v14m6-14v14",sort:"M8 5v14m0 0-3-3m3 3 3-3M16 19V5m0 0-3 3m3-3 3 3"};Object.freeze(Object.keys(jo));const gw={name:"OdinIcon",props:{name:{type:String,required:!0},size:{type:[Number,String],default:18},strokeWidth:{type:[Number,String],default:1.8}},setup(e,{attrs:t}){return()=>Va("svg",{...t,class:["odin-icon",t.class],width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":e.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":t["aria-label"]?void 0:"true",focusable:"false"},[Va("path",{d:jo[e.name]||jo.info})])}},vw=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function Hu(e){return[...e.querySelectorAll(vw)].filter(t=>!t.hasAttribute("hidden")&&t.getAttribute("aria-hidden")!=="true")}const bw={mounted(e){const t=document.activeElement,s=n=>{if(n.key!=="Tab")return;const a=Hu(e);if(!a.length){n.preventDefault(),e.focus();return}const i=a[0],l=a[a.length-1];n.shiftKey&&document.activeElement===i?(n.preventDefault(),l.focus()):!n.shiftKey&&document.activeElement===l&&(n.preventDefault(),i.focus())};e.__odinModalFocus={previous:t,onKeydown:s},e.addEventListener("keydown",s),requestAnimationFrame(()=>{(e.querySelector("[autofocus]")||Hu(e)[0]||e).focus()})},unmounted(e){var s;const t=e.__odinModalFocus;t&&(e.removeEventListener("keydown",t.onKeydown),(s=t.previous)!=null&&s.isConnected&&typeof t.previous.focus=="function"&&requestAnimationFrame(()=>t.previous.focus()),delete e.__odinModalFocus)}},yw={template:` + `},jo={brand:"M12 3 4.5 8v8L12 21l7.5-5V8L12 3Zm0 4.2 4.6 3.1L12 16.8l-4.6-6.5L12 7.2Zm0 3.3v3.7",dashboard:"M4 13h6V4H4v9Zm0 7h6v-4H4v4Zm10 0h6v-9h-6v9Zm0-16v4h6V4h-6Z",chat:"M20 15a3 3 0 0 1-3 3H9l-5 3v-6a3 3 0 0 1-1-2.2V7a3 3 0 0 1 3-3h11a3 3 0 0 1 3 3v8Z",operations:"M5 12h3l2-6 4 12 2-6h3M4 4v16h16",history:"M4 12a8 8 0 1 0 2.3-5.7L4 8.5M4 4v4.5h4.5M12 7v5l3 2",home:"M3 11.5 12 4l9 7.5M5.5 10v10h13V10M9 20v-6h6v6",users:"M16 20v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2m7-10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm13 10v-2a4 4 0 0 0-3-3.9m-2-11.8a4 4 0 0 1 0 7.7",capabilities:"M14.7 6.3a4 4 0 0 0-5.6 5.6L4 17v3h3v-2h2v-2h2l1.1-1.1a4 4 0 0 0 5.6-5.6l-3 3-3-3 3-3Z",personality:"M12 3a8 8 0 0 0-8 8c0 4 3 7 7 7v3h3v-3c3 0 6-3 6-7a8 8 0 0 0-8-8ZM8.5 10h.01M15.5 10h.01M9 14c1.7 1.2 4.3 1.2 6 0",system:"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0-5v2m0 14v2M3 12h2m14 0h2M5.6 5.6 7 7m10 10 1.4 1.4M18.4 5.6 17 7M7 17l-1.4 1.4",menu:"M4 7h16M4 12h16M4 17h16",panelLeft:"M9 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4V4Zm0 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H9M6 8h.01M6 12h.01",chevronLeft:"m15 18-6-6 6-6",chevronRight:"m9 18 6-6-6-6",chevronDown:"m6 9 6 6 6-6",chevronUp:"m18 15-6-6-6 6",search:"m21 21-4.3-4.3M19 11a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z",logout:"M10 17l5-5-5-5m5 5H3m10-8h5a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-5",success:"m5 12 4 4L19 6",warning:"M12 3 2.8 20h18.4L12 3Zm0 6v4m0 3h.01",info:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-8v4m0-8h.01",error:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-3-12 6 6m0-6-6 6",edit:"M4 20h4l11-11-4-4L4 16v4Zm9-13 4 4",trash:"M4 7h16m-10 4v5m4-5v5M9 4h6l1 3H8l1-3Zm-3 3 1 13h10l1-13",brain:"M9 5a3 3 0 0 0-5 2.2A3.5 3.5 0 0 0 4 14a3 3 0 0 0 5 2.2V5Zm6 0a3 3 0 0 1 5 2.2 3.5 3.5 0 0 1 0 6.8 3 3 0 0 1-5 2.2V5ZM9 9H7m2 4H6m9-4h2m-2 4h3M12 4v16",refresh:"M20 6v5h-5M4 18v-5h5M18.5 10A7 7 0 0 0 6 7.5L4 11m16 2-2 3.5A7 7 0 0 1 5.5 14",close:"M6 6l12 12M18 6 6 18",command:"M7 8a3 3 0 1 1-3-3h3v14a3 3 0 1 1-3-3h13a3 3 0 1 1-3 3V5a3 3 0 1 1 3 3H7Z",external:"M14 4h6v6m0-6-9 9M19 13v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h6",activity:"M4 12h4l2-5 4 10 2-5h4",shield:"M12 3 5 6v5c0 4.5 2.8 7.7 7 10 4.2-2.3 7-5.5 7-10V6l-7-3Z",database:"M20 6c0 1.7-3.6 3-8 3S4 7.7 4 6s3.6-3 8-3 8 1.3 8 3Zm0 0v6c0 1.7-3.6 3-8 3s-8-1.3-8-3V6m16 6v6c0 1.7-3.6 3-8 3s-8-1.3-8-3v-6",server:"M4 4h16v6H4V4Zm0 10h16v6H4v-6Zm3-7h.01M7 17h.01",terminal:"M5 7l4 4-4 4m6 1h8M3 4h18v16H3V4Z",wrench:"M14.7 6.3a4 4 0 0 0-5.6 5.6L4 17v3h3v-2h2v-2h2l1.1-1.1a4 4 0 0 0 5.6-5.6l-3 3-3-3 3-3Z",bot:"M8 4h8m-4-2v2M5 8h14a2 2 0 0 1 2 2v8H3v-8a2 2 0 0 1 2-2Zm3 4h.01M16 12h.01M8 16h8M3 13H1m22 0h-2",workflow:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM10 7.5h4a3 3 0 0 1 3 3V14M7.5 10v4a3 3 0 0 0 3 3H14",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-18c2.2 2.5 3.3 5.5 3.3 9S14.2 18.5 12 21m0-18C9.8 5.5 8.7 8.5 8.7 12s1.1 6.5 3.3 9M3 12h18",book:"M4 5a3 3 0 0 1 3-2h5v17H7a3 3 0 0 0-3 1V5Zm16 0a3 3 0 0 0-3-2h-5v17h5a3 3 0 0 1 3 1V5Z",message:"M4 4h16v13H8l-4 4V4Zm4 5h8m-8 4h5",puzzle:"M9 4h3a2 2 0 1 1 4 0h4v5a2 2 0 1 0 0 4v7h-7a2 2 0 1 1-4 0H4v-7a2 2 0 1 0 0-4V4h5",sparkles:"m12 3 1.2 3.8L17 8l-3.8 1.2L12 13l-1.2-3.8L7 8l3.8-1.2L12 3Zm6 10 .8 2.2L21 16l-2.2.8L18 19l-.8-2.2L15 16l2.2-.8L18 13ZM5 14l1 2.8L9 18l-3 1.2L5 22l-1-2.8L1 18l3-1.2L5 14Z",link:"M9.5 14.5 14.5 9m-7 8H6a4 4 0 0 1 0-8h3m6 0h3a4 4 0 0 1 0 8h-3",file:"M6 3h8l4 4v14H6V3Zm8 0v5h5M9 13h6m-6 4h6",folder:"M3 6h7l2 2h9v11H3V6Z",image:"M4 4h16v16H4V4Zm3 12 4-4 3 3 2-2 4 4M9 9h.01",attachment:"m8 12 5-5a3 3 0 1 1 4 4l-7 7a5 5 0 0 1-7-7l7-7",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13v5l3 2",calendar:"M5 5h14v15H5V5Zm3-2v4m8-4v4M5 10h14",chart:"M4 20V10m5 10V4m5 16v-7m5 7V7M2 20h20",sliders:"M4 7h10m4 0h2M4 17h2m4 0h10M16 4v6M8 14v6",code:"m9 6-6 6 6 6m6-12 6 6-6 6",copy:"M8 8h11v12H8V8Zm-3 8H4V4h11v1",play:"m8 5 11 7-11 7V5Z",grid:"M4 4h6v6H4V4Zm10 0h6v6h-6V4ZM4 14h6v6H4v-6Zm10 0h6v6h-6v-6Z",list:"M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01",target:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-5a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0-4h.01",rotate:"M20 6v5h-5M4 18v-5h5M18.5 10A7 7 0 0 0 6 7.5L4 11m16 2-2 3.5A7 7 0 0 1 5.5 14",archive:"M4 8h16v12H4V8Zm-1-4h18v4H3V4Zm6 8h6",flame:"M12 22c4 0 7-3 7-7 0-5-4-7-4-11-3 2-5 5-5 8-1-1-2-3-1-5-3 2-5 5-5 8 0 4 3 7 8 7Z",eye:"M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Zm10 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",upload:"M12 16V4m-5 5 5-5 5 5M5 20h14",download:"M12 4v12m-5-5 5 5 5-5M5 20h14",undo:"M9 7 4 12l5 5m-5-5h10a6 6 0 0 1 6 6",redo:"m15 7 5 5-5 5m5-5H10a6 6 0 0 0-6 6",minus:"M5 12h14",more:"M6 12h.01M12 12h.01M18 12h.01",pause:"M9 5v14m6-14v14",sort:"M8 5v14m0 0-3-3m3 3 3-3M16 19V5m0 0-3 3m3-3 3 3"};Object.freeze(Object.keys(jo));const gw={name:"OdinIcon",props:{name:{type:String,required:!0},size:{type:[Number,String],default:18},strokeWidth:{type:[Number,String],default:1.8}},setup(e,{attrs:t}){return()=>ja("svg",{...t,class:["odin-icon",t.class],width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":e.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":t["aria-label"]?void 0:"true",focusable:"false"},[ja("path",{d:jo[e.name]||jo.info})])}},vw=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function Hu(e){return[...e.querySelectorAll(vw)].filter(t=>!t.hasAttribute("hidden")&&t.getAttribute("aria-hidden")!=="true")}const bw={mounted(e){const t=document.activeElement,s=n=>{if(n.key!=="Tab")return;const a=Hu(e);if(!a.length){n.preventDefault(),e.focus();return}const i=a[0],l=a[a.length-1];n.shiftKey&&document.activeElement===i?(n.preventDefault(),l.focus()):!n.shiftKey&&document.activeElement===l&&(n.preventDefault(),i.focus())};e.__odinModalFocus={previous:t,onKeydown:s},e.addEventListener("keydown",s),requestAnimationFrame(()=>{(e.querySelector("[autofocus]")||Hu(e)[0]||e).focus()})},unmounted(e){var s;const t=e.__odinModalFocus;t&&(e.removeEventListener("keydown",t.onKeydown),(s=t.previous)!=null&&s.isConnected&&typeof t.previous.focus=="function"&&requestAnimationFrame(()=>t.previous.focus()),delete e.__odinModalFocus)}},yw={template:`
@@ -5715,14 +5715,14 @@ var Gm=Object.defineProperty;var Km=(e,t,s)=>t in e?Gm(e,t,{enumerable:!0,config
- `,setup(){const e=h({}),t=h(!0),s=h(null),n=h([]),a=h(!1),i=h([]),l=h(!1),r=h([]),o=h(0),c=h(null),d=h({reload:!1,clearSessions:!1,stopLoops:!1});let u=0;const f=J(()=>{const R=e.value.uptime_seconds||0,j=Math.floor(R/86400),Q=Math.floor(R%86400/3600),U=Math.floor(R%3600/60),O=[];return j>0&&O.push(`${j}d`),Q>0&&O.push(`${Q}h`),(O.length===0||j===0&&Q===0)&&O.push(`${U}m`),O.join(" ")}),p=J(()=>{const R=e.value.uptime_seconds||0;return 125.66*(1-Math.min(R/86400,1))}),b=J(()=>{const R=e.value;return[{label:"Guilds",value:R.guild_count??0,icon:"home",iconColor:"text-blue-400"},{label:"Sessions",value:R.session_count??0,icon:"message",iconColor:"text-yellow-400"},{label:"Tools",value:R.tool_count??0,icon:"wrench",iconColor:"text-purple-400",sub:`${R.skill_count??0} skills`,subColor:"text-gray-500"},{label:"Loops",value:R.loop_count??0,icon:"rotate",iconColor:"text-green-400",color:R.loop_count>0?"text-green-400":"",highlight:R.loop_count>0},{label:"Agents",value:R.agent_running??0,icon:"bot",iconColor:"text-cyan-400",sub:R.agent_count>0?`${R.agent_count} total`:"",subColor:"text-gray-500",highlight:(R.agent_running??0)>0},{label:"Processes",value:R.process_running??0,icon:"sliders",iconColor:"text-orange-400",sub:R.process_count>0?`${R.process_count} total`:"",subColor:"text-gray-500",highlight:(R.process_running??0)>0},{label:"Schedules",value:R.schedule_count??0,icon:"clock",iconColor:"text-amber-400",sub:(R.schedule_failing>0?`${R.schedule_failing} failing`:"")+(R.schedule_failing>0&&R.schedule_paused>0?", ":"")+(R.schedule_paused>0?`${R.schedule_paused} paused`:"")||void 0,subColor:R.schedule_failing>0?"text-red-400":"text-yellow-400",color:R.schedule_failing>0?"text-red-400":"",highlight:R.schedule_failing>0},{label:"Users",value:R.user_count??0,icon:"users",iconColor:"text-indigo-400"},...c.value!==null?[{label:"Knowledge",value:c.value,icon:"book",iconColor:"text-teal-400",sub:"chunks",subColor:"text-gray-500"}]:[]]}),y=J(()=>{const R=e.value,j=[];return j.push({label:"Bot",status:R.status==="online"?"ok":"warn",detail:R.status==="online"?"Online":"Starting"}),(R.schedule_failing||0)>0?j.push({label:"Schedules",status:"error",detail:`${R.schedule_failing} failing`}):(R.schedule_count||0)>0&&j.push({label:"Schedules",status:"ok",detail:`${R.schedule_count} configured`}),(R.loop_count||0)>0&&j.push({label:"Loops",status:"ok",detail:`${R.loop_count} active`}),(R.agent_running||0)>0&&j.push({label:"Agents",status:"ok",detail:`${R.agent_running} running`}),(R.process_running||0)>0&&j.push({label:"Processes",status:"ok",detail:`${R.process_running} running`}),j});async function E(){try{e.value=await K.get("/api/status"),s.value=null}catch(R){s.value=R.message}finally{t.value=!1}}async function I(){a.value=!0;try{n.value=await K.get("/api/audit?limit=10"),o.value=0}catch{}a.value=!1}async function x(){l.value=!0;try{i.value=await K.get("/api/audit?error_only=1&limit=5")}catch{}l.value=!1}async function m(){try{const R=await K.get("/api/knowledge");c.value=(Array.isArray(R)?R:[]).reduce((j,Q)=>j+(Q.chunks||0),0)}catch{c.value=null}}async function _(){try{const R=await K.get("/api/agents");r.value=R.filter(j=>j.status==="running")}catch{}}async function S(){d.value={...d.value,reload:!0};try{await K.post("/api/reload"),Ae.success("Config reloaded")}catch(R){Ae.error(R.message)}d.value={...d.value,reload:!1}}async function g(){if(!await ks({title:"Clear all sessions",message:"Clear all conversation sessions? This cannot be undone.",confirmLabel:"Clear All",danger:!0}))return;d.value={...d.value,clearSessions:!0};const j=e.value.session_count;e.value={...e.value,session_count:0};try{const Q=await K.post("/api/sessions/clear-all");Ae.success(`Cleared ${Q.count} session${Q.count!==1?"s":""}`),await E()}catch(Q){e.value={...e.value,session_count:j},Ae.error(Q.message)}d.value={...d.value,clearSessions:!1}}async function w(){if(!await ks({title:"Stop all loops",message:"Stop all running loops?",confirmLabel:"Stop Loops",danger:!0}))return;d.value={...d.value,stopLoops:!0};const j=e.value.loop_count;e.value={...e.value,loop_count:0};try{const Q=await K.post("/api/loops/stop-all");Ae.success(Q.result),await E()}catch(Q){e.value={...e.value,loop_count:j},Ae.error(Q.message)}d.value={...d.value,stopLoops:!1}}function T(){t.value=!0,s.value=null,E(),I(),x(),_()}let C=null,M=null,H=null;function P(R){if(R.payload&&R.payload.tool_name){const j={...R.payload,_isNew:!0,_key:++u};n.value.unshift(j),n.value.length>10&&n.value.pop(),o.value++,j.error&&(i.value.unshift(j),i.value.length>5&&i.value.pop()),setTimeout(()=>{j._isNew=!1},1500),clearTimeout(H),H=setTimeout(()=>{o.value=0},1e4)}}return We(async()=>{await Promise.all([E(),I(),x(),_(),m()]),C=setInterval(E,15e3),M=setInterval(_,1e4),Ke.subscribe("events",P)}),xt(()=>{C&&clearInterval(C),M&&clearInterval(M),clearTimeout(H),Ke.unsubscribe("events",P)}),{status:e,loading:t,error:s,uptime:f,uptimeRingOffset:p,stats:b,healthIndicators:y,activity:n,activityLoading:a,newEventCount:o,errors:i,errorsLoading:l,agents:r,actionLoading:d,fetchActivity:I,fetchStatus:E,formatTime:hm,formatDuration:Qa,retry:T,reloadConfig:S,clearSessions:g,stopAllLoops:w}}};/*! @license DOMPurify 3.4.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.9/LICENSE */function zu(e,t){(t==null||t>e.length)&&(t=e.length);for(var s=0,n=Array(t);s2?n-2:0),i=2;i1?s-1:0),a=1;a"u"?null:Tt(BigInt.prototype.toString),Wu=typeof Symbol>"u"?null:Tt(Symbol.prototype.toString),ht=Tt(Object.prototype.hasOwnProperty),fi=Tt(Object.prototype.toString),Pt=Tt(RegExp.prototype.test),Gn=Lw(TypeError);function Tt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a2&&arguments[2]!==void 0?arguments[2]:yi;if(Vu&&Vu(e,null),!Yt(t))return e;let n=t.length;for(;n--;){let a=t[n];if(typeof a=="string"){const i=s(a);i!==a&&(Tw(t)||(t[n]=i),a=i)}e[a]=!0}return e}function Dw(e){for(let t=0;t/g),Hw=Ds(/\${[\w\W]*/g),zw=Ds(/^data-[\-\w.\u00B7-\uFFFF]+$/),Vw=Ds(/^aria-[\-\w]+$/),Xu=Ds(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jw=Ds(/^(?:\w+script|data):/i),qw=Ds(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gw=Ds(/^html$/i),Kw=Ds(/^[a-z][.\w]*(-[.\w]+)+$/i),Zs={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ww=function(){return typeof window>"u"?null:window},Zw=function(t,s){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";s&&s.hasAttribute(a)&&(n=s.getAttribute(a));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},ef=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Lm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ww();const t=ge=>Lm(ge);if(t.version="3.4.9",t.removed=[],!e||!e.document||e.document.nodeType!==Zs.document||!e.Element)return t.isSupported=!1,t;let s=e.document;const n=s,a=n.currentScript;e.DocumentFragment;const i=e.HTMLTemplateElement,l=e.Node,r=e.Element,o=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const d=e.DOMParser,u=e.trustedTypes,f=r.prototype,p=Ys(f,"cloneNode"),b=Ys(f,"remove"),y=Ys(f,"nextSibling"),E=Ys(f,"childNodes"),I=Ys(f,"parentNode"),x=Ys(f,"shadowRoot"),m=Ys(f,"attributes"),_=l&&l.prototype?Ys(l.prototype,"nodeType"):null,S=l&&l.prototype?Ys(l.prototype,"nodeName"):null;if(typeof i=="function"){const ge=s.createElement("template");ge.content&&ge.content.ownerDocument&&(s=ge.content.ownerDocument)}let g,w="",T,C=!1,M=0;const H=function(){if(M>0)throw Gn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},P=function(A){H(),M++;try{return g.createHTML(A)}finally{M--}},R=function(A){H(),M++;try{return g.createScriptURL(A)}finally{M--}},j=function(){return C||(T=Zw(u,a),C=!0),T},Q=s,U=Q.implementation,O=Q.createNodeIterator,N=Q.createDocumentFragment,Y=Q.getElementsByTagName,we=n.importNode;let ke=ef();t.isSupported=typeof Om=="function"&&typeof I=="function"&&U&&U.createHTMLDocument!==void 0;const ie=Bw,pe=Uw,F=Hw,se=zw,Se=Vw,V=jw,de=qw,ce=Kw;let _e=Xu,ve=null;const He=$e({},[...Zu,...co,...uo,...fo,...Ju]);let k=null;const L=$e({},[...Yu,...po,...Qu,...Sl]);let $=Object.seal(Aa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ee=null,Z=null;const X=Object.seal(Aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ue=!0,oe=!0,le=!1,te=!0,ne=!1,fe=!0,be=!1,Te=!1,Ie=!1,Le=!1,De=!1,Be=!1,qe=!0,ct=!1;const G="user-content-";let me=!0,Ce=!1,Ne={},Pe=null;const Ve=$e({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let pt=null;const as=$e({},["audio","video","img","source","image","track"]);let Fs=null;const $s=$e({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gs="http://www.w3.org/1998/Math/MathML",Bs="http://www.w3.org/2000/svg",Ct="http://www.w3.org/1999/xhtml";let is=Ct,Ts=!1,Ks=null;const ln=$e({},[Gs,Bs,Ct],oo);let Ws=$e({},["mi","mo","mn","ms","mtext"]),Zt=$e({},["annotation-xml"]);const Us=$e({},["title","style","font","a","script"]);let Et=null;const ls=["application/xhtml+xml","text/html"],rs="text/html";let at=null,vs=null;const q=s.createElement("form"),re=function(A){return A instanceof RegExp||A instanceof Function},Ee=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(vs&&vs===A)return;(!A||typeof A!="object")&&(A={}),A=Vt(A),Et=ls.indexOf(A.PARSER_MEDIA_TYPE)===-1?rs:A.PARSER_MEDIA_TYPE,at=Et==="application/xhtml+xml"?oo:yi,ve=ht(A,"ALLOWED_TAGS")&&Yt(A.ALLOWED_TAGS)?$e({},A.ALLOWED_TAGS,at):He,k=ht(A,"ALLOWED_ATTR")&&Yt(A.ALLOWED_ATTR)?$e({},A.ALLOWED_ATTR,at):L,Ks=ht(A,"ALLOWED_NAMESPACES")&&Yt(A.ALLOWED_NAMESPACES)?$e({},A.ALLOWED_NAMESPACES,oo):ln,Fs=ht(A,"ADD_URI_SAFE_ATTR")&&Yt(A.ADD_URI_SAFE_ATTR)?$e(Vt($s),A.ADD_URI_SAFE_ATTR,at):$s,pt=ht(A,"ADD_DATA_URI_TAGS")&&Yt(A.ADD_DATA_URI_TAGS)?$e(Vt(as),A.ADD_DATA_URI_TAGS,at):as,Pe=ht(A,"FORBID_CONTENTS")&&Yt(A.FORBID_CONTENTS)?$e({},A.FORBID_CONTENTS,at):Ve,ee=ht(A,"FORBID_TAGS")&&Yt(A.FORBID_TAGS)?$e({},A.FORBID_TAGS,at):Vt({}),Z=ht(A,"FORBID_ATTR")&&Yt(A.FORBID_ATTR)?$e({},A.FORBID_ATTR,at):Vt({}),Ne=ht(A,"USE_PROFILES")?A.USE_PROFILES&&typeof A.USE_PROFILES=="object"?Vt(A.USE_PROFILES):A.USE_PROFILES:!1,ue=A.ALLOW_ARIA_ATTR!==!1,oe=A.ALLOW_DATA_ATTR!==!1,le=A.ALLOW_UNKNOWN_PROTOCOLS||!1,te=A.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ne=A.SAFE_FOR_TEMPLATES||!1,fe=A.SAFE_FOR_XML!==!1,be=A.WHOLE_DOCUMENT||!1,Le=A.RETURN_DOM||!1,De=A.RETURN_DOM_FRAGMENT||!1,Be=A.RETURN_TRUSTED_TYPE||!1,Ie=A.FORCE_BODY||!1,qe=A.SANITIZE_DOM!==!1,ct=A.SANITIZE_NAMED_PROPS||!1,me=A.KEEP_CONTENT!==!1,Ce=A.IN_PLACE||!1,_e=Pw(A.ALLOWED_URI_REGEXP)?A.ALLOWED_URI_REGEXP:Xu,is=typeof A.NAMESPACE=="string"?A.NAMESPACE:Ct,Ws=ht(A,"MATHML_TEXT_INTEGRATION_POINTS")&&A.MATHML_TEXT_INTEGRATION_POINTS&&typeof A.MATHML_TEXT_INTEGRATION_POINTS=="object"?Vt(A.MATHML_TEXT_INTEGRATION_POINTS):$e({},["mi","mo","mn","ms","mtext"]),Zt=ht(A,"HTML_INTEGRATION_POINTS")&&A.HTML_INTEGRATION_POINTS&&typeof A.HTML_INTEGRATION_POINTS=="object"?Vt(A.HTML_INTEGRATION_POINTS):$e({},["annotation-xml"]);const W=ht(A,"CUSTOM_ELEMENT_HANDLING")&&A.CUSTOM_ELEMENT_HANDLING&&typeof A.CUSTOM_ELEMENT_HANDLING=="object"?Vt(A.CUSTOM_ELEMENT_HANDLING):Aa(null);if($=Aa(null),ht(W,"tagNameCheck")&&re(W.tagNameCheck)&&($.tagNameCheck=W.tagNameCheck),ht(W,"attributeNameCheck")&&re(W.attributeNameCheck)&&($.attributeNameCheck=W.attributeNameCheck),ht(W,"allowCustomizedBuiltInElements")&&typeof W.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=W.allowCustomizedBuiltInElements),ne&&(oe=!1),De&&(Le=!0),Ne&&(ve=$e({},Ju),k=Aa(null),Ne.html===!0&&($e(ve,Zu),$e(k,Yu)),Ne.svg===!0&&($e(ve,co),$e(k,po),$e(k,Sl)),Ne.svgFilters===!0&&($e(ve,uo),$e(k,po),$e(k,Sl)),Ne.mathMl===!0&&($e(ve,fo),$e(k,Qu),$e(k,Sl))),X.tagCheck=null,X.attributeCheck=null,ht(A,"ADD_TAGS")&&(typeof A.ADD_TAGS=="function"?X.tagCheck=A.ADD_TAGS:Yt(A.ADD_TAGS)&&(ve===He&&(ve=Vt(ve)),$e(ve,A.ADD_TAGS,at))),ht(A,"ADD_ATTR")&&(typeof A.ADD_ATTR=="function"?X.attributeCheck=A.ADD_ATTR:Yt(A.ADD_ATTR)&&(k===L&&(k=Vt(k)),$e(k,A.ADD_ATTR,at))),ht(A,"ADD_URI_SAFE_ATTR")&&Yt(A.ADD_URI_SAFE_ATTR)&&$e(Fs,A.ADD_URI_SAFE_ATTR,at),ht(A,"FORBID_CONTENTS")&&Yt(A.FORBID_CONTENTS)&&(Pe===Ve&&(Pe=Vt(Pe)),$e(Pe,A.FORBID_CONTENTS,at)),ht(A,"ADD_FORBID_CONTENTS")&&Yt(A.ADD_FORBID_CONTENTS)&&(Pe===Ve&&(Pe=Vt(Pe)),$e(Pe,A.ADD_FORBID_CONTENTS,at)),me&&(ve["#text"]=!0),be&&$e(ve,["html","head","body"]),ve.table&&($e(ve,["tbody"]),delete ee.tbody),A.TRUSTED_TYPES_POLICY){if(typeof A.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof A.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const v=g;g=A.TRUSTED_TYPES_POLICY;try{w=P("")}catch(D){throw g=v,D}}else A.TRUSTED_TYPES_POLICY===null?(g=void 0,w=""):(g===void 0&&(g=j()),g&&typeof w=="string"&&(w=P("")));(ke.uponSanitizeElement.length>0||ke.uponSanitizeAttribute.length>0)&&ve===He&&(ve=Vt(ve)),ke.uponSanitizeAttribute.length>0&&k===L&&(k=Vt(k)),ns&&ns(A),vs=A},Ze=$e({},[...co,...uo,...Fw]),lt=$e({},[...fo,...$w]),Nt=function(A){let W=I(A);(!W||!W.tagName)&&(W={namespaceURI:is,tagName:"template"});const v=yi(A.tagName),D=yi(W.tagName);return Ks[A.namespaceURI]?A.namespaceURI===Bs?W.namespaceURI===Ct?v==="svg":W.namespaceURI===Gs?v==="svg"&&(D==="annotation-xml"||Ws[D]):!!Ze[v]:A.namespaceURI===Gs?W.namespaceURI===Ct?v==="math":W.namespaceURI===Bs?v==="math"&&Zt[D]:!!lt[v]:A.namespaceURI===Ct?W.namespaceURI===Bs&&!Zt[D]||W.namespaceURI===Gs&&!Ws[D]?!1:!lt[v]&&(Us[v]||!Ze[v]):!!(Et==="application/xhtml+xml"&&Ks[A.namespaceURI]):!1},Mt=function(A){wa(t.removed,{element:A});try{I(A).removeChild(A)}catch{if(b(A),!I(A))throw Gn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ha=function(A){const W=E?E(A):A.childNodes;if(W){const D=[];dn(W,B=>{wa(D,B)}),dn(D,B=>{try{b(B)}catch{}})}const v=m?m(A):null;if(v)for(let D=v.length-1;D>=0;--D){const B=v[D],ae=B&&B.name;if(typeof ae=="string")try{A.removeAttribute(ae)}catch{}}},Cs=function(A,W){try{wa(t.removed,{attribute:W.getAttributeNode(A),from:W})}catch{wa(t.removed,{attribute:null,from:W})}if(W.removeAttribute(A),A==="is")if(Le||De)try{Mt(W)}catch{}else try{W.setAttribute(A,"")}catch{}},ma=function(A){const W=m?m(A):A.attributes;if(W)for(let v=W.length-1;v>=0;--v){const D=W[v],B=D&&D.name;if(!(typeof B!="string"||k[at(B)]))try{A.removeAttribute(B)}catch{}}},si=function(A){const W=[A];for(;W.length>0;){const v=W.pop();(_?_(v):v.nodeType)===Zs.element&&ma(v);const B=E?E(v):v.childNodes;if(B)for(let ae=B.length-1;ae>=0;--ae)W.push(B[ae])}},ga=function(A){let W=null,v=null;if(Ie)A=""+A;else{const ae=qu(A,/^[\r\n\t ]+/);v=ae&&ae[0]}Et==="application/xhtml+xml"&&is===Ct&&(A=''+A+"");const D=g?P(A):A;if(is===Ct)try{W=new d().parseFromString(D,Et)}catch{}if(!W||!W.documentElement){W=U.createDocument(is,"template",null);try{W.documentElement.innerHTML=Ts?w:D}catch{}}const B=W.body||W.documentElement;return A&&v&&B.insertBefore(s.createTextNode(v),B.childNodes[0]||null),is===Ct?Y.call(W,be?"html":"body")[0]:be?W.documentElement:B},va=function(A){return O.call(A.ownerDocument||A,A,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT|o.SHOW_PROCESSING_INSTRUCTION|o.SHOW_CDATA_SECTION,null)},z=function(A){var W,v;A.normalize();const D=O.call(A.ownerDocument||A,A,o.SHOW_TEXT|o.SHOW_COMMENT|o.SHOW_CDATA_SECTION|o.SHOW_PROCESSING_INSTRUCTION,null);let B=D.nextNode();for(;B;){let Oe=B.data;dn([ie,pe,F],Ue=>{Oe=Sa(Oe,Ue," ")}),B.data=Oe,B=D.nextNode()}const ae=(W=(v=A.querySelectorAll)===null||v===void 0?void 0:v.call(A,"template"))!==null&&W!==void 0?W:[];dn(Array.from(ae),Oe=>{ye(Oe.content)&&z(Oe.content)})},he=function(A){const W=S?S(A):null;return typeof W!="string"||at(W)!=="form"?!1:typeof A.nodeName!="string"||typeof A.textContent!="string"||typeof A.removeChild!="function"||A.attributes!==m(A)||typeof A.removeAttribute!="function"||typeof A.setAttribute!="function"||typeof A.namespaceURI!="string"||typeof A.insertBefore!="function"||typeof A.hasChildNodes!="function"||A.nodeType!==_(A)||A.childNodes!==E(A)},ye=function(A){if(!_||typeof A!="object"||A===null)return!1;try{return _(A)===Zs.documentFragment}catch{return!1}},os=function(A){if(!_||typeof A!="object"||A===null)return!1;try{return typeof _(A)=="number"}catch{return!1}};function cs(ge,A,W){dn(ge,v=>{v.call(t,A,W,vs)})}const Es=function(A){let W=null;if(cs(ke.beforeSanitizeElements,A,null),he(A))return Mt(A),!0;const v=at(S?S(A):A.nodeName);if(cs(ke.uponSanitizeElement,A,{tagName:v,allowedTags:ve}),fe&&A.hasChildNodes()&&!os(A.firstElementChild)&&Pt(/<[/\w!]/g,A.innerHTML)&&Pt(/<[/\w!]/g,A.textContent)||fe&&A.namespaceURI===Ct&&v==="style"&&os(A.firstElementChild)||A.nodeType===Zs.progressingInstruction||fe&&A.nodeType===Zs.comment&&Pt(/<[/\w]/g,A.data))return Mt(A),!0;if(ee[v]||!(X.tagCheck instanceof Function&&X.tagCheck(v))&&!ve[v]){if(!ee[v]&&ni(v)&&($.tagNameCheck instanceof RegExp&&Pt($.tagNameCheck,v)||$.tagNameCheck instanceof Function&&$.tagNameCheck(v)))return!1;if(me&&!Pe[v]){const B=I(A),ae=E(A);if(ae&&B){const Oe=ae.length;for(let Ue=Oe-1;Ue>=0;--Ue){const Xe=Ce?ae[Ue]:p(ae[Ue],!0);B.insertBefore(Xe,y(A))}}}return Mt(A),!0}return(_?_(A):A.nodeType)===Zs.element&&!Nt(A)||(v==="noscript"||v==="noembed"||v==="noframes")&&Pt(/<\/no(script|embed|frames)/i,A.innerHTML)?(Mt(A),!0):(ne&&A.nodeType===Zs.text&&(W=A.textContent,dn([ie,pe,F],B=>{W=Sa(W,B," ")}),A.textContent!==W&&(wa(t.removed,{element:A.cloneNode()}),A.textContent=W)),cs(ke.afterSanitizeElements,A,null),!1)},ll=function(A,W,v){if(Z[W]||qe&&(W==="id"||W==="name")&&(v in s||v in q))return!1;const D=k[W]||X.attributeCheck instanceof Function&&X.attributeCheck(W,A);if(!(oe&&!Z[W]&&Pt(se,W))){if(!(ue&&Pt(Se,W))){if(!D||Z[W]){if(!(ni(A)&&($.tagNameCheck instanceof RegExp&&Pt($.tagNameCheck,A)||$.tagNameCheck instanceof Function&&$.tagNameCheck(A))&&($.attributeNameCheck instanceof RegExp&&Pt($.attributeNameCheck,W)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(W,A))||W==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&Pt($.tagNameCheck,v)||$.tagNameCheck instanceof Function&&$.tagNameCheck(v))))return!1}else if(!Fs[W]){if(!Pt(_e,Sa(v,de,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&A!=="script"&&Gu(v,"data:")===0&&pt[A])){if(!(le&&!Pt(V,Sa(v,de,"")))){if(v)return!1}}}}}}return!0},Br=$e({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ni=function(A){return!Br[yi(A)]&&Pt(ce,A)},rl=function(A){cs(ke.beforeSanitizeAttributes,A,null);const W=A.attributes;if(!W||he(A))return;const v={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:k,forceKeepAttr:void 0};let D=W.length;for(;D--;){const B=W[D],ae=B.name,Oe=B.namespaceURI,Ue=B.value,Xe=at(ae),Ht=Ue;let vt=ae==="value"?Ht:Iw(Ht);if(v.attrName=Xe,v.attrValue=vt,v.keepAttr=!0,v.forceKeepAttr=void 0,cs(ke.uponSanitizeAttribute,A,v),vt=v.attrValue,ct&&(Xe==="id"||Xe==="name")&&Gu(vt,G)!==0&&(Cs(ae,A),vt=G+vt),fe&&Pt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,vt)){Cs(ae,A);continue}if(Xe==="attributename"&&qu(vt,"href")){Cs(ae,A);continue}if(v.forceKeepAttr)continue;if(!v.keepAttr){Cs(ae,A);continue}if(!te&&Pt(/\/>/i,vt)){Cs(ae,A);continue}ne&&dn([ie,pe,F],id=>{vt=Sa(vt,id," ")});const ii=at(A.nodeName);if(!ll(ii,Xe,vt)){Cs(ae,A);continue}if(g&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!Oe)switch(u.getAttributeType(ii,Xe)){case"TrustedHTML":{vt=P(vt);break}case"TrustedScriptURL":{vt=R(vt);break}}if(vt!==Ht)try{Oe?A.setAttributeNS(Oe,ae,vt):A.setAttribute(ae,vt),he(A)?Mt(A):ju(t.removed)}catch{Cs(ae,A)}}cs(ke.afterSanitizeAttributes,A,null)},ba=function(A){let W=null;const v=va(A);for(cs(ke.beforeSanitizeShadowDOM,A,null);W=v.nextNode();)if(cs(ke.uponSanitizeShadowNode,W,null),Es(W),rl(W),ye(W.content)&&ba(W.content),(_?_(W):W.nodeType)===Zs.element){const B=x?x(W):W.shadowRoot;ye(B)&&(ai(B),ba(B))}cs(ke.afterSanitizeShadowDOM,A,null)},ai=function(A){const W=[{node:A,shadow:null}];for(;W.length>0;){const v=W.pop();if(v.shadow){ba(v.shadow);continue}const D=v.node,ae=(_?_(D):D.nodeType)===Zs.element,Oe=E?E(D):D.childNodes;if(Oe)for(let Ue=Oe.length-1;Ue>=0;--Ue)W.push({node:Oe[Ue],shadow:null});if(ae){const Ue=S?S(D):null;if(typeof Ue=="string"&&at(Ue)==="template"){const Xe=D.content;ye(Xe)&&W.push({node:Xe,shadow:null})}}if(ae){const Ue=x?x(D):D.shadowRoot;ye(Ue)&&W.push({node:null,shadow:Ue},{node:Ue,shadow:null})}}};return t.sanitize=function(ge){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,v=null,D=null,B=null;if(Ts=!ge,Ts&&(ge=""),typeof ge!="string"&&!os(ge)&&(ge=Mw(ge),typeof ge!="string"))throw Gn("dirty is not a string, aborting");if(!t.isSupported)return ge;Te||Ee(A),t.removed=[];const ae=Ce&&typeof ge!="string"&&os(ge);if(ae){const Xe=S?S(ge):ge.nodeName;if(typeof Xe=="string"){const Ht=at(Xe);if(!ve[Ht]||ee[Ht])throw Gn("root node is forbidden and cannot be sanitized in-place")}if(he(ge))throw Gn("root node is clobbered and cannot be sanitized in-place");try{ai(ge)}catch(Ht){throw ha(ge),Ht}}else if(os(ge))W=ga(""),v=W.ownerDocument.importNode(ge,!0),v.nodeType===Zs.element&&v.nodeName==="BODY"||v.nodeName==="HTML"?W=v:W.appendChild(v),ai(v);else{if(!Le&&!ne&&!be&&ge.indexOf("<")===-1)return g&&Be?P(ge):ge;if(W=ga(ge),!W)return Le?null:Be?w:""}W&&Ie&&Mt(W.firstChild);const Oe=va(ae?ge:W);try{for(;D=Oe.nextNode();)Es(D),rl(D),ye(D.content)&&ba(D.content)}catch(Xe){throw ae&&ha(ge),Xe}if(ae)return dn(t.removed,Xe=>{Xe.element&&si(Xe.element)}),ne&&z(ge),ge;if(Le){if(ne&&z(W),De)for(B=N.call(W.ownerDocument);W.firstChild;)B.appendChild(W.firstChild);else B=W;return(k.shadowroot||k.shadowrootmode)&&(B=we.call(n,B,!0)),B}let Ue=be?W.outerHTML:W.innerHTML;return be&&ve["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&Pt(Gw,W.ownerDocument.doctype.name)&&(Ue=" -`+Ue),ne&&dn([ie,pe,F],Xe=>{Ue=Sa(Ue,Xe," ")}),g&&Be?P(Ue):Ue},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ee(ge),Te=!0},t.clearConfig=function(){vs=null,Te=!1,g=T,w=""},t.isValidAttribute=function(ge,A,W){vs||Ee({});const v=at(ge),D=at(A);return ll(v,D,W)},t.addHook=function(ge,A){typeof A=="function"&&wa(ke[ge],A)},t.removeHook=function(ge,A){if(A!==void 0){const W=Aw(ke[ge],A);return W===-1?void 0:Rw(ke[ge],W,1)[0]}return ju(ke[ge])},t.removeHooks=function(ge){ke[ge]=[]},t.removeAllHooks=function(){ke=ef()},t}var tf=Lm();function Jc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var pa=Jc();function Dm(e){pa=e}var Ri={exec:()=>null};function nt(e,t=""){let s=typeof e=="string"?e:e.source;const n={replace:(a,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(es.caret,"$1"),s=s.replace(a,l),n},getRegex:()=>new RegExp(s,t)};return n}var es={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Jw=/^(?:[ \t]*(?:\n|$))+/,Yw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Qw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,il=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Xw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yc=/(?:[*+-]|\d{1,9}[.)])/,Mm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pm=nt(Mm).replace(/bull/g,Yc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),eS=nt(Mm).replace(/bull/g,Yc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Qc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,tS=/^[^\n]+/,Xc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,sS=nt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),nS=nt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yc).getRegex(),Fr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ed=/|$))/,aS=nt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ed).replace("tag",Fr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Fm=nt(Qc).replace("hr",il).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Fr).getRegex(),iS=nt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Fm).getRegex(),td={blockquote:iS,code:Yw,def:sS,fences:Qw,heading:Xw,hr:il,html:aS,lheading:Pm,list:nS,newline:Jw,paragraph:Fm,table:Ri,text:tS},sf=nt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",il).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Fr).getRegex(),lS={...td,lheading:eS,table:sf,paragraph:nt(Qc).replace("hr",il).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sf).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Fr).getRegex()},rS={...td,html:nt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ed).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ri,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:nt(Qc).replace("hr",il).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Pm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},oS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cS=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,$m=/^( {2,}|\\)\n(?!\s*$)/,dS=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Hm=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,mS=nt(Hm,"u").replace(/punct/g,$r).getRegex(),gS=nt(Hm,"u").replace(/punct/g,Um).getRegex(),zm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",vS=nt(zm,"gu").replace(/notPunctSpace/g,Bm).replace(/punctSpace/g,sd).replace(/punct/g,$r).getRegex(),bS=nt(zm,"gu").replace(/notPunctSpace/g,pS).replace(/punctSpace/g,fS).replace(/punct/g,Um).getRegex(),yS=nt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Bm).replace(/punctSpace/g,sd).replace(/punct/g,$r).getRegex(),xS=nt(/\\(punct)/,"gu").replace(/punct/g,$r).getRegex(),_S=nt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),kS=nt(ed).replace("(?:-->|$)","-->").getRegex(),wS=nt("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",kS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),lr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,SS=nt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",lr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vm=nt(/^!?\[(label)\]\[(ref)\]/).replace("label",lr).replace("ref",Xc).getRegex(),jm=nt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xc).getRegex(),TS=nt("reflink|nolink(?!\\()","g").replace("reflink",Vm).replace("nolink",jm).getRegex(),nd={_backpedal:Ri,anyPunctuation:xS,autolink:_S,blockSkip:hS,br:$m,code:cS,del:Ri,emStrongLDelim:mS,emStrongRDelimAst:vS,emStrongRDelimUnd:yS,escape:oS,link:SS,nolink:jm,punctuation:uS,reflink:Vm,reflinkSearch:TS,tag:wS,text:dS,url:Ri},CS={...nd,link:nt(/^!?\[(label)\]\((.*?)\)/).replace("label",lr).getRegex(),reflink:nt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",lr).getRegex()},Ko={...nd,emStrongRDelimAst:bS,emStrongLDelim:gS,url:nt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},nf=e=>AS[e];function Qs(e,t){if(t){if(es.escapeTest.test(e))return e.replace(es.escapeReplace,nf)}else if(es.escapeTestNoEncode.test(e))return e.replace(es.escapeReplaceNoEncode,nf);return e}function af(e){try{e=encodeURI(e).replace(es.percentDecode,"%")}catch{return null}return e}function lf(e,t){var i;const s=e.replace(es.findPipe,(l,r,o)=>{let c=!1,d=r;for(;--d>=0&&o[d]==="\\";)c=!c;return c?"|":" |"}),n=s.split(es.splitPipe);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function rf(e,t,s,n,a){const i=t.href,l=t.title||null,r=e[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;const o={type:e[0].charAt(0)==="!"?"image":"link",raw:s,href:i,title:l,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,o}function IS(e,t,s){const n=e.match(s.other.indentCodeCompensation);if(n===null)return t;const a=n[1];return t.split(` + `,setup(){const e=h({}),t=h(!0),s=h(null),n=h([]),a=h(!1),i=h([]),l=h(!1),r=h([]),o=h(0),c=h(null),d=h({reload:!1,clearSessions:!1,stopLoops:!1});let u=0;const f=J(()=>{const R=e.value.uptime_seconds||0,j=Math.floor(R/86400),Q=Math.floor(R%86400/3600),U=Math.floor(R%3600/60),O=[];return j>0&&O.push(`${j}d`),Q>0&&O.push(`${Q}h`),(O.length===0||j===0&&Q===0)&&O.push(`${U}m`),O.join(" ")}),p=J(()=>{const R=e.value.uptime_seconds||0;return 125.66*(1-Math.min(R/86400,1))}),b=J(()=>{const R=e.value;return[{label:"Guilds",value:R.guild_count??0,icon:"home",iconColor:"text-blue-400"},{label:"Sessions",value:R.session_count??0,icon:"message",iconColor:"text-yellow-400"},{label:"Tools",value:R.tool_count??0,icon:"wrench",iconColor:"text-purple-400",sub:`${R.skill_count??0} skills`,subColor:"text-gray-500"},{label:"Loops",value:R.loop_count??0,icon:"rotate",iconColor:"text-green-400",color:R.loop_count>0?"text-green-400":"",highlight:R.loop_count>0},{label:"Agents",value:R.agent_running??0,icon:"bot",iconColor:"text-cyan-400",sub:R.agent_count>0?`${R.agent_count} total`:"",subColor:"text-gray-500",highlight:(R.agent_running??0)>0},{label:"Processes",value:R.process_running??0,icon:"sliders",iconColor:"text-orange-400",sub:R.process_count>0?`${R.process_count} total`:"",subColor:"text-gray-500",highlight:(R.process_running??0)>0},{label:"Schedules",value:R.schedule_count??0,icon:"clock",iconColor:"text-amber-400",sub:(R.schedule_failing>0?`${R.schedule_failing} failing`:"")+(R.schedule_failing>0&&R.schedule_paused>0?", ":"")+(R.schedule_paused>0?`${R.schedule_paused} paused`:"")||void 0,subColor:R.schedule_failing>0?"text-red-400":"text-yellow-400",color:R.schedule_failing>0?"text-red-400":"",highlight:R.schedule_failing>0},{label:"Users",value:R.user_count??0,icon:"users",iconColor:"text-indigo-400"},...c.value!==null?[{label:"Knowledge",value:c.value,icon:"book",iconColor:"text-teal-400",sub:"chunks",subColor:"text-gray-500"}]:[]]}),y=J(()=>{const R=e.value,j=[];return j.push({label:"Bot",status:R.status==="online"?"ok":"warn",detail:R.status==="online"?"Online":"Starting"}),(R.schedule_failing||0)>0?j.push({label:"Schedules",status:"error",detail:`${R.schedule_failing} failing`}):(R.schedule_count||0)>0&&j.push({label:"Schedules",status:"ok",detail:`${R.schedule_count} configured`}),(R.loop_count||0)>0&&j.push({label:"Loops",status:"ok",detail:`${R.loop_count} active`}),(R.agent_running||0)>0&&j.push({label:"Agents",status:"ok",detail:`${R.agent_running} running`}),(R.process_running||0)>0&&j.push({label:"Processes",status:"ok",detail:`${R.process_running} running`}),j});async function E(){try{e.value=await G.get("/api/status"),s.value=null}catch(R){s.value=R.message}finally{t.value=!1}}async function I(){a.value=!0;try{n.value=await G.get("/api/audit?limit=10"),o.value=0}catch{}a.value=!1}async function x(){l.value=!0;try{i.value=await G.get("/api/audit?error_only=1&limit=5")}catch{}l.value=!1}async function m(){try{const R=await G.get("/api/knowledge");c.value=(Array.isArray(R)?R:[]).reduce((j,Q)=>j+(Q.chunks||0),0)}catch{c.value=null}}async function _(){try{const R=await G.get("/api/agents");r.value=R.filter(j=>j.status==="running")}catch{}}async function S(){d.value={...d.value,reload:!0};try{await G.post("/api/reload"),Ae.success("Config reloaded")}catch(R){Ae.error(R.message)}d.value={...d.value,reload:!1}}async function g(){if(!await _s({title:"Clear all sessions",message:"Clear all conversation sessions? This cannot be undone.",confirmLabel:"Clear All",danger:!0}))return;d.value={...d.value,clearSessions:!0};const j=e.value.session_count;e.value={...e.value,session_count:0};try{const Q=await G.post("/api/sessions/clear-all");Ae.success(`Cleared ${Q.count} session${Q.count!==1?"s":""}`),await E()}catch(Q){e.value={...e.value,session_count:j},Ae.error(Q.message)}d.value={...d.value,clearSessions:!1}}async function w(){if(!await _s({title:"Stop all loops",message:"Stop all running loops?",confirmLabel:"Stop Loops",danger:!0}))return;d.value={...d.value,stopLoops:!0};const j=e.value.loop_count;e.value={...e.value,loop_count:0};try{const Q=await G.post("/api/loops/stop-all");Ae.success(Q.result),await E()}catch(Q){e.value={...e.value,loop_count:j},Ae.error(Q.message)}d.value={...d.value,stopLoops:!1}}function T(){t.value=!0,s.value=null,E(),I(),x(),_()}let C=null,M=null,H=null;function P(R){if(R.payload&&R.payload.tool_name){const j={...R.payload,_isNew:!0,_key:++u};n.value.unshift(j),n.value.length>10&&n.value.pop(),o.value++,j.error&&(i.value.unshift(j),i.value.length>5&&i.value.pop()),setTimeout(()=>{j._isNew=!1},1500),clearTimeout(H),H=setTimeout(()=>{o.value=0},1e4)}}return We(async()=>{await Promise.all([E(),I(),x(),_(),m()]),C=setInterval(E,15e3),M=setInterval(_,1e4),Ke.subscribe("events",P)}),xt(()=>{C&&clearInterval(C),M&&clearInterval(M),clearTimeout(H),Ke.unsubscribe("events",P)}),{status:e,loading:t,error:s,uptime:f,uptimeRingOffset:p,stats:b,healthIndicators:y,activity:n,activityLoading:a,newEventCount:o,errors:i,errorsLoading:l,agents:r,actionLoading:d,fetchActivity:I,fetchStatus:E,formatTime:hm,formatDuration:Xa,retry:T,reloadConfig:S,clearSessions:g,stopAllLoops:w}}};/*! @license DOMPurify 3.4.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.9/LICENSE */function zu(e,t){(t==null||t>e.length)&&(t=e.length);for(var s=0,n=Array(t);s2?n-2:0),i=2;i1?s-1:0),a=1;a"u"?null:Tt(BigInt.prototype.toString),Wu=typeof Symbol>"u"?null:Tt(Symbol.prototype.toString),ht=Tt(Object.prototype.hasOwnProperty),pi=Tt(Object.prototype.toString),Ft=Tt(RegExp.prototype.test),Kn=Lw(TypeError);function Tt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var s=arguments.length,n=new Array(s>1?s-1:0),a=1;a2&&arguments[2]!==void 0?arguments[2]:xi;if(Vu&&Vu(e,null),!Xt(t))return e;let n=t.length;for(;n--;){let a=t[n];if(typeof a=="string"){const i=s(a);i!==a&&(Tw(t)||(t[n]=i),a=i)}e[a]=!0}return e}function Dw(e){for(let t=0;t/g),Hw=Ls(/\${[\w\W]*/g),zw=Ls(/^data-[\-\w.\u00B7-\uFFFF]+$/),Vw=Ls(/^aria-[\-\w]+$/),Xu=Ls(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jw=Ls(/^(?:\w+script|data):/i),qw=Ls(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gw=Ls(/^html$/i),Kw=Ls(/^[a-z][.\w]*(-[.\w]+)+$/i),Ks={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ww=function(){return typeof window>"u"?null:window},Zw=function(t,s){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";s&&s.hasAttribute(a)&&(n=s.getAttribute(a));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},ef=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Lm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ww();const t=me=>Lm(me);if(t.version="3.4.9",t.removed=[],!e||!e.document||e.document.nodeType!==Ks.document||!e.Element)return t.isSupported=!1,t;let s=e.document;const n=s,a=n.currentScript;e.DocumentFragment;const i=e.HTMLTemplateElement,l=e.Node,r=e.Element,o=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const d=e.DOMParser,u=e.trustedTypes,f=r.prototype,p=Zs(f,"cloneNode"),b=Zs(f,"remove"),y=Zs(f,"nextSibling"),E=Zs(f,"childNodes"),I=Zs(f,"parentNode"),x=Zs(f,"shadowRoot"),m=Zs(f,"attributes"),_=l&&l.prototype?Zs(l.prototype,"nodeType"):null,S=l&&l.prototype?Zs(l.prototype,"nodeName"):null;if(typeof i=="function"){const me=s.createElement("template");me.content&&me.content.ownerDocument&&(s=me.content.ownerDocument)}let g,w="",T,C=!1,M=0;const H=function(){if(M>0)throw Kn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},P=function(A){H(),M++;try{return g.createHTML(A)}finally{M--}},R=function(A){H(),M++;try{return g.createScriptURL(A)}finally{M--}},j=function(){return C||(T=Zw(u,a),C=!0),T},Q=s,U=Q.implementation,O=Q.createNodeIterator,N=Q.createDocumentFragment,Y=Q.getElementsByTagName,we=n.importNode;let ke=ef();t.isSupported=typeof Om=="function"&&typeof I=="function"&&U&&U.createHTMLDocument!==void 0;const ie=Bw,he=Uw,F=Hw,se=zw,Se=Vw,V=jw,de=qw,ce=Kw;let ye=Xu,ge=null;const He=$e({},[...Zu,...co,...uo,...fo,...Ju]);let k=null;const L=$e({},[...Yu,...po,...Qu,...Sl]);let $=Object.seal(Ra(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ee=null,Z=null;const X=Object.seal(Ra(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ue=!0,oe=!0,le=!1,te=!0,ne=!1,fe=!0,ve=!1,Te=!1,Oe=!1,Le=!1,De=!1,Be=!1,qe=!0,ct=!1;const K="user-content-";let xe=!0,Ce=!1,Re={},Ve=null;const Pe=$e({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let pt=null;const ls=$e({},["audio","video","img","source","image","track"]);let Ps=null;const nn=$e({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ss="http://www.w3.org/1998/Math/MathML",Fs="http://www.w3.org/2000/svg",Mt="http://www.w3.org/1999/xhtml";let Yt=Mt,$s=!1,Bs=null;const An=$e({},[Ss,Fs,Mt],oo);let Us=$e({},["mi","mo","mn","ms","mtext"]),zt=$e({},["annotation-xml"]);const Vn=$e({},["title","style","font","a","script"]);let Ct=null;const rs=["application/xhtml+xml","text/html"],os="text/html";let Ye=null,gs=null;const q=s.createElement("form"),re=function(A){return A instanceof RegExp||A instanceof Function},Ee=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(gs&&gs===A)return;(!A||typeof A!="object")&&(A={}),A=qt(A),Ct=rs.indexOf(A.PARSER_MEDIA_TYPE)===-1?os:A.PARSER_MEDIA_TYPE,Ye=Ct==="application/xhtml+xml"?oo:xi,ge=ht(A,"ALLOWED_TAGS")&&Xt(A.ALLOWED_TAGS)?$e({},A.ALLOWED_TAGS,Ye):He,k=ht(A,"ALLOWED_ATTR")&&Xt(A.ALLOWED_ATTR)?$e({},A.ALLOWED_ATTR,Ye):L,Bs=ht(A,"ALLOWED_NAMESPACES")&&Xt(A.ALLOWED_NAMESPACES)?$e({},A.ALLOWED_NAMESPACES,oo):An,Ps=ht(A,"ADD_URI_SAFE_ATTR")&&Xt(A.ADD_URI_SAFE_ATTR)?$e(qt(nn),A.ADD_URI_SAFE_ATTR,Ye):nn,pt=ht(A,"ADD_DATA_URI_TAGS")&&Xt(A.ADD_DATA_URI_TAGS)?$e(qt(ls),A.ADD_DATA_URI_TAGS,Ye):ls,Ve=ht(A,"FORBID_CONTENTS")&&Xt(A.FORBID_CONTENTS)?$e({},A.FORBID_CONTENTS,Ye):Pe,ee=ht(A,"FORBID_TAGS")&&Xt(A.FORBID_TAGS)?$e({},A.FORBID_TAGS,Ye):qt({}),Z=ht(A,"FORBID_ATTR")&&Xt(A.FORBID_ATTR)?$e({},A.FORBID_ATTR,Ye):qt({}),Re=ht(A,"USE_PROFILES")?A.USE_PROFILES&&typeof A.USE_PROFILES=="object"?qt(A.USE_PROFILES):A.USE_PROFILES:!1,ue=A.ALLOW_ARIA_ATTR!==!1,oe=A.ALLOW_DATA_ATTR!==!1,le=A.ALLOW_UNKNOWN_PROTOCOLS||!1,te=A.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ne=A.SAFE_FOR_TEMPLATES||!1,fe=A.SAFE_FOR_XML!==!1,ve=A.WHOLE_DOCUMENT||!1,Le=A.RETURN_DOM||!1,De=A.RETURN_DOM_FRAGMENT||!1,Be=A.RETURN_TRUSTED_TYPE||!1,Oe=A.FORCE_BODY||!1,qe=A.SANITIZE_DOM!==!1,ct=A.SANITIZE_NAMED_PROPS||!1,xe=A.KEEP_CONTENT!==!1,Ce=A.IN_PLACE||!1,ye=Pw(A.ALLOWED_URI_REGEXP)?A.ALLOWED_URI_REGEXP:Xu,Yt=typeof A.NAMESPACE=="string"?A.NAMESPACE:Mt,Us=ht(A,"MATHML_TEXT_INTEGRATION_POINTS")&&A.MATHML_TEXT_INTEGRATION_POINTS&&typeof A.MATHML_TEXT_INTEGRATION_POINTS=="object"?qt(A.MATHML_TEXT_INTEGRATION_POINTS):$e({},["mi","mo","mn","ms","mtext"]),zt=ht(A,"HTML_INTEGRATION_POINTS")&&A.HTML_INTEGRATION_POINTS&&typeof A.HTML_INTEGRATION_POINTS=="object"?qt(A.HTML_INTEGRATION_POINTS):$e({},["annotation-xml"]);const W=ht(A,"CUSTOM_ELEMENT_HANDLING")&&A.CUSTOM_ELEMENT_HANDLING&&typeof A.CUSTOM_ELEMENT_HANDLING=="object"?qt(A.CUSTOM_ELEMENT_HANDLING):Ra(null);if($=Ra(null),ht(W,"tagNameCheck")&&re(W.tagNameCheck)&&($.tagNameCheck=W.tagNameCheck),ht(W,"attributeNameCheck")&&re(W.attributeNameCheck)&&($.attributeNameCheck=W.attributeNameCheck),ht(W,"allowCustomizedBuiltInElements")&&typeof W.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=W.allowCustomizedBuiltInElements),ne&&(oe=!1),De&&(Le=!0),Re&&(ge=$e({},Ju),k=Ra(null),Re.html===!0&&($e(ge,Zu),$e(k,Yu)),Re.svg===!0&&($e(ge,co),$e(k,po),$e(k,Sl)),Re.svgFilters===!0&&($e(ge,uo),$e(k,po),$e(k,Sl)),Re.mathMl===!0&&($e(ge,fo),$e(k,Qu),$e(k,Sl))),X.tagCheck=null,X.attributeCheck=null,ht(A,"ADD_TAGS")&&(typeof A.ADD_TAGS=="function"?X.tagCheck=A.ADD_TAGS:Xt(A.ADD_TAGS)&&(ge===He&&(ge=qt(ge)),$e(ge,A.ADD_TAGS,Ye))),ht(A,"ADD_ATTR")&&(typeof A.ADD_ATTR=="function"?X.attributeCheck=A.ADD_ATTR:Xt(A.ADD_ATTR)&&(k===L&&(k=qt(k)),$e(k,A.ADD_ATTR,Ye))),ht(A,"ADD_URI_SAFE_ATTR")&&Xt(A.ADD_URI_SAFE_ATTR)&&$e(Ps,A.ADD_URI_SAFE_ATTR,Ye),ht(A,"FORBID_CONTENTS")&&Xt(A.FORBID_CONTENTS)&&(Ve===Pe&&(Ve=qt(Ve)),$e(Ve,A.FORBID_CONTENTS,Ye)),ht(A,"ADD_FORBID_CONTENTS")&&Xt(A.ADD_FORBID_CONTENTS)&&(Ve===Pe&&(Ve=qt(Ve)),$e(Ve,A.ADD_FORBID_CONTENTS,Ye)),xe&&(ge["#text"]=!0),ve&&$e(ge,["html","head","body"]),ge.table&&($e(ge,["tbody"]),delete ee.tbody),A.TRUSTED_TYPES_POLICY){if(typeof A.TRUSTED_TYPES_POLICY.createHTML!="function")throw Kn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof A.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Kn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const v=g;g=A.TRUSTED_TYPES_POLICY;try{w=P("")}catch(D){throw g=v,D}}else A.TRUSTED_TYPES_POLICY===null?(g=void 0,w=""):(g===void 0&&(g=j()),g&&typeof w=="string"&&(w=P("")));(ke.uponSanitizeElement.length>0||ke.uponSanitizeAttribute.length>0)&&ge===He&&(ge=qt(ge)),ke.uponSanitizeAttribute.length>0&&k===L&&(k=qt(k)),is&&is(A),gs=A},Ze=$e({},[...co,...uo,...Fw]),lt=$e({},[...fo,...$w]),Ot=function(A){let W=I(A);(!W||!W.tagName)&&(W={namespaceURI:Yt,tagName:"template"});const v=xi(A.tagName),D=xi(W.tagName);return Bs[A.namespaceURI]?A.namespaceURI===Fs?W.namespaceURI===Mt?v==="svg":W.namespaceURI===Ss?v==="svg"&&(D==="annotation-xml"||Us[D]):!!Ze[v]:A.namespaceURI===Ss?W.namespaceURI===Mt?v==="math":W.namespaceURI===Fs?v==="math"&&zt[D]:!!lt[v]:A.namespaceURI===Mt?W.namespaceURI===Fs&&!zt[D]||W.namespaceURI===Ss&&!Us[D]?!1:!lt[v]&&(Vn[v]||!Ze[v]):!!(Ct==="application/xhtml+xml"&&Bs[A.namespaceURI]):!1},Pt=function(A){Sa(t.removed,{element:A});try{I(A).removeChild(A)}catch{if(b(A),!I(A))throw Kn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ma=function(A){const W=E?E(A):A.childNodes;if(W){const D=[];on(W,B=>{Sa(D,B)}),on(D,B=>{try{b(B)}catch{}})}const v=m?m(A):null;if(v)for(let D=v.length-1;D>=0;--D){const B=v[D],ae=B&&B.name;if(typeof ae=="string")try{A.removeAttribute(ae)}catch{}}},Ts=function(A,W){try{Sa(t.removed,{attribute:W.getAttributeNode(A),from:W})}catch{Sa(t.removed,{attribute:null,from:W})}if(W.removeAttribute(A),A==="is")if(Le||De)try{Pt(W)}catch{}else try{W.setAttribute(A,"")}catch{}},ga=function(A){const W=m?m(A):A.attributes;if(W)for(let v=W.length-1;v>=0;--v){const D=W[v],B=D&&D.name;if(!(typeof B!="string"||k[Ye(B)]))try{A.removeAttribute(B)}catch{}}},ni=function(A){const W=[A];for(;W.length>0;){const v=W.pop();(_?_(v):v.nodeType)===Ks.element&&ga(v);const B=E?E(v):v.childNodes;if(B)for(let ae=B.length-1;ae>=0;--ae)W.push(B[ae])}},va=function(A){let W=null,v=null;if(Oe)A=""+A;else{const ae=qu(A,/^[\r\n\t ]+/);v=ae&&ae[0]}Ct==="application/xhtml+xml"&&Yt===Mt&&(A=''+A+"");const D=g?P(A):A;if(Yt===Mt)try{W=new d().parseFromString(D,Ct)}catch{}if(!W||!W.documentElement){W=U.createDocument(Yt,"template",null);try{W.documentElement.innerHTML=$s?w:D}catch{}}const B=W.body||W.documentElement;return A&&v&&B.insertBefore(s.createTextNode(v),B.childNodes[0]||null),Yt===Mt?Y.call(W,ve?"html":"body")[0]:ve?W.documentElement:B},ba=function(A){return O.call(A.ownerDocument||A,A,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT|o.SHOW_PROCESSING_INSTRUCTION|o.SHOW_CDATA_SECTION,null)},Gs=function(A){var W,v;A.normalize();const D=O.call(A.ownerDocument||A,A,o.SHOW_TEXT|o.SHOW_COMMENT|o.SHOW_CDATA_SECTION|o.SHOW_PROCESSING_INSTRUCTION,null);let B=D.nextNode();for(;B;){let Ne=B.data;on([ie,he,F],Ue=>{Ne=Ta(Ne,Ue," ")}),B.data=Ne,B=D.nextNode()}const ae=(W=(v=A.querySelectorAll)===null||v===void 0?void 0:v.call(A,"template"))!==null&&W!==void 0?W:[];on(Array.from(ae),Ne=>{pe(Ne.content)&&Gs(Ne.content)})},z=function(A){const W=S?S(A):null;return typeof W!="string"||Ye(W)!=="form"?!1:typeof A.nodeName!="string"||typeof A.textContent!="string"||typeof A.removeChild!="function"||A.attributes!==m(A)||typeof A.removeAttribute!="function"||typeof A.setAttribute!="function"||typeof A.namespaceURI!="string"||typeof A.insertBefore!="function"||typeof A.hasChildNodes!="function"||A.nodeType!==_(A)||A.childNodes!==E(A)},pe=function(A){if(!_||typeof A!="object"||A===null)return!1;try{return _(A)===Ks.documentFragment}catch{return!1}},_e=function(A){if(!_||typeof A!="object"||A===null)return!1;try{return typeof _(A)=="number"}catch{return!1}};function Nt(me,A,W){on(me,v=>{v.call(t,A,W,gs)})}const Cs=function(A){let W=null;if(Nt(ke.beforeSanitizeElements,A,null),z(A))return Pt(A),!0;const v=Ye(S?S(A):A.nodeName);if(Nt(ke.uponSanitizeElement,A,{tagName:v,allowedTags:ge}),fe&&A.hasChildNodes()&&!_e(A.firstElementChild)&&Ft(/<[/\w!]/g,A.innerHTML)&&Ft(/<[/\w!]/g,A.textContent)||fe&&A.namespaceURI===Mt&&v==="style"&&_e(A.firstElementChild)||A.nodeType===Ks.progressingInstruction||fe&&A.nodeType===Ks.comment&&Ft(/<[/\w]/g,A.data))return Pt(A),!0;if(ee[v]||!(X.tagCheck instanceof Function&&X.tagCheck(v))&&!ge[v]){if(!ee[v]&&ai(v)&&($.tagNameCheck instanceof RegExp&&Ft($.tagNameCheck,v)||$.tagNameCheck instanceof Function&&$.tagNameCheck(v)))return!1;if(xe&&!Ve[v]){const B=I(A),ae=E(A);if(ae&&B){const Ne=ae.length;for(let Ue=Ne-1;Ue>=0;--Ue){const et=Ce?ae[Ue]:p(ae[Ue],!0);B.insertBefore(et,y(A))}}}return Pt(A),!0}return(_?_(A):A.nodeType)===Ks.element&&!Ot(A)||(v==="noscript"||v==="noembed"||v==="noframes")&&Ft(/<\/no(script|embed|frames)/i,A.innerHTML)?(Pt(A),!0):(ne&&A.nodeType===Ks.text&&(W=A.textContent,on([ie,he,F],B=>{W=Ta(W,B," ")}),A.textContent!==W&&(Sa(t.removed,{element:A.cloneNode()}),A.textContent=W)),Nt(ke.afterSanitizeElements,A,null),!1)},jn=function(A,W,v){if(Z[W]||qe&&(W==="id"||W==="name")&&(v in s||v in q))return!1;const D=k[W]||X.attributeCheck instanceof Function&&X.attributeCheck(W,A);if(!(oe&&!Z[W]&&Ft(se,W))){if(!(ue&&Ft(Se,W))){if(!D||Z[W]){if(!(ai(A)&&($.tagNameCheck instanceof RegExp&&Ft($.tagNameCheck,A)||$.tagNameCheck instanceof Function&&$.tagNameCheck(A))&&($.attributeNameCheck instanceof RegExp&&Ft($.attributeNameCheck,W)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(W,A))||W==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&Ft($.tagNameCheck,v)||$.tagNameCheck instanceof Function&&$.tagNameCheck(v))))return!1}else if(!Ps[W]){if(!Ft(ye,Ta(v,de,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&A!=="script"&&Gu(v,"data:")===0&&pt[A])){if(!(le&&!Ft(V,Ta(v,de,"")))){if(v)return!1}}}}}}return!0},Br=$e({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ai=function(A){return!Br[xi(A)]&&Ft(ce,A)},rl=function(A){Nt(ke.beforeSanitizeAttributes,A,null);const W=A.attributes;if(!W||z(A))return;const v={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:k,forceKeepAttr:void 0};let D=W.length;for(;D--;){const B=W[D],ae=B.name,Ne=B.namespaceURI,Ue=B.value,et=Ye(ae),Vt=Ue;let vt=ae==="value"?Vt:Iw(Vt);if(v.attrName=et,v.attrValue=vt,v.keepAttr=!0,v.forceKeepAttr=void 0,Nt(ke.uponSanitizeAttribute,A,v),vt=v.attrValue,ct&&(et==="id"||et==="name")&&Gu(vt,K)!==0&&(Ts(ae,A),vt=K+vt),fe&&Ft(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,vt)){Ts(ae,A);continue}if(et==="attributename"&&qu(vt,"href")){Ts(ae,A);continue}if(v.forceKeepAttr)continue;if(!v.keepAttr){Ts(ae,A);continue}if(!te&&Ft(/\/>/i,vt)){Ts(ae,A);continue}ne&&on([ie,he,F],id=>{vt=Ta(vt,id," ")});const li=Ye(A.nodeName);if(!jn(li,et,vt)){Ts(ae,A);continue}if(g&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!Ne)switch(u.getAttributeType(li,et)){case"TrustedHTML":{vt=P(vt);break}case"TrustedScriptURL":{vt=R(vt);break}}if(vt!==Vt)try{Ne?A.setAttributeNS(Ne,ae,vt):A.setAttribute(ae,vt),z(A)?Pt(A):ju(t.removed)}catch{Ts(ae,A)}}Nt(ke.afterSanitizeAttributes,A,null)},ya=function(A){let W=null;const v=ba(A);for(Nt(ke.beforeSanitizeShadowDOM,A,null);W=v.nextNode();)if(Nt(ke.uponSanitizeShadowNode,W,null),Cs(W),rl(W),pe(W.content)&&ya(W.content),(_?_(W):W.nodeType)===Ks.element){const B=x?x(W):W.shadowRoot;pe(B)&&(ii(B),ya(B))}Nt(ke.afterSanitizeShadowDOM,A,null)},ii=function(A){const W=[{node:A,shadow:null}];for(;W.length>0;){const v=W.pop();if(v.shadow){ya(v.shadow);continue}const D=v.node,ae=(_?_(D):D.nodeType)===Ks.element,Ne=E?E(D):D.childNodes;if(Ne)for(let Ue=Ne.length-1;Ue>=0;--Ue)W.push({node:Ne[Ue],shadow:null});if(ae){const Ue=S?S(D):null;if(typeof Ue=="string"&&Ye(Ue)==="template"){const et=D.content;pe(et)&&W.push({node:et,shadow:null})}}if(ae){const Ue=x?x(D):D.shadowRoot;pe(Ue)&&W.push({node:null,shadow:Ue},{node:Ue,shadow:null})}}};return t.sanitize=function(me){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,v=null,D=null,B=null;if($s=!me,$s&&(me=""),typeof me!="string"&&!_e(me)&&(me=Mw(me),typeof me!="string"))throw Kn("dirty is not a string, aborting");if(!t.isSupported)return me;Te||Ee(A),t.removed=[];const ae=Ce&&typeof me!="string"&&_e(me);if(ae){const et=S?S(me):me.nodeName;if(typeof et=="string"){const Vt=Ye(et);if(!ge[Vt]||ee[Vt])throw Kn("root node is forbidden and cannot be sanitized in-place")}if(z(me))throw Kn("root node is clobbered and cannot be sanitized in-place");try{ii(me)}catch(Vt){throw ma(me),Vt}}else if(_e(me))W=va(""),v=W.ownerDocument.importNode(me,!0),v.nodeType===Ks.element&&v.nodeName==="BODY"||v.nodeName==="HTML"?W=v:W.appendChild(v),ii(v);else{if(!Le&&!ne&&!ve&&me.indexOf("<")===-1)return g&&Be?P(me):me;if(W=va(me),!W)return Le?null:Be?w:""}W&&Oe&&Pt(W.firstChild);const Ne=ba(ae?me:W);try{for(;D=Ne.nextNode();)Cs(D),rl(D),pe(D.content)&&ya(D.content)}catch(et){throw ae&&ma(me),et}if(ae)return on(t.removed,et=>{et.element&&ni(et.element)}),ne&&Gs(me),me;if(Le){if(ne&&Gs(W),De)for(B=N.call(W.ownerDocument);W.firstChild;)B.appendChild(W.firstChild);else B=W;return(k.shadowroot||k.shadowrootmode)&&(B=we.call(n,B,!0)),B}let Ue=ve?W.outerHTML:W.innerHTML;return ve&&ge["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&Ft(Gw,W.ownerDocument.doctype.name)&&(Ue=" +`+Ue),ne&&on([ie,he,F],et=>{Ue=Ta(Ue,et," ")}),g&&Be?P(Ue):Ue},t.setConfig=function(){let me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ee(me),Te=!0},t.clearConfig=function(){gs=null,Te=!1,g=T,w=""},t.isValidAttribute=function(me,A,W){gs||Ee({});const v=Ye(me),D=Ye(A);return jn(v,D,W)},t.addHook=function(me,A){typeof A=="function"&&Sa(ke[me],A)},t.removeHook=function(me,A){if(A!==void 0){const W=Aw(ke[me],A);return W===-1?void 0:Rw(ke[me],W,1)[0]}return ju(ke[me])},t.removeHooks=function(me){ke[me]=[]},t.removeAllHooks=function(){ke=ef()},t}var tf=Lm();function Jc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ha=Jc();function Dm(e){ha=e}var Ii={exec:()=>null};function at(e,t=""){let s=typeof e=="string"?e:e.source;const n={replace:(a,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(ss.caret,"$1"),s=s.replace(a,l),n},getRegex:()=>new RegExp(s,t)};return n}var ss={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Jw=/^(?:[ \t]*(?:\n|$))+/,Yw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Qw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ll=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Xw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yc=/(?:[*+-]|\d{1,9}[.)])/,Mm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pm=at(Mm).replace(/bull/g,Yc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),eS=at(Mm).replace(/bull/g,Yc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Qc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,tS=/^[^\n]+/,Xc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,sS=at(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),nS=at(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yc).getRegex(),Fr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ed=/|$))/,aS=at("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ed).replace("tag",Fr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Fm=at(Qc).replace("hr",ll).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Fr).getRegex(),iS=at(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Fm).getRegex(),td={blockquote:iS,code:Yw,def:sS,fences:Qw,heading:Xw,hr:ll,html:aS,lheading:Pm,list:nS,newline:Jw,paragraph:Fm,table:Ii,text:tS},sf=at("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ll).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Fr).getRegex(),lS={...td,lheading:eS,table:sf,paragraph:at(Qc).replace("hr",ll).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sf).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Fr).getRegex()},rS={...td,html:at(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ed).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ii,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:at(Qc).replace("hr",ll).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Pm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},oS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cS=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,$m=/^( {2,}|\\)\n(?!\s*$)/,dS=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Hm=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,mS=at(Hm,"u").replace(/punct/g,$r).getRegex(),gS=at(Hm,"u").replace(/punct/g,Um).getRegex(),zm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",vS=at(zm,"gu").replace(/notPunctSpace/g,Bm).replace(/punctSpace/g,sd).replace(/punct/g,$r).getRegex(),bS=at(zm,"gu").replace(/notPunctSpace/g,pS).replace(/punctSpace/g,fS).replace(/punct/g,Um).getRegex(),yS=at("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Bm).replace(/punctSpace/g,sd).replace(/punct/g,$r).getRegex(),xS=at(/\\(punct)/,"gu").replace(/punct/g,$r).getRegex(),_S=at(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),kS=at(ed).replace("(?:-->|$)","-->").getRegex(),wS=at("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",kS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),lr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,SS=at(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",lr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Vm=at(/^!?\[(label)\]\[(ref)\]/).replace("label",lr).replace("ref",Xc).getRegex(),jm=at(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xc).getRegex(),TS=at("reflink|nolink(?!\\()","g").replace("reflink",Vm).replace("nolink",jm).getRegex(),nd={_backpedal:Ii,anyPunctuation:xS,autolink:_S,blockSkip:hS,br:$m,code:cS,del:Ii,emStrongLDelim:mS,emStrongRDelimAst:vS,emStrongRDelimUnd:yS,escape:oS,link:SS,nolink:jm,punctuation:uS,reflink:Vm,reflinkSearch:TS,tag:wS,text:dS,url:Ii},CS={...nd,link:at(/^!?\[(label)\]\((.*?)\)/).replace("label",lr).getRegex(),reflink:at(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",lr).getRegex()},Ko={...nd,emStrongRDelimAst:bS,emStrongLDelim:gS,url:at(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},nf=e=>AS[e];function Js(e,t){if(t){if(ss.escapeTest.test(e))return e.replace(ss.escapeReplace,nf)}else if(ss.escapeTestNoEncode.test(e))return e.replace(ss.escapeReplaceNoEncode,nf);return e}function af(e){try{e=encodeURI(e).replace(ss.percentDecode,"%")}catch{return null}return e}function lf(e,t){var i;const s=e.replace(ss.findPipe,(l,r,o)=>{let c=!1,d=r;for(;--d>=0&&o[d]==="\\";)c=!c;return c?"|":" |"}),n=s.split(ss.splitPipe);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function rf(e,t,s,n,a){const i=t.href,l=t.title||null,r=e[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;const o={type:e[0].charAt(0)==="!"?"image":"link",raw:s,href:i,title:l,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,o}function IS(e,t,s){const n=e.match(s.other.indentCodeCompensation);if(n===null)return t;const a=n[1];return t.split(` `).map(i=>{const l=i.match(s.other.beginningSpace);if(l===null)return i;const[r]=l;return r.length>=a.length?i.slice(a.length):i}).join(` -`)}var rr=class{constructor(e){rt(this,"options");rt(this,"rules");rt(this,"lexer");this.options=e||pa}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const s=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?s:hi(s,` -`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const s=t[0],n=IS(s,t[3]||"",this.rules);return{type:"code",raw:s,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let s=t[2].trim();if(this.rules.other.endingHash.test(s)){const n=hi(s,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(s=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:hi(t[0],` -`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let s=hi(t[0],` +`)}var rr=class{constructor(e){rt(this,"options");rt(this,"rules");rt(this,"lexer");this.options=e||ha}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const s=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?s:mi(s,` +`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const s=t[0],n=IS(s,t[3]||"",this.rules);return{type:"code",raw:s,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let s=t[2].trim();if(this.rules.other.endingHash.test(s)){const n=mi(s,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(s=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:mi(t[0],` +`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let s=mi(t[0],` `).split(` `),n="",a="";const i=[];for(;s.length>0;){let l=!1;const r=[];let o;for(o=0;ou.type==="space"),d=c.length>0&&c.some(u=>this.rules.other.anyLine.test(u.raw));a.loose=d}if(a.loose)for(let o=0;o({text:o,tokens:this.lexer.inline(o),header:!1,align:i.align[c]})));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const s=t[1].charAt(t[1].length-1)===` -`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:s,tokens:this.lexer.inline(s)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const s=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;const i=hi(s.slice(0,-1),"\\");if((s.length-i.length)%2===0)return}else{const i=RS(t[2],"()");if(i===-2)return;if(i>-1){const r=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let n=t[2],a="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],a=i[3])}else a=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?n=n.slice(1):n=n.slice(1,-1)),rf(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let s;if((s=this.rules.inline.reflink.exec(e))||(s=this.rules.inline.nolink.exec(e))){const n=(s[2]||s[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=t[n.toLowerCase()];if(!a){const i=s[0].charAt(0);return{type:"text",raw:i,text:i}}return rf(s,a,s[0],this.lexer,this.rules)}}emStrong(e,t,s=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!n||n[3]&&s.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!s||this.rules.inline.punctuation.exec(s)){const i=[...n[0]].length-1;let l,r,o=i,c=0;const d=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(n=d.exec(t))!=null;){if(l=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!l)continue;if(r=[...l].length,n[3]||n[4]){o+=r;continue}else if((n[5]||n[6])&&i%3&&!((i+r)%3)){c+=r;continue}if(o-=r,o>0)continue;r=Math.min(r,r+o+c);const u=[...n[0]][0].length,f=e.slice(0,i+n.index+u+r);if(Math.min(i,r)%2){const b=f.slice(1,-1);return{type:"em",raw:f,text:b,tokens:this.lexer.inlineTokens(b)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let s=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(s),a=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return n&&a&&(s=s.substring(1,s.length-1)),{type:"codespan",raw:t[0],text:s}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let s,n;return t[2]==="@"?(s=t[1],n="mailto:"+s):(s=t[1],n=s),{type:"link",raw:t[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}url(e){var s;let t;if(t=this.rules.inline.url.exec(e)){let n,a;if(t[2]==="@")n=t[0],a="mailto:"+n;else{let i;do i=t[0],t[0]=((s=this.rules.inline._backpedal.exec(t[0]))==null?void 0:s[0])??"";while(i!==t[0]);n=t[0],t[1]==="www."?a="http://"+t[0]:a=t[0]}return{type:"link",raw:t[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const s=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:s}}}},bn=class Wo{constructor(t){rt(this,"tokens");rt(this,"options");rt(this,"state");rt(this,"tokenizer");rt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||pa,this.options.tokenizer=this.options.tokenizer||new rr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const s={other:es,block:Tl.normal,inline:pi.normal};this.options.pedantic?(s.block=Tl.pedantic,s.inline=pi.pedantic):this.options.gfm&&(s.block=Tl.gfm,this.options.breaks?s.inline=pi.breaks:s.inline=pi.gfm),this.tokenizer.rules=s}static get rules(){return{block:Tl,inline:pi}}static lex(t,s){return new Wo(s).lex(t)}static lexInline(t,s){return new Wo(s).inlineTokens(t)}lex(t){t=t.replace(es.carriageReturn,` -`),this.blockTokens(t,this.tokens);for(let s=0;s(r=c.call({lexer:this},t,s))?(t=t.substring(r.raw.length),s.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);const c=s.at(-1);r.raw.length===1&&c!==void 0?c.raw+=` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:s,tokens:this.lexer.inline(s)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const s=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;const i=mi(s.slice(0,-1),"\\");if((s.length-i.length)%2===0)return}else{const i=RS(t[2],"()");if(i===-2)return;if(i>-1){const r=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let n=t[2],a="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],a=i[3])}else a=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?n=n.slice(1):n=n.slice(1,-1)),rf(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let s;if((s=this.rules.inline.reflink.exec(e))||(s=this.rules.inline.nolink.exec(e))){const n=(s[2]||s[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=t[n.toLowerCase()];if(!a){const i=s[0].charAt(0);return{type:"text",raw:i,text:i}}return rf(s,a,s[0],this.lexer,this.rules)}}emStrong(e,t,s=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!n||n[3]&&s.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!s||this.rules.inline.punctuation.exec(s)){const i=[...n[0]].length-1;let l,r,o=i,c=0;const d=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(n=d.exec(t))!=null;){if(l=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!l)continue;if(r=[...l].length,n[3]||n[4]){o+=r;continue}else if((n[5]||n[6])&&i%3&&!((i+r)%3)){c+=r;continue}if(o-=r,o>0)continue;r=Math.min(r,r+o+c);const u=[...n[0]][0].length,f=e.slice(0,i+n.index+u+r);if(Math.min(i,r)%2){const b=f.slice(1,-1);return{type:"em",raw:f,text:b,tokens:this.lexer.inlineTokens(b)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let s=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(s),a=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return n&&a&&(s=s.substring(1,s.length-1)),{type:"codespan",raw:t[0],text:s}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let s,n;return t[2]==="@"?(s=t[1],n="mailto:"+s):(s=t[1],n=s),{type:"link",raw:t[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}url(e){var s;let t;if(t=this.rules.inline.url.exec(e)){let n,a;if(t[2]==="@")n=t[0],a="mailto:"+n;else{let i;do i=t[0],t[0]=((s=this.rules.inline._backpedal.exec(t[0]))==null?void 0:s[0])??"";while(i!==t[0]);n=t[0],t[1]==="www."?a="http://"+t[0]:a=t[0]}return{type:"link",raw:t[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const s=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:s}}}},gn=class Wo{constructor(t){rt(this,"tokens");rt(this,"options");rt(this,"state");rt(this,"tokenizer");rt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ha,this.options.tokenizer=this.options.tokenizer||new rr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const s={other:ss,block:Tl.normal,inline:hi.normal};this.options.pedantic?(s.block=Tl.pedantic,s.inline=hi.pedantic):this.options.gfm&&(s.block=Tl.gfm,this.options.breaks?s.inline=hi.breaks:s.inline=hi.gfm),this.tokenizer.rules=s}static get rules(){return{block:Tl,inline:hi}}static lex(t,s){return new Wo(s).lex(t)}static lexInline(t,s){return new Wo(s).inlineTokens(t)}lex(t){t=t.replace(ss.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let s=0;s(r=c.call({lexer:this},t,s))?(t=t.substring(r.raw.length),s.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);const c=s.at(-1);r.raw.length===1&&c!==void 0?c.raw+=` `:s.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);const c=s.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=` `+r.raw,c.text+=` `+r.text,this.inlineQueue.at(-1).src=c.text):s.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),s.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);const c=s.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=` @@ -5752,16 +5752,16 @@ ${d}`:d;const u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block `+r.raw,c.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):s.push(r),n=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);const c=s.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=` `+r.raw,c.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):s.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,s}inline(t,s=[]){return this.inlineQueue.push({src:t,tokens:s}),s}inlineTokens(t,s=[]){var r,o,c;let n=t,a=null;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,l="";for(;t;){i||(l=""),i=!1;let d;if((o=(r=this.options.extensions)==null?void 0:r.inline)!=null&&o.some(f=>(d=f.call({lexer:this},t,s))?(t=t.substring(d.raw.length),s.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);const f=s.at(-1);d.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=d.raw,f.text+=d.text):s.push(d);continue}if(d=this.tokenizer.emStrong(t,n,l)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),s.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),s.push(d);continue}let u=t;if((c=this.options.extensions)!=null&&c.startInline){let f=1/0;const p=t.slice(1);let b;this.options.extensions.startInline.forEach(y=>{b=y.call({lexer:this},p),typeof b=="number"&&b>=0&&(f=Math.min(f,b))}),f<1/0&&f>=0&&(u=t.substring(0,f+1))}if(d=this.tokenizer.inlineText(u)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(l=d.raw.slice(-1)),i=!0;const f=s.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=d.raw,f.text+=d.text):s.push(d);continue}if(t){const f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return s}},or=class{constructor(e){rt(this,"options");rt(this,"parser");this.options=e||pa}space(e){return""}code({text:e,lang:t,escaped:s}){var i;const n=(i=(t||"").match(es.notSpaceStart))==null?void 0:i[0],a=e.replace(es.endingNewline,"")+` -`;return n?'
'+(s?a:Qs(a,!0))+`
-`:"
"+(s?a:Qs(a,!0))+`
+`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):s.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,s}inline(t,s=[]){return this.inlineQueue.push({src:t,tokens:s}),s}inlineTokens(t,s=[]){var r,o,c;let n=t,a=null;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)d.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,l="";for(;t;){i||(l=""),i=!1;let d;if((o=(r=this.options.extensions)==null?void 0:r.inline)!=null&&o.some(f=>(d=f.call({lexer:this},t,s))?(t=t.substring(d.raw.length),s.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);const f=s.at(-1);d.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=d.raw,f.text+=d.text):s.push(d);continue}if(d=this.tokenizer.emStrong(t,n,l)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),s.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),s.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),s.push(d);continue}let u=t;if((c=this.options.extensions)!=null&&c.startInline){let f=1/0;const p=t.slice(1);let b;this.options.extensions.startInline.forEach(y=>{b=y.call({lexer:this},p),typeof b=="number"&&b>=0&&(f=Math.min(f,b))}),f<1/0&&f>=0&&(u=t.substring(0,f+1))}if(d=this.tokenizer.inlineText(u)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(l=d.raw.slice(-1)),i=!0;const f=s.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=d.raw,f.text+=d.text):s.push(d);continue}if(t){const f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return s}},or=class{constructor(e){rt(this,"options");rt(this,"parser");this.options=e||ha}space(e){return""}code({text:e,lang:t,escaped:s}){var i;const n=(i=(t||"").match(ss.notSpaceStart))==null?void 0:i[0],a=e.replace(ss.endingNewline,"")+` +`;return n?'
'+(s?a:Js(a,!0))+`
+`:"
"+(s?a:Js(a,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} `}hr(e){return`
`}list(e){const t=e.ordered,s=e.start;let n="";for(let l=0;l `+n+" -`}listitem(e){var s;let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?((s=e.tokens[0])==null?void 0:s.type)==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+Qs(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • +`}listitem(e){var s;let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?((s=e.tokens[0])==null?void 0:s.type)==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+Js(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • `}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    `}table(e){let t="",s="";for(let a=0;a${n}`),` @@ -5770,9 +5770,9 @@ ${this.parser.parse(e)} `}tablerow({text:e}){return` ${e} `}tablecell(e){const t=this.parser.parseInline(e.tokens),s=e.header?"th":"td";return(e.align?`<${s} align="${e.align}">`:`<${s}>`)+t+` -`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Qs(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:s}){const n=this.parser.parseInline(s),a=af(e);if(a===null)return n;e=a;let i='",i}image({href:e,title:t,text:s,tokens:n}){n&&(s=this.parser.parseInline(n,this.parser.textRenderer));const a=af(e);if(a===null)return Qs(s);e=a;let i=`${s}{const o=l[r].flat(1/0);s=s.concat(this.walkTokens(o,t))}):l.tokens&&(s=s.concat(this.walkTokens(l.tokens,t)))}}return s}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(s=>{const n={...s};if(n.async=this.defaults.async||n.async||!1,s.extensions&&(s.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const i=t.renderers[a.name];i?t.renderers[a.name]=function(...l){let r=a.renderer.apply(this,l);return r===!1&&(r=i.apply(this,l)),r}:t.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=t[a.level];i?i.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),n.extensions=t),s.renderer){const a=this.defaults.renderer||new or(this.defaults);for(const i in s.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const l=i,r=s.renderer[l],o=a[l];a[l]=(...c)=>{let d=r.apply(a,c);return d===!1&&(d=o.apply(a,c)),d||""}}n.renderer=a}if(s.tokenizer){const a=this.defaults.tokenizer||new rr(this.defaults);for(const i in s.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const l=i,r=s.tokenizer[l],o=a[l];a[l]=(...c)=>{let d=r.apply(a,c);return d===!1&&(d=o.apply(a,c)),d}}n.tokenizer=a}if(s.hooks){const a=this.defaults.hooks||new Nl;for(const i in s.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const l=i,r=s.hooks[l],o=a[l];Nl.passThroughHooks.has(i)?a[l]=c=>{if(this.defaults.async)return Promise.resolve(r.call(a,c)).then(u=>o.call(a,u));const d=r.call(a,c);return o.call(a,d)}:a[l]=(...c)=>{let d=r.apply(a,c);return d===!1&&(d=o.apply(a,c)),d}}n.hooks=a}if(s.walkTokens){const a=this.defaults.walkTokens,i=s.walkTokens;n.walkTokens=function(l){let r=[];return r.push(i.call(this,l)),a&&(r=r.concat(a.call(this,l))),r}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return bn.lex(e,t??this.defaults)}parser(e,t){return yn.parse(e,t??this.defaults)}parseMarkdown(e){return(s,n)=>{const a={...n},i={...this.defaults,...a},l=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&a.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof s>"u"||s===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof s!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(s)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);const r=i.hooks?i.hooks.provideLexer():e?bn.lex:bn.lexInline,o=i.hooks?i.hooks.provideParser():e?yn.parse:yn.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(s):s).then(c=>r(c,i)).then(c=>i.hooks?i.hooks.processAllTokens(c):c).then(c=>i.walkTokens?Promise.all(this.walkTokens(c,i.walkTokens)).then(()=>c):c).then(c=>o(c,i)).then(c=>i.hooks?i.hooks.postprocess(c):c).catch(l);try{i.hooks&&(s=i.hooks.preprocess(s));let c=r(s,i);i.hooks&&(c=i.hooks.processAllTokens(c)),i.walkTokens&&this.walkTokens(c,i.walkTokens);let d=o(c,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(c){return l(c)}}}onError(e,t){return s=>{if(s.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const n="

    An error occurred:

    "+Qs(s.message+"",!0)+"
    ";return t?Promise.resolve(n):n}if(t)return Promise.reject(s);throw s}}},ra=new OS;function tt(e,t){return ra.parse(e,t)}tt.options=tt.setOptions=function(e){return ra.setOptions(e),tt.defaults=ra.defaults,Dm(tt.defaults),tt};tt.getDefaults=Jc;tt.defaults=pa;tt.use=function(...e){return ra.use(...e),tt.defaults=ra.defaults,Dm(tt.defaults),tt};tt.walkTokens=function(e,t){return ra.walkTokens(e,t)};tt.parseInline=ra.parseInline;tt.Parser=yn;tt.parser=yn.parse;tt.Renderer=or;tt.TextRenderer=ad;tt.Lexer=bn;tt.lexer=bn.lex;tt.Tokenizer=rr;tt.Hooks=Nl;tt.parse=tt;tt.options;tt.setOptions;tt.use;tt.walkTokens;tt.parseInline;yn.parse;bn.lex;const NS={breaks:!0,gfm:!0};function of(e){if(!e)return"";try{if(typeof tt<"u"&&tt.parse){const t=tt.parse(e,NS);return typeof tf<"u"?tf.sanitize(t):t}}catch{}return e.replace(/&/g,"&").replace(//g,">").replace(/\n/g,"
    ")}function LS(e){const t=new Date(e),s=t.getHours().toString().padStart(2,"0"),n=t.getMinutes().toString().padStart(2,"0");return`${s}:${n}`}const DS={run_command:"terminal",ssh_command:"terminal",run_script:"terminal",read_file:"file",write_file:"edit",list_directory:"folder",search_knowledge:"search",ingest_document:"book",generate_image:"image",analyze_image:"eye",analyze_pdf:"file",browser_screenshot:"globe",manage_process:"sliders"};function MS(e){return DS[e]||"wrench"}const PS=/https?:\/\/\S+\.(?:png|jpg|jpeg|gif|webp|svg)(?:\?\S*)?/gi;function cf(e){if(!e)return[];const t=e.match(PS);return t?[...new Set(t)]:[]}const FS={template:` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Js(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:s}){const n=this.parser.parseInline(s),a=af(e);if(a===null)return n;e=a;let i='
    ",i}image({href:e,title:t,text:s,tokens:n}){n&&(s=this.parser.parseInline(n,this.parser.textRenderer));const a=af(e);if(a===null)return Js(s);e=a;let i=`${s}{const o=l[r].flat(1/0);s=s.concat(this.walkTokens(o,t))}):l.tokens&&(s=s.concat(this.walkTokens(l.tokens,t)))}}return s}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(s=>{const n={...s};if(n.async=this.defaults.async||n.async||!1,s.extensions&&(s.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const i=t.renderers[a.name];i?t.renderers[a.name]=function(...l){let r=a.renderer.apply(this,l);return r===!1&&(r=i.apply(this,l)),r}:t.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=t[a.level];i?i.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),n.extensions=t),s.renderer){const a=this.defaults.renderer||new or(this.defaults);for(const i in s.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const l=i,r=s.renderer[l],o=a[l];a[l]=(...c)=>{let d=r.apply(a,c);return d===!1&&(d=o.apply(a,c)),d||""}}n.renderer=a}if(s.tokenizer){const a=this.defaults.tokenizer||new rr(this.defaults);for(const i in s.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const l=i,r=s.tokenizer[l],o=a[l];a[l]=(...c)=>{let d=r.apply(a,c);return d===!1&&(d=o.apply(a,c)),d}}n.tokenizer=a}if(s.hooks){const a=this.defaults.hooks||new Nl;for(const i in s.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const l=i,r=s.hooks[l],o=a[l];Nl.passThroughHooks.has(i)?a[l]=c=>{if(this.defaults.async)return Promise.resolve(r.call(a,c)).then(u=>o.call(a,u));const d=r.call(a,c);return o.call(a,d)}:a[l]=(...c)=>{let d=r.apply(a,c);return d===!1&&(d=o.apply(a,c)),d}}n.hooks=a}if(s.walkTokens){const a=this.defaults.walkTokens,i=s.walkTokens;n.walkTokens=function(l){let r=[];return r.push(i.call(this,l)),a&&(r=r.concat(a.call(this,l))),r}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return gn.lex(e,t??this.defaults)}parser(e,t){return vn.parse(e,t??this.defaults)}parseMarkdown(e){return(s,n)=>{const a={...n},i={...this.defaults,...a},l=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&a.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof s>"u"||s===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof s!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(s)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);const r=i.hooks?i.hooks.provideLexer():e?gn.lex:gn.lexInline,o=i.hooks?i.hooks.provideParser():e?vn.parse:vn.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(s):s).then(c=>r(c,i)).then(c=>i.hooks?i.hooks.processAllTokens(c):c).then(c=>i.walkTokens?Promise.all(this.walkTokens(c,i.walkTokens)).then(()=>c):c).then(c=>o(c,i)).then(c=>i.hooks?i.hooks.postprocess(c):c).catch(l);try{i.hooks&&(s=i.hooks.preprocess(s));let c=r(s,i);i.hooks&&(c=i.hooks.processAllTokens(c)),i.walkTokens&&this.walkTokens(c,i.walkTokens);let d=o(c,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(c){return l(c)}}}onError(e,t){return s=>{if(s.message+=` +Please report this to https://github.com/markedjs/marked.`,e){const n="

    An error occurred:

    "+Js(s.message+"",!0)+"
    ";return t?Promise.resolve(n):n}if(t)return Promise.reject(s);throw s}}},oa=new OS;function st(e,t){return oa.parse(e,t)}st.options=st.setOptions=function(e){return oa.setOptions(e),st.defaults=oa.defaults,Dm(st.defaults),st};st.getDefaults=Jc;st.defaults=ha;st.use=function(...e){return oa.use(...e),st.defaults=oa.defaults,Dm(st.defaults),st};st.walkTokens=function(e,t){return oa.walkTokens(e,t)};st.parseInline=oa.parseInline;st.Parser=vn;st.parser=vn.parse;st.Renderer=or;st.TextRenderer=ad;st.Lexer=gn;st.lexer=gn.lex;st.Tokenizer=rr;st.Hooks=Nl;st.parse=st;st.options;st.setOptions;st.use;st.walkTokens;st.parseInline;vn.parse;gn.lex;const NS={breaks:!0,gfm:!0};function of(e){if(!e)return"";try{if(typeof st<"u"&&st.parse){const t=st.parse(e,NS);return typeof tf<"u"?tf.sanitize(t):t}}catch{}return e.replace(/&/g,"&").replace(//g,">").replace(/\n/g,"
    ")}function LS(e){const t=new Date(e),s=t.getHours().toString().padStart(2,"0"),n=t.getMinutes().toString().padStart(2,"0");return`${s}:${n}`}const DS={run_command:"terminal",ssh_command:"terminal",run_script:"terminal",read_file:"file",write_file:"edit",list_directory:"folder",search_knowledge:"search",ingest_document:"book",generate_image:"image",analyze_image:"eye",analyze_pdf:"file",browser_screenshot:"globe",manage_process:"sliders"};function MS(e){return DS[e]||"wrench"}const PS=/https?:\/\/\S+\.(?:png|jpg|jpeg|gif|webp|svg)(?:\?\S*)?/gi;function cf(e){if(!e)return[];const t=e.match(PS);return t?[...new Set(t)]:[]}const FS={template:`
    @@ -5935,7 +5935,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const n="

    An err

    - `,setup(){const e=h([]),t=h(""),s=h(!1),n=h(null),a=h(null),i=h(0),l=h("");let r=null,o=0;const c=["Check system health","List running services","Show disk usage","What can you do?"],d=J(()=>t.value.trim().length>0&&!s.value),u=h(Ke.state||"disconnected");let f=null,p=null;const b=J(()=>{const U=u.value;return U==="connected"?"Connected":U==="reconnecting"?"Reconnecting…":U==="connecting"?"Connecting…":"REST fallback"}),y=["Watching across all realms...","Processing...","Consulting the bifrost...","Observing..."],E=J(()=>{const U=Math.floor(i.value/4)%y.length,O=i.value;return O>3?`${y[U]} (${O}s)`:y[0]});function I(){It(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}function x(){if(!a.value)return;const U=a.value;U.style.height="auto",U.style.height=Math.min(U.scrollHeight,120)+"px"}function m(U,O,N={}){const Y={id:++o,role:U,content:O,timestamp:Date.now(),html:U==="bot"?of(O):"",tools_used:N.tools_used||[],is_error:N.is_error||!1,images:U==="bot"?cf(O):[],files:N.files||[],_showTools:!1};return e.value.push(Y),I(),U==="bot"&&It(()=>_()),Y}function _(){if(!n.value)return;n.value.querySelectorAll(".chat-markdown pre:not([data-copy])").forEach(O=>{O.setAttribute("data-copy","true"),O.style.position="relative";const N=document.createElement("button");N.className="chat-code-copy",N.textContent="Copy",N.addEventListener("click",()=>{const Y=O.querySelector("code"),we=Y?Y.textContent:O.textContent;navigator.clipboard.writeText(we).then(()=>{N.textContent="Copied!",setTimeout(()=>{N.textContent="Copy"},1500)}).catch(()=>{})}),O.appendChild(N)})}function S(U){if(U===0)return!0;const O=e.value[U-1],N=e.value[U],Y=new Date(O.timestamp).toDateString(),we=new Date(N.timestamp).toDateString();return Y!==we}function g(U){const O=new Date(U),N=new Date;if(O.toDateString()===N.toDateString())return"Today";const Y=new Date(N);return Y.setDate(Y.getDate()-1),O.toDateString()===Y.toDateString()?"Yesterday":O.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function w(U){t.value=U,It(()=>j())}function T(U){window.open(U,"_blank","noopener")}function C(U){U.target.style.display="none"}function M(){i.value=0,r=setInterval(()=>{i.value++},1e3)}function H(){r&&(clearInterval(r),r=null),i.value=0}function P(U){s.value&&(s.value=!1,H(),U.type==="chat_response"?m("bot",U.content,{tools_used:U.tools_used||[],is_error:U.is_error||!1,files:U.files||[]}):U.type==="chat_error"&&m("bot",U.error||"Unknown error",{is_error:!0}),It(()=>{var O;return(O=a.value)==null?void 0:O.focus()}))}async function R(U){try{const O=await K.post("/api/chat",{content:U,channel_id:l.value});m("bot",O.response,{tools_used:O.tools_used||[],is_error:O.is_error||!1,files:O.files||[]})}catch(O){m("bot",O.message||"Failed to send message",{is_error:!0})}}async function j(){const U=t.value.trim();if(!U||s.value)return;m("user",U),t.value="",s.value=!0,M(),a.value&&(a.value.style.height="auto"),Ke.connected&&Ke.sendChat(U,{channelId:l.value})||(await R(U),s.value=!1,H()),It(()=>{var N;return(N=a.value)==null?void 0:N.focus()})}async function Q(){try{if(!l.value){const O=await K.get("/api/auth/session");l.value=O.channel_id||O.user_id||"web-user"}const U=await K.get("/api/sessions/"+encodeURIComponent(l.value));if(U&&U.messages&&U.messages.length>0){for(const O of U.messages){const N=O.role==="user"?"user":"bot";let Y=O.content||"";if(N==="user"){const ke=Y.match(/^\[.*?\]:\s*/);ke&&(Y=Y.slice(ke[0].length))}if(!Y.trim())continue;const we={id:++o,role:N,content:Y,timestamp:O.timestamp?O.timestamp*1e3:Date.now(),html:N==="bot"?of(Y):"",tools_used:[],is_error:!1,images:N==="bot"?cf(Y):[],files:[],_showTools:!1};e.value.push(we)}It(()=>{I(),_()})}}catch{}}return We(()=>{Ke.subscribe("chat",P),u.value=Ke.state||"disconnected",f=Ke.onStateChange,p=(U,O)=>{u.value=U,f&&f(U,O)},Ke.onStateChange=p,Q(),It(()=>{var U;return(U=a.value)==null?void 0:U.focus()})}),xt(()=>{Ke.unsubscribe("chat",P),Ke.onStateChange===p&&(Ke.onStateChange=f),H()}),{messages:e,input:t,sending:s,messagesEl:n,inputEl:a,canSend:d,wsStatus:b,typingText:E,suggestions:c,send:j,autoResize:x,formatTime:LS,formatDate:g,showDateSeparator:S,useSuggestion:w,openImage:T,onImageError:C,getToolIcon:MS}}},$S={setup(){const e=h("odin"),t=h(""),s=h(""),n=h(""),a=h({}),i=h([]),l=h([]),r=h(!1),o=h(!1),c=h(null),d=h(!0),u=h(""),f=h(!1),p=h(!1),b=J(()=>e.value==="custom"),y=J(()=>[...i.value,...l.value]),E=J(()=>l.value.includes(e.value)),I=J(()=>{var T;return b.value?t.value||"Odin":((T=a.value[e.value])==null?void 0:T.name)||e.value}),x=J(()=>{var T;return b.value?s.value||"(empty — will use Odin default)":((T=a.value[e.value])==null?void 0:T.identity)||""}),m=J(()=>{var T;return b.value?n.value||"(empty — will use Odin default)":((T=a.value[e.value])==null?void 0:T.voice)||""});async function _(){d.value=!0;try{const T=await K.get("/api/personality");e.value=T.preset||"odin",t.value=T.custom_name||"",s.value=T.custom_identity||"",n.value=T.custom_voice||"",a.value=T.presets||{},i.value=T.builtin_presets||[],l.value=T.user_presets||[]}catch(T){c.value=T.message}finally{d.value=!1}}async function S(){r.value=!0,c.value=null,o.value=!1;try{await K.put("/api/personality",{preset:e.value,custom_name:t.value,custom_identity:s.value,custom_voice:n.value}),o.value=!0,setTimeout(()=>o.value=!1,3e3)}catch(T){c.value=T.message}finally{r.value=!1}}async function g(){const T=u.value.trim();if(T){p.value=!0,c.value=null;try{await K.post("/api/personality/presets",{name:T,display_name:I.value,identity:x.value,voice:m.value}),f.value=!1,u.value="",await _(),e.value=T.toLowerCase().replace(/ /g,"_")}catch(C){c.value=C.message}finally{p.value=!1}}}async function w(){if(await ks({title:"Delete preset",message:`Delete preset "${e.value}"? This cannot be undone.`,confirmLabel:"Delete",danger:!0})){c.value=null;try{await K.del(`/api/personality/presets/${encodeURIComponent(e.value)}`),await _(),e.value="odin"}catch(C){c.value=C.message}}}return We(_),{preset:e,customName:t,customIdentity:s,customVoice:n,presets:a,presetNames:y,isCustom:b,isUserPreset:E,previewName:I,previewIdentity:x,previewVoice:m,saving:r,saved:o,error:c,loading:d,save:S,showSavePreset:f,newPresetName:u,savingPreset:p,saveAsPreset:g,deletePreset:w,builtinPresets:i,userPresets:l}},template:` + `,setup(){const e=h([]),t=h(""),s=h(!1),n=h(null),a=h(null),i=h(0),l=h("");let r=null,o=0;const c=["Check system health","List running services","Show disk usage","What can you do?"],d=J(()=>t.value.trim().length>0&&!s.value),u=h(Ke.state||"disconnected");let f=null,p=null;const b=J(()=>{const U=u.value;return U==="connected"?"Connected":U==="reconnecting"?"Reconnecting…":U==="connecting"?"Connecting…":"REST fallback"}),y=["Watching across all realms...","Processing...","Consulting the bifrost...","Observing..."],E=J(()=>{const U=Math.floor(i.value/4)%y.length,O=i.value;return O>3?`${y[U]} (${O}s)`:y[0]});function I(){Rt(()=>{n.value&&(n.value.scrollTop=n.value.scrollHeight)})}function x(){if(!a.value)return;const U=a.value;U.style.height="auto",U.style.height=Math.min(U.scrollHeight,120)+"px"}function m(U,O,N={}){const Y={id:++o,role:U,content:O,timestamp:Date.now(),html:U==="bot"?of(O):"",tools_used:N.tools_used||[],is_error:N.is_error||!1,images:U==="bot"?cf(O):[],files:N.files||[],_showTools:!1};return e.value.push(Y),I(),U==="bot"&&Rt(()=>_()),Y}function _(){if(!n.value)return;n.value.querySelectorAll(".chat-markdown pre:not([data-copy])").forEach(O=>{O.setAttribute("data-copy","true"),O.style.position="relative";const N=document.createElement("button");N.className="chat-code-copy",N.textContent="Copy",N.addEventListener("click",()=>{const Y=O.querySelector("code"),we=Y?Y.textContent:O.textContent;navigator.clipboard.writeText(we).then(()=>{N.textContent="Copied!",setTimeout(()=>{N.textContent="Copy"},1500)}).catch(()=>{})}),O.appendChild(N)})}function S(U){if(U===0)return!0;const O=e.value[U-1],N=e.value[U],Y=new Date(O.timestamp).toDateString(),we=new Date(N.timestamp).toDateString();return Y!==we}function g(U){const O=new Date(U),N=new Date;if(O.toDateString()===N.toDateString())return"Today";const Y=new Date(N);return Y.setDate(Y.getDate()-1),O.toDateString()===Y.toDateString()?"Yesterday":O.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function w(U){t.value=U,Rt(()=>j())}function T(U){window.open(U,"_blank","noopener")}function C(U){U.target.style.display="none"}function M(){i.value=0,r=setInterval(()=>{i.value++},1e3)}function H(){r&&(clearInterval(r),r=null),i.value=0}function P(U){s.value&&(s.value=!1,H(),U.type==="chat_response"?m("bot",U.content,{tools_used:U.tools_used||[],is_error:U.is_error||!1,files:U.files||[]}):U.type==="chat_error"&&m("bot",U.error||"Unknown error",{is_error:!0}),Rt(()=>{var O;return(O=a.value)==null?void 0:O.focus()}))}async function R(U){try{const O=await G.post("/api/chat",{content:U,channel_id:l.value});m("bot",O.response,{tools_used:O.tools_used||[],is_error:O.is_error||!1,files:O.files||[]})}catch(O){m("bot",O.message||"Failed to send message",{is_error:!0})}}async function j(){const U=t.value.trim();if(!U||s.value)return;m("user",U),t.value="",s.value=!0,M(),a.value&&(a.value.style.height="auto"),Ke.connected&&Ke.sendChat(U,{channelId:l.value})||(await R(U),s.value=!1,H()),Rt(()=>{var N;return(N=a.value)==null?void 0:N.focus()})}async function Q(){try{if(!l.value){const O=await G.get("/api/auth/session");l.value=O.channel_id||O.user_id||"web-user"}const U=await G.get("/api/sessions/"+encodeURIComponent(l.value));if(U&&U.messages&&U.messages.length>0){for(const O of U.messages){const N=O.role==="user"?"user":"bot";let Y=O.content||"";if(N==="user"){const ke=Y.match(/^\[.*?\]:\s*/);ke&&(Y=Y.slice(ke[0].length))}if(!Y.trim())continue;const we={id:++o,role:N,content:Y,timestamp:O.timestamp?O.timestamp*1e3:Date.now(),html:N==="bot"?of(Y):"",tools_used:[],is_error:!1,images:N==="bot"?cf(Y):[],files:[],_showTools:!1};e.value.push(we)}Rt(()=>{I(),_()})}}catch{}}return We(()=>{Ke.subscribe("chat",P),u.value=Ke.state||"disconnected",f=Ke.onStateChange,p=(U,O)=>{u.value=U,f&&f(U,O)},Ke.onStateChange=p,Q(),Rt(()=>{var U;return(U=a.value)==null?void 0:U.focus()})}),xt(()=>{Ke.unsubscribe("chat",P),Ke.onStateChange===p&&(Ke.onStateChange=f),H()}),{messages:e,input:t,sending:s,messagesEl:n,inputEl:a,canSend:d,wsStatus:b,typingText:E,suggestions:c,send:j,autoResize:x,formatTime:LS,formatDate:g,showDateSeparator:S,useSuggestion:w,openImage:T,onImageError:C,getToolIcon:MS}}},$S={setup(){const e=h("odin"),t=h(""),s=h(""),n=h(""),a=h({}),i=h([]),l=h([]),r=h(!1),o=h(!1),c=h(null),d=h(!0),u=h(""),f=h(!1),p=h(!1),b=J(()=>e.value==="custom"),y=J(()=>[...i.value,...l.value]),E=J(()=>l.value.includes(e.value)),I=J(()=>{var T;return b.value?t.value||"Odin":((T=a.value[e.value])==null?void 0:T.name)||e.value}),x=J(()=>{var T;return b.value?s.value||"(empty — will use Odin default)":((T=a.value[e.value])==null?void 0:T.identity)||""}),m=J(()=>{var T;return b.value?n.value||"(empty — will use Odin default)":((T=a.value[e.value])==null?void 0:T.voice)||""});async function _(){d.value=!0;try{const T=await G.get("/api/personality");e.value=T.preset||"odin",t.value=T.custom_name||"",s.value=T.custom_identity||"",n.value=T.custom_voice||"",a.value=T.presets||{},i.value=T.builtin_presets||[],l.value=T.user_presets||[]}catch(T){c.value=T.message}finally{d.value=!1}}async function S(){r.value=!0,c.value=null,o.value=!1;try{await G.put("/api/personality",{preset:e.value,custom_name:t.value,custom_identity:s.value,custom_voice:n.value}),o.value=!0,setTimeout(()=>o.value=!1,3e3)}catch(T){c.value=T.message}finally{r.value=!1}}async function g(){const T=u.value.trim();if(T){p.value=!0,c.value=null;try{await G.post("/api/personality/presets",{name:T,display_name:I.value,identity:x.value,voice:m.value}),f.value=!1,u.value="",await _(),e.value=T.toLowerCase().replace(/ /g,"_")}catch(C){c.value=C.message}finally{p.value=!1}}}async function w(){if(await _s({title:"Delete preset",message:`Delete preset "${e.value}"? This cannot be undone.`,confirmLabel:"Delete",danger:!0})){c.value=null;try{await G.del(`/api/personality/presets/${encodeURIComponent(e.value)}`),await _(),e.value="odin"}catch(C){c.value=C.message}}}return We(_),{preset:e,customName:t,customIdentity:s,customVoice:n,presets:a,presetNames:y,isCustom:b,isUserPreset:E,previewName:I,previewIdentity:x,previewVoice:m,saving:r,saved:o,error:c,loading:d,save:S,showSavePreset:f,newPresetName:u,savingPreset:p,saveAsPreset:g,deletePreset:w,builtinPresets:i,userPresets:l}},template:`

    Personality

    @@ -6035,7 +6035,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const n="

    An err

    - `},_t=(e,t)=>s=>({path:e,query:{...s.query,tab:t}}),qm=[{path:"/",redirect:"/dashboard"},{path:"/dashboard",component:yw,meta:{label:"Dashboard",icon:"dashboard",section:"Workspace",description:"System posture and recent activity"}},{path:"/chat",component:FS,meta:{label:"Chat",icon:"chat",section:"Workspace",description:"Direct operator conversation"}},{path:"/operations",component:uk,meta:{label:"Operations",icon:"operations",section:"Operate",description:"Execution, agents, loops, processes, and schedules"}},{path:"/history",component:bk,meta:{label:"History",icon:"history",section:"Observe",description:"Audit trail, sessions, traces, and usage"}},{path:"/capabilities",component:Ek,meta:{label:"Capabilities",icon:"capabilities",section:"Manage",description:"Tools, skills, knowledge, and memory"}},{path:"/personality",component:$S,meta:{label:"Personality",icon:"personality",section:"Manage",description:"Behavior and response profile"}},{path:"/system",component:fw,meta:{label:"System",icon:"system",section:"Manage",description:"Health, configuration, access, and updates"}},{path:"/execution",redirect:_t("/operations","live")},{path:"/agents",redirect:_t("/operations","agents")},{path:"/loops",redirect:_t("/operations","loops")},{path:"/processes",redirect:_t("/operations","processes")},{path:"/schedules",redirect:_t("/operations","schedules")},{path:"/audit",redirect:_t("/history","audit")},{path:"/sessions",redirect:_t("/history","sessions")},{path:"/traces",redirect:_t("/history","traces")},{path:"/usage",redirect:_t("/history","usage")},{path:"/tools",redirect:_t("/capabilities","tools")},{path:"/skills",redirect:_t("/capabilities","skills")},{path:"/knowledge",redirect:_t("/capabilities","knowledge")},{path:"/memory",redirect:_t("/capabilities","memory")},{path:"/learned",redirect:_t("/capabilities","learned")},{path:"/health",redirect:_t("/system","health")},{path:"/resources",redirect:_t("/system","resources")},{path:"/logs",redirect:_t("/system","logs")},{path:"/config",redirect:_t("/system","config")},{path:"/host-access",redirect:_t("/system","host-access")},{path:"/internals",redirect:_t("/system","internals")}],Ii=J_({history:A_(),routes:qm});Ii.afterEach(e=>{var s;const t=(s=e.meta)==null?void 0:s.label;document.title=t?`Odin — ${t}`:"Odin — Management"});const BS={template:` + `},_t=(e,t)=>s=>({path:e,query:{...s.query,tab:t}}),qm=[{path:"/",redirect:"/dashboard"},{path:"/dashboard",component:yw,meta:{label:"Dashboard",icon:"dashboard",section:"Workspace",description:"System posture and recent activity"}},{path:"/chat",component:FS,meta:{label:"Chat",icon:"chat",section:"Workspace",description:"Direct operator conversation"}},{path:"/operations",component:uk,meta:{label:"Operations",icon:"operations",section:"Operate",description:"Execution, agents, loops, processes, and schedules"}},{path:"/history",component:bk,meta:{label:"History",icon:"history",section:"Observe",description:"Audit trail, sessions, traces, and usage"}},{path:"/capabilities",component:Ek,meta:{label:"Capabilities",icon:"capabilities",section:"Manage",description:"Tools, skills, knowledge, and memory"}},{path:"/personality",component:$S,meta:{label:"Personality",icon:"personality",section:"Manage",description:"Behavior and response profile"}},{path:"/system",component:fw,meta:{label:"System",icon:"system",section:"Manage",description:"Health, configuration, access, and updates"}},{path:"/execution",redirect:_t("/operations","live")},{path:"/agents",redirect:_t("/operations","agents")},{path:"/loops",redirect:_t("/operations","loops")},{path:"/processes",redirect:_t("/operations","processes")},{path:"/schedules",redirect:_t("/operations","schedules")},{path:"/audit",redirect:_t("/history","audit")},{path:"/sessions",redirect:_t("/history","sessions")},{path:"/traces",redirect:_t("/history","traces")},{path:"/usage",redirect:_t("/history","usage")},{path:"/tools",redirect:_t("/capabilities","tools")},{path:"/skills",redirect:_t("/capabilities","skills")},{path:"/knowledge",redirect:_t("/capabilities","knowledge")},{path:"/memory",redirect:_t("/capabilities","memory")},{path:"/learned",redirect:_t("/capabilities","learned")},{path:"/health",redirect:_t("/system","health")},{path:"/resources",redirect:_t("/system","resources")},{path:"/logs",redirect:_t("/system","logs")},{path:"/config",redirect:_t("/system","config")},{path:"/host-access",redirect:_t("/system","host-access")},{path:"/internals",redirect:_t("/system","internals")}],Oi=J_({history:A_(),routes:qm});Oi.afterEach(e=>{var s;const t=(s=e.meta)==null?void 0:s.label;document.title=t?`Odin — ${t}`:"Odin — Management"});const BS={template:`
    @@ -6065,7 +6065,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const n="

    An err

    -
    `,props:["onLogin","sessionExpired"],setup(e){const t=h(""),s=h(null),n=h(!1),a=h(!1);async function i(){n.value=!0,s.value=null;try{K.setPersist(a.value),await K.login(t.value),e.onLogin()}catch(l){s.value=l.message||"Login failed"}finally{n.value=!1}}return{token:t,error:s,busy:n,persist:a,login:i}}},US={template:` + `,props:["onLogin","sessionExpired"],setup(e){const t=h(""),s=h(null),n=h(!1),a=h(!1);async function i(){n.value=!0,s.value=null;try{G.setPersist(a.value),await G.login(t.value),e.onLogin()}catch(l){s.value=l.message||"Login failed"}finally{n.value=!1}}return{token:t,error:s,busy:n,persist:a,login:i}}},US={template:`
    Loading application... @@ -6163,4 +6163,4 @@ Please report this to https://github.com/markedjs/marked.`,e){const n="

    An err

    - `,setup(){const e=h("checking"),t=h(!1),s=h(!1),n=h(!1),a=h(null),i=h(null),l=h(!1);let r=null,o=null;const c=h(!1),d=h("disconnected"),u=h(-1),f=h(null);let p=null;const b=h("starting"),y=h(""),E=qm.filter(O=>O.meta),I=J(()=>["Workspace","Operate","Observe","Manage"].map(O=>({name:O,routes:E.filter(N=>N.meta.section===O)})).filter(O=>O.routes.length)),x=J(()=>{var O;return((O=Ii.currentRoute.value.meta)==null?void 0:O.label)||"Odin"}),m=J(()=>{var O;return((O=Ii.currentRoute.value.meta)==null?void 0:O.section)||"Management"}),_=J(()=>{var O;return((O=Ii.currentRoute.value.meta)==null?void 0:O.description)||"Management console"});K.onSessionExpired=()=>{t.value=!0,Ke.disconnect(),K.setToken(""),e.value="login"};function S(O){var N;if((O.ctrlKey||O.metaKey)&&O.key.toLowerCase()==="k"){e.value==="ready"&&(O.preventDefault(),Uu());return}if(n.value&&O.key==="Tab"){const Y=[...((N=a.value)==null?void 0:N.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])'))||[]];if(Y.length){const we=Y[0],ke=Y[Y.length-1];if(O.shiftKey&&(document.activeElement===we||!a.value.contains(document.activeElement))){O.preventDefault(),ke.focus();return}if(!O.shiftKey&&(document.activeElement===ke||!a.value.contains(document.activeElement))){O.preventDefault(),we.focus();return}}}if(O.key==="Escape"&&n.value){n.value=!1,O.preventDefault();return}if(O.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(O.target.tagName)){O.preventDefault();const Y=document.querySelector('.hm-main input[type="text"], .hm-main .hm-input:not(textarea):not(select)');Y&&Y.focus()}}function g(){l.value=!!(r!=null&&r.matches),l.value||(n.value=!1)}We(async()=>{document.addEventListener("keydown",S),r=window.matchMedia("(max-width: 900px)"),g(),r.addEventListener("change",g);const O=await K.check();O.ok?(e.value="ready",Q()):O.needsAuth?e.value="login":(e.value="ready",Q())});function w(){t.value=!1,e.value="ready",Q()}async function T(){await K.logout(),Ke.disconnect(),e.value="login"}function C(){s.value=!s.value}function M(){n.value=!n.value}ts(n,async O=>{var N,Y;if(O)o=document.activeElement,await It(),(Y=(N=a.value)==null?void 0:N.querySelector(".nav-item"))==null||Y.focus();else if(o!=null&&o.isConnected){const we=o;o=null,requestAnimationFrame(()=>we.focus())}});const H=J(()=>{switch(d.value){case"connected":return"Live";case"connecting":return"Connecting…";case"reconnecting":return"Reconnecting…";default:return"Disconnected"}});function P(O,N="info",Y=3e3){f.value={text:O,level:N},clearTimeout(p),p=setTimeout(()=>{f.value=null},Y)}let R=null,j=!1;function Q(){Ke.onStatusChange=O=>{c.value=O},Ke.onLatency=O=>{u.value=O},Ke.onStateChange=(O,N)=>{d.value=O,O==="connected"?(j&&P("Connection restored","success"),j=!0):O==="reconnecting"&&N.attempt===1&&P("Connection lost — reconnecting…","warn")},Ke.connect(),U(),R&&clearInterval(R),R=setInterval(U,15e3)}async function U(){try{const O=await K.get("/api/status");b.value=O.status==="online"?"online":"starting";const N=O.uptime_seconds||0,Y=Math.floor(N/3600),we=Math.floor(N%3600/60);y.value=`${Y}h ${we}m uptime`}catch{b.value="offline",y.value=""}}return xt(()=>{R&&clearInterval(R),Ke.disconnect(),document.removeEventListener("keydown",S),r==null||r.removeEventListener("change",g)}),{authState:e,sessionExpired:t,sidebarCollapsed:s,mobileOpen:n,wsConnected:c,wsState:d,wsLatency:u,wsLabel:H,wsToast:f,botStatus:b,botUptime:y,navRoutes:E,navGroups:I,currentPage:x,currentSection:m,currentDescription:_,sidebarEl:a,mobileMenuButton:i,isMobileViewport:l,onLogin:w,logout:T,toggleSidebar:C,toggleMobileNavigation:M,openPalette:Uu}}},Vn=Jl(US);Vn.component("odin-icon",gw);Vn.component("login-screen",BS);Vn.component("toast-container",z0);Vn.component("confirm-host",V0);Vn.component("command-palette",mw);Vn.directive("modal-focus",bw);Vn.use(Ii);Vn.mount("#app"); + `,setup(){const e=h("checking"),t=h(!1),s=h(!1),n=h(!1),a=h(null),i=h(null),l=h(!1);let r=null,o=null;const c=h(!1),d=h("disconnected"),u=h(-1),f=h(null);let p=null;const b=h("starting"),y=h(""),E=qm.filter(O=>O.meta),I=J(()=>["Workspace","Operate","Observe","Manage"].map(O=>({name:O,routes:E.filter(N=>N.meta.section===O)})).filter(O=>O.routes.length)),x=J(()=>{var O;return((O=Oi.currentRoute.value.meta)==null?void 0:O.label)||"Odin"}),m=J(()=>{var O;return((O=Oi.currentRoute.value.meta)==null?void 0:O.section)||"Management"}),_=J(()=>{var O;return((O=Oi.currentRoute.value.meta)==null?void 0:O.description)||"Management console"});G.onSessionExpired=()=>{t.value=!0,Ke.disconnect(),G.setToken(""),e.value="login"};function S(O){var N;if((O.ctrlKey||O.metaKey)&&O.key.toLowerCase()==="k"){e.value==="ready"&&(O.preventDefault(),Uu());return}if(n.value&&O.key==="Tab"){const Y=[...((N=a.value)==null?void 0:N.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])'))||[]];if(Y.length){const we=Y[0],ke=Y[Y.length-1];if(O.shiftKey&&(document.activeElement===we||!a.value.contains(document.activeElement))){O.preventDefault(),ke.focus();return}if(!O.shiftKey&&(document.activeElement===ke||!a.value.contains(document.activeElement))){O.preventDefault(),we.focus();return}}}if(O.key==="Escape"&&n.value){n.value=!1,O.preventDefault();return}if(O.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(O.target.tagName)){O.preventDefault();const Y=document.querySelector('.hm-main input[type="text"], .hm-main .hm-input:not(textarea):not(select)');Y&&Y.focus()}}function g(){l.value=!!(r!=null&&r.matches),l.value||(n.value=!1)}We(async()=>{document.addEventListener("keydown",S),r=window.matchMedia("(max-width: 900px)"),g(),r.addEventListener("change",g);const O=await G.check();O.ok?(e.value="ready",Q()):O.needsAuth?e.value="login":(e.value="ready",Q())});function w(){t.value=!1,e.value="ready",Q()}async function T(){await G.logout(),Ke.disconnect(),e.value="login"}function C(){s.value=!s.value}function M(){n.value=!n.value}ns(n,async O=>{var N,Y;if(O)o=document.activeElement,await Rt(),(Y=(N=a.value)==null?void 0:N.querySelector(".nav-item"))==null||Y.focus();else if(o!=null&&o.isConnected){const we=o;o=null,requestAnimationFrame(()=>we.focus())}});const H=J(()=>{switch(d.value){case"connected":return"Live";case"connecting":return"Connecting…";case"reconnecting":return"Reconnecting…";default:return"Disconnected"}});function P(O,N="info",Y=3e3){f.value={text:O,level:N},clearTimeout(p),p=setTimeout(()=>{f.value=null},Y)}let R=null,j=!1;function Q(){Ke.onStatusChange=O=>{c.value=O},Ke.onLatency=O=>{u.value=O},Ke.onStateChange=(O,N)=>{d.value=O,O==="connected"?(j&&P("Connection restored","success"),j=!0):O==="reconnecting"&&N.attempt===1&&P("Connection lost — reconnecting…","warn")},Ke.connect(),U(),R&&clearInterval(R),R=setInterval(U,15e3)}async function U(){try{const O=await G.get("/api/status");b.value=O.status==="online"?"online":"starting";const N=O.uptime_seconds||0,Y=Math.floor(N/3600),we=Math.floor(N%3600/60);y.value=`${Y}h ${we}m uptime`}catch{b.value="offline",y.value=""}}return xt(()=>{R&&clearInterval(R),Ke.disconnect(),document.removeEventListener("keydown",S),r==null||r.removeEventListener("change",g)}),{authState:e,sessionExpired:t,sidebarCollapsed:s,mobileOpen:n,wsConnected:c,wsState:d,wsLatency:u,wsLabel:H,wsToast:f,botStatus:b,botUptime:y,navRoutes:E,navGroups:I,currentPage:x,currentSection:m,currentDescription:_,sidebarEl:a,mobileMenuButton:i,isMobileViewport:l,onLogin:w,logout:T,toggleSidebar:C,toggleMobileNavigation:M,openPalette:Uu}}},zn=Jl(US);zn.component("odin-icon",gw);zn.component("login-screen",BS);zn.component("toast-container",z0);zn.component("confirm-host",V0);zn.component("command-palette",mw);zn.directive("modal-focus",bw);zn.use(Oi);zn.mount("#app"); diff --git a/ui/dist/index.html b/ui/dist/index.html index c5cb4d1a..89e59e2a 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -9,7 +9,7 @@ Odin — Management - + diff --git a/ui/js/pages/llm-config.js b/ui/js/pages/llm-config.js index bce54c9d..895a7eef 100644 --- a/ui/js/pages/llm-config.js +++ b/ui/js/pages/llm-config.js @@ -234,7 +234,7 @@ export default {
    Context compressionLong-conversation compaction

    - Saved values need a restart. This process still uses compression {{ llmStatus.codex.effective_context_compression?.enabled ? 'on' : 'off' }}, {{ Number(llmStatus.codex.effective_context_compression?.max_context_chars || 0).toLocaleString() }} characters, and {{ llmStatus.codex.effective_context_compression?.keep_recent_iterations }} recent iterations. + Saved values need a restart. This process still uses compression {{ llmStatus.codex.effective_context_compression?.enabled ? 'on' : 'off' }}, {{ formatContextCeiling(llmStatus.codex.effective_context_compression?.max_context_chars) }}, and {{ llmStatus.codex.effective_context_compression?.keep_recent_iterations }} recent iterations.

    Saved values match this process. Future changes take effect after restart. @@ -746,6 +746,12 @@ export default { return Number.isFinite(Number(value)) ? Number(value).toLocaleString() : '—'; } + function formatContextCeiling(value) { + return value == null + ? 'automatic (model-derived)' + : Number(value).toLocaleString() + ' characters'; + } + function formatExpiry(value) { const date = new Date(value); return Number.isNaN(date.getTime()) ? 'unknown' : date.toLocaleString([], { dateStyle: 'medium', timeStyle: 'short' }); @@ -1264,7 +1270,7 @@ export default { activateAccount, refreshAccount, startEditLabel, saveLabel, deleteAccount, startDeviceLogin, cancelDeviceLogin, formatSize, fetchContextWindows, clearContextClamp, setContextOverride, setContextUtilization, resetContextOverride, overrideAboveFloor, - formatCount, formatExpiry, shortAccountKey, provenanceClass, + formatCount, formatContextCeiling, formatExpiry, shortAccountKey, provenanceClass, }; }, };