From da8a82bfd5b88266d9353b24a1bee1ae4ccb785f Mon Sep 17 00:00:00 2001 From: ddaodan <731882332@qq.com> Date: Mon, 17 Aug 2026 15:44:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E4=B8=8E=20TTS=20=E9=A2=84=E7=83=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 + app/danmu_queue.py | 328 +++++++++++++-- app/faster_qwen_worker.py | 130 +++++- config/config.json | 3 +- tests/test_faster_qwen_worker.py | 86 ++++ tests/test_system_scheduler.py | 166 +++++++- tests/test_tts_pipeline.py | 44 ++ web/admin/assets/index-CIcFYlv1.js | 631 ----------------------------- 8 files changed, 718 insertions(+), 676 deletions(-) delete mode 100644 web/admin/assets/index-CIcFYlv1.js diff --git a/.gitignore b/.gitignore index dd6b915..b2d0ba1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ __pycache__/ *.py[cod] .venv/ +.venv-tts/ runtime/ config/.venv_python_path.txt @@ -21,6 +22,10 @@ data/queue_state.json data/song_requests.json data/tts_state.json data/bilibili_credentials.json +data/admin_audit.log +data/admin_auth.json +data/statistics.sqlite3* +data/users.json web/music_cover.jpg # IDE @@ -30,3 +35,4 @@ web/music_cover.jpg # Large binaries (kept local only) vendor/mpv/mpv.exe vendor/mpv/mpv.7z +vendor/tts-model/ diff --git a/app/danmu_queue.py b/app/danmu_queue.py index 8c68e30..29c54c6 100644 --- a/app/danmu_queue.py +++ b/app/danmu_queue.py @@ -61,6 +61,10 @@ from pathlib import Path from typing import Any MIHOYO_SDK_REGISTRY_SUBKEY = r"Software\miHoYoSDK" +MANUAL_LIVE_TEST_DURATION_SECONDS = 30 * 60 +BILIBILI_LIVE_STATUS_POLL_TIMEOUT_SECONDS = 45.0 +BILIBILI_LIVE_STATUS_POLL_INTERVAL_SECONDS = 2.0 +BILIBILI_LIVE_STATUS_REFRESH_SECONDS = 60.0 def delete_mihoyo_sdk_registry(logger: logging.Logger, subkey: str = MIHOYO_SDK_REGISTRY_SUBKEY) -> dict[str, Any]: @@ -511,6 +515,7 @@ class Config: tts_all["faster-qwen3-tts"].setdefault("chunk_size", 8) tts_all["faster-qwen3-tts"].setdefault("append_silence", True) tts_all["faster-qwen3-tts"].setdefault("streaming", True) + tts_all["faster-qwen3-tts"].setdefault("startup_timeout_seconds", 900) self.data.setdefault("frontend", {}) if legacy_frontend: self.data["frontend"].update(legacy_frontend) @@ -2450,6 +2455,10 @@ class FasterQwen3TTSEngine: self.cpu_threads = max(1, min(8, int(self.cfg.get("cpu_threads", 4) or 4))) self.cpu_affinity_count = max(0, int(self.cfg.get("cpu_affinity_count", 8) or 0)) self.process_priority = str(self.cfg.get("process_priority", "below_normal") or "below_normal") + self.startup_timeout_seconds = max( + 60, + int(self.cfg.get("startup_timeout_seconds", 900) or 900), + ) self.logger = logger self._parent = parent self._worker_ready = False @@ -2473,6 +2482,7 @@ class FasterQwen3TTSEngine: }, logger, synthesis_timeout_seconds=120, + startup_timeout_seconds=self.startup_timeout_seconds, ) if bool(self.cfg.get("streaming", False)): self.logger.warning("[FasterQwenTTS] 独立 worker 仅使用非流式模式,已忽略 streaming=true") @@ -2720,6 +2730,7 @@ class Broadcaster: self._tts_sequence = 0 self._tts_started = False self._tts_warmup_done = asyncio.Event() + self._tts_warmup_task: asyncio.Task | None = None self._broadcast_channels: dict[str, dict[str, str]] = {} self._stop = False # 弹幕会话已登录标志: 启动时ping一下 nav API, -101 表示 SESSDATA 失效, 关闭弹幕发送 @@ -2762,9 +2773,14 @@ class Broadcaster: self.logger.warning("[TTS] 配置热更新时无法调度旧 worker 关闭") self.logger.info(f"[配置] 播报配置已热更新: danmu={self.enable_danmu}, tts={self.config.tts_provider}") + async def _warmup_tts_in_background(self, tts: TTSEngine): + try: + await tts.warmup() + finally: + self._tts_warmup_done.set() + async def start(self): if self._tts_started: - await self._tts_warmup_done.wait() return self._tts_started = True if not self.tts.enabled: @@ -2777,10 +2793,16 @@ class Broadcaster: for task in (synth_task, play_task): task.add_done_callback(self._tts_worker_tasks.discard) - try: - if bool(self._tts_queue_cfg.get("warmup_on_start", True)): - await self.tts.warmup() - finally: + if bool(self._tts_queue_cfg.get("warmup_on_start", True)): + warmup_task = asyncio.create_task( + self._warmup_tts_in_background(self.tts), + name="TTS后台预热", + ) + self._tts_warmup_task = warmup_task + self._tts_worker_tasks.add(warmup_task) + warmup_task.add_done_callback(self._tts_worker_tasks.discard) + self.logger.info("[TTS队列] 后台预热已启动,不阻塞弹幕监听") + else: self._tts_warmup_done.set() self.logger.info( f"[TTS队列] 流水线启动, pending={self._tts_pending.maxsize}, " @@ -5285,6 +5307,11 @@ class CommandHandler: ) def _is_live_time(self) -> bool: + if self.system and ( + self.system.manual_live_override_active() + or self.system.bilibili_live_active() + ): + return True return is_within_live_time(self.config.system_cfg) def _rule_matches(self, rule: dict, text: str) -> bool: @@ -6867,6 +6894,23 @@ def get_real_room_id(room_id: int, cookie: str = "") -> int: return real_room_id +def get_bilibili_live_status(room_id: int, cookie: str = "") -> int: + """返回 B站房间直播状态:0=未开播,1=直播中,其他值按接口原样返回。""" + data = _request_bilibili_json( + f"https://api.live.bilibili.com/room/v1/Room/get_info?room_id={int(room_id)}", + cookie, + f"https://live.bilibili.com/{int(room_id)}", + ) + if data.get("code") != 0: + raise RuntimeError( + f"查询直播状态失败: code={data.get('code')} message={data.get('message', '')}" + ) + try: + return int((data.get("data") or {}).get("live_status", -1)) + except (TypeError, ValueError) as exc: + raise RuntimeError("直播状态接口未返回有效 live_status") from exc + + def get_danmu_server(room_id: int, cookie: str = "") -> dict: """使用登录 Cookie 获取弹幕服务器和专用 token;token 不得回退为 SESSDATA。""" url = f"https://api.live.bilibili.com/xlive/web-room/v1/index/getDanmuInfo?id={int(room_id)}" @@ -7241,6 +7285,9 @@ class SystemScheduler: self._live_session_started_at: datetime | None = None self._startup_compensation_task: asyncio.Task | None = None self._startup_compensation_window_key: str | None = None + self._last_live_action_error = "" + self._last_bilibili_live_status: int | None = None + self._last_live_status_refresh_monotonic = 0.0 @property def cfg(self) -> dict: @@ -7452,6 +7499,89 @@ class SystemScheduler: user32.EnumWindows(EnumWindowsProc(callback), 0) return hwnd_found[0] if hwnd_found else None + @property + def last_live_action_error(self) -> str: + return self._last_live_action_error + + @staticmethod + def _force_foreground_window(hwnd: int) -> bool: + """在同一登录会话中临时合并输入线程,可靠地前置目标窗口。""" + user32 = ctypes.windll.user32 + kernel32 = ctypes.windll.kernel32 + current_thread = int(kernel32.GetCurrentThreadId()) + foreground = int(user32.GetForegroundWindow() or 0) + target_pid = ctypes.wintypes.DWORD() + target_thread = int(user32.GetWindowThreadProcessId(hwnd, ctypes.byref(target_pid)) or 0) + foreground_thread = 0 + if foreground: + foreground_pid = ctypes.wintypes.DWORD() + foreground_thread = int( + user32.GetWindowThreadProcessId(foreground, ctypes.byref(foreground_pid)) or 0 + ) + + attached: list[int] = [] + try: + for thread_id in {target_thread, foreground_thread}: + if thread_id and thread_id != current_thread: + if user32.AttachThreadInput(current_thread, thread_id, True): + attached.append(thread_id) + if user32.IsIconic(hwnd): + user32.ShowWindow(hwnd, 9) # SW_RESTORE + else: + user32.ShowWindow(hwnd, 5) # SW_SHOW + user32.BringWindowToTop(hwnd) + user32.SetForegroundWindow(hwnd) + user32.SetActiveWindow(hwnd) + user32.SetFocus(hwnd) + finally: + for thread_id in reversed(attached): + user32.AttachThreadInput(current_thread, thread_id, False) + return int(user32.GetForegroundWindow() or 0) == int(hwnd) + + async def _get_bilibili_live_status(self, *, record_error: bool = True) -> int | None: + try: + status = await asyncio.to_thread( + get_bilibili_live_status, + int(self.config.room_id), + self.config.bilibili_cookie, + ) + self._last_bilibili_live_status = status + if self.system: + self.system.set_bilibili_live_status(status) + return status + except Exception as exc: + message = f"查询 B站直播状态失败: {exc}" + if record_error: + self._last_live_action_error = message + self.logger.warning(f"[系统定时] {message}") + else: + self.logger.debug(f"[系统定时] {message}") + return None + + async def _wait_for_bilibili_live_status( + self, + expected_status: int, + *, + timeout_seconds: float = BILIBILI_LIVE_STATUS_POLL_TIMEOUT_SECONDS, + ) -> bool: + effective_timeout = max(1.0, float(timeout_seconds)) + deadline = time.monotonic() + effective_timeout + while True: + status = await self._get_bilibili_live_status() + if status == expected_status: + self._last_live_action_error = "" + return True + remaining = deadline - time.monotonic() + if remaining <= 0: + state_name = "开播" if expected_status == 1 else "关播" + self._last_live_action_error = ( + f"已点击直播姬,但 B站在 {int(effective_timeout)} 秒内未确认{state_name}" + f"(live_status={status})" + ) + self.logger.warning(f"[系统定时] {self._last_live_action_error}") + return False + await asyncio.sleep(min(BILIBILI_LIVE_STATUS_POLL_INTERVAL_SECONDS, remaining)) + async def _click_bilibili_live( self, *, @@ -7460,57 +7590,137 @@ class SystemScheduler: action_name: str, confirm_enter: bool = False, ) -> bool: - """把直播姬窗口前置,在指定比例坐标点击;可选按 Enter 确认弹窗。""" + """确认直播姬获得前台后,在恢复后的窗口坐标内点击。""" + self._last_live_action_error = "" if os.name != "nt": - self.logger.warning(f"[系统定时] 当前系统不支持自动{action_name}") + self._last_live_action_error = f"当前系统不支持自动{action_name}" + self.logger.warning(f"[系统定时] {self._last_live_action_error}") return False keyword = self.cfg.get("bilibili_push_window_keyword", "直播姬") hwnd = self._find_window_by_keyword(keyword) if not hwnd: - self.logger.warning(f"[系统定时] 未找到直播姬窗口,关键字: {keyword}") + self._last_live_action_error = f"未找到直播姬窗口,关键字: {keyword}" + self.logger.warning(f"[系统定时] {self._last_live_action_error}") return False user32 = ctypes.windll.user32 - rect = ctypes.wintypes.RECT() - if not user32.GetWindowRect(hwnd, ctypes.byref(rect)): - self.logger.warning("[系统定时] 获取直播姬窗口位置失败") - return False - x_ratio = float(self.cfg.get(x_ratio_key, 0.741)) - y_ratio = float(self.cfg.get(y_ratio_key, 0.907)) - x = int(rect.left + max(0.0, min(1.0, x_ratio)) * (rect.right - rect.left)) - y = int(rect.top + max(0.0, min(1.0, y_ratio)) * (rect.bottom - rect.top)) + previous_dpi_context = None + set_thread_dpi_context = getattr(user32, "SetThreadDpiAwarenessContext", None) try: - user32.ShowWindow(hwnd, 9) # SW_RESTORE - user32.SetForegroundWindow(hwnd) + if set_thread_dpi_context: + set_thread_dpi_context.restype = ctypes.c_void_p + previous_dpi_context = set_thread_dpi_context(ctypes.c_void_p(-4)) + + if user32.IsIconic(hwnd): + user32.ShowWindow(hwnd, 9) # SW_RESTORE + else: + user32.ShowWindow(hwnd, 5) # SW_SHOW await asyncio.sleep(0.5) - user32.SetCursorPos(x, y) + if not self._force_foreground_window(hwnd): + await asyncio.sleep(0.3) + if int(user32.GetForegroundWindow() or 0) != int(hwnd): + self._last_live_action_error = "直播姬窗口无法获得前台,已取消点击以避免误操作其他窗口" + self.logger.warning(f"[系统定时] {self._last_live_action_error}") + return False + + rect = ctypes.wintypes.RECT() + if not user32.GetWindowRect(hwnd, ctypes.byref(rect)): + self._last_live_action_error = "获取直播姬窗口位置失败" + self.logger.warning(f"[系统定时] {self._last_live_action_error}") + return False + width = int(rect.right - rect.left) + height = int(rect.bottom - rect.top) + if width < 200 or height < 150: + self._last_live_action_error = ( + f"直播姬窗口尺寸异常: rect=({rect.left},{rect.top},{rect.right},{rect.bottom})" + ) + self.logger.warning(f"[系统定时] {self._last_live_action_error}") + return False + + x_ratio = float(self.cfg.get(x_ratio_key, 0.741)) + y_ratio = float(self.cfg.get(y_ratio_key, 0.907)) + x = int(rect.left + max(0.0, min(1.0, x_ratio)) * width) + y = int(rect.top + max(0.0, min(1.0, y_ratio)) * height) + virtual_left = int(user32.GetSystemMetrics(76)) + virtual_top = int(user32.GetSystemMetrics(77)) + virtual_right = virtual_left + int(user32.GetSystemMetrics(78)) + virtual_bottom = virtual_top + int(user32.GetSystemMetrics(79)) + if not (virtual_left <= x < virtual_right and virtual_top <= y < virtual_bottom): + self._last_live_action_error = ( + f"直播姬点击坐标超出屏幕: x={x}, y={y}, " + f"screen=({virtual_left},{virtual_top},{virtual_right},{virtual_bottom})" + ) + self.logger.warning(f"[系统定时] {self._last_live_action_error}") + return False + + previous_cursor = ctypes.wintypes.POINT() + has_previous_cursor = bool(user32.GetCursorPos(ctypes.byref(previous_cursor))) + if not user32.SetCursorPos(x, y): + self._last_live_action_error = ( + f"无法移动鼠标到直播姬按钮位置: x={x}, y={y}。" + "请通过桌面上可见的 run.bat 控制台启动服务后重试" + ) + self.logger.warning(f"[系统定时] {self._last_live_action_error}") + return False await asyncio.sleep(0.1) + if int(user32.GetForegroundWindow() or 0) != int(hwnd): + self._last_live_action_error = "点击前直播姬失去前台,已取消操作" + self.logger.warning(f"[系统定时] {self._last_live_action_error}") + if has_previous_cursor: + user32.SetCursorPos(previous_cursor.x, previous_cursor.y) + return False user32.mouse_event(0x0002, 0, 0, 0, 0) # LEFTDOWN await asyncio.sleep(0.05) user32.mouse_event(0x0004, 0, 0, 0, 0) # LEFTUP + if has_previous_cursor: + user32.SetCursorPos(previous_cursor.x, previous_cursor.y) if confirm_enter: await asyncio.sleep(0.8) user32.keybd_event(0x0D, 0, 0, 0) # VK_RETURN key down user32.keybd_event(0x0D, 0, 0x0002, 0) # key up - self.logger.info(f"[系统定时] 已点击直播姬{action_name}: hwnd={hwnd}, x={x}, y={y}") + self.logger.info( + f"[系统定时] 已点击直播姬{action_name}: hwnd={hwnd}, x={x}, y={y}, " + f"rect=({rect.left},{rect.top},{rect.right},{rect.bottom})" + ) return True except Exception as e: - self.logger.warning(f"[系统定时] 点击直播姬{action_name}失败: {e}") + self._last_live_action_error = f"点击直播姬{action_name}失败: {e}" + self.logger.warning(f"[系统定时] {self._last_live_action_error}") return False + finally: + if set_thread_dpi_context and previous_dpi_context: + try: + set_thread_dpi_context(ctypes.c_void_p(previous_dpi_context)) + except Exception: + pass async def push_bilibili_live(self) -> bool: - return await self._click_bilibili_live( + self._last_live_action_error = "" + if await self._get_bilibili_live_status() == 1: + self.logger.info("[系统定时] B站已处于开播状态,跳过重复点击") + return True + clicked = await self._click_bilibili_live( x_ratio_key="bilibili_push_click_x_ratio", y_ratio_key="bilibili_push_click_y_ratio", action_name="开启推流按钮", ) + if not clicked: + return False + return await self._wait_for_bilibili_live_status(1) async def stop_bilibili_live(self) -> bool: - return await self._click_bilibili_live( + self._last_live_action_error = "" + if await self._get_bilibili_live_status() == 0: + self.logger.info("[系统定时] B站已处于未开播状态,跳过重复关播点击") + return True + clicked = await self._click_bilibili_live( x_ratio_key="bilibili_stop_push_click_x_ratio", y_ratio_key="bilibili_stop_push_click_y_ratio", action_name="关闭推流按钮", confirm_enter=bool(self.cfg.get("bilibili_stop_push_confirm_enter", True)), ) + if not clicked: + return False + return await self._wait_for_bilibili_live_status(0) def _schedule_reboot_after_stop(self, stopped_at: datetime) -> bool: if not self._is_enabled("reboot_after_stop_enabled"): @@ -7677,6 +7887,13 @@ class SystemScheduler: now = datetime.now().replace(second=0, microsecond=0) today = date.today().isoformat() try: + monotonic_now = time.monotonic() + if ( + monotonic_now - self._last_live_status_refresh_monotonic + >= BILIBILI_LIVE_STATUS_REFRESH_SECONDS + ): + self._last_live_status_refresh_monotonic = monotonic_now + await self._get_bilibili_live_status(record_error=False) for event, when in self._live_occurrences(now): key = self._event_key(event, when) if key in self._triggered_events or not self._event_due(now, when): @@ -7744,6 +7961,11 @@ class QueueSystem: self.stats_store = stats_store self.health = ServiceRegistry(stats_store) self.live_client = None + self._manual_live_override_until_monotonic = 0.0 + self._manual_live_override_until_wall = 0.0 + self._bilibili_live_status: int | None = None + self._bilibili_live_status_updated_monotonic = 0.0 + self._bilibili_live_status_updated_wall = 0.0 self.health.set("主程序", ServiceRegistry.STARTING, "初始化") self.health.set("配置", ServiceRegistry.RUNNING, f"revision={config.revision}") self.user_mgr = UserManager( @@ -7792,6 +8014,54 @@ class QueueSystem: self.handler.login_monitor = self.login_monitor self.health.set("主程序", ServiceRegistry.RUNNING, "初始化完成") + def enable_manual_live_override( + self, + duration_seconds: int = MANUAL_LIVE_TEST_DURATION_SECONDS, + ) -> float: + duration = max(60, min(int(duration_seconds), 6 * 60 * 60)) + self._manual_live_override_until_monotonic = time.monotonic() + duration + self._manual_live_override_until_wall = time.time() + duration + self.logger.info(f"[直播测试] 已临时开放弹幕指令 {duration // 60} 分钟") + return self._manual_live_override_until_wall + + def clear_manual_live_override(self) -> None: + was_active = self.manual_live_override_active() + self._manual_live_override_until_monotonic = 0.0 + self._manual_live_override_until_wall = 0.0 + if was_active: + self.logger.info("[直播测试] 已关闭手动直播指令时段") + + def manual_live_override_active(self) -> bool: + if self._manual_live_override_until_monotonic <= time.monotonic(): + self._manual_live_override_until_monotonic = 0.0 + self._manual_live_override_until_wall = 0.0 + return False + return True + + def manual_live_override_snapshot(self) -> dict[str, Any]: + active = self.manual_live_override_active() + return { + "active": active, + "until": self._manual_live_override_until_wall if active else 0.0, + } + + def set_bilibili_live_status(self, status: int) -> None: + self._bilibili_live_status = int(status) + self._bilibili_live_status_updated_monotonic = time.monotonic() + self._bilibili_live_status_updated_wall = time.time() + + def bilibili_live_active(self, max_age_seconds: float = 120.0) -> bool: + status = getattr(self, "_bilibili_live_status", None) + updated = float(getattr(self, "_bilibili_live_status_updated_monotonic", 0.0) or 0.0) + return status == 1 and time.monotonic() - updated <= max(1.0, max_age_seconds) + + def bilibili_live_status_snapshot(self) -> dict[str, Any]: + return { + "status": getattr(self, "_bilibili_live_status", None), + "updated_at": float(getattr(self, "_bilibili_live_status_updated_wall", 0.0) or 0.0), + "active": self.bilibili_live_active(), + } + def apply_config(self): self.config.apply_runtime_settings() self.user_mgr.config = self.config @@ -9223,6 +9493,8 @@ class WebServer: "active_song_request": song_state.get("active"), "recent_danmu": list(getattr(self.system.handler, "recent_danmu", [])[-25:]), "recent_gifts": list(getattr(self.system.handler, "recent_gifts", [])[-25:]), + "manual_live_test": self.system.manual_live_override_snapshot(), + "bilibili_live": self.system.bilibili_live_status_snapshot(), }) return state @@ -10284,13 +10556,19 @@ class WebServer: elif action == "test_bilibili_push": ok = await self.scheduler.push_bilibili_live() if not ok: - return web.json_response({"success": False, "error": "未找到直播姬窗口或点击失败"}, status=400) + error = self.scheduler.last_live_action_error or "直播姬开播测试失败" + return web.json_response({"success": False, "error": error}, status=400) + manual_until = self.system.enable_manual_live_override() audit_target = "bilibili_push" + audit_detail = f"live confirmed manual_until={manual_until:.0f}" elif action == "test_bilibili_stop_push": ok = await self.scheduler.stop_bilibili_live() if not ok: - return web.json_response({"success": False, "error": "未找到直播姬窗口或关闭推流点击失败"}, status=400) + error = self.scheduler.last_live_action_error or "直播姬关播测试失败" + return web.json_response({"success": False, "error": error}, status=400) + self.system.clear_manual_live_override() audit_target = "bilibili_stop_push" + audit_detail = "offline confirmed" elif action == "save_system_schedule_config": data = await request.json() self.config.reload() diff --git a/app/faster_qwen_worker.py b/app/faster_qwen_worker.py index 020eab5..2dbb287 100644 --- a/app/faster_qwen_worker.py +++ b/app/faster_qwen_worker.py @@ -3,6 +3,7 @@ from __future__ import annotations import io import multiprocessing import os +import sys import threading import time import traceback @@ -13,13 +14,14 @@ from typing import Any, Callable MAX_NEW_TOKENS = 384 DEFAULT_SYNTHESIS_TIMEOUT_SECONDS = 120.0 -DEFAULT_STARTUP_TIMEOUT_SECONDS = 480.0 +DEFAULT_STARTUP_TIMEOUT_SECONDS = 900.0 # 启动失败后再次拉起 worker 的最小间隔:避免"启动超时→立即重启→再超时"的死循环 # 在系统高负载时持续加载 torch/CUDA,进一步加剧卡顿。 STARTUP_FAILURE_BACKOFF_SECONDS = 60.0 DEFAULT_CPU_THREADS = 4 DEFAULT_CPU_AFFINITY_COUNT = 8 DEFAULT_PROCESS_PRIORITY = "below_normal" +STARTUP_PROGRESS_POLL_SECONDS = 1.0 class FasterQwenWorkerError(RuntimeError): @@ -122,15 +124,26 @@ def _apply_worker_process_limits(settings: dict[str, Any]) -> dict[str, Any]: } -def _load_runtime(settings: dict[str, Any]) -> dict[str, Any]: +def _load_runtime( + settings: dict[str, Any], + progress: Callable[[str], None] | None = None, +) -> dict[str, Any]: + def report(stage: str) -> None: + if progress: + progress(stage) + device = str(settings.get("device") or "cuda") if device == "cpu" and "CUDA_VISIBLE_DEVICES" not in os.environ: os.environ["CUDA_VISIBLE_DEVICES"] = "" cpu_threads = _configure_worker_environment(settings) + report("torch_import_started") import torch + report("torch_import_complete") _configure_torch_threads(torch, cpu_threads) + report("tts_library_import_started") from faster_qwen3_tts import FasterQwen3TTS + report("tts_library_import_complete") if device == "cpu": torch.cuda.is_available = lambda: False @@ -138,10 +151,12 @@ def _load_runtime(settings: dict[str, Any]) -> dict[str, Any]: load_kwargs: dict[str, Any] = {} if device == "cpu": load_kwargs["device"] = "cpu" + report("from_pretrained_started") model = FasterQwen3TTS.from_pretrained( str(settings.get("model_name_or_path") or "Qwen/Qwen3-TTS-12Hz-0.6B-Base"), **load_kwargs, ) + report("from_pretrained_complete") # voice_clone_prompt 不再预计算:当前 faster_qwen3_tts 的 FasterQwen3TTS 没有 # create_voice_clone_prompt 方法,预计算只会失败。改为每次合成时在 @@ -193,21 +208,63 @@ def _synthesize_wav(runtime: dict[str, Any], text: str) -> bytes: def faster_qwen_worker_main(connection: Connection, settings: dict[str, Any]) -> None: + def report(stage: str, **details: Any) -> None: + try: + connection.send({ + "type": "progress", + "stage": stage, + "pid": os.getpid(), + **details, + }) + except Exception: + pass + try: + report("process_started", executable=sys.executable, prefix=sys.prefix) cpu_threads = _configure_worker_environment(settings) - process_limits = _apply_worker_process_limits(settings) + report("environment_ready", cpu_threads=cpu_threads) load_started = time.monotonic() - runtime = _load_runtime(settings) + report("model_loading", model_name=str(settings.get("model_name_or_path") or "")) + runtime = _load_runtime(settings, progress=report) load_ms = int((time.monotonic() - load_started) * 1000) + report("model_loaded", load_ms=load_ms) warmup_started = time.monotonic() + graph_warmup_ms = 0 + report("warmup_started") + warmup = getattr(runtime["model"], "warmup", None) + if callable(warmup): + graph_warmup_started = time.monotonic() + warmup() + graph_warmup_ms = int((time.monotonic() - graph_warmup_started) * 1000) + report("graph_warmup_complete", graph_warmup_ms=graph_warmup_ms) + + # model.warmup() 只捕获模型内部 CUDA Graph,不会初始化参考音频和 + # voice-clone 生成路径。若把这一步留到首条播报,后台会在近一分钟内 + # 看起来毫无响应,因此在降低进程优先级之前完成一次真实短句合成。 + voice_clone_warmup_started = time.monotonic() + report("voice_clone_warmup_started") _synthesize_wav(runtime, "系统启动") + voice_clone_warmup_ms = int((time.monotonic() - voice_clone_warmup_started) * 1000) + report("voice_clone_warmup_complete", voice_clone_warmup_ms=voice_clone_warmup_ms) warmup_ms = int((time.monotonic() - warmup_started) * 1000) + report( + "warmup_complete", + warmup_ms=warmup_ms, + graph_warmup_ms=graph_warmup_ms, + voice_clone_warmup_ms=voice_clone_warmup_ms, + ) + + # 加载和 CUDA Graph 捕获需要完整 CPU 调度能力。仅在预热完成后降低 + # worker 优先级和亲和性,避免繁忙直播环境下启动时间被放大到超时。 + process_limits = _apply_worker_process_limits(settings) connection.send({ "type": "ready", "pid": os.getpid(), "load_ms": load_ms, "warmup_ms": warmup_ms, + "graph_warmup_ms": graph_warmup_ms, + "voice_clone_warmup_ms": voice_clone_warmup_ms, "max_new_tokens": MAX_NEW_TOKENS, "cpu_threads": cpu_threads, **process_limits, @@ -278,7 +335,7 @@ class FasterQwenWorkerClient: self.settings = dict(settings) self.logger = logger self.synthesis_timeout_seconds = max(1.0, float(synthesis_timeout_seconds)) - self.startup_timeout_seconds = max(10.0, float(startup_timeout_seconds)) + self.startup_timeout_seconds = max(0.1, float(startup_timeout_seconds)) self._context = context or multiprocessing.get_context("spawn") self._process_target = process_target or faster_qwen_worker_main self._lock = threading.RLock() @@ -330,21 +387,55 @@ class FasterQwenWorkerClient: self._worker_pid = int(getattr(process, "pid", 0) or 0) self._log("info", "[FasterQwenTTS] worker 已启动, pid=%s,正在加载和预热", self.worker_pid) - if not parent_connection.poll(self.startup_timeout_seconds): - self._next_start_after = time.monotonic() + STARTUP_FAILURE_BACKOFF_SECONDS - self._terminate_worker_locked("startup_timeout", graceful=False) - raise FasterQwenWorkerError( - f"Faster-Qwen3-TTS worker startup exceeded {self.startup_timeout_seconds:.0f}s" - ) - try: - message = parent_connection.recv() - except (EOFError, OSError) as exc: - self._next_start_after = time.monotonic() + STARTUP_FAILURE_BACKOFF_SECONDS - self._terminate_worker_locked("startup_connection_closed", graceful=False) - raise FasterQwenWorkerError("Faster-Qwen3-TTS worker exited during startup") from exc + started = time.monotonic() + deadline = started + self.startup_timeout_seconds + last_stage = "process_spawned" + message: Any = None + while True: + remaining = deadline - time.monotonic() + if remaining <= 0: + self._next_start_after = time.monotonic() + STARTUP_FAILURE_BACKOFF_SECONDS + self._terminate_worker_locked("startup_timeout", graceful=False) + raise FasterQwenWorkerError( + f"Faster-Qwen3-TTS worker startup exceeded {self.startup_timeout_seconds:.0f}s " + f"(last_stage={last_stage})" + ) + if not parent_connection.poll(min(STARTUP_PROGRESS_POLL_SECONDS, remaining)): + if not process.is_alive(): + exit_code = getattr(process, "exitcode", None) + self._next_start_after = time.monotonic() + STARTUP_FAILURE_BACKOFF_SECONDS + self._terminate_worker_locked("startup_process_exited", graceful=False) + raise FasterQwenWorkerError( + f"Faster-Qwen3-TTS worker exited during startup " + f"(exit_code={exit_code}, last_stage={last_stage})" + ) + continue + try: + message = parent_connection.recv() + except (EOFError, OSError) as exc: + self._next_start_after = time.monotonic() + STARTUP_FAILURE_BACKOFF_SECONDS + self._terminate_worker_locked("startup_connection_closed", graceful=False) + raise FasterQwenWorkerError( + f"Faster-Qwen3-TTS worker connection closed during startup " + f"(last_stage={last_stage})" + ) from exc + if isinstance(message, dict) and message.get("type") == "progress": + last_stage = str(message.get("stage") or "unknown") + elapsed_ms = int((time.monotonic() - started) * 1000) + self._log( + "info", + "[FasterQwenTTS] worker 启动进度: %s, elapsed=%sms", + last_stage, + elapsed_ms, + ) + continue + break if not isinstance(message, dict) or message.get("type") != "ready": if isinstance(message, dict): error = str(message.get("error") or message.get("error_type") or "unknown startup error") + worker_traceback = str(message.get("traceback") or "").strip() + if worker_traceback: + self._log("error", "[FasterQwenTTS] worker 启动异常:\n%s", worker_traceback) else: error = "invalid startup response" self._next_start_after = time.monotonic() + STARTUP_FAILURE_BACKOFF_SECONDS @@ -353,10 +444,13 @@ class FasterQwenWorkerClient: self._next_start_after = 0.0 self._log( "info", - "[FasterQwenTTS] worker 预热完成, pid=%s load=%sms warmup=%sms max_new_tokens=%s", + "[FasterQwenTTS] worker 预热完成, pid=%s load=%sms warmup=%sms " + "graph=%sms voice_clone=%sms max_new_tokens=%s", self.worker_pid, message.get("load_ms"), message.get("warmup_ms"), + message.get("graph_warmup_ms"), + message.get("voice_clone_warmup_ms"), message.get("max_new_tokens"), ) self._log( diff --git a/config/config.json b/config/config.json index f179bb4..4eb8652 100644 --- a/config/config.json +++ b/config/config.json @@ -59,7 +59,8 @@ "streaming": false, "cpu_threads": 3, "cpu_affinity_count": 6, - "process_priority": "below_normal" + "process_priority": "below_normal", + "startup_timeout_seconds": 900 } }, "enable_danmu_reply": true, diff --git a/tests/test_faster_qwen_worker.py b/tests/test_faster_qwen_worker.py index 90afe99..1b55fb7 100644 --- a/tests/test_faster_qwen_worker.py +++ b/tests/test_faster_qwen_worker.py @@ -9,6 +9,7 @@ from app.faster_qwen_worker import ( MAX_NEW_TOKENS, FasterQwenWorkerClient, FasterQwenWorkerTimeout, + faster_qwen_worker_main, _generation_kwargs, _configure_worker_environment, ) @@ -91,6 +92,14 @@ def _ready(pid): } +def _progress(stage): + return { + "type": "progress", + "stage": stage, + "pid": 4000, + } + + def _probe_worker_main(connection, _settings): connection.send({ "type": "ready", @@ -153,6 +162,8 @@ class FasterQwenWorkerTests(unittest.TestCase): def test_client_returns_worker_audio(self): connection = _FakeConnection([ + _progress("model_loading"), + _progress("warmup_started"), _ready(4100), { "type": "result", @@ -181,6 +192,81 @@ class FasterQwenWorkerTests(unittest.TestCase): self.assertEqual(len(context.processes), 1) client.close() + def test_client_default_startup_timeout_allows_slow_model_load(self): + client = FasterQwenWorkerClient({}) + + self.assertEqual(client.startup_timeout_seconds, 900.0) + client.close() + + def test_worker_applies_process_limits_after_model_warmup(self): + order = [] + + class FakeModel: + def warmup(self): + order.append("warmup") + + class WorkerConnection: + def __init__(self): + self.sent = [] + self.closed = False + + def send(self, message): + self.sent.append(message) + + def recv(self): + return {"command": "stop"} + + def close(self): + self.closed = True + + connection = WorkerConnection() + with ( + patch("app.faster_qwen_worker._configure_worker_environment", return_value=3), + patch( + "app.faster_qwen_worker._load_runtime", + side_effect=lambda _settings, progress=None: ( + progress("from_pretrained_started") if progress else None, + order.append("load"), + {"model": FakeModel()}, + )[-1], + ), + patch( + "app.faster_qwen_worker._apply_worker_process_limits", + side_effect=lambda _settings: order.append("limits") or { + "cpu_affinity_count": 6, + "process_priority": "below_normal", + }, + ), + patch( + "app.faster_qwen_worker._synthesize_wav", + side_effect=lambda _runtime, _text: order.append("voice_clone") or b"wav", + ), + ): + faster_qwen_worker_main(connection, {}) + + self.assertEqual(order, ["load", "warmup", "voice_clone", "limits"]) + progress_stages = [ + item.get("stage") + for item in connection.sent + if item.get("type") == "progress" + ] + self.assertEqual( + progress_stages, + [ + "process_started", + "environment_ready", + "model_loading", + "from_pretrained_started", + "model_loaded", + "warmup_started", + "graph_warmup_complete", + "voice_clone_warmup_started", + "voice_clone_warmup_complete", + "warmup_complete", + ], + ) + self.assertEqual(connection.sent[-1]["type"], "ready") + def test_timeout_terminates_worker_and_starts_a_prewarmed_replacement(self): first_connection = _FakeConnection([_ready(4200)]) replacement_connection = _FakeConnection([_ready(4300)]) diff --git a/tests/test_system_scheduler.py b/tests/test_system_scheduler.py index b73ab81..577dce6 100644 --- a/tests/test_system_scheduler.py +++ b/tests/test_system_scheduler.py @@ -1,10 +1,12 @@ import asyncio +import ctypes import logging import unittest from datetime import datetime, timedelta +from types import SimpleNamespace from unittest.mock import AsyncMock, MagicMock, patch -from app.danmu_queue import SystemScheduler +from app.danmu_queue import CommandHandler, QueueSystem, SystemScheduler class _FakeConfig: @@ -155,5 +157,167 @@ class StartupLiveCompensationTests(unittest.IsolatedAsyncioTestCase): ) +class LivehimePushVerificationTests(unittest.IsolatedAsyncioTestCase): + def setUp(self): + self.logger = logging.getLogger("test-livehime-push-verification") + self.scheduler = SystemScheduler( + _FakeConfig({ + "bilibili_push_window_keyword": "直播姬", + "bilibili_push_click_x_ratio": 0.787, + "bilibili_push_click_y_ratio": 0.927, + "bilibili_stop_push_click_x_ratio": 0.787, + "bilibili_stop_push_click_y_ratio": 0.927, + }), + self.logger, + ) + + async def test_push_skips_click_when_bilibili_is_already_live(self): + self.scheduler._get_bilibili_live_status = AsyncMock(return_value=1) + self.scheduler._click_bilibili_live = AsyncMock() + + self.assertTrue(await self.scheduler.push_bilibili_live()) + + self.scheduler._click_bilibili_live.assert_not_awaited() + + async def test_push_clicks_then_waits_for_confirmed_live_status(self): + self.scheduler._get_bilibili_live_status = AsyncMock(side_effect=[0, 0, 1]) + self.scheduler._click_bilibili_live = AsyncMock(return_value=True) + + with patch("app.danmu_queue.asyncio.sleep", new_callable=AsyncMock): + result = await self.scheduler.push_bilibili_live() + + self.assertTrue(result) + self.scheduler._click_bilibili_live.assert_awaited_once() + + async def test_stop_skips_click_when_bilibili_is_already_offline(self): + self.scheduler._get_bilibili_live_status = AsyncMock(return_value=0) + self.scheduler._click_bilibili_live = AsyncMock() + + self.assertTrue(await self.scheduler.stop_bilibili_live()) + + self.scheduler._click_bilibili_live.assert_not_awaited() + + async def test_live_status_timeout_returns_specific_error(self): + self.scheduler._get_bilibili_live_status = AsyncMock(return_value=0) + + with patch("app.danmu_queue.asyncio.sleep", new_callable=AsyncMock): + result = await self.scheduler._wait_for_bilibili_live_status( + 1, + timeout_seconds=0.01, + ) + + self.assertFalse(result) + self.assertIn("未确认开播", self.scheduler.last_live_action_error) + + @patch("app.danmu_queue.os.name", "nt") + async def test_click_restores_and_focuses_before_reading_physical_window_rect(self): + hwnd = 12345 + user32 = MagicMock() + call_order = [] + user32.IsIconic.return_value = True + user32.GetForegroundWindow.return_value = hwnd + user32.GetSystemMetrics.side_effect = lambda index: { + 76: 0, + 77: 0, + 78: 2560, + 79: 1440, + }[index] + user32.SetCursorPos.return_value = True + user32.GetCursorPos.return_value = False + user32.SetThreadDpiAwarenessContext.return_value = None + + def show_window(_hwnd, _command): + call_order.append("restore") + return True + + def get_window_rect(_hwnd, pointer): + call_order.append("rect") + rect = ctypes.cast(pointer, ctypes.POINTER(ctypes.wintypes.RECT)).contents + rect.left = -11 + rect.top = -11 + rect.right = 2571 + rect.bottom = 1379 + return True + + user32.ShowWindow.side_effect = show_window + user32.GetWindowRect.side_effect = get_window_rect + self.scheduler._find_window_by_keyword = MagicMock(return_value=hwnd) + self.scheduler._force_foreground_window = MagicMock(return_value=True) + + with ( + patch("app.danmu_queue.ctypes.windll.user32", user32), + patch("app.danmu_queue.asyncio.sleep", new_callable=AsyncMock), + ): + result = await self.scheduler._click_bilibili_live( + x_ratio_key="bilibili_push_click_x_ratio", + y_ratio_key="bilibili_push_click_y_ratio", + action_name="开启推流按钮", + ) + + self.assertTrue(result) + self.assertLess(call_order.index("restore"), call_order.index("rect")) + user32.SetCursorPos.assert_called_once_with(2021, 1277) + self.assertEqual(user32.mouse_event.call_count, 2) + + +class ManualLiveOverrideTests(unittest.TestCase): + def setUp(self): + self.system = QueueSystem.__new__(QueueSystem) + self.system.logger = logging.getLogger("test-manual-live-override") + self.system._manual_live_override_until_monotonic = 0.0 + self.system._manual_live_override_until_wall = 0.0 + self.system._bilibili_live_status = None + self.system._bilibili_live_status_updated_monotonic = 0.0 + self.system._bilibili_live_status_updated_wall = 0.0 + + def test_manual_live_override_allows_commands_outside_schedule(self): + handler = CommandHandler.__new__(CommandHandler) + handler.system = self.system + handler.config = SimpleNamespace( + system_cfg={"live_start_time": "08:30", "live_end_time": "23:30"} + ) + + with patch("app.danmu_queue.time.monotonic", return_value=100.0): + self.system.enable_manual_live_override(300) + self.assertTrue(handler._is_live_time()) + snapshot = self.system.manual_live_override_snapshot() + + self.assertTrue(snapshot["active"]) + self.assertGreater(snapshot["until"], 0) + + def test_clear_manual_live_override_restores_schedule_gate(self): + handler = CommandHandler.__new__(CommandHandler) + handler.system = self.system + handler.config = SimpleNamespace( + system_cfg={"live_start_time": "08:30", "live_end_time": "23:30"} + ) + + with ( + patch("app.danmu_queue.time.monotonic", return_value=100.0), + patch("app.danmu_queue.datetime") as mocked_datetime, + ): + mocked_datetime.now.return_value = datetime(2026, 8, 16, 3, 30) + mocked_datetime.strptime = datetime.strptime + self.system.enable_manual_live_override(300) + self.system.clear_manual_live_override() + self.assertFalse(handler._is_live_time()) + + def test_confirmed_bilibili_live_status_allows_commands_outside_schedule(self): + handler = CommandHandler.__new__(CommandHandler) + handler.system = self.system + handler.config = SimpleNamespace( + system_cfg={"live_start_time": "08:30", "live_end_time": "23:30"} + ) + + with ( + patch("app.danmu_queue.time.monotonic", return_value=100.0), + patch("app.danmu_queue.datetime") as mocked_datetime, + ): + mocked_datetime.now.return_value = datetime(2026, 8, 16, 3, 30) + mocked_datetime.strptime = datetime.strptime + self.system.set_bilibili_live_status(1) + self.assertTrue(handler._is_live_time()) + + if __name__ == "__main__": unittest.main() diff --git a/tests/test_tts_pipeline.py b/tests/test_tts_pipeline.py index 9327e10..e43a87a 100644 --- a/tests/test_tts_pipeline.py +++ b/tests/test_tts_pipeline.py @@ -2,6 +2,7 @@ import asyncio import logging import time import unittest +from types import SimpleNamespace from unittest.mock import patch import numpy as np @@ -144,6 +145,49 @@ class PipelineOverlapTests(unittest.IsolatedAsyncioTestCase): await asyncio.gather(synth_worker, play_worker, return_exceptions=True) +class BackgroundWarmupTests(unittest.IsolatedAsyncioTestCase): + async def test_start_returns_before_tts_warmup_finishes(self): + warmup_started = asyncio.Event() + release_warmup = asyncio.Event() + + class FakeTTS: + enabled = True + + async def warmup(self): + warmup_started.set() + await release_warmup.wait() + + async def idle_worker(): + await asyncio.Event().wait() + + broadcaster = Broadcaster.__new__(Broadcaster) + broadcaster._tts_started = False + broadcaster._tts_warmup_done = asyncio.Event() + broadcaster._tts_warmup_task = None + broadcaster._tts_worker_tasks = set() + broadcaster._tts_queue_cfg = {"warmup_on_start": True} + broadcaster._tts_pending = SimpleNamespace(maxsize=8) + broadcaster._tts_playback_queue = SimpleNamespace(maxsize=2) + broadcaster._tts_synthesis_loop = idle_worker + broadcaster._tts_playback_loop = idle_worker + broadcaster.tts = FakeTTS() + broadcaster.logger = logging.getLogger("tts-background-warmup-test") + + await asyncio.wait_for(broadcaster.start(), timeout=0.2) + await asyncio.wait_for(warmup_started.wait(), timeout=0.2) + + self.assertFalse(broadcaster._tts_warmup_done.is_set()) + self.assertIsNotNone(broadcaster._tts_warmup_task) + + release_warmup.set() + await asyncio.wait_for(broadcaster._tts_warmup_done.wait(), timeout=0.2) + + tasks = list(broadcaster._tts_worker_tasks) + for task in tasks: + task.cancel() + await asyncio.gather(*tasks, return_exceptions=True) + + class TTSExpiryPolicyTests(unittest.TestCase): def test_default_expiry_windows_match_configured_policy(self): broadcaster = Broadcaster.__new__(Broadcaster) diff --git a/web/admin/assets/index-CIcFYlv1.js b/web/admin/assets/index-CIcFYlv1.js deleted file mode 100644 index 6495090..0000000 --- a/web/admin/assets/index-CIcFYlv1.js +++ /dev/null @@ -1,631 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=s(n);fetch(n.href,r)}})();function et(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const te={},Ts=[],Re=()=>{},vs=()=>!1,cs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),On=e=>e.startsWith("onUpdate:"),ee=Object.assign,Qr=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},zu=Object.prototype.hasOwnProperty,ae=(e,t)=>zu.call(e,t),$=Array.isArray,Cs=e=>Vs(e)==="[object Map]",us=e=>Vs(e)==="[object Set]",Qo=e=>Vs(e)==="[object Date]",ef=e=>Vs(e)==="[object RegExp]",K=e=>typeof e=="function",X=e=>typeof e=="string",Ve=e=>typeof e=="symbol",le=e=>e!==null&&typeof e=="object",Kr=e=>(le(e)||K(e))&&K(e.then)&&K(e.catch),Zl=Object.prototype.toString,Vs=e=>Zl.call(e),tf=e=>Vs(e).slice(8,-1),Pn=e=>Vs(e)==="[object Object]",Rn=e=>X(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ot=et(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),sf=et("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Mn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},nf=/-\w/g,fe=Mn(e=>e.replace(nf,t=>t.slice(1).toUpperCase())),rf=/\B([A-Z])/g,Ke=Mn(e=>e.replace(rf,"-$1").toLowerCase()),fs=Mn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Es=Mn(e=>e?`on${fs(e)}`:""),ke=(e,t)=>!Object.is(e,t),ws=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:s})},Ln=e=>{const t=parseFloat(e);return isNaN(t)?e:t},sn=e=>{const t=X(e)?Number(e):NaN;return isNaN(t)?e:t};let Ko;const Dn=()=>Ko||(Ko=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function of(e,t){return e+JSON.stringify(t,(s,i)=>typeof i=="function"?i.toString():i)}const lf="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",af=et(lf);function Ei(e){if($(e)){const t={};for(let s=0;s{if(s){const i=s.split(uf);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function wi(e){let t="";if(X(e))t=e;else if($(e))for(let s=0;sLt(s,t))}const sa=e=>!!(e&&e.__v_isRef===!0),ia=e=>X(e)?e:e==null?"":$(e)||le(e)&&(e.toString===Zl||!K(e.toString))?sa(e)?ia(e.value):JSON.stringify(e,na,2):String(e),na=(e,t)=>sa(t)?na(e,t.value):Cs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[i,n],r)=>(s[rr(i,r)+" =>"]=n,s),{})}:us(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>rr(s))}:Ve(t)?rr(t):le(t)&&!$(t)&&!Pn(t)?String(t):t,rr=(e,t="")=>{var s;return Ve(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};function Ef(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}let Ae;class Wr{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&&Ae&&(Ae.active?(this.parent=Ae,this.index=(Ae.scopes||(Ae.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(Ae===this)Ae=this.prevScope;else{let t=Ae;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,i;for(s=0,i=this.effects.length;s0)return;if(ei){let t=ei;for(ei=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;zs;){let t=zs;for(zs=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=s}}if(e)throw e}function aa(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ca(e){let t,s=e.depsTail,i=s;for(;i;){const n=i.prevDep;i.version===-1?(i===s&&(s=n),Yr(i),Nf(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=n}e.deps=t,e.depsTail=s}function vr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ua(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ua(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ai)||(e.globalVersion=ai,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!vr(e))))return;e.flags|=2;const t=e.dep,s=he,i=ut;he=e,ut=!0;try{aa(e);const n=e.fn(e._value);(t.version===0||ke(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(n){throw t.version++,n}finally{he=s,ut=i,ca(e),e.flags&=-3}}function Yr(e,t=!1){const{dep:s,prevSub:i,nextSub:n}=e;if(i&&(i.nextSub=n,e.prevSub=void 0),n&&(n.prevSub=i,e.nextSub=void 0),s.subs===e&&(s.subs=i,!i&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)Yr(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Nf(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}function kf(e,t){e.effect instanceof li&&(e=e.effect.fn);const s=new li(e);t&&ee(s,t);try{s.run()}catch(n){throw s.stop(),n}const i=s.run.bind(s);return i.effect=s,i}function xf(e){e.effect.stop()}let ut=!0;const fa=[];function _t(){fa.push(ut),ut=!1}function vt(){const e=fa.pop();ut=e===void 0?!0:e}function Wo(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=he;he=void 0;try{t()}finally{he=s}}}let ai=0;class If{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 Bn{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(!he||!ut||he===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==he)s=this.activeLink=new If(he,this),he.deps?(s.prevDep=he.depsTail,he.depsTail.nextDep=s,he.depsTail=s):he.deps=he.depsTail=s,da(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const i=s.nextDep;i.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=i),s.prevDep=he.depsTail,s.nextDep=void 0,he.depsTail.nextDep=s,he.depsTail=s,he.deps===s&&(he.deps=i)}return s}trigger(t){this.version++,ai++,this.notify(t)}notify(t){Gr();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Jr()}}}function da(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)da(i)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const nn=new WeakMap,ts=Symbol(""),Sr=Symbol(""),ci=Symbol("");function De(e,t,s){if(ut&&he){let i=nn.get(e);i||nn.set(e,i=new Map);let n=i.get(s);n||(i.set(s,n=new Bn),n.map=i,n.key=s),n.track()}}function kt(e,t,s,i,n,r){const o=nn.get(e);if(!o){ai++;return}const l=a=>{a&&a.trigger()};if(Gr(),t==="clear")o.forEach(l);else{const a=$(e),c=a&&Rn(s);if(a&&s==="length"){const u=Number(i);o.forEach((f,h)=>{(h==="length"||h===ci||!Ve(h)&&h>=u)&&l(f)})}else switch((s!==void 0||o.has(void 0))&&l(o.get(s)),c&&l(o.get(ci)),t){case"add":a?c&&l(o.get("length")):(l(o.get(ts)),Cs(e)&&l(o.get(Sr)));break;case"delete":a||(l(o.get(ts)),Cs(e)&&l(o.get(Sr)));break;case"set":Cs(e)&&l(o.get(ts));break}}Jr()}function Of(e,t){const s=nn.get(e);return s&&s.get(t)}function ps(e){const t=ie(e);return t===e?t:(De(t,"iterate",ci),Ge(e)?t:t.map(dt))}function Vn(e){return De(e=ie(e),"iterate",ci),e}function yt(e,t){return St(e)?Os(Pt(e)?dt(t):t):dt(t)}const Pf={__proto__:null,[Symbol.iterator](){return lr(this,Symbol.iterator,e=>yt(this,e))},concat(...e){return ps(this).concat(...e.map(t=>$(t)?ps(t):t))},entries(){return lr(this,"entries",e=>(e[1]=yt(this,e[1]),e))},every(e,t){return Ct(this,"every",e,t,void 0,arguments)},filter(e,t){return Ct(this,"filter",e,t,s=>s.map(i=>yt(this,i)),arguments)},find(e,t){return Ct(this,"find",e,t,s=>yt(this,s),arguments)},findIndex(e,t){return Ct(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ct(this,"findLast",e,t,s=>yt(this,s),arguments)},findLastIndex(e,t){return Ct(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ct(this,"forEach",e,t,void 0,arguments)},includes(...e){return ar(this,"includes",e)},indexOf(...e){return ar(this,"indexOf",e)},join(e){return ps(this).join(e)},lastIndexOf(...e){return ar(this,"lastIndexOf",e)},map(e,t){return Ct(this,"map",e,t,void 0,arguments)},pop(){return js(this,"pop")},push(...e){return js(this,"push",e)},reduce(e,...t){return Go(this,"reduce",e,t)},reduceRight(e,...t){return Go(this,"reduceRight",e,t)},shift(){return js(this,"shift")},some(e,t){return Ct(this,"some",e,t,void 0,arguments)},splice(...e){return js(this,"splice",e)},toReversed(){return ps(this).toReversed()},toSorted(e){return ps(this).toSorted(e)},toSpliced(...e){return ps(this).toSpliced(...e)},unshift(...e){return js(this,"unshift",e)},values(){return lr(this,"values",e=>yt(this,e))}};function lr(e,t,s){const i=Vn(e),n=i[t]();return i!==e&&!Ge(e)&&(n._next=n.next,n.next=()=>{const r=n._next();return r.done||(r.value=s(r.value)),r}),n}const Rf=Array.prototype;function Ct(e,t,s,i,n,r){const o=Vn(e),l=o!==e&&!Ge(e),a=o[t];if(a!==Rf[t]){const f=a.apply(e,r);return l?dt(f):f}let c=s;o!==e&&(l?c=function(f,h){return s.call(this,yt(e,f),h,e)}:s.length>2&&(c=function(f,h){return s.call(this,f,h,e)}));const u=a.call(o,c,i);return l&&n?n(u):u}function Go(e,t,s,i){const n=Vn(e),r=n!==e&&!Ge(e);let o=s,l=!1;n!==e&&(r?(l=i.length===0,o=function(c,u,f){return l&&(l=!1,c=yt(e,c)),s.call(this,c,yt(e,u),f,e)}):s.length>3&&(o=function(c,u,f){return s.call(this,c,u,f,e)}));const a=n[t](o,...i);return l?yt(e,a):a}function ar(e,t,s){const i=ie(e);De(i,"iterate",ci);const n=i[t](...s);return(n===-1||n===!1)&&Ai(s[0])?(s[0]=ie(s[0]),i[t](...s)):n}function js(e,t,s=[]){_t(),Gr();const i=ie(e)[t].apply(e,s);return Jr(),vt(),i}const Mf=et("__proto__,__v_isRef,__isVue"),ha=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ve));function Lf(e){Ve(e)||(e=String(e));const t=ie(this);return De(t,"has",e),t.hasOwnProperty(e)}class pa{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,i){if(s==="__v_skip")return t.__v_skip;const n=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!n;if(s==="__v_isReadonly")return n;if(s==="__v_isShallow")return r;if(s==="__v_raw")return i===(n?r?va:_a:r?ya:ba).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const o=$(t);if(!n){let a;if(o&&(a=Pf[s]))return a;if(s==="hasOwnProperty")return Lf}const l=Reflect.get(t,s,Ce(t)?t:i);if((Ve(s)?ha.has(s):Mf(s))||(n||De(t,"get",s),r))return l;if(Ce(l)){const a=o&&Rn(s)?l:l.value;return n&&le(a)?rn(a):a}return le(l)?n?rn(l):Hn(l):l}}class ma extends pa{constructor(t=!1){super(!1,t)}set(t,s,i,n){let r=t[s];const o=$(t)&&Rn(s);if(!this._isShallow){const c=St(r);if(!Ge(i)&&!St(i)&&(r=ie(r),i=ie(i)),!o&&Ce(r)&&!Ce(i))return c||(r.value=i),!0}const l=o?Number(s)e,Fi=e=>Reflect.getPrototypeOf(e);function $f(e,t,s){return function(...i){const n=this.__v_raw,r=ie(n),o=Cs(r),l=e==="entries"||e===Symbol.iterator&&o,a=e==="keys"&&o,c=n[e](...i),u=s?Tr:t?Os:dt;return!t&&De(r,"iterate",a?Sr:ts),ee(Object.create(c),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:l?[u(f[0]),u(f[1])]:u(f),done:h}}})}}function Bi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Hf(e,t){const s={get(n){const r=this.__v_raw,o=ie(r),l=ie(n);e||(ke(n,l)&&De(o,"get",n),De(o,"get",l));const{has:a}=Fi(o),c=t?Tr:e?Os:dt;if(a.call(o,n))return c(r.get(n));if(a.call(o,l))return c(r.get(l));r!==o&&r.get(n)},get size(){const n=this.__v_raw;return!e&&De(ie(n),"iterate",ts),n.size},has(n){const r=this.__v_raw,o=ie(r),l=ie(n);return e||(ke(n,l)&&De(o,"has",n),De(o,"has",l)),n===l?r.has(n):r.has(n)||r.has(l)},forEach(n,r){const o=this,l=o.__v_raw,a=ie(l),c=t?Tr:e?Os:dt;return!e&&De(a,"iterate",ts),l.forEach((u,f)=>n.call(r,c(u),c(f),o))}};return ee(s,e?{add:Bi("add"),set:Bi("set"),delete:Bi("delete"),clear:Bi("clear")}:{add(n){const r=ie(this),o=Fi(r),l=ie(n),a=!t&&!Ge(n)&&!St(n)?l:n;return o.has.call(r,a)||ke(n,a)&&o.has.call(r,n)||ke(l,a)&&o.has.call(r,l)||(r.add(a),kt(r,"add",a,a)),this},set(n,r){!t&&!Ge(r)&&!St(r)&&(r=ie(r));const o=ie(this),{has:l,get:a}=Fi(o);let c=l.call(o,n);c||(n=ie(n),c=l.call(o,n));const u=a.call(o,n);return o.set(n,r),c?ke(r,u)&&kt(o,"set",n,r):kt(o,"add",n,r),this},delete(n){const r=ie(this),{has:o,get:l}=Fi(r);let a=o.call(r,n);a||(n=ie(n),a=o.call(r,n)),l&&l.call(r,n);const c=r.delete(n);return a&&kt(r,"delete",n,void 0),c},clear(){const n=ie(this),r=n.size!==0,o=n.clear();return r&&kt(n,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{s[n]=$f(n,e,t)}),s}function $n(e,t){const s=Hf(e,t);return(i,n,r)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?i:Reflect.get(ae(s,n)&&n in i?s:i,n,r)}const Uf={get:$n(!1,!1)},qf={get:$n(!1,!0)},jf={get:$n(!0,!1)},Qf={get:$n(!0,!0)},ba=new WeakMap,ya=new WeakMap,_a=new WeakMap,va=new WeakMap;function Kf(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 St(e)?e:Un(e,!1,Df,Uf,ba)}function Sa(e){return Un(e,!1,Bf,qf,ya)}function rn(e){return Un(e,!0,Ff,jf,_a)}function Wf(e){return Un(e,!0,Vf,Qf,va)}function Un(e,t,s,i,n){if(!le(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const r=n.get(e);if(r)return r;const o=Kf(tf(e));if(o===0)return e;const l=new Proxy(e,o===2?i:s);return n.set(e,l),l}function Pt(e){return St(e)?Pt(e.__v_raw):!!(e&&e.__v_isReactive)}function St(e){return!!(e&&e.__v_isReadonly)}function Ge(e){return!!(e&&e.__v_isShallow)}function Ai(e){return e?!!e.__v_raw:!1}function ie(e){const t=e&&e.__v_raw;return t?ie(t):e}function Ta(e){return!ae(e,"__v_skip")&&Object.isExtensible(e)&&zl(e,"__v_skip",!0),e}const dt=e=>le(e)?Hn(e):e,Os=e=>le(e)?rn(e):e;function Ce(e){return e?e.__v_isRef===!0:!1}function ti(e){return Ea(e,!1)}function Ca(e){return Ea(e,!0)}function Ea(e,t){return Ce(e)?e:new Gf(e,t)}class Gf{constructor(t,s){this.dep=new Bn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:ie(t),this._value=s?t:dt(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,i=this.__v_isShallow||Ge(t)||St(t);t=i?t:ie(t),ke(t,s)&&(this._rawValue=t,this._value=i?t:dt(t),this.dep.trigger())}}function Jf(e){e.dep&&e.dep.trigger()}function Ni(e){return Ce(e)?e.value:e}function Yf(e){return K(e)?e():Ni(e)}const Xf={get:(e,t,s)=>t==="__v_raw"?e:Ni(Reflect.get(e,t,s)),set:(e,t,s,i)=>{const n=e[t];return Ce(n)&&!Ce(s)?(n.value=s,!0):Reflect.set(e,t,s,i)}};function Xr(e){return Pt(e)?e:new Proxy(e,Xf)}class Zf{constructor(t){this.__v_isRef=!0,this._value=void 0;const s=this.dep=new Bn,{get:i,set:n}=t(s.track.bind(s),s.trigger.bind(s));this._get=i,this._set=n}get value(){return this._value=this._get()}set value(t){this._set(t)}}function wa(e){return new Zf(e)}function zf(e){const t=$(e)?new Array(e.length):{};for(const s in e)t[s]=Aa(e,s);return t}class ed{constructor(t,s,i){this._object=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._key=Ve(s)?s:String(s),this._raw=ie(t);let n=!0,r=t;if(!$(t)||Ve(this._key)||!Rn(this._key))do n=!Ai(r)||Ge(r);while(n&&(r=r.__v_raw));this._shallow=n}get value(){let t=this._object[this._key];return this._shallow&&(t=Ni(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ce(this._raw[this._key])){const s=this._object[this._key];if(Ce(s)){s.value=t;return}}this._object[this._key]=t}get dep(){return Of(this._raw,this._key)}}class td{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 sd(e,t,s){return Ce(e)?e:K(e)?new td(e):le(e)&&arguments.length>1?Aa(e,t,s):ti(e)}function Aa(e,t,s){return new ed(e,t,s)}class id{constructor(t,s,i){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Bn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ai-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&he!==this)return la(this,!0),!0}get value(){const t=this.dep.track();return ua(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function nd(e,t,s=!1){let i,n;return K(e)?i=e:(i=e.get,n=e.set),new id(i,n,s)}const rd={GET:"get",HAS:"has",ITERATE:"iterate"},od={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Vi={},on=new WeakMap;let qt;function ld(){return qt}function Na(e,t=!1,s=qt){if(s){let i=on.get(s);i||on.set(s,i=[]),i.push(e)}}function ad(e,t,s=te){const{immediate:i,deep:n,once:r,scheduler:o,augmentJob:l,call:a}=s,c=b=>n?b:Ge(b)||n===!1||n===0?xt(b,1):xt(b);let u,f,h,m,y=!1,_=!1;if(Ce(e)?(f=()=>e.value,y=Ge(e)):Pt(e)?(f=()=>c(e),y=!0):$(e)?(_=!0,y=e.some(b=>Pt(b)||Ge(b)),f=()=>e.map(b=>{if(Ce(b))return b.value;if(Pt(b))return c(b);if(K(b))return a?a(b,2):b()})):K(e)?t?f=a?()=>a(e,2):e:f=()=>{if(h){_t();try{h()}finally{vt()}}const b=qt;qt=u;try{return a?a(e,3,[m]):e(m)}finally{qt=b}}:f=Re,t&&n){const b=f,v=n===!0?1/0:n;f=()=>xt(b(),v)}const O=ra(),P=()=>{u.stop(),O&&O.active&&Qr(O.effects,u)};if(r&&t){const b=t;t=(...v)=>{const M=b(...v);return P(),M}}let T=_?new Array(e.length).fill(Vi):Vi;const p=b=>{if(!(!(u.flags&1)||!u.dirty&&!b))if(t){const v=u.run();if(b||n||y||(_?v.some((M,R)=>ke(M,T[R])):ke(v,T))){h&&h();const M=qt;qt=u;try{const R=[v,T===Vi?void 0:_&&T[0]===Vi?[]:T,m];T=v,a?a(t,3,R):t(...R)}finally{qt=M}}}else u.run()};return l&&l(p),u=new li(f),u.scheduler=o?()=>o(p,!1):p,m=b=>Na(b,!1,u),h=u.onStop=()=>{const b=on.get(u);if(b){if(a)a(b,4);else for(const v of b)v();on.delete(u)}},t?i?p(!0):T=u.run():o?o(p.bind(null,!0),!0):u.run(),P.pause=u.pause.bind(u),P.resume=u.resume.bind(u),P.stop=P,P}function xt(e,t=1/0,s){if(t<=0||!le(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ce(e))xt(e.value,t,s);else if($(e))for(let i=0;i{xt(i,t,s)});else if(Pn(e)){for(const i in e)xt(e[i],t,s);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&xt(e[i],t,s)}return e}const ka=[];function cd(e){ka.push(e)}function ud(){ka.pop()}function fd(e,t){}const dd={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"},hd={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 $s(e,t,s,i){try{return i?e(...i):e()}catch(n){ds(n,t,s)}}function ze(e,t,s,i){if(K(e)){const n=$s(e,t,s,i);return n&&Kr(n)&&n.catch(r=>{ds(r,t,s)}),n}if($(e)){const n=[];for(let r=0;r>>1,n=He[i],r=fi(n);r=fi(s)?He.push(e):He.splice(md(t),0,e),e.flags|=1,Ia()}}function Ia(){ln||(ln=xa.then(Oa))}function ui(e){$(e)?As.push(...e):jt&&e.id===-1?jt.splice(ys+1,0,e):e.flags&1||(As.push(e),e.flags|=1),Ia()}function Jo(e,t,s=gt+1){for(;sfi(s)-fi(i));if(As.length=0,jt){jt.push(...t);return}for(jt=t,ys=0;yse.id==null?e.flags&2?-1:1/0:e.id;function Oa(e){try{for(gt=0;gt_s.emit(n,...r)),$i=[]):typeof window<"u"&&window.HTMLElement&&!((i=(s=window.navigator)==null?void 0:s.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{Pa(r,t)}),setTimeout(()=>{_s||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,$i=[])},3e3)):$i=[]}let Pe=null,jn=null;function di(e){const t=Pe;return Pe=e,jn=e&&e.type.__scopeId||null,t}function gd(e){jn=e}function bd(){jn=null}const yd=e=>zr;function zr(e,t=Pe,s){if(!t||e._n)return e;const i=(...n)=>{i._d&&gi(-1);const r=di(t);let o;try{o=e(...n)}finally{di(r),i._d&&gi(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function _d(e,t){if(Pe===null)return e;const s=Pi(Pe),i=e.dirs||(e.dirs=[]);for(let n=0;n1)return s&&K(t)?t.call(i&&i.proxy):t}}function vd(){return!!(Ue()||ss)}const Ma=Symbol.for("v-scx"),La=()=>si(Ma);function Sd(e,t){return ki(e,null,t)}function Td(e,t){return ki(e,null,{flush:"post"})}function Da(e,t){return ki(e,null,{flush:"sync"})}function Ns(e,t,s){return ki(e,t,s)}function ki(e,t,s=te){const{immediate:i,deep:n,flush:r,once:o}=s,l=ee({},s),a=t&&i||!t&&r!=="post";let c;if(ls){if(r==="sync"){const m=La();c=m.__watcherHandles||(m.__watcherHandles=[])}else if(!a){const m=()=>{};return m.stop=Re,m.resume=Re,m.pause=Re,m}}const u=Oe;l.call=(m,y,_)=>ze(m,u,y,_);let f=!1;r==="post"?l.scheduler=m=>{Se(m,u&&u.suspense)}:r!=="sync"&&(f=!0,l.scheduler=(m,y)=>{y?m():Zr(m)}),l.augmentJob=m=>{t&&(m.flags|=4),f&&(m.flags|=2,u&&(m.id=u.uid,m.i=u))};const h=ad(e,t,l);return ls&&(c?c.push(h):a&&h()),h}function Cd(e,t,s){const i=this.proxy,n=X(e)?e.includes(".")?Fa(i,e):()=>i[e]:e.bind(i,i);let r;K(t)?r=t:(r=t.handler,s=t);const o=Hs(this),l=ki(n,r.bind(i),s);return o(),l}function Fa(e,t){const s=t.split(".");return()=>{let i=e;for(let n=0;ne.__isTeleport,Zt=e=>e&&(e.disabled||e.disabled===""),Ed=e=>e&&(e.defer||e.defer===""),Yo=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Xo=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Cr=(e,t)=>{const s=e&&e.to;return X(s)?t?t(s):null:s},wd={name:"Teleport",__isTeleport:!0,process(e,t,s,i,n,r,o,l,a,c){const{mc:u,pc:f,pbc:h,o:{insert:m,querySelector:y,createText:_,createComment:O,parentNode:P}}=c,T=Zt(t.props);let{dynamicChildren:p}=t;const b=(R,A,S)=>{R.shapeFlag&16&&u(R.children,A,S,n,r,o,l,a)},v=(R=t)=>{const A=Zt(R.props),S=R.target=Cr(R.props,y),w=Er(S,R,_,m);S&&(o!=="svg"&&Yo(S)?o="svg":o!=="mathml"&&Xo(S)&&(o="mathml"),n&&n.isCE&&(n.ce._teleportTargets||(n.ce._teleportTargets=new Set)).add(S),A||(b(R,S,w),Js(R,!1)))},M=R=>{const A=()=>{if(Ht.get(R)===A){if(Ht.delete(R),Zt(R.props)){const S=P(R.el)||s;b(R,S,R.anchor),Js(R,!0)}v(R)}};Ht.set(R,A),Se(A,r)};if(e==null){const R=t.el=_(""),A=t.anchor=_("");if(m(R,s,i),m(A,s,i),Ed(t.props)||r&&r.pendingBranch){M(t);return}T&&(b(t,s,A),Js(t,!0)),v()}else{t.el=e.el;const R=t.anchor=e.anchor,A=Ht.get(e);if(A){A.flags|=8,Ht.delete(e),M(t);return}t.targetStart=e.targetStart;const S=t.target=e.target,w=t.targetAnchor=e.targetAnchor,I=Zt(e.props),C=I?s:S,F=I?R:w;if(o==="svg"||Yo(S)?o="svg":(o==="mathml"||Xo(S))&&(o="mathml"),p?(h(e.dynamicChildren,p,C,n,r,o,l),ho(e,t,!0)):a||f(e,t,C,F,n,r,o,l,!1),T)I?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Hi(t,s,R,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const q=Cr(t.props,y);q&&(t.target=q,Hi(t,q,null,c,0))}else I&&Hi(t,S,w,c,1);Js(t,T)}},remove(e,t,s,{um:i,o:{remove:n}},r){const{shapeFlag:o,children:l,anchor:a,targetStart:c,targetAnchor:u,target:f,props:h}=e,m=Zt(h),y=r||!m,_=Ht.get(e);if(_&&(_.flags|=8,Ht.delete(e)),f&&(n(c),n(u)),r&&n(a),!_&&(m||f)&&o&16)for(let O=0;O{e.isMounted=!0}),Gn(()=>{e.isUnmounting=!0}),e}const st=[Function,Array],to={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:st,onEnter:st,onAfterEnter:st,onEnterCancelled:st,onBeforeLeave:st,onLeave:st,onAfterLeave:st,onLeaveCancelled:st,onBeforeAppear:st,onAppear:st,onAfterAppear:st,onAppearCancelled:st},$a=e=>{const t=e.subTree;return t.component?$a(t.component):t},kd={name:"BaseTransition",props:to,setup(e,{slots:t}){const s=Ue(),i=eo();return()=>{const n=t.default&&Qn(t.default(),!0),r=n&&n.length?Ha(n):s.subTree?wc():void 0;if(!r)return;const o=ie(e),{mode:l}=o;if(i.isLeaving)return cr(r);const a=Zo(r);if(!a)return cr(r);let c=Ps(a,o,i,s,f=>c=f);a.type!==_e&&Dt(a,c);let u=s.subTree&&Zo(s.subTree);if(u&&u.type!==_e&&!ct(u,a)&&$a(s).type!==_e){let f=Ps(u,o,i,s);if(Dt(u,f),l==="out-in"&&a.type!==_e)return i.isLeaving=!0,f.afterLeave=()=>{i.isLeaving=!1,s.job.flags&8||s.update(),delete f.afterLeave,u=void 0},cr(r);l==="in-out"&&a.type!==_e?f.delayLeave=(h,m,y)=>{const _=qa(i,u);_[String(u.key)]=u,h[it]=()=>{m(),h[it]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{y(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function Ha(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==_e){t=s;break}}return t}const Ua=kd;function qa(e,t){const{leavingVNodes:s}=e;let i=s.get(t.type);return i||(i=Object.create(null),s.set(t.type,i)),i}function Ps(e,t,s,i,n){const{appear:r,mode:o,persisted:l=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:h,onLeave:m,onAfterLeave:y,onLeaveCancelled:_,onBeforeAppear:O,onAppear:P,onAfterAppear:T,onAppearCancelled:p}=t,b=String(e.key),v=qa(s,e),M=(S,w)=>{S&&ze(S,i,9,w)},R=(S,w)=>{const I=w[1];M(S,w),$(S)?S.every(C=>C.length<=1)&&I():S.length<=1&&I()},A={mode:o,persisted:l,beforeEnter(S){let w=a;if(!s.isMounted)if(r)w=O||a;else return;S[it]&&S[it](!0);const I=v[b];I&&ct(e,I)&&I.el[it]&&I.el[it](),M(w,[S])},enter(S){if(v[b]===e)return;let w=c,I=u,C=f;if(!s.isMounted)if(r)w=P||c,I=T||u,C=p||f;else return;let F=!1;S[Qs]=W=>{F||(F=!0,W?M(C,[S]):M(I,[S]),A.delayedLeave&&A.delayedLeave(),S[Qs]=void 0)};const q=S[Qs].bind(null,!1);w?R(w,[S,q]):q()},leave(S,w){const I=String(e.key);if(S[Qs]&&S[Qs](!0),s.isUnmounting)return w();M(h,[S]);let C=!1;S[it]=q=>{C||(C=!0,w(),q?M(_,[S]):M(y,[S]),S[it]=void 0,v[I]===e&&delete v[I])};const F=S[it].bind(null,!1);v[I]=e,m?R(m,[S,F]):F()},clone(S){const w=Ps(S,t,s,i,n);return n&&n(w),w}};return A}function cr(e){if(xi(e))return e=Tt(e),e.children=null,e}function Zo(e){if(!xi(e))return Va(e.type)&&e.children?Ha(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&&K(s.default))return s.default()}}function Dt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dt(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 Qn(e,t=!1,s){let i=[],n=0;for(let r=0;r1)for(let r=0;rs.value,set:r=>s.value=r})}return s}function zo(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const cn=new WeakMap;function ks(e,t,s,i,n=!1){if($(e)){e.forEach((_,O)=>ks(_,t&&($(t)?t[O]:t),s,i,n));return}if(Rt(i)&&!n){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&ks(e,t,s,i.component.subTree);return}const r=i.shapeFlag&4?Pi(i.component):i.el,o=n?null:r,{i:l,r:a}=e,c=t&&t.r,u=l.refs===te?l.refs={}:l.refs,f=l.setupState,h=ie(f),m=f===te?vs:_=>zo(u,_)?!1:ae(h,_),y=(_,O)=>!(O&&zo(u,O));if(c!=null&&c!==a){if(el(t),X(c))u[c]=null,m(c)&&(f[c]=null);else if(Ce(c)){const _=t;y(c,_.k)&&(c.value=null),_.k&&(u[_.k]=null)}}if(K(a)){_t();try{$s(a,l,12,[o,u])}finally{vt()}}else{const _=X(a),O=Ce(a);if(_||O){const P=()=>{if(e.f){const T=_?m(a)?f[a]:u[a]:y()||!e.k?a.value:u[e.k];if(n)$(T)&&Qr(T,r);else if($(T))T.includes(r)||T.push(r);else if(_)u[a]=[r],m(a)&&(f[a]=u[a]);else{const p=[r];y(a,e.k)&&(a.value=p),e.k&&(u[e.k]=p)}}else _?(u[a]=o,m(a)&&(f[a]=o)):O&&(y(a,e.k)&&(a.value=o),e.k&&(u[e.k]=o))};if(o){const T=()=>{P(),cn.delete(e)};T.id=-1,cn.set(e,T),Se(T,s)}else el(e),P()}}}function el(e){const t=cn.get(e);t&&(t.flags|=8,cn.delete(e))}let tl=!1;const ms=()=>{tl||(console.error("Hydration completed but contains mismatches."),tl=!0)},Od=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Pd=e=>e.namespaceURI.includes("MathML"),Ui=e=>{if(e.nodeType===1){if(Od(e))return"svg";if(Pd(e))return"mathml"}},Ss=e=>e.nodeType===8;function Rd(e){const{mt:t,p:s,o:{patchProp:i,createText:n,nextSibling:r,parentNode:o,remove:l,insert:a,createComment:c}}=e,u=(p,b)=>{if(!b.hasChildNodes()){s(null,p,b),an(),b._vnode=p;return}f(b.firstChild,p,null,null,null),an(),b._vnode=p},f=(p,b,v,M,R,A=!1)=>{A=A||!!b.dynamicChildren;const S=Ss(p)&&p.data==="[",w=()=>_(p,b,v,M,R,S),{type:I,ref:C,shapeFlag:F,patchFlag:q}=b;let W=p.nodeType;b.el=p,q===-2&&(A=!1,b.dynamicChildren=null);let U=null;switch(I){case Kt:W!==3?b.children===""?(a(b.el=n(""),o(p),p),U=p):U=w():(p.data!==b.children&&(ms(),p.data=b.children),U=r(p));break;case _e:T(p)?(U=r(p),P(b.el=p.content.firstChild,p,v)):W!==8||S?U=w():U=r(p);break;case is:if(S&&(p=r(p),W=p.nodeType),W===1||W===3){U=p;const J=!b.children.length;for(let G=0;G{A=A||!!b.dynamicChildren;const{type:S,dynamicProps:w,props:I,patchFlag:C,shapeFlag:F,dirs:q,transition:W}=b,U=S==="input"||S==="option",J=!!w;if(U||J||C!==-1){q&&bt(b,null,v,"created");let G=!1;if(T(p)){G=gc(null,W)&&v&&v.vnode.props&&v.vnode.props.appear;const re=p.content.firstChild;if(G){const ce=re.getAttribute("class");ce&&(re.$cls=ce),W.beforeEnter(re)}P(re,p,v),b.el=p=re}if(F&16&&!(I&&(I.innerHTML||I.textContent))){let re=m(p.firstChild,b,p,v,M,R,A);for(re&&!Ji(p,1)&&ms();re;){const ce=re;re=re.nextSibling,l(ce)}}else if(F&8){let re=b.children;re[0]===` -`&&(p.tagName==="PRE"||p.tagName==="TEXTAREA")&&(re=re.slice(1));const{textContent:ce}=p;ce!==re&&ce!==re.replace(/\r\n|\r/g,` -`)&&(Ji(p,0)||ms(),p.textContent=b.children)}if(I){if(U||J||!A||C&48){const re=p.tagName.includes("-");for(const ce in I)(U&&(ce.endsWith("value")||ce==="indeterminate")||cs(ce)&&!Ot(ce)||ce[0]==="."||re&&!Ot(ce)||w&&w.includes(ce))&&i(p,ce,null,I[ce],void 0,v)}else if(I.onClick)i(p,"onClick",null,I.onClick,void 0,v);else if(C&4&&Pt(I.style))for(const re in I.style)I.style[re]}let Ee;(Ee=I&&I.onVnodeBeforeMount)&&je(Ee,v,b),q&&bt(b,null,v,"beforeMount"),((Ee=I&&I.onVnodeMounted)||q||G)&&vc(()=>{Ee&&je(Ee,v,b),G&&W.enter(p),q&&bt(b,null,v,"mounted")},M)}return p.nextSibling},m=(p,b,v,M,R,A,S)=>{S=S||!!b.dynamicChildren;const w=b.children,I=w.length;let C=!1;for(let F=0;F{const{slotScopeIds:S}=b;S&&(R=R?R.concat(S):S);const w=o(p),I=m(r(p),b,w,v,M,R,A);return I&&Ss(I)&&I.data==="]"?r(b.anchor=I):(ms(),a(b.anchor=c("]"),w,I),I)},_=(p,b,v,M,R,A)=>{if(Ld(p,b)||ms(),b.el=null,A){const I=O(p);for(;;){const C=r(p);if(C&&C!==I)l(C);else break}}const S=r(p),w=o(p);return l(p),s(null,b,w,S,v,M,Ui(w),R),v&&(v.vnode.el=b.el,Yn(v,b.el)),S},O=(p,b="[",v="]")=>{let M=0;for(;p;)if(p=r(p),p&&Ss(p)&&(p.data===b&&M++,p.data===v)){if(M===0)return r(p);M--}return p},P=(p,b,v)=>{const M=b.parentNode;M&&M.replaceChild(p,b);let R=v;for(;R;)R.vnode.el===b&&(R.vnode.el=R.subTree.el=p),R=R.parent},T=p=>p.nodeType===1&&p.tagName==="TEMPLATE";return[u,f]}const un="data-allow-mismatch",Md={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Ji(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(un);)e=e.parentElement;return no(e&&e.getAttribute(un),t)}function no(e,t){if(e==null)return!1;if(e==="")return!0;{const s=e.split(",");return t===0&&s.includes("children")?!0:s.includes(Md[t])}}function Ld(e,t){return Ji(e.parentElement,1)||Dd(e)||Fd(t)}function Dd(e){return e.nodeType===1&&no(e.getAttribute(un),1)}function Fd({props:e}){const t=e&&e[un];return typeof t=="string"&&no(t,1)}const Bd=Dn().requestIdleCallback||(e=>setTimeout(e,1)),Vd=Dn().cancelIdleCallback||(e=>clearTimeout(e)),$d=(e=1e4)=>t=>{const s=Bd(t,{timeout:e});return()=>Vd(s)};function Hd(e){const{top:t,left:s,bottom:i,right:n}=e.getBoundingClientRect(),{innerHeight:r,innerWidth:o}=window;return(t>0&&t0&&i0&&s0&&n(t,s)=>{const i=new IntersectionObserver(n=>{for(const r of n)if(r.isIntersecting){i.disconnect(),t();break}},e);return s(n=>{if(n instanceof Element){if(Hd(n))return t(),i.disconnect(),!1;i.observe(n)}}),()=>i.disconnect()},qd=e=>t=>{if(e){const s=matchMedia(e);if(s.matches)t();else return s.addEventListener("change",t,{once:!0}),()=>s.removeEventListener("change",t)}},jd=(e=[])=>(t,s)=>{X(e)&&(e=[e]);let i=!1;const n=o=>{i||(i=!0,r(),t(),o.target.dispatchEvent(new o.constructor(o.type,o)))},r=()=>{s(o=>{for(const l of e)o.removeEventListener(l,n)})};return s(o=>{for(const l of e)o.addEventListener(l,n,{once:!0})}),r};function Qd(e,t){if(Ss(e)&&e.data==="["){let s=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(Ss(i))if(i.data==="]"){if(--s===0)break}else i.data==="["&&s++;i=i.nextSibling}}else t(e)}const Rt=e=>!!e.type.__asyncLoader;function Kd(e){K(e)&&(e={loader:e});const{loader:t,loadingComponent:s,errorComponent:i,delay:n=200,hydrate:r,timeout:o,suspensible:l=!0,onError:a}=e;let c=null,u,f=0;const h=()=>(f++,c=null,m()),m=()=>{let y;return c||(y=c=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),a)return new Promise((O,P)=>{a(_,()=>O(h()),()=>P(_),f+1)});throw _}).then(_=>y!==c&&c?c:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),u=_,_)))};return so({name:"AsyncComponentWrapper",__asyncLoader:m,__asyncHydrate(y,_,O){let P=!1;(_.bu||(_.bu=[])).push(()=>P=!0);const T=()=>{P||O()},p=r?()=>{const b=r(T,v=>Qd(y,v));b&&(_.bum||(_.bum=[])).push(b)}:T;u?p():m().then(()=>!_.isUnmounted&&p())},get __asyncResolved(){return u},setup(){const y=Oe;if(io(y),u)return()=>qi(u,y);const _=v=>{c=null,ds(v,y,13,!i)};if(l&&y.suspense||ls)return m().then(v=>()=>qi(v,y)).catch(v=>(_(v),()=>i?ge(i,{error:v}):null));const O=ti(!1),P=ti(),T=ti(!!n);let p,b;return Oi(()=>{p!=null&&clearTimeout(p),b!=null&&clearTimeout(b)}),n&&(b=setTimeout(()=>{y.isUnmounted||(T.value=!1)},n)),o!=null&&(p=setTimeout(()=>{if(!y.isUnmounted&&!O.value&&!P.value){const v=new Error(`Async component timed out after ${o}ms.`);_(v),P.value=v}},o)),m().then(()=>{y.isUnmounted||(O.value=!0,y.parent&&xi(y.parent.vnode)&&y.parent.update())}).catch(v=>{if(y.isUnmounted){c=null;return}_(v),P.value=v}),()=>{if(O.value&&u)return qi(u,y);if(P.value&&i)return ge(i,{error:P.value});if(s&&!T.value)return qi(s,y)}}})}function qi(e,t){const{ref:s,props:i,children:n,ce:r}=t.vnode,o=ge(e,i,n);return o.ref=s,o.ce=r,delete t.vnode.ce,o}const xi=e=>e.type.__isKeepAlive,Wd={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const s=Ue(),i=s.ctx;if(!i.renderer)return()=>{const T=t.default&&t.default();return T&&T.length===1?T[0]:T};const n=new Map,r=new Set;let o=null;const l=s.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:f}}}=i,h=f("div");i.activate=(T,p,b,v,M)=>{const R=T.component;c(T,p,b,0,l),a(R.vnode,T,p,b,R,l,v,T.slotScopeIds,M),Se(()=>{R.isDeactivated=!1,R.a&&ws(R.a);const A=T.props&&T.props.onVnodeMounted;A&&je(A,R.parent,T)},l)},i.deactivate=T=>{const p=T.component;dn(p.m),dn(p.a),c(T,h,null,1,l),Se(()=>{p.da&&ws(p.da);const b=T.props&&T.props.onVnodeUnmounted;b&&je(b,p.parent,T),p.isDeactivated=!0},l)};function m(T){ur(T),u(T,s,l,!0)}function y(T){n.forEach((p,b)=>{const v=Rr(Rt(p)?p.type.__asyncResolved||{}:p.type);v&&!T(v)&&_(b)})}function _(T){const p=n.get(T);p&&(!o||!ct(p,o))?m(p):o&&ur(o),n.delete(T),r.delete(T)}Ns(()=>[e.include,e.exclude],([T,p])=>{T&&y(b=>Ys(T,b)),p&&y(b=>!Ys(p,b))},{flush:"post",deep:!0});let O=null;const P=()=>{O!=null&&(hn(s.subTree.type)?Se(()=>{n.set(O,ji(s.subTree))},s.subTree.suspense):n.set(O,ji(s.subTree)))};return Ii(P),Wn(P),Gn(()=>{n.forEach(T=>{const{subTree:p,suspense:b}=s,v=ji(p);if(T.type===v.type&&T.key===v.key){ur(v);const M=v.component.da;M&&Se(M,b);return}m(T)})}),()=>{if(O=null,!t.default)return o=null;const T=t.default(),p=T[0];if(T.length>1)return o=null,T;if(!Ft(p)||!(p.shapeFlag&4)&&!(p.shapeFlag&128))return o=null,p;let b=ji(p);if(b.type===_e)return o=null,b;const v=b.type,M=Rr(Rt(b)?b.type.__asyncResolved||{}:v),{include:R,exclude:A,max:S}=e;if(R&&(!M||!Ys(R,M))||A&&M&&Ys(A,M))return b.shapeFlag&=-257,o=b,p;const w=b.key==null?v:b.key,I=n.get(w);return b.el&&(b=Tt(b),p.shapeFlag&128&&(p.ssContent=b)),O=w,I?(b.el=I.el,b.component=I.component,b.transition&&Dt(b,b.transition),b.shapeFlag|=512,r.delete(w),r.add(w)):(r.add(w),S&&r.size>parseInt(S,10)&&_(r.values().next().value)),b.shapeFlag|=256,o=b,hn(p.type)?p:b}}},Gd=Wd;function Ys(e,t){return $(e)?e.some(s=>Ys(s,t)):X(e)?e.split(",").includes(t):ef(e)?(e.lastIndex=0,e.test(t)):!1}function ja(e,t){Ka(e,"a",t)}function Qa(e,t){Ka(e,"da",t)}function Ka(e,t,s=Oe){const i=e.__wdc||(e.__wdc=()=>{let n=s;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Kn(t,i,s),s){let n=s.parent;for(;n&&n.parent;)xi(n.parent.vnode)&&Jd(i,t,s,n),n=n.parent}}function Jd(e,t,s,i){const n=Kn(t,e,i,!0);Oi(()=>{Qr(i[t],n)},s)}function ur(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function ji(e){return e.shapeFlag&128?e.ssContent:e}function Kn(e,t,s=Oe,i=!1){if(s){const n=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...o)=>{_t();const l=Hs(s),a=ze(t,s,e,o);return l(),vt(),a});return i?n.unshift(r):n.push(r),r}}const Bt=e=>(t,s=Oe)=>{(!ls||e==="sp")&&Kn(e,(...i)=>t(...i),s)},Wa=Bt("bm"),Ii=Bt("m"),ro=Bt("bu"),Wn=Bt("u"),Gn=Bt("bum"),Oi=Bt("um"),Ga=Bt("sp"),Ja=Bt("rtg"),Ya=Bt("rtc");function Xa(e,t=Oe){Kn("ec",e,t)}const oo="components",Yd="directives";function Xd(e,t){return lo(oo,e,!0,t)||e}const Za=Symbol.for("v-ndc");function Zd(e){return X(e)?lo(oo,e,!1)||e:e||Za}function zd(e){return lo(Yd,e)}function lo(e,t,s=!0,i=!1){const n=Pe||Oe;if(n){const r=n.type;if(e===oo){const l=Rr(r,!1);if(l&&(l===t||l===fe(t)||l===fs(fe(t))))return r}const o=sl(n[e]||r[e],t)||sl(n.appContext[e],t);return!o&&i?r:o}}function sl(e,t){return e&&(e[t]||e[fe(t)]||e[fs(fe(t))])}function eh(e,t,s,i){let n;const r=s&&s[i],o=$(e);if(o||X(e)){const l=o&&Pt(e);let a=!1,c=!1;l&&(a=!Ge(e),c=St(e),e=Vn(e)),n=new Array(e.length);for(let u=0,f=e.length;ut(l,a,void 0,r&&r[a]));else{const l=Object.keys(e);n=new Array(l.length);for(let a=0,c=l.length;a{const r=i.fn(...n);return r&&(r.key=i.key),r}:i.fn)}return e}function sh(e,t,s={},i,n){if(Pe.ce||Pe.parent&&Rt(Pe.parent)&&Pe.parent.ce){const c=Object.keys(s).length>0;return t!=="default"&&(s.name=t),mi(),pn(xe,null,[ge("slot",s,i&&i())],c?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),mi();const o=r&&ao(r(s)),l=s.key||o&&o.key,a=pn(xe,{key:(l&&!Ve(l)?l:`_${t}`)+(!o&&i?"_fb":"")},o||(i?i():[]),o&&e._===1?64:-2);return!n&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function ao(e){return e.some(t=>Ft(t)?!(t.type===_e||t.type===xe&&!ao(t.children)):!0)?e:null}function ih(e,t){const s={};for(const i in e)s[t&&/[A-Z]/.test(i)?`on:${i}`:Es(i)]=e[i];return s}const wr=e=>e?kc(e)?Pi(e):wr(e.parent):null,ii=ee(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=>wr(e.parent),$root:e=>wr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>co(e),$forceUpdate:e=>e.f||(e.f=()=>{Zr(e.update)}),$nextTick:e=>e.n||(e.n=qn.bind(e.proxy)),$watch:e=>Cd.bind(e)}),fr=(e,t)=>e!==te&&!e.__isScriptSetup&&ae(e,t),Ar={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:i,data:n,props:r,accessCache:o,type:l,appContext:a}=e;if(t[0]!=="$"){const h=o[t];if(h!==void 0)switch(h){case 1:return i[t];case 2:return n[t];case 4:return s[t];case 3:return r[t]}else{if(fr(i,t))return o[t]=1,i[t];if(n!==te&&ae(n,t))return o[t]=2,n[t];if(ae(r,t))return o[t]=3,r[t];if(s!==te&&ae(s,t))return o[t]=4,s[t];Nr&&(o[t]=0)}}const c=ii[t];let u,f;if(c)return t==="$attrs"&&De(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(s!==te&&ae(s,t))return o[t]=4,s[t];if(f=a.config.globalProperties,ae(f,t))return f[t]},set({_:e},t,s){const{data:i,setupState:n,ctx:r}=e;return fr(n,t)?(n[t]=s,!0):i!==te&&ae(i,t)?(i[t]=s,!0):ae(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:i,appContext:n,props:r,type:o}},l){let a;return!!(s[l]||e!==te&&l[0]!=="$"&&ae(e,l)||fr(t,l)||ae(r,l)||ae(i,l)||ae(ii,l)||ae(n.config.globalProperties,l)||(a=o.__cssModules)&&a[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ae(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}},nh=ee({},Ar,{get(e,t){if(t!==Symbol.unscopables)return Ar.get(e,t,e)},has(e,t){return t[0]!=="_"&&!af(t)}});function rh(){return null}function oh(){return null}function lh(e){}function ah(e){}function ch(){return null}function uh(){}function fh(e,t){return null}function dh(){return za().slots}function hh(){return za().attrs}function za(e){const t=Ue();return t.setupContext||(t.setupContext=Pc(t))}function hi(e){return $(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}function ph(e,t){const s=hi(e);for(const i in t){if(i.startsWith("__skip"))continue;let n=s[i];n?$(n)||K(n)?n=s[i]={type:n,default:t[i]}:n.default=t[i]:n===null&&(n=s[i]={default:t[i]}),n&&t[`__skip_${i}`]&&(n.skipFactory=!0)}return s}function mh(e,t){return!e||!t?e||t:$(e)&&$(t)?e.concat(t):ee({},hi(e),hi(t))}function gh(e,t){const s={};for(const i in e)t.includes(i)||Object.defineProperty(s,i,{enumerable:!0,get:()=>e[i]});return s}function bh(e){const t=Ue(),s=ls;let i=e();bi(),s&&Is(!1);const n=()=>{Hs(t),s&&Is(!0)},r=()=>{Ue()!==t&&t.scope.off(),bi(),s&&Is(!1)};return Kr(i)&&(i=i.catch(o=>{throw n(),Promise.resolve().then(()=>Promise.resolve().then(r)),o})),[i,()=>{n(),Promise.resolve().then(r)}]}let Nr=!0;function yh(e){const t=co(e),s=e.proxy,i=e.ctx;Nr=!1,t.beforeCreate&&il(t.beforeCreate,e,"bc");const{data:n,computed:r,methods:o,watch:l,provide:a,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:m,updated:y,activated:_,deactivated:O,beforeDestroy:P,beforeUnmount:T,destroyed:p,unmounted:b,render:v,renderTracked:M,renderTriggered:R,errorCaptured:A,serverPrefetch:S,expose:w,inheritAttrs:I,components:C,directives:F,filters:q}=t;if(c&&_h(c,i,null),o)for(const J in o){const G=o[J];K(G)&&(i[J]=G.bind(s))}if(n){const J=n.call(s,s);le(J)&&(e.data=Hn(J))}if(Nr=!0,r)for(const J in r){const G=r[J],Ee=K(G)?G.bind(s,s):K(G.get)?G.get.bind(s,s):Re,re=!K(G)&&K(G.set)?G.set.bind(s):Re,ce=Rc({get:Ee,set:re});Object.defineProperty(i,J,{enumerable:!0,configurable:!0,get:()=>ce.value,set:ht=>ce.value=ht})}if(l)for(const J in l)ec(l[J],i,s,J);if(a){const J=K(a)?a.call(s):a;Reflect.ownKeys(J).forEach(G=>{Ra(G,J[G])})}u&&il(u,e,"c");function U(J,G){$(G)?G.forEach(Ee=>J(Ee.bind(s))):G&&J(G.bind(s))}if(U(Wa,f),U(Ii,h),U(ro,m),U(Wn,y),U(ja,_),U(Qa,O),U(Xa,A),U(Ya,M),U(Ja,R),U(Gn,T),U(Oi,b),U(Ga,S),$(w))if(w.length){const J=e.exposed||(e.exposed={});w.forEach(G=>{Object.defineProperty(J,G,{get:()=>s[G],set:Ee=>s[G]=Ee,enumerable:!0})})}else e.exposed||(e.exposed={});v&&e.render===Re&&(e.render=v),I!=null&&(e.inheritAttrs=I),C&&(e.components=C),F&&(e.directives=F),S&&io(e)}function _h(e,t,s=Re){$(e)&&(e=kr(e));for(const i in e){const n=e[i];let r;le(n)?"default"in n?r=si(n.from||i,n.default,!0):r=si(n.from||i):r=si(n),Ce(r)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):t[i]=r}}function il(e,t,s){ze($(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,s)}function ec(e,t,s,i){let n=i.includes(".")?Fa(s,i):()=>s[i];if(X(e)){const r=t[e];K(r)&&Ns(n,r)}else if(K(e))Ns(n,e.bind(s));else if(le(e))if($(e))e.forEach(r=>ec(r,t,s,i));else{const r=K(e.handler)?e.handler.bind(s):t[e.handler];K(r)&&Ns(n,r,e)}}function co(e){const t=e.type,{mixins:s,extends:i}=t,{mixins:n,optionsCache:r,config:{optionMergeStrategies:o}}=e.appContext,l=r.get(t);let a;return l?a=l:!n.length&&!s&&!i?a=t:(a={},n.length&&n.forEach(c=>fn(a,c,o,!0)),fn(a,t,o)),le(t)&&r.set(t,a),a}function fn(e,t,s,i=!1){const{mixins:n,extends:r}=t;r&&fn(e,r,s,!0),n&&n.forEach(o=>fn(e,o,s,!0));for(const o in t)if(!(i&&o==="expose")){const l=vh[o]||s&&s[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const vh={data:nl,props:rl,emits:rl,methods:Xs,computed:Xs,beforeCreate:$e,created:$e,beforeMount:$e,mounted:$e,beforeUpdate:$e,updated:$e,beforeDestroy:$e,beforeUnmount:$e,destroyed:$e,unmounted:$e,activated:$e,deactivated:$e,errorCaptured:$e,serverPrefetch:$e,components:Xs,directives:Xs,watch:Th,provide:nl,inject:Sh};function nl(e,t){return t?e?function(){return ee(K(e)?e.call(this,this):e,K(t)?t.call(this,this):t)}:t:e}function Sh(e,t){return Xs(kr(e),kr(t))}function kr(e){if($(e)){const t={};for(let s=0;s{let u,f=te,h;return Da(()=>{const m=e[n];ke(u,m)&&(u=m,c())}),{get(){return a(),s.get?s.get(u):u},set(m){const y=s.set?s.set(m):m;if(!ke(y,u)&&!(f!==te&&ke(m,f)))return;const _=i.vnode.props,O=!!(_&&(t in _||n in _||r in _)&&(`onUpdate:${t}`in _||`onUpdate:${n}`in _||`onUpdate:${r}`in _));O||(u=m,c()),i.emit(`update:${t}`,y),ke(m,f)&&(ke(m,y)&&!ke(y,h)||O&&f!==te&&!ke(y,u))&&c(),f=m,h=y}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?o||te:l,done:!1}:{done:!0}}}},l}const sc=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${fe(t)}Modifiers`]||e[`${Ke(t)}Modifiers`];function Ah(e,t,...s){if(e.isUnmounted)return;const i=e.vnode.props||te;let n=s;const r=t.startsWith("update:"),o=r&&sc(i,t.slice(7));o&&(o.trim&&(n=s.map(u=>X(u)?u.trim():u)),o.number&&(n=s.map(Ln)));let l,a=i[l=Es(t)]||i[l=Es(fe(t))];!a&&r&&(a=i[l=Es(Ke(t))]),a&&ze(a,e,6,n);const c=i[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ze(c,e,6,n)}}const Nh=new WeakMap;function ic(e,t,s=!1){const i=s?Nh:t.emitsCache,n=i.get(e);if(n!==void 0)return n;const r=e.emits;let o={},l=!1;if(!K(e)){const a=c=>{const u=ic(c,t,!0);u&&(l=!0,ee(o,u))};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(le(e)&&i.set(e,null),null):($(r)?r.forEach(a=>o[a]=null):ee(o,r),le(e)&&i.set(e,o),o)}function Jn(e,t){return!e||!cs(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ae(e,t[0].toLowerCase()+t.slice(1))||ae(e,Ke(t))||ae(e,t))}function Yi(e){const{type:t,vnode:s,proxy:i,withProxy:n,propsOptions:[r],slots:o,attrs:l,emit:a,render:c,renderCache:u,props:f,data:h,setupState:m,ctx:y,inheritAttrs:_}=e,O=di(e);let P,T;try{if(s.shapeFlag&4){const b=n||i,v=b;P=Qe(c.call(v,b,u,f,m,h,y)),T=l}else{const b=t;P=Qe(b.length>1?b(f,{attrs:l,slots:o,emit:a}):b(f,null)),T=t.props?l:xh(l)}}catch(b){ni.length=0,ds(b,e,1),P=ge(_e)}let p=P;if(T&&_!==!1){const b=Object.keys(T),{shapeFlag:v}=p;b.length&&v&7&&(r&&b.some(On)&&(T=Ih(T,r)),p=Tt(p,T,!1,!0))}return s.dirs&&(p=Tt(p,null,!1,!0),p.dirs=p.dirs?p.dirs.concat(s.dirs):s.dirs),s.transition&&Dt(p,s.transition),P=p,di(O),P}function kh(e,t=!0){let s;for(let i=0;i{let t;for(const s in e)(s==="class"||s==="style"||cs(s))&&((t||(t={}))[s]=e[s]);return t},Ih=(e,t)=>{const s={};for(const i in e)(!On(i)||!(i.slice(9)in t))&&(s[i]=e[i]);return s};function Oh(e,t,s){const{props:i,children:n,component:r}=e,{props:o,children:l,patchFlag:a}=t,c=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&a>=0){if(a&1024)return!0;if(a&16)return i?ol(i,o,c):!!o;if(a&8){const u=t.dynamicProps;for(let f=0;fObject.create(rc),lc=e=>Object.getPrototypeOf(e)===rc;function Ph(e,t,s,i=!1){const n={},r=oc();e.propsDefaults=Object.create(null),ac(e,t,n,r);for(const o in e.propsOptions[0])o in n||(n[o]=void 0);s?e.props=i?n:Sa(n):e.type.props?e.props=n:e.props=r,e.attrs=r}function Rh(e,t,s,i){const{props:n,attrs:r,vnode:{patchFlag:o}}=e,l=ie(n),[a]=e.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let f=0;f{a=!0;const[h,m]=cc(f,t,!0);ee(o,h),m&&l.push(...m)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!a)return le(e)&&i.set(e,Ts),Ts;if($(r))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",fo=e=>$(e)?e.map(Qe):[Qe(e)],Lh=(e,t,s)=>{if(t._n)return t;const i=zr((...n)=>fo(t(...n)),s);return i._c=!1,i},uc=(e,t,s)=>{const i=e._ctx;for(const n in e){if(uo(n))continue;const r=e[n];if(K(r))t[n]=Lh(n,r,i);else if(r!=null){const o=fo(r);t[n]=()=>o}}},fc=(e,t)=>{const s=fo(t);e.slots.default=()=>s},dc=(e,t,s)=>{for(const i in t)(s||!uo(i))&&(e[i]=t[i])},Dh=(e,t,s)=>{const i=e.slots=oc();if(e.vnode.shapeFlag&32){const n=t._;n?(dc(i,t,s),s&&zl(i,"_",n,!0)):uc(t,i)}else t&&fc(e,t)},Fh=(e,t,s)=>{const{vnode:i,slots:n}=e;let r=!0,o=te;if(i.shapeFlag&32){const l=t._;l?s&&l===1?r=!1:dc(n,t,s):(r=!t.$stable,uc(t,n)),o=t}else t&&(fc(e,t),o={default:1});if(r)for(const l in n)!uo(l)&&o[l]==null&&delete n[l]},Se=vc;function hc(e){return mc(e)}function pc(e){return mc(e,Rd)}function mc(e,t){const s=Dn();s.__VUE__=!0;const{insert:i,remove:n,patchProp:r,createElement:o,createText:l,createComment:a,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:m=Re,insertStaticContent:y}=e,_=(d,g,E,L=null,k=null,N=null,V=void 0,B=null,D=!!g.dynamicChildren)=>{if(d===g)return;d&&!ct(d,g)&&(L=Di(d),ht(d,k,N,!0),d=null),g.patchFlag===-2&&(D=!1,g.dynamicChildren=null);const{type:x,ref:Q,shapeFlag:H}=g;switch(x){case Kt:O(d,g,E,L);break;case _e:P(d,g,E,L);break;case is:d==null&&T(g,E,L,V);break;case xe:C(d,g,E,L,k,N,V,B,D);break;default:H&1?v(d,g,E,L,k,N,V,B,D):H&6?F(d,g,E,L,k,N,V,B,D):(H&64||H&128)&&x.process(d,g,E,L,k,N,V,B,D,hs)}Q!=null&&k?ks(Q,d&&d.ref,N,g||d,!g):Q==null&&d&&d.ref!=null&&ks(d.ref,null,N,d,!0)},O=(d,g,E,L)=>{if(d==null)i(g.el=l(g.children),E,L);else{const k=g.el=d.el;g.children!==d.children&&c(k,g.children)}},P=(d,g,E,L)=>{d==null?i(g.el=a(g.children||""),E,L):g.el=d.el},T=(d,g,E,L)=>{[d.el,d.anchor]=y(d.children,g,E,L,d.el,d.anchor)},p=({el:d,anchor:g},E,L)=>{let k;for(;d&&d!==g;)k=h(d),i(d,E,L),d=k;i(g,E,L)},b=({el:d,anchor:g})=>{let E;for(;d&&d!==g;)E=h(d),n(d),d=E;n(g)},v=(d,g,E,L,k,N,V,B,D)=>{if(g.type==="svg"?V="svg":g.type==="math"&&(V="mathml"),d==null)M(g,E,L,k,N,V,B,D);else{const x=d.el&&d.el._isVueCE?d.el:null;try{x&&x._beginPatch(),S(d,g,k,N,V,B,D)}finally{x&&x._endPatch()}}},M=(d,g,E,L,k,N,V,B)=>{let D,x;const{props:Q,shapeFlag:H,transition:j,dirs:Y}=d;if(D=d.el=o(d.type,N,Q&&Q.is,Q),H&8?u(D,d.children):H&16&&A(d.children,D,null,L,k,dr(d,N),V,B),Y&&bt(d,null,L,"created"),R(D,d,d.scopeId,V,L),Q){for(const de in Q)de!=="value"&&!Ot(de)&&r(D,de,null,Q[de],N,L);"value"in Q&&r(D,"value",null,Q.value,N),(x=Q.onVnodeBeforeMount)&&je(x,L,d)}Y&&bt(d,null,L,"beforeMount");const ne=gc(k,j);ne&&j.beforeEnter(D),i(D,g,E),((x=Q&&Q.onVnodeMounted)||ne||Y)&&Se(()=>{x&&je(x,L,d),ne&&j.enter(D),Y&&bt(d,null,L,"mounted")},k)},R=(d,g,E,L,k)=>{if(E&&m(d,E),L)for(let N=0;N{for(let x=D;x{const B=g.el=d.el;let{patchFlag:D,dynamicChildren:x,dirs:Q}=g;D|=d.patchFlag&16;const H=d.props||te,j=g.props||te;let Y;if(E&&Jt(E,!1),(Y=j.onVnodeBeforeUpdate)&&je(Y,E,g,d),Q&&bt(g,d,E,"beforeUpdate"),E&&Jt(E,!0),x&&(!d.dynamicChildren||d.dynamicChildren.length!==x.length)&&(D=0,V=!1,x=null),(H.innerHTML&&j.innerHTML==null||H.textContent&&j.textContent==null)&&u(B,""),x?w(d.dynamicChildren,x,B,E,L,dr(g,k),N):V||G(d,g,B,null,E,L,dr(g,k),N,!1),D>0){if(D&16)I(B,H,j,E,k);else if(D&2&&H.class!==j.class&&r(B,"class",null,j.class,k),D&4&&r(B,"style",H.style,j.style,k),D&8){const ne=g.dynamicProps;for(let de=0;de{Y&&je(Y,E,g,d),Q&&bt(g,d,E,"updated")},L)},w=(d,g,E,L,k,N,V)=>{for(let B=0;B{if(g!==E){if(g!==te)for(const N in g)!Ot(N)&&!(N in E)&&r(d,N,g[N],null,k,L);for(const N in E){if(Ot(N))continue;const V=E[N],B=g[N];V!==B&&N!=="value"&&r(d,N,B,V,k,L)}"value"in E&&r(d,"value",g.value,E.value,k)}},C=(d,g,E,L,k,N,V,B,D)=>{const x=g.el=d?d.el:l(""),Q=g.anchor=d?d.anchor:l("");let{patchFlag:H,dynamicChildren:j,slotScopeIds:Y}=g;Y&&(B=B?B.concat(Y):Y),d==null?(i(x,E,L),i(Q,E,L),A(g.children||[],E,Q,k,N,V,B,D)):H>0&&H&64&&j&&d.dynamicChildren&&d.dynamicChildren.length===j.length?(w(d.dynamicChildren,j,E,k,N,V,B),(g.key!=null||k&&g===k.subTree)&&ho(d,g,!0)):G(d,g,E,Q,k,N,V,B,D)},F=(d,g,E,L,k,N,V,B,D)=>{g.slotScopeIds=B,d==null?g.shapeFlag&512?k.ctx.activate(g,E,L,V,D):q(g,E,L,k,N,V,D):W(d,g,D)},q=(d,g,E,L,k,N,V)=>{const B=d.component=Nc(d,L,k);if(xi(d)&&(B.ctx.renderer=hs),xc(B,!1,V),B.asyncDep){if(k&&k.registerDep(B,U,V),!d.el){const D=B.subTree=ge(_e);P(null,D,g,E),d.placeholder=D.el}}else U(B,d,g,E,k,N,V)},W=(d,g,E)=>{const L=g.component=d.component;if(Oh(d,g,E))if(L.asyncDep&&!L.asyncResolved){J(L,g,E);return}else L.next=g,L.update();else g.el=d.el,L.vnode=g},U=(d,g,E,L,k,N,V)=>{const B=()=>{if(d.isMounted){let{next:H,bu:j,u:Y,parent:ne,vnode:de}=d;{const Je=bc(d);if(Je){H&&(H.el=de.el,J(d,H,V)),Je.asyncDep.then(()=>{Se(()=>{d.isUnmounted||x()},k)});return}}let ue=H,ve;Jt(d,!1),H?(H.el=de.el,J(d,H,V)):H=de,j&&ws(j),(ve=H.props&&H.props.onVnodeBeforeUpdate)&&je(ve,ne,H,de),Jt(d,!0);const we=Yi(d),at=d.subTree;d.subTree=we,_(at,we,f(at.el),Di(at),d,k,N),H.el=we.el,ue===null&&Yn(d,we.el),Y&&Se(Y,k),(ve=H.props&&H.props.onVnodeUpdated)&&Se(()=>je(ve,ne,H,de),k)}else{let H;const{el:j,props:Y}=g,{bm:ne,m:de,parent:ue,root:ve,type:we}=d,at=Rt(g);if(Jt(d,!1),ne&&ws(ne),!at&&(H=Y&&Y.onVnodeBeforeMount)&&je(H,ue,g),Jt(d,!0),j&&nr){const Je=()=>{d.subTree=Yi(d),nr(j,d.subTree,d,k,null)};at&&we.__asyncHydrate?we.__asyncHydrate(j,d,Je):Je()}else{ve.ce&&ve.ce._hasShadowRoot()&&ve.ce._injectChildStyle(we,d.parent?d.parent.type:void 0);const Je=d.subTree=Yi(d);_(null,Je,E,L,d,k,N),g.el=Je.el}if(de&&Se(de,k),!at&&(H=Y&&Y.onVnodeMounted)){const Je=g;Se(()=>je(H,ue,Je),k)}(g.shapeFlag&256||ue&&Rt(ue.vnode)&&ue.vnode.shapeFlag&256)&&d.a&&Se(d.a,k),d.isMounted=!0,g=E=L=null}};d.scope.on();const D=d.effect=new li(B);d.scope.off();const x=d.update=D.run.bind(D),Q=d.job=D.runIfDirty.bind(D);Q.i=d,Q.id=d.uid,D.scheduler=()=>Zr(Q),Jt(d,!0),x()},J=(d,g,E)=>{g.component=d;const L=d.vnode.props;d.vnode=g,d.next=null,Rh(d,g.props,L,E),Fh(d,g.children,E),_t(),Jo(d),vt()},G=(d,g,E,L,k,N,V,B,D=!1)=>{const x=d&&d.children,Q=d?d.shapeFlag:0,H=g.children,{patchFlag:j,shapeFlag:Y}=g;if(j>0){if(j&128){re(x,H,E,L,k,N,V,B,D);return}else if(j&256){Ee(x,H,E,L,k,N,V,B,D);return}}Y&8?(Q&16&&Us(x,k,N),H!==x&&u(E,H)):Q&16?Y&16?re(x,H,E,L,k,N,V,B,D):Us(x,k,N,!0):(Q&8&&u(E,""),Y&16&&A(H,E,L,k,N,V,B,D))},Ee=(d,g,E,L,k,N,V,B,D)=>{d=d||Ts,g=g||Ts;const x=d.length,Q=g.length,H=Math.min(x,Q);let j;for(j=0;jQ?Us(d,k,N,!0,!1,H):A(g,E,L,k,N,V,B,D,H)},re=(d,g,E,L,k,N,V,B,D)=>{let x=0;const Q=g.length;let H=d.length-1,j=Q-1;for(;x<=H&&x<=j;){const Y=d[x],ne=g[x]=D?Nt(g[x]):Qe(g[x]);if(ct(Y,ne))_(Y,ne,E,null,k,N,V,B,D);else break;x++}for(;x<=H&&x<=j;){const Y=d[H],ne=g[j]=D?Nt(g[j]):Qe(g[j]);if(ct(Y,ne))_(Y,ne,E,null,k,N,V,B,D);else break;H--,j--}if(x>H){if(x<=j){const Y=j+1,ne=Yj)for(;x<=H;)ht(d[x],k,N,!0),x++;else{const Y=x,ne=x,de=new Map;for(x=ne;x<=j;x++){const Ye=g[x]=D?Nt(g[x]):Qe(g[x]);Ye.key!=null&&de.set(Ye.key,x)}let ue,ve=0;const we=j-ne+1;let at=!1,Je=0;const qs=new Array(we);for(x=0;x=we){ht(Ye,k,N,!0);continue}let pt;if(Ye.key!=null)pt=de.get(Ye.key);else for(ue=ne;ue<=j;ue++)if(qs[ue-ne]===0&&ct(Ye,g[ue])){pt=ue;break}pt===void 0?ht(Ye,k,N,!0):(qs[pt-ne]=x+1,pt>=Je?Je=pt:at=!0,_(Ye,g[pt],E,null,k,N,V,B,D),ve++)}const Uo=at?Bh(qs):Ts;for(ue=Uo.length-1,x=we-1;x>=0;x--){const Ye=ne+x,pt=g[Ye],qo=g[Ye+1],jo=Ye+1{const{el:N,type:V,transition:B,children:D,shapeFlag:x}=d;if(x&6){ce(d.component.subTree,g,E,L);return}if(x&128){d.suspense.move(g,E,L);return}if(x&64){V.move(d,g,E,hs);return}if(V===xe){i(N,g,E);for(let H=0;HB.enter(N),k));else{const{leave:H,delayLeave:j,afterLeave:Y}=B,ne=()=>{d.ctx.isUnmounted?n(N):i(N,g,E)},de=()=>{const ue=N._isLeaving||!!N[it];N._isLeaving&&N[it](!0),B.persisted&&!ue?ne():H(N,()=>{ne(),Y&&Y()})};j?j(N,ne,de):de()}else i(N,g,E)},ht=(d,g,E,L=!1,k=!1)=>{const{type:N,props:V,ref:B,children:D,dynamicChildren:x,shapeFlag:Q,patchFlag:H,dirs:j,cacheIndex:Y,memo:ne}=d;if(H===-2&&(k=!1),B!=null&&(_t(),ks(B,null,E,d,!0),vt()),Y!=null&&(g.renderCache[Y]=void 0),Q&256){g.ctx.deactivate(d);return}const de=Q&1&&j,ue=!Rt(d);let ve;if(ue&&(ve=V&&V.onVnodeBeforeUnmount)&&je(ve,g,d),Q&6)Zu(d.component,E,L);else{if(Q&128){d.suspense.unmount(E,L);return}de&&bt(d,null,g,"beforeUnmount"),Q&64?d.type.remove(d,g,E,hs,L):x&&!x.hasOnce&&(N!==xe||H>0&&H&64)?Us(x,g,E,!1,!0):(N===xe&&H&384||!k&&Q&16)&&Us(D,g,E),L&&$o(d)}const we=ne!=null&&Y==null;(ue&&(ve=V&&V.onVnodeUnmounted)||de||we)&&Se(()=>{ve&&je(ve,g,d),de&&bt(d,null,g,"unmounted"),we&&(d.el=null)},E)},$o=d=>{const{type:g,el:E,anchor:L,transition:k}=d;if(g===xe){Xu(E,L);return}if(g===is){b(d);return}const N=()=>{n(E),k&&!k.persisted&&k.afterLeave&&k.afterLeave()};if(d.shapeFlag&1&&k&&!k.persisted){const{leave:V,delayLeave:B}=k,D=()=>V(E,N);B?B(d.el,N,D):D()}else N()},Xu=(d,g)=>{let E;for(;d!==g;)E=h(d),n(d),d=E;n(g)},Zu=(d,g,E)=>{const{bum:L,scope:k,job:N,subTree:V,um:B,m:D,a:x}=d;dn(D),dn(x),L&&ws(L),k.stop(),N&&(N.flags|=8,ht(V,d,g,E)),B&&Se(B,g),Se(()=>{d.isUnmounted=!0},g)},Us=(d,g,E,L=!1,k=!1,N=0)=>{for(let V=N;V{if(d.shapeFlag&6)return Di(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const g=h(d.anchor||d.el),E=g&&g[Ba];return E?h(E):g};let sr=!1;const Ho=(d,g,E)=>{let L;d==null?g._vnode&&(ht(g._vnode,null,null,!0),L=g._vnode.component):_(g._vnode||null,d,g,null,null,null,E),g._vnode=d,sr||(sr=!0,Jo(L),an(),sr=!1)},hs={p:_,um:ht,m:ce,r:$o,mt:q,mc:A,pc:G,pbc:w,n:Di,o:e};let ir,nr;return t&&([ir,nr]=t(hs)),{render:Ho,hydrate:ir,createApp:Eh(Ho,ir)}}function dr({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 Jt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function gc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ho(e,t,s=!1){const i=e.children,n=t.children;if($(i)&&$(n))for(let r=0;r>1,e[s[l]]0&&(t[i]=s[r-1]),s[r]=i)}}for(r=s.length,o=s[r-1];r-- >0;)s[r]=o,o=t[o];return s}function bc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:bc(t)}function dn(e){if(e)for(let t=0;te.__isSuspense;let Ir=0;const Vh={name:"Suspense",__isSuspense:!0,process(e,t,s,i,n,r,o,l,a,c){if(e==null)Hh(t,s,i,n,r,o,l,a,c);else{if(r&&r.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Uh(e,t,s,i,n,o,l,a,c)}},hydrate:qh,normalize:jh},$h=Vh;function pi(e,t){const s=e.props&&e.props[t];K(s)&&s()}function Hh(e,t,s,i,n,r,o,l,a){const{p:c,o:{createElement:u}}=a,f=u("div"),h=e.suspense=_c(e,n,i,t,f,s,r,o,l,a);c(null,h.pendingBranch=e.ssContent,f,null,i,h,r,o),h.deps>0?(pi(e,"onPending"),pi(e,"onFallback"),c(null,e.ssFallback,t,s,i,null,r,o),xs(h,e.ssFallback)):h.resolve(!1,!0)}function Uh(e,t,s,i,n,r,o,l,{p:a,um:c,o:{createElement:u}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const h=t.ssContent,m=t.ssFallback,{activeBranch:y,pendingBranch:_,isInFallback:O,isHydrating:P}=f;if(_)f.pendingBranch=h,ct(_,h)?(a(_,h,f.hiddenContainer,null,n,f,r,o,l),f.deps<=0?f.resolve():O&&(P||(a(y,m,s,i,n,null,r,o,l),xs(f,m)))):(f.pendingId=Ir++,P?(f.isHydrating=!1,f.activeBranch=_):c(_,n,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("div"),O?(a(null,h,f.hiddenContainer,null,n,f,r,o,l),f.deps<=0?f.resolve():(a(y,m,s,i,n,null,r,o,l),xs(f,m))):y&&ct(y,h)?(a(y,h,s,i,n,f,r,o,l),f.resolve(!0)):(a(null,h,f.hiddenContainer,null,n,f,r,o,l),f.deps<=0&&f.resolve()));else if(y&&ct(y,h))a(y,h,s,i,n,f,r,o,l),xs(f,h);else if(pi(t,"onPending"),f.pendingBranch=h,h.shapeFlag&512?f.pendingId=h.component.suspenseId:f.pendingId=Ir++,a(null,h,f.hiddenContainer,null,n,f,r,o,l),f.deps<=0)f.resolve();else{const{timeout:T,pendingId:p}=f;T>0?setTimeout(()=>{f.pendingId===p&&f.fallback(m)},T):T===0&&f.fallback(m)}}function _c(e,t,s,i,n,r,o,l,a,c,u=!1){const{p:f,m:h,um:m,n:y,o:{parentNode:_,remove:O}}=c;let P;const T=Qh(e);T&&t&&t.pendingBranch&&(P=t.pendingId,t.deps++);const p=e.props?sn(e.props.timeout):void 0,b=r,v={vnode:e,parent:t,parentComponent:s,namespace:o,container:i,hiddenContainer:n,deps:0,pendingId:Ir++,timeout:typeof p=="number"?p:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(M=!1,R=!1){const{vnode:A,activeBranch:S,pendingBranch:w,pendingId:I,effects:C,parentComponent:F,container:q,isInFallback:W}=v;let U=!1;if(v.isHydrating)v.isHydrating=!1;else if(!M){U=S&&w.transition&&w.transition.mode==="out-in";let Ee=!1;U&&(S.transition.afterLeave=()=>{I===v.pendingId&&(h(w,q,r===b&&!Ee?y(S):r,0),ui(C),W&&A.ssFallback&&(A.ssFallback.el=null))}),S&&!v.isFallbackMountPending&&(_(S.el)===q&&(r=y(S),Ee=!0),m(S,F,v,!0),!U&&W&&A.ssFallback&&Se(()=>A.ssFallback.el=null,v)),U||h(w,q,r,0)}v.isFallbackMountPending=!1,xs(v,w),v.pendingBranch=null,v.isInFallback=!1;let J=v.parent,G=!1;for(;J;){if(J.pendingBranch){J.effects.push(...C),G=!0;break}J=J.parent}!G&&!U&&ui(C),v.effects=[],T&&t&&t.pendingBranch&&P===t.pendingId&&(t.deps--,t.deps===0&&!R&&t.resolve()),pi(A,"onResolve")},fallback(M){if(!v.pendingBranch)return;const{vnode:R,activeBranch:A,parentComponent:S,container:w,namespace:I}=v;pi(R,"onFallback");const C=y(A),F=()=>{v.isFallbackMountPending=!1,v.isInFallback&&(f(null,M,w,C,S,null,I,l,a),xs(v,M))},q=M.transition&&M.transition.mode==="out-in";q&&(v.isFallbackMountPending=!0,A.transition.afterLeave=F),v.isInFallback=!0,m(A,S,null,!0),q||F()},move(M,R,A){v.activeBranch&&h(v.activeBranch,M,R,A),v.container=M},next(){return v.activeBranch&&y(v.activeBranch)},registerDep(M,R,A){const S=!!v.pendingBranch;S&&v.deps++;const w=M.vnode.el;M.asyncDep.catch(I=>{ds(I,M,0)}).then(I=>{if(M.isUnmounted||v.isUnmounted||v.pendingId!==M.suspenseId)return;bi(),M.asyncResolved=!0;const{vnode:C}=M;Or(M,I,!1),w&&(C.el=w);const F=!w&&M.subTree.el;R(M,C,_(w||M.subTree.el),w?null:y(M.subTree),v,o,A),F&&(C.placeholder=null,O(F)),Yn(M,C.el),S&&--v.deps===0&&v.resolve()})},unmount(M,R){v.isUnmounted=!0,v.activeBranch&&m(v.activeBranch,s,M,R),v.pendingBranch&&m(v.pendingBranch,s,M,R)}};return v}function qh(e,t,s,i,n,r,o,l,a){const c=t.suspense=_c(t,i,s,e.parentNode,document.createElement("div"),null,n,r,o,l,!0),u=a(e,c.pendingBranch=t.ssContent,s,c,r,o);return c.deps===0&&c.resolve(!1,!0),u}function jh(e){const{shapeFlag:t,children:s}=e,i=t&32;e.ssContent=al(i?s.default:s),e.ssFallback=i?al(s.fallback):ge(_e)}function al(e){let t;if(K(e)){const s=os&&e._c;s&&(e._d=!1,mi()),e=e(),s&&(e._d=!0,t=Fe,Sc())}return $(e)&&(e=kh(e)),e=Qe(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(s=>s!==e)),e}function vc(e,t){t&&t.pendingBranch?$(e)?t.effects.push(...e):t.effects.push(e):ui(e)}function xs(e,t){e.activeBranch=t;const{vnode:s,parentComponent:i}=e;let n=t.el;for(;!n&&t.component;)t=t.component.subTree,n=t.el;s.el=n,i&&i.subTree===s&&(i.vnode.el=n,Yn(i,n))}function Qh(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const xe=Symbol.for("v-fgt"),Kt=Symbol.for("v-txt"),_e=Symbol.for("v-cmt"),is=Symbol.for("v-stc"),ni=[];let Fe=null;function mi(e=!1){ni.push(Fe=e?null:[])}function Sc(){ni.pop(),Fe=ni[ni.length-1]||null}let os=1;function gi(e,t=!1){os+=e,e<0&&Fe&&t&&(Fe.hasOnce=!0)}function Tc(e){return e.dynamicChildren=os>0?Fe||Ts:null,Sc(),os>0&&Fe&&Fe.push(e),e}function Kh(e,t,s,i,n,r){return Tc(po(e,t,s,i,n,r,!0))}function pn(e,t,s,i,n){return Tc(ge(e,t,s,i,n,!0))}function Ft(e){return e?e.__v_isVNode===!0:!1}function ct(e,t){return e.type===t.type&&e.key===t.key}function Wh(e){}const Cc=({key:e})=>e??null,Xi=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?X(e)||Ce(e)||K(e)?{i:Pe,r:e,k:t,f:!!s}:e:null);function po(e,t=null,s=null,i=0,n=null,r=e===xe?0:1,o=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Cc(t),ref:t&&Xi(t),scopeId:jn,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:r,patchFlag:i,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:Pe};return l?(mn(a,s),r&128&&e.normalize(a)):s&&(a.shapeFlag|=X(s)?8:16),os>0&&!o&&Fe&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&Fe.push(a),a}const ge=Gh;function Gh(e,t=null,s=null,i=0,n=null,r=!1){if((!e||e===Za)&&(e=_e),Ft(e)){const l=Tt(e,t,!0);return s&&mn(l,s),os>0&&!r&&Fe&&(l.shapeFlag&6?Fe[Fe.indexOf(e)]=l:Fe.push(l)),l.patchFlag=-2,l}if(tp(e)&&(e=e.__vccOpts),t){t=Ec(t);let{class:l,style:a}=t;l&&!X(l)&&(t.class=wi(l)),le(a)&&(Ai(a)&&!$(a)&&(a=ee({},a)),t.style=Ei(a))}const o=X(e)?1:hn(e)?128:Va(e)?64:le(e)?4:K(e)?2:0;return po(e,t,s,i,n,o,r,!0)}function Ec(e){return e?Ai(e)||lc(e)?ee({},e):e:null}function Tt(e,t,s=!1,i=!1){const{props:n,ref:r,patchFlag:o,children:l,transition:a}=e,c=t?Ac(n||{},t):n,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Cc(c),ref:t&&t.ref?s&&r?$(r)?r.concat(Xi(t)):[r,Xi(t)]:Xi(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Tt(e.ssContent),ssFallback:e.ssFallback&&Tt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&i&&Dt(u,a.clone(u)),u}function mo(e=" ",t=0){return ge(Kt,null,e,t)}function Jh(e,t){const s=ge(is,null,e);return s.staticCount=t,s}function wc(e="",t=!1){return t?(mi(),pn(_e,null,e)):ge(_e,null,e)}function Qe(e){return e==null||typeof e=="boolean"?ge(_e):$(e)?ge(xe,null,e.slice()):Ft(e)?Nt(e):ge(Kt,null,String(e))}function Nt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Tt(e)}function mn(e,t){let s=0;const{shapeFlag:i}=e;if(t==null)t=null;else if($(t))s=16;else if(typeof t=="object")if(i&65){const n=t.default;n&&(n._c&&(n._d=!1),mn(e,n()),n._c&&(n._d=!0));return}else{s=32;const n=t._;!n&&!lc(t)?t._ctx=Pe:n===3&&Pe&&(Pe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(K(t)){if(i&65){mn(e,{default:t});return}t={default:t,_ctx:Pe},s=32}else t=String(t),i&64?(s=16,t=[mo(t)]):s=8;e.children=t,e.shapeFlag|=s}function Ac(...e){const t={};for(let s=0;sOe||Pe;let gn,Is;{const e=Dn(),t=(s,i)=>{let n;return(n=e[s])||(n=e[s]=[]),n.push(i),r=>{n.length>1?n.forEach(o=>o(r)):n[0](r)}};gn=t("__VUE_INSTANCE_SETTERS__",s=>Oe=s),Is=t("__VUE_SSR_SETTERS__",s=>ls=s)}const Hs=e=>{const t=Oe;return gn(e),e.scope.on(),()=>{e.scope.off(),gn(t)}},bi=()=>{Oe&&Oe.scope.off(),gn(null)};function kc(e){return e.vnode.shapeFlag&4}let ls=!1;function xc(e,t=!1,s=!1){t&&Is(t);const{props:i,children:n}=e.vnode,r=kc(e);Ph(e,i,r,t),Dh(e,n,s||t);const o=r?Zh(e,t):void 0;return t&&Is(!1),o}function Zh(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ar);const{setup:i}=s;if(i){_t();const n=e.setupContext=i.length>1?Pc(e):null,r=Hs(e),o=$s(i,e,0,[e.props,n]),l=Kr(o);if(vt(),r(),(l||e.sp)&&!Rt(e)&&io(e),l){if(o.then(bi,bi),t)return o.then(a=>{Or(e,a,t)}).catch(a=>{ds(a,e,0)});e.asyncDep=o}else Or(e,o,t)}else Oc(e,t)}function Or(e,t,s){K(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:le(t)&&(e.setupState=Xr(t)),Oc(e,s)}let bn,Pr;function Ic(e){bn=e,Pr=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,nh))}}const zh=()=>!bn;function Oc(e,t,s){const i=e.type;if(!e.render){if(!t&&bn&&!i.render){const n=i.template||co(e).template;if(n){const{isCustomElement:r,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:a}=i,c=ee(ee({isCustomElement:r,delimiters:l},o),a);i.render=bn(n,c)}}e.render=i.render||Re,Pr&&Pr(e)}{const n=Hs(e);_t();try{yh(e)}finally{vt(),n()}}}const ep={get(e,t){return De(e,"get",""),e[t]}};function Pc(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,ep),slots:e.slots,emit:e.emit,expose:t}}function Pi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Xr(Ta(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in ii)return ii[s](e)},has(t,s){return s in t||s in ii}})):e.proxy}function Rr(e,t=!0){return K(e)?e.displayName||e.name:e.name||t&&e.__name}function tp(e){return K(e)&&"__vccOpts"in e}const Rc=(e,t)=>nd(e,t,ls);function Mc(e,t,s){try{gi(-1);const i=arguments.length;return i===2?le(t)&&!$(t)?Ft(t)?ge(e,null,[t]):ge(e,t):ge(e,null,t):(i>3?s=Array.prototype.slice.call(arguments,2):i===3&&Ft(s)&&(s=[s]),ge(e,t,s))}finally{gi(1)}}function sp(){}function ip(e,t,s,i){const n=s[i];if(n&&Lc(n,e))return n;const r=t();return r.memo=e.slice(),r.cacheIndex=i,s[i]=r}function Lc(e,t){const s=e.memo;if(s.length!=t.length)return!1;for(let i=0;i0&&Fe&&Fe.push(e),!0}const Dc="3.5.39",np=Re,rp=hd,op=_s,lp=Pa,ap={createComponentInstance:Nc,setupComponent:xc,renderComponentRoot:Yi,setCurrentRenderingInstance:di,isVNode:Ft,normalizeVNode:Qe,getComponentPublicInstance:Pi,ensureValidVNode:ao,pushWarningContext:cd,popWarningContext:ud},cp=ap,up=null,fp=null,dp=null;let Mr;const cl=typeof window<"u"&&window.trustedTypes;if(cl)try{Mr=cl.createPolicy("vue",{createHTML:e=>e})}catch{}const Fc=Mr?e=>Mr.createHTML(e):e=>e,hp="http://www.w3.org/2000/svg",pp="http://www.w3.org/1998/Math/MathML",At=typeof document<"u"?document:null,ul=At&&At.createElement("template"),Bc={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,i)=>{const n=t==="svg"?At.createElementNS(hp,e):t==="mathml"?At.createElementNS(pp,e):s?At.createElement(e,{is:s}):At.createElement(e);return e==="select"&&i&&i.multiple!=null&&n.setAttribute("multiple",i.multiple),n},createText:e=>At.createTextNode(e),createComment:e=>At.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>At.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,i,n,r){const o=s?s.previousSibling:t.lastChild;if(n&&(n===r||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),s),!(n===r||!(n=n.nextSibling)););else{ul.innerHTML=Fc(i==="svg"?`${e}`:i==="mathml"?`${e}`:e);const l=ul.content;if(i==="svg"||i==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Vt="transition",Ks="animation",Rs=Symbol("_vtc"),Vc={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},$c=ee({},to,Vc),mp=e=>(e.displayName="Transition",e.props=$c,e),gp=mp((e,{slots:t})=>Mc(Ua,Hc(e),t)),Yt=(e,t=[])=>{$(e)?e.forEach(s=>s(...t)):e&&e(...t)},fl=e=>e?$(e)?e.some(t=>t.length>1):e.length>1:!1;function Hc(e){const t={};for(const C in e)C in Vc||(t[C]=e[C]);if(e.css===!1)return t;const{name:s="v",type:i,duration:n,enterFromClass:r=`${s}-enter-from`,enterActiveClass:o=`${s}-enter-active`,enterToClass:l=`${s}-enter-to`,appearFromClass:a=r,appearActiveClass:c=o,appearToClass:u=l,leaveFromClass:f=`${s}-leave-from`,leaveActiveClass:h=`${s}-leave-active`,leaveToClass:m=`${s}-leave-to`}=e,y=bp(n),_=y&&y[0],O=y&&y[1],{onBeforeEnter:P,onEnter:T,onEnterCancelled:p,onLeave:b,onLeaveCancelled:v,onBeforeAppear:M=P,onAppear:R=T,onAppearCancelled:A=p}=t,S=(C,F,q,W)=>{C._enterCancelled=W,Ut(C,F?u:l),Ut(C,F?c:o),q&&q()},w=(C,F)=>{C._isLeaving=!1,Ut(C,f),Ut(C,m),Ut(C,h),F&&F()},I=C=>(F,q)=>{const W=C?R:T,U=()=>S(F,C,q);Yt(W,[F,U]),dl(()=>{Ut(F,C?a:r),mt(F,C?u:l),fl(W)||hl(F,i,_,U)})};return ee(t,{onBeforeEnter(C){Yt(P,[C]),mt(C,r),mt(C,o)},onBeforeAppear(C){Yt(M,[C]),mt(C,a),mt(C,c)},onEnter:I(!1),onAppear:I(!0),onLeave(C,F){C._isLeaving=!0;const q=()=>w(C,F);mt(C,f),C._enterCancelled?(mt(C,h),Lr(C)):(Lr(C),mt(C,h)),dl(()=>{C._isLeaving&&(Ut(C,f),mt(C,m),fl(b)||hl(C,i,O,q))}),Yt(b,[C,q])},onEnterCancelled(C){S(C,!1,void 0,!0),Yt(p,[C])},onAppearCancelled(C){S(C,!0,void 0,!0),Yt(A,[C])},onLeaveCancelled(C){w(C),Yt(v,[C])}})}function bp(e){if(e==null)return null;if(le(e))return[hr(e.enter),hr(e.leave)];{const t=hr(e);return[t,t]}}function hr(e){return sn(e)}function mt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[Rs]||(e[Rs]=new Set)).add(t)}function Ut(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const s=e[Rs];s&&(s.delete(t),s.size||(e[Rs]=void 0))}function dl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let yp=0;function hl(e,t,s,i){const n=e._endId=++yp,r=()=>{n===e._endId&&i()};if(s!=null)return setTimeout(r,s);const{type:o,timeout:l,propCount:a}=Uc(e,t);if(!o)return i();const c=o+"end";let u=0;const f=()=>{e.removeEventListener(c,h),r()},h=m=>{m.target===e&&++u>=a&&f()};setTimeout(()=>{u(s[y]||"").split(", "),n=i(`${Vt}Delay`),r=i(`${Vt}Duration`),o=pl(n,r),l=i(`${Ks}Delay`),a=i(`${Ks}Duration`),c=pl(l,a);let u=null,f=0,h=0;t===Vt?o>0&&(u=Vt,f=o,h=r.length):t===Ks?c>0&&(u=Ks,f=c,h=a.length):(f=Math.max(o,c),u=f>0?o>c?Vt:Ks:null,h=u?u===Vt?r.length:a.length:0);const m=u===Vt&&/\b(?:transform|all)(?:,|$)/.test(i(`${Vt}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:m}}function pl(e,t){for(;e.lengthml(s)+ml(e[i])))}function ml(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Lr(e){return(e?e.ownerDocument:document).body.offsetHeight}function _p(e,t,s){const i=e[Rs];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const yn=Symbol("_vod"),go=Symbol("_vsh"),qc={name:"show",beforeMount(e,{value:t},{transition:s}){e[yn]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Ws(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:i}){!t!=!s&&(i?t?(i.beforeEnter(e),Ws(e,!0),i.enter(e)):i.leave(e,()=>{Ws(e,!1)}):Ws(e,t))},beforeUnmount(e,{value:t}){Ws(e,t)}};function Ws(e,t){e.style.display=t?e[yn]:"none",e[go]=!t}function vp(){qc.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const jc=Symbol("");function Sp(e){const t=Ue();if(!t)return;const s=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(r=>_n(r,n))},i=()=>{const n=e(t.proxy);t.ce?_n(t.ce,n):Dr(t.subTree,n),s(n)};ro(()=>{ui(i)}),Ii(()=>{Ns(i,Re,{flush:"post"});const n=new MutationObserver(i);n.observe(t.subTree.el.parentNode,{childList:!0}),Oi(()=>n.disconnect())})}function Dr(e,t){if(e.shapeFlag&128){const s=e.suspense;e=s.activeBranch,s.pendingBranch&&!s.isHydrating&&s.effects.push(()=>{Dr(s.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)_n(e.el,t);else if(e.type===xe)e.children.forEach(s=>Dr(s,t));else if(e.type===is){let{el:s,anchor:i}=e;for(;s&&(_n(s,t),s!==i);)s=s.nextSibling}}function _n(e,t){if(e.nodeType===1){const s=e.style;let i="";for(const n in t){const r=Ef(t[n]);s.setProperty(`--${n}`,r),i+=`--${n}: ${r};`}s[jc]=i}}const Tp=/(?:^|;)\s*display\s*:/;function Cp(e,t,s){const i=e.style,n=X(s);let r=!1;if(s&&!n){if(t)if(X(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();s[l]==null&&Zs(i,l,"")}else for(const o in t)s[o]==null&&Zs(i,o,"");for(const o in s){o==="display"&&(r=!0);const l=s[o];l!=null?wp(e,o,!X(t)&&t?t[o]:void 0,l)||Zs(i,o,l):Zs(i,o,"")}}else if(n){if(t!==s){const o=i[jc];o&&(s+=";"+o),i.cssText=s,r=Tp.test(s)}}else t&&e.removeAttribute("style");yn in e&&(e[yn]=r?i.display:"",e[go]&&(i.display="none"))}const gl=/\s*!important$/;function Zs(e,t,s){if($(s))s.forEach(i=>Zs(e,t,i));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const i=Ep(e,t);gl.test(s)?e.setProperty(Ke(i),s.replace(gl,""),"important"):e[i]=s}}const bl=["Webkit","Moz","ms"],pr={};function Ep(e,t){const s=pr[t];if(s)return s;let i=fe(t);if(i!=="filter"&&i in e)return pr[t]=i;i=fs(i);for(let n=0;nmr||(Op.then(()=>mr=0),mr=Date.now());function Rp(e,t){const s=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=s.attached)return;const n=s.value;if($(n)){const r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};const o=n.slice(),l=[i];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Qc=(e,t,s,i,n,r)=>{const o=n==="svg";t==="class"?_p(e,i,o):t==="style"?Cp(e,s,i):cs(t)?On(t)||Np(e,t,s,i,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Mp(e,t,i,o))?(vl(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&_l(e,t,i,o,r,t!=="value")):e._isVueCE&&(Lp(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!X(i)))?vl(e,fe(t),i,r,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),_l(e,t,i,o))};function Mp(e,t,s,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&Tl(t)&&K(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 n=e.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return Tl(t)&&X(s)?!1:t in e}function Lp(e,t){const s=e._def.props;if(!s)return!1;const i=fe(t);return Array.isArray(s)?s.some(n=>fe(n)===i):Object.keys(s).some(n=>fe(n)===i)}const Cl={};function Kc(e,t,s){let i=so(e,t);Pn(i)&&(i=ee({},i,t));class n extends Xn{constructor(o){super(i,o,s)}}return n.def=i,n}const Dp=((e,t)=>Kc(e,t,ru)),Fp=typeof HTMLElement<"u"?HTMLElement:class{};class Xn extends Fp{constructor(t,s={},i=Tn){super(),this._def=t,this._props=s,this._createApp=i,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&&i!==Tn?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(ee({},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 Xn){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,qn(()=>{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 i=0;i{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:o}=i;let l;if(r&&!$(r))for(const a in r){const c=r[a];(c===Number||c&&c.type===Number)&&(a in this._props&&(this._props[a]=sn(this._props[a])),(l||(l=Object.create(null)))[fe(a)]=!0)}this._numberProps=l,this._resolveProps(i),this.shadowRoot&&this._applyStyles(o),this._mount(i)},s=this._def.__asyncLoader;s?this._pendingResolve=s().then(i=>{i.configureApp=this._def.configureApp,t(this._def=i,!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 i in s)ae(this,i)||Object.defineProperty(this,i,{get:()=>Ni(s[i])})}_resolveProps(t){const{props:s}=t,i=$(s)?s:Object.keys(s||{});for(const n of Object.keys(this))n[0]!=="_"&&i.includes(n)&&this._setProp(n,this[n]);for(const n of i.map(fe))Object.defineProperty(this,n,{get(){return this._getProp(n)},set(r){this._setProp(n,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const s=this.hasAttribute(t);let i=s?this.getAttribute(t):Cl;const n=fe(t);s&&this._numberProps&&this._numberProps[n]&&(i=sn(i)),this._setProp(n,i,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,s,i=!0,n=!1){if(s!==this._props[t]&&(this._dirty=!0,s===Cl?delete this._props[t]:(this._props[t]=s,t==="key"&&this._app&&(this._app._ceVNode.key=s)),n&&this._instance&&this._update(),i)){const r=this._ob;r&&(this._processMutations(r.takeRecords()),r.disconnect()),s===!0?this.setAttribute(Ke(t),""):typeof s=="string"||typeof s=="number"?this.setAttribute(Ke(t),s+""):s||this.removeAttribute(Ke(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),nu(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const s=ge(this._def,ee(t,this._props));return this._instance||(s.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const n=(r,o)=>{this.dispatchEvent(new CustomEvent(r,Pn(o[0])?ee({detail:o},o[0]):{detail:o}))};i.emit=(r,...o)=>{n(r,o),Ke(r)!==r&&n(Ke(r),o)},this._setParent()}),s}_applyStyles(t,s,i){if(!t)return;if(s){if(s===this._def||this._styleChildren.has(s))return;this._styleChildren.add(s)}const n=this._nonce,r=this.shadowRoot,o=i?this._getStyleAnchor(i)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(r);let l=null;for(let a=t.length-1;a>=0;a--){const c=document.createElement("style");n&&c.setAttribute("nonce",n),c.textContent=t[a],r.insertBefore(c,l||o),l=c,a===0&&(i||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),Hp=$p({name:"TransitionGroup",props:ee({},$c,{tag:String,moveClass:String}),setup(e,{slots:t}){const s=Ue(),i=eo();let n,r;return Wn(()=>{if(!n.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!Kp(n[0].el,s.vnode.el,o)){n=[];return}n.forEach(qp),n.forEach(jp);const l=n.filter(Qp);Lr(s.vnode.el),l.forEach(a=>{const c=a.el,u=c.style;mt(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const f=c[vn]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",f),c[vn]=null,Ut(c,o))};c.addEventListener("transitionend",f)}),n=[]}),()=>{const o=ie(e),l=Hc(o);let a=o.tag||xe;if(n=[],r)for(let c=0;c{l.split(/\s+/).forEach(a=>a&&i.classList.remove(a))}),s.split(/\s+/).forEach(l=>l&&i.classList.add(l)),i.style.display="none";const r=t.nodeType===1?t:t.parentNode;r.appendChild(i);const{hasTransform:o}=Uc(i);return r.removeChild(i),o}const Gt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return $(t)?s=>ws(t,s):t};function Wp(e){e.target.composing=!0}function wl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const lt=Symbol("_assign");function Al(e,t,s){return t&&(e=e.trim()),s&&(e=Ln(e)),e}const Sn={created(e,{modifiers:{lazy:t,trim:s,number:i}},n){e[lt]=Gt(n);const r=i||n.props&&n.props.type==="number";It(e,t?"change":"input",o=>{o.target.composing||e[lt](Al(e.value,s,r))}),(s||r)&&It(e,"change",()=>{e.value=Al(e.value,s,r)}),t||(It(e,"compositionstart",Wp),It(e,"compositionend",wl),It(e,"change",wl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:n,number:r}},o){if(e[lt]=Gt(o),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?Ln(e.value):e.value,a=t??"";if(l===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(i&&t===s||n&&e.value.trim()===a)||(e.value=a)}},bo={deep:!0,created(e,t,s){e[lt]=Gt(s),It(e,"change",()=>{const i=e._modelValue,n=Ms(e),r=e.checked,o=e[lt];if($(i)){const l=Fn(i,n),a=l!==-1;if(r&&!a)o(i.concat(n));else if(!r&&a){const c=[...i];c.splice(l,1),o(c)}}else if(us(i)){const l=new Set(i);r?l.add(n):l.delete(n),o(l)}else o(Zc(e,r))})},mounted:Nl,beforeUpdate(e,t,s){e[lt]=Gt(s),Nl(e,t,s)}};function Nl(e,{value:t,oldValue:s},i){e._modelValue=t;let n;if($(t))n=Fn(t,i.props.value)>-1;else if(us(t))n=t.has(i.props.value);else{if(t===s)return;n=Lt(t,Zc(e,!0))}e.checked!==n&&(e.checked=n)}const yo={created(e,{value:t},s){e.checked=Lt(t,s.props.value),e[lt]=Gt(s),It(e,"change",()=>{e[lt](Ms(e))})},beforeUpdate(e,{value:t,oldValue:s},i){e[lt]=Gt(i),t!==s&&(e.checked=Lt(t,i.props.value))}},Xc={deep:!0,created(e,{value:t,modifiers:{number:s}},i){const n=us(t);It(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>s?Ln(Ms(o)):Ms(o));e[lt](e.multiple?n?new Set(r):r:r[0]),e._assigning=!0,qn(()=>{e._assigning=!1})}),e[lt]=Gt(i)},mounted(e,{value:t}){kl(e,t)},beforeUpdate(e,t,s){e[lt]=Gt(s)},updated(e,{value:t}){e._assigning||kl(e,t)}};function kl(e,t){const s=e.multiple,i=$(t);if(!(s&&!i&&!us(t))){for(let n=0,r=e.options.length;nString(c)===String(l)):o.selected=Fn(t,l)>-1}else o.selected=t.has(l);else if(Lt(Ms(o),t)){e.selectedIndex!==n&&(e.selectedIndex=n);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ms(e){return"_value"in e?e._value:e.value}function Zc(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const zc={created(e,t,s){Qi(e,t,s,null,"created")},mounted(e,t,s){Qi(e,t,s,null,"mounted")},beforeUpdate(e,t,s,i){Qi(e,t,s,i,"beforeUpdate")},updated(e,t,s,i){Qi(e,t,s,i,"updated")}};function eu(e,t){switch(e){case"SELECT":return Xc;case"TEXTAREA":return Sn;default:switch(t){case"checkbox":return bo;case"radio":return yo;default:return Sn}}}function Qi(e,t,s,i,n){const o=eu(e.tagName,s.props&&s.props.type)[n];o&&o(e,t,s,i)}function Gp(){Sn.getSSRProps=({value:e})=>({value:e}),yo.getSSRProps=({value:e},t)=>{if(t.props&&Lt(t.props.value,e))return{checked:!0}},bo.getSSRProps=({value:e},t)=>{if($(e)){if(t.props&&Fn(e,t.props.value)>-1)return{checked:!0}}else if(us(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},zc.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const s=eu(t.type.toUpperCase(),t.props&&t.props.type);if(s.getSSRProps)return s.getSSRProps(e,t)}}const Jp=["ctrl","shift","alt","meta"],Yp={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)=>Jp.some(s=>e[`${s}Key`]&&!t.includes(s))},Xp=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((n,...r)=>{for(let o=0;o{const s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(n=>{if(!("key"in n))return;const r=Ke(n.key);if(t.some(o=>o===r||Zp[o]===r))return e(n)}))},tu=ee({patchProp:Qc},Bc);let ri,xl=!1;function su(){return ri||(ri=hc(tu))}function iu(){return ri=xl?ri:pc(tu),xl=!0,ri}const nu=((...e)=>{su().render(...e)}),em=((...e)=>{iu().hydrate(...e)}),Tn=((...e)=>{const t=su().createApp(...e),{mount:s}=t;return t.mount=i=>{const n=lu(i);if(!n)return;const r=t._component;!K(r)&&!r.render&&!r.template&&(r.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=s(n,!1,ou(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},t}),ru=((...e)=>{const t=iu().createApp(...e),{mount:s}=t;return t.mount=i=>{const n=lu(i);if(n)return s(n,!0,ou(n))},t});function ou(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function lu(e){return X(e)?document.querySelector(e):e}let Il=!1;const tm=()=>{Il||(Il=!0,Gp(),vp())},sm=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Ua,BaseTransitionPropsValidators:to,Comment:_e,DeprecationTypes:dp,EffectScope:Wr,ErrorCodes:dd,ErrorTypeStrings:rp,Fragment:xe,KeepAlive:Gd,ReactiveEffect:li,Static:is,Suspense:$h,Teleport:Nd,Text:Kt,TrackOpTypes:rd,Transition:gp,TransitionGroup:Up,TriggerOpTypes:od,VueElement:Xn,assertNumber:fd,callWithAsyncErrorHandling:ze,callWithErrorHandling:$s,camelize:fe,capitalize:fs,cloneVNode:Tt,compatUtils:fp,computed:Rc,createApp:Tn,createBlock:pn,createCommentVNode:wc,createElementBlock:Kh,createElementVNode:po,createHydrationRenderer:pc,createPropsRestProxy:gh,createRenderer:hc,createSSRApp:ru,createSlots:th,createStaticVNode:Jh,createTextVNode:mo,createVNode:ge,customRef:wa,defineAsyncComponent:Kd,defineComponent:so,defineCustomElement:Kc,defineEmits:oh,defineExpose:lh,defineModel:uh,defineOptions:ah,defineProps:rh,defineSSRCustomElement:Dp,defineSlots:ch,devtools:op,effect:kf,effectScope:wf,getCurrentInstance:Ue,getCurrentScope:ra,getCurrentWatcher:ld,getTransitionRawChildren:Qn,guardReactiveProps:Ec,h:Mc,handleError:ds,hasInjectionContext:vd,hydrate:em,hydrateOnIdle:$d,hydrateOnInteraction:jd,hydrateOnMediaQuery:qd,hydrateOnVisible:Ud,initCustomFormatter:sp,initDirectivesForSSR:tm,inject:si,isMemoSame:Lc,isProxy:Ai,isReactive:Pt,isReadonly:St,isRef:Ce,isRuntimeOnly:zh,isShallow:Ge,isVNode:Ft,markRaw:Ta,mergeDefaults:ph,mergeModels:mh,mergeProps:Ac,nextTick:qn,nodeOps:Bc,normalizeClass:wi,normalizeProps:df,normalizeStyle:Ei,onActivated:ja,onBeforeMount:Wa,onBeforeUnmount:Gn,onBeforeUpdate:ro,onDeactivated:Qa,onErrorCaptured:Xa,onMounted:Ii,onRenderTracked:Ya,onRenderTriggered:Ja,onScopeDispose:Af,onServerPrefetch:Ga,onUnmounted:Oi,onUpdated:Wn,onWatcherCleanup:Na,openBlock:mi,patchProp:Qc,popScopeId:bd,provide:Ra,proxyRefs:Xr,pushScopeId:gd,queuePostFlushCb:ui,reactive:Hn,readonly:rn,ref:ti,registerRuntimeCompiler:Ic,render:nu,renderList:eh,renderSlot:sh,resolveComponent:Xd,resolveDirective:zd,resolveDynamicComponent:Zd,resolveFilter:up,resolveTransitionHooks:Ps,setBlockTracking:gi,setDevtoolsHook:lp,setTransitionHooks:Dt,shallowReactive:Sa,shallowReadonly:Wf,shallowRef:Ca,ssrContextKey:Ma,ssrUtils:cp,stop:xf,toDisplayString:ia,toHandlerKey:Es,toHandlers:ih,toRaw:ie,toRef:sd,toRefs:zf,toValue:Yf,transformVNodeArgs:Wh,triggerRef:Jf,unref:Ni,useAttrs:hh,useCssModule:Vp,useCssVars:Sp,useHost:Wc,useId:xd,useModel:wh,useSSRContext:La,useShadowRoot:Bp,useSlots:dh,useTemplateRef:Id,useTransitionState:eo,vModelCheckbox:bo,vModelDynamic:zc,vModelRadio:yo,vModelSelect:Xc,vModelText:Sn,vShow:qc,version:Dc,warn:np,watch:Ns,watchEffect:Sd,watchPostEffect:Td,watchSyncEffect:Da,withAsyncContext:bh,withCtx:zr,withDefaults:fh,withDirectives:_d,withKeys:zp,withMemo:ip,withModifiers:Xp,withScopeId:yd},Symbol.toStringTag,{value:"Module"}));const yi=Symbol(""),oi=Symbol(""),_o=Symbol(""),Cn=Symbol(""),au=Symbol(""),as=Symbol(""),cu=Symbol(""),uu=Symbol(""),vo=Symbol(""),So=Symbol(""),Ri=Symbol(""),To=Symbol(""),fu=Symbol(""),Co=Symbol(""),Eo=Symbol(""),wo=Symbol(""),Ao=Symbol(""),No=Symbol(""),ko=Symbol(""),du=Symbol(""),hu=Symbol(""),Zn=Symbol(""),En=Symbol(""),xo=Symbol(""),Io=Symbol(""),_i=Symbol(""),Mi=Symbol(""),Oo=Symbol(""),Fr=Symbol(""),im=Symbol(""),Br=Symbol(""),wn=Symbol(""),nm=Symbol(""),rm=Symbol(""),Po=Symbol(""),om=Symbol(""),lm=Symbol(""),Ro=Symbol(""),pu=Symbol(""),Ls={[yi]:"Fragment",[oi]:"Teleport",[_o]:"Suspense",[Cn]:"KeepAlive",[au]:"BaseTransition",[as]:"openBlock",[cu]:"createBlock",[uu]:"createElementBlock",[vo]:"createVNode",[So]:"createElementVNode",[Ri]:"createCommentVNode",[To]:"createTextVNode",[fu]:"createStaticVNode",[Co]:"resolveComponent",[Eo]:"resolveDynamicComponent",[wo]:"resolveDirective",[Ao]:"resolveFilter",[No]:"withDirectives",[ko]:"renderList",[du]:"renderSlot",[hu]:"createSlots",[Zn]:"toDisplayString",[En]:"mergeProps",[xo]:"normalizeClass",[Io]:"normalizeStyle",[_i]:"normalizeProps",[Mi]:"guardReactiveProps",[Oo]:"toHandlers",[Fr]:"camelize",[im]:"capitalize",[Br]:"toHandlerKey",[wn]:"setBlockTracking",[nm]:"pushScopeId",[rm]:"popScopeId",[Po]:"withCtx",[om]:"unref",[lm]:"isRef",[Ro]:"withMemo",[pu]:"isMemoSame"};function am(e){Object.getOwnPropertySymbols(e).forEach(t=>{Ls[t]=e[t]})}const tt={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function cm(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:tt}}function vi(e,t,s,i,n,r,o,l=!1,a=!1,c=!1,u=tt){return e&&(l?(e.helper(as),e.helper(Bs(e.inSSR,c))):e.helper(Fs(e.inSSR,c)),o&&e.helper(No)),{type:13,tag:t,props:s,children:i,patchFlag:n,dynamicProps:r,directives:o,isBlock:l,disableTracking:a,isComponent:c,loc:u}}function ns(e,t=tt){return{type:17,loc:t,elements:e}}function ot(e,t=tt){return{type:15,loc:t,properties:e}}function Te(e,t){return{type:16,loc:tt,key:X(e)?z(e,!0):e,value:t}}function z(e,t=!1,s=tt,i=0){return{type:4,loc:s,content:e,isStatic:t,constType:t?3:i}}function ft(e,t=tt){return{type:8,loc:t,children:e}}function Ne(e,t=[],s=tt){return{type:14,loc:s,callee:e,arguments:t}}function Ds(e,t=void 0,s=!1,i=!1,n=tt){return{type:18,params:e,returns:t,newline:s,isSlot:i,loc:n}}function Vr(e,t,s,i=!0){return{type:19,test:e,consequent:t,alternate:s,newline:i,loc:tt}}function um(e,t,s=!1,i=!1){return{type:20,index:e,value:t,needPauseTracking:s,inVOnce:i,needArraySpread:!1,loc:tt}}function fm(e){return{type:21,body:e,loc:tt}}function Fs(e,t){return e||t?vo:So}function Bs(e,t){return e||t?cu:uu}function Mo(e,{helper:t,removeHelper:s,inSSR:i}){e.isBlock||(e.isBlock=!0,s(Fs(i,e.isComponent)),t(as),t(Bs(i,e.isComponent)))}const Ol=new Uint8Array([123,123]),Pl=new Uint8Array([125,125]);function Rl(e){return e>=97&&e<=122||e>=65&&e<=90}function Xe(e){return e===32||e===10||e===9||e===12||e===13}function $t(e){return e===47||e===62||Xe(e)}function An(e){const t=new Uint8Array(e.length);for(let s=0;s100){let o=-1,l=n;for(;o+1>>1;this.newlines[a]=0;o--)if(t>this.newlines[o]){r=o;break}return r>=0&&(s=r+2,i=t-this.newlines[r]),{column:i,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?$t(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||Xe(t)){const s=this.index-this.currentSequence.length;if(this.sectionStart=t||(this.state===28?this.currentSequence===Me.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 Ml(e,{compatConfig:t}){const s=t&&t[e];return e==="MODE"?s||3:s}function rs(e,t){const s=Ml("MODE",t),i=Ml(e,t);return s===3?i===!0:i!==!1}function Si(e,t,s,...i){return rs(e,t)}function Lo(e){throw e}function mu(e){}function me(e,t,s,i){const n=`https://vuejs.org/error-reference/#compiler-${e}`,r=new SyntaxError(String(n));return r.code=e,r.loc=t,r}const We=e=>e.type===4&&e.isStatic;function gu(e){switch(e){case"Teleport":case"teleport":return oi;case"Suspense":case"suspense":return _o;case"KeepAlive":case"keep-alive":return Cn;case"BaseTransition":case"base-transition":return au}}const hm=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Do=e=>!hm.test(e),bu=/[A-Za-z_$\xA0-\uFFFF]/,pm=/[\.\?\w$\xA0-\uFFFF]/,mm=/\s+[.[]\s*|\s*[.[]\s+/g,yu=e=>e.type===4?e.content:e.loc.source,gm=e=>{const t=yu(e).trim().replace(mm,l=>l.trim());let s=0,i=[],n=0,r=0,o=null;for(let l=0;l|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,ym=e=>bm.test(yu(e)),_m=ym;function nt(e,t,s=!1){for(let i=0;it.type===7&&t.name==="bind"&&(!t.arg||t.arg.type!==4||!t.arg.isStatic))}function gr(e){return e.type===5||e.type===2}function Ll(e){return e.type===7&&e.name==="pre"}function Sm(e){return e.type===7&&e.name==="slot"}function Nn(e){return e.type===1&&e.tagType===3}function kn(e){return e.type===1&&e.tagType===2}const Tm=new Set([_i,Mi]);function vu(e,t=[]){if(e&&!X(e)&&e.type===14){const s=e.callee;if(!X(s)&&Tm.has(s))return vu(e.arguments[0],t.concat(e))}return[e,t]}function xn(e,t,s){let i,n=e.type===13?e.props:e.arguments[2],r=[],o;if(n&&!X(n)&&n.type===14){const l=vu(n);n=l[0],r=l[1],o=r[r.length-1]}if(n==null||X(n))i=ot([t]);else if(n.type===14){const l=n.arguments[0];!X(l)&&l.type===15?Dl(t,l)||l.properties.unshift(t):n.callee===Oo?i=Ne(s.helper(En),[ot([t]),n]):n.arguments.unshift(ot([t])),!i&&(i=n)}else n.type===15?(Dl(t,n)||n.properties.unshift(t),i=n):(i=Ne(s.helper(En),[ot([t]),n]),o&&o.callee===Mi&&(o=r[r.length-2]));e.type===13?o?o.arguments[0]=i:e.props=i:o?o.arguments[0]=i:e.arguments[2]=i}function Dl(e,t){let s=!1;if(e.key.type===4){const i=e.key.content;s=t.properties.some(n=>n.key.type===4&&n.key.content===i)}return s}function Ti(e,t){return`_${t}_${e.replace(/[^\w]/g,(s,i)=>s==="-"?"_":e.charCodeAt(i).toString())}`}function Cm(e){return e.type===14&&e.callee===Ro?e.arguments[1].returns:e}const Em=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function Su(e){for(let t=0;t0,isVoidTag:vs,isPreTag:vs,isIgnoreNewlineTag:vs,isCustomElement:vs,onError:Lo,onWarn:mu,comments:!1,prefixIdentifiers:!1};let oe=Cu,Ci=null,Mt="",Le=null,se=null,qe="",wt=-1,Xt=-1,Bo=0,Qt=!1,$r=null;const pe=[],be=new dm(pe,{onerr:Et,ontext(e,t){Ki(Ie(e,t),e,t)},ontextentity(e,t,s){Ki(e,t,s)},oninterpolation(e,t){if(Qt)return Ki(Ie(e,t),e,t);let s=e+be.delimiterOpen.length,i=t-be.delimiterClose.length;for(;Xe(Mt.charCodeAt(s));)s++;for(;Xe(Mt.charCodeAt(i-1));)i--;let n=Ie(s,i);n.includes("&")&&(n=oe.decodeEntities(n,!1)),Hr({type:5,content:zi(n,!1,ye(s,i)),loc:ye(e,t)})},onopentagname(e,t){const s=Ie(e,t);Le={type:1,tag:s,ns:oe.getNamespace(s,pe[0],oe.ns),tagType:0,props:[],children:[],loc:ye(e-1,t),codegenNode:void 0}},onopentagend(e){Bl(e)},onclosetag(e,t){const s=Ie(e,t);if(!oe.isVoidTag(s)){let i=!1;for(let n=0;n0&&Et(24,pe[0].loc.start.offset);for(let o=0;o<=n;o++){const l=pe.shift();Zi(l,t,o(i.type===7?i.rawName:i.name)===s)&&Et(2,t)},onattribend(e,t){if(Le&&se){if(es(se.loc,t),e!==0)if(qe.includes("&")&&(qe=oe.decodeEntities(qe,!0)),se.type===6)se.name==="class"&&(qe=Au(qe).trim()),e===1&&!qe&&Et(13,t),se.value={type:2,content:qe,loc:e===1?ye(wt,Xt):ye(wt-1,Xt+1)},be.inSFCRoot&&Le.tag==="template"&&se.name==="lang"&&qe&&qe!=="html"&&be.enterRCDATA(An("n.content==="sync"))>-1&&Si("COMPILER_V_BIND_SYNC",oe,se.loc,se.arg.loc.source)&&(se.name="model",se.modifiers.splice(i,1))}(se.type!==7||se.name!=="pre")&&Le.props.push(se)}qe="",wt=Xt=-1},oncomment(e,t){oe.comments&&Hr({type:3,content:Ie(e,t),loc:ye(e-4,t+3)})},onend(){const e=Mt.length;for(let t=0;t{const y=t.start.offset+h,_=y+f.length;return zi(f,!1,ye(y,_),0,m?1:0)},l={source:o(r.trim(),s.indexOf(r,n.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let a=n.trim().replace(wm,"").trim();const c=n.indexOf(a),u=a.match(Fl);if(u){a=a.replace(Fl,"").trim();const f=u[1].trim();let h;if(f&&(h=s.indexOf(f,c+a.length),l.key=o(f,h,!0)),u[2]){const m=u[2].trim();m&&(l.index=o(m,s.indexOf(m,l.key?h+f.length:c+a.length),!0))}}return a&&(l.value=o(a,c,!0)),l}function Ie(e,t){return Mt.slice(e,t)}function Bl(e){be.inSFCRoot&&(Le.innerLoc=ye(e+1,e+1)),Hr(Le);const{tag:t,ns:s}=Le;s===0&&oe.isPreTag(t)&&Bo++,oe.isVoidTag(t)?Zi(Le,e):(pe.unshift(Le),(s===1||s===2)&&(be.inXML=!0)),Le=null}function Ki(e,t,s){{const r=pe[0]&&pe[0].tag;r!=="script"&&r!=="style"&&e.includes("&")&&(e=oe.decodeEntities(e,!1))}const i=pe[0]||Ci,n=i.children[i.children.length-1];n&&n.type===2?(n.content+=e,es(n.loc,s)):i.children.push({type:2,content:e,loc:ye(t,s)})}function Zi(e,t,s=!1){s?es(e.loc,Eu(t,60)):es(e.loc,Nm(t,62)+1),be.inSFCRoot&&(e.children.length?e.innerLoc.end=ee({},e.children[e.children.length-1].loc.end):e.innerLoc.end=ee({},e.innerLoc.start),e.innerLoc.source=Ie(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:i,ns:n,children:r}=e;if(Qt||(i==="slot"?e.tagType=2:Vl(e)?e.tagType=3:xm(e)&&(e.tagType=1)),be.inRCDATA||(e.children=wu(r)),n===0&&oe.isIgnoreNewlineTag(i)){const o=r[0];o&&o.type===2&&(o.content=o.content.replace(/^\r?\n/,""))}n===0&&oe.isPreTag(i)&&Bo--,$r===e&&(Qt=be.inVPre=!1,$r=null),be.inXML&&(pe[0]?pe[0].ns:oe.ns)===0&&(be.inXML=!1);{const o=e.props;if(!be.inSFCRoot&&rs("COMPILER_NATIVE_TEMPLATE",oe)&&e.tag==="template"&&!Vl(e)){const a=pe[0]||Ci,c=a.children.indexOf(e);a.children.splice(c,1,...e.children)}const l=o.find(a=>a.type===6&&a.name==="inline-template");l&&Si("COMPILER_INLINE_TEMPLATE",oe,l.loc)&&e.children.length&&(l.value={type:2,content:Ie(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:l.loc})}}function Nm(e,t){let s=e;for(;Mt.charCodeAt(s)!==t&&s=0;)s--;return s}const km=new Set(["if","else","else-if","for","slot"]);function Vl({tag:e,props:t}){if(e==="template"){for(let s=0;s64&&e<91}const Om=/\r\n/g;function wu(e){const t=oe.whitespace!=="preserve";let s=!1;for(let i=0;is.type!==3);return t.length===1&&t[0].type===1&&!kn(t[0])?t[0]:null}function en(e,t,s,i=!1,n=!1){const{children:r}=e,o=[];for(let u=0;u0){if(h>=2){f.codegenNode.patchFlag=-1,o.push(f);continue}}else{const m=f.codegenNode;if(m.type===13){const y=m.patchFlag;if((y===void 0||y===512||y===1)&&xu(f,s)>=2){const _=Iu(f);_&&(m.props=s.hoist(_))}m.dynamicProps&&(m.dynamicProps=s.hoist(m.dynamicProps))}}}else if(f.type===12&&(i?0:Ze(f,s))>=2){f.codegenNode.type===14&&f.codegenNode.arguments.length>0&&f.codegenNode.arguments.push("-1"),o.push(f);continue}if(f.type===1){const h=f.tagType===1;h&&s.scopes.vSlot++,en(f,e,s,!1,n),h&&s.scopes.vSlot--}else if(f.type===11)en(f,e,s,f.children.length===1,!0);else if(f.type===9)for(let h=0;hm.key===f||m.key.content===f);return h&&h.value}}o.length&&s.transformHoist&&s.transformHoist(r,s,e)}function Ze(e,t){const{constantCache:s}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;const i=s.get(e);if(i!==void 0)return i;const n=e.codegenNode;if(n.type!==13||n.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject"&&e.tag!=="math")return 0;if(n.patchFlag===void 0){let o=3;const l=xu(e,t);if(l===0)return s.set(e,0),0;l1)for(let a=0;aI&&(A.childIndex--,A.onNodeRemoved()),A.parent.children.splice(I,1)},onNodeRemoved:Re,addIdentifiers(S){},removeIdentifiers(S){},hoist(S){X(S)&&(S=z(S)),A.hoists.push(S);const w=z(`_hoisted_${A.hoists.length}`,!1,S.loc,2);return w.hoisted=S,w},cache(S,w=!1,I=!1){const C=um(A.cached.length,S,w,I);return A.cached.push(C),C}};return A.filters=new Set,A}function $m(e,t){const s=Vm(e,t);er(e,s),t.hoistStatic&&Fm(e,s),t.ssr||Hm(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 Hm(e,t){const{helper:s}=t,{children:i}=e;if(i.length===1){const n=Nu(e);if(n&&n.codegenNode){const r=n.codegenNode;r.type===13&&Mo(r,t),e.codegenNode=r}else e.codegenNode=i[0]}else if(i.length>1){let n=64;e.codegenNode=vi(t,s(yi),void 0,e.children,n,void 0,void 0,!0,void 0,!1)}}function Um(e,t){let s=0;const i=()=>{s--};for(;si===e:i=>e.test(i);return(i,n)=>{if(i.type===1){const{props:r}=i;if(i.tagType===3&&r.some(Sm))return;const o=[];for(let l=0;l`${Ls[e]}: _${Ls[e]}`;function qm(e,{mode:t="function",prefixIdentifiers:s=t==="module",sourceMap:i=!1,filename:n="template.vue.html",scopeId:r=null,optimizeImports:o=!1,runtimeGlobalName:l="Vue",runtimeModuleName:a="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:u=!1,isTS:f=!1,inSSR:h=!1}){const m={mode:t,prefixIdentifiers:s,sourceMap:i,filename:n,scopeId:r,optimizeImports:o,runtimeGlobalName:l,runtimeModuleName:a,ssrRuntimeModuleName:c,ssr:u,isTS:f,inSSR:h,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(_){return`_${Ls[_]}`},push(_,O=-2,P){m.code+=_},indent(){y(++m.indentLevel)},deindent(_=!1){_?--m.indentLevel:y(--m.indentLevel)},newline(){y(m.indentLevel)}};function y(_){m.push(` -`+" ".repeat(_),0)}return m}function jm(e,t={}){const s=qm(e,t);t.onContextCreated&&t.onContextCreated(s);const{mode:i,push:n,prefixIdentifiers:r,indent:o,deindent:l,newline:a,scopeId:c,ssr:u}=s,f=Array.from(e.helpers),h=f.length>0,m=!r&&i!=="module";Qm(e,s);const _=u?"ssrRender":"render",P=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(n(`function ${_}(${P}) {`),o(),m&&(n("with (_ctx) {"),o(),h&&(n(`const { ${f.map(Pu).join(", ")} } = _Vue -`,-1),a())),e.components.length&&(br(e.components,"component",s),(e.directives.length||e.temps>0)&&a()),e.directives.length&&(br(e.directives,"directive",s),e.temps>0&&a()),e.filters&&e.filters.length&&(a(),br(e.filters,"filter",s),a()),e.temps>0){n("let ");for(let T=0;T0?", ":""}_temp${T}`)}return(e.components.length||e.directives.length||e.temps)&&(n(` -`,0),a()),u||n("return "),e.codegenNode?Be(e.codegenNode,s):n("null"),m&&(l(),n("}")),l(),n("}"),{ast:e,code:s.code,preamble:"",map:s.map?s.map.toJSON():void 0}}function Qm(e,t){const{ssr:s,prefixIdentifiers:i,push:n,newline:r,runtimeModuleName:o,runtimeGlobalName:l,ssrRuntimeModuleName:a}=t,c=l,u=Array.from(e.helpers);if(u.length>0&&(n(`const _Vue = ${c} -`,-1),e.hoists.length)){const f=[vo,So,Ri,To,fu].filter(h=>u.includes(h)).map(Pu).join(", ");n(`const { ${f} } = _Vue -`,-1)}Km(e.hoists,t),r(),n("return ")}function br(e,t,{helper:s,push:i,newline:n,isTS:r}){const o=s(t==="filter"?Ao:t==="component"?Co:wo);for(let l=0;l3||!1;t.push("["),s&&t.indent(),Li(e,t,s),s&&t.deindent(),t.push("]")}function Li(e,t,s=!1,i=!0){const{push:n,newline:r}=t;for(let o=0;os||"null")}function zm(e,t){const{push:s,helper:i,pure:n}=t,r=X(e.callee)?e.callee:i(e.callee);n&&s(tr),s(r+"(",-2,e),Li(e.arguments,t),s(")")}function eg(e,t){const{push:s,indent:i,deindent:n,newline:r}=t,{properties:o}=e;if(!o.length){s("{}",-2,e);return}const l=o.length>1||!1;s(l?"{":"{ "),l&&i();for(let a=0;a "),(a||l)&&(s("{"),i()),o?(a&&s("return "),$(o)?Vo(o,t):Be(o,t)):l&&Be(l,t),(a||l)&&(n(),s("}")),c&&(e.isNonScopedSlot&&s(", undefined, true"),s(")"))}function ig(e,t){const{test:s,consequent:i,alternate:n,newline:r}=e,{push:o,indent:l,deindent:a,newline:c}=t;if(s.type===4){const f=!Do(s.content);f&&o("("),Ru(s,t),f&&o(")")}else o("("),Be(s,t),o(")");r&&l(),t.indentLevel++,r||o(" "),o("? "),Be(i,t),t.indentLevel--,r&&c(),r||o(" "),o(": ");const u=n.type===19;u||t.indentLevel++,Be(n,t),u||t.indentLevel--,r&&a(!0)}function ng(e,t){const{push:s,helper:i,indent:n,deindent:r,newline:o}=t,{needPauseTracking:l,needArraySpread:a}=e;a&&s("[...("),s(`_cache[${e.index}] || (`),l&&(n(),s(`${i(wn)}(-1`),e.inVOnce&&s(", true"),s("),"),o(),s("(")),s(`_cache[${e.index}] = `),Be(e.value,t),l&&(s(`).cacheIndex = ${e.index},`),o(),s(`${i(wn)}(1),`),o(),s(`_cache[${e.index}]`),r()),s(")"),a&&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 rg=Ou(/^(?:if|else|else-if)$/,(e,t,s)=>og(e,t,s,(i,n,r)=>{const o=s.parent.children;let l=o.indexOf(i),a=0;for(;l-->=0;){const c=o[l];c&&c.type===9&&(a+=c.branches.length)}return()=>{if(r)i.codegenNode=Hl(n,a,s);else{const c=lg(i.codegenNode);c.alternate=Hl(n,a+i.branches.length-1,s)}}}));function og(e,t,s,i){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){const n=t.exp?t.exp.loc:e.loc;s.onError(me(28,t.loc)),t.exp=z("true",!1,n)}if(t.name==="if"){const n=$l(e,t),r={type:9,loc:Rm(e.loc),branches:[n]};if(s.replaceNode(r),i)return i(r,n,!0)}else{const n=s.parent.children;let r=n.indexOf(e);for(;r-->=-1;){const o=n[r];if(o&&Tu(o)){s.removeNode(o);continue}if(o&&o.type===9){(t.name==="else-if"||t.name==="else")&&o.branches[o.branches.length-1].condition===void 0&&s.onError(me(30,e.loc)),s.removeNode();const l=$l(e,t);o.branches.push(l);const a=i&&i(o,l,!1);er(l,s),a&&a(),s.currentNode=null}else s.onError(me(30,e.loc));break}}}function $l(e,t){const s=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:s&&!nt(e,"for")?e.children:[e],userKey:zn(e,"key"),isTemplateIf:s}}function Hl(e,t,s){return e.condition?Vr(e.condition,Ul(e,t,s),Ne(s.helper(Ri),['""',"true"])):Ul(e,t,s)}function Ul(e,t,s){const{helper:i}=s,n=Te("key",z(`${t}`,!1,tt,2)),{children:r}=e,o=r[0];if(r.length!==1||o.type!==1)if(r.length===1&&o.type===11){const a=o.codegenNode;return xn(a,n,s),a}else return vi(s,i(yi),ot([n]),r,64,void 0,void 0,!0,!1,!1,e.loc);else{const a=o.codegenNode,c=Cm(a);return c.type===13&&Mo(c,s),xn(c,n,s),a}}function lg(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 ag=Ou("for",(e,t,s)=>{const{helper:i,removeHelper:n}=s;return cg(e,t,s,r=>{const o=Ne(i(ko),[r.source]),l=Nn(e),a=nt(e,"memo"),c=zn(e,"key",!1,!0);c&&c.type;let u=c&&(c.type===6?c.value?z(c.value.content,!0):void 0:c.exp);const f=u?Te("key",u):null,h=r.source.type===4&&r.source.constType>0,m=h?64:c?128:256;return r.codegenNode=vi(s,i(yi),void 0,o,m,void 0,void 0,!0,!h,!1,e.loc),()=>{let y;const{children:_}=r,O=_.length!==1||_[0].type!==1,P=kn(e)?e:l&&e.children.length===1&&kn(e.children[0])?e.children[0]:null;if(P?(y=P.codegenNode,l&&f&&xn(y,f,s)):O?y=vi(s,i(yi),f?ot([f]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(y=_[0].codegenNode,l&&f&&xn(y,f,s),y.isBlock!==!h&&(y.isBlock?(n(as),n(Bs(s.inSSR,y.isComponent))):n(Fs(s.inSSR,y.isComponent))),y.isBlock=!h,y.isBlock?(i(as),i(Bs(s.inSSR,y.isComponent))):i(Fs(s.inSSR,y.isComponent))),a){const T=Ds(Ur(r.parseResult,[z("_cached")]));T.body=fm([ft(["const _memo = (",a.exp,")"]),ft(["if (_cached && _cached.el",...u?[" && _cached.key === ",u]:[],` && ${s.helperString(pu)}(_cached, _memo)) return _cached`]),ft(["const _item = ",y]),z("_item.memo = _memo"),z("return _item")]),o.arguments.push(T,z("_cache"),z(String(s.cached.length))),s.cached.push(null)}else o.arguments.push(Ds(Ur(r.parseResult),y,!0))}})});function cg(e,t,s,i){if(!t.exp){s.onError(me(31,t.loc));return}const n=t.forParseResult;if(!n){s.onError(me(32,t.loc));return}Lu(n);const{addIdentifiers:r,removeIdentifiers:o,scopes:l}=s,{source:a,value:c,key:u,index:f}=n,h={type:11,loc:t.loc,source:a,valueAlias:c,keyAlias:u,objectIndexAlias:f,parseResult:n,children:Nn(e)?e.children:[e]};s.replaceNode(h),l.vFor++;const m=i&&i(h);return()=>{l.vFor--,m&&m()}}function Lu(e,t){e.finalized||(e.finalized=!0)}function Ur({value:e,key:t,index:s},i=[]){return ug([e,t,s,...i])}function ug(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((s,i)=>s||z("_".repeat(i+1),!1))}const ql=z("undefined",!1),fg=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const s=nt(e,"slot");if(s)return s.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},dg=(e,t,s,i)=>Ds(e,s,!1,!0,s.length?s[0].loc:i);function hg(e,t,s=dg){t.helper(Po);const{children:i,loc:n}=e,r=[],o=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const a=nt(e,"slot",!0);if(a){const{arg:O,exp:P}=a;O&&!We(O)&&(l=!0),r.push(Te(O||z("default",!0),s(P,void 0,i,n)))}let c=!1,u=!1;const f=[],h=new Set;let m=0;for(let O=0;O{const p=s(P,void 0,T,n);return t.compatConfig&&(p.isNonScopedSlot=!0),Te("default",p)};c?f.length&&!f.every(Fo)&&(u?t.onError(me(39,f[0].loc)):r.push(O(void 0,f))):r.push(O(void 0,i))}const y=l?2:tn(e.children)?3:1;let _=ot(r.concat(Te("_",z(y+"",!1))),n);return o.length&&(_=Ne(t.helper(hu),[_,ns(o)])),{slots:_,hasDynamicSlots:l}}function Wi(e,t,s){const i=[Te("name",e),Te("fn",t)];return s!=null&&i.push(Te("key",z(String(s),!0))),ot(i)}function tn(e){for(let t=0;tfunction(){if(e=t.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:i,props:n}=e,r=e.tagType===1;let o=r?mg(e,t):`"${i}"`;const l=le(o)&&o.callee===Eo;let a,c,u=0,f,h,m,y=l||o===oi||o===_o||!r&&(i==="svg"||i==="foreignObject"||i==="math");if(n.length>0){const _=Fu(e,t,void 0,r,l);a=_.props,u=_.patchFlag,h=_.dynamicPropNames;const O=_.directives;m=O&&O.length?ns(O.map(P=>bg(P,t))):void 0,_.shouldUseBlock&&(y=!0)}if(e.children.length>0)if(o===Cn&&(y=!0,u|=1024),r&&o!==oi&&o!==Cn){const{slots:O,hasDynamicSlots:P}=hg(e,t);c=O,P&&(u|=1024)}else if(e.children.length===1&&o!==oi){const O=e.children[0],P=O.type,T=P===5||P===8;T&&Ze(O,t)===0&&(u|=1),T||P===2?c=O:c=e.children}else c=e.children;h&&h.length&&(f=yg(h)),e.codegenNode=vi(t,o,a,c,u===0?void 0:u,f,m,!!y,!1,r,e.loc)};function mg(e,t,s=!1){let{tag:i}=e;const n=qr(i),r=zn(e,"is",!1,!0);if(r)if(n||rs("COMPILER_IS_ON_ELEMENT",t)){let l;if(r.type===6?l=r.value&&z(r.value.content,!0):(l=r.exp,l||(l=z("is",!1,r.arg.loc))),l)return Ne(t.helper(Eo),[l])}else r.type===6&&r.value.content.startsWith("vue:")&&(i=r.value.content.slice(4));const o=gu(i)||t.isBuiltInComponent(i);return o?(s||t.helper(o),o):(t.helper(Co),t.components.add(i),Ti(i,"component"))}function Fu(e,t,s=e.props,i,n,r=!1){const{tag:o,loc:l,children:a}=e;let c=[];const u=[],f=[],h=a.length>0;let m=!1,y=0,_=!1,O=!1,P=!1,T=!1,p=!1,b=!1;const v=[],M=w=>{c.length&&(u.push(ot(jl(c),l)),c=[]),w&&u.push(w)},R=()=>{t.scopes.vFor>0&&c.push(Te(z("ref_for",!0),z("true")))},A=({key:w,value:I})=>{if(We(w)){const C=w.content,F=cs(C);if(F&&(!i||n)&&C.toLowerCase()!=="onclick"&&C!=="onUpdate:modelValue"&&!Ot(C)&&(T=!0),F&&Ot(C)&&(b=!0),F&&I.type===14&&(I=I.arguments[0]),I.type===20||(I.type===4||I.type===8)&&Ze(I,t)>0)return;C==="ref"?_=!0:C==="class"?O=!0:C==="style"?P=!0:C!=="key"&&!v.includes(C)&&v.push(C),i&&(C==="class"||C==="style")&&!v.includes(C)&&v.push(C)}else p=!0};for(let w=0;wre.content==="prop")&&(y|=32);const Ee=t.directiveTransforms[C];if(Ee){const{props:re,needRuntime:ce}=Ee(I,e,t);!r&&re.forEach(A),G&&F&&!We(F)?M(ot(re,l)):c.push(...re),ce&&(f.push(I),Ve(ce)&&Du.set(I,ce))}else sf(C)||(f.push(I),h&&(m=!0))}}let S;if(u.length?(M(),u.length>1?S=Ne(t.helper(En),u,l):S=u[0]):c.length&&(S=ot(jl(c),l)),p?y|=16:(O&&!i&&(y|=2),P&&!i&&(y|=4),v.length&&(y|=8),T&&(y|=32)),!m&&(y===0||y===32)&&(_||b||f.length>0)&&(y|=512),!t.inSSR&&S)switch(S.type){case 15:let w=-1,I=-1,C=!1;for(let W=0;WTe(o,r)),n))}return ns(s,e.loc)}function yg(e){let t="[";for(let s=0,i=e.length;s{if(kn(e)){const{children:s,loc:i}=e,{slotName:n,slotProps:r}=vg(e,t),o=[t.prefixIdentifiers?"_ctx.$slots":"$slots",n,"{}","undefined","true"];let l=2;r&&(o[2]=r,l=3),s.length&&(o[3]=Ds([],s,!1,!1,i),l=4),t.scopeId&&!t.slotted&&(l=5),o.splice(l),e.codegenNode=Ne(t.helper(du),o,i)}};function vg(e,t){let s='"default"',i;const n=[];for(let r=0;r0){const{props:r,directives:o}=Fu(e,t,n,!1,!1);i=r,o.length&&t.onError(me(36,o[0].loc))}return{slotName:s,slotProps:i}}const Bu=(e,t,s,i)=>{const{loc:n,modifiers:r,arg:o}=e;!e.exp&&!r.length&&s.onError(me(35,n));let l;if(o.type===4)if(o.isStatic){let f=o.content;f.startsWith("vue:")&&(f=`vnode-${f.slice(4)}`);const h=t.tagType!==0||f.startsWith("vnode")||!/[A-Z]/.test(f)?Es(fe(f)):`on:${f}`;l=z(h,!0,o.loc)}else l=ft([`${s.helperString(Br)}(`,o,")"]);else l=o,l.children.unshift(`${s.helperString(Br)}(`),l.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let c=s.cacheHandlers&&!a&&!s.inVOnce;if(a){const f=_u(a),h=!(f||_m(a)),m=a.content.includes(";");(h||c&&f)&&(a=ft([`${h?"$event":"(...args)"} => ${m?"{":"("}`,a,m?"}":")"]))}let u={props:[Te(l,a||z("() => {}",!1,n))]};return i&&(u=i(u)),c&&(u.props[0].value=s.cache(u.props[0].value)),u.props.forEach(f=>f.key.isHandlerKey=!0),u},Sg=(e,t,s)=>{const{modifiers:i,loc:n}=e,r=e.arg;let{exp:o}=e;return o&&o.type===4&&!o.content.trim()&&(o=void 0),r.type!==4?(r.children.unshift("("),r.children.push(') || ""')):r.isStatic||(r.content=r.content?`${r.content} || ""`:'""'),i.some(l=>l.content==="camel")&&(r.type===4?r.isStatic?r.content=fe(r.content):r.content=`${s.helperString(Fr)}(${r.content})`:(r.children.unshift(`${s.helperString(Fr)}(`),r.children.push(")"))),s.inSSR||(i.some(l=>l.content==="prop")&&Ql(r,"."),i.some(l=>l.content==="attr")&&Ql(r,"^")),{props:[Te(r,o)]}},Ql=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Tg=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const s=e.children;let i,n=!1;for(let r=0;rr.type===7&&!t.directiveTransforms[r.name])&&e.tag!=="template")))for(let r=0;r{if(e.type===1&&nt(e,"once",!0))return Kl.has(e)||t.inVOnce||t.inSSR?void 0:(Kl.add(e),t.inVOnce=!0,t.helper(wn),()=>{t.inVOnce=!1;const s=t.currentNode;s.codegenNode&&(s.codegenNode=t.cache(s.codegenNode,!0,!0))})},Vu=(e,t,s)=>{const{exp:i,arg:n}=e;if(!i)return s.onError(me(41,e.loc)),Gs();const r=i.loc.source.trim(),o=i.type===4?i.content:r,l=s.bindingMetadata[r];if(l==="props"||l==="props-aliased")return s.onError(me(44,i.loc)),Gs();if(l==="literal-const"||l==="setup-const")return s.onError(me(45,i.loc)),Gs();if(!o.trim()||!_u(i))return s.onError(me(42,i.loc)),Gs();const a=n||z("modelValue",!0),c=n?We(n)?`onUpdate:${fe(n.content)}`:ft(['"onUpdate:" + ',n]):"onUpdate:modelValue";let u;const f=s.isTS?"($event: any)":"$event";u=ft([`${f} => ((`,i,") = $event)"]);const h=[Te(a,e.exp),Te(c,u)];if(e.modifiers.length&&t.tagType===1){const m=e.modifiers.map(_=>_.content).map(_=>(Do(_)?_:JSON.stringify(_))+": true").join(", "),y=n?We(n)?`${n.content}Modifiers`:ft([n,' + "Modifiers"']):"modelModifiers";h.push(Te(y,z(`{ ${m} }`,!1,e.loc,2)))}return Gs(h)};function Gs(e=[]){return{props:e}}const Eg=/[\w).+\-_$\]]/,wg=(e,t)=>{rs("COMPILER_FILTERS",t)&&(e.type===5?In(e.content,t):e.type===1&&e.props.forEach(s=>{s.type===7&&s.name!=="for"&&s.exp&&In(s.exp,t)}))};function In(e,t){if(e.type===4)Wl(e,t);else for(let s=0;s=0&&(T=s.charAt(P),T===" ");P--);(!T||!Eg.test(T))&&(o=!0)}}y===void 0?y=s.slice(0,m).trim():u!==0&&O();function O(){_.push(s.slice(u,m).trim()),u=m+1}if(_.length){for(m=0;m<_.length;m++)y=Ag(y,_[m],t);e.content=y,e.ast=void 0}}function Ag(e,t,s){s.helper(Ao);const i=t.indexOf("(");if(i<0)return s.filters.add(t),`${Ti(t,"filter")}(${e})`;{const n=t.slice(0,i),r=t.slice(i+1);return s.filters.add(n),`${Ti(n,"filter")}(${e}${r!==")"?","+r:r}`}}const Gl=new WeakSet,Ng=(e,t)=>{if(e.type===1){const s=nt(e,"memo");return!s||Gl.has(e)||t.inSSR?void 0:(Gl.add(e),()=>{const i=e.codegenNode||t.currentNode.codegenNode;i&&i.type===13&&(e.tagType!==1&&Mo(i,t),e.codegenNode=Ne(t.helper(Ro),[s.exp,Ds(void 0,i),"_cache",String(t.cached.length)]),t.cached.push(null))})}},kg=(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 i=s.arg;if(i.type!==4||!i.isStatic)t.onError(me(53,i.loc)),s.exp=z("",!0,i.loc);else{const n=fe(i.content);(bu.test(n[0])||n[0]==="-")&&(s.exp=z(n,!1,i.loc))}}}};function xg(e){return[[kg,Cg,rg,Ng,ag,wg,_g,pg,fg,Tg],{on:Bu,bind:Sg,model:Vu}]}function Ig(e,t={}){const s=t.onError||Lo,i=t.mode==="module";t.prefixIdentifiers===!0?s(me(48)):i&&s(me(49));const n=!1;t.cacheHandlers&&s(me(50)),t.scopeId&&!i&&s(me(51));const r=ee({},t,{prefixIdentifiers:n}),o=X(e)?Dm(e,r):e,[l,a]=xg();return $m(o,ee({},r,{nodeTransforms:[...l,...t.nodeTransforms||[]],directiveTransforms:ee({},a,t.directiveTransforms||{})})),jm(o,r)}const Og=()=>({props:[]});const $u=Symbol(""),Hu=Symbol(""),Uu=Symbol(""),qu=Symbol(""),jr=Symbol(""),ju=Symbol(""),Qu=Symbol(""),Ku=Symbol(""),Wu=Symbol(""),Gu=Symbol("");am({[$u]:"vModelRadio",[Hu]:"vModelCheckbox",[Uu]:"vModelText",[qu]:"vModelSelect",[jr]:"vModelDynamic",[ju]:"withModifiers",[Qu]:"withKeys",[Ku]:"vShow",[Wu]:"Transition",[Gu]:"TransitionGroup"});let gs;function Pg(e,t=!1){return gs||(gs=document.createElement("div")),t?(gs.innerHTML=`
`,gs.children[0].getAttribute("foo")):(gs.innerHTML=e,gs.textContent)}const Rg={parseMode:"html",isVoidTag:vf,isNativeTag:e=>bf(e)||yf(e)||_f(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:Pg,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return Wu;if(e==="TransitionGroup"||e==="transition-group")return Gu},getNamespace(e,t,s){let i=t?t.ns:s;if(t&&i===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(n=>n.type===6&&n.name==="encoding"&&n.value!=null&&(n.value.content==="text/html"||n.value.content==="application/xhtml+xml"))&&(i=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(i=0);else t&&i===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(i=0);if(i===0){if(e==="svg")return 1;if(e==="math")return 2}return i}},Mg=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:z("style",!0,t.loc),exp:Lg(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Lg=(e,t)=>{const s=ea(e);return z(JSON.stringify(s),!1,t,3)};function Wt(e,t){return me(e,t)}const Dg=(e,t,s)=>{const{exp:i,loc:n}=e;return i||s.onError(Wt(54,n)),t.children.length&&(s.onError(Wt(55,n)),t.children.length=0),{props:[Te(z("innerHTML",!0,n),i||z("",!0))]}},Fg=(e,t,s)=>{const{exp:i,loc:n}=e;return i||s.onError(Wt(56,n)),t.children.length&&(s.onError(Wt(57,n)),t.children.length=0),{props:[Te(z("textContent",!0),i?Ze(i,s)>0?i:Ne(s.helperString(Zn),[i],n):z("",!0))]}},Bg=(e,t,s)=>{const i=Vu(e,t,s);if(!i.props.length||t.tagType===1)return i;e.arg&&s.onError(Wt(59,e.arg.loc));const{tag:n}=t,r=s.isCustomElement(n);if(n==="input"||n==="textarea"||n==="select"||r){let o=Uu,l=!1;if(n==="input"||r){const a=zn(t,"type");if(a){if(a.type===7)o=jr;else if(a.value)switch(a.value.content){case"radio":o=$u;break;case"checkbox":o=Hu;break;case"file":l=!0,s.onError(Wt(60,e.loc));break}}else vm(t)&&(o=jr)}else n==="select"&&(o=qu);l||(i.needRuntime=s.helper(o))}else s.onError(Wt(58,e.loc));return i.props=i.props.filter(o=>!(o.key.type===4&&o.key.content==="modelValue")),i},Vg=et("passive,once,capture"),$g=et("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Hg=et("left,right"),Ju=et("onkeyup,onkeydown,onkeypress"),Ug=(e,t,s,i)=>{const n=[],r=[],o=[];for(let l=0;lWe(e)&&e.content.toLowerCase()==="onclick"?z(t,!0):e.type!==4?ft(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,qg=(e,t,s)=>Bu(e,t,s,i=>{const{modifiers:n}=e;if(!n.length)return i;let{key:r,value:o}=i.props[0];const{keyModifiers:l,nonKeyModifiers:a,eventOptionModifiers:c}=Ug(r,n,s,e.loc);if(a.includes("right")&&(r=Jl(r,"onContextmenu")),a.includes("middle")&&(r=Jl(r,"onMouseup")),a.length&&(o=Ne(s.helper(ju),[o,JSON.stringify(a)])),l.length&&(!We(r)||Ju(r.content.toLowerCase()))&&(o=Ne(s.helper(Qu),[o,JSON.stringify(l)])),c.length){const u=c.map(fs).join("");r=We(r)?z(`${r.content}${u}`,!0):ft(["(",r,`) + "${u}"`])}return{props:[Te(r,o)]}}),jg=(e,t,s)=>{const{exp:i,loc:n}=e;return i||s.onError(Wt(62,n)),{props:[],needRuntime:s.helper(Ku)}},Qg=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&t.removeNode()},Kg=[Mg],Wg={cloak:Og,html:Dg,text:Fg,model:Bg,on:qg,show:jg};function Gg(e,t={}){return Ig(e,ee({},Rg,t,{nodeTransforms:[Qg,...Kg,...t.nodeTransforms||[]],directiveTransforms:ee({},Wg,t.directiveTransforms||{}),transformHoist:null}))}const Yl=Object.create(null);function Jg(e,t){if(!X(e))if(e.nodeType)e=e.innerHTML;else return Re;const s=of(e,t),i=Yl[s];if(i)return i;if(e[0]==="#"){const l=document.querySelector(e);e=l?l.innerHTML:""}const n=ee({hoistStatic:!0,onError:void 0,onWarn:Re},t);!n.isCustomElement&&typeof customElements<"u"&&(n.isCustomElement=l=>!!customElements.get(l));const{code:r}=Gg(e,n),o=new Function("Vue",r)(sm);return o._rc=!0,Yl[s]=o}Ic(Jg);const rt=[["super_admin","一级超管"],["active_operator","二级已上号队首"],["pending_operator","三级待上号队首"],["viewer","四级普通观众"]],Yg={queue:rt.map(([e])=>e),signin:rt.map(([e])=>e),login:["super_admin","pending_operator"],confirm_yes:["super_admin","pending_operator"],confirm_no:["super_admin","pending_operator"],run:["super_admin","active_operator"],leave:["super_admin","active_operator","viewer"],reset:["super_admin"],points:rt.map(([e])=>e),queue_list:rt.map(([e])=>e),help:rt.map(([e])=>e)},Yu={queue:"排队",signin:"签到",login:"上号",confirm_yes:"确认是",confirm_no:"确认不是",run:"执行配置组",leave:"退出",reset:"重置",points:"积分",queue_list:"队列",help:"帮助"},Xg={run:!0},Gi=e=>JSON.parse(JSON.stringify(e??{})),bs=e=>String(e||"").replaceAll(",",",").split(",").map(t=>t.trim()).filter(Boolean),Xl=e=>{const t=e instanceof Date?e:new Date(e),s=i=>String(i).padStart(2,"0");return`${t.getFullYear()}-${s(t.getMonth()+1)}-${s(t.getDate())}T${s(t.getHours())}:${s(t.getMinutes())}`},yr=(e,t)=>{const s=Array.isArray(e)?e.filter(i=>rt.some(([n])=>n===i)):[];return s.length?s:[...t]},Z=async(e,t={})=>{const s=await fetch(e,{credentials:"same-origin",headers:t.body&&!(t.body instanceof FormData)?{"Content-Type":"application/json",...t.headers||{}}:t.headers,...t}),i=await s.text();let n={};if(i)try{n=JSON.parse(i)}catch{n={raw:i}}if(!s.ok||n.success===!1){const r=new Error(n.error||n.msg||`请求失败: ${s.status}`);throw r.status=s.status,r.code=n.code||"",r.payload=n,r}return n},_r=e=>{e.bilibili||={},e.bilibili.cookie_auto_refresh_enabled??=!0,e.bilibili.cookie_check_interval_hours??=6,e.bettergi||={},e.global||={},e.queue||={},e.frontend||={},e.frontend.theme||="classic",e.music_monitor||={},e.music_monitor.request_player||={},e.broadcast||={},e.broadcast.tts||={},e.broadcast.tts["faster-qwen3-tts"]||={},e.broadcast.tts_categories||={};for(const s of["signin","queue","song_request","login","execution","points","help","reset","system"])e.broadcast.tts_categories[s]??=!0;e.system||={};const t={enable_startup_shortcut:!0,startup_bat:"run.bat",live_start_time:"09:00",live_end_time:"23:00",auto_reboot_enabled:!1,auto_reboot_time:"03:00",launch_bilibili_live_enabled:!1,launch_bilibili_live_time:"19:30",bilibili_live_exe:"",launch_genshin_enabled:!1,launch_genshin_time:"19:40",genshin_exe:"",bilibili_push_enabled:!1,bilibili_push_time:"19:50",bilibili_push_window_keyword:"直播姬",bilibili_push_click_x_ratio:.741,bilibili_push_click_y_ratio:.907,bilibili_stop_push_enabled:!1,bilibili_stop_push_time:"23:00",bilibili_stop_push_click_x_ratio:.741,bilibili_stop_push_click_y_ratio:.907,bilibili_stop_push_confirm_enter:!0};for(const[s,i]of Object.entries(t))e.system[s]??=i;e.rules||=[],e.commands||={},e.music_monitor.targets||=[],e.global.admin_uids||=[],e.global.admin_uidsText=e.global.admin_uids.join(","),e.music_monitor.targetsText=e.music_monitor.targets.join(","),e.music_monitor.request_player.commands||=["点歌","dg"],e.music_monitor.request_player.handoff_lead_sec??=1.2,e.music_monitor.request_player.max_duration_sec??=600,e.music_monitor.request_player.netease_music_u??="",e.music_monitor.request_player.commandsText=e.music_monitor.request_player.commands.join(","),e.music_monitor.request_player.allowed_roles=yr(e.music_monitor.request_player.allowed_roles,rt.map(([s])=>s));for(const[s,i]of Object.entries(Yu))e.commands[s]||={enabled:!0,aliases:[i]},e.commands[s].aliases||=[i],e.commands[s].allowed_roles=yr(e.commands[s].allowed_roles,Yg[s]||rt.map(([n])=>n));for(const s of e.rules)!s||typeof s!="object"||(s.groups||=[],s.allowed_roles=yr(s.allowed_roles,rt.map(([i])=>i)));return e};Tn({data(){return{tabs:[["overview","总览"],["config","配置"],["rules","权限/规则"],["queue","队列"],["users","用户"],["redemption","兑换码"],["songs","点歌"],["media","音乐/TTS"],["system","系统定时"],["logs","日志"],["raw","JSON"]],activeTab:"overview",loading:!1,saving:!1,bootstrapped:!1,sessionChecked:!1,authenticated:!1,bootstrapPassword:"",loginPassword:"",messages:[],messageSeq:0,state:{},users:[],userQuery:"",redemptionCodes:[],redemptionRecords:[],redemptionSaving:!1,redemptionForm:{code:"",points:5,starts_at:Xl(new Date),ends_at:Xl(new Date(Date.now()+10080*60*1e3)),max_redemptions:"",enabled:!0},systemLog:[],bgiLog:[],music:{},config:null,draft:null,rawConfig:"",ttsTestText:"欢迎来到直播间,发送排队即可上号。",ttsTestResult:"",giftTestName:"测试观众",giftTestGift:"小电视飞船",giftTestNum:1,giftTestValue:0,giftTestResult:"",lastLoadedAt:"",songKeyword:"",songResults:[],songSearching:!1,streamStatus:"idle",fallbackEnabled:!1,bilibiliQr:{state:"idle",message:"",expiresIn:0,hasQrImage:!1,credentialConfigured:!1,account:null,imageUrl:""},bilibiliQrStarting:!1,bilibiliQrPolling:!1,bilibiliQrTimer:null,neteaseQr:{state:"idle",message:"",expiresIn:0,hasQrImage:!1,credentialConfigured:!1,account:null,imageUrl:""},neteaseQrStarting:!1,neteaseQrPolling:!1,neteaseQrTimer:null}},computed:{queue(){return this.state.queue||[]},queueUsers(){const e=this.state.users||{};return this.queue.map((t,s)=>({uid:t,index:s+1,...e[String(t)]||{uname:`用户${t}`,points:0}}))},filteredUsers(){const e=this.userQuery.trim().toLowerCase();return e?this.users.filter(t=>String(t.uid).includes(e)||String(t.uname||"").toLowerCase().includes(e)):this.users},appStatus(){return this.state.config_error?["配置异常","danger"]:this.state.service_state==="FAILED"?["服务失败","danger"]:this.state.service_state==="DEGRADED"?["服务降级","danger"]:this.state.service_state==="RECONNECTING"?["重连中","idle"]:this.state.service_state==="STARTING"?["启动中","idle"]:this.state.bgi_running?["BGI运行中","ok"]:["待机","idle"]},currentOperator(){const e=this.state.current_admin;return e?(this.state.users||{})[String(e)]?.uname||e:"-"},localAdminUrl(){return this.state.access_urls?.local?.admin||`${window.location.origin}/admin`},lanAdminUrls(){return this.state.access_urls?.lan_admin||[]},songQueue(){return this.music.song_requests?.queue||this.music.requests||[]},activeSongRequest(){return this.music.song_requests?.active||null},songHistory(){return this.music.song_requests?.history||[]},bannedSongs(){return this.music.song_requests?.banned_song_ids||[]},bannedUsers(){return this.music.song_requests?.banned_users||[]},roleOptions(){return rt}},methods:{notify(e,t="success"){const s={id:++this.messageSeq,text:e,type:t};this.messages.push(s),window.setTimeout(()=>{this.messages=this.messages.filter(i=>i.id!==s.id)},t==="error"?4200:2600)},async initialize(){this.loading=!0;try{const[e,t]=await Promise.all([Z("/api/admin/bootstrap-status"),Z("/api/admin/session")]);this.bootstrapped=!!e.bootstrapped,this.authenticated=!!t.authenticated,this.authenticated&&(await this.refreshAll(),this.openStream())}catch(e){this.notify(e.message||String(e),"error")}finally{this.sessionChecked=!0,this.loading=!1}},async refreshAll(){this.loading=!0;try{await Promise.all([this.loadState(),this.loadUsers(),this.loadRedemptionCodes(),this.loadLogs(),this.loadMusic(),this.loadConfig(),this.loadBilibiliQrStatus(),this.loadNeteaseQrStatus()]),this.lastLoadedAt=new Date().toLocaleTimeString()}catch(e){this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}finally{this.loading=!1}},async loadState(){this.state=await Z("/api/admin/state")},async loadUsers(){const e=await Z(`/api/admin/users?q=${encodeURIComponent(this.userQuery||"")}`);this.users=e.users||[]},async loadRedemptionCodes(){const e=await Z("/api/admin/redemption-codes");this.redemptionCodes=e.codes||[],this.redemptionRecords=e.records||[]},async loadLogs(){const e=await Z("/api/admin/logs");this.systemLog=e.system||[],this.bgiLog=e.bgi||[]},async loadMusic(){this.music=await Z("/api/admin/music")},async loadConfig(){const e=await Z("/api/admin/config");this.config=e.config||{},this.draft=_r(Gi(this.config)),this.rawConfig=JSON.stringify(this.config,null,2)},handleAuthLoss(e){!e||![401,428].includes(e.status)||(this.authenticated=!1,this.bootstrapped=e.status!==428,this.stopBilibiliQrPolling(),this.stopNeteaseQrPolling(),this.closeStream())},async bootstrapAdmin(){if(!this.bootstrapPassword.trim()){this.notify("请输入后台密码","error");return}try{await Z("/api/admin/bootstrap",{method:"POST",body:JSON.stringify({password:this.bootstrapPassword.trim()})}),this.bootstrapPassword="",this.bootstrapped=!0,this.authenticated=!0,await this.refreshAll(),this.openStream()}catch(e){this.notify(e.message||String(e),"error")}},async loginAdmin(){if(!this.loginPassword.trim()){this.notify("请输入后台密码","error");return}try{await Z("/api/admin/login",{method:"POST",body:JSON.stringify({password:this.loginPassword.trim()})}),this.loginPassword="",this.authenticated=!0,await this.refreshAll(),this.openStream()}catch(e){this.notify(e.message||String(e),"error")}},async logoutAdmin(){try{await Z("/api/admin/logout",{method:"POST"})}catch(e){this.notify(e.message||String(e),"error")}finally{this.authenticated=!1,this.stopBilibiliQrPolling(),this.stopNeteaseQrPolling(),this.closeStream()}},updateBilibiliQr(e){const t=!!e.has_qr_image;this.bilibiliQr={state:e.state||"idle",message:e.message||"",expiresIn:Number(e.expires_in||0),hasQrImage:t,credentialConfigured:!!e.credential_configured,account:e.account||null,imageUrl:t?this.bilibiliQr.imageUrl||`/api/admin/bilibili-qr-image?t=${Date.now()}`:""}},async loadBilibiliQrStatus(){const e=await Z("/api/admin/bilibili-qr-status");this.updateBilibiliQr(e)},stopBilibiliQrPolling(){this.bilibiliQrTimer&&(window.clearInterval(this.bilibiliQrTimer),this.bilibiliQrTimer=null)},startBilibiliQrPolling(){this.stopBilibiliQrPolling(),this.bilibiliQrTimer=window.setInterval(()=>this.pollBilibiliQrLogin(),1600)},async startBilibiliQrLogin(){this.bilibiliQrStarting=!0,this.stopBilibiliQrPolling();try{const e=await Z("/api/admin/action/start_bilibili_qr_login",{method:"POST",body:"{}"});if(this.bilibiliQr.imageUrl="",this.updateBilibiliQr(e),e.state==="failed"){this.notify(e.message||"B站二维码生成失败","error");return}this.startBilibiliQrPolling()}catch(e){this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}finally{this.bilibiliQrStarting=!1}},async pollBilibiliQrLogin(){if(!this.bilibiliQrPolling){this.bilibiliQrPolling=!0;try{const e=await Z("/api/admin/action/poll_bilibili_qr_login",{method:"POST",body:"{}"}),t=this.bilibiliQr.state;if(this.updateBilibiliQr(e),e.state==="completed"){this.stopBilibiliQrPolling(),await this.loadConfig();const s=e.account?.uname||"B站账号";this.notify(`${s} 登录成功,自动续期已启用`)}else["expired","failed"].includes(e.state)&&(this.stopBilibiliQrPolling(),e.state!==t&&this.notify(e.message||"B站扫码登录失败","error"))}catch(e){this.stopBilibiliQrPolling(),this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}finally{this.bilibiliQrPolling=!1}}},updateNeteaseQr(e){const t=!!e.has_qr_image;this.neteaseQr={state:e.state||"idle",message:e.message||"",expiresIn:Number(e.expires_in||0),hasQrImage:t,credentialConfigured:!!e.credential_configured,account:e.account||null,imageUrl:t?this.neteaseQr.imageUrl||`/api/admin/netease-qr-image?t=${Date.now()}`:""}},async loadNeteaseQrStatus(){const e=await Z("/api/admin/netease-qr-status");this.updateNeteaseQr(e)},stopNeteaseQrPolling(){this.neteaseQrTimer&&(window.clearInterval(this.neteaseQrTimer),this.neteaseQrTimer=null)},startNeteaseQrPolling(){this.stopNeteaseQrPolling(),this.neteaseQrTimer=window.setInterval(()=>this.pollNeteaseQrLogin(),1600)},async startNeteaseQrLogin(){this.neteaseQrStarting=!0,this.stopNeteaseQrPolling();try{const e=await Z("/api/admin/action/start_netease_qr_login",{method:"POST",body:"{}"});if(this.neteaseQr.imageUrl="",this.updateNeteaseQr(e),e.state==="failed"){this.notify(e.message||"网易云二维码生成失败","error");return}this.startNeteaseQrPolling()}catch(e){this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}finally{this.neteaseQrStarting=!1}},async pollNeteaseQrLogin(){if(!this.neteaseQrPolling){this.neteaseQrPolling=!0;try{const e=await Z("/api/admin/action/poll_netease_qr_login",{method:"POST",body:"{}"}),t=this.neteaseQr.state;if(this.updateNeteaseQr(e),e.state==="completed"){this.stopNeteaseQrPolling(),await this.loadConfig();const s=e.account?.nickname||"网易云账号",i=Number(e.account?.vip_type||0)>0?"VIP":"普通账号";this.notify(`${s} 登录成功(${i}),MUSIC_U 已自动保存`)}else["expired","failed"].includes(e.state)&&(this.stopNeteaseQrPolling(),e.state!==t&&this.notify(e.message||"网易云扫码登录失败","error"))}catch(e){this.stopNeteaseQrPolling(),this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}finally{this.neteaseQrPolling=!1}}},openStream(){this.closeStream(),this.streamStatus="connecting";const e=new EventSource("/api/admin/stream");e.addEventListener("open",()=>{this.streamStatus="live",this.stopFallback()});for(const t of["state","users","music","logs","config"])e.addEventListener(t,s=>{const i=JSON.parse(s.data||"{}");t==="state"&&(this.state=i),t==="users"&&(this.users=i.users||[]),t==="music"&&(this.music=i),t==="logs"&&(this.systemLog=i.system||[],this.bgiLog=i.bgi||[]),t==="config"&&(this.config=i.config||{},this.draft=_r(Gi(this.config)),this.rawConfig=JSON.stringify(this.config,null,2)),this.lastLoadedAt=new Date().toLocaleTimeString()});e.onerror=async()=>{this.streamStatus="reconnecting",this.startFallback();try{(await Z("/api/admin/session")).authenticated||(this.authenticated=!1,this.closeStream())}catch{this.authenticated=!1,this.closeStream()}},this._stream=e},closeStream(){this._stream&&(this._stream.close(),this._stream=null),this.streamStatus="idle",this.stopFallback()},startFallback(){this._fallbackTimer||(this.fallbackEnabled=!0,this._fallbackTimer=window.setInterval(()=>{this.refreshAll().catch(()=>{})},3e4))},stopFallback(){this.fallbackEnabled=!1,this._fallbackTimer&&(window.clearInterval(this._fallbackTimer),this._fallbackTimer=null)},async saveDraft(e="配置已保存"){this.saving=!0;try{const t=Gi(this.draft);t.global||={},t.music_monitor||={},t.music_monitor.request_player||={},t.global.admin_uids=bs(t.global.admin_uidsText).map(s=>Number(s)).filter(s=>Number.isFinite(s)),delete t.global.admin_uidsText,t.music_monitor.targets=bs(t.music_monitor.targetsText),delete t.music_monitor.targetsText,t.music_monitor.request_player.commands=bs(t.music_monitor.request_player.commandsText),delete t.music_monitor.request_player.commandsText,await Z("/api/admin/config",{method:"POST",body:JSON.stringify({config:t})}),this.notify(e)}catch(t){this.handleAuthLoss(t),this.notify(t.message||String(t),"error")}finally{this.saving=!1}},async saveRawConfig(){try{this.draft=_r(JSON.parse(this.rawConfig))}catch(e){this.notify(`JSON 格式错误: ${e.message}`,"error");return}await this.saveDraft("JSON 配置已保存")},cmdAliasesText(e){return(this.draft?.commands?.[e]?.aliases||[]).join(",")},splitList(e){return bs(e)},setCmdAliases(e,t){this.draft.commands[e].aliases=bs(t)},cmdLabel(e){return Yu[e]||e},cmdHasArg(e){return!!Xg[e]},hasRole(e,t){return Array.isArray(e)&&e.includes(t)},toggleRole(e,t){if(!Array.isArray(e))return;const s=new Set(e);s.has(t)?s.delete(t):s.add(t),e.splice(0,e.length,...rt.map(([i])=>i).filter(i=>s.has(i)))},addRule(){this.draft.rules.push({keyword:"",match_type:"contains",groups:[],cooldown:60,admin_only:!1,reply:"",allowed_roles:rt.map(([e])=>e)})},removeRule(e){this.draft.rules.splice(e,1)},normalizeRuleGroups(e){return Array.isArray(e.groups)?e.groups.join(","):String(e.groups||"")},setRuleGroups(e,t){e.groups=bs(t)},async adminAction(e,t=null){try{await Z(`/api/admin/action/${e}`,{method:"POST",body:t?JSON.stringify(t):void 0}),this.notify("操作已执行")}catch(s){this.handleAuthLoss(s),this.notify(s.message||String(s),"error")}},async testNeteaseLogin(){try{const e=await Z("/api/admin/action/test_netease_login",{method:"POST",body:JSON.stringify({music_u:this.draft?.music_monitor?.request_player?.netease_music_u||""})}),t=Number(e.vip_type||0)>0?"VIP":"普通账号";await this.loadConfig(),await this.loadNeteaseQrStatus(),this.notify(`网易云登录有效并已保存:${e.nickname}(${t})`)}catch(e){this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}},async addPoints(e,t){try{await Z("/api/admin/users/add-points",{method:"POST",body:JSON.stringify({uid:e,points:t})})}catch(s){this.handleAuthLoss(s),this.notify(s.message||String(s),"error")}},async createRedemptionCode(){const e=this.redemptionForm;if(!String(e.code||"").trim()){this.notify("请填写兑换码","error");return}if(!Number.isInteger(Number(e.points))||Number(e.points)<=0){this.notify("兑换积分必须是正整数","error");return}this.redemptionSaving=!0;try{await Z("/api/admin/redemption-codes",{method:"POST",body:JSON.stringify({code:String(e.code).trim(),points:Number(e.points),starts_at:e.starts_at,ends_at:e.ends_at,max_redemptions:e.max_redemptions===""?null:Number(e.max_redemptions),enabled:!!e.enabled})}),e.code="",await this.loadRedemptionCodes(),this.notify("兑换码已创建")}catch(t){this.handleAuthLoss(t),this.notify(t.message||String(t),"error")}finally{this.redemptionSaving=!1}},async toggleRedemptionCode(e){try{await Z(`/api/admin/redemption-codes/${e.id}/enabled`,{method:"POST",body:JSON.stringify({enabled:!e.enabled})}),await this.loadRedemptionCodes(),this.notify(e.enabled?"兑换码已停用":"兑换码已启用")}catch(t){this.handleAuthLoss(t),this.notify(t.message||String(t),"error")}},async deleteRedemptionCode(e){if(window.confirm(`确认删除兑换码“${e.code}”?兑换记录会保留。`))try{await Z(`/api/admin/redemption-codes/${e.id}`,{method:"DELETE"}),await this.loadRedemptionCodes(),this.notify("兑换码已删除,历史记录已保留")}catch(t){this.handleAuthLoss(t),this.notify(t.message||String(t),"error")}},redemptionCodeStatus(e){if(!e.enabled)return"已停用";const t=Date.now();return t=new Date(e.ends_at).getTime()?"已过期":e.remaining_count===0?"已兑完":"生效中"},formatRedemptionTime(e){return String(e||"-").replace("T"," ").replace("+08:00","")},async saveUserFlags(e){try{await Z("/api/admin/users/set-flags",{method:"POST",body:JSON.stringify({uid:Number(e.uid),blocked_all:!!e.blocked_all,blocked_queue:!!e.blocked_queue,blocked_song_request:!!e.blocked_song_request,note:e.note||""})}),this.notify("用户状态已保存")}catch(t){this.handleAuthLoss(t),this.notify(t.message||String(t),"error")}},async deleteUser(e){try{await Z("/api/admin/users/delete",{method:"POST",body:JSON.stringify({uid:e})}),this.notify("用户已删除")}catch(t){this.handleAuthLoss(t),this.notify(t.message||String(t),"error")}},async kickUser(e){try{await Z("/api/admin/users/kick",{method:"POST",body:JSON.stringify({uid:e})}),this.notify("用户已移出队列")}catch(t){this.handleAuthLoss(t),this.notify(t.message||String(t),"error")}},async searchSongs(){const e=this.songKeyword.trim();if(!e){this.notify("请输入歌曲名或链接","error");return}this.songSearching=!0;try{const t=await Z(`/api/admin/song-search?q=${encodeURIComponent(e)}`);this.songResults=t.results||[]}catch(t){this.handleAuthLoss(t),this.notify(t.message||String(t),"error")}finally{this.songSearching=!1}},async addSong(e){try{await Z("/api/admin/song-requests/add",{method:"POST",body:JSON.stringify({song:e})}),this.notify("歌曲已加入点歌队列")}catch(t){this.handleAuthLoss(t),this.notify(t.message||String(t),"error")}},async moveSong(e,t){try{await Z("/api/admin/song-requests/move",{method:"POST",body:JSON.stringify({id:e.id,to_index:t})})}catch(s){this.handleAuthLoss(s),this.notify(s.message||String(s),"error")}},async playSongNow(e){try{await Z("/api/admin/song-requests/play-now",{method:"POST",body:JSON.stringify({id:e.id})}),this.notify("已立即切歌")}catch(t){this.handleAuthLoss(t),this.notify(t.message||String(t),"error")}},async skipCurrentSong(){try{await Z("/api/admin/song-requests/skip-current",{method:"POST",body:"{}"}),this.notify("已跳过当前歌曲")}catch(e){this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}},async removeSong(e){try{await Z("/api/admin/song-requests/remove",{method:"POST",body:JSON.stringify({id:e.id})})}catch(t){this.handleAuthLoss(t),this.notify(t.message||String(t),"error")}},async clearSongs(){try{await Z("/api/admin/song-requests/clear",{method:"POST",body:"{}"}),this.notify("点歌队列已清空")}catch(e){this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}},async toggleBanSong(e,t){try{await Z("/api/admin/song-requests/ban-song",{method:"POST",body:JSON.stringify({id:e,ban:t})})}catch(s){this.handleAuthLoss(s),this.notify(s.message||String(s),"error")}},async toggleBanUser(e,t,s){try{await Z("/api/admin/song-requests/ban-user",{method:"POST",body:JSON.stringify({uid:e,uname:t,ban:s})})}catch(i){this.handleAuthLoss(i),this.notify(i.message||String(i),"error")}},async testTts(){this.ttsTestResult="合成中...";try{const e=await Z("/api/admin/action/test_tts",{method:"POST",body:JSON.stringify({text:this.ttsTestText,play:!0})});this.ttsTestResult=`成功,耗时 ${e.duration_ms}ms,音频 ${e.audio_bytes} bytes`}catch(e){this.handleAuthLoss(e),this.ttsTestResult=e.message||String(e)}},async testGiftEffect(){this.giftTestResult="注入中...";try{const e=await Z("/api/admin/action/test_gift_effect",{method:"POST",body:JSON.stringify({uname:this.giftTestName,gift_name:this.giftTestGift,num:this.giftTestNum,value:this.giftTestValue})});this.giftTestResult=e.msg||"已注入,请到前台页面查看特效"}catch(e){this.handleAuthLoss(e),this.giftTestResult=e.message||String(e)}},async saveSystemSchedule(){if(this.draft?.system){this.saving=!0;try{await Z("/api/admin/action/save_system_schedule_config",{method:"POST",body:JSON.stringify(Gi(this.draft.system))}),this.notify("系统定时配置已保存,开机自启设置已同步")}catch(e){this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}finally{this.saving=!1}}},async testDeleteMihoyoSdkRegistry(){if(window.confirm("确认删除当前 Windows 用户的 HKCU\\Software\\miHoYoSDK 注册表键?此操作用于测试扫码失败重置前的清理行为。"))try{const e=await Z("/api/admin/action/test_delete_mihoyo_sdk_registry",{method:"POST",body:"{}"});this.notify(e.message||(e.deleted?"miHoYoSDK 注册表已删除":"注册表键不存在,无需清理"))}catch(e){this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}},async testBilibiliPush(){try{await Z("/api/admin/action/test_bilibili_push",{method:"POST",body:"{}"}),this.notify("已点击直播姬推流位置")}catch(e){this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}},async testBilibiliStopPush(){try{await Z("/api/admin/action/test_bilibili_stop_push",{method:"POST",body:"{}"}),this.notify("已点击关闭推流位置")}catch(e){this.handleAuthLoss(e),this.notify(e.message||String(e),"error")}},async uploadBackground(e){const t=e.target.files?.[0];if(!t)return;const s=new FormData;s.append("background",t);try{await Z("/api/admin/upload_background",{method:"POST",body:s}),this.notify("背景已上传")}catch(i){this.handleAuthLoss(i),this.notify(i.message||String(i),"error")}},streamLabel(){return this.streamStatus==="live"?"实时已连接":this.streamStatus==="reconnecting"?this.fallbackEnabled?"实时重连中 · 30s兜底刷新":"实时重连中":this.streamStatus==="connecting"?"实时连接中":"实时未连接"}},mounted(){this.initialize()},beforeUnmount(){this.stopBilibiliQrPolling(),this.stopNeteaseQrPolling(),this.closeStream()},template:` -
-
-

直播联动后台

-

正在检查后台状态...

-
-
- -
-
-
{{ item.text }}
-
-
-

初始化后台口令

-

首次初始化仅允许本机访问。设置完成后,局域网内后台统一使用这一个共享密码登录。

- - -
-
- -
-
-
{{ item.text }}
-
-
-

后台登录

-

后台数据通过实时推送同步,登录后可进行积分、换歌、用户和权限管理。

- - -
-
- -
-
-
{{ item.text }}
-
- - - -
-
-
-

{{ tabs.find((tab) => tab[0] === activeTab)?.[1] }}

-

配置 revision {{ state.config_revision || '-' }} · {{ lastLoadedAt || '未刷新' }} · {{ streamLabel() }}

-
-
- - - -
-
- -
-
-
排队人数{{ queue.length || 0 }}
-
总用户{{ users.length || 0 }}
-
待播点歌{{ songQueue.length || 0 }}
-
当前队首{{ currentOperator }}
-
- -
-

运行状态

-
- {{ state.service_state || '-' }} - {{ state.login_status || '-' }} - {{ state.current_group || '-' }} - {{ state.billing_uid || '-' }} - {{ music.current?.title || '-' }} - {{ activeSongRequest?.name || '-' }} -
-
- -
-

访问地址

-
- -
手机后台{{ url }}
-
-
- -
-

服务健康

- - - - - - - - - - - -
服务状态重启信息错误
{{ svc.name }}{{ svc.state }}{{ svc.restarts || 0 }}{{ svc.message || '-' }}{{ svc.error || '-' }}
-
- -
-

最近弹幕

-
-
- {{ item.uname }} - {{ item.text }} -
-
暂无弹幕
-
-
- -
-

快捷操作

-
- - - - -
-
-
- -
-
-

B站直播间

- - - - - - -
-
-

BetterGI

- - - -
-
-

队列积分

- - - - - - -
-
-

前台视觉

- - - - - - -
-
- -
-
-

点歌权限

-
- -
-
- -
-
-

内置指令权限与别名

-
-
-
-
- - -
-
- -
-
-
-
- -
-
-

自定义规则

- -
-
-
- - - - - -
- -
- -
-
-
-
- -
-
-
-

当前队列

- -
- - - - - - - - - - -
#UID昵称积分操作
{{ u.index }}队首{{ u.uid }}{{ u.uname }}{{ u.points }} - - - -
队列为空
-
-
- -
-
-
-

用户积分与封禁

- -
- - - - - - - - - - - - - -
UID昵称积分角色封禁备注操作
{{ user.uid }}{{ user.uname }}{{ user.points }}{{ roleOptions.find(([id]) => id === user.role)?.[1] || user.role }} - - - - - - - - - -
-
-
- -
-
-
-

创建兑换码

- -
-
- - - - - - -
-
- -
-
- -
-
-

兑换码列表

- 英文不区分大小写,每个用户对同一码只能兑换一次 -
- - - - - - - - - - - - - -
兑换码积分有效期(北京时间)兑换进度状态操作
{{ code.code }}+{{ code.points }} -
{{ formatRedemptionTime(code.starts_at) }}
-
至 {{ formatRedemptionTime(code.ends_at) }}
-
{{ code.redeemed_count }} / {{ code.max_redemptions ?? '不限' }}
剩余 {{ code.remaining_count ?? '不限' }}
{{ redemptionCodeStatus(code) }} - - -
尚未创建兑换码
-
- -
-

兑换记录

- - - - - - - - - - - - - -
时间(北京时间)兑换码用户积分余额变化状态
{{ formatRedemptionTime(record.redeemed_at) }}{{ record.code }}{{ record.uname }}
UID {{ record.uid }}
+{{ record.points }}{{ record.balance_before }} → {{ record.balance_after ?? '处理中' }}{{ record.status === 'completed' ? '已完成' : '处理中' }}
暂无兑换记录
-
-
- -
-
-
-

手动搜歌加歌

-
- - -
-
- - - - - - - - - - -
歌曲歌手ID操作
{{ song.name }}{{ song.artist }}{{ song.id }} - - -
-
搜索结果会显示在这里。
-
- -
-
-

当前播放与待播点歌

-
- - -
-
-
-
- -
-
当前系统歌曲{{ music.current?.title || '-' }}{{ music.current?.artist || '-' }}
-
-
当前点歌任务{{ activeSongRequest?.name || '-' }}{{ activeSongRequest?.artist || '-' }}
-
- - - - - - - - - - - - -
#歌曲点歌人来源操作
{{ index + 1 }}{{ song.name }}
{{ song.artist }}
{{ song.uname || '后台' }}{{ song.source === 'admin' ? '后台' : '观众' }} - - - - - - - -
当前没有待播点歌
-
- -
-
-

禁点名单

-
-
- {{ songId }} - -
-
暂无禁点歌曲
-
-
-
-

禁点用户

-
-
- {{ user.uname }} - {{ user.uid }} - -
-
暂无禁点用户
-
-
-
- -
-

播放历史

-
-
- {{ item.name }} - {{ item.artist }} · {{ item.status }} -
-
暂无点歌历史
-
-
-
- -
-
-

弹幕播报

- - - -
-
-

TTS 语音

- -

取消勾选的类别仍会发送文字弹幕,只是不加入 TTS 队列。

-
- - - - - - - - - -
- - - - -

{{ ttsTestResult }}

-
-
-

礼物特效

-

向直播前台注入一条模拟礼物,验证特效链路;不会发弹幕、不触发 TTS、不计入统计。折算价值决定特效档位:0=免费小礼物,>0=初级,≥10=中级,≥100=豪华。

- - - - - -

{{ giftTestResult }}

-
-
-

音乐监听

- - - - - -
-
-

观众点歌

- - - - -

观众点歌必须能获取歌曲时长,超过 600 秒(10分钟)的歌曲会被拒绝。

- -

默认在当前歌曲还剩 1.2 秒时播放点歌,避免原播放列表下一首先响几秒;点歌结束后继续原来的下一首。

- - - -
-
- -
-
-

直播时间

- - -

系统会在开播前10分钟自动打开原神和B站直播姬,开播时自动开启推流;关播前1分钟关闭原神和BetterGI,关播时自动停止推流。支持跨日,例如20:00至02:00。

-
- -
-

程序路径

- - -

时间页面只需要维护开播和关播时间;程序路径通常配置一次即可。

-
- -
-

推流按钮设置

- -
- - - - -
- -
- - -
-
- -
-

扫码登录维护

-

扫码失败或超时触发自动重置时,系统会先删除当前 Windows 用户的 HKCU\\Software\\miHoYoSDK 注册表键。下面的按钮仅用于单独测试清理行为。

-
- -
-
- -
-

保存直播时间

-

非直播时段收到有效指令时,只回复“当前未开播哦~”,不会进入TTS。

-
- - -
-
-
- -
-
-

系统日志

-
{{ systemLog.join('\\n') }}
-
-
-

BetterGI 日志

-
{{ bgiLog.join('\\n') }}
-
-
- -
-

完整配置 JSON

- -
- - -
-
-
-
- `}).mount("#app");