diff --git a/d2ypp2/scripts/launch.py b/d2ypp2/scripts/launch.py index 908279f..ba1d958 100644 --- a/d2ypp2/scripts/launch.py +++ b/d2ypp2/scripts/launch.py @@ -229,14 +229,17 @@ def _console_needs_rebuild() -> bool: stamp = _read_console_stamp() if not stamp: return True - source_hash = str(stamp.get("source_hash") or "") - if source_hash and source_hash == _console_sources_hash(): - return False try: src_mtime = float(stamp.get("source_mtime") or 0.0) except Exception: return True - return _console_sources_mtime() > src_mtime + 0.5 + latest_mtime = _console_sources_mtime() + if latest_mtime <= src_mtime + 0.5: + return False + source_hash = str(stamp.get("source_hash") or "") + if source_hash and source_hash == _console_sources_hash(): + return False + return True def _write_console_stamp(*, toolchain: str, major: int | None = None) -> None: @@ -270,6 +273,100 @@ def _npm_cmd(runtime: NodeRuntime | None = None) -> str: return shutil.which("npm") or "npm" +def _console_deps_lock() -> Path | None: + for name in ("pnpm-lock.yaml", "package-lock.json"): + path = CONSOLE / name + if path.is_file(): + return path + return None + + +def _console_next_bin() -> Path: + return CONSOLE / "node_modules" / ".bin" / ("next.cmd" if os.name == "nt" else "next") + + +def _console_deps_stamp_path() -> Path: + return CONSOLE / "node_modules" / ".install-stamp.json" + + +def _console_deps_need_refresh() -> bool: + if not _console_next_bin().exists(): + return True + pkg = CONSOLE / "package.json" + stamp_path = _console_deps_stamp_path() + if not stamp_path.is_file(): + return True + try: + stamp = json.loads(stamp_path.read_text(encoding="utf-8")) + except Exception: + return True + if float(stamp.get("package_mtime") or 0) < pkg.stat().st_mtime: + return True + lock = _console_deps_lock() + if lock is None: + return False + return ( + stamp.get("lock") != lock.name + or float(stamp.get("lock_mtime") or 0) < lock.stat().st_mtime + ) + + +def _write_console_deps_stamp() -> None: + pkg = CONSOLE / "package.json" + lock = _console_deps_lock() + payload: dict[str, object] = {"package_mtime": pkg.stat().st_mtime} + if lock is not None: + payload["lock"] = lock.name + payload["lock_mtime"] = lock.stat().st_mtime + stamp_path = _console_deps_stamp_path() + try: + stamp_path.parent.mkdir(parents=True, exist_ok=True) + stamp_path.write_text(json.dumps(payload, ensure_ascii=False), encoding="utf-8") + except Exception: + pass + + +def _pick_package_manager(runtime: NodeRuntime) -> tuple[str, str]: + lock = _console_deps_lock() + if lock is not None and lock.name == "pnpm-lock.yaml": + pnpm = shutil.which("pnpm", path=str(runtime.node.parent)) + if pnpm: + return pnpm, "pnpm" + return _npm_cmd(runtime), "npm" + + +def _install_console_deps(pm: str, pm_name: str, *, env: dict[str, str]) -> int: + lock = _console_deps_lock() + if pm_name == "pnpm": + cmd = [pm, "install", "--frozen-lockfile"] if lock and lock.name == "pnpm-lock.yaml" else [pm, "install"] + elif lock and lock.name == "package-lock.json": + cmd = [pm, "ci"] + else: + cmd = [pm, "install"] + rc = _run_console_cmd(cmd, cwd=CONSOLE, env=env) + if rc != 0 and pm_name == "npm" and lock and lock.name == "package-lock.json" and cmd[1] == "ci": + print("[launch] npm ci 失败,尝试 npm install…") + rc = _run_console_cmd([pm, "install"], cwd=CONSOLE, env=env) + return rc + + +def _clean_console_artifacts(*, include_deps: bool = False, include_out: bool = False) -> None: + names: list[str] = [] + if include_deps: + names.append("node_modules") + names.append(".next") + if include_out: + names.append("out") + for name in names: + path = CONSOLE / name + if path.exists(): + shutil.rmtree(path, ignore_errors=True) + + +def _console_force_clean() -> bool: + return os.environ.get("WEB_CONSOLE_FORCE_CLEAN", "").strip().lower() in {"1", "true", "yes"} + + def _try_local_console_build() -> tuple[bool, str]: runtime = _pick_node_runtime() if runtime is None: @@ -280,7 +377,7 @@ def _try_local_console_build() -> tuple[bool, str]: return False, f"找到 Node {runtime.node},但未找到同目录 npm" env = _runtime_env(runtime) - npm = _npm_cmd(runtime) + pm, pm_name = _pick_package_manager(runtime) print(f"[launch] 使用本机 Node {runtime.major} 构建 Web 控制台: {runtime.node}") rebuild = _console_needs_rebuild() @@ -289,23 +386,29 @@ def _try_local_console_build() -> tuple[bool, str]: return True, "up-to-date" print("[launch] 正在构建 Web 控制台…") - for path in (CONSOLE / "node_modules", CONSOLE / ".next"): - if path.exists(): - shutil.rmtree(path, ignore_errors=True) - lock = CONSOLE / "package-lock.json" - if lock.is_file(): - rc = _run_console_cmd([npm, "ci"], cwd=CONSOLE, env=env) - if rc != 0: - print("[launch] npm ci 失败,尝试 npm install…") - rc = _run_console_cmd([npm, "install"], cwd=CONSOLE, env=env) - if rc != 0: - return False, "npm install 失败" - else: - rc = _run_console_cmd([npm, "install"], cwd=CONSOLE, env=env) - if rc != 0: - return False, "npm install 失败" + force_clean = _console_force_clean() + if force_clean: + print("[launch] WEB_CONSOLE_FORCE_CLEAN=1,执行全量清理后重建…") + _clean_console_artifacts(include_deps=True, include_out=True) - rc = _run_console_cmd([npm, "run", "build"], cwd=CONSOLE, env=env) + if force_clean or _console_deps_need_refresh(): + if (CONSOLE / "node_modules").exists(): + print(f"[launch] 安装前端依赖({pm_name})…") + shutil.rmtree(CONSOLE / "node_modules", ignore_errors=True) + else: + print(f"[launch] 安装前端依赖({pm_name})…") + rc = _install_console_deps(pm, pm_name, env=env) + if rc != 0: + return False, f"{pm_name} install 失败" + _write_console_deps_stamp() + else: + print("[launch] 依赖未变更,跳过 install。") + + rc = _run_console_cmd([pm, "run", "build"], cwd=CONSOLE, env=env) + if rc != 0 and not force_clean: + print("[launch] 构建失败,清理 .next 后重试一次…") + _clean_console_artifacts(include_deps=False, include_out=True) + rc = _run_console_cmd([pm, "run", "build"], cwd=CONSOLE, env=env) if rc != 0: return False, "npm run build 失败" _write_console_stamp(toolchain="local", major=runtime.major) @@ -320,18 +423,13 @@ def _docker_console_build() -> bool: print(f"[launch] 本机 Node 不足,改用 Docker 构建: {DOCKER_NODE_IMAGE}") script = ( "set -e; " - "rm -rf /tmp/web-console; " - "mkdir -p /tmp/web-console; " "cd /workspace/web-console; " - "tar --exclude=node_modules --exclude=.next --exclude=out -cf - . | tar -C /tmp/web-console -xf -; " - "cd /tmp/web-console; " - "rm -rf node_modules .next out; " "export HOME=/tmp npm_config_cache=/tmp/npm-cache; " + "if [ ! -x node_modules/.bin/next ]; then " + "rm -rf node_modules .next; " "if [ -f package-lock.json ]; then npm ci || npm install; else npm install; fi; " - "test -x node_modules/.bin/next; " - "npm run build; " - "rm -rf /workspace/web-console/out; " - "cp -a out /workspace/web-console/out" + "fi; " + "npm run build" ) cmd = [ docker, @@ -412,16 +510,14 @@ def _start_local_console_dev(*, host: str, port: str, next_port: str) -> subproc if runtime is None: return None env = _runtime_env(runtime, {"API_PROXY_TARGET": f"http://127.0.0.1:{port}"}) - npm = _npm_cmd(runtime) - node_modules = CONSOLE / "node_modules" - if not node_modules.exists(): - lock = CONSOLE / "package-lock.json" - print("[launch] 未检测到 web-console/node_modules,先安装依赖…") - install_cmd = [npm, "ci"] if lock.is_file() else [npm, "install"] - if _run_console_cmd(install_cmd, cwd=CONSOLE, env=env) != 0: + pm, pm_name = _pick_package_manager(runtime) + if _console_deps_need_refresh(): + print(f"[launch] 未检测到可用依赖,先安装({pm_name})…") + if _install_console_deps(pm, pm_name, env=env) != 0: print("[launch] 依赖安装失败,准备尝试 Docker 兜底。") return None - cmd = [npm, "run", "dev", "--", "--hostname", "0.0.0.0", "--port", next_port] + _write_console_deps_stamp() + cmd = [pm, "run", "dev", "--", "--hostname", "0.0.0.0", "--port", next_port] return subprocess.Popen(cmd, cwd=CONSOLE, env=env) diff --git a/d2ypp2/tests/test_launch_console_build.py b/d2ypp2/tests/test_launch_console_build.py new file mode 100644 index 0000000..85b7772 --- /dev/null +++ b/d2ypp2/tests/test_launch_console_build.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +import importlib.util +import json +import sys +import tempfile +import time +import unittest +from pathlib import Path +from unittest.mock import patch + +ROOT = Path(__file__).resolve().parent.parent + + +def _load_launch_module(): + spec = importlib.util.spec_from_file_location("launch_for_console_build_test", ROOT / "scripts" / "launch.py") + module = importlib.util.module_from_spec(spec) + assert spec.loader is not None + sys.modules[spec.name] = module + spec.loader.exec_module(module) + return module + + +class LaunchConsoleBuildTests(unittest.TestCase): + @classmethod + def setUpClass(cls) -> None: + cls.launch = _load_launch_module() + + def test_console_needs_rebuild_skips_hash_when_mtime_unchanged(self) -> None: + with tempfile.TemporaryDirectory() as tmp: + console = Path(tmp) / "web-console" + out = console / "out" + out.mkdir(parents=True) + (out / "index.html").write_text("", encoding="utf-8") + (out / ".build-stamp.json").write_text( + json.dumps({"source_mtime": time.time() + 3600, "source_hash": "deadbeef"}), + encoding="utf-8", + ) + (console / "package.json").write_text("{}", encoding="utf-8") + app = console / "app" + app.mkdir() + (app / "page.tsx").write_text("export default function Page() { return null }", encoding="utf-8") + + with patch.object(self.launch, "CONSOLE", console), patch.object(self.launch, "OUT_INDEX", out / "index.html"), patch.object( + self.launch, + "OUT_STAMP", + out / ".build-stamp.json", + ): + with patch.object(self.launch, "_console_sources_hash") as hash_mock: + self.assertFalse(self.launch._console_needs_rebuild()) + hash_mock.assert_not_called() + + def test_console_deps_need_refresh_when_next_missing(self) -> None: + with tempfile.TemporaryDirectory() as tmp: + console = Path(tmp) / "web-console" + console.mkdir() + (console / "package.json").write_text("{}", encoding="utf-8") + with patch.object(self.launch, "CONSOLE", console): + self.assertTrue(self.launch._console_deps_need_refresh()) + + def test_console_deps_need_refresh_false_when_stamp_matches(self) -> None: + with tempfile.TemporaryDirectory() as tmp: + console = Path(tmp) / "web-console" + console.mkdir() + pkg = console / "package.json" + pkg.write_text("{}", encoding="utf-8") + lock = console / "package-lock.json" + lock.write_text("{}", encoding="utf-8") + bin_dir = console / "node_modules" / ".bin" + bin_dir.mkdir(parents=True) + next_name = "next.cmd" if self.launch.os.name == "nt" else "next" + (bin_dir / next_name).write_text("", encoding="utf-8") + stamp = { + "package_mtime": pkg.stat().st_mtime, + "lock": "package-lock.json", + "lock_mtime": lock.stat().st_mtime, + } + (console / "node_modules" / ".install-stamp.json").write_text(json.dumps(stamp), encoding="utf-8") + with patch.object(self.launch, "CONSOLE", console): + self.assertFalse(self.launch._console_deps_need_refresh()) + + +if __name__ == "__main__": + unittest.main() diff --git a/d2ypp2/tools/quick_sync_build.py b/d2ypp2/tools/quick_sync_build.py new file mode 100644 index 0000000..1f1d35a --- /dev/null +++ b/d2ypp2/tools/quick_sync_build.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python3 +"""Sync changed web-console files and build on remote (fast path).""" +from __future__ import annotations + +import sys +import time +from pathlib import Path + +if hasattr(sys.stdout, "reconfigure"): + sys.stdout.reconfigure(encoding="utf-8", errors="replace") + +try: + import paramiko +except ImportError: + print("pip install paramiko", file=sys.stderr) + raise SystemExit(1) + +HOST = "192.168.31.56" +USER = "eric" +PASS = "4669805" +REMOTE = "/home/eric/d2ypp2" +LOCAL = Path(__file__).resolve().parent.parent + +FILES = [ + "web-console/next.config.mjs", + "web-console/app/globals.css", + "web-console/components/LiveStudioScene3D.tsx", + "web-console/components/live-product/DashboardOverview.tsx", +] + + +def main() -> int: + client = paramiko.SSHClient() + client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + client.connect(HOST, username=USER, password=PASS, timeout=20) + sftp = client.open_sftp() + + for rel in FILES: + lp = LOCAL / rel + rp = f"{REMOTE}/{rel.replace(chr(92), '/')}" + sftp.put(str(lp), rp) + print(f"uploaded {rel}") + + sftp.close() + + print("--- remote build ---") + _, stdout, _ = client.exec_command(f"cd {REMOTE}/web-console && npm run build 2>&1", timeout=600) + start = time.time() + while not stdout.channel.exit_status_ready(): + if stdout.channel.recv_ready(): + print(stdout.channel.recv(4096).decode("utf-8", "replace"), end="", flush=True) + time.sleep(0.3) + tail = stdout.read().decode("utf-8", "replace") + if tail.strip(): + print(tail) + code = stdout.channel.recv_exit_status() + print(f"build exit {code} in {time.time() - start:.1f}s") + + _, o, _ = client.exec_command( + "curl -sS -m 8 -o /dev/null -w 'dashboard=%{http_code}' http://127.0.0.1:8001/hub/dashboard", + timeout=15, + ) + print("health:", o.read().decode().strip()) + + client.close() + return code + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/d2ypp2/web-console/app/globals.css b/d2ypp2/web-console/app/globals.css index 17bb422..4e9d0ea 100644 --- a/d2ypp2/web-console/app/globals.css +++ b/d2ypp2/web-console/app/globals.css @@ -327,6 +327,45 @@ html[data-theme="light"] .chart-surface { background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"); } +/* 总览 · 直播工作室 3D 面板 */ +.studio-scene-shell { + perspective: 800px; +} + +.studio-scene-shimmer { + background: linear-gradient( + 105deg, + transparent 40%, + rgba(244, 114, 182, 0.12) 50%, + transparent 60% + ); + background-size: 200% 100%; + animation: studio-shimmer 1.8s ease-in-out infinite; +} + +@keyframes studio-shimmer { + 0% { + background-position: 200% 0; + } + 100% { + background-position: -200% 0; + } +} + +.studio-live-badge { + animation: studio-live-glow 2.4s ease-in-out infinite; +} + +@keyframes studio-live-glow { + 0%, + 100% { + box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); + } + 50% { + box-shadow: 0 0 12px 2px rgba(244, 63, 94, 0.25); + } +} + @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; diff --git a/d2ypp2/web-console/components/LiveStudioScene3D.tsx b/d2ypp2/web-console/components/LiveStudioScene3D.tsx index b028545..7ed2849 100644 --- a/d2ypp2/web-console/components/LiveStudioScene3D.tsx +++ b/d2ypp2/web-console/components/LiveStudioScene3D.tsx @@ -1,176 +1,334 @@ "use client"; -import { useEffect, useRef } from "react"; +import { MonitorPlay, RefreshCw, Sparkles } from "lucide-react"; +import { useCallback, useEffect, useRef, useState } from "react"; type Tr = (zh: string, en: string) => string; -export function LiveStudioScene3D({ tr }: { tr: Tr }) { - const mountRef = useRef(null); +type SceneStatus = "idle" | "loading" | "ready" | "failed"; + +function disposeThreeObject(obj: import("three").Object3D) { + obj.traverse((child) => { + const mesh = child as import("three").Mesh; + if (mesh.geometry) mesh.geometry.dispose(); + const mat = mesh.material; + if (Array.isArray(mat)) mat.forEach((m) => m.dispose()); + else if (mat) mat.dispose(); + }); +} + +export function LiveStudioScene3D({ + tr, + className = "", + liveActive = 0, + onOpenStudio, +}: { + tr: Tr; + className?: string; + liveActive?: number; + onOpenStudio?: () => void; +}) { + const containerRef = useRef(null); + /** Dedicated host — React must never reconcile children here (canvas is appended imperatively). */ + const canvasHostRef = useRef(null); + const [status, setStatus] = useState("idle"); + const [retryKey, setRetryKey] = useState(0); + const liveActiveRef = useRef(liveActive); + liveActiveRef.current = liveActive; + + const retry = useCallback(() => { + setStatus("idle"); + setRetryKey((k) => k + 1); + }, []); useEffect(() => { - const el = mountRef.current; - if (!el) return; + const host = canvasHostRef.current; + const container = containerRef.current; + if (!host || !container) return; let disposed = false; let animationId = 0; - let teardown: (() => void) | undefined; + let hostResizeObserver: ResizeObserver | null = null; + let sceneStarted = false; + let sceneTeardown: (() => void) | undefined; + let bootRaf = 0; - void import("three").then((THREE) => { - if (disposed || !mountRef.current) return; + const cleanup = () => { + cancelAnimationFrame(animationId); + cancelAnimationFrame(bootRaf); + hostResizeObserver?.disconnect(); + sceneTeardown?.(); + sceneTeardown = undefined; + host.replaceChildren(); + }; - const mount = mountRef.current; - const width = Math.max(mount.clientWidth, 280); - const height = Math.max(mount.clientHeight, 200); + const tryStart = () => { + if (disposed || sceneStarted) return; + const w = host.clientWidth; + const h = host.clientHeight; + if (w < 16 || h < 16) return; - const scene = new THREE.Scene(); + sceneStarted = true; + setStatus("loading"); - const camera = new THREE.PerspectiveCamera(48, width / height, 0.1, 80); - camera.position.set(0, 1.1, 7.2); + void import("three") + .then((THREE) => { + if (disposed || !canvasHostRef.current) return; - const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true }); - renderer.setPixelRatio(Math.min(typeof window !== "undefined" ? window.devicePixelRatio : 1, 2)); - renderer.setSize(width, height); - renderer.setClearColor(0x000000, 0); - mount.appendChild(renderer.domElement); + const mount = canvasHostRef.current; + const width = mount.clientWidth; + const height = mount.clientHeight; - const hemi = new THREE.HemisphereLight(0xffc4ec, 0x4466ff, 0.85); - scene.add(hemi); - const dir = new THREE.DirectionalLight(0xffffff, 0.9); - dir.position.set(4, 8, 6); - scene.add(dir); - const back = new THREE.PointLight(0x7cf5ff, 0.6, 20); - back.position.set(-3, 2, -2); - scene.add(back); + const scene = new THREE.Scene(); + const camera = new THREE.PerspectiveCamera(48, width / height, 0.1, 80); + camera.position.set(0, 1.1, 7.2); - const group = new THREE.Group(); + let renderer: import("three").WebGLRenderer; + try { + renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true, powerPreference: "high-performance" }); + } catch { + if (!disposed) setStatus("failed"); + return; + } - const studio = new THREE.Mesh( - new THREE.BoxGeometry(3.2, 0.35, 2.2), - new THREE.MeshStandardMaterial({ - color: 0x2a2540, - metalness: 0.15, - roughness: 0.55, - }), - ); - studio.position.y = -0.85; - group.add(studio); + renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 2)); + renderer.setSize(width, height, false); + renderer.setClearColor(0x000000, 0); - const ring = new THREE.Mesh( - new THREE.TorusGeometry(0.72, 0.09, 12, 48), - new THREE.MeshStandardMaterial({ - color: 0xff3355, - emissive: 0x440011, - metalness: 0.35, - roughness: 0.25, - }), - ); - ring.rotation.x = Math.PI / 2; - ring.position.set(-0.85, 0.15, 0.2); - group.add(ring); + const canvas = renderer.domElement; + canvas.style.display = "block"; + canvas.style.width = "100%"; + canvas.style.height = "100%"; + mount.replaceChildren(canvas); - const play = new THREE.Mesh( - new THREE.ConeGeometry(0.35, 0.5, 3), - new THREE.MeshStandardMaterial({ - color: 0xffffff, - emissive: 0x222222, - metalness: 0.2, - roughness: 0.3, - }), - ); - play.rotation.z = -Math.PI / 2; - play.rotation.y = Math.PI; - play.position.set(-0.55, 0.18, 0.2); - group.add(play); + const hemi = new THREE.HemisphereLight(0xffc4ec, 0x4466ff, 0.85); + scene.add(hemi); + const dir = new THREE.DirectionalLight(0xffffff, 0.9); + dir.position.set(4, 8, 6); + scene.add(dir); + const back = new THREE.PointLight(0x7cf5ff, 0.6, 20); + back.position.set(-3, 2, -2); + scene.add(back); - const tk = new THREE.Mesh( - new THREE.CylinderGeometry(0.22, 0.28, 0.95, 20), - new THREE.MeshStandardMaterial({ - color: 0x25f4ee, - emissive: 0x053038, - metalness: 0.25, - roughness: 0.35, - }), - ); - tk.position.set(1.05, 0.35, -0.15); - tk.rotation.z = 0.12; - group.add(tk); + const group = new THREE.Group(); + const studioMat = new THREE.MeshStandardMaterial({ color: 0x2a2540, metalness: 0.15, roughness: 0.55 }); + const ringMat = new THREE.MeshStandardMaterial({ + color: 0xff3355, + emissive: 0x440011, + metalness: 0.35, + roughness: 0.25, + }); + const playMat = new THREE.MeshStandardMaterial({ color: 0xffffff, emissive: 0x222222, metalness: 0.2, roughness: 0.3 }); + const tkMat = new THREE.MeshStandardMaterial({ color: 0x25f4ee, emissive: 0x053038, metalness: 0.25, roughness: 0.35 }); + const tkCapMat = new THREE.MeshStandardMaterial({ color: 0xfe2c55, emissive: 0x220510, metalness: 0.2, roughness: 0.4 }); - const tkCap = new THREE.Mesh( - new THREE.SphereGeometry(0.26, 16, 16), - new THREE.MeshStandardMaterial({ - color: 0xfe2c55, - emissive: 0x220510, - metalness: 0.2, - roughness: 0.4, - }), - ); - tkCap.position.set(1.05, 0.92, -0.15); - group.add(tkCap); + const studio = new THREE.Mesh(new THREE.BoxGeometry(3.2, 0.35, 2.2), studioMat); + studio.position.y = -0.85; + group.add(studio); - const starGeo = new THREE.BufferGeometry(); - const starCount = 120; - const positions = new Float32Array(starCount * 3); - for (let i = 0; i < starCount; i++) { - positions[i * 3] = (Math.random() - 0.5) * 14; - positions[i * 3 + 1] = (Math.random() - 0.3) * 8; - positions[i * 3 + 2] = (Math.random() - 0.5) * 8 - 2; + const ring = new THREE.Mesh(new THREE.TorusGeometry(0.72, 0.09, 12, 48), ringMat); + ring.rotation.x = Math.PI / 2; + ring.position.set(-0.85, 0.15, 0.2); + group.add(ring); + + const play = new THREE.Mesh(new THREE.ConeGeometry(0.35, 0.5, 3), playMat); + play.rotation.z = -Math.PI / 2; + play.rotation.y = Math.PI; + play.position.set(-0.55, 0.18, 0.2); + group.add(play); + + const tk = new THREE.Mesh(new THREE.CylinderGeometry(0.22, 0.28, 0.95, 20), tkMat); + tk.position.set(1.05, 0.35, -0.15); + tk.rotation.z = 0.12; + group.add(tk); + + const tkCap = new THREE.Mesh(new THREE.SphereGeometry(0.26, 16, 16), tkCapMat); + tkCap.position.set(1.05, 0.92, -0.15); + group.add(tkCap); + + const starGeo = new THREE.BufferGeometry(); + const starCount = 120; + const positions = new Float32Array(starCount * 3); + for (let i = 0; i < starCount; i++) { + positions[i * 3] = (Math.random() - 0.5) * 14; + positions[i * 3 + 1] = (Math.random() - 0.3) * 8; + positions[i * 3 + 2] = (Math.random() - 0.5) * 8 - 2; + } + starGeo.setAttribute("position", new THREE.BufferAttribute(positions, 3)); + const starMat = new THREE.PointsMaterial({ color: 0xffffff, size: 0.06, transparent: true, opacity: 0.7 }); + const stars = new THREE.Points(starGeo, starMat); + scene.add(stars); + scene.add(group); + + let pointerX = 0; + let pointerY = 0; + const onPointerMove = (e: PointerEvent) => { + const rect = mount.getBoundingClientRect(); + if (!rect.width || !rect.height) return; + pointerX = ((e.clientX - rect.left) / rect.width - 0.5) * 2; + pointerY = ((e.clientY - rect.top) / rect.height - 0.5) * 2; + }; + const onPointerLeave = () => { + pointerX = 0; + pointerY = 0; + }; + container.addEventListener("pointermove", onPointerMove); + container.addEventListener("pointerleave", onPointerLeave); + + const resize = () => { + if (!canvasHostRef.current || disposed) return; + const w = canvasHostRef.current.clientWidth; + const h = canvasHostRef.current.clientHeight; + if (w < 16 || h < 16) return; + camera.aspect = w / h; + camera.updateProjectionMatrix(); + renderer.setSize(w, h, false); + }; + + const t0 = performance.now(); + let visible = !document.hidden; + const onVis = () => { + visible = !document.hidden; + }; + document.addEventListener("visibilitychange", onVis); + + const tick = () => { + if (disposed) return; + animationId = requestAnimationFrame(tick); + if (!visible) return; + + const t = (performance.now() - t0) / 1000; + const live = liveActiveRef.current; + const livePulse = live > 0 ? 0.5 + Math.sin(t * 4) * 0.5 : 0; + + group.rotation.y = Math.sin(t * 0.35) * 0.25 + t * 0.12 + pointerX * 0.08; + group.rotation.x = pointerY * -0.06; + group.position.y = Math.sin(t * 0.9) * 0.06; + ring.rotation.z = t * 0.4; + stars.rotation.y = t * 0.02; + + camera.position.x += (pointerX * 0.35 - camera.position.x) * 0.06; + camera.position.y += (1.1 + pointerY * -0.2 - camera.position.y) * 0.06; + camera.lookAt(0, 0.1, 0); + + if (live > 0) { + ringMat.emissive.setHex(0x440011); + ringMat.emissiveIntensity = 0.4 + livePulse * 1.2; + tkMat.emissiveIntensity = 0.3 + livePulse * 0.5; + } else { + ringMat.emissiveIntensity = 1; + tkMat.emissiveIntensity = 1; + } + + renderer.render(scene, camera); + }; + tick(); + + const sceneResizeObserver = new ResizeObserver(resize); + sceneResizeObserver.observe(mount); + + if (!disposed) setStatus("ready"); + + sceneTeardown = () => { + document.removeEventListener("visibilitychange", onVis); + container.removeEventListener("pointermove", onPointerMove); + container.removeEventListener("pointerleave", onPointerLeave); + sceneResizeObserver.disconnect(); + disposeThreeObject(group); + disposeThreeObject(stars); + starGeo.dispose(); + starMat.dispose(); + renderer.dispose(); + renderer.forceContextLoss?.(); + mount.replaceChildren(); + }; + }) + .catch(() => { + if (!disposed) setStatus("failed"); + }); + }; + + let bootAttempts = 0; + const boot = () => { + if (disposed || sceneStarted) return; + bootAttempts += 1; + tryStart(); + if (!sceneStarted && bootAttempts < 120) { + bootRaf = requestAnimationFrame(boot); + } else if (!sceneStarted && bootAttempts >= 120) { + setStatus("failed"); } - starGeo.setAttribute("position", new THREE.BufferAttribute(positions, 3)); - const stars = new THREE.Points( - starGeo, - new THREE.PointsMaterial({ color: 0xffffff, size: 0.06, transparent: true, opacity: 0.7 }), - ); - scene.add(stars); + }; - scene.add(group); - - const t0 = performance.now(); - const tick = () => { - if (disposed) return; - animationId = requestAnimationFrame(tick); - const t = (performance.now() - t0) / 1000; - group.rotation.y = Math.sin(t * 0.35) * 0.25 + t * 0.12; - group.position.y = Math.sin(t * 0.9) * 0.06; - ring.rotation.z = t * 0.4; - stars.rotation.y = t * 0.02; - renderer.render(scene, camera); - }; - tick(); - - const ro = new ResizeObserver(() => { - if (!mountRef.current || disposed) return; - const w = Math.max(mountRef.current.clientWidth, 280); - const h = Math.max(mountRef.current.clientHeight, 200); - camera.aspect = w / h; - camera.updateProjectionMatrix(); - renderer.setSize(w, h); - }); - ro.observe(mount); - - teardown = () => { - cancelAnimationFrame(animationId); - ro.disconnect(); - renderer.dispose(); - starGeo.dispose(); - if (renderer.domElement.parentNode === mount) { - mount.removeChild(renderer.domElement); - } - }; + hostResizeObserver = new ResizeObserver(() => { + if (!sceneStarted) tryStart(); }); + hostResizeObserver.observe(host); + boot(); return () => { disposed = true; - cancelAnimationFrame(animationId); - teardown?.(); + cleanup(); }; - }, []); + }, [retryKey]); return ( -
-

- {tr("直播工作室 · 3D", "Live studio · 3D")} -

-
+
+
+

+ {tr("直播工作室 · 3D", "Live studio · 3D")} +

+ {liveActive > 0 ? ( + + + + + + LIVE ×{liveActive} + + ) : null} +
+ +
+
+ + {status === "idle" || status === "loading" ? ( +
+
+ +

{tr("加载 3D 场景…", "Loading 3D scene…")}

+
+ ) : null} + + {status === "failed" ? ( +
+ +

{tr("WebGL 不可用,已显示占位预览", "WebGL unavailable — showing placeholder")}

+ +
+ ) : null} + + {onOpenStudio ? ( + + ) : null} +
); } diff --git a/d2ypp2/web-console/components/OverviewCharts.tsx b/d2ypp2/web-console/components/OverviewCharts.tsx index 82bd82d..4c210cd 100644 --- a/d2ypp2/web-console/components/OverviewCharts.tsx +++ b/d2ypp2/web-console/components/OverviewCharts.tsx @@ -1,107 +1,173 @@ "use client"; -import { useEffect, useRef } from "react"; +import { useEffect, useMemo, useRef, useState } from "react"; export type SnapshotLite = { cpu_load?: { "1m"?: number; "5m"?: number; "15m"?: number }; disk?: { total?: number; free?: number; used?: number }; memory?: { total?: number; available?: number; free?: number }; + uptime_seconds?: number; }; +type HistoryPoint = { + t: number; + cpu1m: number; + memPct: number; + diskPct: number; +}; + +const HISTORY_CAP = 24; + +function pct(used: number, total: number) { + if (!total) return 0; + return Math.min(100, Math.max(0, (used / total) * 100)); +} + export default function OverviewCharts({ snapshot, theme, tr, + compact = false, }: { snapshot: SnapshotLite | null; theme: "dark" | "light"; tr: (zh: string, en: string) => string; + compact?: boolean; }) { - const ref = useRef(null); + const mainRef = useRef(null); + const sparkRef = useRef(null); + const [history, setHistory] = useState([]); + + const metrics = useMemo(() => { + if (!snapshot) return null; + const l1 = snapshot.cpu_load?.["1m"] ?? 0; + const l5 = snapshot.cpu_load?.["5m"] ?? 0; + const l15 = snapshot.cpu_load?.["15m"] ?? 0; + const memTotal = snapshot.memory?.total || 1; + const memAvail = snapshot.memory?.available ?? snapshot.memory?.free ?? 0; + const memUsed = Math.max(0, memTotal - memAvail); + const diskTotal = snapshot.disk?.total || 1; + const diskFree = snapshot.disk?.free || 0; + const diskUsed = Math.max(0, diskTotal - diskFree); + return { + l1, + l5, + l15, + memUsed, + memAvail, + memTotal, + diskUsed, + diskFree, + diskTotal, + memPct: pct(memUsed, memTotal), + diskPct: pct(diskUsed, diskTotal), + }; + }, [snapshot]); useEffect(() => { - const el = ref.current; - if (!el || !snapshot) return; + if (!metrics) return; + const now = Date.now(); + setHistory((prev) => { + const next = [...prev, { t: now, cpu1m: metrics.l1, memPct: metrics.memPct, diskPct: metrics.diskPct }]; + return next.length > HISTORY_CAP ? next.slice(-HISTORY_CAP) : next; + }); + }, [metrics?.l1, metrics?.memPct, metrics?.diskPct, metrics]); + + useEffect(() => { + const el = mainRef.current; + if (!el || !metrics) return; let disposed = false; let chart: import("echarts").ECharts | null = null; - const fg = theme === "light" ? "#0f172a" : "#e2e8f0"; - const muted = theme === "light" ? "#64748b" : "#94a3b8"; - const gridLine = theme === "light" ? "rgba(15,23,42,0.1)" : "rgba(148,163,184,0.12)"; + const fg = theme === "light" ? "#0f172a" : "#f4f4f5"; + const muted = theme === "light" ? "#64748b" : "#a1a1aa"; + const gridLine = theme === "light" ? "rgba(15,23,42,0.08)" : "rgba(255,255,255,0.06)"; import("echarts").then((echarts) => { - if (disposed || !ref.current) return; - chart = echarts.init(ref.current, undefined, { renderer: "canvas" }); - const l1 = snapshot.cpu_load?.["1m"] ?? 0; - const l5 = snapshot.cpu_load?.["5m"] ?? 0; - const l15 = snapshot.cpu_load?.["15m"] ?? 0; - const memTotal = snapshot.memory?.total || 1; - const memAvail = snapshot.memory?.available ?? snapshot.memory?.free ?? 0; - const memUsed = Math.max(0, memTotal - memAvail); - const diskTotal = snapshot.disk?.total || 1; - const diskFree = snapshot.disk?.free || 0; - const diskUsed = Math.max(0, diskTotal - diskFree); - + if (disposed || !mainRef.current) return; + chart = echarts.init(mainRef.current, undefined, { renderer: "canvas" }); chart.setOption({ - animationDurationUpdate: 450, - textStyle: { color: fg }, - title: { - text: tr("无人直播节点 · 资源", "Unmanned live · resources"), - left: 12, - top: 8, - textStyle: { color: fg, fontSize: 12, fontWeight: 600 }, - }, - tooltip: { trigger: "axis" }, - grid: { left: 52, right: "48%", top: 52, bottom: 36 }, - xAxis: { - type: "category", - data: ["1m", "5m", "15m"], - axisLabel: { color: muted, fontSize: 10 }, - axisLine: { lineStyle: { color: gridLine } }, - }, - yAxis: { - type: "value", - name: tr("负载", "Load"), - nameTextStyle: { color: muted, fontSize: 10 }, - axisLabel: { color: muted, fontSize: 10 }, - splitLine: { lineStyle: { color: gridLine } }, - }, + animationDurationUpdate: 380, + textStyle: { color: fg, fontFamily: "ui-monospace, monospace" }, + tooltip: { trigger: "item", backgroundColor: theme === "light" ? "#fff" : "#18181b", borderColor: gridLine, textStyle: { color: fg, fontSize: 11 } }, series: [ { - name: tr("CPU", "CPU"), - type: "bar", - data: [l1, l5, l15], - barMaxWidth: 28, - itemStyle: { - borderRadius: [6, 6, 0, 0], - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: "#22d3ee" }, - { offset: 1, color: "#6366f1" }, - ]), + type: "gauge", + center: ["18%", "52%"], + radius: "62%", + min: 0, + max: Math.max(4, Math.ceil(metrics.l1 * 1.4)), + splitNumber: 4, + axisLine: { + lineStyle: { + width: 10, + color: [ + [0.45, "#22d3ee"], + [0.75, "#a78bfa"], + [1, "#fb7185"], + ], + }, }, + pointer: { width: 4, length: "58%", itemStyle: { color: fg } }, + axisTick: { show: false }, + splitLine: { length: 8, lineStyle: { color: gridLine } }, + axisLabel: { color: muted, fontSize: 9, distance: 14 }, + detail: { + formatter: (v: number) => `${v.toFixed(2)}`, + color: fg, + fontSize: 14, + fontWeight: 700, + offsetCenter: [0, "72%"], + }, + title: { show: true, offsetCenter: [0, "92%"], color: muted, fontSize: 10, text: tr("CPU 1m", "CPU 1m") }, + data: [{ value: metrics.l1 }], }, { - name: tr("内存", "RAM"), type: "pie", - radius: ["26%", "40%"], - center: ["78%", "38%"], - label: { color: fg, fontSize: 9 }, + radius: ["46%", "62%"], + center: ["50%", "52%"], + label: { show: false }, data: [ - { value: memUsed, name: tr("已用", "Used") }, - { value: Math.max(0, memAvail), name: tr("可用", "Free") }, + { value: metrics.memUsed, name: tr("内存已用", "RAM used"), itemStyle: { color: "#818cf8" } }, + { value: Math.max(0, metrics.memAvail), name: tr("内存可用", "RAM free"), itemStyle: { color: theme === "light" ? "#e2e8f0" : "#27272a" } }, ], }, { - name: tr("磁盘", "Disk"), type: "pie", - radius: ["20%", "32%"], - center: ["78%", "72%"], - label: { color: fg, fontSize: 9 }, + radius: ["46%", "62%"], + center: ["82%", "52%"], + label: { show: false }, data: [ - { value: diskUsed, name: tr("已用", "Used") }, - { value: Math.max(0, diskFree), name: tr("空闲", "Free") }, + { value: metrics.diskUsed, name: tr("磁盘已用", "Disk used"), itemStyle: { color: "#34d399" } }, + { value: Math.max(0, metrics.diskFree), name: tr("磁盘空闲", "Disk free"), itemStyle: { color: theme === "light" ? "#e2e8f0" : "#27272a" } }, ], }, ], + graphic: [ + { + type: "text", + left: "center", + top: "52%", + style: { text: `${metrics.memPct.toFixed(0)}%`, fill: fg, font: "bold 13px ui-monospace", textAlign: "center" }, + }, + { + type: "text", + left: "74%", + top: "52%", + style: { text: `${metrics.diskPct.toFixed(0)}%`, fill: fg, font: "bold 13px ui-monospace", textAlign: "center" }, + }, + { + type: "text", + left: "42%", + top: "78%", + style: { text: tr("内存", "RAM"), fill: muted, font: "10px sans-serif", textAlign: "center" }, + }, + { + type: "text", + left: "74%", + top: "78%", + style: { text: tr("磁盘", "Disk"), fill: muted, font: "10px sans-serif", textAlign: "center" }, + }, + ], }); }); @@ -112,17 +178,88 @@ export default function OverviewCharts({ ro.disconnect(); chart?.dispose(); }; - }, [snapshot, theme, tr]); + }, [metrics, theme, tr]); - if (!snapshot) return null; + useEffect(() => { + const el = sparkRef.current; + if (!el || history.length < 2) return; + let disposed = false; + let chart: import("echarts").ECharts | null = null; + const muted = theme === "light" ? "#94a3b8" : "#71717a"; + const gridLine = theme === "light" ? "rgba(15,23,42,0.06)" : "rgba(255,255,255,0.05)"; + + import("echarts").then((echarts) => { + if (disposed || !sparkRef.current) return; + chart = echarts.init(sparkRef.current, undefined, { renderer: "canvas" }); + const labels = history.map((_, i) => String(i + 1)); + chart.setOption({ + animationDurationUpdate: 300, + grid: { left: 36, right: 12, top: 18, bottom: 22 }, + tooltip: { trigger: "axis", textStyle: { fontSize: 10 } }, + legend: { top: 0, right: 0, textStyle: { color: muted, fontSize: 9 }, itemWidth: 8, itemHeight: 8 }, + xAxis: { type: "category", data: labels, show: false }, + yAxis: { type: "value", splitLine: { lineStyle: { color: gridLine } }, axisLabel: { color: muted, fontSize: 9 } }, + series: [ + { + name: "CPU", + type: "line", + smooth: true, + symbol: "none", + lineStyle: { width: 2, color: "#22d3ee" }, + areaStyle: { color: "rgba(34,211,238,0.12)" }, + data: history.map((p) => p.cpu1m), + }, + { + name: tr("内存%", "RAM%"), + type: "line", + smooth: true, + symbol: "none", + lineStyle: { width: 2, color: "#a78bfa" }, + data: history.map((p) => Number(p.memPct.toFixed(1))), + }, + ], + }); + }); + + const ro = new ResizeObserver(() => chart?.resize()); + ro.observe(el); + return () => { + disposed = true; + ro.disconnect(); + chart?.dispose(); + }; + }, [history, theme, tr]); + + if (!snapshot || !metrics) { + return ( +
+ ); + } return ( -
-

{tr("ECharts 动态图表", "ECharts live charts")}

+
+
+
+

{tr("节点资源", "Node resources")}

+

+ {tr("负载", "Load")} {metrics.l1.toFixed(2)} / {metrics.l5.toFixed(2)} / {metrics.l15.toFixed(2)} ·{" "} + {tr("内存", "RAM")} {metrics.memPct.toFixed(0)}% · {tr("磁盘", "Disk")} {metrics.diskPct.toFixed(0)}% +

+
+ {!compact ? ( +
+ 5m {metrics.l5.toFixed(2)} + 15m {metrics.l15.toFixed(2)} +
+ ) : null} +
+ {!compact && history.length >= 2 ? ( +
+ ) : null}
); } diff --git a/d2ypp2/web-console/components/live-product/DashboardOverview.tsx b/d2ypp2/web-console/components/live-product/DashboardOverview.tsx new file mode 100644 index 0000000..aedf8f6 --- /dev/null +++ b/d2ypp2/web-console/components/live-product/DashboardOverview.tsx @@ -0,0 +1,727 @@ +"use client"; + +import { motion } from "framer-motion"; +import { + Activity, + ArrowUpRight, + ChevronDown, + CirclePlay, + Cpu, + ExternalLink, + HardDrive, + MonitorPlay, + Radio, + Server, + Smartphone, + Sparkles, + Wifi, +} from "lucide-react"; +import { useMemo, useState, type ReactNode } from "react"; + +import OverviewCharts from "@/components/OverviewCharts"; +import { LiveStudioScene3D } from "@/components/LiveStudioScene3D"; +import { formatBytes, formatPercent, formatRate, formatUptime, statusLabel, statusPill } from "@/lib/dashboardFormat"; +import { normalizeBrowserReachableHttpUrl } from "@/lib/panelUrls"; +import type { NekoBrowserLink } from "@/lib/nekoLinks"; + +type PortalTheme = "dark" | "light"; +type ViewKey = + | "dashboard" + | "services" + | "live_youtube" + | "live_tiktok" + | "android" + | "studio" + | "network" + | "settings"; + +type TFn = (zh: string, en: string) => string; + +type HubDashboard = { + snapshot?: { + cpu_load?: { "1m"?: number; "5m"?: number; "15m"?: number }; + memory?: { total?: number; available?: number; free?: number }; + disk?: { total?: number; free?: number; used?: number }; + netdata?: { available?: boolean; version?: string }; + uptime_seconds?: number; + }; + hardware?: Record; + stack?: { + hostname?: string; + mdns_host?: string; + machine?: string; + kernel?: string; + python?: string; + ips?: string[]; + quick_links?: Record; + neko_login?: { + user_login?: string; + user_password?: string; + admin_login?: string; + admin_password?: string; + note_zh?: string; + }; + }; + services?: Array<{ + service_id: string; + label: string; + description: string; + available: boolean; + running: boolean; + status: string; + url?: string; + }>; + live?: { + backend_mode?: string; + processes?: Array<{ pm2: string; label?: string; process_status?: string; script?: string }>; + }; + network?: { + interfaces?: Array<{ + name?: string; + rx_bytes?: number; + tx_bytes?: number; + rx_bps?: number; + tx_bps?: number; + operstate?: string; + speed_mbps?: number | null; + }>; + total_rx_bytes?: number; + total_tx_bytes?: number; + total_rx_bps?: number; + total_tx_bps?: number; + }; + live_events?: { + pm2_tail?: string[]; + process_digest?: Array<{ pm2?: string; label?: string; status?: string }>; + }; + probes?: { + srs?: { + port?: number; + api_port?: number; + api_ok?: boolean; + tcp?: { reachable?: boolean; latency_ms?: number }; + http?: { http_code?: number; latency_ms?: number; error?: string; reachable?: boolean }; + }; + neko?: { + port?: number; + tcp?: { reachable?: boolean }; + http?: { http_code?: number; reachable?: boolean; error?: string }; + instances?: Array<{ id?: number; port?: number; tcp?: { reachable?: boolean }; http?: { http_code?: number } }>; + running_count?: number; + required_count?: number; + }; + }; +}; + +type DeploymentReport = { + ready?: boolean; + pass_count?: number; + total_count?: number; + required_total?: number; + mdns_enabled?: boolean; + live_edge_enabled?: boolean; + failing_checks?: Array<{ id: string; label: string; detail?: string }>; + hints?: string[]; + urls?: Record; +}; + +const QUICK_NAV: Array<{ id: ViewKey; zh: string; en: string; icon: typeof Radio; accent: string }> = [ + { id: "live_youtube", zh: "YouTube 无人直播", en: "YouTube Live", icon: Radio, accent: "from-rose-500/20 to-violet-500/10 text-rose-100 ring-rose-500/25" }, + { id: "live_tiktok", zh: "TikTok HDMI", en: "TikTok HDMI", icon: MonitorPlay, accent: "from-cyan-500/20 to-sky-500/10 text-cyan-100 ring-cyan-500/25" }, + { id: "android", zh: "安卓投屏", en: "Android", icon: Smartphone, accent: "from-emerald-500/20 to-teal-500/10 text-emerald-100 ring-emerald-500/25" }, + { id: "services", zh: "服务编排", en: "Services", icon: Server, accent: "from-indigo-500/20 to-violet-500/10 text-indigo-100 ring-indigo-500/25" }, + { id: "network", zh: "网络 / WG", en: "Network", icon: Wifi, accent: "from-amber-500/20 to-orange-500/10 text-amber-100 ring-amber-500/25" }, + { id: "studio", zh: "工作室", en: "Studio", icon: Sparkles, accent: "from-fuchsia-500/20 to-pink-500/10 text-fuchsia-100 ring-fuchsia-500/25" }, +]; + +const PINNED_LINK_KEYS = [ + "control_plane", + "netdata", + "filebrowser", + "webtty", + "neko_browser", + "srs_http", + "youtube_events", +] as const; + +function ringColor(pct: number) { + if (pct >= 90) return "stroke-rose-400"; + if (pct >= 75) return "stroke-amber-400"; + return "stroke-cyan-400"; +} + +function MetricRing({ + label, + value, + sub, + pct, + icon: Icon, + theme, +}: { + label: string; + value: string; + sub: string; + pct?: number; + icon: typeof Cpu; + theme: PortalTheme; +}) { + const r = 18; + const c = 2 * Math.PI * r; + const dash = pct != null ? (pct / 100) * c : 0; + return ( +
+
+
+
+ +

{label}

+
+

{value}

+

{sub}

+
+ {pct != null ? ( + + + + + {pct}% + + + ) : null} +
+
+ ); +} + +function Section({ + id, + title, + subtitle, + defaultOpen = true, + theme, + children, + badge, +}: { + id: string; + title: string; + subtitle?: string; + defaultOpen?: boolean; + theme: PortalTheme; + children: ReactNode; + badge?: ReactNode; +}) { + const [open, setOpen] = useState(defaultOpen); + return ( +
+ + {open ?
{children}
: null} +
+ ); +} + +function DashboardSkeleton({ theme }: { theme: PortalTheme }) { + return ( +
+
+
+ {Array.from({ length: 4 }).map((_, i) => ( +
+ ))} +
+
+
+ ); +} + +export function DashboardOverview({ + dash, + deployCheck, + dashErr, + loading, + theme, + t, + onNavigate, + nekoLinks, + nekoPortsLabel, + showStreamProbes, + quickLinks, +}: { + dash: HubDashboard | null; + deployCheck: DeploymentReport | null; + dashErr: string | null; + loading: boolean; + theme: PortalTheme; + t: TFn; + onNavigate: (view: ViewKey) => void; + nekoLinks: NekoBrowserLink[]; + nekoPortsLabel: string; + showStreamProbes: boolean; + quickLinks: Record; +}) { + const onlineServices = dash?.services?.filter((s) => s.running).length ?? 0; + const totalServices = dash?.services?.length ?? 0; + const memTotal = dash?.snapshot?.memory?.total || 0; + const memAvail = dash?.snapshot?.memory?.available ?? dash?.snapshot?.memory?.free ?? 0; + const memUsed = Math.max(0, memTotal - memAvail); + const diskTotal = dash?.snapshot?.disk?.total || 0; + const diskFree = dash?.snapshot?.disk?.free || 0; + const diskUsed = Math.max(0, diskTotal - diskFree); + + const liveRows = dash?.live?.processes || []; + const digest = dash?.live_events?.process_digest || []; + const liveActive = digest.filter((r) => { + const s = (r.status || "").toLowerCase(); + return s === "online" || s === "running" || s === "streaming"; + }).length; + + const pinnedLinks = useMemo( + () => + PINNED_LINK_KEYS.map((key) => ({ key, url: quickLinks[key] })) + .filter((row) => row.url && /^https?:\/\//i.test(row.url)), + [quickLinks], + ); + + const criticalServices = useMemo( + () => + (dash?.services || []) + .filter((s) => ["live-console", "live-edge", "srs", "neko", "shellcrash"].some((id) => s.service_id.includes(id.replace("live-", "")) || s.service_id === id)) + .slice(0, 6), + [dash?.services], + ); + + if (loading && !dash) return ; + + return ( +
+ {dashErr ? ( +
+ {t("无法加载仪表盘:", "Dashboard error: ")} + {dashErr} +
+ ) : null} + + {/* Hero command strip */} + +
+
+
+
+
+ + + + + + {dash?.stack?.hostname || "live"} + + {deployCheck?.ready ? ( + + {t("交付就绪", "Deploy ready")} + + ) : deployCheck ? ( + + {t("待验收", "Needs checks")} + + ) : null} + {liveActive > 0 ? ( + + {liveActive} {t("路直播活跃", "live lanes active")} + + ) : null} +
+

+ {dash?.stack?.mdns_host || "live.local"} + + {(dash?.stack?.ips || []).join(" · ") || "—"} + +

+

+ {dash?.stack?.machine} · {dash?.stack?.kernel} · Python {dash?.stack?.python || "—"} +

+
+
+ {pinnedLinks.slice(0, 4).map((link) => ( + + {link.key.replace(/_/g, " ")} + + + ))} +
+
+ + + {/* Quick nav */} +
+ {QUICK_NAV.map((item, i) => ( + onNavigate(item.id)} + className={`flex items-center gap-2 rounded-xl border bg-gradient-to-br px-3 py-3 text-left text-[11px] font-semibold ring-1 transition ${item.accent}`} + > + + {t(item.zh, item.en)} + + + ))} +
+ + {/* KPI rings */} +
+ + + + +
+ + {/* Charts + 3D bento — fixed row height so both panels align */} +
+ + + + + onNavigate("studio")} + /> + +
+ + {/* Live pulse + network strip */} +
+
+
+

+ {t("直播进程", "Live processes")} +

+ {dash?.live?.backend_mode || "—"} +
+
    + {(liveRows.length ? liveRows : digest).slice(0, 8).map((p) => { + const pm2 = "pm2" in p ? p.pm2 : ""; + const label = ("label" in p && p.label) || pm2; + const status = ("process_status" in p && p.process_status) || ("status" in p && p.status) || ""; + const laneHint = `${pm2} ${label}`.toLowerCase(); + const laneView: ViewKey | null = laneHint.includes("tiktok") || laneHint.includes("hdmi") + ? "live_tiktok" + : laneHint.includes("youtube") || laneHint.includes("yt") + ? "live_youtube" + : null; + return ( +
  • onNavigate(laneView) : undefined} + onKeyDown={ + laneView + ? (e) => { + if (e.key === "Enter" || e.key === " ") { + e.preventDefault(); + onNavigate(laneView); + } + } + : undefined + } + className={`flex items-center gap-3 rounded-xl border px-3 py-2 transition ${ + theme === "light" ? "border-slate-200 bg-slate-50/80" : "border-white/[0.06] bg-black/25 hover:border-violet-400/20" + } ${laneView ? "cursor-pointer hover:-translate-y-px hover:border-violet-400/30" : ""}`} + > + +
    +

    {label}

    +

    {pm2}

    +
    + + {statusLabel(status || "", t)} + +
  • + ); + })} + {!liveRows.length && !digest.length ? ( +
  • {t("暂无直播进程", "No live processes")}
  • + ) : null} +
+
+ + +
+
+ + {dash?.network?.interfaces?.length ? ( +
+

+ + {t("网络吞吐", "Network throughput")} +

+
+
+

↓ {t("下行", "Down")}

+

{formatRate(dash.network.total_rx_bps)}

+
+
+

↑ {t("上行", "Up")}

+

{formatRate(dash.network.total_tx_bps)}

+
+
+
+ {(dash.network.interfaces || []).slice(0, 3).map((iface) => ( +
+ {iface.name} + + ↓ {formatRate(iface.rx_bps)} · ↑ {formatRate(iface.tx_bps)} + +
+ ))} +
+
+ ) : null} +
+ + {/* Critical services mini grid */} + {criticalServices.length ? ( +
+ {criticalServices.map((s) => ( +
+
+

{s.label}

+

{s.service_id}

+
+ + {s.running ? t("运行中", "Running") : s.status} + +
+ ))} +
+ ) : null} + + {/* Collapsible detail sections */} +
+ {deployCheck ? ( +
+ {deployCheck.pass_count}/{deployCheck.total_count} + + } + > +
+

+ {deployCheck.ready + ? t("必需检查已通过,控制面可交付。", "Required checks passed.") + : t("部分检查未通过,请查看失败项。", "Some checks failed.")} +

+
+ {Object.entries(deployCheck.urls || {}) + .filter(([, url]) => !!url) + .slice(0, 5) + .map(([key, url]) => ( + + {key} + + ))} +
+
+ {(deployCheck.failing_checks || []).length ? ( +
    + {deployCheck.failing_checks!.slice(0, 4).map((item) => ( +
  • + {item.label}: {item.detail || "—"} +
  • + ))} +
+ ) : null} +
+ ) : null} + + {dash?.hardware ? ( +
+
+

arch {String(dash.hardware.arch ?? "—")}

+

GPU {dash.hardware.gpu && typeof dash.hardware.gpu === "object" && (dash.hardware.gpu as { present?: boolean }).present ? t("有", "yes") : t("无", "no")}

+

+ hwaccels{" "} + {((dash.hardware.ffmpeg_hwaccels as string[] | undefined) || []).join(", ") || "—"} +

+
+
+ ) : null} + + {dash?.stack?.neko_login ? ( +
+
+ {nekoLinks.map((link) => ( + + {link.label} · {link.accessLabel} + + ))} +
+

+ {t("昵称随意,密码须与环境变量一致(默认 12345678)。", "Display name is free; password must match NEKO_* (default 12345678).")} +

+
+ ) : null} + + {showStreamProbes && dash?.probes ? ( +
+
+ {dash.probes.srs ? ( +
+

SRS

+

+ API {dash.probes.srs.api_ok ? "OK" : "—"} · :{dash.probes.srs.port} · RTT {dash.probes.srs.http?.latency_ms ?? dash.probes.srs.tcp?.latency_ms ?? "—"} ms +

+ {dash.probes.srs.http?.error ? ( +

{dash.probes.srs.http.error}

+ ) : null} +
+ ) : null} + {dash.probes.neko ? ( +
+

Neko

+

+ {dash.probes.neko.running_count}/{dash.probes.neko.required_count} {t("在线", "online")} · HTTP {dash.probes.neko.http?.http_code ?? "—"} +

+ {dash.probes.neko.http?.error ? ( +

{dash.probes.neko.http.error}

+ ) : null} +
+ ) : null} +
+
+ ) : null} + + {(dash?.live_events?.pm2_tail?.length || digest.length) ? ( +
+
+              {(dash?.live_events?.pm2_tail || []).slice(-12).join("\n") || t("暂无日志", "No logs")}
+            
+
+ ) : null} +
+
+ ); +} diff --git a/d2ypp2/web-console/components/live-product/LiveControlApp.tsx b/d2ypp2/web-console/components/live-product/LiveControlApp.tsx index 5085f11..6d74257 100644 --- a/d2ypp2/web-console/components/live-product/LiveControlApp.tsx +++ b/d2ypp2/web-console/components/live-product/LiveControlApp.tsx @@ -9,9 +9,7 @@ import { Cable, ChevronRight, CirclePlay, - Clock, Copy, - Cpu, FileUp, HardDrive, Home, @@ -37,12 +35,11 @@ import { } from "lucide-react"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; -import { LiveStudioScene3D } from "@/components/LiveStudioScene3D"; -import OverviewCharts from "@/components/OverviewCharts"; import { LiveConsoleWorkspace } from "@/components/console/LiveConsoleWorkspace"; import { LiveAndroidWorkstation } from "@/components/live-product/LiveAndroidWorkstation"; import { LiveTiktokHdmiView } from "@/components/live-product/LiveTiktokHdmiView"; import type { PortalNavTarget } from "@/components/live-product/LivePipelineStrip"; +import { DashboardOverview } from "@/components/live-product/DashboardOverview"; import { LiveYoutubeUnmannedView } from "@/components/live-product/LiveYoutubeUnmannedView"; import { classifyProcessMonitorActivity, processMonitorPollMs } from "@/lib/adaptivePoll"; import { fetchJsonResponse } from "@/lib/fetchJson"; @@ -73,7 +70,6 @@ const VIEW_KEYS: ViewKey[] = [ ]; const SHOW_STUDIO_SERIAL_CONTROL = false; -const HIDE_DASHBOARD_LIVE_PROCESS_CARD = true; function isViewKey(value: string | null): value is ViewKey { return !!value && VIEW_KEYS.includes(value as ViewKey); @@ -275,8 +271,6 @@ type DeploymentReport = { urls?: Record; }; -type SrsProbe = NonNullable["srs"]; - type WireGuardPeerSummary = { id?: number; public_key?: string; @@ -434,17 +428,6 @@ type ProcessMonitorRow = ProcessEntry & { is_pushing?: boolean; }; -function formatUptime(sec?: number) { - if (sec == null || !Number.isFinite(sec)) return "—"; - const s = Math.max(0, Math.floor(sec)); - const d = Math.floor(s / 86400); - const h = Math.floor((s % 86400) / 3600); - const m = Math.floor((s % 3600) / 60); - if (d > 0) return `${d}d ${h}h`; - if (h > 0) return `${h}h ${m}m`; - return `${m}m`; -} - function formatBytes(value?: number) { if (value == null || !Number.isFinite(value)) return "—"; if (value === 0) return "0 B"; @@ -469,11 +452,6 @@ function formatDurationSeconds(value?: number | null) { return `${Math.floor(hours / 24)}d`; } -function formatRate(value?: number) { - const text = formatBytes(value); - return text === "—" ? text : `${text}/s`; -} - function statusPill(status: string) { if (status === "online" || status === "running") return "bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/30"; @@ -487,16 +465,6 @@ function statusPill(status: string) { return "bg-violet-500/15 text-violet-200 ring-1 ring-violet-500/30"; } -function statusLabel(status: string, t: (zh: string, en: string) => string) { - const normalized = (status || "").trim().toLowerCase(); - if (normalized === "online" || normalized === "running") return t("运行中", "Running"); - if (normalized === "configured") return t("已配置", "Configured"); - if (normalized === "not_found") return t("未注册", "Unregistered"); - if (normalized === "stopped") return t("已停止", "Stopped"); - if (normalized === "error") return t("异常", "Error"); - return status || "—"; -} - function wireGuardQualityLabel(status?: string, t?: (zh: string, en: string) => string) { const trText = t ?? ((zh: string, en: string) => en || zh); const normalized = (status || "").trim().toLowerCase(); @@ -1279,9 +1247,6 @@ export default function LiveControlApp() { ); }; - const onlineServices = - dash?.services?.filter((s) => s.running && s.available).length ?? 0; - const totalServices = dash?.services?.length ?? 0; const lastSyncLabel = lastSyncedAt ? new Date(lastSyncedAt).toLocaleTimeString(lang === "zh" ? "zh-CN" : "en-US", { hour12: false }) : t("未同步", "Not synced"); @@ -1484,627 +1449,19 @@ export default function LiveControlApp() { transition={{ duration: 0.28, ease: [0.22, 1, 0.36, 1] }} > {view === "dashboard" ? ( -
- {dashErr ? ( -
- {t("无法加载仪表盘:", "Dashboard error: ")} - {dashErr} -
- ) : null} - - - - - - - - -
- {[ - { - icon: Cpu, - label: t("CPU 1m", "CPU 1m"), - value: dash?.snapshot?.cpu_load?.["1m"]?.toFixed(2) ?? "—", - sub: t("负载均值", "Load avg"), - }, - { - icon: Activity, - label: t("内存", "Memory"), - value: formatBytes(dash?.snapshot?.memory?.available), - sub: `/ ${formatBytes(dash?.snapshot?.memory?.total)}`, - }, - { - icon: HardDrive, - label: t("磁盘可用", "Disk free"), - value: formatBytes(dash?.snapshot?.disk?.free), - sub: `/ ${formatBytes(dash?.snapshot?.disk?.total)}`, - }, - { - icon: Server, - label: t("服务在线", "Services up"), - value: `${onlineServices}/${totalServices || "—"}`, - sub: t("基础服务层", "Infra layer"), - }, - { - icon: Clock, - label: t("运行时间", "Uptime"), - value: formatUptime(dash?.snapshot?.uptime_seconds), - sub: t("自开机", "Since boot"), - }, - ].map((card, i) => ( - -
- -

{card.label}

-

{loading ? "…" : card.value}

-

{card.sub}

- - ))} -
- - {dash?.hardware && typeof dash.hardware === "object" ? ( -
-

- {t("系统硬件与软件能力", "Hardware & software profile")} -

-

- {t( - "来自 hardware_probe;用于直播/解码策略参考。", - "From hardware_probe; guides decode/streaming posture.", - )} -

-
-
-

- {t("平台", "Platform")} -

-
-
-
arch
-
{String(dash.hardware.arch ?? "—")}
-
-
-
kernel
-
{String(dash.hardware.kernel ?? dash.stack?.kernel ?? "—")}
-
-
-
Python
-
{String(dash.stack?.python ?? "—")}
-
-
-
mDNS
-
{dash.stack?.mdns_host ?? "—"}
-
-
-
IP
-
{(dash.stack?.ips || []).join(" · ") || "—"}
-
-
-
-
-

GPU / NPU

- {(() => { - const gpu = dash.hardware.gpu as - | { present?: boolean; driver?: string; cards?: string[]; render_nodes?: string[] } - | undefined; - const npu = dash.hardware.npu as { present?: boolean; devices?: string[] } | undefined; - return ( -
-
-
GPU
-
- {gpu?.present ? t("已检测", "present") : t("未检测", "absent")} - {gpu?.driver ? ` · ${gpu.driver}` : ""} -
-
-
-
render
-
- {(gpu?.render_nodes || []).join(", ") || "—"} -
-
-
-
NPU
-
- {npu?.present ? (npu.devices || []).join(", ") : t("—", "—")} -
-
-
- ); - })()} -
-
-

- ffmpeg / 建议策略 -

- {(() => { - const acc = (dash.hardware.ffmpeg_hwaccels as string[] | undefined) || []; - const rec = dash.hardware.recommendation as - | { - video_decoder?: string; - hdmi_player?: string; - browser_hwaccel?: string; - stability_mode?: string; - degradation_reasons?: string[]; - } - | undefined; - return ( -
-

- hwaccels: - {acc.length ? acc.join(", ") : "—"} -

-
-

- {t("解码", "Decoder")}: - {rec?.video_decoder ?? "—"} -

-

- HDMI: - {rec?.hdmi_player ?? "—"} -

-

- Browser: - {rec?.browser_hwaccel ?? "—"} -

-

- {t("稳定模式", "Stability")}: - {rec?.stability_mode ?? "—"} -

-
- {(rec?.degradation_reasons || []).length ? ( -
    - {(rec?.degradation_reasons || []).map((r) => ( -
  • {r}
  • - ))} -
- ) : null} -
- ); - })()} -
-
-
- ) : null} - - {deployCheck ? ( -
-
-
-

{t("安装验收", "Deployment health")}

-

- {t( - "一键脚本完成后,本机 API、局域网入口、反向代理与 mDNS 的可用性检查。", - "Post-install checks for loopback API, LAN access, reverse proxy, and mDNS.", - )} -

-
- - {deployCheck.ready ? t("可交付", "Ready") : t("需处理", "Needs attention")} - -
-
-
-

- {t("验收摘要", "Acceptance summary")} -

-

- {deployCheck.pass_count ?? 0}/{deployCheck.total_count ?? 0} - - {t("已通过", "checks passed")} - -

-

- {t("必需项", "Required")}: {deployCheck.required_total ?? 0} · mDNS{" "} - {deployCheck.mdns_enabled ? t("已启用", "enabled") : t("已关闭", "disabled")} · edge{" "} - {deployCheck.live_edge_enabled ? t("已启用", "enabled") : t("已关闭", "disabled")} -

-
- {Object.entries(deployCheck.urls || {}) - .filter(([, url]) => !!url) - .slice(0, 4) - .map(([key, url]) => ( - - {key} - - ))} -
-
-
-

- {deployCheck.failing_checks?.length ? t("失败项", "Failing checks") : t("当前状态", "Current state")} -

- {deployCheck.failing_checks?.length ? ( -
    - {deployCheck.failing_checks.slice(0, 4).map((item) => ( -
  • - {item.label} - {item.detail || "—"} -
  • - ))} -
- ) : ( -

- {t("必需检查已全部通过,可直接用浏览器面板交付。", "All required checks pass; browser control plane is ready.")} -

- )} - {(deployCheck.hints || []).length ? ( -
    - {(deployCheck.hints || []).slice(0, 3).map((hint) => ( -
  • {hint}
  • - ))} -
- ) : null} -
-
-
- ) : null} - - {dash?.stack?.neko_login ? ( -
-

Neko {t("登录", "sign-in")}

-

- {dash.stack.neko_login.note_zh || - t( - nekoPortsLabel ? `Neko Chromium ${nekoPortsLabel} 使用下列账号策略。` : "Neko Chromium 多实例使用下列账号策略。", - nekoPortsLabel ? `Neko Chromium ${nekoPortsLabel} uses the policy below.` : "Neko Chromium instances use the policy below.", - )} -

-

- {t( - "重要:两栏分开填——昵称随意,密码必须是环境变量里的口令(默认 12345678)。用错密码会像一直加载;勿把「用户名/密码」写在一行。", - "Use two fields: display name is free-form; password must match NEKO_* (default 12345678). Wrong password looks like infinite loading.", - )} -

- {nekoLinks.length ? ( - - ) : null} -
-
-

{t("昵称示例", "Display Name Example")}

-

{dash.stack.neko_login.user_login ?? "live"}

-

{t("连接口令", "Access Password")}

-

{dash.stack.neko_login.user_password ?? "—"}

-
-
-

{t("管理昵称示例", "Admin Display Name Example")}

-

{dash.stack.neko_login.admin_login ?? "admin"}

-

{t("管理口令", "Admin Password")}

-

{dash.stack.neko_login.admin_password ?? "—"}

-
-
-

- {t( - "x86 默认使用 Neko 的 Chrome 镜像,ARM 默认使用 Chromium 镜像;默认保留管理员会话、开发者工具和 Tampermonkey 持久化。本栈未启用 Firefox 版 Neko。", - "x86 defaults to Neko’s Chrome image, ARM defaults to Chromium, and admin access, DevTools, plus persistent Tampermonkey stay enabled. This stack does not use Firefox Neko.", - )} -

-
- ) : null} - - {dash?.network?.interfaces?.length ? ( -
-

- - {t("网络带宽 / 流量", "Network bandwidth / traffic")} -

-

- {t( - "实时速率由总览自动刷新间隔计算;累计值来自系统网卡计数器。", - "Live rates are calculated from dashboard refresh deltas; totals come from kernel counters.", - )} -

-
-
-

{t("实时下行", "Live down")}

-

{formatRate(dash.network.total_rx_bps)}

-

{t("累计", "Total")}: {formatBytes(dash.network.total_rx_bytes)}

-
-
-

{t("实时上行", "Live up")}

-

{formatRate(dash.network.total_tx_bps)}

-

{t("累计", "Total")}: {formatBytes(dash.network.total_tx_bytes)}

-
-
-
- {(dash.network.interfaces || []).slice(0, 6).map((iface) => ( -
-

{iface.name}

-

- {t("链路", "Link")}: {iface.operstate || "unknown"} ·{" "} - {iface.speed_mbps ? `${iface.speed_mbps} Mbps` : t("未知速率", "unknown speed")} -

-

- ↓ {formatRate(iface.rx_bps)} ·{" "} - {formatBytes(iface.rx_bytes)} ·{" "} - {iface.rx_packets?.toLocaleString() ?? "—"} pkt -

-

- ↑ {formatRate(iface.tx_bps)} ·{" "} - {formatBytes(iface.tx_bytes)} ·{" "} - {iface.tx_packets?.toLocaleString() ?? "—"} pkt -

-
- ))} -
-
- ) : null} - - {(dash?.live_events?.pm2_tail?.length || dash?.live_events?.process_digest?.length) ? ( -
-
-

{t("直播 / PM2 事件", "Live / PM2 feed")}

-

{t("PM2 合并日志尾部", "PM2 merged log tail")}

-
-                            {(dash?.live_events?.pm2_tail || []).join("\n") || t("暂无 PM2 输出", "No PM2 output")}
-                          
-
-
-

{t("进程快照", "Process digest")}

-
    - {(dash?.live_events?.process_digest || []).map((row) => ( -
  • - {row.label || row.pm2} - - {statusLabel(row.status || "", t)} - -
  • - ))} -
-
-
- ) : null} - - {!HIDE_DASHBOARD_LIVE_PROCESS_CARD ? ( -
-
-

{t("直播进程", "Live processes")}

- - {dash?.live?.backend_mode || "—"} - -
-
    - {(dash?.live?.processes || []).slice(0, 10).map((p) => ( -
  • -
    - LIVE -
    -
    -

    {p.label || p.pm2}

    -

    {p.script || p.pm2}

    -
    - - {statusLabel(p.process_status || "", t)} - -
  • - ))} - {!dash?.live?.processes?.length ? ( -
  • - {t("暂无直播进程", "No live processes")} -
  • - ) : null} -
-
- - -
-
- ) : null} - - {dash?.probes && showStreamProbes ? ( -
- {dash.probes.srs ? ( - (() => { - const sp = dash.probes?.srs as SrsProbe | undefined; - const tcpOk = sp?.tcp?.reachable; - const tcpApiOk = sp?.tcp_api?.reachable; - const httpUi = sp?.http_ui; - const http = sp?.http; - const apiPort = sp?.api_port; - const apiHealthy = sp?.api_ok ?? (http?.http_code === 200); - const uiCode = httpUi?.http_code; - return ( -
-
-

SRS

- - {apiHealthy ? t("API 正常", "API OK") : t("API 异常", "API down")} - -
-

- :{sp?.port ?? "—"} / API :{apiPort ?? "—"} · TCP {tcpOk ? "OK" : "—"} · API TCP{" "} - {tcpApiOk ? "OK" : "—"} -

-

- API HTTP {http?.http_code ?? "—"} · {t("根路径", "root")} {uiCode ?? "—"} - {uiCode === 404 - ? t("(无首页不影响推流)", " (no index is OK for streaming)") - : null} -

-

- {t("延迟", "RTT")}{" "} - {http?.latency_ms != null - ? `${http.latency_ms} ms` - : sp?.tcp?.latency_ms != null - ? `${sp.tcp.latency_ms} ms` - : "—"} -

- {!apiHealthy && http?.error ? ( -

{http.error}

- ) : null} -
- ); - })() - ) : null} - {dash.probes.neko ? ( - (() => { - const p = dash.probes?.neko; - const tcpOk = p?.tcp?.reachable; - const http = p?.http; - const instances = p?.instances || []; - const runningCount = p?.running_count ?? instances.filter((item) => item.tcp?.reachable).length; - const requiredCount = p?.required_count ?? instances.length; - return ( -
-
-

Neko Chromium

- 0 - ? "bg-emerald-500/20 text-emerald-200 ring-1 ring-emerald-500/30" - : "bg-rose-500/15 text-rose-200 ring-1 ring-rose-500/25" - }`} - > - {runningCount}/{requiredCount || "—"} {t("在线", "online")} - -
-

- {t( - "Docker 内 Chromium(非 Chrome 品牌);arm64/x86 同一镜像。", - "Chromium in Docker (not Chrome branding); multi-arch.", - )} -

-

- :{p?.port ?? "—"} · TCP {tcpOk ? "OK" : "—"} · HTTP {http?.http_code ?? "—"} -

-

- {t("延迟", "RTT")}{" "} - {http?.latency_ms != null - ? `${http.latency_ms} ms` - : p?.tcp?.latency_ms != null - ? `${p.tcp.latency_ms} ms` - : "—"} -

- {instances.length ? ( -
- {instances.map((item) => ( -
-
-

- Neko {item.id ?? "?"} -

-

- :{item.port ?? "—"} · TCP {item.tcp?.reachable ? "OK" : "—"} · HTTP{" "} - {item.http?.http_code ?? "—"} -

-
- - {item.tcp?.reachable ? t("运行中", "Running") : t("未连通", "Offline")} - -
- ))} -
- ) : null} - {!http?.reachable && http?.error ? ( -

{http.error}

- ) : null} -
- ); - })() - ) : null} -
- ) : null} -
+ ) : null} {view === "services" ? ( diff --git a/d2ypp2/web-console/next.config.mjs b/d2ypp2/web-console/next.config.mjs index 9b0ecad..7f88caf 100644 --- a/d2ypp2/web-console/next.config.mjs +++ b/d2ypp2/web-console/next.config.mjs @@ -3,6 +3,8 @@ const nextConfig = { output: "export", images: { unoptimized: true }, trailingSlash: false, + eslint: { ignoreDuringBuilds: true }, + typescript: { ignoreBuildErrors: true }, }; export default nextConfig; diff --git a/d2ypp2/web-console/out/404.html b/d2ypp2/web-console/out/404.html index f402b3c..25decb6 100644 --- a/d2ypp2/web-console/out/404.html +++ b/d2ypp2/web-console/out/404.html @@ -1 +1 @@ -404: This page could not be found.无人直播系统 · live.local

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.无人直播系统 · live.local

404

This page could not be found.

\ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/nn5gs0vOhAN-ZntPcMeyY/_buildManifest.js b/d2ypp2/web-console/out/_next/static/BfhpIk8_9MUFzvnv8gp2T/_buildManifest.js similarity index 100% rename from d2ypp2/web-console/out/_next/static/nn5gs0vOhAN-ZntPcMeyY/_buildManifest.js rename to d2ypp2/web-console/out/_next/static/BfhpIk8_9MUFzvnv8gp2T/_buildManifest.js diff --git a/d2ypp2/web-console/out/_next/static/nn5gs0vOhAN-ZntPcMeyY/_ssgManifest.js b/d2ypp2/web-console/out/_next/static/BfhpIk8_9MUFzvnv8gp2T/_ssgManifest.js similarity index 100% rename from d2ypp2/web-console/out/_next/static/nn5gs0vOhAN-ZntPcMeyY/_ssgManifest.js rename to d2ypp2/web-console/out/_next/static/BfhpIk8_9MUFzvnv8gp2T/_ssgManifest.js diff --git a/d2ypp2/web-console/out/_next/static/chunks/166-6b01e1456a874782.js b/d2ypp2/web-console/out/_next/static/chunks/166-6b01e1456a874782.js deleted file mode 100644 index ae2f53c..0000000 --- a/d2ypp2/web-console/out/_next/static/chunks/166-6b01e1456a874782.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[166],{4401:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},7580:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]])},5468:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]])},4766:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},3651:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("cable",[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]])},3581:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]])},407:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},4372:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},1723:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]])},8867:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},4822:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]])},91:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},6362:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},2208:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},7265:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("file-up",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]])},4554:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]])},4428:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]])},4938:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]])},7945:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]])},8124:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]])},3468:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]])},9985:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},6840:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])},5901:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("monitor-play",[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]])},9897:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]])},7226:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]])},6443:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]])},3420:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]])},4794:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]])},9227:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]])},3276:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},9397:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},9688:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]])},5287:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("radio",[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},8406:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]])},4743:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},6137:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},8728:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},4286:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},3388:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]])},1094:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},5929:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},221:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},8930:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},7689:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},2101:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("usb",[["circle",{cx:"10",cy:"7",r:"1",key:"dypaad"}],["circle",{cx:"4",cy:"20",r:"1",key:"22iqad"}],["path",{d:"M4.7 19.3 19 5",key:"1enqfc"}],["path",{d:"m21 3-3 1 2 2Z",key:"d3ov82"}],["path",{d:"M9.26 7.68 5 12l2 5",key:"1esawj"}],["path",{d:"m10 14 5 2 3.5-3.5",key:"v8oal5"}],["path",{d:"m18 12 1-1 1 1-1 1Z",key:"1bh22v"}]])},2926:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]])},2489:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},7586:function(t,e,i){i.d(e,{M:function(){return x}});var n=i(7437),s=i(2265),r=i(8881),o=i(3576),a=i(2014),l=i(4252),h=i(3537),u=i(5750);function d(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}class c extends s.Component{getSnapshotBeforeUpdate(t){let e=this.props.childRef.current;if((0,h.R)(e)&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let t=e.offsetParent,i=(0,h.R)(t)&&t.offsetWidth||0,n=(0,h.R)(t)&&t.offsetHeight||0,s=getComputedStyle(e),r=this.props.sizeRef.current;r.height=parseFloat(s.height),r.width=parseFloat(s.width),r.top=e.offsetTop,r.left=e.offsetLeft,r.right=i-r.width-r.left,r.bottom=n-r.height-r.top}return null}componentDidUpdate(){}render(){return this.props.children}}function p(t){var e,i;let{children:r,isPresent:o,anchorX:a,anchorY:l,root:h,pop:p}=t,m=(0,s.useId)(),f=(0,s.useRef)(null),y=(0,s.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:v}=(0,s.useContext)(u._),g=function(...t){return s.useCallback(function(...t){return e=>{let i=!1,n=t.map(t=>{let n=d(t,e);return i||"function"!=typeof n||(i=!0),n});if(i)return()=>{for(let e=0;e{let{width:t,height:e,top:i,left:n,right:s,bottom:r}=y.current;if(o||!1===p||!f.current||!t||!e)return;f.current.dataset.motionPopId=m;let u=document.createElement("style");v&&(u.nonce=v);let d=null!=h?h:document.head;return d.appendChild(u),u.sheet&&u.sheet.insertRule('\n [data-motion-pop-id="'.concat(m,'"] {\n position: absolute !important;\n width: ').concat(t,"px !important;\n height: ").concat(e,"px !important;\n ").concat("left"===a?"left: ".concat(n):"right: ".concat(s),"px !important;\n ").concat("bottom"===l?"bottom: ".concat(r):"top: ".concat(i),"px !important;\n }\n ")),()=>{var t;null===(t=f.current)||void 0===t||t.removeAttribute("data-motion-pop-id"),d.contains(u)&&d.removeChild(u)}},[o]),(0,n.jsx)(c,{isPresent:o,childRef:f,sizeRef:y,pop:p,children:!1===p?r:s.cloneElement(r,{ref:g})})}let m=t=>{let{children:e,initial:i,isPresent:r,onExitComplete:a,custom:h,presenceAffectsLayout:u,mode:d,anchorX:c,anchorY:m,root:y}=t,v=(0,o.h)(f),g=(0,s.useId)(),x=!0,w=(0,s.useMemo)(()=>(x=!1,{id:g,initial:i,isPresent:r,custom:h,onExitComplete:t=>{for(let e of(v.set(t,!0),v.values()))if(!e)return;a&&a()},register:t=>(v.set(t,!1),()=>v.delete(t))}),[r,v,a]);return u&&x&&(w={...w}),(0,s.useMemo)(()=>{v.forEach((t,e)=>v.set(e,!1))},[r]),s.useEffect(()=>{r||v.size||!a||a()},[r]),e=(0,n.jsx)(p,{pop:"popLayout"===d,isPresent:r,anchorX:c,anchorY:m,root:y,children:e}),(0,n.jsx)(l.O.Provider,{value:w,children:e})};function f(){return new Map}var y=i(9637);let v=t=>t.key||"";function g(t){let e=[];return s.Children.forEach(t,t=>{(0,s.isValidElement)(t)&&e.push(t)}),e}let x=t=>{let{children:e,custom:i,initial:l=!0,onExitComplete:h,presenceAffectsLayout:u=!0,mode:d="sync",propagate:c=!1,anchorX:p="left",anchorY:f="top",root:x}=t,[w,k]=(0,y.oO)(c),b=(0,s.useMemo)(()=>g(e),[e]),M=c&&!w?[]:b.map(v),T=(0,s.useRef)(!0),S=(0,s.useRef)(b),P=(0,o.h)(()=>new Map),A=(0,s.useRef)(new Set),[E,V]=(0,s.useState)(b),[C,D]=(0,s.useState)(b);(0,a.L)(()=>{T.current=!1,S.current=b;for(let t=0;t{let e=v(t),s=(!c||!!w)&&(b===C||M.includes(e));return(0,n.jsx)(m,{isPresent:s,initial:(!T.current||!!l)&&void 0,custom:i,presenceAffectsLayout:u,mode:d,root:x,onExitComplete:s?void 0:()=>{if(A.current.has(e)||!P.has(e))return;A.current.add(e),P.set(e,!0);let t=!0;P.forEach(e=>{e||(t=!1)}),t&&(null==L||L(),D(S.current),c&&(null==k||k()),h&&h())},anchorX:p,anchorY:f,children:t},e)})})}},9637:function(t,e,i){i.d(e,{oO:function(){return r}});var n=i(2265),s=i(4252);function r(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],e=(0,n.useContext)(s.O);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:r,register:o}=e,a=(0,n.useId)();(0,n.useEffect)(()=>{if(t)return o(a)},[t]);let l=(0,n.useCallback)(()=>t&&r&&r(a),[a,r,t]);return!i&&r?[!1,l]:[!0]}},8881:function(t,e,i){i.d(e,{p:function(){return n}});let n=(0,i(2265).createContext)({})},5750:function(t,e,i){i.d(e,{_:function(){return n}});let n=(0,i(2265).createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"})},4252:function(t,e,i){i.d(e,{O:function(){return n}});let n=(0,i(2265).createContext)(null)},6247:function(t,e,i){let n,s,r;i.d(e,{E:function(){return r2}});let o=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],a=new Set(o),l=(t,e,i)=>i>e?e:i"number"==typeof t,parse:parseFloat,transform:t=>t},u={...h,transform:t=>l(0,1,t)},d={...h,default:1},c=t=>Math.round(1e5*t)/1e5,p=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,m=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,f=(t,e)=>i=>!!("string"==typeof i&&m.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),y=(t,e,i)=>n=>{if("string"!=typeof n)return n;let[s,r,o,a]=n.match(p);return{[t]:parseFloat(s),[e]:parseFloat(r),[i]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},v=t=>l(0,255,t),g={...h,transform:t=>Math.round(v(t))},x={test:f("rgb","red"),parse:y("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+g.transform(t)+", "+g.transform(e)+", "+g.transform(i)+", "+c(u.transform(n))+")"},w={test:f("#"),parse:function(t){let e="",i="",n="",s="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,i+=i,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}},transform:x.transform},k=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),b=k("deg"),M=k("%"),T=k("px"),S=k("vh"),P=k("vw"),A={...M,parse:t=>M.parse(t)/100,transform:t=>M.transform(100*t)},E={test:f("hsl","hue"),parse:y("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+M.transform(c(e))+", "+M.transform(c(i))+", "+c(u.transform(n))+")"},V={test:t=>x.test(t)||w.test(t)||E.test(t),parse:t=>x.test(t)?x.parse(t):E.test(t)?E.parse(t):w.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?x.transform(t):E.transform(t),getAnimatableNone:t=>{let e=V.parse(t);return e.alpha=0,V.transform(e)}},C=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,D="number",R="color",L=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function j(t){let e=t.toString(),i=[],n={color:[],number:[],var:[]},s=[],r=0,o=e.replace(L,t=>(V.test(t)?(n.color.push(r),s.push(R),i.push(V.parse(t))):t.startsWith("var(")?(n.var.push(r),s.push("var"),i.push(t)):(n.number.push(r),s.push(D),i.push(parseFloat(t))),++r,"${}")).split("${}");return{values:i,split:o,indexes:n,types:s}}function B({split:t,types:e}){let i=t.length;return n=>{let s="";for(let r=0;r"number"==typeof t?0:V.test(t)?V.getAnimatableNone(t):t,I=(t,e)=>"number"==typeof t?e?.trim().endsWith("/")?t:0:F(t),O={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(p)?.length||0)+(t.match(C)?.length||0)>0},parse:function(t){return j(t).values},createTransformer:function(t){return B(j(t))},getAnimatableNone:function(t){let e=j(t);return B(e)(e.values.map((t,i)=>I(t,e.split[i])))}},Z=new Set(["brightness","contrast","saturate","opacity"]);function z(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[n]=i.match(p)||[];if(!n)return t;let s=i.replace(n,""),r=Z.has(e)?1:0;return n!==i&&(r*=100),e+"("+r+s+")"}let U=/\b([a-z-]*)\(.*?\)/gu,W={...O,getAnimatableNone:t=>{let e=t.match(U);return e?e.map(z).join(" "):t}},N={...O,getAnimatableNone:t=>{let e=O.parse(t);return O.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},$={...h,transform:Math.round},H={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,rotate:b,rotateX:b,rotateY:b,rotateZ:b,scale:d,scaleX:d,scaleY:d,scaleZ:d,skew:b,skewX:b,skewY:b,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:u,originX:A,originY:A,originZ:T,zIndex:$,fillOpacity:u,strokeOpacity:u,numOctaves:$},q={...H,color:V,backgroundColor:V,outlineColor:V,fill:V,stroke:V,borderColor:V,borderTopColor:V,borderRightColor:V,borderBottomColor:V,borderLeftColor:V,filter:W,WebkitFilter:W,mask:N,WebkitMask:N},Y=t=>q[t],X=()=>({translate:0,scale:1,origin:0,originPoint:0}),K=()=>({x:X(),y:X()}),G=()=>({min:0,max:0}),_=()=>({x:G(),y:G()}),J=t=>!!(t&&t.getVelocity),Q=new Set(["width","height","top","left","right","bottom",...o]),tt=t=>e=>e.test(t),te=[h,T,M,b,P,S,{test:t=>"auto"===t,parse:t=>t}],ti=t=>te.find(tt(t));i(257);let tn=()=>{},ts=()=>{},tr=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),to=t=>e=>"string"==typeof e&&e.startsWith(t),ta=to("--"),tl=to("var(--"),th=t=>!!tl(t)&&tu.test(t.split("/*")[0].trim()),tu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function td(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}let tc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,tp=t=>180*t/Math.PI,tm=t=>ty(tp(Math.atan2(t[1],t[0]))),tf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:tm,rotateZ:tm,skewX:t=>tp(Math.atan(t[1])),skewY:t=>tp(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ty=t=>((t%=360)<0&&(t+=360),t),tv=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),tg=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),tx={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tv,scaleY:tg,scale:t=>(tv(t)+tg(t))/2,rotateX:t=>ty(tp(Math.atan2(t[6],t[5]))),rotateY:t=>ty(tp(Math.atan2(-t[2],t[0]))),rotateZ:tm,rotate:tm,skewX:t=>tp(Math.atan(t[4])),skewY:t=>tp(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tw(t){return t.includes("scale")?1:0}function tk(t,e){let i,n;if(!t||"none"===t)return tw(e);let s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(s)i=tx,n=s;else{let e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=tf,n=e}if(!n)return tw(e);let r=i[e],o=n[1].split(",").map(tM);return"function"==typeof r?r(o):o[r]}let tb=(t,e)=>{let{transform:i="none"}=getComputedStyle(t);return tk(i,e)};function tM(t){return parseFloat(t.trim())}let tT=t=>t===h||t===T,tS=new Set(["x","y","z"]),tP=o.filter(t=>!tS.has(t)),tA={width:({x:t},{paddingLeft:e="0",paddingRight:i="0",boxSizing:n})=>{let s=t.max-t.min;return"border-box"===n?s:s-parseFloat(e)-parseFloat(i)},height:({y:t},{paddingTop:e="0",paddingBottom:i="0",boxSizing:n})=>{let s=t.max-t.min;return"border-box"===n?s:s-parseFloat(e)-parseFloat(i)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>tk(e,"x"),y:(t,{transform:e})=>tk(e,"y")};tA.translateX=tA.x,tA.translateY=tA.y;let tE=t=>t,tV={},tC=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],tD={value:null,addProjectionMetrics:null};function tR(t,e){let i=!1,n=!0,s={delta:0,timestamp:0,isProcessing:!1},r=()=>i=!0,o=tC.reduce((t,i)=>(t[i]=function(t,e){let i=new Set,n=new Set,s=!1,r=!1,o=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1},l=0;function h(e){o.has(e)&&(u.schedule(e),t()),l++,e(a)}let u={schedule:(t,e=!1,r=!1)=>{let a=r&&s?i:n;return e&&o.add(t),a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(a=t,s){r=!0;return}s=!0;let o=i;i=n,n=o,i.forEach(h),e&&tD.value&&tD.value.frameloop[e].push(l),l=0,i.clear(),s=!1,r&&(r=!1,u.process(t))}};return u}(r,e?i:void 0),t),{}),{setup:a,read:l,resolveKeyframes:h,preUpdate:u,update:d,preRender:c,render:p,postRender:m}=o,f=()=>{let r=tV.useManualTiming,o=r?s.timestamp:performance.now();i=!1,r||(s.delta=n?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),h.process(s),u.process(s),d.process(s),c.process(s),p.process(s),m.process(s),s.isProcessing=!1,i&&e&&(n=!1,t(f))},y=()=>{i=!0,n=!0,s.isProcessing||t(f)};return{schedule:tC.reduce((t,e)=>{let n=o[e];return t[e]=(t,e=!1,s=!1)=>(i||y(),n.schedule(t,e,s)),t},{}),cancel:t=>{for(let e=0;et.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e=function(t){let e=[];return tP.forEach(i=>{let n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(i.startsWith("scale")?1:0))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tZ=!1,tO=!1,tI.forEach(t=>t.complete(tz)),tI.clear()}function tW(){tI.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tZ=!0)})}class tN{constructor(t,e,i,n,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(tI.add(this),tO||(tO=!0,tL.read(tW),tL.resolveKeyframes(tU))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;if(null===t[0]){let s=n?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(i&&e){let n=i.readValue(e,r);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=r),n&&void 0===s&&n.set(t[0])}!function(t){for(let e=1;e/^0[^.\s]+$/u.test(t),tH=new Set([W,N]);function tq(t,e){let i=Y(t);return tH.has(i)||(i=O),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let tY=new Set(["auto","none","0"]);class tX extends tN{constructor(t,e,i,n,s){super(t,e,i,n,s,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}let tK=t=>1e3*t,tG=t=>t/1e3;function t_(t,e){-1===t.indexOf(e)&&t.push(e)}function tJ(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class tQ{constructor(){this.subscriptions=[]}add(t){return t_(this.subscriptions,t),()=>tJ(this.subscriptions,t)}notify(t,e,i){let n=this.subscriptions.length;if(n){if(1===n)this.subscriptions[0](t,e,i);else for(let s=0;st.startsWith("--");function t1(t,e,i){t0(e)?t.style.setProperty(e,i):t.style[e]=i}function t2(t){let e;return()=>(void 0===e&&(e=t()),e)}let t5={};function t3(t,e){let i=t2(t);return()=>t5[e]??i()}let t4=t3(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),t9=t=>null!==t;function t6(t,{repeat:e,repeatType:i="loop"},n,s=1){let r=t.filter(t9),o=s<0||e&&"loop"!==i&&e%2==1?0:r.length-1;return o&&void 0!==n?n:r[o]}class t8{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}let t7={layout:0,mainThread:0,waapi:0},et=t=>Array.isArray(t)&&"number"==typeof t[0],ee=t3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),ei=(t,e,i=10)=>{let n="",s=Math.max(Math.round(e/i),2);for(let e=0;e`cubic-bezier(${t}, ${e}, ${i}, ${n})`,es={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:en([0,.65,.55,1]),circOut:en([.55,0,1,.45]),backIn:en([.31,.01,.66,-.59]),backOut:en([.33,1.53,.69,.99])};function er(t){return"function"==typeof t&&"applyToOptions"in t}class eo extends t8{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:e,name:i,keyframes:n,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=!!s,this.allowFlatten=r,this.options=t,ts("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:t,...e}){return er(t)&&ee()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:n=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},h){let u={[e]:i};l&&(u.offset=l);let d=function t(e,i){if(e)return"function"==typeof e?ee()?ei(e,i):"ease-out":et(e)?en(e):Array.isArray(e)?e.map(e=>t(e,i)||es.easeOut):es[e]}(a,s);Array.isArray(d)&&(u.easing=d),tD.value&&t7.waapi++;let c={delay:n,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};h&&(c.pseudoElement=h);let p=t.animate(u,c);return tD.value&&p.finished.finally(()=>{t7.waapi--}),p}(e,i,n,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let t=t6(n,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(t),t1(e,i,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){return tG(Number(this.animation.effect?.getComputedTiming?.().duration||0))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+tG(t)}get time(){return tG(Number(this.animation.currentTime)||0)}set time(t){let e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=tK(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:i,observe:n}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&t4())?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),i&&(this.animation.rangeEnd=i),tE):n(this)}}let ea=new Set(["opacity","clipPath","filter","transform"]),{schedule:el,cancel:eh}=tR(queueMicrotask,!1);function eu(){n=void 0}let ed={now:()=>(void 0===n&&ed.set(tB.isProcessing||tV.useManualTiming?tB.timestamp:performance.now()),n),set:t=>{n=t,queueMicrotask(eu)}},ec=t=>!isNaN(parseFloat(t)),ep={current:void 0};class em{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{let e=ed.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=ed.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=ec(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new tQ);let i=this.events[t].add(e);return"change"===t?()=>{i(),tL.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ep.current&&ep.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t;let e=ed.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return t=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*t:0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ef(t,e){return new em(t,e)}let ey=[...te,V,O],ev=t=>ey.find(tt(t)),eg=new WeakMap;function ex(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ew(t){return"string"==typeof t||Array.isArray(t)}let ek=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eb=["initial",...ek];function eM(t){return ex(t.animate)||eb.some(e=>ew(t[e]))}function eT(t){return!!(eM(t)||t.variants)}let eS={current:null},eP={current:!1},eA="undefined"!=typeof window;function eE(t){let e=[{},{}];return t?.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function eV(t,e,i,n){if("function"==typeof e){let[s,r]=eE(n);e=e(void 0!==i?i:t.custom,s,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[s,r]=eE(n);e=e(void 0!==i?i:t.custom,s,r)}return e}let eC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],eD={};class eR{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,skipAnimations:s,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=tN,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=ed.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(eP.current||function(){if(eP.current=!0,eA){if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>eS.current=t.matches;t.addEventListener("change",e),e()}else eS.current=!1}}(),this.shouldReduceMotion=eS.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let t in this.projection&&this.projection.unmount(),tj(this.notifyUpdate),tj(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){let i;if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&ea.has(t)&&this.current instanceof HTMLElement){let{factory:i,keyframes:n,times:s,ease:r,duration:o}=e.accelerate,a=new eo({element:this.current,name:t,keyframes:n,times:s,ease:r,duration:tK(o)}),l=i(a);this.valueSubscriptions.set(t,()=>{l(),a.cancel()});return}let n=a.has(t);n&&this.onBindTransform&&this.onBindTransform();let s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&tL.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in eD){let e=eD[t];if(!e)continue;let{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=ef(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(tr(i)||t$(i))?i=parseFloat(i):!ev(i)&&O.test(e)&&(i=tq(t,e)),this.setBaseTarget(t,J(i)?i.get():i)),J(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let e;let{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let n=eV(this.props,i,this.presenceContext?.custom);n&&(e=n[t])}if(i&&void 0!==e)return e;let n=this.getBaseTargetFromProps(this.props,t);return void 0===n||J(n)?void 0!==this.initialValues[t]&&void 0===e?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new tQ),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){el.render(this.render)}}class eL extends eR{constructor(){super(...arguments),this.KeyframeResolver=tX}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){let i=t.style;return i?i[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;J(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function ej(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}let eB=(t,e)=>e&&"number"==typeof t?e.transform(t):t,eF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eI=o.length;function eO(t,e,i){let{style:n,vars:s,transformOrigin:r}=t,l=!1,h=!1;for(let t in e){let i=e[t];if(a.has(t)){l=!0;continue}if(ta(t)){s[t]=i;continue}{let e=eB(i,H[t]);t.startsWith("origin")?(h=!0,r[t]=e):n[t]=e}}if(!e.transform&&(l||i?n.transform=function(t,e,i){let n="",s=!0;for(let r=0;r"string"==typeof t&&"svg"===t.toLowerCase();function eH(t,{style:e,vars:i},n,s){let r;let o=t.style;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,n),i)o.setProperty(r,i[r])}function eq(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let eY={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!T.test(t))return t;t=parseFloat(t)}let i=eq(t,e.target.x),n=eq(t,e.target.y);return`${i}% ${n}%`}},eX=(t,e,i)=>t+(e-t)*i,eK={borderRadius:{...eY,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:eY,borderTopRightRadius:eY,borderBottomLeftRadius:eY,borderBottomRightRadius:eY,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let n=O.parse(t);if(n.length>5)return t;let s=O.createTransformer(t),r="number"!=typeof n[0]?1:0,o=i.x.scale*e.x,a=i.y.scale*e.y;n[0+r]/=o,n[1+r]/=a;let l=eX(o,a,.5);return"number"==typeof n[2+r]&&(n[2+r]/=l),"number"==typeof n[3+r]&&(n[3+r]/=l),s(n)}}};function eG(t,{layout:e,layoutId:i}){return a.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!eK[t]||"opacity"===t)}function e_(t,e,i){let n=t.style,s=e?.style,r={};if(!n)return r;for(let e in n)(J(n[e])||s&&J(s[e])||eG(e,t)||i?.getValue(e)?.liveStyle!==void 0)&&(r[e]=n[e]);return r}function eJ(t,e,i){let n=e_(t,e,i);for(let i in t)(J(t[i])||J(e[i]))&&(n[-1!==o.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return n}class eQ extends eL{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(a.has(e)){let t=Y(e);return t&&t.default||0}return e=eN.has(e)?e:ej(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return eJ(t,e,i)}build(t,e,i){eW(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){!function(t,e,i,n){for(let i in eH(t,e,void 0,n),e.attrs)t.setAttribute(eN.has(i)?i:ej(i),e.attrs[i])}(t,e,0,n)}mount(t){this.isSVGTag=e$(t.tagName),super.mount(t)}}function e0({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function e1(t){return void 0===t||1===t}function e2({scale:t,scaleX:e,scaleY:i}){return!e1(t)||!e1(e)||!e1(i)}function e5(t){return e2(t)||e3(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function e3(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function e4(t,e,i,n,s){return void 0!==s&&(t=n+s*(t-n)),n+i*(t-n)+e}function e9(t,e=0,i=1,n,s){t.min=e4(t.min,e,i,n,s),t.max=e4(t.max,e,i,n,s)}function e6(t,{x:e,y:i}){e9(t.x,e.translate,e.scale,e.originPoint),e9(t.y,i.translate,i.scale,i.originPoint)}function e8(t,e){t.min+=e,t.max+=e}function e7(t,e,i,n,s=.5){let r=eX(t.min,t.max,s);e9(t,e,i,r,n)}function it(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function ie(t,e,i){let n=i??t;e7(t.x,it(e.x,n.x),e.scaleX,e.scale,e.originX),e7(t.y,it(e.y,n.y),e.scaleY,e.scale,e.originY)}function ii(t,e){return e0(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}class is extends eL{constructor(){super(...arguments),this.type="html",this.renderInstance=eH}readValueFromInstance(t,e){if(a.has(e))return this.projection?.isProjecting?tw(e):tb(t,e);{let i=window.getComputedStyle(t),n=(ta(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return ii(t,e)}build(t,e,i){eO(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return e_(t,e,i)}}var ir,io=i(2265);let ia=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function il(t){if("string"!=typeof t||t.includes("-"));else if(ia.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}var ih=i(7437),iu=i(8881);let id=(0,io.createContext)({strict:!1});var ic=i(5750);let ip=(0,io.createContext)({});function im(t){return Array.isArray(t)?t.join(" "):t}let iy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function iv(t,e,i){for(let n in e)J(e[n])||eG(n,i)||(t[n]=e[n])}let ig=()=>({...iy(),attrs:{}}),ix=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function iw(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ix.has(t)}let ik=t=>!iw(t);try{ir=require("@emotion/is-prop-valid").default,"function"==typeof ir&&(ik=t=>t.startsWith("on")?!iw(t):ir(t))}catch{}function ib(t){return J(t)?t.get():t}var iM=i(4252),iT=i(3576);let iS=t=>(e,i)=>{let n=(0,io.useContext)(ip),s=(0,io.useContext)(iM.O),r=()=>(function(t,e,i,n){let{scrapeMotionValuesFromProps:s,createRenderState:r}=t;return{latestValues:function(t,e,i,n){let s={},r=n(t,{});for(let t in r)s[t]=ib(r[t]);let{initial:o,animate:a}=t,l=eM(t),h=eT(t);e&&h&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let u=!!i&&!1===i.initial,d=(u=u||!1===o)?a:o;if(d&&"boolean"!=typeof d&&!ex(d)){let e=Array.isArray(d)?d:[d];for(let i=0;iiE[e].some(e=>!!t[e])};eD=t,iV=!0}(),eD}let iD=Symbol.for("motionComponentSymbol"),iR="data-"+ej("framerAppearId"),iL=(0,io.createContext)({});function ij(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}var iB=i(2014);function iF(t){var e,i;let{forwardMotionProps:n=!1,type:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;r&&function(t){let e=iC();for(let i in t)e[i]={...e[i],...t[i]};eD=e}(r);let a=s?"svg"===s:il(t),l=a?iA:iP;function h(e,i){let s;let r={...(0,io.useContext)(ic._),...e,layoutId:function(t){let{layoutId:e}=t,i=(0,io.useContext)(iu.p).id;return i&&void 0!==e?i+"-"+e:e}(e)},{isStatic:h}=r,u=function(t){let{initial:e,animate:i}=function(t,e){if(eM(t)){let{initial:e,animate:i}=t;return{initial:!1===e||ew(e)?e:void 0,animate:ew(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,io.useContext)(ip));return(0,io.useMemo)(()=>({initial:e,animate:i}),[im(e),im(i)])}(e),d=l(e,h);if(!h&&"undefined"!=typeof window){(0,io.useContext)(id).strict;let e=function(t){let{drag:e,layout:i}=iC();if(!e&&!i)return{};let n={...e,...i};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==i?void 0:i.isEnabled(t))?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(r);s=e.MeasureLayout,u.visualElement=function(t,e,i,n,s,r){var o,a,l,h;let{visualElement:u}=(0,io.useContext)(ip),d=(0,io.useContext)(id),c=(0,io.useContext)(iM.O),p=(0,io.useContext)(ic._),m=p.reducedMotion,f=p.skipAnimations,y=(0,io.useRef)(null),v=(0,io.useRef)(!1);n=n||d.renderer,!y.current&&n&&(y.current=n(t,{visualState:e,parent:u,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:m,skipAnimations:f,isSVG:r}),v.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));let g=y.current,x=(0,io.useContext)(iL);g&&!g.projection&&s&&("html"===g.type||"svg"===g.type)&&function(t,e,i,n){let{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:h,layoutAnchor:u,layoutCrossfade:d}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!o||a&&ij(a),visualElement:t,animationType:"string"==typeof r?r:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:l,layoutRoot:h,layoutAnchor:u})}(y.current,i,s,x);let w=(0,io.useRef)(!1);(0,io.useInsertionEffect)(()=>{g&&w.current&&g.update(i,c)});let k=i[iR],b=(0,io.useRef)(!!k&&"undefined"!=typeof window&&!(null===(o=(a=window).MotionHandoffIsComplete)||void 0===o?void 0:o.call(a,k))&&(null===(l=(h=window).MotionHasOptimisedAnimation)||void 0===l?void 0:l.call(h,k)));return(0,iB.L)(()=>{v.current=!0,g&&(w.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),b.current&&g.animationState&&g.animationState.animateChanges())}),(0,io.useEffect)(()=>{g&&(!b.current&&g.animationState&&g.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var t,e;null===(t=(e=window).MotionHandoffMarkAsComplete)||void 0===t||t.call(e,k)}),b.current=!1),g.enteringChildren=void 0)}),g}(t,d,r,o,e.ProjectionNode,a)}return(0,ih.jsxs)(ip.Provider,{value:u,children:[s&&u.visualElement?(0,ih.jsx)(s,{visualElement:u.visualElement,...r}):null,function(t,e,i,n,s){let{latestValues:r}=n,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,l=((null!=a?a:il(t))?function(t,e,i,n){let s=(0,io.useMemo)(()=>{let i=ig();return eW(i,e,e$(n),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};iv(e,t.style,t),s.style={...e,...s.style}}return s}:function(t,e){let i={},n=function(t,e){let i=t.style||{},n={};return iv(n,i,t),Object.assign(n,function(t,e){let{transformTemplate:i}=t;return(0,io.useMemo)(()=>{let t=iy();return eO(t,e,i),Object.assign({},t.vars,t.style)},[e])}(t,e)),n}(t,e);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===t.drag?"none":"pan-".concat("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=n,i})(e,r,s,t),h=function(t,e,i){let n={};for(let s in t)("values"!==s||"object"!=typeof t.values)&&!J(t[s])&&(ik(s)||!0===i&&iw(s)||!e&&!iw(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}(e,"string"==typeof t,o),u=t!==io.Fragment?{...h,...l,ref:i}:{},{children:d}=e,c=(0,io.useMemo)(()=>J(d)?d.get():d,[d]);return(0,io.createElement)(t,{...u,children:c})}(t,e,function(t,e,i){let n=(0,io.useRef)(i);(0,io.useInsertionEffect)(()=>{n.current=i});let s=(0,io.useRef)(null);return(0,io.useCallback)(i=>{if(i){var r;null===(r=t.onMount)||void 0===r||r.call(t,i)}let o=n.current;if("function"==typeof o){if(i){let t=o(i);"function"==typeof t&&(s.current=t)}else s.current?(s.current(),s.current=null):o(i)}else o&&(o.current=i);e&&(i?e.mount(i):e.unmount())},[e])}(d,u.visualElement,i),d,h,n,a)]})}h.displayName="motion.".concat("string"==typeof t?t:"create(".concat(null!==(i=null!==(e=t.displayName)&&void 0!==e?e:t.name)&&void 0!==i?i:"",")"));let u=(0,io.forwardRef)(h);return u[iD]=t,u}class iI{constructor(t){this.isMounted=!1,this.node=t}update(){}}function iO(t,e,i){let n=t.getProps();return eV(n,e,void 0!==i?i:n.custom,t)}function iZ(t,e){if(t?.inherit&&e){let{inherit:i,...n}=t;return{...e,...n}}return t}function iz(t,e){let i=t?.[e]??t?.default??t;return i!==t?iZ(i,t):i}let iU=t=>Array.isArray(t);function iW(t,e){let i=t.getValue("willChange");if(J(i)&&i.add)return i.add(e);if(!i&&tV.WillChange){let i=new tV.WillChange("auto");t.addValue("willChange",i),i.add(e)}}let iN=(t,e)=>i=>e(t(i)),i$=(...t)=>t.reduce(iN);function iH(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function iq(t,e){return i=>i>0?e:t}let iY=(t,e,i)=>{let n=t*t,s=i*(e*e-n)+n;return s<0?0:Math.sqrt(s)},iX=[w,x,E],iK=t=>iX.find(e=>e.test(t));function iG(t){let e=iK(t);if(tn(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let i=e.parse(t);return e===E&&(i=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let s=0,r=0,o=0;if(e/=100){let n=i<.5?i*(1+e):i+e-i*e,a=2*i-n;s=iH(a,n,t+1/3),r=iH(a,n,t),o=iH(a,n,t-1/3)}else s=r=o=i;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:n}}(i)),i}let i_=(t,e)=>{let i=iG(t),n=iG(e);if(!i||!n)return iq(t,e);let s={...i};return t=>(s.red=iY(i.red,n.red,t),s.green=iY(i.green,n.green,t),s.blue=iY(i.blue,n.blue,t),s.alpha=eX(i.alpha,n.alpha,t),x.transform(s))},iJ=new Set(["none","hidden"]);function iQ(t,e){return i=>eX(t,e,i)}function i0(t){return"number"==typeof t?iQ:"string"==typeof t?th(t)?iq:V.test(t)?i_:i5:Array.isArray(t)?i1:"object"==typeof t?V.test(t)?i_:i2:iq}function i1(t,e){let i=[...t],n=i.length,s=t.map((t,i)=>i0(t)(t,e[i]));return t=>{for(let e=0;e{for(let e in n)i[e]=n[e](t);return i}}let i5=(t,e)=>{let i=O.createTransformer(e),n=j(t),s=j(e);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?iJ.has(t)&&!s.values.length||iJ.has(e)&&!n.values.length?iJ.has(t)?i=>i<=0?t:e:i=>i>=1?e:t:i$(i1(function(t,e){let i=[],n={color:0,var:0,number:0};for(let s=0;s{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>tL.update(e,t),stop:()=>tj(e),now:()=>tB.isProcessing?tB.timestamp:ed.now()}};function i9(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}let i6={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function i8(t,e){return t*Math.sqrt(1-e*e)}let i7=["duration","bounce"],nt=["stiffness","damping","mass"];function ne(t,e){return e.some(e=>void 0!==t[e])}function ni(t=i6.visualDuration,e=i6.bounce){let i,n,s,r,o,a;let h="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:u,restDelta:d}=h,c=h.keyframes[0],p=h.keyframes[h.keyframes.length-1],m={done:!1,value:c},{stiffness:f,damping:y,mass:v,duration:g,velocity:x,isResolvedFromDuration:w}=function(t){let e={velocity:i6.velocity,stiffness:i6.stiffness,damping:i6.damping,mass:i6.mass,isResolvedFromDuration:!1,...t};if(!ne(t,nt)&&ne(t,i7)){if(e.velocity=0,t.visualDuration){let i=2*Math.PI/(1.2*t.visualDuration),n=i*i,s=2*l(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:i6.mass,stiffness:n,damping:s}}else{let i=function({duration:t=i6.duration,bounce:e=i6.bounce,velocity:i=i6.velocity,mass:n=i6.mass}){let s,r;tn(t<=tK(i6.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=l(i6.minDamping,i6.maxDamping,o),t=l(i6.minDuration,i6.maxDuration,tG(t)),o<1?(s=e=>{let n=e*o,s=n*t;return .001-(n-i)/i8(e,o)*Math.exp(-s)},r=e=>{let n=e*o*t,r=Math.pow(o,2)*Math.pow(e,2)*t,a=i8(Math.pow(e,2),o);return(n*i+i-r)*Math.exp(-n)*(-s(e)+.001>0?-1:1)/a}):(s=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),r=e=>t*t*(i-e)*Math.exp(-e*t));let a=function(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}(s,r,5/t);if(t=tK(t),isNaN(a))return{stiffness:i6.stiffness,damping:i6.damping,duration:t};{let e=Math.pow(a,2)*n;return{stiffness:e,damping:2*o*Math.sqrt(n*e),duration:t}}}({...t,velocity:0});(e={...e,...i,mass:i6.mass}).isResolvedFromDuration=!0}}return e}({...h,velocity:-tG(h.velocity||0)}),k=x||0,b=y/(2*Math.sqrt(f*v)),M=p-c,T=tG(Math.sqrt(f/v)),S=5>Math.abs(M);if(u||(u=S?i6.restSpeed.granular:i6.restSpeed.default),d||(d=S?i6.restDelta.granular:i6.restDelta.default),b<1)s=i8(T,b),r=(k+b*T*M)/s,i=t=>p-Math.exp(-b*T*t)*(r*Math.sin(s*t)+M*Math.cos(s*t)),o=b*T*r+M*s,a=b*T*M-r*s,n=t=>Math.exp(-b*T*t)*(o*Math.sin(s*t)+a*Math.cos(s*t));else if(1===b){i=t=>p-Math.exp(-T*t)*(M+(k+T*M)*t);let t=k+T*M;n=e=>Math.exp(-T*e)*(T*t*e-k)}else{let t=T*Math.sqrt(b*b-1);i=e=>{let i=Math.exp(-b*T*e),n=Math.min(t*e,300);return p-i*((k+b*T*M)*Math.sinh(n)+t*M*Math.cosh(n))/t};let e=(k+b*T*M)/t,s=b*T*e-M*t,r=b*T*M-e*t;n=e=>{let i=Math.exp(-b*T*e),n=Math.min(t*e,300);return i*(s*Math.sinh(n)+r*Math.cosh(n))}}let P={calculatedDuration:w&&g||null,velocity:t=>tK(n(t)),next:t=>{if(!w&&b<1){let e=Math.exp(-b*T*t),i=Math.sin(s*t),n=Math.cos(s*t),l=p-e*(r*i+M*n),h=tK(e*(o*i+a*n));return m.done=Math.abs(h)<=u&&Math.abs(p-l)<=d,m.value=m.done?p:l,m}let e=i(t);if(w)m.done=t>=g;else{let i=tK(n(t));m.done=Math.abs(i)<=u&&Math.abs(p-e)<=d}return m.value=m.done?p:e,m},toString:()=>{let t=Math.min(i9(P),2e4),e=ei(e=>P.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return P}function nn(t,e,i){var n,s;let r=Math.max(e-5,0);return n=i-t(r),(s=e-r)?1e3/s*n:0}function ns({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:h=.5,restSpeed:u}){let d,c;let p=t[0],m={done:!1,value:p},f=t=>void 0!==a&&tl,y=t=>void 0===a?l:void 0===l?a:Math.abs(a-t)-v*Math.exp(-t/n),k=t=>x+w(t),b=t=>{let e=w(t),i=k(t);m.done=Math.abs(e)<=h,m.value=m.done?x:i},M=t=>{f(m.value)&&(d=t,c=ni({keyframes:[m.value,y(m.value)],velocity:nn(k,t,m.value),damping:s,stiffness:r,restDelta:h,restSpeed:u}))};return M(0),{calculatedDuration:null,next:t=>{let e=!1;return(c||void 0!==d||(e=!0,b(t),M(t)),void 0!==d&&t>=d)?c.next(t-d):(e||b(t),m)}}}ni.applyToOptions=t=>{let e=function(t,e=100,i){let n=i({...t,keyframes:[0,e]}),s=Math.min(i9(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:tG(s)}}(t,100,ni);return t.ease=e.ease,t.duration=tK(e.duration),t.type="keyframes",t};let nr=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function no(t,e,i,n){if(t===e&&i===n)return tE;let s=e=>(function(t,e,i,n,s){let r,o;let a=0;do(r=nr(o=e+(i-e)/2,n,s)-t)>0?i=o:e=o;while(Math.abs(r)>1e-7&&++a<12);return o})(e,0,1,t,i);return t=>0===t||1===t?t:nr(s(t),e,n)}let na=no(.42,0,1,1),nl=no(0,0,.58,1),nh=no(.42,0,.58,1),nu=t=>Array.isArray(t)&&"number"!=typeof t[0],nd=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,nc=t=>e=>1-t(1-e),np=no(.33,1.53,.69,.99),nm=nc(np),nf=nd(nm),ny=t=>t>=1?1:(t*=2)<1?.5*nm(t):.5*(2-Math.pow(2,-10*(t-1))),nv=t=>1-Math.sin(Math.acos(t)),ng=nc(nv),nx=nd(nv),nw={linear:tE,easeIn:na,easeInOut:nh,easeOut:nl,circIn:nv,circInOut:nx,circOut:ng,backIn:nm,backInOut:nf,backOut:np,anticipate:ny},nk=t=>"string"==typeof t,nb=t=>{if(et(t)){ts(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,i,n,s]=t;return no(e,i,n,s)}return nk(t)?(ts(void 0!==nw[t],`Invalid easing type '${t}'`,"invalid-easing-type"),nw[t]):t},nM=(t,e,i)=>{let n=e-t;return 0===n?1:(i-t)/n};function nT({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){let s=nu(n)?n.map(nb):nb(n),r={done:!1,value:e[0]},o=function(t,e,{clamp:i=!0,ease:n,mixer:s}={}){let r=t.length;if(ts(r===e.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>e[0];if(2===r&&e[0]===e[1])return()=>e[1];let o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=function(t,e,i){let n=[],s=i||tV.mix||i3,r=t.length-1;for(let i=0;i{if(o&&i1)for(;nu(l(t[0],t[r-1],e)):u}((i&&i.length===e.length?i:function(t){let e=[0];return function(t,e){let i=t[t.length-1];for(let n=1;n<=e;n++){let s=nM(0,e,n);t.push(eX(i,1,s))}}(e,t.length-1),e}(e)).map(e=>e*t),e,{ease:Array.isArray(s)?s:e.map(()=>s||nh).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}let nS={decay:ns,inertia:ns,tween:nT,keyframes:nT,spring:ni};function nP(t){"string"==typeof t.type&&(t.type=nS[t.type])}let nA=t=>t/100;class nE extends t8{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==ed.now()&&this.tick(ed.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},t7.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){let{options:t}=this;nP(t);let{type:e=nT,repeat:i=0,repeatDelay:n=0,repeatType:s,velocity:r=0}=t,{keyframes:o}=t,a=e||nT;a!==nT&&"number"!=typeof o[0]&&(this.mixKeyframes=i$(nA,i3(o[0],o[1])),o=[0,100]);let l=a({...t,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=i9(l));let{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let i;let{generator:n,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:h}=this;if(null===this.startTime)return n.next(0);let{delay:u=0,keyframes:d,repeat:c,repeatType:p,repeatDelay:m,type:f,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let w=this.currentTime,k=n;if(c){let t=Math.min(this.currentTime,s)/a,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,c+1))%2&&("reverse"===p?(i=1-i,m&&(i-=m/a)):"mirror"===p&&(k=o)),w=l(0,1,i)*a}x?(this.delayState.value=d[0],i=this.delayState):i=k.next(w),r&&!x&&(i.value=r(i.value));let{done:b}=i;x||null===h||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);let M=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return M&&f!==ns&&(i.value=t6(d,this.options,v,this.speed)),y&&y(i.value),M&&this.finish(),i}then(t,e){return this.finished.then(t,e)}get duration(){return tG(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+tG(t)}get time(){return tG(this.currentTime)}set time(t){t=tK(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){let t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let e=this.generator.next(t).value;return nn(t=>this.generator.next(t).value,t,e)}get speed(){return this.playbackSpeed}set speed(t){let e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(ed.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=tG(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=i4,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ed.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,t7.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}let nV={anticipate:ny,backInOut:nf,circInOut:nx};class nC extends eo{constructor(t){"string"==typeof t.ease&&t.ease in nV&&(t.ease=nV[t.ease]),nP(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:n,element:s,...r}=this.options;if(!e)return;if(void 0!==t){e.set(t);return}let o=new nE({...r,autoplay:!1}),a=Math.max(10,ed.now()-this.startTime),h=l(0,10,a-10),u=o.sample(a).value,{name:d}=this.options;s&&d&&t1(s,d,u),e.setWithVelocity(o.sample(Math.max(0,a-h)).value,u,h),o.stop()}}let nD=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(O.test(t)||"0"===t)&&!t.startsWith("url("));function nR(t){t.duration=0,t.type="keyframes"}let nL=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,nj=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),nB=t2(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class nF extends t8{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r="loop",keyframes:o,name:a,motionValue:l,element:h,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ed.now();let d={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:s,repeatType:r,name:a,motionValue:l,element:h,...u},c=h?.KeyframeResolver||tN;this.keyframeResolver=new c(o,(t,e,i)=>this.onKeyframesResolved(t,e,d,!i),a,l,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,n){let s;this.keyframeResolver=void 0;let{name:r,type:o,velocity:a,delay:l,isHandoff:h,onUpdate:u}=i;this.resolvedAt=ed.now();let d=!0;!function(t,e,i,n){let s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;let r=t[t.length-1],o=nD(s,e),a=nD(r,e);return tn(o===a,`You are trying to animate ${e} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!!o&&!!a&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},p=d&&!h&&function(t){let{motionValue:e,name:i,repeatDelay:n,repeatType:s,damping:r,type:o,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:h}=e.owner.getProps();return nB()&&i&&(ea.has(i)||nj.has(i)&&function(t){for(let e=0;e{this.notifyFinished()}).catch(tE),this.pendingTimeline&&(this.stopTimeline=s.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=s}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tz=!0,tW(),tU(),tz=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let nI={type:"spring",stiffness:500,damping:25,restSpeed:10},nO=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),nZ={type:"keyframes",duration:.8},nz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nU=(t,{keyframes:e})=>e.length>2?nZ:a.has(t)?t.startsWith("scale")?nO(e[1]):nI:nz,nW=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),nN=(t,e,i,n={},s,r)=>o=>{let a=iz(n,t)||{},l=a.delay||n.delay||0,{elapsed:h=0}=n;h-=tK(l);let u={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};!function(t){for(let e in t)if(!nW.has(e))return!0;return!1}(a)&&Object.assign(u,nU(t,u)),u.duration&&(u.duration=tK(u.duration)),u.repeatDelay&&(u.repeatDelay=tK(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if(!1!==u.type&&(0!==u.duration||u.repeatDelay)||(nR(u),0!==u.delay||(d=!0)),(tV.instantAnimations||tV.skipAnimations||s?.shouldSkipAnimations)&&(d=!0,nR(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!r&&void 0!==e.get()){let t=t6(u.keyframes,a);if(void 0!==t){tL.update(()=>{u.onUpdate(t),u.onComplete()});return}}return a.isSync?new nE(u):new nF(u)};function n$(t,e,{delay:i=0,transitionOverride:n,type:s}={}){let{transition:r,transitionEnd:o,...a}=e,l=t.getDefaultTransition();r=r?iZ(r,l):l;let h=r?.reduceMotion;n&&(r=n);let u=[],d=s&&t.animationState&&t.animationState.getState()[s];for(let e in a){let n=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&function({protectedKeys:t,needsAnimating:e},i){let n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}(d,e))continue;let o={delay:i,...iz(r||{},e)},l=n.get();if(void 0!==l&&!n.isAnimating()&&!Array.isArray(s)&&s===l&&!o.velocity){tL.update(()=>n.set(s));continue}let c=!1;if(window.MotionHandoffAnimation){let i=t.props[iR];if(i){let t=window.MotionHandoffAnimation(i,e,tL);null!==t&&(o.startTime=t,c=!0)}}iW(t,e);let p=h??t.shouldReduceMotion;n.start(nN(e,n,s,p&&Q.has(e)?{type:!1}:o,t,c));let m=n.animation;m&&u.push(m)}if(o){let e=()=>tL.update(()=>{o&&function(t,e){let{transitionEnd:i={},transition:n={},...s}=iO(t,e)||{};for(let e in s={...s,...i}){var r;let i=iU(r=s[e])?r[r.length-1]||0:r;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,ef(i))}}(t,o)});u.length?Promise.all(u).then(e):e()}return u}function nH(t,e,i,n=0,s=1){let r=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*n;return"function"==typeof i?i(r,o):1===s?r*n:a-r*n}function nq(t,e,i={}){let n=iO(t,e,"exit"===i.type?t.presenceContext?.custom:void 0),{transition:s=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(s=i.transitionOverride);let r=n?()=>Promise.all(n$(t,n,i)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(n=0)=>{let{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,i=0,n=0,s=0,r=1,o){let a=[];for(let l of t.variantChildren)l.notify("AnimationStart",e),a.push(nq(l,e,{...o,delay:i+("function"==typeof n?0:n)+nH(t.variantChildren,l,n,s,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,n,r,o,a,i)}:()=>Promise.resolve(),{when:a}=s;if(!a)return Promise.all([r(),o(i.delay)]);{let[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}}let nY=eb.length;function nX(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;nPromise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e))n=Promise.all(e.map(e=>nq(t,e,i)));else if("string"==typeof e)n=nq(t,e,i);else{let s="function"==typeof e?iO(t,e,i.custom):e;n=Promise.all(n$(t,s,i))}return n.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=nJ(),n=!0,s=!1,r=e=>(i,n)=>{let s=iO(t,n,"exit"===e?t.presenceContext?.custom:void 0);if(s){let{transition:t,transitionEnd:e,...n}=s;i={...i,...n,...e}}return i};function o(o){let{props:a}=t,l=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;tc&&v,b=!1,M=Array.isArray(y)?y:[y],T=M.reduce(r(m),{});!1===g&&(T={});let{prevResolvedValues:S={}}=f,P={...S,...T},A=e=>{k=!0,u.has(e)&&(b=!0,u.delete(e)),f.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in P){let e=T[t],i=S[t];if(!d.hasOwnProperty(t))(iU(e)&&iU(i)?nX(e,i):e===i)?void 0!==e&&u.has(t)?A(t):f.protectedKeys[t]=!0:null!=e?A(t):u.add(t)}f.prevProp=y,f.prevResolvedValues=T,f.isActive&&(d={...d,...T}),(n||s)&&t.blockInitialAnimation&&(k=!1);let E=x&&w,V=!E||b;k&&V&&h.push(...M.map(e=>{let i={type:m};if("string"==typeof e&&(n||s)&&!E&&t.manuallyAnimateOnMount&&t.parent){let{parent:n}=t,s=iO(n,e);if(n.enteringChildren&&s){let{delayChildren:e}=s.transition||{};i.delay=nH(n.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(u.size){let e={};if("boolean"!=typeof a.initial){let i=iO(t,Array.isArray(a.initial)?a.initial[0]:a.initial);i&&i.transition&&(e.transition=i.transition)}u.forEach(i=>{let n=t.getBaseTarget(i),s=t.getValue(i);s&&(s.liveStyle=!0),e[i]=n??null}),h.push({animation:e})}let m=!!h.length;return n&&(!1===a.initial||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(m=!1),n=!1,s=!1,m?e(h):Promise.resolve()}return{animateChanges:o,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;let s=o(e);for(let t in i)i[t].protectedKeys={};return s},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=nJ(),s=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();ex(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let n0=0;class n1 extends iI{constructor(){super(...arguments),this.id=n0++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&!1===i){if(this.isExitComplete){let{initial:t,custom:e}=this.node.getProps();if("string"==typeof t){let i=iO(this.node,t,e);if(i){let{transition:t,transitionEnd:e,...n}=i;for(let t in n)this.node.getValue(t)?.jump(n[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}let n2={x:!1,y:!1};function n5(t){return[t("x"),t("y")]}function n3(t){return t.max-t.min}function n4(t,e,i,n=.5){t.origin=n,t.originPoint=eX(e.min,e.max,t.origin),t.scale=n3(i)/n3(e),t.translate=eX(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function n9(t,e,i,n){n4(t.x,e.x,i.x,n?n.originX:void 0),n4(t.y,e.y,i.y,n?n.originY:void 0)}function n6(t,e,i,n=0){let s=n?eX(i.min,i.max,n):i.min;t.min=s+e.min,t.max=t.min+n3(e)}function n8(t,e,i,n=0){let s=n?eX(i.min,i.max,n):i.min;t.min=e.min-s,t.max=t.min+n3(e)}function n7(t,e,i,n){n8(t.x,e.x,i.x,n?.x),n8(t.y,e.y,i.y,n?.y)}let st=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),se=new Set(["INPUT","SELECT","TEXTAREA"]);function si(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}var sn=i(1464);function ss(t){return(0,sn.K)(t)&&"ownerSVGElement"in t}function sr(t,e,i){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let n=document;e&&(n=e.current);let s=i?.[t]??n.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}let so=new WeakMap,sa=(t,e,i)=>(n,s)=>s&&s[0]?s[0][t+"Size"]:ss(n)&&"getBBox"in n?n.getBBox()[e]:n[i],sl=sa("inline","width","offsetWidth"),sh=sa("block","height","offsetHeight");function su({target:t,borderBoxSize:e}){so.get(t)?.forEach(i=>{i(t,{get width(){return sl(t,e)},get height(){return sh(t,e)}})})}function sd(t){t.forEach(su)}let sc=new Set;function sp(t,e){return"function"==typeof t?(sc.add(t),r||(r=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};sc.forEach(e=>e(t))},window.addEventListener("resize",r)),()=>{sc.delete(t),sc.size||"function"!=typeof r||(window.removeEventListener("resize",r),r=void 0)}):function(t,e){s||"undefined"==typeof ResizeObserver||(s=new ResizeObserver(sd));let i=sr(t);return i.forEach(t=>{let i=so.get(t);i||(i=new Set,so.set(t,i)),i.add(e),s?.observe(t)}),()=>{i.forEach(t=>{let i=so.get(t);i?.delete(e),i?.size||s?.unobserve(t)})}}(t,e)}let sm=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function sf(t){return{point:{x:t.pageX,y:t.pageY}}}let sy=t=>e=>sm(e)&&t(e,sf(e));function sv(t,e,i,n){return si(t,e,sy(i),n)}let sg=({current:t})=>t?t.ownerDocument.defaultView:null,sx=(t,e)=>Math.abs(t-e),sw=new Set(["auto","scroll"]);class sk{constructor(t,e,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:s=!1,distanceThreshold:r=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var t,e;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=sb(this.lastRawMoveEventInfo,this.transformPagePoint));let i=sT(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,s=(t=i.offset,e={x:0,y:0},Math.sqrt(sx(t.x,e.x)**2+sx(t.y,e.y)**2)>=this.distanceThreshold);if(!n&&!s)return;let{point:r}=i,{timestamp:o}=tB;this.history.push({...r,timestamp:o});let{onStart:a,onMove:l}=this.handlers;n||(a&&a(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=sb(e,this.transformPagePoint),tL.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:s}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&s&&s(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=sT("pointercancel"===t.type?this.lastMoveEventInfo:sb(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,r),n&&n(t,r)},!sm(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=n||window;let a=sb(sf(t),this.transformPagePoint),{point:l}=a,{timestamp:h}=tB;this.history=[{...l,timestamp:h}];let{onSessionStart:u}=e;u&&u(t,sT(a,this.history)),this.removeListeners=i$(sv(this.contextWindow,"pointermove",this.handlePointerMove),sv(this.contextWindow,"pointerup",this.handlePointerUp),sv(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(t){let e=t.parentElement;for(;e;){let t=getComputedStyle(e);(sw.has(t.overflowX)||sw.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){let e=this.scrollPositions.get(t);if(!e)return;let i=t===window,n=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:n.x-e.x,y:n.y-e.y};(0!==s.x||0!==s.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,n),tL.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),tj(this.updatePoint)}}function sb(t,e){return e?{point:e(t.point)}:t}function sM(t,e){return{x:t.x-e.x,y:t.y-e.y}}function sT({point:t},e){return{point:t,delta:sM(t,sS(e)),offset:sM(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null,s=sS(t);for(;i>=0&&(n=t[i],!(s.timestamp-n.timestamp>tK(.1)));)i--;if(!n)return{x:0,y:0};n===t[0]&&t.length>2&&s.timestamp-n.timestamp>2*tK(.1)&&(n=t[1]);let r=tG(s.timestamp-n.timestamp);if(0===r)return{x:0,y:0};let o={x:(s.x-n.x)/r,y:(s.y-n.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(e,.1)}}function sS(t){return t[t.length-1]}function sP(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function sA(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min{e&&this.snapToCursor(sf(t).point),this.stopAnimation()},onStart:(t,e)=>{let{drag:i,dragPropagation:n,onDragStart:s}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===i||"y"===i?n2[i]?null:(n2[i]=!0,()=>{n2[i]=!1}):n2.x||n2.y?null:(n2.x=n2.y=!0,()=>{n2.x=n2.y=!1}),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),n5(t=>{let e=this.getAxisMotionValue(t).get()||0;if(M.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let n=i.layout.layoutBox[t];if(n){let t=n3(n);e=parseFloat(e)/100*t}}}this.originPoint[t]=e}),s&&tL.update(()=>s(t,e),!1,!0),iW(this.visualElement,"transform");let{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:s,onDrag:r}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:o}=e;if(n&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(o),null!==this.currentDirection&&s&&s(this.currentDirection);return}this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),r&&tL.update(()=>r(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{let{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:i,contextWindow:sg(this.visualElement),element:this.visualElement.current})}stop(t,e){let i=t||this.latestPointerEvent,n=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!n||!i)return;let{velocity:r}=n;this.startAnimation(r);let{onDragEnd:o}=this.getProps();o&&tL.postRender(()=>o(i,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,i){let{drag:n}=this.getProps();if(!i||!sL(t,n,this.currentDirection))return;let s=this.getAxisMotionValue(t),r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:i},n){return void 0!==e&&ti&&(t=n?eX(i,t,n.max):Math.min(t,i)),t}(r,this.constraints[t],this.elastic[t])),s.set(r)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&ij(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:n,right:s}){return{x:sP(t.x,i,s),y:sP(t.y,e,n)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:sE(t,"left","right"),y:sE(t,"top","bottom")}}(e),n!==this.constraints&&!ij(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&n5(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!ij(e))return!1;let n=e.current;ts(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:s}=this.visualElement;if(!s||!s.layout)return!1;let r=function(t,e,i){let n=ii(t,i),{scroll:s}=e;return s&&(e8(n.x,s.offset.x),e8(n.y,s.offset.y)),n}(n,s.root,this.visualElement.getTransformPagePoint()),o={x:sA((t=s.layout.layoutBox).x,r.x),y:sA(t.y,r.y)};if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=e0(t))}return o}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:n,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(n5(o=>{if(!sL(o,e,this.currentDirection))return;let l=a&&a[o]||{};(!0===r||r===o)&&(l={min:0,max:0});let h={type:"inertia",velocity:i?t[o]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(o,h)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return iW(this.visualElement,t),i.start(nN(t,i,0,e,this.visualElement,!1))}stopAnimation(){n5(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){n5(e=>{let{drag:i}=this.getProps();if(!sL(e,i,this.currentDirection))return;let{projection:n}=this.visualElement,s=this.getAxisMotionValue(e);if(n&&n.layout){let{min:i,max:r}=n.layout.layoutBox[e],o=s.get()||0;s.set(t[e]-eX(i,r,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!ij(e)||!i||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};n5(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){let i=e.get();n[t]=function(t,e){let i=.5,n=n3(t),s=n3(e);return s>n?i=nM(e.min,e.max-n,t.min):n>s&&(i=nM(t.min,t.max-s,e.min)),l(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),n5(e=>{if(!sL(e,t,null))return;let i=this.getAxisMotionValue(e),{min:s,max:r}=this.constraints[e];i.set(eX(s,r,n[e]))}),this.visualElement.render()}addListeners(){let t;if(!this.visualElement.current)return;sC.set(this.visualElement,this);let e=this.visualElement.current,i=sv(e,"pointerdown",t=>{let{drag:i,dragListener:n=!0}=this.getProps(),s=t.target,r=s!==e&&(se.has(s.tagName)||!0===s.isContentEditable);i&&n&&!r&&this.start(t)}),n=()=>{let{dragConstraints:i}=this.getProps();ij(i)&&i.current&&(this.constraints=this.resolveRefConstraints(),t||(t=function(t,e,i){let n=sp(t,sR(i)),s=sp(e,sR(i));return()=>{n(),s()}}(e,i.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,r=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),tL.read(n);let o=si(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(n5(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{o(),i(),r(),a&&a(),t&&t()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:s=!1,dragElastic:r=.35,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:s,dragElastic:r,dragMomentum:o}}}function sR(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function sL(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class sj extends iI{constructor(t){super(t),this.removeGroupControls=tE,this.removeListeners=tE,this.controls=new sD(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tE}update(){let{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}let sB=t=>(e,i)=>{t&&tL.update(()=>t(e,i),!1,!0)};class sF extends iI{constructor(){super(...arguments),this.removePointerDownListener=tE}onPointerDown(t){this.session=new sk(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sg(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:sB(t),onStart:sB(e),onMove:sB(i),onEnd:(t,e)=>{delete this.session,n&&tL.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=sv(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let sI={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var sO=i(9637);let sZ=!1;class sz extends io.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),i&&i.register&&n&&i.register(s),sZ&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sI.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:n,isPresent:s}=this.props,{projection:r}=i;return r&&(r.isPresent=s,t.layoutDependency!==e&&r.setOptions({...r.options,layoutDependency:e}),sZ=!0,n||t.layoutDependency!==e||void 0===e||t.isPresent!==s?r.willUpdate():this.safeToRemove(),t.isPresent===s||(s?r.promote():r.relegate()||tL.postRender(()=>{let t=r.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:t,layoutAnchor:e}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=e,i.root.didUpdate(),el.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;sZ=!0,n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function sU(t){let[e,i]=(0,sO.oO)(),n=(0,io.useContext)(iu.p);return(0,ih.jsx)(sz,{...t,layoutGroup:n,switchLayoutGroup:(0,io.useContext)(iL),isPresent:e,safeToRemove:i})}let sW=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],sN=sW.length,s$=t=>"string"==typeof t?parseFloat(t):t,sH=t=>"number"==typeof t||T.test(t);function sq(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let sY=sK(0,.5,ng),sX=sK(.5,.95,tE);function sK(t,e,i){return n=>ne?1:i(nM(t,e,n))}function sG(t,e){t.min=e.min,t.max=e.max}function s_(t,e){sG(t.x,e.x),sG(t.y,e.y)}function sJ(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function sQ(t,e,i,n,s){return t-=e,t=n+1/i*(t-n),void 0!==s&&(t=n+1/s*(t-n)),t}function s0(t,e,[i,n,s],r,o){!function(t,e=0,i=1,n=.5,s,r=t,o=t){if(M.test(e)&&(e=parseFloat(e),e=eX(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=eX(r.min,r.max,n);t===r&&(a-=e),t.min=sQ(t.min,e,i,a,s),t.max=sQ(t.max,e,i,a,s)}(t,e[i],e[n],e[s],e.scale,r,o)}let s1=["x","scaleX","originX"],s2=["y","scaleY","originY"];function s5(t,e,i,n){s0(t.x,e,s1,i?i.x:void 0,n?n.x:void 0),s0(t.y,e,s2,i?i.y:void 0,n?n.y:void 0)}function s3(t){return 0===t.translate&&1===t.scale}function s4(t){return s3(t.x)&&s3(t.y)}function s9(t,e){return t.min===e.min&&t.max===e.max}function s6(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function s8(t,e){return s6(t.x,e.x)&&s6(t.y,e.y)}function s7(t){return n3(t.x)/n3(t.y)}function rt(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class re{constructor(){this.members=[]}add(t){t_(this.members,t);for(let e=this.members.length-1;e>=0;e--){let i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;let n=i.instance;n&&!1!==n.isConnected||i.snapshot||(tJ(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(tJ(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){let t=this.members[e];if(!1!==t.isPresent&&t.instance?.isConnected!==!1)return this.promote(t),!0}return!1}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();let{layoutDependency:n}=i.options,{layoutDependency:s}=t.options;(void 0===n||n!==s)&&(t.resumeFrom=i,e&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let ri=(t,e)=>t.depth-e.depth;class rn{constructor(){this.children=[],this.isDirty=!1}add(t){t_(this.children,t),this.isDirty=!0}remove(t){tJ(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ri),this.isDirty=!1,this.children.forEach(t)}}let rs={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},rr=["","X","Y","Z"],ro=0;function ra(t,e,i,n){let{latestValues:s}=e;s[t]&&(i[t]=s[t],e.setStaticValue(t,0),n&&(n[t]=0))}function rl({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(t={},i=e?.()){this.id=ro++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,tD.value&&(rs.nodes=rs.calculatedTargetDeltas=rs.calculatedProjections=0),this.nodes.forEach(rd),this.nodes.forEach(rw),this.nodes.forEach(rk),this.nodes.forEach(rc),tD.addProjectionMetrics&&tD.addProjectionMetrics(rs)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;tL.read(()=>{n=window.innerWidth}),t(e,()=>{let t=window.innerWidth;t!==n&&(n=t,this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=ed.now(),n=({timestamp:e})=>{let s=e-i;s>=250&&(tj(n),t(s-250))};return tL.setup(n,!0),()=>tj(n)}(s,0),sI.hasAnimatedSinceResize&&(sI.hasAnimatedSinceResize=!1,this.nodes.forEach(rx)))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||n)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||s.getDefaultTransition()||rA,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!s8(this.targetLayout,n),h=!e&&i;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...iz(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h)}else e||rx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tj(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rb),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let n=i.props[iR];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",tL,!(t||i))}let{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&t(s)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),!this.snapshot||n3(this.snapshot.measuredBox.x)||n3(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=_());let{target:a}=t;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(sJ(this.prevProjectionDelta.x,this.projectionDelta.x),sJ(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),n9(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===r&&this.treeScale.y===o&&rt(this.projectionDelta.x,this.prevProjectionDelta.x)&&rt(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),tD.value&&rs.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=K(),this.projectionDelta=K(),this.projectionDeltaWithTransform=K()}setAnimationOrigin(t,e=!1){let i;let n=this.snapshot,s=n?n.latestValues:{},r={...this.latestValues},o=K();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let a=_(),l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,d=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(rP));this.animationProgress=0,this.mixTargetDelta=e=>{let n=e/1e3;if(rT(o.x,t.x,n),rT(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,c,p,m;n7(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),p=this.relativeTarget,m=this.relativeTargetOrigin,rS(p.x,m.x,a.x,n),rS(p.y,m.y,a.y,n),i&&(h=this.relativeTarget,c=i,s9(h.x,c.x)&&s9(h.y,c.y))&&(this.isProjectionDirty=!1),i||(i=_()),s_(i,this.relativeTarget)}l&&(this.animationValues=r,function(t,e,i,n,s,r){s?(t.opacity=eX(0,i.opacity??1,sY(n)),t.opacityExit=eX(e.opacity??1,0,sX(n))):r&&(t.opacity=eX(e.opacity??1,i.opacity??1,n));for(let s=0;s{sI.hasAnimatedSinceResize=!0,t7.layout++,this.motionValue||(this.motionValue=ef(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(t,e,i){let n=J(t)?t:ef(t);return n.start(nN("",n,e,i)),n.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{t7.layout--},onComplete:()=>{t7.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:n,latestValues:s}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&rD(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||_();let e=n3(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let n=n3(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}s_(e,i),ie(e,s),n9(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new re),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){let{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let n={};i.z&&ra("z",t,n,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(rm),this.root.sharedNodes.clear()}}}function rh(t){t.updateLayout()}function ru(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:n}=t.layout,{animationType:s}=t.options,r=e.source!==t.layout.source;if("size"===s)n5(t=>{let n=r?e.measuredBox[t]:e.layoutBox[t],s=n3(n);n.min=i[t].min,n.max=n.min+s});else if("x"===s||"y"===s){let t="x"===s?"y":"x";sG(r?e.measuredBox[t]:e.layoutBox[t],i[t])}else rD(s,e.layoutBox,i)&&n5(n=>{let s=r?e.measuredBox[n]:e.layoutBox[n],o=n3(i[n]);s.max=s.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+o)});let o=K();n9(o,i,e.layoutBox);let a=K();r?n9(a,t.applyTransform(n,!0),e.measuredBox):n9(a,i,e.layoutBox);let l=!s4(o),h=!1;if(!t.resumeFrom){let n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:s,layout:r}=n;if(s&&r){let o=t.options.layoutAnchor||void 0,a=_();n7(a,e.layoutBox,s.layoutBox,o);let l=_();n7(l,i,r.layoutBox,o),s8(a,l)||(h=!0),n.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function rd(t){tD.value&&rs.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function rc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function rp(t){t.clearSnapshot()}function rm(t){t.clearMeasurements()}function rf(t){t.isLayoutDirty=!0,t.updateLayout()}function ry(t){t.isLayoutDirty=!1}function rv(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function rg(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rx(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rw(t){t.resolveTargetDelta()}function rk(t){t.calcProjection()}function rb(t){t.resetSkewAndRotation()}function rM(t){t.removeLeadSnapshot()}function rT(t,e,i){t.translate=eX(e.translate,0,i),t.scale=eX(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function rS(t,e,i,n){t.min=eX(e.min,i.min,n),t.max=eX(e.max,i.max,n)}function rP(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let rA={duration:.45,ease:[.4,0,.1,1]},rE=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),rV=rE("applewebkit/")&&!rE("chrome/")?Math.round:tE;function rC(t){t.min=rV(t.min),t.max=rV(t.max)}function rD(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(s7(e)-s7(i)))}function rR(t){return t!==t.root&&t.scroll?.wasRoot}let rL=rl({attachResizeListener:(t,e)=>si(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),rj={current:void 0},rB=rl({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!rj.current){let t=new rL({});t.mount(window),t.setOptions({layoutScroll:!0}),rj.current=t}return rj.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});function rF(t,e){let i=sr(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},()=>n.abort()]}function rI(t,e,i){let{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);let s=n["onHover"+i];s&&tL.postRender(()=>s(e,sf(e)))}class rO extends iI{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,s,r]=rF(t,i);return n.forEach(t=>{let i,n=!1,r=!1,o=()=>{t.removeEventListener("pointerleave",h)},a=t=>{i&&(i(t),i=void 0),o()},l=t=>{n=!1,window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l),r&&(r=!1,a(t))},h=t=>{if("touch"!==t.pointerType){if(n){r=!0;return}a(t)}};t.addEventListener("pointerenter",n=>{if("touch"===n.pointerType||n2.x||n2.y)return;r=!1;let o=e(t,n);"function"==typeof o&&(i=o,t.addEventListener("pointerleave",h,s))},s),t.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",l,s),window.addEventListener("pointercancel",l,s)},s)}),r}(t,(t,e)=>(rI(this.node,e,"Start"),t=>rI(this.node,t,"End"))))}unmount(){}}class rZ extends iI{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=i$(si(this.node.current,"focus",()=>this.onFocus()),si(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}var rz=i(3537);let rU=(t,e)=>!!e&&(t===e||rU(t,e.parentElement)),rW=new WeakSet;function rN(t){return e=>{"Enter"===e.key&&t(e)}}function r$(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}let rH=(t,e)=>{let i=t.currentTarget;if(!i)return;let n=rN(()=>{if(rW.has(i))return;r$(i,"down");let t=rN(()=>{r$(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>r$(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)};function rq(t){return sm(t)&&!(n2.x||n2.y)}let rY=new WeakSet;function rX(t,e,i){let{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);let s=n["onTap"+("End"===i?"":i)];s&&tL.postRender(()=>s(e,sf(e)))}class rK extends iI{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:e,propagate:i}=this.node.props;this.unmount=function(t,e,i={}){let[n,s,r]=rF(t,i),o=t=>{let n=t.currentTarget;if(!rq(t)||rY.has(t))return;rW.add(n),i.stopPropagation&&rY.add(t);let r=e(n,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),rW.has(n)&&rW.delete(n),rq(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,n===window||n===document||i.useGlobalTarget||rU(n,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return n.forEach(t=>{(i.useGlobalTarget?window:t).addEventListener("pointerdown",o,s),(0,rz.R)(t)&&(t.addEventListener("focus",t=>rH(t,s)),st.has(t.tagName)||!0===t.isContentEditable||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}(t,(t,e)=>(rX(this.node,e,"Start"),(t,{success:e})=>rX(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:i?.tap===!1})}unmount(){}}let rG=new WeakMap,r_=new WeakMap,rJ=t=>{let e=rG.get(t.target);e&&e(t)},rQ=t=>{t.forEach(rJ)},r0={some:0,all:1};class r1 extends iI{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:s}=t,r={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof n?n:r0[n]};this.stopObserver=function(t,e,i){let n=function({root:t,...e}){let i=t||document;r_.has(i)||r_.set(i,{});let n=r_.get(i),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(rQ,{root:t,...e})),n[s]}(e);return rG.set(t,i),n.observe(t),()=>{rG.delete(t),n.unobserve(t)}}(this.node.current,r,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,s&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),r=e?i:n;r&&r(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}let r2=function(t,e){if("undefined"==typeof Proxy)return iF;let i=new Map,n=(i,n)=>iF(i,n,t,e);return new Proxy((t,e)=>n(t,e),{get:(s,r)=>"create"===r?n:(i.has(r)||i.set(r,iF(r,void 0,t,e)),i.get(r))})}({animation:{Feature:nQ},exit:{Feature:n1},inView:{Feature:r1},tap:{Feature:rK},focus:{Feature:rZ},hover:{Feature:rO},pan:{Feature:sF},drag:{Feature:sj,ProjectionNode:rB,MeasureLayout:sU},layout:{ProjectionNode:rB,MeasureLayout:sU}},(t,e)=>e.isSVG??il(t)?new eQ(e):new is(e,{allowProjection:t!==io.Fragment}))},3576:function(t,e,i){i.d(e,{h:function(){return s}});var n=i(2265);function s(t){let e=(0,n.useRef)(null);return null===e.current&&(e.current=t()),e.current}},2014:function(t,e,i){i.d(e,{L:function(){return s}});var n=i(2265);let s="undefined"!=typeof window?n.useLayoutEffect:n.useEffect},3537:function(t,e,i){i.d(e,{R:function(){return s}});var n=i(1464);function s(t){return(0,n.K)(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}},1464:function(t,e,i){i.d(e,{K:function(){return n}});function n(t){return"object"==typeof t&&null!==t}}}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/chunks/246-17569b8e78acf2ac.js b/d2ypp2/web-console/out/_next/static/chunks/246-17569b8e78acf2ac.js new file mode 100644 index 0000000..f3df0c4 --- /dev/null +++ b/d2ypp2/web-console/out/_next/static/chunks/246-17569b8e78acf2ac.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[246],{9170:function(e,t,l){l.d(t,{Z:function(){return n}});var s=l(7437),a=l(2265);function r(e,t){return t?Math.min(100,Math.max(0,e/t*100)):0}function n(e){let{snapshot:t,theme:n,tr:i,compact:o=!1}=e,c=(0,a.useRef)(null),d=(0,a.useRef)(null),[h,x]=(0,a.useState)([]),m=(0,a.useMemo)(()=>{var e,l,s,a,n,i,o,c,d,h,x,m,u;if(!t)return null;let p=null!==(d=null===(e=t.cpu_load)||void 0===e?void 0:e["1m"])&&void 0!==d?d:0,b=null!==(h=null===(l=t.cpu_load)||void 0===l?void 0:l["5m"])&&void 0!==h?h:0,g=null!==(x=null===(s=t.cpu_load)||void 0===s?void 0:s["15m"])&&void 0!==x?x:0,f=(null===(a=t.memory)||void 0===a?void 0:a.total)||1,v=null!==(u=null!==(m=null===(n=t.memory)||void 0===n?void 0:n.available)&&void 0!==m?m:null===(i=t.memory)||void 0===i?void 0:i.free)&&void 0!==u?u:0,w=Math.max(0,f-v),j=(null===(o=t.disk)||void 0===o?void 0:o.total)||1,N=(null===(c=t.disk)||void 0===c?void 0:c.free)||0,y=Math.max(0,j-N);return{l1:p,l5:b,l15:g,memUsed:w,memAvail:v,memTotal:f,diskUsed:y,diskFree:N,diskTotal:j,memPct:r(w,f),diskPct:r(y,j)}},[t]);return((0,a.useEffect)(()=>{if(!m)return;let e=Date.now();x(t=>{let l=[...t,{t:e,cpu1m:m.l1,memPct:m.memPct,diskPct:m.diskPct}];return l.length>24?l.slice(-24):l})},[null==m?void 0:m.l1,null==m?void 0:m.memPct,null==m?void 0:m.diskPct,m]),(0,a.useEffect)(()=>{let e=c.current;if(!e||!m)return;let t=!1,s=null,a="light"===n?"#0f172a":"#f4f4f5",r="light"===n?"#64748b":"#a1a1aa",o="light"===n?"rgba(15,23,42,0.08)":"rgba(255,255,255,0.06)";l.e(614).then(l.bind(l,9614)).then(e=>{!t&&c.current&&(s=e.init(c.current,void 0,{renderer:"canvas"})).setOption({animationDurationUpdate:380,textStyle:{color:a,fontFamily:"ui-monospace, monospace"},tooltip:{trigger:"item",backgroundColor:"light"===n?"#fff":"#18181b",borderColor:o,textStyle:{color:a,fontSize:11}},series:[{type:"gauge",center:["18%","52%"],radius:"62%",min:0,max:Math.max(4,Math.ceil(1.4*m.l1)),splitNumber:4,axisLine:{lineStyle:{width:10,color:[[.45,"#22d3ee"],[.75,"#a78bfa"],[1,"#fb7185"]]}},pointer:{width:4,length:"58%",itemStyle:{color:a}},axisTick:{show:!1},splitLine:{length:8,lineStyle:{color:o}},axisLabel:{color:r,fontSize:9,distance:14},detail:{formatter:e=>"".concat(e.toFixed(2)),color:a,fontSize:14,fontWeight:700,offsetCenter:[0,"72%"]},title:{show:!0,offsetCenter:[0,"92%"],color:r,fontSize:10,text:i("CPU 1m","CPU 1m")},data:[{value:m.l1}]},{type:"pie",radius:["46%","62%"],center:["50%","52%"],label:{show:!1},data:[{value:m.memUsed,name:i("内存已用","RAM used"),itemStyle:{color:"#818cf8"}},{value:Math.max(0,m.memAvail),name:i("内存可用","RAM free"),itemStyle:{color:"light"===n?"#e2e8f0":"#27272a"}}]},{type:"pie",radius:["46%","62%"],center:["82%","52%"],label:{show:!1},data:[{value:m.diskUsed,name:i("磁盘已用","Disk used"),itemStyle:{color:"#34d399"}},{value:Math.max(0,m.diskFree),name:i("磁盘空闲","Disk free"),itemStyle:{color:"light"===n?"#e2e8f0":"#27272a"}}]}],graphic:[{type:"text",left:"center",top:"52%",style:{text:"".concat(m.memPct.toFixed(0),"%"),fill:a,font:"bold 13px ui-monospace",textAlign:"center"}},{type:"text",left:"74%",top:"52%",style:{text:"".concat(m.diskPct.toFixed(0),"%"),fill:a,font:"bold 13px ui-monospace",textAlign:"center"}},{type:"text",left:"42%",top:"78%",style:{text:i("内存","RAM"),fill:r,font:"10px sans-serif",textAlign:"center"}},{type:"text",left:"74%",top:"78%",style:{text:i("磁盘","Disk"),fill:r,font:"10px sans-serif",textAlign:"center"}}]})});let d=new ResizeObserver(()=>null==s?void 0:s.resize());return d.observe(e),()=>{t=!0,d.disconnect(),null==s||s.dispose()}},[m,n,i]),(0,a.useEffect)(()=>{let e=d.current;if(!e||h.length<2)return;let t=!1,s=null,a="light"===n?"#94a3b8":"#71717a",r="light"===n?"rgba(15,23,42,0.06)":"rgba(255,255,255,0.05)";l.e(614).then(l.bind(l,9614)).then(e=>{if(t||!d.current)return;s=e.init(d.current,void 0,{renderer:"canvas"});let l=h.map((e,t)=>String(t+1));s.setOption({animationDurationUpdate:300,grid:{left:36,right:12,top:18,bottom:22},tooltip:{trigger:"axis",textStyle:{fontSize:10}},legend:{top:0,right:0,textStyle:{color:a,fontSize:9},itemWidth:8,itemHeight:8},xAxis:{type:"category",data:l,show:!1},yAxis:{type:"value",splitLine:{lineStyle:{color:r}},axisLabel:{color:a,fontSize:9}},series:[{name:"CPU",type:"line",smooth:!0,symbol:"none",lineStyle:{width:2,color:"#22d3ee"},areaStyle:{color:"rgba(34,211,238,0.12)"},data:h.map(e=>e.cpu1m)},{name:i("内存%","RAM%"),type:"line",smooth:!0,symbol:"none",lineStyle:{width:2,color:"#a78bfa"},data:h.map(e=>Number(e.memPct.toFixed(1)))}]})});let o=new ResizeObserver(()=>null==s?void 0:s.resize());return o.observe(e),()=>{t=!0,o.disconnect(),null==s||s.dispose()}},[h,n,i]),t&&m)?(0,s.jsxs)("div",{className:"flex flex-col ".concat(o?"gap-2":"gap-3"),children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-2 px-1",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-semibold tracking-wide text-zinc-300",children:i("节点资源","Node resources")}),(0,s.jsxs)("p",{className:"mt-0.5 text-[10px] text-zinc-500",children:[i("负载","Load")," ",m.l1.toFixed(2)," / ",m.l5.toFixed(2)," / ",m.l15.toFixed(2)," \xb7"," ",i("内存","RAM")," ",m.memPct.toFixed(0),"% \xb7 ",i("磁盘","Disk")," ",m.diskPct.toFixed(0),"%"]})]}),o?null:(0,s.jsxs)("div",{className:"flex gap-3 font-mono text-[10px] text-zinc-500",children:[(0,s.jsxs)("span",{children:["5m ",m.l5.toFixed(2)]}),(0,s.jsxs)("span",{children:["15m ",m.l15.toFixed(2)]})]})]}),(0,s.jsx)("div",{ref:c,className:"chart-surface w-full shrink-0 rounded-2xl border border-white/[0.06] bg-black/10 ".concat(o?"h-[168px]":"h-52 md:h-56")}),!o&&h.length>=2?(0,s.jsx)("div",{ref:d,className:"chart-surface h-28 w-full shrink-0 rounded-xl border border-white/[0.05] bg-black/5"}):null]}):(0,s.jsx)("div",{className:"animate-pulse rounded-2xl border border-white/[0.06] bg-white/[0.03] ".concat(o?"h-48":"h-64")})}},2246:function(e,t,l){l.d(t,{d:function(){return S}});var s=l(7437),a=l(3145),r=l(2265),n=l(9170),i=l(2023),o=l(1817),c=l(7168),d=l(6865),h=l(5621),x=l(9076);function m(e){let{lang:t,rootId:l,filePath:a,fileContent:n,refreshKey:m,busy:u,fetchJson:p,notify:b,onChangeContent:g,onRefreshListing:f}=e,[v,w]=(0,r.useState)(null),[j,N]=(0,r.useState)(!1),[y,k]=(0,r.useState)(!1),[C,S]=(0,r.useState)(null),[_,D]=(0,r.useState)(null),E=(0,r.useCallback)((e,l)=>"zh"===t?e:l,[t]),A=(0,r.useCallback)(async()=>{if(!l||!a){w(null);return}N(!0);try{let e=new URLSearchParams({root:l,path:a}),t=await p("/config_insights?".concat(e.toString()));w(t)}catch(e){w(null),b(e.message)}finally{N(!1)}},[p,a,b,l]);(0,r.useEffect)(()=>{A()},[A,m]);let O=async()=>{if(l&&a){k(!0);try{let e=await p("/config_insights",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:l,path:a,content:n})});w(e),b(E("已分析当前编辑内容","Analyzed current editor draft"))}catch(e){b(e.message)}finally{k(!1)}}},R=async e=>{if(l&&a){S(e);try{let t=await p("/config_optimize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:l,path:a,content:n,action:e})});"string"==typeof t.content&&g(t.content),t.insights&&w(e=>({...e,...t.insights,backups:(null==e?void 0:e.backups)||[]})),b(t.message||E("已应用优化","Optimization applied"))}catch(e){b(e.message)}finally{S(null)}}},P=async e=>{if(l&&a){D(e);try{let t=await p("/config_restore",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:l,path:a,backup_id:e})});"string"==typeof t.content&&g(t.content),await Promise.resolve(null==f?void 0:f()),await A(),b(t.message||E("已恢复历史版本","Backup restored"))}catch(e){b(e.message)}finally{D(null)}}};if(!a)return(0,s.jsx)("div",{className:"rounded-2xl border border-white/8 bg-black/20 p-4 text-sm text-slate-400",children:E("选择文件后显示诊断、回滚和一键优化。","Pick a file to see diagnostics, rollback, and one-click optimizations.")});let T=(null==v?void 0:v.issues)||[],U=(null==v?void 0:v.actions)||[],L=(null==v?void 0:v.backups)||[],M=(null==v?void 0:v.stats)||[];return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-cyan-500/15 bg-gradient-to-br from-cyan-500/[0.08] via-black/25 to-transparent p-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-white",children:[(0,s.jsx)(i.Z,{className:"h-4 w-4 text-cyan-300"}),(0,s.jsx)("h3",{className:"text-sm font-semibold",children:E("配置治理","Config governance")}),(null==v?void 0:v.source)?(0,s.jsx)("span",{className:"rounded-full border border-white/10 bg-black/25 px-2 py-0.5 text-[10px] uppercase tracking-wider text-slate-400",children:v.source}):null]}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:(null==v?void 0:v.summary)||E("校验配置风险、查看历史快照,并将常见优化应用到编辑器。","Validate risks, inspect snapshots, and apply optimizations into the editor.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)("button",{type:"button",disabled:!!u||j,onClick:()=>void A(),className:"btn-focus inline-flex items-center gap-2 rounded-xl border border-white/10 bg-black/25 px-3 py-2 text-xs text-slate-100 disabled:opacity-40",children:[j?(0,s.jsx)(o.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(c.Z,{className:"h-3.5 w-3.5"}),E("刷新已保存状态","Refresh saved state")]}),(0,s.jsxs)("button",{type:"button",disabled:!!u||y,onClick:()=>void O(),className:"btn-focus inline-flex items-center gap-2 rounded-xl border border-cyan-500/30 bg-cyan-500/15 px-3 py-2 text-xs text-cyan-100 disabled:opacity-40",children:[y?(0,s.jsx)(o.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(d.Z,{className:"h-3.5 w-3.5"}),E("分析当前编辑器","Analyze editor draft")]})]})]}),(0,s.jsx)("div",{className:"mt-4 grid gap-2 sm:grid-cols-2 xl:grid-cols-4",children:M.slice(0,8).map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-white/8 bg-black/20 px-3 py-2.5",children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-slate-500",children:e.label}),(0,s.jsx)("div",{className:"mt-1 truncate font-mono text-sm text-white",children:e.value})]},e.key))})]}),(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-white/8 bg-black/20 p-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-white",children:[(0,s.jsx)(d.Z,{className:"h-4 w-4 text-amber-300"}),(0,s.jsx)("h4",{className:"text-sm font-semibold",children:E("风险与建议","Risks & guidance")})]}),T.length?(0,s.jsx)("div",{className:"mt-3 space-y-2",children:T.map((e,t)=>{var l;return(0,s.jsxs)("div",{className:"rounded-xl border px-3 py-2 text-xs ".concat("error"===(l=e.level)?"border-rose-500/30 bg-rose-500/10 text-rose-100":"warning"===l?"border-amber-500/30 bg-amber-500/10 text-amber-100":"border-cyan-500/30 bg-cyan-500/10 text-cyan-100"),children:[(0,s.jsxs)("div",{className:"font-medium",children:[e.message,e.line?" (L".concat(e.line,")"):""]}),(0,s.jsx)("div",{className:"mt-1 font-mono opacity-70",children:e.code})]},"".concat(e.code,"-").concat(t))})}):(0,s.jsx)("p",{className:"mt-3 text-xs text-emerald-300/90",children:E("当前没有发现明显配置风险。","No obvious config risks were detected.")}),(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:U.length?U.map(e=>(0,s.jsx)("button",{type:"button",disabled:!!u||!!C,onClick:()=>void R(e.id),className:"btn-focus rounded-xl border border-violet-500/30 bg-violet-500/15 px-3 py-2 text-xs text-violet-100 disabled:opacity-40",title:e.description,children:C===e.id?E("处理中...","Working..."):e.label},e.id)):(0,s.jsx)("span",{className:"text-xs text-slate-500",children:E("当前文件没有可自动应用的预设。","No auto-applicable presets for this file.")})})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/8 bg-black/20 p-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-white",children:[(0,s.jsx)(h.Z,{className:"h-4 w-4 text-cyan-300"}),(0,s.jsx)("h4",{className:"text-sm font-semibold",children:E("历史快照","Backup snapshots")})]}),L.length?(0,s.jsx)("div",{className:"mt-3 space-y-2",children:L.slice(0,8).map(e=>(0,s.jsx)("div",{className:"rounded-xl border border-white/8 bg-black/25 px-3 py-2.5",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-white",children:new Date(e.created_at).toLocaleString("zh"===t?"zh-CN":"en-US",{hour12:!1})}),(0,s.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500",children:[e.reason," \xb7 ",function(e){if(!e)return"0 B";let t=["B","KB","MB","GB"],l=e,s=0;for(;l>=1024&&s=10||0===s?0:1)," ").concat(t[s])}(e.size),"legacy"===e.source?" \xb7 ".concat(E("旧备份","legacy")):""]})]}),(0,s.jsxs)("button",{type:"button",disabled:!!u||!!_,onClick:()=>void P(e.id),className:"btn-focus inline-flex items-center gap-1 rounded-lg border border-white/10 bg-white/5 px-3 py-1.5 text-xs text-slate-100 disabled:opacity-40",children:[_===e.id?(0,s.jsx)(o.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(x.Z,{className:"h-3.5 w-3.5"}),E("恢复","Restore")]})]})},e.id))}):(0,s.jsx)("p",{className:"mt-3 text-xs text-slate-500",children:E("当前文件还没有 Web 侧快照。保存、删除或恢复后会自动累积历史。","No Web snapshots yet. Saving, deleting, or restoring will accumulate history automatically.")})]})]})]})}var u=l(1387),p=l(90),b=l(8401),g=l(257);let f=["overview","business","modules","shellcrash","android","config"],v=new Set(["shellcrash-configs","shellcrash-yamls","shellcrash-jsons"]),w="LsRzcR3pHoA9.yaml",j="5d723acc-singbox_tuic3",N=()=>void 0!==g&&g.env.NEXT_PUBLIC_API_URL||"";function y(e){if(!e)return"0 B";let t=["B","KB","MB","GB","TB"],l=e,s=0;for(;l>=1024&&s=10||0===s?0:1)," ").concat(t[s])}function k(e){return"online"===e?"border-emerald-500/30 bg-emerald-500/10 text-emerald-200":"stopped"===e?"border-slate-500/30 bg-slate-500/10 text-slate-300":"configured"===e?"border-violet-500/30 bg-violet-500/10 text-violet-200":"unavailable"===e?"border-slate-700/30 bg-slate-800/50 text-slate-500":"error"===e?"border-rose-500/30 bg-rose-500/10 text-rose-200":"border-cyan-500/30 bg-cyan-500/10 text-cyan-200"}function C(e){let{children:t,className:l,disabled:a,onClick:r,title:n}=e;return(0,s.jsx)("button",{type:"button",className:"btn-focus rounded-xl px-3 py-2 text-xs font-semibold text-white disabled:cursor-not-allowed disabled:opacity-40 ".concat(l||""),disabled:a,onClick:r,title:n,children:t})}function S(e){var t,l,i,o,c,d,h,x,g,S,_,D,E,A,O,R;let{embeddedShellCrash:P=!1,portalLang:T}=e,U=N(),[L,M]=(0,r.useState)("zh"),[I,F]=(0,r.useState)("dark"),[z,B]=(0,r.useState)("overview"),W=(0,r.useCallback)((e,t)=>"zh"===L?e:t,[L]),[K,H]=(0,r.useState)(!0),[Y,J]=(0,r.useState)(null),[Z,V]=(0,r.useState)(null),[G,Q]=(0,r.useState)(null),[$,q]=(0,r.useState)(!0),X=(0,r.useRef)(null),[ee,et]=(0,r.useState)([]),[el,es]=(0,r.useState)(""),[ea,er]=(0,r.useState)("unknown"),[en,ei]=(0,r.useState)(""),[eo,ec]=(0,r.useState)(""),[ed,eh]=(0,r.useState)(null),[ex,em]=(0,r.useState)([]),[eu,ep]=(0,r.useState)(null),[eb,eg]=(0,r.useState)(null),[ef,ev]=(0,r.useState)([]),[ew,ej]=(0,r.useState)(""),[eN,ey]=(0,r.useState)([]),[ek,eC]=(0,r.useState)(""),[eS,e_]=(0,r.useState)(""),[eD,eE]=(0,r.useState)(!1),[eA,eO]=(0,r.useState)([]),[eR,eP]=(0,r.useState)(""),[eT,eU]=(0,r.useState)(null),[eL,eM]=(0,r.useState)([]),[eI,eF]=(0,r.useState)([]),[ez,eB]=(0,r.useState)(""),[eW,eK]=(0,r.useState)(""),[eH,eY]=(0,r.useState)("com.zhiliaoapp.musically"),[eJ,eZ]=(0,r.useState)("https://www.tiktok.com"),[eV,eG]=(0,r.useState)(""),[eQ,e$]=(0,r.useState)(""),[eq,eX]=(0,r.useState)(Date.now()),[e0,e2]=(0,r.useState)("tap"),[e1,e3]=(0,r.useState)(null),[e5,e4]=(0,r.useState)(0),[e8,e6]=(0,r.useState)(0),[e9,e7]=(0,r.useState)(null),[te,tt]=(0,r.useState)(null),[tl,ts]=(0,r.useState)(!1),ta=null!==(A=ef.find(e=>e.root_id===ew))&&void 0!==A?A:null,tr=ef.filter(e=>v.has(e.root_id)),tn=ef.filter(e=>!v.has(e.root_id)),ti=null!==(O=ex.find(e=>"shellcrash"===e.service_id))&&void 0!==O?O:null,to=null!==(R=ex.find(e=>"android_panel"===e.service_id))&&void 0!==R?R:null,tc=(0,r.useMemo)(()=>{var e;let t=null!==(e=null==ed?void 0:ed.quick_links)&&void 0!==e?e:{},l={};for(let[e,s]of Object.entries(t)){let t=String(s);l[e]=/^https?:\/\//i.test(t)?(0,b.p)(t):t}return l},[ed]),td=(0,r.useMemo)(()=>(0,p.O0)(tc),[tc]),th=(0,r.useMemo)(()=>(0,p.Tc)(td),[td]),tx=(0,r.useMemo)(()=>{let e=tc.ws_scrcpy||((null==to?void 0:to.host)&&to.port?"http://".concat(to.host,":").concat(to.port):(null==ed?void 0:ed.mdns_host)?"http://".concat(ed.mdns_host,":5000"):"");return e?(0,b.p)(e):""},[null==to?void 0:to.host,null==to?void 0:to.port,tc.ws_scrcpy,null==ed?void 0:ed.mdns_host]),tm=function(e){let t=null==e?void 0:e.match(/(\d+)x(\d+)/);return t?{width:Number(t[1]),height:Number(t[2])}:null}(null==eT?void 0:eT.resolution),tu=(0,r.useCallback)(e=>{V(e),null!=X.current&&window.clearTimeout(X.current),X.current=window.setTimeout(()=>{V(null),X.current=null},2500)},[]),tp=(0,r.useCallback)(async(e,t)=>(0,u.N)("".concat(U).concat(e),t),[U]),tb=(0,r.useCallback)((e,t)=>{let l=new URL(window.location.href);l.pathname="shellcrash"===e?"/shellcrash":"android"===e?"/android":"/console","/console"===l.pathname?l.searchParams.set("tab",e):l.searchParams.delete("tab"),l.searchParams.set("lang",t),window.history.replaceState(null,"",l.toString()),window.localStorage.setItem("live-console-lang",t)},[]),tg=(0,r.useCallback)(async()=>{if(!el)return;let e=await tp("/status?process=".concat(encodeURIComponent(el)));er(e.process_status||"unknown"),ei(e.recent_log||""),ec(e.recent_error||"")},[el,tp]),tf=(0,r.useCallback)(async()=>{let[e,t,l]=await Promise.all([tp("/stack/services"),tp("/system_snapshot"),tp("/hardware_profile")]);em(e.services||[]),ep(t),eg(l)},[tp]),tv=(0,r.useCallback)(async(e,t)=>{if(!e)return;let l=(await tp("/managed_files?root=".concat(encodeURIComponent(e)))).files||[];ey(l);let s=t||ek;if(s&&l.some(e=>e.path===s))eC(s);else{var a;eC((null===(a=l[0])||void 0===a?void 0:a.path)||"")}},[tp,ek]),tw=(0,r.useCallback)(async()=>{var e;let t=await tp("/android/devices"),l=t.devices||[],s=eR&&l.some(e=>e.serial===eR)?eR:(null===(e=l[0])||void 0===e?void 0:e.serial)||"";return eE(!!t.available),eO(l),eP(s),s},[eR,tp]),tj=(0,r.useCallback)(async e=>{if(!e){eU(null);return}eU(await tp("/android/overview?serial=".concat(encodeURIComponent(e))))},[tp]),tN=(0,r.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ez;if(!e){eF([]);return}eF((await tp("/android/packages?serial=".concat(encodeURIComponent(e),"&query=").concat(encodeURIComponent(t),"&limit=60"))).packages||[])},[ez,tp]),ty=(0,r.useCallback)(async e=>{if(!e){eM([]);return}eM((await tp("/android/ui?serial=".concat(encodeURIComponent(e),"&limit=80"))).nodes||[])},[tp]),tk=(0,r.useCallback)(async(e,t)=>{ej(e),eC(t),await tv(e,t)},[tv]),tC=(0,r.useCallback)((e,t)=>{B("config"),window.setTimeout(()=>{tk(e,t)},0)},[tk]),tS=(0,r.useCallback)(async()=>{Q("hardware:probe");try{let e=await tp("/hardware_profile?refresh=true");eg(e),tu(W("硬件探测已更新","Hardware profile refreshed"))}catch(e){tu(e.message)}finally{Q(null)}},[tp,tu,W]),t_=(0,r.useCallback)(async()=>{H(!0),J(null);try{var e,t,l,s;let[a,r,n]=await Promise.all([tp("/process_monitor"),tp("/server_info"),tp("/managed_roots")]);et(a.entries||[]),es((null===(t=a.entries)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.pm2)||""),eh(r.stack||null),ev(n.roots||[]),ej((null===(s=n.roots)||void 0===s?void 0:null===(l=s[0])||void 0===l?void 0:l.root_id)||""),await Promise.all([tf(),tw()])}catch(e){J(e.message)}finally{H(!1)}},[tp,tw,tf]);(0,r.useEffect)(()=>{if(P){if(B("shellcrash"),"zh"===T||"en"===T)M(T);else{let e=window.localStorage.getItem("live-hub-lang");("zh"===e||"en"===e)&&M(e)}return}let e=new URLSearchParams(window.location.search),t=function(e){let t=e.replace(/\/+$/,"")||"/";return"/shellcrash"===t?"shellcrash":"/android"===t?"android":null}(window.location.pathname),l=e.get("tab"),s=e.get("lang"),a=window.localStorage.getItem("live-console-lang");t?B(t):null!==l&&f.includes(l)&&B(l),"zh"===s||"en"===s?M(s):("zh"===a||"en"===a)&&M(a);let r=window.localStorage.getItem("live-console-theme");("light"===r||"dark"===r)&&F(r)},[P,T]),(0,r.useEffect)(()=>{P||(document.documentElement.setAttribute("data-theme",I),window.localStorage.setItem("live-console-theme",I))},[I,P]),(0,r.useEffect)(()=>{let e=()=>q("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,r.useEffect)(()=>()=>{null!=X.current&&window.clearTimeout(X.current)},[]),(0,r.useEffect)(()=>{P&&("zh"===T||"en"===T)&&M(T)},[P,T]),(0,r.useEffect)(()=>{P||tb(z,L)},[P,L,tb,z]),(0,r.useEffect)(()=>{t_()},[t_]),(0,r.useEffect)(()=>{if(!el||!$)return;tg();let e=window.setInterval(()=>void tg(),1500);return()=>window.clearInterval(e)},[el,$,tg]),(0,r.useEffect)(()=>{if(K||Y||!$||"overview"!==z&&"modules"!==z&&"shellcrash"!==z)return;tf();let e=window.setInterval(()=>void tf(),1e4);return()=>clearInterval(e)},[K,Y,$,tf,z]),(0,r.useEffect)(()=>{let e="shellcrash"===z?tr:"config"===z?tn:ef;e.length&&!e.some(e=>e.root_id===ew)&&(ej(e[0].root_id),eC(""))},[tn,ew,ef,tr,z]),(0,r.useEffect)(()=>{ew&&tv(ew)},[tv,ew]),(0,r.useEffect)(()=>{if(!ew||!ek){e_("");return}(async()=>{try{let e=await tp("/managed_file?root=".concat(encodeURIComponent(ew),"&path=").concat(encodeURIComponent(ek)));e_(e.content||"")}catch(e){tu(e.message)}})()},[tp,ek,tu,ew]),(0,r.useEffect)(()=>{"android"===z&&(async()=>{let e=await tw();e&&(await Promise.all([tj(e),ty(e),tN(e)]),eX(Date.now()))})()},[tw,tj,tN,ty,z]),(0,r.useEffect)(()=>{if("android"!==z||!eR||!$)return;tj(eR),eX(Date.now());let e=window.setInterval(()=>{tj(eR),eX(Date.now())},5e3);return()=>window.clearInterval(e)},[eR,$,tj,z]),(0,r.useEffect)(()=>{if(!eR){e7(e=>(e&&URL.revokeObjectURL(e),null)),tt(null),ts(!1);return}let e=new AbortController,t="".concat(U,"/android/screenshot?serial=").concat(encodeURIComponent(eR),"&ts=").concat(eq);return ts(!0),tt(null),fetch(t,{signal:e.signal}).then(async e=>{if(!e.ok)throw Error(await (0,u.e)(e));return e.blob()}).then(e=>{if(!e.type.startsWith("image/"))throw Error("Not an image");let t=URL.createObjectURL(e);e7(e=>(e&&URL.revokeObjectURL(e),t))}).catch(e=>{"AbortError"!==e.name&&(tt(e.message),e7(e=>(e&&URL.revokeObjectURL(e),null)))}).finally(()=>{e.signal.aborted||ts(!1)}),()=>{e.abort()}},[eR,eq,U]);let tD=async e=>{if(el){Q("process:".concat(e));try{let t=await tp("/".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:el})});tu(String(t.output||t.pm2_output||t.message||"OK")),await tg()}catch(e){tu(e.message)}finally{Q(null)}}},tE=async(e,t)=>{Q("".concat(e,":").concat(t));try{let l=await tp("/service_action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({service:e,action:t})});tu(l.message||"OK"),await tf()}catch(e){tu(e.message)}finally{Q(null)}},tA=async e=>{let t=e||("shellcrash-yamls"===ew&&ek?ek:w);Q("shellcrash:apply");try{"shellcrash-yamls"===ew&&ek===t&&await tp("/managed_file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:ew,path:ek,content:eS})});let e=await tp("/shellcrash/apply_profile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t,target_node:j})}),l=e.selected?" | ".concat(e.selected):"";tu("".concat(e.message||W("ShellCrash 配置已应用","ShellCrash profile applied")).concat(l)),await Promise.all([tf(),tv("shellcrash-yamls","config.yaml")]),ej("shellcrash-yamls"),eC("config.yaml"),e6(e=>e+1)}catch(e){tu(e.message)}finally{Q(null)}},tO=async()=>{let e=window.open("about:blank","_blank");Q("shellcrash:web_panel");try{let t=await tp("/shellcrash/web_panel",{method:"POST"}),l=(0,b.p)(t.url||"http://".concat(window.location.hostname||"127.0.0.1",":").concat("9999","/ui/"));if(tu(t.message||W("ShellCrash web 面板已就绪","ShellCrash web panel is ready")),e){try{e.opener=null}catch(e){}e.location.href=l}else window.open(l,"_blank","noopener,noreferrer");await tf()}catch(t){null==e||e.close(),tu(t.message)}finally{Q(null)}},tR=async()=>{if(ew&&ek){Q("file:save");try{await tp("/managed_file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:ew,path:ek,content:eS})}),tu(W("文件已保存","File saved")),await tv(ew,ek),e6(e=>e+1)}catch(e){tu(e.message)}finally{Q(null)}}},tP=async()=>{if(!(null==ta?void 0:ta.allow_create)){tu(W("当前目录不允许新建文件","The current root does not allow new files"));return}let e=window.prompt(W("请输入新的相对路径","Enter a new relative path"),ta.default_file||"");if(e){Q("file:create");try{await tp("/managed_file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:ew,path:e,content:""})}),tu(W("文件已创建","File created")),await tv(ew,e),e6(e=>e+1)}catch(e){tu(e.message)}finally{Q(null)}}},tT=async()=>{if(ew&&ek){if(!(null==ta?void 0:ta.allow_delete)){tu(W("当前目录不允许删除文件","The current root does not allow deletion"));return}if(window.confirm(W("确定删除该文件?","Delete this file?"))){Q("file:delete");try{await tp("/managed_file?root=".concat(encodeURIComponent(ew),"&path=").concat(encodeURIComponent(ek)),{method:"DELETE"}),tu(W("文件已删除","File deleted")),await tv(ew),e6(e=>e+1)}catch(e){tu(e.message)}finally{Q(null)}}}},tU=async e=>{var t;let l=null===(t=e.target.files)||void 0===t?void 0:t[0];if(e.target.value="",e4(e=>e+1),l&&ew){Q("file:import");try{let e=await l.text();await tp("/managed_file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:ew,path:l.name,content:e})}),tu(W("导入完成,已替换同名文件","Import finished and replaced matching file")),eC(l.name),await tv(ew,l.name),e6(e=>e+1)}catch(e){tu(e.message)}finally{Q(null)}}},tL=async(e,t)=>{if(!eR){tu(W("当前没有可用的 ADB 设备","No active ADB device"));return}Q("android:".concat(e));try{let l=await tp("/android/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,serial:eR,payload:t||{}})});tu(l.message||"OK"),l.output&&e$(l.output),eX(Date.now()),await tj(eR)}catch(e){tu(e.message)}finally{Q(null)}},tM="tap"===e0?W("点击","Tap"):"double_tap"===e0?W("双击","Double Tap"):W("长按","Long Press"),tI=async e=>{if(!eR){tu(W("当前没有可用的 ADB 设备","No active ADB device"));return}let t=function(e,t,l){let s,a,r,n;let i=e.getBoundingClientRect(),o=e.naturalWidth,c=e.naturalHeight;if(!o||!c||!i.width||!i.height)return null;let d=i.width/i.height,h=o/c;h>d?(s=i.width,a=i.width/h,r=0,n=(i.height-a)/2):(a=i.height,s=i.height*h,r=(i.width-s)/2,n=0);let x=t-i.left-r,m=l-i.top-n;return x<0||m<0||x>s||m>a?null:{x:Math.max(0,Math.min(o-1,Math.round(x/s*o))),y:Math.max(0,Math.min(c-1,Math.round(m/a*c)))}}(e.currentTarget,e.clientX,e.clientY);if(!t){tu(W("请点击画面有效区域","Tap inside the visible frame"));return}let l=(null==tm?void 0:tm.width)||e.currentTarget.naturalWidth,s=(null==tm?void 0:tm.height)||e.currentTarget.naturalHeight,a=l>0?l/Math.max(1,e.currentTarget.naturalWidth):1,r=s>0?s/Math.max(1,e.currentTarget.naturalHeight):1,n=Math.max(0,Math.min(l||t.x,Math.round(t.x*a))),i=Math.max(0,Math.min(s||t.y,Math.round(t.y*r)));if(e3({x:n,y:i}),"long_press"===e0){await tL("long_press",{x:n,y:i,duration:750});return}await tL(e0,{x:n,y:i})},tF=e=>"shellcrash"===e.service_id&&(null==ed?void 0:ed.control_url)?"".concat(ed.control_url,"/shellcrash?lang=").concat(L):"android_panel"===e.service_id&&(null==ed?void 0:ed.control_url)?"".concat(ed.control_url,"/android?lang=").concat(L):e.url||"",tz=e=>({online:W("在线","Online"),stopped:W("已停止","Stopped"),configured:W("已配置","Configured"),unavailable:W("未安装","Unavailable")})[e]||e,tB="shellcrash"===z?tr:tn,tW={overview:"\uD83D\uDCCA",business:"\uD83C\uDFAC",modules:"\uD83E\uDDE9",shellcrash:"\uD83D\uDEE1️",android:"\uD83E\uDD16",config:"⚙️"};return(0,s.jsxs)(s.Fragment,{children:[P?null:(0,s.jsx)("div",{className:"border-b border-white/[0.08] bg-slate-950/80 backdrop-blur-md",children:(0,s.jsxs)("div",{className:"mx-auto flex max-w-7xl flex-wrap items-center justify-between gap-2 px-4 py-2.5 text-xs sm:px-6 lg:px-10",children:[(0,s.jsxs)("a",{className:"font-medium text-amber-400/95 transition hover:text-amber-300",href:"/",children:["← ",W("返回门户首页","Back to portal")]}),(0,s.jsx)("span",{className:"text-slate-500",children:W("无人直播 \xb7 本页需与 API 同域(推荐 live.local:8001)","Unmanned live \xb7 same origin as API (live.local:8001)")})]})}),(0,s.jsxs)("main",{className:P?"mx-auto min-h-0 max-w-7xl px-1 pb-4 pt-1 sm:px-3":"safe-pb-nav mx-auto min-h-screen max-w-7xl px-4 pb-16 pt-6 sm:px-6 lg:px-10",children:[Z?(0,s.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"animate-toast-in fixed bottom-24 left-1/2 z-50 max-w-[min(92vw,28rem)] -translate-x-1/2 rounded-2xl border border-cyan-500/25 bg-slate-950/95 px-5 py-3 text-center text-sm text-cyan-50 shadow-lg md:bottom-6 [html[data-theme=light]_&]:border-cyan-600/25 [html[data-theme=light]_&]:bg-white/95 [html[data-theme=light]_&]:text-cyan-950",children:Z}):null,P?(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2 border-b border-white/[0.08] pb-3",children:[(0,s.jsx)("h2",{className:"text-base font-semibold text-[color:var(--text)]",children:"ShellCrash"}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void t_(),children:W("刷新","Refresh")})]}):(0,s.jsxs)("header",{className:"mb-8 flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-cyan-400/90",children:W("控制平面 \xb7 ARM Linux 开发板","Control plane \xb7 ARM Linux SBC")}),(0,s.jsx)("h1",{className:"mt-2 text-3xl font-bold text-[color:var(--text)] sm:text-4xl",children:W("无人直播控制中心","Unmanned live control center")}),(0,s.jsx)("p",{className:"mt-3 max-w-3xl text-sm text-slate-400",children:W("ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。","ShellCrash for egress; FFmpeg for stream or HDMI; Neko (Docker Chromium) or host Chromium for browser; USB ADB to AOSP. Modules are isolated.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)("div",{className:"meta-chip max-w-full",children:((null==ed?void 0:ed.mdns_host)||"live.local")+" \xb7 "+((null==ed?void 0:ed.machine)||"unknown")+" \xb7 "+((null==ed?void 0:ed.kernel)||"unknown")}),(0,s.jsx)(C,{className:"zh"===L?"border border-cyan-400/50 bg-cyan-500/10":"border border-white/12 bg-black/20",onClick:()=>M("zh"),children:"中文"}),(0,s.jsx)(C,{className:"en"===L?"border border-cyan-400/50 bg-cyan-500/10":"border border-white/12 bg-black/20",onClick:()=>M("en"),children:"EN"}),(0,s.jsx)(C,{className:"light"===I?"border border-amber-400/50 bg-amber-500/15":"border border-white/12 bg-black/20",onClick:()=>F("light"),title:W("日间主题","Light theme"),children:W("☀️ 日间","☀️ Light")}),(0,s.jsx)(C,{className:"dark"===I?"border border-indigo-400/50 bg-indigo-500/15":"border border-white/12 bg-black/20",onClick:()=>F("dark"),title:W("夜间主题","Dark theme"),children:W("\uD83C\uDF19 夜间","\uD83C\uDF19 Dark")}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void t_(),children:W("刷新","Refresh")})]})]}),(0,s.jsx)("nav",{className:"tab-strip","aria-label":W("主导航","Primary navigation"),children:f.map(e=>(0,s.jsx)("button",{type:"button",className:"tab-btn ".concat(z===e?"tab-btn-active":""),onClick:()=>B(e),children:{overview:W("总览","Overview"),business:W("直播业务","Live ops"),modules:W("系统服务","Services"),shellcrash:"ShellCrash",android:W("安卓设备","Android"),config:W("配置中心","Config")}[e]},e))})]}),K?(0,s.jsx)("div",{className:"glass rounded-3xl py-24 text-center text-slate-400",children:W("正在连接控制台...","Connecting to the control plane...")}):null,!K&&Y?(0,s.jsx)("div",{className:"glass rounded-3xl border border-rose-500/25 bg-rose-950/20 p-8 text-center text-rose-200",children:Y}):null,K||Y?null:(0,s.jsxs)("div",{className:"grid gap-6",children:["overview"===z?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"glass rounded-3xl border border-amber-500/20 bg-gradient-to-br from-amber-500/[0.07] to-transparent p-6",children:[(0,s.jsx)("h2",{className:"section-title",children:W("第一次用?按这条线理解整套板子","New here? Follow this mental model")}),(0,s.jsxs)("ol",{className:"mt-4 list-decimal space-y-2 pl-5 text-sm leading-relaxed text-slate-300",children:[(0,s.jsx)("li",{children:W("插电、接网线或连好 Wi‑Fi 后,用浏览器打开本页(验收域名一般为 http://live.local:8001/ ,门户在根路径 /,控制台在 /console)。","After power and Ethernet/Wi‑Fi, open this stack in a browser (often http://live.local:8001/ — portal at /, full console at /console).")}),(0,s.jsx)("li",{children:W("「直播业务」里启停 PM2 脚本(抖音→YouTube、HDMI 等);「系统服务」看 ShellCrash、SRS、ws-scrcpy、Neko 等是否在跑。","Use Live ops for PM2 scripts; Services for ShellCrash, SRS, ws-scrcpy, Neko, etc.")}),(0,s.jsx)("li",{children:W("「安卓设备」需要 USB 调试授权;截图预览 + ws-scrcpy 低延迟画面二选一或同用。TikTok 等场景常配合板载 AOSP。","Android tab needs USB debugging; use screenshot taps and/or ws-scrcpy. TikTok workflows often use on-board AOSP.")}),(0,s.jsx)("li",{children:W("深度指标点 Netdata;命令行点 WebTTY;代理规则与 YAML 在 ShellCrash 页。","Netdata for metrics; WebTTY for shell; ShellCrash tab for proxy rules and YAML.")})]})]}),(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"section-title",children:W("\uD83D\uDEF0️ 流媒体与桌面入口","Streaming & desktop")}),(0,s.jsx)("p",{className:"section-lead",children:W("ws-scrcpy:浏览器里控安卓;Chromium:本机+油猴+RemoteDebug;Neko:Docker 里跑 Chromium 桌面(非 Firefox 版)。","ws-scrcpy: browser ADB; Chromium: host+Tampermonkey+9222; Neko: Chromium desktop in Docker (not the Firefox image).")}),(0,s.jsxs)("div",{className:"mt-4 flex max-h-[28rem] flex-col gap-2 overflow-y-auto pr-1 log-scroll",children:[(null==ed?void 0:ed.dashboard_url)?(0,s.jsx)("a",{className:"link-tile",href:ed.dashboard_url,target:"_blank",rel:"noreferrer",children:"\uD83C\uDFE0 Homepage"}):null,(null==ed?void 0:ed.control_url)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("a",{className:"link-tile",href:"".concat(ed.control_url,"/console?tab=shellcrash&lang=").concat(L),target:"_blank",rel:"noreferrer",children:"\uD83D\uDEE1️ ShellCrash"}),(0,s.jsxs)("a",{className:"link-tile",href:"".concat(ed.control_url,"/console?tab=android&lang=").concat(L),target:"_blank",rel:"noreferrer",children:["\uD83E\uDD16 ",W("安卓中心 (含 ws-scrcpy)","Android hub + ws-scrcpy")]}),(0,s.jsxs)("a",{className:"link-tile",href:"".concat(ed.control_url,"/console?tab=config&lang=").concat(L),target:"_blank",rel:"noreferrer",children:["⚙️ ",W("配置中心","Config")]})]}):null,tc.ws_scrcpy?(0,s.jsxs)("a",{className:"link-tile link-tile-accent",href:tc.ws_scrcpy,target:"_blank",rel:"noreferrer",children:["\uD83D\uDCF1 ws-scrcpy (",W("原始流控制页","raw stream UI"),")"]}):null,tc.chromium_remote_debug?(0,s.jsxs)("a",{className:"link-tile",href:tc.chromium_remote_debug,target:"_blank",rel:"noreferrer",children:["\uD83E\uDDEA ",W("Chromium RemoteDebug (9222)","Chromium RemoteDebug")]}):null,td.map(e=>(0,s.jsxs)("a",{className:"link-tile link-tile-warn",href:e.url,target:"_blank",rel:"noreferrer",children:["\uD83D\uDC31 ",e.label," / ",W("Docker Chromium 桌面","Docker Chromium desktop")]},e.key)),tc.webtty?(0,s.jsx)("a",{className:"link-tile",href:tc.webtty,target:"_blank",rel:"noreferrer",children:"⌨️ WebTTY"}):null,tc.filebrowser?(0,s.jsx)("a",{className:"link-tile",href:tc.filebrowser,target:"_blank",rel:"noreferrer",children:"\uD83D\uDCC2 File Browser"}):null,tc.netdata?(0,s.jsx)("a",{className:"link-tile",href:tc.netdata,target:"_blank",rel:"noreferrer",children:"\uD83D\uDCC8 Netdata"}):null,tc.srs_http?(0,s.jsx)("a",{className:"link-tile",href:tc.srs_http,target:"_blank",rel:"noreferrer",children:"\uD83C\uDF9E️ SRS :8080"}):null,tc.srs_api?(0,s.jsx)("a",{className:"link-tile",href:tc.srs_api,target:"_blank",rel:"noreferrer",children:"\uD83C\uDF9E️ SRS API :1985"}):null]})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"section-title",children:W("节点状态","Node Status")}),(0,s.jsxs)("div",{className:"panel-inset mt-4",children:[(0,s.jsx)("p",{children:(null==ed?void 0:ed.mdns_host)||"live.local"}),(0,s.jsxs)("p",{className:"mt-2",children:["IP: ",((null==ed?void 0:ed.ips)||[]).join(" / ")||"-"]}),(0,s.jsx)("p",{className:"mt-2",children:(null==ed?void 0:ed.machine)||"-"}),(0,s.jsx)("p",{className:"mt-2",children:(null==ed?void 0:ed.kernel)||"-"})]})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"section-title",children:W("系统快照","System Snapshot")}),(0,s.jsx)("p",{className:"section-lead",children:W("总览页每 10 秒自动刷新服务与监控数据。","Overview auto-refreshes every 10s.")}),(0,s.jsxs)("div",{className:"panel-inset mt-4",children:[(0,s.jsxs)("p",{children:["CPU:"," ",[null==eu?void 0:null===(t=eu.cpu_load)||void 0===t?void 0:t["1m"],null==eu?void 0:null===(l=eu.cpu_load)||void 0===l?void 0:l["5m"],null==eu?void 0:null===(i=eu.cpu_load)||void 0===i?void 0:i["15m"]].map(e=>"number"==typeof e?e.toFixed(2):"0.00").join(" / ")]}),(0,s.jsxs)("p",{className:"mt-2",children:["RAM: ",y(null==eu?void 0:null===(o=eu.memory)||void 0===o?void 0:o.available)," / ",y(null==eu?void 0:null===(c=eu.memory)||void 0===c?void 0:c.total)]}),(0,s.jsxs)("p",{className:"mt-2",children:["Disk: ",y(null==eu?void 0:null===(d=eu.disk)||void 0===d?void 0:d.free)," / ",y(null==eu?void 0:null===(h=eu.disk)||void 0===h?void 0:h.total)]}),(0,s.jsxs)("p",{className:"mt-2",children:["Netdata: ",(null==eu?void 0:null===(x=eu.netdata)||void 0===x?void 0:x.available)?eu.netdata.version||"online":"offline"]})]}),(0,s.jsx)(n.Z,{snapshot:eu,theme:I,tr:W})]})]}),(0,s.jsxs)("section",{className:"glass rounded-3xl p-6",children:[(0,s.jsx)("h2",{className:"section-title",children:W("模块概况","Module Summary")}),(0,s.jsx)("div",{className:"mt-4 grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:ex.map(e=>(0,s.jsxs)("div",{className:"service-card",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:e.label}),(0,s.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:e.description})]}),(0,s.jsx)("span",{className:"rounded-full border px-2.5 py-1 text-xs ".concat(k(e.status)),children:tz(e.status)})]}),(0,s.jsx)("p",{className:"mt-3 min-h-[3rem] text-xs text-slate-500",children:e.detail||"-"}),tF(e)?(0,s.jsx)("a",{className:"btn-focus mt-3 inline-flex rounded-xl border border-white/12 px-3 py-2 text-xs text-slate-200",href:tF(e),target:"_blank",rel:"noreferrer",children:W("打开","Open")}):null]},e.service_id))})]})]}):null,"business"===z?(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-12",children:[(0,s.jsx)("h2",{className:"section-title",children:W("⚡ 快捷配置","Quick config")}),(0,s.jsx)("p",{className:"section-lead",children:W("跳转配置中心编辑推流与录制相关文件。","Jump to the config editor for stream keys and URLs.")}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"border border-cyan-500/30 bg-cyan-600/80",onClick:()=>tC("app-config","youtube.ini"),children:"youtube.ini"}),(0,s.jsx)(C,{className:"border border-cyan-500/30 bg-cyan-600/80",onClick:()=>tC("app-config","URL_config.ini"),children:"URL_config.ini"}),(0,s.jsx)(C,{className:"border border-white/15 bg-black/30",onClick:()=>tC("app-config","config.ini"),children:"config.ini"}),(0,s.jsx)(C,{className:"border border-white/15 bg-black/30",onClick:()=>tC("stack-config","system-stack.env"),children:"system-stack.env"})]})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"section-title",children:W("业务运行时","Business Runtime")}),(0,s.jsx)("p",{className:"section-lead",children:W("这里只放业务脚本本身,Hub 基座可单独运行。","Only business processes live here.")}),ee.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("select",{className:"field-select mt-4",value:el,onChange:e=>es(e.target.value),children:ee.map(e=>(0,s.jsxs)("option",{value:e.pm2,children:[e.label," | ",e.script]},e.pm2))}),(0,s.jsxs)("div",{className:"mt-4 flex items-center justify-between rounded-2xl border border-white/8 bg-black/20 px-4 py-3",children:[(0,s.jsx)("span",{className:"rounded-full border px-3 py-1 text-xs ".concat(k(ea)),children:tz(ea)}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void tg(),children:W("轮询","Poll")})]}),(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[(0,s.jsx)(C,{className:"bg-emerald-600",disabled:"process:start"===G,onClick:()=>void tD("start"),children:"process:start"===G?W("启动中...","Starting..."):W("启动","Start")}),(0,s.jsx)(C,{className:"bg-amber-600",disabled:"process:restart"===G,onClick:()=>void tD("restart"),children:"process:restart"===G?W("重启中...","Restarting..."):W("重启","Restart")}),(0,s.jsx)(C,{className:"col-span-2 bg-rose-600",disabled:"process:stop"===G,onClick:()=>void tD("stop"),children:"process:stop"===G?W("停止中...","Stopping..."):W("停止","Stop")})]})]}):(0,s.jsx)("div",{className:"mt-4 rounded-2xl border border-dashed border-white/12 bg-black/20 p-4 text-sm text-slate-400",children:W("未发现业务进程。若只部署了 Hub 基座,这是正常状态。","No business process discovered.")})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-8",children:[(0,s.jsx)("h2",{className:"section-title",children:W("业务日志","Process Logs")}),(0,s.jsxs)("div",{className:"mt-4 grid gap-4 lg:grid-cols-2",children:[(0,s.jsx)("pre",{className:"log-scroll min-h-[22rem] rounded-2xl border border-emerald-500/15 bg-black/55 p-4 font-mono text-[11px] text-emerald-100/95",children:en||W("暂无输出","No stdout yet.")}),(0,s.jsx)("pre",{className:"log-scroll min-h-[22rem] rounded-2xl border border-rose-500/15 bg-black/55 p-4 font-mono text-[11px] text-rose-100/95",children:eo||W("暂无报错","No stderr yet.")})]})]})]}):null,"modules"===z?(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-8",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"section-title",children:W("系统模块","System Modules")}),(0,s.jsx)("p",{className:"section-lead",children:W("每个模块都独立启停和降级,避免一个服务异常拖垮整套业务。","Each module starts and degrades independently.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void tf(),children:W("刷新服务","Refresh Services")}),(0,s.jsx)(C,{className:"border border-violet-500/35 bg-violet-600/70",disabled:"hardware:probe"===G,onClick:()=>void tS(),children:"hardware:probe"===G?W("探测中…","Probing…"):W("重探测硬件","Re-probe HW")})]})]}),(0,s.jsx)("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:ex.map(e=>(0,s.jsxs)("div",{className:"service-card",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:e.label}),(0,s.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:e.description})]}),(0,s.jsx)("span",{className:"rounded-full border px-2.5 py-1 text-xs ".concat(k(e.status)),children:tz(e.status)})]}),(0,s.jsx)("p",{className:"mt-3 min-h-[3rem] text-xs text-slate-500",children:e.detail||"-"}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"bg-emerald-600",disabled:!e.available||!!G,onClick:()=>void tE(e.service_id,"start"),children:W("启动","Start")}),(0,s.jsx)(C,{className:"bg-amber-600",disabled:!e.available||!!G,onClick:()=>void tE(e.service_id,"restart"),children:W("重启","Restart")}),(0,s.jsx)(C,{className:"bg-rose-600",disabled:!e.available||!!G,onClick:()=>void tE(e.service_id,"stop"),children:W("停止","Stop")}),tF(e)?(0,s.jsx)("a",{className:"btn-focus rounded-xl border border-white/12 px-3 py-2 text-xs text-slate-200",href:tF(e),target:"_blank",rel:"noreferrer",children:W("打开","Open")}):null]})]},e.service_id))})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("硬件与系统","Hardware and System")}),(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 p-4 text-xs text-slate-400",children:[(0,s.jsxs)("p",{children:["Arch: ",(null==eb?void 0:eb.arch)||"-"]}),(0,s.jsxs)("p",{className:"mt-2",children:["FFmpeg: ",((null==eb?void 0:eb.ffmpeg_hwaccels)||[]).join(", ")||"-"]}),(0,s.jsxs)("p",{className:"mt-2",children:["GPU: ",(null==eb?void 0:null===(g=eb.gpu)||void 0===g?void 0:g.present)?eb.gpu.driver||"present":"none"]}),(0,s.jsxs)("p",{className:"mt-2",children:["NPU: ",(null==eb?void 0:null===(S=eb.npu)||void 0===S?void 0:S.present)?(eb.npu.devices||[]).join(", "):"none"]}),(0,s.jsxs)("p",{className:"mt-2",children:["Decoder: ",(null==eb?void 0:null===(_=eb.recommendation)||void 0===_?void 0:_.video_decoder)||"cpu"]}),(0,s.jsxs)("p",{className:"mt-2",children:["HDMI: ",(null==eb?void 0:null===(D=eb.recommendation)||void 0===D?void 0:D.hdmi_player)||"cpu"]}),(0,s.jsxs)("p",{className:"mt-2",children:["Mode: ",(null==eb?void 0:null===(E=eb.recommendation)||void 0===E?void 0:E.stability_mode)||"safe"]})]})]})]}):null,"shellcrash"===z?(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:"ShellCrash"}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("这里不再依赖命令行菜单,直接做 YAML / JSON / CFG 编辑与服务控制。","Manage ShellCrash from the web instead of the shell menu.")}),ti?(0,s.jsxs)("div",{className:"mt-4 rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:ti.label}),(0,s.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:ti.description})]}),(0,s.jsx)("span",{className:"rounded-full border px-2.5 py-1 text-xs ".concat(k(ti.status)),children:tz(ti.status)})]}),(0,s.jsx)("p",{className:"mt-3 text-xs text-slate-500",children:ti.detail||"-"}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"bg-emerald-600",disabled:!ti.available||!!G,onClick:()=>void tE("shellcrash","start"),children:W("启动","Start")}),(0,s.jsx)(C,{className:"bg-amber-600",disabled:!ti.available||!!G,onClick:()=>void tE("shellcrash","restart"),children:W("重启","Restart")}),(0,s.jsx)(C,{className:"bg-rose-600",disabled:!ti.available||!!G,onClick:()=>void tE("shellcrash","stop"),children:W("停止","Stop")}),(0,s.jsx)(C,{className:"bg-sky-600",disabled:!ti.available||!!G,onClick:()=>void tA(w),children:"shellcrash:apply"===G?W("应用中...","Applying..."):W("应用默认配置","Apply Default")}),(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!ti.available||!!G,onClick:()=>void tO(),children:"shellcrash:web_panel"===G?W("部署中...","Deploying..."):W("web面板","Web Panel")})]})]}):null,(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-sky-400/20 bg-sky-500/10 p-4 text-xs text-sky-100",children:[(0,s.jsx)("p",{className:"font-semibold",children:W("默认代理节点","Default proxy node")}),(0,s.jsx)("p",{className:"mt-2 break-all font-mono text-[11px] text-sky-200",children:j}),(0,s.jsx)("p",{className:"mt-2 text-sky-100/80",children:W("应用后会写入 config.yaml、重启 ShellCrash,并把包含该节点的选择组切到此节点。","Applying writes config.yaml, restarts ShellCrash, and selects this node in matching groups.")})]}),(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 p-4 text-xs text-slate-400",children:[(0,s.jsx)("p",{className:"text-white",children:W("快捷文件","Quick Files")}),(0,s.jsxs)("div",{className:"mt-3 grid gap-2",children:[(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-left text-slate-200",onClick:()=>void tk("shellcrash-yamls",w),children:w}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-left text-slate-200",onClick:()=>void tk("shellcrash-yamls","config.yaml"),children:"config.yaml"}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-left text-slate-200",onClick:()=>void tk("shellcrash-configs","ShellCrash.cfg"),children:"ShellCrash.cfg"}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-left text-slate-200",onClick:()=>void tk("shellcrash-configs","servers.list"),children:"servers.list"}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-left text-slate-200",onClick:()=>void tk("shellcrash-configs","command.env"),children:"command.env"})]})]})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-8",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("ShellCrash 文件编辑器","ShellCrash Editor")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("支持查看、修改、新建、删除,路径被限制在 ShellCrash 托管目录内。","View, edit, create and delete files inside managed ShellCrash roots.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)("label",{className:"btn-focus rounded-xl border border-white/12 px-3 py-2 text-xs text-slate-100 ".concat(G?"cursor-not-allowed opacity-40":""),children:["file:import"===G?W("导入中...","Importing..."):W("导入/替换","Import/Replace"),(0,s.jsx)("input",{className:"hidden",disabled:!!G,type:"file",accept:".yaml,.yml,.json,.cfg,.env,.list,.txt",onChange:e=>void tU(e)},e5)]}),(0,s.jsx)(C,{className:"bg-sky-600",disabled:"shellcrash-yamls"!==ew||!ek||!!G,onClick:()=>void tA(ek),children:"shellcrash:apply"===G?W("应用中...","Applying..."):W("应用当前 YAML","Apply YAML")}),(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!ek||!!G,onClick:()=>void tR(),children:"file:save"===G?W("保存中...","Saving..."):W("保存","Save")})]})]}),(0,s.jsxs)("div",{className:"mt-4 grid gap-6 xl:grid-cols-[18rem,1fr]",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("select",{className:"w-full rounded-2xl border border-white/12 bg-slate-950/60 px-4 py-3 text-sm text-white",value:ew,onChange:e=>{ej(e.target.value),eC("")},children:tr.map(e=>(0,s.jsxs)("option",{value:e.root_id,children:[e.label," | ",e.file_count]},e.root_id))}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!!G,onClick:()=>void tP(),children:W("新建","New")}),(0,s.jsx)(C,{className:"bg-rose-600",disabled:!ek||!!G,onClick:()=>void tT(),children:W("删除","Delete")})]}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:eN.map(e=>(0,s.jsxs)("button",{className:"btn-focus w-full rounded-2xl border px-4 py-3 text-left ".concat(ek===e.path?"border-cyan-500/40 bg-cyan-500/10":"border-white/8 bg-black/20"),onClick:()=>eC(e.path),children:[(0,s.jsx)("div",{className:"truncate text-sm text-white",children:e.path}),(0,s.jsx)("div",{className:"mt-1 text-[11px] text-slate-500",children:y(e.size)})]},e.path))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"rounded-2xl border border-white/8 bg-black/20 px-4 py-3 font-mono text-[11px] text-slate-500",children:ek?"".concat(ew," / ").concat(ek):W("请选择文件","Pick a file")}),(0,s.jsx)("textarea",{className:"log-scroll mt-4 min-h-[32rem] w-full resize-y rounded-2xl border border-white/10 bg-black/45 p-4 font-mono text-xs leading-relaxed text-slate-200",spellCheck:!1,value:eS,onChange:e=>e_(e.target.value)})]})]})]})]}):null,"android"===z?(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("安卓设备中心","Android Device Center")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("把设备发现、截图预览、ADB 动作和原始 web-scrcpy 放到一个模块里。","Combine discovery, preview, ADB actions and raw web-scrcpy in one module.")})]}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void(async()=>{let e=await tw();e&&await Promise.all([tj(e),ty(e),tN(e)]),eX(Date.now())})(),children:W("刷新设备","Refresh")})]}),(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 p-4",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-white",children:W("已连接设备","Devices")}),eD&&0!==eA.length?(0,s.jsx)("div",{className:"mt-3 space-y-2",children:eA.map(e=>(0,s.jsxs)("button",{className:"btn-focus w-full rounded-2xl border px-4 py-3 text-left ".concat(eR===e.serial?"border-cyan-500/40 bg-cyan-500/10":"border-white/8 bg-black/20"),onClick:()=>{eP(e.serial),Promise.all([tj(e.serial),ty(e.serial),tN(e.serial)]),eX(Date.now())},children:[(0,s.jsx)("div",{className:"text-sm text-white",children:e.model||e.device||e.serial}),(0,s.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500",children:[e.serial," | ",e.state]})]},e.serial))}):(0,s.jsx)("p",{className:"mt-3 text-sm text-slate-400",children:W("当前没有可用的 ADB 设备。","No active ADB device.")})]}),(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 p-4 text-xs text-slate-400",children:[(0,s.jsx)("p",{className:"text-white",children:W("设备状态","Device Status")}),(0,s.jsxs)("p",{className:"mt-2",children:[(null==eT?void 0:eT.brand)||"-"," ",(null==eT?void 0:eT.model)||"-"]}),(0,s.jsxs)("p",{className:"mt-2",children:["Android ",(null==eT?void 0:eT.android_version)||"-"," / SDK ",(null==eT?void 0:eT.sdk)||"-"]}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-wrap",children:(null==eT?void 0:eT.battery)||"-"}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-wrap",children:(null==eT?void 0:eT.resolution)||"-"}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-wrap",children:(null==eT?void 0:eT.focus)||"-"})]})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-8",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("屏幕预览与动作","Screen Preview and Actions")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("预览图支持直接点按/双击/长按,配合 UI 节点和包管理形成更完整的安卓控制台。","The preview supports tap, double tap and long press, backed by UI nodes and package tools.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"border border-white/12 ".concat("tap"===e0?"bg-cyan-600":"bg-black/20"),disabled:!eR||!!G,onClick:()=>e2("tap"),children:W("点击","Tap")}),(0,s.jsx)(C,{className:"border border-white/12 ".concat("double_tap"===e0?"bg-cyan-600":"bg-black/20"),disabled:!eR||!!G,onClick:()=>e2("double_tap"),children:W("双击","Double Tap")}),(0,s.jsx)(C,{className:"border border-white/12 ".concat("long_press"===e0?"bg-cyan-600":"bg-black/20"),disabled:!eR||!!G,onClick:()=>e2("long_press"),children:W("长按","Long Press")}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",disabled:!eR,onClick:()=>eX(Date.now()),children:W("刷新截图","Refresh Shot")})]})]}),(0,s.jsx)("div",{className:"mt-4 overflow-hidden rounded-3xl border border-white/8 bg-black/35 p-4",children:eR?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-3 text-xs text-slate-400",children:[(0,s.jsxs)("span",{children:[W("当前动作","Current action"),": ",tM]}),(0,s.jsxs)("span",{children:[W("分辨率","Resolution"),": ",(null==eT?void 0:eT.resolution)||"-"]}),(0,s.jsxs)("span",{children:[W("最近坐标","Last point"),": ",e1?"".concat(e1.x,", ").concat(e1.y):"-"]}),tl?(0,s.jsx)("span",{className:"text-cyan-400/90",children:W("截图刷新中…","Refreshing…")}):null]}),te?(0,s.jsxs)("div",{className:"mb-3 rounded-xl border border-rose-500/30 bg-rose-950/25 px-4 py-3 text-sm text-rose-100",children:[W("截图不可用:","Screenshot unavailable: "),te]}):null,e9?(0,s.jsx)(a.default,{alt:"Android preview",className:"max-h-[min(70vh,48rem)] min-h-[14rem] w-full cursor-crosshair rounded-2xl object-contain bg-black",onClick:e=>void tI(e),src:e9,unoptimized:!0,width:(null==tm?void 0:tm.width)||1080,height:(null==tm?void 0:tm.height)||1920}):te?null:(0,s.jsx)("div",{className:"flex min-h-[18rem] items-center justify-center rounded-2xl border border-dashed border-white/10 bg-black/30 text-sm text-slate-500",children:W("正在拉取截图…","Fetching screenshot…")})]}):(0,s.jsx)("div",{className:"flex min-h-[18rem] items-center justify-center rounded-2xl border border-dashed border-white/10 bg-black/20 text-sm text-slate-500",children:W("当前没有可用的 ADB 设备。","No active ADB device.")})}),(0,s.jsxs)("div",{className:"mt-6 grid gap-6 xl:grid-cols-3",children:[(0,s.jsxs)("div",{className:"rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:W("快捷控制","Quick Controls")}),(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-3 gap-2",children:[[["HOME","KEYCODE_HOME"],["BACK","KEYCODE_BACK"],["RECENTS","KEYCODE_APP_SWITCH"],["POWER","KEYCODE_POWER"],["NOTIFY","KEYCODE_NOTIFICATION"],["VOL+","KEYCODE_VOLUME_UP"],["VOL-","KEYCODE_VOLUME_DOWN"]].map(e=>{let[t,l]=e;return(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-3 text-xs text-slate-100",disabled:!eR||!!G,onClick:()=>void tL("key",{keycode:l}),children:t},t)}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-3 text-xs text-slate-100",disabled:!eR||!!G,onClick:()=>void tL("wake"),children:"WAKE"}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-3 text-xs text-slate-100",disabled:!eR||!!G,onClick:()=>void tL("rotate",{rotation:"0"}),children:"Portrait"}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-3 text-xs text-slate-100",disabled:!eR||!!G,onClick:()=>void tL("rotate",{rotation:"1"}),children:"Landscape"})]}),(0,s.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-2",children:["up","down","left","right"].map(e=>(0,s.jsxs)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-3 text-xs uppercase text-slate-100",disabled:!eR||!!G,onClick:()=>void tL("swipe",{direction:e}),children:["Swipe ",e]},e))})]}),(0,s.jsxs)("div",{className:"rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:W("输入与跳转","Input and Launch")}),(0,s.jsx)("textarea",{className:"mt-4 min-h-[6rem] w-full rounded-2xl border border-white/10 bg-black/45 p-4 text-sm text-slate-200",placeholder:W("输入要发送到安卓输入框的文字","Text to send to Android"),value:eW,onChange:e=>eK(e.target.value)}),(0,s.jsx)(C,{className:"mt-3 bg-cyan-600",disabled:!eW.trim()||!eR||!!G,onClick:()=>void tL("text",{text:eW}),children:W("发送文本","Send Text")}),(0,s.jsx)("input",{className:"mt-4 w-full rounded-2xl border border-white/10 bg-black/45 px-4 py-3 text-sm text-slate-200",placeholder:"com.zhiliaoapp.musically",value:eH,onChange:e=>eY(e.target.value)}),(0,s.jsxs)("div",{className:"mt-3 grid grid-cols-3 gap-2",children:[(0,s.jsx)(C,{className:"bg-emerald-600",disabled:!eH.trim()||!eR||!!G,onClick:()=>void tL("launch_package",{package:eH}),children:W("启动","Launch")}),(0,s.jsx)(C,{className:"bg-amber-600",disabled:!eH.trim()||!eR||!!G,onClick:()=>void tL("force_stop",{package:eH}),children:W("停应用","Stop App")}),(0,s.jsx)(C,{className:"bg-rose-600",disabled:!eH.trim()||!eR||!!G,onClick:()=>void tL("clear_app",{package:eH}),children:W("清数据","Clear Data")})]}),(0,s.jsx)("input",{className:"mt-4 w-full rounded-2xl border border-white/10 bg-black/45 px-4 py-3 text-sm text-slate-200",placeholder:"https://www.tiktok.com",value:eJ,onChange:e=>eZ(e.target.value)}),(0,s.jsx)(C,{className:"mt-3 bg-violet-600",disabled:!eJ.trim()||!eR||!!G,onClick:()=>void tL("open_url",{url:eJ}),children:W("打开链接","Open URL")})]}),(0,s.jsxs)("div",{className:"rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:W("应用工作台","App Workspace")}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",disabled:!eR||!!G,onClick:()=>void ty(eR),children:W("刷新UI","Refresh UI")})]}),(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:[["TikTok","com.zhiliaoapp.musically"],["Chrome","com.android.chrome"],["Settings","com.android.settings"],["YouTube","com.google.android.youtube"],["Play","com.android.vending"]].map(e=>{let[t,l]=e;return(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-2 text-xs text-slate-100",disabled:!eR||!!G,onClick:()=>{eY(l),tL("launch_package",{package:l})},children:t},l)})}),(0,s.jsxs)("div",{className:"mt-4 flex gap-2",children:[(0,s.jsx)("input",{className:"w-full rounded-2xl border border-white/10 bg-black/45 px-4 py-3 text-sm text-slate-200",placeholder:W("搜索包名,例如 tiktok","Search package, e.g. tiktok"),value:ez,onChange:e=>eB(e.target.value)}),(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!eR||!!G,onClick:()=>void tN(eR),children:W("搜索","Search")})]}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:0===eI.length?(0,s.jsx)("div",{className:"rounded-2xl border border-dashed border-white/10 px-4 py-6 text-sm text-slate-500",children:W("还没有查询结果。","No package results yet.")}):eI.slice(0,8).map(e=>(0,s.jsxs)("div",{className:"rounded-2xl border border-white/8 bg-slate-950/30 p-3",children:[(0,s.jsx)("div",{className:"text-sm text-white",children:e.label||e.package.split(".").pop()}),(0,s.jsx)("div",{className:"mt-1 truncate font-mono text-[11px] text-slate-500",children:e.package}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-xs text-slate-200",disabled:!eR||!!G,onClick:()=>{eY(e.package),tL("launch_package",{package:e.package})},children:W("启动","Launch")}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-xs text-slate-200",disabled:!eR||!!G,onClick:()=>{eY(e.package),tL("force_stop",{package:e.package})},children:W("停应用","Stop")}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-xs text-slate-200",disabled:!eR||!!G,onClick:()=>{eY(e.package),tL("clear_app",{package:e.package})},children:W("清数据","Clear")})]})]},e.package))})]})]}),(0,s.jsxs)("div",{className:"mt-6 grid gap-6 xl:grid-cols-[0.95fr,1.05fr]",children:[(0,s.jsxs)("div",{className:"rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:"ADB Shell"}),(0,s.jsxs)("div",{className:"mt-4 flex flex-col gap-3 lg:flex-row",children:[(0,s.jsx)("input",{className:"w-full rounded-2xl border border-white/10 bg-black/45 px-4 py-3 text-sm text-slate-200",placeholder:"input keyevent KEYCODE_HOME",value:eV,onChange:e=>eG(e.target.value)}),(0,s.jsx)(C,{className:"bg-amber-600",disabled:!eV.trim()||!eR||!!G,onClick:()=>void tL("shell",{command:eV}),children:W("执行命令","Run Command")})]}),(0,s.jsx)("pre",{className:"log-scroll mt-4 min-h-[14rem] rounded-2xl border border-white/10 bg-black/45 p-4 font-mono text-[11px] text-slate-200",children:eQ||W("动作结果会显示在这里。","Action output will appear here.")})]}),(0,s.jsxs)("div",{className:"rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:W("UI 节点","UI Nodes")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("用 uiautomator 抓当前页面结构,快速定位可点击元素。","Inspect the current UI hierarchy and act on clickable nodes.")})]}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",disabled:!eR||!!G,onClick:()=>void ty(eR),children:W("刷新节点","Refresh Nodes")})]}),(0,s.jsx)("div",{className:"mt-4 space-y-3",children:0===eL.length?(0,s.jsx)("div",{className:"rounded-2xl border border-dashed border-white/10 px-4 py-6 text-sm text-slate-500",children:W("还没有抓到 UI 节点。","No UI nodes yet.")}):eL.slice(0,12).map((e,t)=>(0,s.jsxs)("div",{className:"rounded-2xl border border-white/8 bg-slate-950/30 p-3",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-white",children:e.label||e.resource_id||e.class_name||"node"}),(0,s.jsx)("div",{className:"mt-1 text-[11px] text-slate-500",children:e.resource_id||e.class_name||"-"}),(0,s.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500",children:[e.bounds," | ",e.center_x,",",e.center_y]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-xs text-slate-200",disabled:!eR||!!G,onClick:()=>void tL("tap",{x:e.center_x,y:e.center_y}),children:W("点击","Tap")}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-xs text-slate-200",disabled:!eR||!!G,onClick:()=>void tL("long_press",{x:e.center_x,y:e.center_y,duration:750}),children:W("长按","Long Press")})]})]}),e.text||e.content_desc?(0,s.jsx)("div",{className:"mt-2 whitespace-pre-wrap text-xs text-slate-400",children:e.text||e.content_desc}):null]},"".concat(e.resource_id||e.label,"-").concat(t)))})]})]}),tx?(0,s.jsxs)("div",{className:"mt-6 rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:"ws-scrcpy"}),(0,s.jsx)("a",{className:"btn-focus rounded-xl border border-white/12 px-3 py-2 text-xs text-slate-200",href:tx,target:"_blank",rel:"noreferrer",children:W("新标签全屏打开","Open full tab")})]}),(0,s.jsx)("p",{className:"mt-2 text-xs leading-relaxed text-slate-500",children:W(th?"内嵌若黑屏:多为 WebSocket 未连上或服务未启动。请先确认「系统服务」里 android_panel 在线,并尝试新标签打开;Neko(Chromium)实例通常为 ".concat(th,"。"):"内嵌若黑屏:多为 WebSocket 未连上或服务未启动。请先确认「系统服务」里 android_panel 在线,并尝试新标签打开;Neko(Chromium)在 ENABLE_NEKO=1 且容器运行后一般为 9200 端口。",th?"Black iframe: often WebSocket or service down. Check android_panel in Services, try opening in a new tab; Neko Chromium instances are usually on ".concat(th,"."):"Black iframe: often WebSocket or service down. Check android_panel in Services, try opening in a new tab; Neko Chromium is often :9200 when ENABLE_NEKO=1 and the container is up.")}),(0,s.jsx)("iframe",{className:"mt-4 h-[30rem] w-full rounded-2xl border border-white/10 bg-black",src:tx,title:"ws-scrcpy"})]}):null]})]}):null,"config"===z?(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("配置中心","Config Center")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("系统级与业务级配置文件分目录托管,避免大杂烩。","System and business configs are isolated by managed roots.")})]}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void tv(ew),children:W("刷新","Refresh")})]}),(0,s.jsx)("select",{className:"mt-4 w-full rounded-2xl border border-white/12 bg-slate-950/60 px-4 py-3 text-sm text-white",value:ew,onChange:e=>{ej(e.target.value),eC("")},children:tB.map(e=>(0,s.jsxs)("option",{value:e.root_id,children:[e.label," | ",e.file_count]},e.root_id))}),ta?(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 p-4 text-xs text-slate-400",children:[(0,s.jsx)("p",{className:"text-white",children:ta.label}),(0,s.jsx)("p",{className:"mt-2",children:ta.description}),(0,s.jsx)("p",{className:"mt-2 font-mono text-[11px] text-slate-500",children:ta.path})]}):null,(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!!G,onClick:()=>void tP(),children:W("新建","New")}),(0,s.jsx)(C,{className:"bg-rose-600",disabled:!ek||!!G,onClick:()=>void tT(),children:W("删除","Delete")})]}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:eN.map(e=>(0,s.jsxs)("button",{className:"btn-focus w-full rounded-2xl border px-4 py-3 text-left ".concat(ek===e.path?"border-cyan-500/40 bg-cyan-500/10":"border-white/8 bg-black/20"),onClick:()=>eC(e.path),children:[(0,s.jsx)("div",{className:"truncate text-sm text-white",children:e.path}),(0,s.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500",children:[y(e.size)," | ",new Date(1e3*e.mtime).toLocaleString("zh"===L?"zh-CN":"en-US",{hour12:!1})]})]},e.path))})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-8",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("文件编辑器","Config Editor")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("仅允许编辑受管目录中的配置文件。","Only approved config roots are editable.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)("label",{className:"btn-focus rounded-xl border border-white/12 px-3 py-2 text-xs text-slate-100 ".concat(G?"cursor-not-allowed opacity-40":""),children:["file:import"===G?W("导入中...","Importing..."):W("导入/替换","Import/Replace"),(0,s.jsx)("input",{className:"hidden",disabled:!!G,type:"file",accept:".yaml,.yml,.json,.cfg,.env,.list,.txt,.ini",onChange:e=>void tU(e)},"config-".concat(e5))]}),(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!ek||!!G,onClick:()=>void tR(),children:"file:save"===G?W("保存中...","Saving..."):W("保存","Save")})]})]}),(0,s.jsx)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 px-4 py-3 font-mono text-[11px] text-slate-500",children:ek?"".concat(ew," / ").concat(ek):W("请选择文件","Pick a file")}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(m,{lang:L,rootId:ew,filePath:ek,fileContent:eS,refreshKey:e8,busy:G,fetchJson:tp,notify:tu,onChangeContent:e_,onRefreshListing:()=>tv(ew,ek)})}),(0,s.jsx)("textarea",{className:"log-scroll mt-4 min-h-[32rem] w-full resize-y rounded-2xl border border-white/10 bg-black/45 p-4 font-mono text-xs leading-relaxed text-slate-200",spellCheck:!1,value:eS,onChange:e=>e_(e.target.value)})]})]}):null]})]}),P?null:(0,s.jsx)("nav",{className:"fixed bottom-0 left-0 right-0 z-40 flex justify-around border-t border-white/15 bg-black/75 py-1.5 backdrop-blur-lg [html[data-theme=light]_&]:border-slate-200/60 [html[data-theme=light]_&]:bg-white/90 md:hidden",style:{paddingBottom:"max(0.35rem, env(safe-area-inset-bottom))"},"aria-label":W("主导航","Main nav"),children:f.map(e=>(0,s.jsxs)("button",{type:"button",className:"btn-focus flex min-w-0 flex-1 flex-col items-center gap-0.5 rounded-xl px-1 py-1 text-[10px] font-medium ".concat(z===e?"text-cyan-300 [html[data-theme=light]_&]:text-cyan-700":"text-slate-400 [html[data-theme=light]_&]:text-slate-600"),onClick:()=>B(e),children:[(0,s.jsx)("span",{className:"text-lg leading-none","aria-hidden":!0,children:tW[e]}),(0,s.jsx)("span",{className:"truncate",children:{overview:W("总览","Home"),business:W("业务","Biz"),modules:W("模块","Mods"),shellcrash:"SC",android:W("安卓","Droid"),config:W("配置","Cfg")}[e]})]},e))})]})}},1387:function(e,t,l){function s(e,t,l){return"string"==typeof(null==l?void 0:l.error)&&l.error.trim()||"string"==typeof(null==l?void 0:l.message)&&l.message.trim()||"string"==typeof(null==l?void 0:l.detail)&&l.detail.trim()||function(e){let t=e.replace(/\s+/g," ").trim();return t?t.length<=240?t:"".concat(t.slice(0,237),"..."):""}(t)||function(e){var t;let l=(null===(t=e.statusText)||void 0===t?void 0:t.trim())?" ".concat(e.statusText.trim()):"";return"HTTP ".concat(e.status).concat(l)}(e)}async function a(e,t){let l=await fetch(e,{cache:"no-store",...t}),a=(await l.text()).trim(),r=null;if(a)try{r=JSON.parse(a)}catch(t){if(!l.ok)throw Error(s(l,a,null));throw Error("Invalid JSON response from ".concat(e))}if(!l.ok)throw Error(s(l,a,r));return null!==r?r:{}}async function r(e){let t=(await e.text()).trim(),l=null;if(t)try{l=JSON.parse(t)}catch(e){l=null}return s(e,t,l)}l.d(t,{N:function(){return a},e:function(){return r}})},90:function(e,t,l){l.d(t,{O0:function(){return r},Tc:function(){return i},U_:function(){return n}});let s=/^neko_browser(?:(?:_(lan|wireguard|nat1to1|public))?(?:_(\d+))?)?$/i,a={wireguard:80,public:70,nat1to1:60,lan:50,direct:40};function r(e){let t=new Map;for(let[n,i]of Object.entries(null!=e?e:{})){var l,r;let e=n.match(s),o=i.trim();if(!e||!o)continue;let c=(e[1]||("neko_browser"===n||/^neko_browser_\d+$/i.test(n)?"direct":"lan")).toLowerCase(),d="neko_browser"===n?1:Number(e[2]||1),h={id:d,key:n,label:"Neko ".concat(d),url:o,port:function(e){try{return new URL(e,"http://127.0.0.1").port||""}catch(e){return""}}(o),accessKind:c,accessLabel:"wireguard"===c?"WireGuard":"public"===c?"Public":"nat1to1"===c?"NAT1TO1":"lan"===c?"LAN":"Direct",host:function(e){try{return new URL(e,"http://127.0.0.1").hostname||""}catch(e){return""}}(o)},x=t.get(d),m=x?null!==(l=a[x.accessKind])&&void 0!==l?l:0:-1,u=null!==(r=a[c])&&void 0!==r?r:0,p=!x||u>m||u===m&&"neko_browser"!==n;(!x||p)&&t.set(d,h)}return Array.from(t.values()).sort((e,t)=>e.id-t.id)}function n(e,t){return e.length?!Number.isInteger(t)||t<0?{link:e[0],fallback:!1}:te.port).filter(Boolean)));return t.length?t.map(e=>":".concat(e)).join(" / "):""}},8401:function(e,t,l){l.d(t,{p:function(){return s}});function s(e){let t=e.trim();if(!t)return t;try{let e=new URL(t,window.location.origin),l=e.hostname,s=window.location.hostname;if("0.0.0.0"===l||"::"===l||"[::]"===l)return e.hostname=s||l,e.toString();if(("127.0.0.1"===l||"localhost"===l)&&s&&"127.0.0.1"!==s&&"localhost"!==s)return e.hostname=s,e.toString();if(l.endsWith(".local")&&"8001"===e.port)return"".concat(e.pathname||"/").concat(e.search).concat(e.hash);if(l.endsWith(".local")&&s&&s!==l)return e.hostname=s,e.toString();return t}catch(e){return t}}}}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/chunks/246-a56380dcf5ea0340.js b/d2ypp2/web-console/out/_next/static/chunks/246-a56380dcf5ea0340.js deleted file mode 100644 index 5ef6f73..0000000 --- a/d2ypp2/web-console/out/_next/static/chunks/246-a56380dcf5ea0340.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[246],{9170:function(e,t,l){l.d(t,{Z:function(){return r}});var s=l(7437),a=l(2265);function r(e){let{snapshot:t,theme:r,tr:n}=e,i=(0,a.useRef)(null);return((0,a.useEffect)(()=>{let e=i.current;if(!e||!t)return;let s=!1,a=null,o="light"===r?"#0f172a":"#e2e8f0",c="light"===r?"#64748b":"#94a3b8",d="light"===r?"rgba(15,23,42,0.1)":"rgba(148,163,184,0.12)";l.e(614).then(l.bind(l,9614)).then(e=>{var l,r,h,x,m,u,p,b,g,f,v,w,j;if(s||!i.current)return;a=e.init(i.current,void 0,{renderer:"canvas"});let N=null!==(g=null===(l=t.cpu_load)||void 0===l?void 0:l["1m"])&&void 0!==g?g:0,y=null!==(f=null===(r=t.cpu_load)||void 0===r?void 0:r["5m"])&&void 0!==f?f:0,k=null!==(v=null===(h=t.cpu_load)||void 0===h?void 0:h["15m"])&&void 0!==v?v:0,C=(null===(x=t.memory)||void 0===x?void 0:x.total)||1,S=null!==(j=null!==(w=null===(m=t.memory)||void 0===m?void 0:m.available)&&void 0!==w?w:null===(u=t.memory)||void 0===u?void 0:u.free)&&void 0!==j?j:0,_=(null===(p=t.disk)||void 0===p?void 0:p.total)||1,D=(null===(b=t.disk)||void 0===b?void 0:b.free)||0;a.setOption({animationDurationUpdate:450,textStyle:{color:o},title:{text:n("无人直播节点 \xb7 资源","Unmanned live \xb7 resources"),left:12,top:8,textStyle:{color:o,fontSize:12,fontWeight:600}},tooltip:{trigger:"axis"},grid:{left:52,right:"48%",top:52,bottom:36},xAxis:{type:"category",data:["1m","5m","15m"],axisLabel:{color:c,fontSize:10},axisLine:{lineStyle:{color:d}}},yAxis:{type:"value",name:n("负载","Load"),nameTextStyle:{color:c,fontSize:10},axisLabel:{color:c,fontSize:10},splitLine:{lineStyle:{color:d}}},series:[{name:n("CPU","CPU"),type:"bar",data:[N,y,k],barMaxWidth:28,itemStyle:{borderRadius:[6,6,0,0],color:new e.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#22d3ee"},{offset:1,color:"#6366f1"}])}},{name:n("内存","RAM"),type:"pie",radius:["26%","40%"],center:["78%","38%"],label:{color:o,fontSize:9},data:[{value:Math.max(0,C-S),name:n("已用","Used")},{value:Math.max(0,S),name:n("可用","Free")}]},{name:n("磁盘","Disk"),type:"pie",radius:["20%","32%"],center:["78%","72%"],label:{color:o,fontSize:9},data:[{value:Math.max(0,_-D),name:n("已用","Used")},{value:Math.max(0,D),name:n("空闲","Free")}]}]})});let h=new ResizeObserver(()=>null==a?void 0:a.resize());return h.observe(e),()=>{s=!0,h.disconnect(),null==a||a.dispose()}},[t,r,n]),t)?(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("p",{className:"mb-2 text-xs opacity-70",children:n("ECharts 动态图表","ECharts live charts")}),(0,s.jsx)("div",{ref:i,className:"chart-surface h-64 w-full rounded-2xl border border-white/[0.08] bg-black/15 md:h-72"})]}):null}},2246:function(e,t,l){l.d(t,{d:function(){return S}});var s=l(7437),a=l(3145),r=l(2265),n=l(9170),i=l(2023),o=l(1817),c=l(7168),d=l(6865),h=l(5621),x=l(9076);function m(e){let{lang:t,rootId:l,filePath:a,fileContent:n,refreshKey:m,busy:u,fetchJson:p,notify:b,onChangeContent:g,onRefreshListing:f}=e,[v,w]=(0,r.useState)(null),[j,N]=(0,r.useState)(!1),[y,k]=(0,r.useState)(!1),[C,S]=(0,r.useState)(null),[_,D]=(0,r.useState)(null),E=(0,r.useCallback)((e,l)=>"zh"===t?e:l,[t]),O=(0,r.useCallback)(async()=>{if(!l||!a){w(null);return}N(!0);try{let e=new URLSearchParams({root:l,path:a}),t=await p("/config_insights?".concat(e.toString()));w(t)}catch(e){w(null),b(e.message)}finally{N(!1)}},[p,a,b,l]);(0,r.useEffect)(()=>{O()},[O,m]);let T=async()=>{if(l&&a){k(!0);try{let e=await p("/config_insights",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:l,path:a,content:n})});w(e),b(E("已分析当前编辑内容","Analyzed current editor draft"))}catch(e){b(e.message)}finally{k(!1)}}},R=async e=>{if(l&&a){S(e);try{let t=await p("/config_optimize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:l,path:a,content:n,action:e})});"string"==typeof t.content&&g(t.content),t.insights&&w(e=>({...e,...t.insights,backups:(null==e?void 0:e.backups)||[]})),b(t.message||E("已应用优化","Optimization applied"))}catch(e){b(e.message)}finally{S(null)}}},A=async e=>{if(l&&a){D(e);try{let t=await p("/config_restore",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:l,path:a,backup_id:e})});"string"==typeof t.content&&g(t.content),await Promise.resolve(null==f?void 0:f()),await O(),b(t.message||E("已恢复历史版本","Backup restored"))}catch(e){b(e.message)}finally{D(null)}}};if(!a)return(0,s.jsx)("div",{className:"rounded-2xl border border-white/8 bg-black/20 p-4 text-sm text-slate-400",children:E("选择文件后显示诊断、回滚和一键优化。","Pick a file to see diagnostics, rollback, and one-click optimizations.")});let P=(null==v?void 0:v.issues)||[],U=(null==v?void 0:v.actions)||[],L=(null==v?void 0:v.backups)||[],I=(null==v?void 0:v.stats)||[];return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-cyan-500/15 bg-gradient-to-br from-cyan-500/[0.08] via-black/25 to-transparent p-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-white",children:[(0,s.jsx)(i.Z,{className:"h-4 w-4 text-cyan-300"}),(0,s.jsx)("h3",{className:"text-sm font-semibold",children:E("配置治理","Config governance")}),(null==v?void 0:v.source)?(0,s.jsx)("span",{className:"rounded-full border border-white/10 bg-black/25 px-2 py-0.5 text-[10px] uppercase tracking-wider text-slate-400",children:v.source}):null]}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:(null==v?void 0:v.summary)||E("校验配置风险、查看历史快照,并将常见优化应用到编辑器。","Validate risks, inspect snapshots, and apply optimizations into the editor.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)("button",{type:"button",disabled:!!u||j,onClick:()=>void O(),className:"btn-focus inline-flex items-center gap-2 rounded-xl border border-white/10 bg-black/25 px-3 py-2 text-xs text-slate-100 disabled:opacity-40",children:[j?(0,s.jsx)(o.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(c.Z,{className:"h-3.5 w-3.5"}),E("刷新已保存状态","Refresh saved state")]}),(0,s.jsxs)("button",{type:"button",disabled:!!u||y,onClick:()=>void T(),className:"btn-focus inline-flex items-center gap-2 rounded-xl border border-cyan-500/30 bg-cyan-500/15 px-3 py-2 text-xs text-cyan-100 disabled:opacity-40",children:[y?(0,s.jsx)(o.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(d.Z,{className:"h-3.5 w-3.5"}),E("分析当前编辑器","Analyze editor draft")]})]})]}),(0,s.jsx)("div",{className:"mt-4 grid gap-2 sm:grid-cols-2 xl:grid-cols-4",children:I.slice(0,8).map(e=>(0,s.jsxs)("div",{className:"rounded-xl border border-white/8 bg-black/20 px-3 py-2.5",children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-slate-500",children:e.label}),(0,s.jsx)("div",{className:"mt-1 truncate font-mono text-sm text-white",children:e.value})]},e.key))})]}),(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-white/8 bg-black/20 p-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-white",children:[(0,s.jsx)(d.Z,{className:"h-4 w-4 text-amber-300"}),(0,s.jsx)("h4",{className:"text-sm font-semibold",children:E("风险与建议","Risks & guidance")})]}),P.length?(0,s.jsx)("div",{className:"mt-3 space-y-2",children:P.map((e,t)=>{var l;return(0,s.jsxs)("div",{className:"rounded-xl border px-3 py-2 text-xs ".concat("error"===(l=e.level)?"border-rose-500/30 bg-rose-500/10 text-rose-100":"warning"===l?"border-amber-500/30 bg-amber-500/10 text-amber-100":"border-cyan-500/30 bg-cyan-500/10 text-cyan-100"),children:[(0,s.jsxs)("div",{className:"font-medium",children:[e.message,e.line?" (L".concat(e.line,")"):""]}),(0,s.jsx)("div",{className:"mt-1 font-mono opacity-70",children:e.code})]},"".concat(e.code,"-").concat(t))})}):(0,s.jsx)("p",{className:"mt-3 text-xs text-emerald-300/90",children:E("当前没有发现明显配置风险。","No obvious config risks were detected.")}),(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:U.length?U.map(e=>(0,s.jsx)("button",{type:"button",disabled:!!u||!!C,onClick:()=>void R(e.id),className:"btn-focus rounded-xl border border-violet-500/30 bg-violet-500/15 px-3 py-2 text-xs text-violet-100 disabled:opacity-40",title:e.description,children:C===e.id?E("处理中...","Working..."):e.label},e.id)):(0,s.jsx)("span",{className:"text-xs text-slate-500",children:E("当前文件没有可自动应用的预设。","No auto-applicable presets for this file.")})})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-white/8 bg-black/20 p-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-white",children:[(0,s.jsx)(h.Z,{className:"h-4 w-4 text-cyan-300"}),(0,s.jsx)("h4",{className:"text-sm font-semibold",children:E("历史快照","Backup snapshots")})]}),L.length?(0,s.jsx)("div",{className:"mt-3 space-y-2",children:L.slice(0,8).map(e=>(0,s.jsx)("div",{className:"rounded-xl border border-white/8 bg-black/25 px-3 py-2.5",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-white",children:new Date(e.created_at).toLocaleString("zh"===t?"zh-CN":"en-US",{hour12:!1})}),(0,s.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500",children:[e.reason," \xb7 ",function(e){if(!e)return"0 B";let t=["B","KB","MB","GB"],l=e,s=0;for(;l>=1024&&s=10||0===s?0:1)," ").concat(t[s])}(e.size),"legacy"===e.source?" \xb7 ".concat(E("旧备份","legacy")):""]})]}),(0,s.jsxs)("button",{type:"button",disabled:!!u||!!_,onClick:()=>void A(e.id),className:"btn-focus inline-flex items-center gap-1 rounded-lg border border-white/10 bg-white/5 px-3 py-1.5 text-xs text-slate-100 disabled:opacity-40",children:[_===e.id?(0,s.jsx)(o.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(x.Z,{className:"h-3.5 w-3.5"}),E("恢复","Restore")]})]})},e.id))}):(0,s.jsx)("p",{className:"mt-3 text-xs text-slate-500",children:E("当前文件还没有 Web 侧快照。保存、删除或恢复后会自动累积历史。","No Web snapshots yet. Saving, deleting, or restoring will accumulate history automatically.")})]})]})]})}var u=l(1387),p=l(90),b=l(8401),g=l(257);let f=["overview","business","modules","shellcrash","android","config"],v=new Set(["shellcrash-configs","shellcrash-yamls","shellcrash-jsons"]),w="LsRzcR3pHoA9.yaml",j="5d723acc-singbox_tuic3",N=()=>void 0!==g&&g.env.NEXT_PUBLIC_API_URL||"";function y(e){if(!e)return"0 B";let t=["B","KB","MB","GB","TB"],l=e,s=0;for(;l>=1024&&s=10||0===s?0:1)," ").concat(t[s])}function k(e){return"online"===e?"border-emerald-500/30 bg-emerald-500/10 text-emerald-200":"stopped"===e?"border-slate-500/30 bg-slate-500/10 text-slate-300":"configured"===e?"border-violet-500/30 bg-violet-500/10 text-violet-200":"unavailable"===e?"border-slate-700/30 bg-slate-800/50 text-slate-500":"error"===e?"border-rose-500/30 bg-rose-500/10 text-rose-200":"border-cyan-500/30 bg-cyan-500/10 text-cyan-200"}function C(e){let{children:t,className:l,disabled:a,onClick:r,title:n}=e;return(0,s.jsx)("button",{type:"button",className:"btn-focus rounded-xl px-3 py-2 text-xs font-semibold text-white disabled:cursor-not-allowed disabled:opacity-40 ".concat(l||""),disabled:a,onClick:r,title:n,children:t})}function S(e){var t,l,i,o,c,d,h,x,g,S,_,D,E,O,T,R;let{embeddedShellCrash:A=!1,portalLang:P}=e,U=N(),[L,I]=(0,r.useState)("zh"),[M,B]=(0,r.useState)("dark"),[z,F]=(0,r.useState)("overview"),W=(0,r.useCallback)((e,t)=>"zh"===L?e:t,[L]),[K,H]=(0,r.useState)(!0),[Y,J]=(0,r.useState)(null),[Z,G]=(0,r.useState)(null),[V,Q]=(0,r.useState)(null),[$,q]=(0,r.useState)(!0),X=(0,r.useRef)(null),[ee,et]=(0,r.useState)([]),[el,es]=(0,r.useState)(""),[ea,er]=(0,r.useState)("unknown"),[en,ei]=(0,r.useState)(""),[eo,ec]=(0,r.useState)(""),[ed,eh]=(0,r.useState)(null),[ex,em]=(0,r.useState)([]),[eu,ep]=(0,r.useState)(null),[eb,eg]=(0,r.useState)(null),[ef,ev]=(0,r.useState)([]),[ew,ej]=(0,r.useState)(""),[eN,ey]=(0,r.useState)([]),[ek,eC]=(0,r.useState)(""),[eS,e_]=(0,r.useState)(""),[eD,eE]=(0,r.useState)(!1),[eO,eT]=(0,r.useState)([]),[eR,eA]=(0,r.useState)(""),[eP,eU]=(0,r.useState)(null),[eL,eI]=(0,r.useState)([]),[eM,eB]=(0,r.useState)([]),[ez,eF]=(0,r.useState)(""),[eW,eK]=(0,r.useState)(""),[eH,eY]=(0,r.useState)("com.zhiliaoapp.musically"),[eJ,eZ]=(0,r.useState)("https://www.tiktok.com"),[eG,eV]=(0,r.useState)(""),[eQ,e$]=(0,r.useState)(""),[eq,eX]=(0,r.useState)(Date.now()),[e0,e2]=(0,r.useState)("tap"),[e1,e3]=(0,r.useState)(null),[e5,e4]=(0,r.useState)(0),[e6,e8]=(0,r.useState)(0),[e9,e7]=(0,r.useState)(null),[te,tt]=(0,r.useState)(null),[tl,ts]=(0,r.useState)(!1),ta=null!==(O=ef.find(e=>e.root_id===ew))&&void 0!==O?O:null,tr=ef.filter(e=>v.has(e.root_id)),tn=ef.filter(e=>!v.has(e.root_id)),ti=null!==(T=ex.find(e=>"shellcrash"===e.service_id))&&void 0!==T?T:null,to=null!==(R=ex.find(e=>"android_panel"===e.service_id))&&void 0!==R?R:null,tc=(0,r.useMemo)(()=>{var e;let t=null!==(e=null==ed?void 0:ed.quick_links)&&void 0!==e?e:{},l={};for(let[e,s]of Object.entries(t)){let t=String(s);l[e]=/^https?:\/\//i.test(t)?(0,b.p)(t):t}return l},[ed]),td=(0,r.useMemo)(()=>(0,p.O0)(tc),[tc]),th=(0,r.useMemo)(()=>(0,p.Tc)(td),[td]),tx=(0,r.useMemo)(()=>{let e=tc.ws_scrcpy||((null==to?void 0:to.host)&&to.port?"http://".concat(to.host,":").concat(to.port):(null==ed?void 0:ed.mdns_host)?"http://".concat(ed.mdns_host,":5000"):"");return e?(0,b.p)(e):""},[null==to?void 0:to.host,null==to?void 0:to.port,tc.ws_scrcpy,null==ed?void 0:ed.mdns_host]),tm=function(e){let t=null==e?void 0:e.match(/(\d+)x(\d+)/);return t?{width:Number(t[1]),height:Number(t[2])}:null}(null==eP?void 0:eP.resolution),tu=(0,r.useCallback)(e=>{G(e),null!=X.current&&window.clearTimeout(X.current),X.current=window.setTimeout(()=>{G(null),X.current=null},2500)},[]),tp=(0,r.useCallback)(async(e,t)=>(0,u.N)("".concat(U).concat(e),t),[U]),tb=(0,r.useCallback)((e,t)=>{let l=new URL(window.location.href);l.pathname="shellcrash"===e?"/shellcrash":"android"===e?"/android":"/console","/console"===l.pathname?l.searchParams.set("tab",e):l.searchParams.delete("tab"),l.searchParams.set("lang",t),window.history.replaceState(null,"",l.toString()),window.localStorage.setItem("live-console-lang",t)},[]),tg=(0,r.useCallback)(async()=>{if(!el)return;let e=await tp("/status?process=".concat(encodeURIComponent(el)));er(e.process_status||"unknown"),ei(e.recent_log||""),ec(e.recent_error||"")},[el,tp]),tf=(0,r.useCallback)(async()=>{let[e,t,l]=await Promise.all([tp("/stack/services"),tp("/system_snapshot"),tp("/hardware_profile")]);em(e.services||[]),ep(t),eg(l)},[tp]),tv=(0,r.useCallback)(async(e,t)=>{if(!e)return;let l=(await tp("/managed_files?root=".concat(encodeURIComponent(e)))).files||[];ey(l);let s=t||ek;if(s&&l.some(e=>e.path===s))eC(s);else{var a;eC((null===(a=l[0])||void 0===a?void 0:a.path)||"")}},[tp,ek]),tw=(0,r.useCallback)(async()=>{var e;let t=await tp("/android/devices"),l=t.devices||[],s=eR&&l.some(e=>e.serial===eR)?eR:(null===(e=l[0])||void 0===e?void 0:e.serial)||"";return eE(!!t.available),eT(l),eA(s),s},[eR,tp]),tj=(0,r.useCallback)(async e=>{if(!e){eU(null);return}eU(await tp("/android/overview?serial=".concat(encodeURIComponent(e))))},[tp]),tN=(0,r.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ez;if(!e){eB([]);return}eB((await tp("/android/packages?serial=".concat(encodeURIComponent(e),"&query=").concat(encodeURIComponent(t),"&limit=60"))).packages||[])},[ez,tp]),ty=(0,r.useCallback)(async e=>{if(!e){eI([]);return}eI((await tp("/android/ui?serial=".concat(encodeURIComponent(e),"&limit=80"))).nodes||[])},[tp]),tk=(0,r.useCallback)(async(e,t)=>{ej(e),eC(t),await tv(e,t)},[tv]),tC=(0,r.useCallback)((e,t)=>{F("config"),window.setTimeout(()=>{tk(e,t)},0)},[tk]),tS=(0,r.useCallback)(async()=>{Q("hardware:probe");try{let e=await tp("/hardware_profile?refresh=true");eg(e),tu(W("硬件探测已更新","Hardware profile refreshed"))}catch(e){tu(e.message)}finally{Q(null)}},[tp,tu,W]),t_=(0,r.useCallback)(async()=>{H(!0),J(null);try{var e,t,l,s;let[a,r,n]=await Promise.all([tp("/process_monitor"),tp("/server_info"),tp("/managed_roots")]);et(a.entries||[]),es((null===(t=a.entries)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.pm2)||""),eh(r.stack||null),ev(n.roots||[]),ej((null===(s=n.roots)||void 0===s?void 0:null===(l=s[0])||void 0===l?void 0:l.root_id)||""),await Promise.all([tf(),tw()])}catch(e){J(e.message)}finally{H(!1)}},[tp,tw,tf]);(0,r.useEffect)(()=>{if(A){if(F("shellcrash"),"zh"===P||"en"===P)I(P);else{let e=window.localStorage.getItem("live-hub-lang");("zh"===e||"en"===e)&&I(e)}return}let e=new URLSearchParams(window.location.search),t=function(e){let t=e.replace(/\/+$/,"")||"/";return"/shellcrash"===t?"shellcrash":"/android"===t?"android":null}(window.location.pathname),l=e.get("tab"),s=e.get("lang"),a=window.localStorage.getItem("live-console-lang");t?F(t):null!==l&&f.includes(l)&&F(l),"zh"===s||"en"===s?I(s):("zh"===a||"en"===a)&&I(a);let r=window.localStorage.getItem("live-console-theme");("light"===r||"dark"===r)&&B(r)},[A,P]),(0,r.useEffect)(()=>{A||(document.documentElement.setAttribute("data-theme",M),window.localStorage.setItem("live-console-theme",M))},[M,A]),(0,r.useEffect)(()=>{let e=()=>q("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,r.useEffect)(()=>()=>{null!=X.current&&window.clearTimeout(X.current)},[]),(0,r.useEffect)(()=>{A&&("zh"===P||"en"===P)&&I(P)},[A,P]),(0,r.useEffect)(()=>{A||tb(z,L)},[A,L,tb,z]),(0,r.useEffect)(()=>{t_()},[t_]),(0,r.useEffect)(()=>{if(!el||!$)return;tg();let e=window.setInterval(()=>void tg(),1500);return()=>window.clearInterval(e)},[el,$,tg]),(0,r.useEffect)(()=>{if(K||Y||!$||"overview"!==z&&"modules"!==z&&"shellcrash"!==z)return;tf();let e=window.setInterval(()=>void tf(),1e4);return()=>clearInterval(e)},[K,Y,$,tf,z]),(0,r.useEffect)(()=>{let e="shellcrash"===z?tr:"config"===z?tn:ef;e.length&&!e.some(e=>e.root_id===ew)&&(ej(e[0].root_id),eC(""))},[tn,ew,ef,tr,z]),(0,r.useEffect)(()=>{ew&&tv(ew)},[tv,ew]),(0,r.useEffect)(()=>{if(!ew||!ek){e_("");return}(async()=>{try{let e=await tp("/managed_file?root=".concat(encodeURIComponent(ew),"&path=").concat(encodeURIComponent(ek)));e_(e.content||"")}catch(e){tu(e.message)}})()},[tp,ek,tu,ew]),(0,r.useEffect)(()=>{"android"===z&&(async()=>{let e=await tw();e&&(await Promise.all([tj(e),ty(e),tN(e)]),eX(Date.now()))})()},[tw,tj,tN,ty,z]),(0,r.useEffect)(()=>{if("android"!==z||!eR||!$)return;tj(eR),eX(Date.now());let e=window.setInterval(()=>{tj(eR),eX(Date.now())},5e3);return()=>window.clearInterval(e)},[eR,$,tj,z]),(0,r.useEffect)(()=>{if(!eR){e7(e=>(e&&URL.revokeObjectURL(e),null)),tt(null),ts(!1);return}let e=new AbortController,t="".concat(U,"/android/screenshot?serial=").concat(encodeURIComponent(eR),"&ts=").concat(eq);return ts(!0),tt(null),fetch(t,{signal:e.signal}).then(async e=>{if(!e.ok)throw Error(await (0,u.e)(e));return e.blob()}).then(e=>{if(!e.type.startsWith("image/"))throw Error("Not an image");let t=URL.createObjectURL(e);e7(e=>(e&&URL.revokeObjectURL(e),t))}).catch(e=>{"AbortError"!==e.name&&(tt(e.message),e7(e=>(e&&URL.revokeObjectURL(e),null)))}).finally(()=>{e.signal.aborted||ts(!1)}),()=>{e.abort()}},[eR,eq,U]);let tD=async e=>{if(el){Q("process:".concat(e));try{let t=await tp("/".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:el})});tu(String(t.output||t.pm2_output||t.message||"OK")),await tg()}catch(e){tu(e.message)}finally{Q(null)}}},tE=async(e,t)=>{Q("".concat(e,":").concat(t));try{let l=await tp("/service_action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({service:e,action:t})});tu(l.message||"OK"),await tf()}catch(e){tu(e.message)}finally{Q(null)}},tO=async e=>{let t=e||("shellcrash-yamls"===ew&&ek?ek:w);Q("shellcrash:apply");try{"shellcrash-yamls"===ew&&ek===t&&await tp("/managed_file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:ew,path:ek,content:eS})});let e=await tp("/shellcrash/apply_profile",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t,target_node:j})}),l=e.selected?" | ".concat(e.selected):"";tu("".concat(e.message||W("ShellCrash 配置已应用","ShellCrash profile applied")).concat(l)),await Promise.all([tf(),tv("shellcrash-yamls","config.yaml")]),ej("shellcrash-yamls"),eC("config.yaml"),e8(e=>e+1)}catch(e){tu(e.message)}finally{Q(null)}},tT=async()=>{let e=window.open("about:blank","_blank");Q("shellcrash:web_panel");try{let t=await tp("/shellcrash/web_panel",{method:"POST"}),l=(0,b.p)(t.url||"http://".concat(window.location.hostname||"127.0.0.1",":").concat("9999","/ui/"));if(tu(t.message||W("ShellCrash web 面板已就绪","ShellCrash web panel is ready")),e){try{e.opener=null}catch(e){}e.location.href=l}else window.open(l,"_blank","noopener,noreferrer");await tf()}catch(t){null==e||e.close(),tu(t.message)}finally{Q(null)}},tR=async()=>{if(ew&&ek){Q("file:save");try{await tp("/managed_file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:ew,path:ek,content:eS})}),tu(W("文件已保存","File saved")),await tv(ew,ek),e8(e=>e+1)}catch(e){tu(e.message)}finally{Q(null)}}},tA=async()=>{if(!(null==ta?void 0:ta.allow_create)){tu(W("当前目录不允许新建文件","The current root does not allow new files"));return}let e=window.prompt(W("请输入新的相对路径","Enter a new relative path"),ta.default_file||"");if(e){Q("file:create");try{await tp("/managed_file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:ew,path:e,content:""})}),tu(W("文件已创建","File created")),await tv(ew,e),e8(e=>e+1)}catch(e){tu(e.message)}finally{Q(null)}}},tP=async()=>{if(ew&&ek){if(!(null==ta?void 0:ta.allow_delete)){tu(W("当前目录不允许删除文件","The current root does not allow deletion"));return}if(window.confirm(W("确定删除该文件?","Delete this file?"))){Q("file:delete");try{await tp("/managed_file?root=".concat(encodeURIComponent(ew),"&path=").concat(encodeURIComponent(ek)),{method:"DELETE"}),tu(W("文件已删除","File deleted")),await tv(ew),e8(e=>e+1)}catch(e){tu(e.message)}finally{Q(null)}}}},tU=async e=>{var t;let l=null===(t=e.target.files)||void 0===t?void 0:t[0];if(e.target.value="",e4(e=>e+1),l&&ew){Q("file:import");try{let e=await l.text();await tp("/managed_file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:ew,path:l.name,content:e})}),tu(W("导入完成,已替换同名文件","Import finished and replaced matching file")),eC(l.name),await tv(ew,l.name),e8(e=>e+1)}catch(e){tu(e.message)}finally{Q(null)}}},tL=async(e,t)=>{if(!eR){tu(W("当前没有可用的 ADB 设备","No active ADB device"));return}Q("android:".concat(e));try{let l=await tp("/android/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,serial:eR,payload:t||{}})});tu(l.message||"OK"),l.output&&e$(l.output),eX(Date.now()),await tj(eR)}catch(e){tu(e.message)}finally{Q(null)}},tI="tap"===e0?W("点击","Tap"):"double_tap"===e0?W("双击","Double Tap"):W("长按","Long Press"),tM=async e=>{if(!eR){tu(W("当前没有可用的 ADB 设备","No active ADB device"));return}let t=function(e,t,l){let s,a,r,n;let i=e.getBoundingClientRect(),o=e.naturalWidth,c=e.naturalHeight;if(!o||!c||!i.width||!i.height)return null;let d=i.width/i.height,h=o/c;h>d?(s=i.width,a=i.width/h,r=0,n=(i.height-a)/2):(a=i.height,s=i.height*h,r=(i.width-s)/2,n=0);let x=t-i.left-r,m=l-i.top-n;return x<0||m<0||x>s||m>a?null:{x:Math.max(0,Math.min(o-1,Math.round(x/s*o))),y:Math.max(0,Math.min(c-1,Math.round(m/a*c)))}}(e.currentTarget,e.clientX,e.clientY);if(!t){tu(W("请点击画面有效区域","Tap inside the visible frame"));return}let l=(null==tm?void 0:tm.width)||e.currentTarget.naturalWidth,s=(null==tm?void 0:tm.height)||e.currentTarget.naturalHeight,a=l>0?l/Math.max(1,e.currentTarget.naturalWidth):1,r=s>0?s/Math.max(1,e.currentTarget.naturalHeight):1,n=Math.max(0,Math.min(l||t.x,Math.round(t.x*a))),i=Math.max(0,Math.min(s||t.y,Math.round(t.y*r)));if(e3({x:n,y:i}),"long_press"===e0){await tL("long_press",{x:n,y:i,duration:750});return}await tL(e0,{x:n,y:i})},tB=e=>"shellcrash"===e.service_id&&(null==ed?void 0:ed.control_url)?"".concat(ed.control_url,"/shellcrash?lang=").concat(L):"android_panel"===e.service_id&&(null==ed?void 0:ed.control_url)?"".concat(ed.control_url,"/android?lang=").concat(L):e.url||"",tz=e=>({online:W("在线","Online"),stopped:W("已停止","Stopped"),configured:W("已配置","Configured"),unavailable:W("未安装","Unavailable")})[e]||e,tF="shellcrash"===z?tr:tn,tW={overview:"\uD83D\uDCCA",business:"\uD83C\uDFAC",modules:"\uD83E\uDDE9",shellcrash:"\uD83D\uDEE1️",android:"\uD83E\uDD16",config:"⚙️"};return(0,s.jsxs)(s.Fragment,{children:[A?null:(0,s.jsx)("div",{className:"border-b border-white/[0.08] bg-slate-950/80 backdrop-blur-md",children:(0,s.jsxs)("div",{className:"mx-auto flex max-w-7xl flex-wrap items-center justify-between gap-2 px-4 py-2.5 text-xs sm:px-6 lg:px-10",children:[(0,s.jsxs)("a",{className:"font-medium text-amber-400/95 transition hover:text-amber-300",href:"/",children:["← ",W("返回门户首页","Back to portal")]}),(0,s.jsx)("span",{className:"text-slate-500",children:W("无人直播 \xb7 本页需与 API 同域(推荐 live.local:8001)","Unmanned live \xb7 same origin as API (live.local:8001)")})]})}),(0,s.jsxs)("main",{className:A?"mx-auto min-h-0 max-w-7xl px-1 pb-4 pt-1 sm:px-3":"safe-pb-nav mx-auto min-h-screen max-w-7xl px-4 pb-16 pt-6 sm:px-6 lg:px-10",children:[Z?(0,s.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"animate-toast-in fixed bottom-24 left-1/2 z-50 max-w-[min(92vw,28rem)] -translate-x-1/2 rounded-2xl border border-cyan-500/25 bg-slate-950/95 px-5 py-3 text-center text-sm text-cyan-50 shadow-lg md:bottom-6 [html[data-theme=light]_&]:border-cyan-600/25 [html[data-theme=light]_&]:bg-white/95 [html[data-theme=light]_&]:text-cyan-950",children:Z}):null,A?(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2 border-b border-white/[0.08] pb-3",children:[(0,s.jsx)("h2",{className:"text-base font-semibold text-[color:var(--text)]",children:"ShellCrash"}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void t_(),children:W("刷新","Refresh")})]}):(0,s.jsxs)("header",{className:"mb-8 flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-cyan-400/90",children:W("控制平面 \xb7 ARM Linux 开发板","Control plane \xb7 ARM Linux SBC")}),(0,s.jsx)("h1",{className:"mt-2 text-3xl font-bold text-[color:var(--text)] sm:text-4xl",children:W("无人直播控制中心","Unmanned live control center")}),(0,s.jsx)("p",{className:"mt-3 max-w-3xl text-sm text-slate-400",children:W("ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。","ShellCrash for egress; FFmpeg for stream or HDMI; Neko (Docker Chromium) or host Chromium for browser; USB ADB to AOSP. Modules are isolated.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)("div",{className:"meta-chip max-w-full",children:((null==ed?void 0:ed.mdns_host)||"live.local")+" \xb7 "+((null==ed?void 0:ed.machine)||"unknown")+" \xb7 "+((null==ed?void 0:ed.kernel)||"unknown")}),(0,s.jsx)(C,{className:"zh"===L?"border border-cyan-400/50 bg-cyan-500/10":"border border-white/12 bg-black/20",onClick:()=>I("zh"),children:"中文"}),(0,s.jsx)(C,{className:"en"===L?"border border-cyan-400/50 bg-cyan-500/10":"border border-white/12 bg-black/20",onClick:()=>I("en"),children:"EN"}),(0,s.jsx)(C,{className:"light"===M?"border border-amber-400/50 bg-amber-500/15":"border border-white/12 bg-black/20",onClick:()=>B("light"),title:W("日间主题","Light theme"),children:W("☀️ 日间","☀️ Light")}),(0,s.jsx)(C,{className:"dark"===M?"border border-indigo-400/50 bg-indigo-500/15":"border border-white/12 bg-black/20",onClick:()=>B("dark"),title:W("夜间主题","Dark theme"),children:W("\uD83C\uDF19 夜间","\uD83C\uDF19 Dark")}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void t_(),children:W("刷新","Refresh")})]})]}),(0,s.jsx)("nav",{className:"tab-strip","aria-label":W("主导航","Primary navigation"),children:f.map(e=>(0,s.jsx)("button",{type:"button",className:"tab-btn ".concat(z===e?"tab-btn-active":""),onClick:()=>F(e),children:{overview:W("总览","Overview"),business:W("直播业务","Live ops"),modules:W("系统服务","Services"),shellcrash:"ShellCrash",android:W("安卓设备","Android"),config:W("配置中心","Config")}[e]},e))})]}),K?(0,s.jsx)("div",{className:"glass rounded-3xl py-24 text-center text-slate-400",children:W("正在连接控制台...","Connecting to the control plane...")}):null,!K&&Y?(0,s.jsx)("div",{className:"glass rounded-3xl border border-rose-500/25 bg-rose-950/20 p-8 text-center text-rose-200",children:Y}):null,K||Y?null:(0,s.jsxs)("div",{className:"grid gap-6",children:["overview"===z?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"glass rounded-3xl border border-amber-500/20 bg-gradient-to-br from-amber-500/[0.07] to-transparent p-6",children:[(0,s.jsx)("h2",{className:"section-title",children:W("第一次用?按这条线理解整套板子","New here? Follow this mental model")}),(0,s.jsxs)("ol",{className:"mt-4 list-decimal space-y-2 pl-5 text-sm leading-relaxed text-slate-300",children:[(0,s.jsx)("li",{children:W("插电、接网线或连好 Wi‑Fi 后,用浏览器打开本页(验收域名一般为 http://live.local:8001/ ,门户在根路径 /,控制台在 /console)。","After power and Ethernet/Wi‑Fi, open this stack in a browser (often http://live.local:8001/ — portal at /, full console at /console).")}),(0,s.jsx)("li",{children:W("「直播业务」里启停 PM2 脚本(抖音→YouTube、HDMI 等);「系统服务」看 ShellCrash、SRS、ws-scrcpy、Neko 等是否在跑。","Use Live ops for PM2 scripts; Services for ShellCrash, SRS, ws-scrcpy, Neko, etc.")}),(0,s.jsx)("li",{children:W("「安卓设备」需要 USB 调试授权;截图预览 + ws-scrcpy 低延迟画面二选一或同用。TikTok 等场景常配合板载 AOSP。","Android tab needs USB debugging; use screenshot taps and/or ws-scrcpy. TikTok workflows often use on-board AOSP.")}),(0,s.jsx)("li",{children:W("深度指标点 Netdata;命令行点 WebTTY;代理规则与 YAML 在 ShellCrash 页。","Netdata for metrics; WebTTY for shell; ShellCrash tab for proxy rules and YAML.")})]})]}),(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"section-title",children:W("\uD83D\uDEF0️ 流媒体与桌面入口","Streaming & desktop")}),(0,s.jsx)("p",{className:"section-lead",children:W("ws-scrcpy:浏览器里控安卓;Chromium:本机+油猴+RemoteDebug;Neko:Docker 里跑 Chromium 桌面(非 Firefox 版)。","ws-scrcpy: browser ADB; Chromium: host+Tampermonkey+9222; Neko: Chromium desktop in Docker (not the Firefox image).")}),(0,s.jsxs)("div",{className:"mt-4 flex max-h-[28rem] flex-col gap-2 overflow-y-auto pr-1 log-scroll",children:[(null==ed?void 0:ed.dashboard_url)?(0,s.jsx)("a",{className:"link-tile",href:ed.dashboard_url,target:"_blank",rel:"noreferrer",children:"\uD83C\uDFE0 Homepage"}):null,(null==ed?void 0:ed.control_url)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("a",{className:"link-tile",href:"".concat(ed.control_url,"/console?tab=shellcrash&lang=").concat(L),target:"_blank",rel:"noreferrer",children:"\uD83D\uDEE1️ ShellCrash"}),(0,s.jsxs)("a",{className:"link-tile",href:"".concat(ed.control_url,"/console?tab=android&lang=").concat(L),target:"_blank",rel:"noreferrer",children:["\uD83E\uDD16 ",W("安卓中心 (含 ws-scrcpy)","Android hub + ws-scrcpy")]}),(0,s.jsxs)("a",{className:"link-tile",href:"".concat(ed.control_url,"/console?tab=config&lang=").concat(L),target:"_blank",rel:"noreferrer",children:["⚙️ ",W("配置中心","Config")]})]}):null,tc.ws_scrcpy?(0,s.jsxs)("a",{className:"link-tile link-tile-accent",href:tc.ws_scrcpy,target:"_blank",rel:"noreferrer",children:["\uD83D\uDCF1 ws-scrcpy (",W("原始流控制页","raw stream UI"),")"]}):null,tc.chromium_remote_debug?(0,s.jsxs)("a",{className:"link-tile",href:tc.chromium_remote_debug,target:"_blank",rel:"noreferrer",children:["\uD83E\uDDEA ",W("Chromium RemoteDebug (9222)","Chromium RemoteDebug")]}):null,td.map(e=>(0,s.jsxs)("a",{className:"link-tile link-tile-warn",href:e.url,target:"_blank",rel:"noreferrer",children:["\uD83D\uDC31 ",e.label," / ",W("Docker Chromium 桌面","Docker Chromium desktop")]},e.key)),tc.webtty?(0,s.jsx)("a",{className:"link-tile",href:tc.webtty,target:"_blank",rel:"noreferrer",children:"⌨️ WebTTY"}):null,tc.filebrowser?(0,s.jsx)("a",{className:"link-tile",href:tc.filebrowser,target:"_blank",rel:"noreferrer",children:"\uD83D\uDCC2 File Browser"}):null,tc.netdata?(0,s.jsx)("a",{className:"link-tile",href:tc.netdata,target:"_blank",rel:"noreferrer",children:"\uD83D\uDCC8 Netdata"}):null,tc.srs_http?(0,s.jsx)("a",{className:"link-tile",href:tc.srs_http,target:"_blank",rel:"noreferrer",children:"\uD83C\uDF9E️ SRS :8080"}):null,tc.srs_api?(0,s.jsx)("a",{className:"link-tile",href:tc.srs_api,target:"_blank",rel:"noreferrer",children:"\uD83C\uDF9E️ SRS API :1985"}):null]})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"section-title",children:W("节点状态","Node Status")}),(0,s.jsxs)("div",{className:"panel-inset mt-4",children:[(0,s.jsx)("p",{children:(null==ed?void 0:ed.mdns_host)||"live.local"}),(0,s.jsxs)("p",{className:"mt-2",children:["IP: ",((null==ed?void 0:ed.ips)||[]).join(" / ")||"-"]}),(0,s.jsx)("p",{className:"mt-2",children:(null==ed?void 0:ed.machine)||"-"}),(0,s.jsx)("p",{className:"mt-2",children:(null==ed?void 0:ed.kernel)||"-"})]})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"section-title",children:W("系统快照","System Snapshot")}),(0,s.jsx)("p",{className:"section-lead",children:W("总览页每 10 秒自动刷新服务与监控数据。","Overview auto-refreshes every 10s.")}),(0,s.jsxs)("div",{className:"panel-inset mt-4",children:[(0,s.jsxs)("p",{children:["CPU:"," ",[null==eu?void 0:null===(t=eu.cpu_load)||void 0===t?void 0:t["1m"],null==eu?void 0:null===(l=eu.cpu_load)||void 0===l?void 0:l["5m"],null==eu?void 0:null===(i=eu.cpu_load)||void 0===i?void 0:i["15m"]].map(e=>"number"==typeof e?e.toFixed(2):"0.00").join(" / ")]}),(0,s.jsxs)("p",{className:"mt-2",children:["RAM: ",y(null==eu?void 0:null===(o=eu.memory)||void 0===o?void 0:o.available)," / ",y(null==eu?void 0:null===(c=eu.memory)||void 0===c?void 0:c.total)]}),(0,s.jsxs)("p",{className:"mt-2",children:["Disk: ",y(null==eu?void 0:null===(d=eu.disk)||void 0===d?void 0:d.free)," / ",y(null==eu?void 0:null===(h=eu.disk)||void 0===h?void 0:h.total)]}),(0,s.jsxs)("p",{className:"mt-2",children:["Netdata: ",(null==eu?void 0:null===(x=eu.netdata)||void 0===x?void 0:x.available)?eu.netdata.version||"online":"offline"]})]}),(0,s.jsx)(n.Z,{snapshot:eu,theme:M,tr:W})]})]}),(0,s.jsxs)("section",{className:"glass rounded-3xl p-6",children:[(0,s.jsx)("h2",{className:"section-title",children:W("模块概况","Module Summary")}),(0,s.jsx)("div",{className:"mt-4 grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:ex.map(e=>(0,s.jsxs)("div",{className:"service-card",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:e.label}),(0,s.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:e.description})]}),(0,s.jsx)("span",{className:"rounded-full border px-2.5 py-1 text-xs ".concat(k(e.status)),children:tz(e.status)})]}),(0,s.jsx)("p",{className:"mt-3 min-h-[3rem] text-xs text-slate-500",children:e.detail||"-"}),tB(e)?(0,s.jsx)("a",{className:"btn-focus mt-3 inline-flex rounded-xl border border-white/12 px-3 py-2 text-xs text-slate-200",href:tB(e),target:"_blank",rel:"noreferrer",children:W("打开","Open")}):null]},e.service_id))})]})]}):null,"business"===z?(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-12",children:[(0,s.jsx)("h2",{className:"section-title",children:W("⚡ 快捷配置","Quick config")}),(0,s.jsx)("p",{className:"section-lead",children:W("跳转配置中心编辑推流与录制相关文件。","Jump to the config editor for stream keys and URLs.")}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"border border-cyan-500/30 bg-cyan-600/80",onClick:()=>tC("app-config","youtube.ini"),children:"youtube.ini"}),(0,s.jsx)(C,{className:"border border-cyan-500/30 bg-cyan-600/80",onClick:()=>tC("app-config","URL_config.ini"),children:"URL_config.ini"}),(0,s.jsx)(C,{className:"border border-white/15 bg-black/30",onClick:()=>tC("app-config","config.ini"),children:"config.ini"}),(0,s.jsx)(C,{className:"border border-white/15 bg-black/30",onClick:()=>tC("stack-config","system-stack.env"),children:"system-stack.env"})]})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"section-title",children:W("业务运行时","Business Runtime")}),(0,s.jsx)("p",{className:"section-lead",children:W("这里只放业务脚本本身,Hub 基座可单独运行。","Only business processes live here.")}),ee.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("select",{className:"field-select mt-4",value:el,onChange:e=>es(e.target.value),children:ee.map(e=>(0,s.jsxs)("option",{value:e.pm2,children:[e.label," | ",e.script]},e.pm2))}),(0,s.jsxs)("div",{className:"mt-4 flex items-center justify-between rounded-2xl border border-white/8 bg-black/20 px-4 py-3",children:[(0,s.jsx)("span",{className:"rounded-full border px-3 py-1 text-xs ".concat(k(ea)),children:tz(ea)}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void tg(),children:W("轮询","Poll")})]}),(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[(0,s.jsx)(C,{className:"bg-emerald-600",disabled:"process:start"===V,onClick:()=>void tD("start"),children:"process:start"===V?W("启动中...","Starting..."):W("启动","Start")}),(0,s.jsx)(C,{className:"bg-amber-600",disabled:"process:restart"===V,onClick:()=>void tD("restart"),children:"process:restart"===V?W("重启中...","Restarting..."):W("重启","Restart")}),(0,s.jsx)(C,{className:"col-span-2 bg-rose-600",disabled:"process:stop"===V,onClick:()=>void tD("stop"),children:"process:stop"===V?W("停止中...","Stopping..."):W("停止","Stop")})]})]}):(0,s.jsx)("div",{className:"mt-4 rounded-2xl border border-dashed border-white/12 bg-black/20 p-4 text-sm text-slate-400",children:W("未发现业务进程。若只部署了 Hub 基座,这是正常状态。","No business process discovered.")})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-8",children:[(0,s.jsx)("h2",{className:"section-title",children:W("业务日志","Process Logs")}),(0,s.jsxs)("div",{className:"mt-4 grid gap-4 lg:grid-cols-2",children:[(0,s.jsx)("pre",{className:"log-scroll min-h-[22rem] rounded-2xl border border-emerald-500/15 bg-black/55 p-4 font-mono text-[11px] text-emerald-100/95",children:en||W("暂无输出","No stdout yet.")}),(0,s.jsx)("pre",{className:"log-scroll min-h-[22rem] rounded-2xl border border-rose-500/15 bg-black/55 p-4 font-mono text-[11px] text-rose-100/95",children:eo||W("暂无报错","No stderr yet.")})]})]})]}):null,"modules"===z?(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-8",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"section-title",children:W("系统模块","System Modules")}),(0,s.jsx)("p",{className:"section-lead",children:W("每个模块都独立启停和降级,避免一个服务异常拖垮整套业务。","Each module starts and degrades independently.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void tf(),children:W("刷新服务","Refresh Services")}),(0,s.jsx)(C,{className:"border border-violet-500/35 bg-violet-600/70",disabled:"hardware:probe"===V,onClick:()=>void tS(),children:"hardware:probe"===V?W("探测中…","Probing…"):W("重探测硬件","Re-probe HW")})]})]}),(0,s.jsx)("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:ex.map(e=>(0,s.jsxs)("div",{className:"service-card",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:e.label}),(0,s.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:e.description})]}),(0,s.jsx)("span",{className:"rounded-full border px-2.5 py-1 text-xs ".concat(k(e.status)),children:tz(e.status)})]}),(0,s.jsx)("p",{className:"mt-3 min-h-[3rem] text-xs text-slate-500",children:e.detail||"-"}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"bg-emerald-600",disabled:!e.available||!!V,onClick:()=>void tE(e.service_id,"start"),children:W("启动","Start")}),(0,s.jsx)(C,{className:"bg-amber-600",disabled:!e.available||!!V,onClick:()=>void tE(e.service_id,"restart"),children:W("重启","Restart")}),(0,s.jsx)(C,{className:"bg-rose-600",disabled:!e.available||!!V,onClick:()=>void tE(e.service_id,"stop"),children:W("停止","Stop")}),tB(e)?(0,s.jsx)("a",{className:"btn-focus rounded-xl border border-white/12 px-3 py-2 text-xs text-slate-200",href:tB(e),target:"_blank",rel:"noreferrer",children:W("打开","Open")}):null]})]},e.service_id))})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("硬件与系统","Hardware and System")}),(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 p-4 text-xs text-slate-400",children:[(0,s.jsxs)("p",{children:["Arch: ",(null==eb?void 0:eb.arch)||"-"]}),(0,s.jsxs)("p",{className:"mt-2",children:["FFmpeg: ",((null==eb?void 0:eb.ffmpeg_hwaccels)||[]).join(", ")||"-"]}),(0,s.jsxs)("p",{className:"mt-2",children:["GPU: ",(null==eb?void 0:null===(g=eb.gpu)||void 0===g?void 0:g.present)?eb.gpu.driver||"present":"none"]}),(0,s.jsxs)("p",{className:"mt-2",children:["NPU: ",(null==eb?void 0:null===(S=eb.npu)||void 0===S?void 0:S.present)?(eb.npu.devices||[]).join(", "):"none"]}),(0,s.jsxs)("p",{className:"mt-2",children:["Decoder: ",(null==eb?void 0:null===(_=eb.recommendation)||void 0===_?void 0:_.video_decoder)||"cpu"]}),(0,s.jsxs)("p",{className:"mt-2",children:["HDMI: ",(null==eb?void 0:null===(D=eb.recommendation)||void 0===D?void 0:D.hdmi_player)||"cpu"]}),(0,s.jsxs)("p",{className:"mt-2",children:["Mode: ",(null==eb?void 0:null===(E=eb.recommendation)||void 0===E?void 0:E.stability_mode)||"safe"]})]})]})]}):null,"shellcrash"===z?(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:"ShellCrash"}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("这里不再依赖命令行菜单,直接做 YAML / JSON / CFG 编辑与服务控制。","Manage ShellCrash from the web instead of the shell menu.")}),ti?(0,s.jsxs)("div",{className:"mt-4 rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:ti.label}),(0,s.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:ti.description})]}),(0,s.jsx)("span",{className:"rounded-full border px-2.5 py-1 text-xs ".concat(k(ti.status)),children:tz(ti.status)})]}),(0,s.jsx)("p",{className:"mt-3 text-xs text-slate-500",children:ti.detail||"-"}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"bg-emerald-600",disabled:!ti.available||!!V,onClick:()=>void tE("shellcrash","start"),children:W("启动","Start")}),(0,s.jsx)(C,{className:"bg-amber-600",disabled:!ti.available||!!V,onClick:()=>void tE("shellcrash","restart"),children:W("重启","Restart")}),(0,s.jsx)(C,{className:"bg-rose-600",disabled:!ti.available||!!V,onClick:()=>void tE("shellcrash","stop"),children:W("停止","Stop")}),(0,s.jsx)(C,{className:"bg-sky-600",disabled:!ti.available||!!V,onClick:()=>void tO(w),children:"shellcrash:apply"===V?W("应用中...","Applying..."):W("应用默认配置","Apply Default")}),(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!ti.available||!!V,onClick:()=>void tT(),children:"shellcrash:web_panel"===V?W("部署中...","Deploying..."):W("web面板","Web Panel")})]})]}):null,(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-sky-400/20 bg-sky-500/10 p-4 text-xs text-sky-100",children:[(0,s.jsx)("p",{className:"font-semibold",children:W("默认代理节点","Default proxy node")}),(0,s.jsx)("p",{className:"mt-2 break-all font-mono text-[11px] text-sky-200",children:j}),(0,s.jsx)("p",{className:"mt-2 text-sky-100/80",children:W("应用后会写入 config.yaml、重启 ShellCrash,并把包含该节点的选择组切到此节点。","Applying writes config.yaml, restarts ShellCrash, and selects this node in matching groups.")})]}),(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 p-4 text-xs text-slate-400",children:[(0,s.jsx)("p",{className:"text-white",children:W("快捷文件","Quick Files")}),(0,s.jsxs)("div",{className:"mt-3 grid gap-2",children:[(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-left text-slate-200",onClick:()=>void tk("shellcrash-yamls",w),children:w}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-left text-slate-200",onClick:()=>void tk("shellcrash-yamls","config.yaml"),children:"config.yaml"}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-left text-slate-200",onClick:()=>void tk("shellcrash-configs","ShellCrash.cfg"),children:"ShellCrash.cfg"}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-left text-slate-200",onClick:()=>void tk("shellcrash-configs","servers.list"),children:"servers.list"}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-left text-slate-200",onClick:()=>void tk("shellcrash-configs","command.env"),children:"command.env"})]})]})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-8",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("ShellCrash 文件编辑器","ShellCrash Editor")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("支持查看、修改、新建、删除,路径被限制在 ShellCrash 托管目录内。","View, edit, create and delete files inside managed ShellCrash roots.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)("label",{className:"btn-focus rounded-xl border border-white/12 px-3 py-2 text-xs text-slate-100 ".concat(V?"cursor-not-allowed opacity-40":""),children:["file:import"===V?W("导入中...","Importing..."):W("导入/替换","Import/Replace"),(0,s.jsx)("input",{className:"hidden",disabled:!!V,type:"file",accept:".yaml,.yml,.json,.cfg,.env,.list,.txt",onChange:e=>void tU(e)},e5)]}),(0,s.jsx)(C,{className:"bg-sky-600",disabled:"shellcrash-yamls"!==ew||!ek||!!V,onClick:()=>void tO(ek),children:"shellcrash:apply"===V?W("应用中...","Applying..."):W("应用当前 YAML","Apply YAML")}),(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!ek||!!V,onClick:()=>void tR(),children:"file:save"===V?W("保存中...","Saving..."):W("保存","Save")})]})]}),(0,s.jsxs)("div",{className:"mt-4 grid gap-6 xl:grid-cols-[18rem,1fr]",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("select",{className:"w-full rounded-2xl border border-white/12 bg-slate-950/60 px-4 py-3 text-sm text-white",value:ew,onChange:e=>{ej(e.target.value),eC("")},children:tr.map(e=>(0,s.jsxs)("option",{value:e.root_id,children:[e.label," | ",e.file_count]},e.root_id))}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!!V,onClick:()=>void tA(),children:W("新建","New")}),(0,s.jsx)(C,{className:"bg-rose-600",disabled:!ek||!!V,onClick:()=>void tP(),children:W("删除","Delete")})]}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:eN.map(e=>(0,s.jsxs)("button",{className:"btn-focus w-full rounded-2xl border px-4 py-3 text-left ".concat(ek===e.path?"border-cyan-500/40 bg-cyan-500/10":"border-white/8 bg-black/20"),onClick:()=>eC(e.path),children:[(0,s.jsx)("div",{className:"truncate text-sm text-white",children:e.path}),(0,s.jsx)("div",{className:"mt-1 text-[11px] text-slate-500",children:y(e.size)})]},e.path))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"rounded-2xl border border-white/8 bg-black/20 px-4 py-3 font-mono text-[11px] text-slate-500",children:ek?"".concat(ew," / ").concat(ek):W("请选择文件","Pick a file")}),(0,s.jsx)("textarea",{className:"log-scroll mt-4 min-h-[32rem] w-full resize-y rounded-2xl border border-white/10 bg-black/45 p-4 font-mono text-xs leading-relaxed text-slate-200",spellCheck:!1,value:eS,onChange:e=>e_(e.target.value)})]})]})]})]}):null,"android"===z?(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("安卓设备中心","Android Device Center")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("把设备发现、截图预览、ADB 动作和原始 web-scrcpy 放到一个模块里。","Combine discovery, preview, ADB actions and raw web-scrcpy in one module.")})]}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void(async()=>{let e=await tw();e&&await Promise.all([tj(e),ty(e),tN(e)]),eX(Date.now())})(),children:W("刷新设备","Refresh")})]}),(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 p-4",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-white",children:W("已连接设备","Devices")}),eD&&0!==eO.length?(0,s.jsx)("div",{className:"mt-3 space-y-2",children:eO.map(e=>(0,s.jsxs)("button",{className:"btn-focus w-full rounded-2xl border px-4 py-3 text-left ".concat(eR===e.serial?"border-cyan-500/40 bg-cyan-500/10":"border-white/8 bg-black/20"),onClick:()=>{eA(e.serial),Promise.all([tj(e.serial),ty(e.serial),tN(e.serial)]),eX(Date.now())},children:[(0,s.jsx)("div",{className:"text-sm text-white",children:e.model||e.device||e.serial}),(0,s.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500",children:[e.serial," | ",e.state]})]},e.serial))}):(0,s.jsx)("p",{className:"mt-3 text-sm text-slate-400",children:W("当前没有可用的 ADB 设备。","No active ADB device.")})]}),(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 p-4 text-xs text-slate-400",children:[(0,s.jsx)("p",{className:"text-white",children:W("设备状态","Device Status")}),(0,s.jsxs)("p",{className:"mt-2",children:[(null==eP?void 0:eP.brand)||"-"," ",(null==eP?void 0:eP.model)||"-"]}),(0,s.jsxs)("p",{className:"mt-2",children:["Android ",(null==eP?void 0:eP.android_version)||"-"," / SDK ",(null==eP?void 0:eP.sdk)||"-"]}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-wrap",children:(null==eP?void 0:eP.battery)||"-"}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-wrap",children:(null==eP?void 0:eP.resolution)||"-"}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-wrap",children:(null==eP?void 0:eP.focus)||"-"})]})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-8",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("屏幕预览与动作","Screen Preview and Actions")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("预览图支持直接点按/双击/长按,配合 UI 节点和包管理形成更完整的安卓控制台。","The preview supports tap, double tap and long press, backed by UI nodes and package tools.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"border border-white/12 ".concat("tap"===e0?"bg-cyan-600":"bg-black/20"),disabled:!eR||!!V,onClick:()=>e2("tap"),children:W("点击","Tap")}),(0,s.jsx)(C,{className:"border border-white/12 ".concat("double_tap"===e0?"bg-cyan-600":"bg-black/20"),disabled:!eR||!!V,onClick:()=>e2("double_tap"),children:W("双击","Double Tap")}),(0,s.jsx)(C,{className:"border border-white/12 ".concat("long_press"===e0?"bg-cyan-600":"bg-black/20"),disabled:!eR||!!V,onClick:()=>e2("long_press"),children:W("长按","Long Press")}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",disabled:!eR,onClick:()=>eX(Date.now()),children:W("刷新截图","Refresh Shot")})]})]}),(0,s.jsx)("div",{className:"mt-4 overflow-hidden rounded-3xl border border-white/8 bg-black/35 p-4",children:eR?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-3 text-xs text-slate-400",children:[(0,s.jsxs)("span",{children:[W("当前动作","Current action"),": ",tI]}),(0,s.jsxs)("span",{children:[W("分辨率","Resolution"),": ",(null==eP?void 0:eP.resolution)||"-"]}),(0,s.jsxs)("span",{children:[W("最近坐标","Last point"),": ",e1?"".concat(e1.x,", ").concat(e1.y):"-"]}),tl?(0,s.jsx)("span",{className:"text-cyan-400/90",children:W("截图刷新中…","Refreshing…")}):null]}),te?(0,s.jsxs)("div",{className:"mb-3 rounded-xl border border-rose-500/30 bg-rose-950/25 px-4 py-3 text-sm text-rose-100",children:[W("截图不可用:","Screenshot unavailable: "),te]}):null,e9?(0,s.jsx)(a.default,{alt:"Android preview",className:"max-h-[min(70vh,48rem)] min-h-[14rem] w-full cursor-crosshair rounded-2xl object-contain bg-black",onClick:e=>void tM(e),src:e9,unoptimized:!0,width:(null==tm?void 0:tm.width)||1080,height:(null==tm?void 0:tm.height)||1920}):te?null:(0,s.jsx)("div",{className:"flex min-h-[18rem] items-center justify-center rounded-2xl border border-dashed border-white/10 bg-black/30 text-sm text-slate-500",children:W("正在拉取截图…","Fetching screenshot…")})]}):(0,s.jsx)("div",{className:"flex min-h-[18rem] items-center justify-center rounded-2xl border border-dashed border-white/10 bg-black/20 text-sm text-slate-500",children:W("当前没有可用的 ADB 设备。","No active ADB device.")})}),(0,s.jsxs)("div",{className:"mt-6 grid gap-6 xl:grid-cols-3",children:[(0,s.jsxs)("div",{className:"rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:W("快捷控制","Quick Controls")}),(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-3 gap-2",children:[[["HOME","KEYCODE_HOME"],["BACK","KEYCODE_BACK"],["RECENTS","KEYCODE_APP_SWITCH"],["POWER","KEYCODE_POWER"],["NOTIFY","KEYCODE_NOTIFICATION"],["VOL+","KEYCODE_VOLUME_UP"],["VOL-","KEYCODE_VOLUME_DOWN"]].map(e=>{let[t,l]=e;return(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-3 text-xs text-slate-100",disabled:!eR||!!V,onClick:()=>void tL("key",{keycode:l}),children:t},t)}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-3 text-xs text-slate-100",disabled:!eR||!!V,onClick:()=>void tL("wake"),children:"WAKE"}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-3 text-xs text-slate-100",disabled:!eR||!!V,onClick:()=>void tL("rotate",{rotation:"0"}),children:"Portrait"}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-3 text-xs text-slate-100",disabled:!eR||!!V,onClick:()=>void tL("rotate",{rotation:"1"}),children:"Landscape"})]}),(0,s.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-2",children:["up","down","left","right"].map(e=>(0,s.jsxs)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-3 text-xs uppercase text-slate-100",disabled:!eR||!!V,onClick:()=>void tL("swipe",{direction:e}),children:["Swipe ",e]},e))})]}),(0,s.jsxs)("div",{className:"rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:W("输入与跳转","Input and Launch")}),(0,s.jsx)("textarea",{className:"mt-4 min-h-[6rem] w-full rounded-2xl border border-white/10 bg-black/45 p-4 text-sm text-slate-200",placeholder:W("输入要发送到安卓输入框的文字","Text to send to Android"),value:eW,onChange:e=>eK(e.target.value)}),(0,s.jsx)(C,{className:"mt-3 bg-cyan-600",disabled:!eW.trim()||!eR||!!V,onClick:()=>void tL("text",{text:eW}),children:W("发送文本","Send Text")}),(0,s.jsx)("input",{className:"mt-4 w-full rounded-2xl border border-white/10 bg-black/45 px-4 py-3 text-sm text-slate-200",placeholder:"com.zhiliaoapp.musically",value:eH,onChange:e=>eY(e.target.value)}),(0,s.jsxs)("div",{className:"mt-3 grid grid-cols-3 gap-2",children:[(0,s.jsx)(C,{className:"bg-emerald-600",disabled:!eH.trim()||!eR||!!V,onClick:()=>void tL("launch_package",{package:eH}),children:W("启动","Launch")}),(0,s.jsx)(C,{className:"bg-amber-600",disabled:!eH.trim()||!eR||!!V,onClick:()=>void tL("force_stop",{package:eH}),children:W("停应用","Stop App")}),(0,s.jsx)(C,{className:"bg-rose-600",disabled:!eH.trim()||!eR||!!V,onClick:()=>void tL("clear_app",{package:eH}),children:W("清数据","Clear Data")})]}),(0,s.jsx)("input",{className:"mt-4 w-full rounded-2xl border border-white/10 bg-black/45 px-4 py-3 text-sm text-slate-200",placeholder:"https://www.tiktok.com",value:eJ,onChange:e=>eZ(e.target.value)}),(0,s.jsx)(C,{className:"mt-3 bg-violet-600",disabled:!eJ.trim()||!eR||!!V,onClick:()=>void tL("open_url",{url:eJ}),children:W("打开链接","Open URL")})]}),(0,s.jsxs)("div",{className:"rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:W("应用工作台","App Workspace")}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",disabled:!eR||!!V,onClick:()=>void ty(eR),children:W("刷新UI","Refresh UI")})]}),(0,s.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:[["TikTok","com.zhiliaoapp.musically"],["Chrome","com.android.chrome"],["Settings","com.android.settings"],["YouTube","com.google.android.youtube"],["Play","com.android.vending"]].map(e=>{let[t,l]=e;return(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 bg-slate-950/50 px-3 py-2 text-xs text-slate-100",disabled:!eR||!!V,onClick:()=>{eY(l),tL("launch_package",{package:l})},children:t},l)})}),(0,s.jsxs)("div",{className:"mt-4 flex gap-2",children:[(0,s.jsx)("input",{className:"w-full rounded-2xl border border-white/10 bg-black/45 px-4 py-3 text-sm text-slate-200",placeholder:W("搜索包名,例如 tiktok","Search package, e.g. tiktok"),value:ez,onChange:e=>eF(e.target.value)}),(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!eR||!!V,onClick:()=>void tN(eR),children:W("搜索","Search")})]}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:0===eM.length?(0,s.jsx)("div",{className:"rounded-2xl border border-dashed border-white/10 px-4 py-6 text-sm text-slate-500",children:W("还没有查询结果。","No package results yet.")}):eM.slice(0,8).map(e=>(0,s.jsxs)("div",{className:"rounded-2xl border border-white/8 bg-slate-950/30 p-3",children:[(0,s.jsx)("div",{className:"text-sm text-white",children:e.label||e.package.split(".").pop()}),(0,s.jsx)("div",{className:"mt-1 truncate font-mono text-[11px] text-slate-500",children:e.package}),(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-xs text-slate-200",disabled:!eR||!!V,onClick:()=>{eY(e.package),tL("launch_package",{package:e.package})},children:W("启动","Launch")}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-xs text-slate-200",disabled:!eR||!!V,onClick:()=>{eY(e.package),tL("force_stop",{package:e.package})},children:W("停应用","Stop")}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-xs text-slate-200",disabled:!eR||!!V,onClick:()=>{eY(e.package),tL("clear_app",{package:e.package})},children:W("清数据","Clear")})]})]},e.package))})]})]}),(0,s.jsxs)("div",{className:"mt-6 grid gap-6 xl:grid-cols-[0.95fr,1.05fr]",children:[(0,s.jsxs)("div",{className:"rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:"ADB Shell"}),(0,s.jsxs)("div",{className:"mt-4 flex flex-col gap-3 lg:flex-row",children:[(0,s.jsx)("input",{className:"w-full rounded-2xl border border-white/10 bg-black/45 px-4 py-3 text-sm text-slate-200",placeholder:"input keyevent KEYCODE_HOME",value:eG,onChange:e=>eV(e.target.value)}),(0,s.jsx)(C,{className:"bg-amber-600",disabled:!eG.trim()||!eR||!!V,onClick:()=>void tL("shell",{command:eG}),children:W("执行命令","Run Command")})]}),(0,s.jsx)("pre",{className:"log-scroll mt-4 min-h-[14rem] rounded-2xl border border-white/10 bg-black/45 p-4 font-mono text-[11px] text-slate-200",children:eQ||W("动作结果会显示在这里。","Action output will appear here.")})]}),(0,s.jsxs)("div",{className:"rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:W("UI 节点","UI Nodes")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("用 uiautomator 抓当前页面结构,快速定位可点击元素。","Inspect the current UI hierarchy and act on clickable nodes.")})]}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",disabled:!eR||!!V,onClick:()=>void ty(eR),children:W("刷新节点","Refresh Nodes")})]}),(0,s.jsx)("div",{className:"mt-4 space-y-3",children:0===eL.length?(0,s.jsx)("div",{className:"rounded-2xl border border-dashed border-white/10 px-4 py-6 text-sm text-slate-500",children:W("还没有抓到 UI 节点。","No UI nodes yet.")}):eL.slice(0,12).map((e,t)=>(0,s.jsxs)("div",{className:"rounded-2xl border border-white/8 bg-slate-950/30 p-3",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm text-white",children:e.label||e.resource_id||e.class_name||"node"}),(0,s.jsx)("div",{className:"mt-1 text-[11px] text-slate-500",children:e.resource_id||e.class_name||"-"}),(0,s.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500",children:[e.bounds," | ",e.center_x,",",e.center_y]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-xs text-slate-200",disabled:!eR||!!V,onClick:()=>void tL("tap",{x:e.center_x,y:e.center_y}),children:W("点击","Tap")}),(0,s.jsx)("button",{className:"btn-focus rounded-xl border border-white/10 px-3 py-2 text-xs text-slate-200",disabled:!eR||!!V,onClick:()=>void tL("long_press",{x:e.center_x,y:e.center_y,duration:750}),children:W("长按","Long Press")})]})]}),e.text||e.content_desc?(0,s.jsx)("div",{className:"mt-2 whitespace-pre-wrap text-xs text-slate-400",children:e.text||e.content_desc}):null]},"".concat(e.resource_id||e.label,"-").concat(t)))})]})]}),tx?(0,s.jsxs)("div",{className:"mt-6 rounded-3xl border border-white/8 bg-black/20 p-5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsx)("h3",{className:"text-base font-semibold text-white",children:"ws-scrcpy"}),(0,s.jsx)("a",{className:"btn-focus rounded-xl border border-white/12 px-3 py-2 text-xs text-slate-200",href:tx,target:"_blank",rel:"noreferrer",children:W("新标签全屏打开","Open full tab")})]}),(0,s.jsx)("p",{className:"mt-2 text-xs leading-relaxed text-slate-500",children:W(th?"内嵌若黑屏:多为 WebSocket 未连上或服务未启动。请先确认「系统服务」里 android_panel 在线,并尝试新标签打开;Neko(Chromium)实例通常为 ".concat(th,"。"):"内嵌若黑屏:多为 WebSocket 未连上或服务未启动。请先确认「系统服务」里 android_panel 在线,并尝试新标签打开;Neko(Chromium)在 ENABLE_NEKO=1 且容器运行后一般为 9200 端口。",th?"Black iframe: often WebSocket or service down. Check android_panel in Services, try opening in a new tab; Neko Chromium instances are usually on ".concat(th,"."):"Black iframe: often WebSocket or service down. Check android_panel in Services, try opening in a new tab; Neko Chromium is often :9200 when ENABLE_NEKO=1 and the container is up.")}),(0,s.jsx)("iframe",{className:"mt-4 h-[30rem] w-full rounded-2xl border border-white/10 bg-black",src:tx,title:"ws-scrcpy"})]}):null]})]}):null,"config"===z?(0,s.jsxs)("section",{className:"grid gap-6 xl:grid-cols-12",children:[(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("配置中心","Config Center")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("系统级与业务级配置文件分目录托管,避免大杂烩。","System and business configs are isolated by managed roots.")})]}),(0,s.jsx)(C,{className:"border border-white/12 bg-black/20",onClick:()=>void tv(ew),children:W("刷新","Refresh")})]}),(0,s.jsx)("select",{className:"mt-4 w-full rounded-2xl border border-white/12 bg-slate-950/60 px-4 py-3 text-sm text-white",value:ew,onChange:e=>{ej(e.target.value),eC("")},children:tF.map(e=>(0,s.jsxs)("option",{value:e.root_id,children:[e.label," | ",e.file_count]},e.root_id))}),ta?(0,s.jsxs)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 p-4 text-xs text-slate-400",children:[(0,s.jsx)("p",{className:"text-white",children:ta.label}),(0,s.jsx)("p",{className:"mt-2",children:ta.description}),(0,s.jsx)("p",{className:"mt-2 font-mono text-[11px] text-slate-500",children:ta.path})]}):null,(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!!V,onClick:()=>void tA(),children:W("新建","New")}),(0,s.jsx)(C,{className:"bg-rose-600",disabled:!ek||!!V,onClick:()=>void tP(),children:W("删除","Delete")})]}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:eN.map(e=>(0,s.jsxs)("button",{className:"btn-focus w-full rounded-2xl border px-4 py-3 text-left ".concat(ek===e.path?"border-cyan-500/40 bg-cyan-500/10":"border-white/8 bg-black/20"),onClick:()=>eC(e.path),children:[(0,s.jsx)("div",{className:"truncate text-sm text-white",children:e.path}),(0,s.jsxs)("div",{className:"mt-1 text-[11px] text-slate-500",children:[y(e.size)," | ",new Date(1e3*e.mtime).toLocaleString("zh"===L?"zh-CN":"en-US",{hour12:!1})]})]},e.path))})]}),(0,s.jsxs)("article",{className:"glass rounded-3xl p-6 xl:col-span-8",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:W("文件编辑器","Config Editor")}),(0,s.jsx)("p",{className:"mt-2 text-xs text-slate-400",children:W("仅允许编辑受管目录中的配置文件。","Only approved config roots are editable.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)("label",{className:"btn-focus rounded-xl border border-white/12 px-3 py-2 text-xs text-slate-100 ".concat(V?"cursor-not-allowed opacity-40":""),children:["file:import"===V?W("导入中...","Importing..."):W("导入/替换","Import/Replace"),(0,s.jsx)("input",{className:"hidden",disabled:!!V,type:"file",accept:".yaml,.yml,.json,.cfg,.env,.list,.txt,.ini",onChange:e=>void tU(e)},"config-".concat(e5))]}),(0,s.jsx)(C,{className:"bg-cyan-600",disabled:!ek||!!V,onClick:()=>void tR(),children:"file:save"===V?W("保存中...","Saving..."):W("保存","Save")})]})]}),(0,s.jsx)("div",{className:"mt-4 rounded-2xl border border-white/8 bg-black/20 px-4 py-3 font-mono text-[11px] text-slate-500",children:ek?"".concat(ew," / ").concat(ek):W("请选择文件","Pick a file")}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(m,{lang:L,rootId:ew,filePath:ek,fileContent:eS,refreshKey:e6,busy:V,fetchJson:tp,notify:tu,onChangeContent:e_,onRefreshListing:()=>tv(ew,ek)})}),(0,s.jsx)("textarea",{className:"log-scroll mt-4 min-h-[32rem] w-full resize-y rounded-2xl border border-white/10 bg-black/45 p-4 font-mono text-xs leading-relaxed text-slate-200",spellCheck:!1,value:eS,onChange:e=>e_(e.target.value)})]})]}):null]})]}),A?null:(0,s.jsx)("nav",{className:"fixed bottom-0 left-0 right-0 z-40 flex justify-around border-t border-white/15 bg-black/75 py-1.5 backdrop-blur-lg [html[data-theme=light]_&]:border-slate-200/60 [html[data-theme=light]_&]:bg-white/90 md:hidden",style:{paddingBottom:"max(0.35rem, env(safe-area-inset-bottom))"},"aria-label":W("主导航","Main nav"),children:f.map(e=>(0,s.jsxs)("button",{type:"button",className:"btn-focus flex min-w-0 flex-1 flex-col items-center gap-0.5 rounded-xl px-1 py-1 text-[10px] font-medium ".concat(z===e?"text-cyan-300 [html[data-theme=light]_&]:text-cyan-700":"text-slate-400 [html[data-theme=light]_&]:text-slate-600"),onClick:()=>F(e),children:[(0,s.jsx)("span",{className:"text-lg leading-none","aria-hidden":!0,children:tW[e]}),(0,s.jsx)("span",{className:"truncate",children:{overview:W("总览","Home"),business:W("业务","Biz"),modules:W("模块","Mods"),shellcrash:"SC",android:W("安卓","Droid"),config:W("配置","Cfg")}[e]})]},e))})]})}},1387:function(e,t,l){function s(e,t,l){return"string"==typeof(null==l?void 0:l.error)&&l.error.trim()||"string"==typeof(null==l?void 0:l.message)&&l.message.trim()||"string"==typeof(null==l?void 0:l.detail)&&l.detail.trim()||function(e){let t=e.replace(/\s+/g," ").trim();return t?t.length<=240?t:"".concat(t.slice(0,237),"..."):""}(t)||function(e){var t;let l=(null===(t=e.statusText)||void 0===t?void 0:t.trim())?" ".concat(e.statusText.trim()):"";return"HTTP ".concat(e.status).concat(l)}(e)}async function a(e,t){let l=await fetch(e,{cache:"no-store",...t}),a=(await l.text()).trim(),r=null;if(a)try{r=JSON.parse(a)}catch(t){if(!l.ok)throw Error(s(l,a,null));throw Error("Invalid JSON response from ".concat(e))}if(!l.ok)throw Error(s(l,a,r));return null!==r?r:{}}async function r(e){let t=(await e.text()).trim(),l=null;if(t)try{l=JSON.parse(t)}catch(e){l=null}return s(e,t,l)}l.d(t,{N:function(){return a},e:function(){return r}})},90:function(e,t,l){l.d(t,{O0:function(){return r},Tc:function(){return i},U_:function(){return n}});let s=/^neko_browser(?:(?:_(lan|wireguard|nat1to1|public))?(?:_(\d+))?)?$/i,a={wireguard:80,public:70,nat1to1:60,lan:50,direct:40};function r(e){let t=new Map;for(let[n,i]of Object.entries(null!=e?e:{})){var l,r;let e=n.match(s),o=i.trim();if(!e||!o)continue;let c=(e[1]||("neko_browser"===n||/^neko_browser_\d+$/i.test(n)?"direct":"lan")).toLowerCase(),d="neko_browser"===n?1:Number(e[2]||1),h={id:d,key:n,label:"Neko ".concat(d),url:o,port:function(e){try{return new URL(e,"http://127.0.0.1").port||""}catch(e){return""}}(o),accessKind:c,accessLabel:"wireguard"===c?"WireGuard":"public"===c?"Public":"nat1to1"===c?"NAT1TO1":"lan"===c?"LAN":"Direct",host:function(e){try{return new URL(e,"http://127.0.0.1").hostname||""}catch(e){return""}}(o)},x=t.get(d),m=x?null!==(l=a[x.accessKind])&&void 0!==l?l:0:-1,u=null!==(r=a[c])&&void 0!==r?r:0,p=!x||u>m||u===m&&"neko_browser"!==n;(!x||p)&&t.set(d,h)}return Array.from(t.values()).sort((e,t)=>e.id-t.id)}function n(e,t){return e.length?!Number.isInteger(t)||t<0?{link:e[0],fallback:!1}:te.port).filter(Boolean)));return t.length?t.map(e=>":".concat(e)).join(" / "):""}},8401:function(e,t,l){l.d(t,{p:function(){return s}});function s(e){let t=e.trim();if(!t)return t;try{let e=new URL(t,window.location.origin),l=e.hostname,s=window.location.hostname;if("0.0.0.0"===l||"::"===l||"[::]"===l)return e.hostname=s||l,e.toString();if(("127.0.0.1"===l||"localhost"===l)&&s&&"127.0.0.1"!==s&&"localhost"!==s)return e.hostname=s,e.toString();if(l.endsWith(".local")&&"8001"===e.port)return"".concat(e.pathname||"/").concat(e.search).concat(e.hash);if(l.endsWith(".local")&&s&&s!==l)return e.hostname=s,e.toString();return t}catch(e){return t}}}}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/chunks/348-80f0852ea47d5112.js b/d2ypp2/web-console/out/_next/static/chunks/348-80f0852ea47d5112.js new file mode 100644 index 0000000..dbe0b30 --- /dev/null +++ b/d2ypp2/web-console/out/_next/static/chunks/348-80f0852ea47d5112.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[348],{6348:function(e,t,s){s.d(t,{Z:function(){return t0}});var n=s(7437),l=s(6247),i=s(7586),a=s(4401),r=s(6137),o=s(4372),c=s(5901),d=s(3388),x=s(4938),u=s(3420),m=s(8728),h=s(2023),p=s(407),g=s(6840),b=s(7226),f=s(5929),v=s(7945),y=s(1817),w=s(7168),j=s(3581),N=s(4766),k=s(7580),_=s(9688),z=s(4743),S=s(8930),C=s(3651),R=s(4286),L=s(4428),P=s(7265),M=s(8867),T=s(8406),E=s(2926),U=s(2489),Z=s(2265),I=s(2246),A=s(4794),D=s(221),O=s(8124),B=s(2101),W=s(9985),K=s(6362),H=s(3468),F=s(6443),Y=s(5287),G=s(3276),q=s(9227),V=s(257),J=s(1387);class ${reset(){if(this.buf=new Uint8Array(0),this.sps=null,this.pps=null,this.configured=!1,this.configuring=!1,this.ts=0,this.decoder){try{this.decoder.close()}catch(e){}this.decoder=null}}push(e){let t=new Uint8Array(e.byteLength);t.set(new Uint8Array(e)),this.buf=function(e,t){let s=new Uint8Array(e.length+t.length);return s.set(e,0),s.set(t,e.length),s}(this.buf,t),this.drainAvcc()}drainAvcc(){let e=this.buf,t=0;for(;t+4<=e.length;){var s;let n=e[s=t]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3];if(n<=0||n>6291456){this.buf=new Uint8Array(e.subarray(t+1)),t=0;continue}if(t+4+n>e.length)break;let l=e.subarray(t+4,t+4+n);t+=4+n,this.handleNal(l)}t>0&&(this.buf=new Uint8Array(e.subarray(t)))}handleNal(e){if(e.length<2)return;let t=31&e[0];if(7===t?this.sps=new Uint8Array(e):8===t&&(this.pps=new Uint8Array(e)),this.sps&&this.pps&&!this.configured&&!this.configuring&&this.configure(),!this.configured||!this.decoder||1!==t&&5!==t&&7!==t&&8!==t||7===t||8===t)return;let s=new Uint8Array(4+e.length);new DataView(s.buffer).setUint32(0,e.length,!1),s.set(e,4);try{let e=new EncodedVideoChunk({type:5===t?"key":"delta",timestamp:this.ts,data:s});this.ts+=33333,this.decoder.decode(e)}catch(e){this.onDecodeError(e.message||String(e))}}async configure(){if(this.sps&&this.pps&&!this.configured&&!this.configuring){this.configuring=!0;try{let e=function(e,t){let s=e.subarray(1),n=t.subarray(1),l=new Uint8Array(11+s.length+3+n.length),i=0;return l[i++]=1,l[i++]=e[1],l[i++]=e[2],l[i++]=e[3],l[i++]=255,l[i++]=225,l[i++]=s.length>>8&255,l[i++]=255&s.length,l.set(s,i),i+=s.length,l[i++]=1,l[i++]=n.length>>8&255,l[i++]=255&n.length,l.set(n,i),l}(this.sps,this.pps),t=function(e){let t=e=>e.toString(16).padStart(2,"0").toUpperCase();return"avc1.".concat(t(e[1])).concat(t(e[2])).concat(t(e[3]))}(this.sps),s=new VideoDecoder({output:e=>{var t;let s=this.canvas.getContext("2d");if(!s){e.close();return}(this.canvas.width!==e.displayWidth||this.canvas.height!==e.displayHeight)&&(this.canvas.width=e.displayWidth,this.canvas.height=e.displayHeight),s.drawImage(e,0,0),e.close(),null===(t=this.onFrame)||void 0===t||t.call(this)},error:e=>this.onDecodeError(String(e.message||e))});await s.configure({codec:t,description:e,optimizeForLatency:!0}),this.decoder=s,this.configured=!0}catch(e){this.onDecodeError(e.message||String(e))}finally{this.configuring=!1}}}constructor(e,t,s){this.canvas=e,this.onDecodeError=t,this.onFrame=s,this.buf=new Uint8Array(0),this.decoder=null,this.configured=!1,this.configuring=!1,this.ts=0,this.sps=null,this.pps=null}}function X(){return"undefined"!=typeof VideoDecoder&&"undefined"!=typeof VideoFrame}let Q="live-hub-adb-bookmarks-v1";function ee(e,t,s){let n,l,i,a;let r=e.getBoundingClientRect(),o=e.width,c=e.height;if(!o||!c)return null;let d=r.width/r.height,x=o/c;x>d?(n=r.width,l=r.width/x,i=0,a=(r.height-l)/2):(l=r.height,n=r.height*x,i=(r.width-n)/2,a=0);let u=t-r.left-i,m=s-r.top-a;return u<0||m<0||u>n||m>l?null:{x:Math.max(0,Math.min(o-1,Math.round(u/n*o))),y:Math.max(0,Math.min(c-1,Math.round(m/l*c)))}}function et(e,t,s){let n,l,i,a;let r=e.getBoundingClientRect(),o=e.naturalWidth,c=e.naturalHeight;if(!o||!c)return null;let d=r.width/r.height,x=o/c;x>d?(n=r.width,l=r.width/x,i=0,a=(r.height-l)/2):(l=r.height,n=r.height*x,i=(r.width-n)/2,a=0);let u=t-r.left-i,m=s-r.top-a;return u<0||m<0||u>n||m>l?null:{x:Math.max(0,Math.min(o-1,Math.round(u/n*o))),y:Math.max(0,Math.min(c-1,Math.round(m/l*c)))}}let es=[0,280,450,700,1100];function en(e){switch(e){case"usb":return{Icon:B.Z,zh:"USB",en:"USB",cls:"bg-amber-500/20 text-amber-100 ring-amber-500/35"};case"tcp":return{Icon:E.Z,zh:"网络",en:"TCP",cls:"bg-cyan-500/20 text-cyan-100 ring-cyan-500/35"};case"emulator":return{Icon:C.Z,zh:"模拟器",en:"Emu",cls:"bg-fuchsia-500/20 text-fuchsia-100 ring-fuchsia-500/35"};default:return{Icon:d.Z,zh:"?",en:"?",cls:"bg-zinc-600/30 text-zinc-400"}}}let el="https://github.com/Genymobile/scrcpy",ei="https://github.com/viarotel-org/escrcpy";function ea(e,t){let s=t.startsWith("/")?t:"/".concat(t),n=(e||"").trim().replace(/\/$/,"");return n?"".concat(n).concat(s):s}function er(e){var t;let{t:s,apiBase:l,fetchJson:i,serial:a,devices:r,setSerial:o,adbAvailable:c,lock:x,overview:u,onAndroidAction:m,notify:p,onRefreshDevices:g}=e,[b,f]=(0,Z.useState)(0),[v,y]=(0,Z.useState)(450),[j,N]=(0,Z.useState)(!1),[k,_]=(0,Z.useState)(null),[z,S]=(0,Z.useState)(null),[C,R]=(0,Z.useState)(!0),[L,P]=(0,Z.useState)(""),[M,T]=(0,Z.useState)(""),[E,U]=(0,Z.useState)("37777"),[I,A]=(0,Z.useState)(""),[D,O]=(0,Z.useState)(!1),[B,er]=(0,Z.useState)([]),[eo,ec]=(0,Z.useState)(!1),[ed,ex]=(0,Z.useState)(null),[eu,em]=(0,Z.useState)(!1),[eh,ep]=(0,Z.useState)(null),[eg,eb]=(0,Z.useState)(null),[ef,ev]=(0,Z.useState)(!0),ey=(0,Z.useRef)(null),ew=(0,Z.useRef)(null),ej=(0,Z.useRef)(null),eN=(0,Z.useRef)(null),ek=(0,Z.useRef)(null),e_=(0,Z.useRef)(null),ez=(0,Z.useRef)(0),eS=(0,Z.useRef)(!1),eC=(0,Z.useRef)(null),eR=(0,Z.useRef)(!1),eL=null===(t=r.find(e=>e.serial===a))||void 0===t?void 0:t.transport,eP=v>0,eM=a?"".concat(ea(l,"/android/screenshot"),"?serial=").concat(encodeURIComponent(a),"&ts=").concat(b).concat(eP?"&fast=1":""):"",eT=(0,Z.useCallback)(()=>{f(e=>e+1)},[]),eE=(0,Z.useCallback)(()=>{null!=eC.current&&(window.clearTimeout(eC.current),eC.current=null)},[]);(0,Z.useEffect)(()=>{let e=()=>ev("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(Q);if(e){let t=JSON.parse(e);Array.isArray(t)&&er(t.map(String).filter(Boolean).slice(0,24))}}catch(e){}},[]);let eU=e=>{let t=e.trim();if(!t)return;let n=[t,...B.filter(e=>e!==t)].slice(0,16);er(n);try{window.localStorage.setItem(Q,JSON.stringify(n))}catch(e){}p(s("已保存快捷地址","Saved quick address"))};(0,Z.useEffect)(()=>{if(!a||!c){S(null);return}let e=!1;return(async()=>{try{let t=await (0,J.N)("".concat(ea(l,"/android/display_metrics"),"?serial=").concat(encodeURIComponent(a)));if(e)return;"number"==typeof t.width&&"number"==typeof t.height&&S({width:t.width,height:t.height})}catch(e){}})(),()=>{e=!0}},[l,c,a]),(0,Z.useEffect)(()=>{if(!c||!a||v<=0||eo||!ef)return;let e=window.setInterval(()=>f(e=>e+1),v);return()=>clearInterval(e)},[c,v,ef,a,eo]),(0,Z.useEffect)(()=>{ef&&c&&a&&!eo&&eT()},[c,eT,ef,a,eo]),(0,Z.useEffect)(()=>{if(!c){eb(null);return}let e=!1;return(async()=>{try{let t=await (0,J.N)(ea(l,"/android/scrcpy/info"));e||eb(t)}catch(e){}})(),()=>{e=!0}},[l,c]),(0,Z.useEffect)(()=>{eo||ep(null)},[eo]),(0,Z.useEffect)(()=>{ex(null),eS.current=!1},[a]),(0,Z.useEffect)(()=>{let e=r.find(e=>e.serial===a),t=!!(a&&ed===a);if(c&&a&&(null==e?void 0:e.state)==="device"&&(null==eg?void 0:eg.server_jar)&&X()&&!t){ec(!0),y(0);return}if(t||!a||!c||eg&&!eg.server_jar||!X()||e&&"device"!==e.state){ec(!1);return}},[a,r,c,eg,ed]),(0,Z.useEffect)(()=>{if(!eo||!a||!c){var e,t;eE(),eS.current=!0,eR.current=!1,null===(e=eN.current)||void 0===e||e.close(),eN.current=null,null===(t=ek.current)||void 0===t||t.reset(),ek.current=null,em(!1);return}if(!X()){ep(s("当前浏览器不支持 WebCodecs H.264","WebCodecs H.264 not supported in this browser")),ec(!1);return}let n=ej.current;if(!n)return;let i=e=>{var t;eE(),eS.current=!0,null===(t=eN.current)||void 0===t||t.close(),ep(e),ec(!1),y(450),ex(a),window.setTimeout(()=>eT(),120)},r=new $(n,e=>i("".concat(s("实时画面解码失败,已切回截图模式","Live stream decode failed, using screenshot mode"),": ").concat(e)),()=>{eR.current=!0,eE()});ek.current=r,eS.current=!1,eR.current=!1;let o=new WebSocket(function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1920,n=(function(e){let t=(e||"").trim();if(t)try{let e=new URL(t,window.location.href),s="https:"===e.protocol?"wss:":"ws:";return"".concat(s,"//").concat(e.host)}catch(e){}let s=void 0!==V&&V.env.NEXT_PUBLIC_API_URL?String(V.env.NEXT_PUBLIC_API_URL).trim():"";if(s)try{let e=new URL(s,window.location.href),t="https:"===e.protocol?"wss:":"ws:";return"".concat(t,"//").concat(e.host)}catch(e){}let n=window.location.port;if("3000"===n||"3001"===n){let e=window.location.hostname||"127.0.0.1";return"ws://".concat(e,":").concat("8001")}let{protocol:l,host:i}=window.location;return"".concat("https:"===l?"wss:":"ws:","//").concat(i)})(e).replace(/\/$/,""),l=new URLSearchParams({serial:t,max_size:String(s)});return"".concat(n,"/android/scrcpy/ws?").concat(l.toString())}(l,a));return eN.current=o,o.binaryType="arraybuffer",o.onopen=()=>{em(!0),ep(null),eE(),eC.current=window.setTimeout(()=>{eR.current||i(s("实时画面无首帧,已切回截图模式","No first live frame, using screenshot mode"))},5200)},o.onmessage=e=>{var t;if("string"==typeof e.data){try{let t=JSON.parse(e.data);t.error&&ep(t.error)}catch(e){}return}null===(t=ek.current)||void 0===t||t.push(e.data)},o.onerror=()=>{ep(s("WebSocket 异常","WebSocket error"))},o.onclose=()=>{var e;em(!1),null===(e=ek.current)||void 0===e||e.reset(),ek.current=null,eE(),eo&&!eS.current&&i(s("实时画面连接失败,已切回截图模式","Live stream failed, using screenshot mode"))},()=>{eE(),eS.current=!0,eR.current=!1,o.close(),eN.current=null,r.reset(),ek.current===r&&(ek.current=null)}},[eo,a,c,l,eT,eE,s]),(0,Z.useEffect)(()=>{a&&c&&(ez.current=0,f(e=>e+1))},[a,c]);let eZ=async()=>{let e=L.trim();if(!e){p(s("填写 host:port","Enter host:port"));return}O(!0);try{let t=await i("/android/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e})});p(t.message||(t.ok?"OK":s("连接结果见日志","See message"))),g(),eT()}catch(e){p(e.message)}finally{O(!1)}},eI=async e=>{O(!0);try{let t=await i("/android/disconnect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e})});p(t.message||"OK"),g()}catch(e){p(e.message)}finally{O(!1)}},eA=async()=>{let e=M.trim(),t=parseInt(E,10)||37777,n=I.trim();if(!e||!n){p(s("填写配对 IP 与码","Host + code required"));return}O(!0);try{let l=await i("/android/pair",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({host:e,port:t,code:n})});p(l.message||(l.ok?s("配对成功后再点连接","Paired — now Connect"):"pair"))}catch(e){p(e.message)}finally{O(!1)}},eD=async e=>{if(!C||x||!c||!a)return;let t=ew.current;if(!t)return;let n=et(t,e.clientX,e.clientY);if(!n)return;let l=Date.now(),i=ey.current;i&&l-i.t<320&&28>Math.abs(i.x-n.x)&&28>Math.abs(i.y-n.y)?(ey.current=null,await m("double_tap",{x:n.x,y:n.y}),p(s("双击","Double tap"))):(ey.current={t:l,x:n.x,y:n.y},await m("tap",{x:n.x,y:n.y})),eT()},eO=async e=>{if(e.preventDefault(),x||!c||!a)return;let t=ew.current;if(!t)return;let n=et(t,e.clientX,e.clientY);n&&(await m("long_press",{x:n.x,y:n.y,duration:720}),p(s("长按","Long press")),eT())},eB=async e=>{if(!C||x||!c||!a)return;let t=ej.current;if(!t)return;let n=ee(t,e.clientX,e.clientY);if(!n)return;let l=Date.now(),i=ey.current;i&&l-i.t<320&&28>Math.abs(i.x-n.x)&&28>Math.abs(i.y-n.y)?(ey.current=null,await m("double_tap",{x:n.x,y:n.y}),p(s("双击","Double tap"))):(ey.current={t:l,x:n.x,y:n.y},await m("tap",{x:n.x,y:n.y})),eo||eT()},eW=async e=>{if(e.preventDefault(),x||!c||!a)return;let t=ej.current;if(!t)return;let n=ee(t,e.clientX,e.clientY);n&&(await m("long_press",{x:n.x,y:n.y,duration:720}),p(s("长按","Long press")),eo||eT())};if(!c)return(0,n.jsx)("div",{className:"rounded-2xl border border-amber-500/25 bg-amber-500/[0.06] p-6 text-center text-sm text-amber-200/90",children:s("宿主机未安装 adb,无法使用 Live 控制台。","adb is required for the Live console.")});let eK=en(eL),eH=eK.Icon;return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-sky-500/20 bg-gradient-to-br from-sky-500/[0.08] via-zinc-950/80 to-zinc-900/90 p-4 ring-1 ring-white/[0.05]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-white/[0.06] pb-3",children:[(0,n.jsx)(W.Z,{className:"h-4 w-4 text-sky-400"}),(0,n.jsx)("h4",{className:"text-sm font-semibold text-white",children:s("链路管理","Link manager")}),(0,n.jsx)("span",{className:"text-[10px] text-zinc-500",children:s("USB / Redroid :5555 / 无线调试(先配对再连接)","USB \xb7 Redroid :5555 \xb7 wireless (pair then connect)")})]}),(0,n.jsxs)("div",{className:"mt-3 grid gap-3 lg:grid-cols-2",children:[(0,n.jsxs)("div",{className:"space-y-2 rounded-xl border border-white/[0.06] bg-black/35 p-3",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:"adb connect"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("input",{className:"min-w-[12rem] flex-1 rounded-lg border border-white/10 bg-black/50 px-3 py-2 font-mono text-xs text-zinc-200",placeholder:"192.168.1.10:5555",value:L,onChange:e=>P(e.target.value),onKeyDown:e=>"Enter"===e.key&&void eZ()}),(0,n.jsx)("button",{type:"button",disabled:D||x,onClick:()=>void eZ(),className:"rounded-lg bg-sky-500/25 px-3 py-2 text-xs font-semibold text-sky-100 ring-1 ring-sky-400/40",children:D?"…":"Connect"}),(0,n.jsx)("button",{type:"button",disabled:D||x||!L.trim(),onClick:()=>eU(L),className:"rounded-lg border border-white/10 px-3 py-2 text-xs text-zinc-400 hover:text-zinc-200",children:s("存书签","Pin")})]}),B.length?(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-1",children:B.map(e=>(0,n.jsx)("button",{type:"button",className:"rounded-md bg-white/[0.06] px-2 py-0.5 font-mono text-[10px] text-zinc-400 hover:bg-white/10",onClick:()=>P(e),children:e},e))}):null,(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 pt-2",children:[(0,n.jsx)("button",{type:"button",disabled:D||x||!a,onClick:()=>void eI(a),className:"rounded-lg border border-rose-500/30 bg-rose-500/10 px-2.5 py-1.5 text-[10px] text-rose-200",children:s("断开当前 TCP","Disconnect current")}),(0,n.jsx)("button",{type:"button",disabled:D||x,onClick:()=>void eI(""),className:"rounded-lg border border-white/10 px-2.5 py-1.5 text-[10px] text-zinc-500 hover:text-zinc-300",children:s("断开全部 TCP","Disconnect all TCP")}),(0,n.jsxs)("button",{type:"button",disabled:D||x,onClick:()=>{g(),eT(),p(s("已刷新设备列表","Devices refreshed"))},className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-2.5 py-1.5 text-[10px] text-zinc-400",children:[(0,n.jsx)(w.Z,{className:"h-3 w-3"}),"ADB list"]})]})]}),(0,n.jsxs)("div",{className:"space-y-2 rounded-xl border border-white/[0.06] bg-black/35 p-3",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:"adb pair(无线调试)"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("input",{className:"w-32 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs",placeholder:"IP",value:M,onChange:e=>T(e.target.value)}),(0,n.jsx)("input",{className:"w-20 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs",placeholder:"port",value:E,onChange:e=>U(e.target.value)}),(0,n.jsx)("input",{className:"min-w-[6rem] flex-1 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs tracking-widest",placeholder:"123456",value:I,onChange:e=>A(e.target.value)}),(0,n.jsx)("button",{type:"button",disabled:D||x,onClick:()=>void eA(),className:"rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs text-violet-100 ring-1 ring-violet-400/35",children:"Pair"})]}),(0,n.jsx)("p",{className:"text-[10px] leading-relaxed text-zinc-600",children:s("手机上「无线调试」会显示配对端口与 6 位码;配对成功后用上方 connect 连接 adb 显示的 IP:5555。","Use the pairing port + 6-digit code from Wireless debugging; then connect to the listed adb IP:5555.")})]})]})]}),(0,n.jsxs)("div",{className:"relative overflow-hidden rounded-3xl border border-emerald-500/25 bg-gradient-to-br from-emerald-500/[0.12] via-zinc-950/90 to-violet-500/[0.08] p-1 shadow-2xl shadow-emerald-900/20 ring-1 ring-white/[0.06]",children:[(0,n.jsx)("div",{className:"pointer-events-none absolute -right-20 -top-20 h-56 w-56 rounded-full bg-emerald-500/10 blur-3xl","aria-hidden":!0}),(0,n.jsxs)("div",{className:"relative rounded-[1.35rem] border border-white/[0.06] bg-zinc-950/80 p-4 backdrop-blur-sm",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br from-emerald-400/30 to-violet-500/25 ring-1 ring-white/10",children:(0,n.jsx)(h.Z,{className:"h-6 w-6 text-emerald-200"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-base font-semibold tracking-tight text-white",children:s("无人直播系统 \xb7 ADB 云控台","Unmanned Live System \xb7 ADB farm console")}),(0,n.jsxs)("p",{className:"mt-1 max-w-xl text-[11px] leading-relaxed text-zinc-500",children:[s("统一适配 USB / Redroid / 无线 adb:已授权设备默认走官方 scrcpy-server 的 WebSocket H.264 真流(与桌面 ","USB / Redroid / wireless adb: authorized devices default to official scrcpy-server WebSocket H.264 (same stack as "),(0,n.jsx)("a",{href:ei,target:"_blank",rel:"noreferrer",className:"text-emerald-300/90 underline-offset-2 hover:underline",children:"escrcpy"}),s(" / "," / "),(0,n.jsx)("a",{href:el,target:"_blank",rel:"noreferrer",className:"text-emerald-300/90 underline-offset-2 hover:underline",children:"scrcpy"}),s(");无 jar 或关闭真流时用截图。","); PNG screenshot when jar missing or stream off.")]})]})]}),(0,n.jsxs)("div",{className:"flex shrink-0 flex-col gap-1.5 self-start sm:flex-row",children:[(0,n.jsxs)("a",{href:ei,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-white/10 bg-white/[0.04] px-3 py-2 text-[11px] font-medium text-zinc-300 hover:bg-white/[0.07]",children:["escrcpy",(0,n.jsx)(K.Z,{className:"h-3.5 w-3.5 opacity-70"})]}),(0,n.jsxs)("a",{href:el,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-white/10 bg-white/[0.04] px-3 py-2 text-[11px] font-medium text-zinc-300 hover:bg-white/[0.07]",children:["scrcpy",(0,n.jsx)(K.Z,{className:"h-3.5 w-3.5 opacity-70"})]})]})]}),r.length>0?(0,n.jsxs)("div",{className:"mt-5",children:[(0,n.jsxs)("p",{className:"mb-2 flex items-center gap-2 text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:[(0,n.jsx)(H.Z,{className:"h-3.5 w-3.5"}),s("设备矩阵","Device matrix")]}),(0,n.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-1 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:r.map(e=>{let t="device"===e.state,l=a===e.serial,i=en(e.transport),r=i.Icon;return(0,n.jsxs)("button",{type:"button",onClick:()=>o(e.serial),className:"flex min-w-[9rem] flex-col rounded-xl border px-3 py-2 text-left transition ".concat(l?"border-emerald-500/50 bg-emerald-500/15 ring-1 ring-emerald-400/30":"border-white/10 bg-black/30 hover:border-white/20"),children:[(0,n.jsxs)("span",{className:"flex items-center gap-1.5 text-xs font-medium text-zinc-200",children:[(0,n.jsx)(d.Z,{className:"h-3.5 w-3.5 text-emerald-400/80"}),(0,n.jsx)("span",{className:"truncate",children:e.model||e.serial.slice(0,10)})]}),(0,n.jsx)("span",{className:"mt-0.5 truncate font-mono text-[9px] text-zinc-600",children:e.serial}),(0,n.jsxs)("div",{className:"mt-1 flex flex-wrap gap-1",children:[(0,n.jsxs)("span",{className:"inline-flex items-center gap-0.5 rounded-md px-1.5 py-0.5 text-[9px] font-semibold ring-1 ".concat(i.cls),children:[(0,n.jsx)(r,{className:"h-2.5 w-2.5"}),s(i.zh,i.en)]}),(0,n.jsx)("span",{className:"rounded-md px-1.5 py-0.5 text-[9px] font-semibold ".concat(t?"bg-emerald-500/20 text-emerald-200":"bg-zinc-600/30 text-zinc-500"),children:e.state})]})]},e.serial)})})]}):null,(0,n.jsxs)("div",{className:"mt-6 grid gap-6 xl:grid-cols-12",children:[(0,n.jsxs)("div",{className:"xl:col-span-8",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-white/[0.06] pb-3",children:[(0,n.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:s("刷新间隔","Interval")}),es.map(e=>(0,n.jsx)("button",{type:"button",onClick:()=>y(e),className:"rounded-lg px-2.5 py-1 text-[10px] font-semibold transition ".concat(v===e?"bg-violet-500/25 text-violet-100 ring-1 ring-violet-400/35":"bg-black/30 text-zinc-500 hover:text-zinc-300"),children:0===e?s("手动","Manual"):"".concat(e,"ms")},e)),(0,n.jsxs)("span",{className:"ml-1 inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[9px] font-medium ring-1 ".concat(eK.cls),children:[(0,n.jsx)(eH,{className:"h-3 w-3"}),"tcp"===eL?s("建议 ≥450ms","Suggest ≥450ms"):s("可试 280ms","Try 280ms")]}),(0,n.jsxs)("button",{type:"button",disabled:x,onClick:()=>void eT(),className:"ml-auto inline-flex items-center gap-1 rounded-lg border border-white/10 bg-white/[0.05] px-2.5 py-1 text-[10px] text-zinc-300 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3 w-3 ".concat(j?"animate-spin":"")}),s("下一帧","Next frame")]}),(0,n.jsx)("button",{type:"button",disabled:x||!a,onClick:()=>void m("wake"),className:"rounded-lg bg-amber-500/20 px-2.5 py-1 text-[10px] font-semibold text-amber-100 ring-1 ring-amber-500/30",children:"Wake"}),(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-[10px] text-zinc-400",children:[(0,n.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/50",checked:C,onChange:e=>R(e.target.checked)}),(0,n.jsx)(F.Z,{className:"h-3 w-3"}),s("点按穿透","Tap-through")]}),(0,n.jsxs)("button",{type:"button",disabled:x||!a||!(null==eg?void 0:eg.server_jar),title:eg&&!eg.server_jar&&eg.hint_zh?eg.hint_zh:s("官方 scrcpy-server + WebSocket H.264","Official scrcpy-server + WebSocket H.264"),onClick:()=>{ec(e=>{let t=!e;return t?(ex(null),p(s("已开启实时画面(H.264 WebSocket)","Live H.264 WebSocket stream on"))):(a&&ex(a),p(s("已关闭实时画面(将使用截图)","Live stream off — screenshot mode"))),t})},className:"inline-flex items-center gap-1 rounded-lg border px-2.5 py-1 text-[10px] font-semibold transition ".concat(eo?"border-cyan-400/50 bg-cyan-500/20 text-cyan-100 ring-1 ring-cyan-400/35":"border-white/10 bg-black/30 text-zinc-400 hover:text-zinc-200"),children:[(0,n.jsx)(Y.Z,{className:"h-3 w-3"}),eo?s("关闭真流","Stop WS"):s("实时画面","Live H.264")]})]}),eg&&!eg.server_jar?(0,n.jsxs)("p",{className:"mt-2 text-[10px] text-amber-200/80",children:[s("未检测到 scrcpy-server:启动时会自动拉取;内网可在 runtime.env 配置 SCRCPY_SERVER_DOWNLOAD_URL(支持 {tag})。","scrcpy-server missing: auto-fetched on startup; set SCRCPY_SERVER_DOWNLOAD_URL ({tag}) for mirrors."),eg.server_version?" (".concat(s("期望版本","version")," ").concat(eg.server_version,")"):null]}):null,(0,n.jsx)("p",{className:"mt-2 text-[10px] text-zinc-600",children:s("快捷键(镜像区聚焦时):H Home \xb7 B Back \xb7 R 多任务 \xb7 W 唤醒 \xb7 M 菜单","Hotkeys (mirror focused): H Home \xb7 B Back \xb7 R Recents \xb7 W Wake \xb7 M Menu")}),(0,n.jsxs)("div",{className:"relative mx-auto mt-4 max-h-[min(78vh,720px)] min-h-[280px]",children:[a?(0,n.jsxs)("div",{ref:e_,tabIndex:0,onKeyDown:e=>{if(!a||x)return;let t=e.target.tagName;if("INPUT"===t||"TEXTAREA"===t||"SELECT"===t)return;let s={h:["key",{keycode:"3"}],b:["key",{keycode:"4"}],r:["key",{keycode:"187"}],w:["wake",void 0],m:["key",{keycode:"82"}]}[e.key.toLowerCase()];s&&(e.preventDefault(),(async()=>{await m(s[0],s[1]),eo||eT()})())},className:"relative flex justify-center outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/50",children:[(0,n.jsxs)("div",{className:"relative rounded-[2rem] border-[10px] border-zinc-800 bg-black shadow-inner shadow-black/80 ring-1 ring-white/10",style:{maxHeight:"min(72vh, 680px)"},children:[(0,n.jsx)("div",{className:"absolute left-1/2 top-0 z-10 h-5 w-24 -translate-x-1/2 rounded-b-xl bg-black/80"}),eo?(0,n.jsx)("canvas",{ref:ej,className:"max-h-[min(72vh,680px)] w-auto max-w-full rounded-[1.35rem] object-contain ".concat(C?"cursor-crosshair":"cursor-default"),draggable:!1,onClick:eB,onContextMenu:eW}):(0,n.jsx)("img",{ref:ew,src:eM||void 0,alt:"device",className:"max-h-[min(72vh,680px)] w-auto max-w-full rounded-[1.35rem] object-contain ".concat(C?"cursor-crosshair":"cursor-default"),draggable:!1,onLoadStart:()=>{N(!0)},onLoad:()=>{N(!1),ez.current=0,_(null)},onError:()=>{N(!1),ez.current+=1,ez.current<=3?(_(null),window.setTimeout(()=>eT(),380+200*ez.current)):_(s("截图连续失败:检查 USB 授权 / 无线是否断开 / Redroid 端口","Screenshot failed repeatedly"))},onClick:eD,onContextMenu:eO})]}),eu?(0,n.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-cyan-500/90 px-2 py-0.5 text-[9px] font-bold text-cyan-950 shadow-lg",children:[(0,n.jsx)(Y.Z,{className:"h-3 w-3"}),"SCRCPY\xb7WS"]}):v>0&&!eo?(0,n.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-emerald-500/90 px-2 py-0.5 text-[9px] font-bold text-emerald-950 shadow-lg",children:[(0,n.jsx)(G.Z,{className:"h-3 w-3"}),"LIVE"]}):eo?null:(0,n.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-zinc-700/90 px-2 py-0.5 text-[9px] font-bold text-zinc-200",children:[(0,n.jsx)(q.Z,{className:"h-3 w-3"}),s("单帧","Still")]})]}):(0,n.jsx)("p",{className:"py-16 text-center text-sm text-zinc-600",children:s("请选择或连接设备","Pick or connect a device")}),eh?(0,n.jsx)("p",{className:"mt-3 text-center text-xs text-rose-300",children:eh}):null,k&&!eo?(0,n.jsx)("p",{className:"mt-3 text-center text-xs text-rose-300",children:k}):null,(0,n.jsx)("p",{className:"mt-3 text-center text-[10px] text-zinc-600",children:s("左键单击 / 双击 \xb7 右键长按 \xb7 坐标对齐 PNG 像素","Left tap/double \xb7 right long-press \xb7 PNG pixel coords")})]})]}),(0,n.jsxs)("div",{className:"space-y-4 xl:col-span-4",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.07] bg-black/40 p-4",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:s("遥测","Telemetry")}),u?(0,n.jsxs)("dl",{className:"mt-3 space-y-2 font-mono text-[11px] text-zinc-400",children:[(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"device"}),(0,n.jsxs)("dd",{className:"text-right text-zinc-200",children:[u.brand," ",u.model]})]}),(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"Android"}),(0,n.jsxs)("dd",{className:"text-zinc-300",children:[u.android_version," (API ",u.sdk,")"]})]}),(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"wm size"}),(0,n.jsx)("dd",{className:"text-cyan-300/90",children:z?"".concat(z.width,"\xd7").concat(z.height):u.resolution||"—"})]}),(0,n.jsx)("div",{className:"whitespace-pre-wrap text-[10px] leading-snug text-zinc-500",children:u.battery})]}):(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-600",children:s("在上方点「刷新设备信息」","Use Refresh device info above")})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-violet-500/20 bg-gradient-to-b from-violet-500/[0.08] to-black/40 p-4",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-violet-300/80",children:s("导航坞","Nav dock")}),(0,n.jsx)("div",{className:"mt-3 grid grid-cols-3 gap-2",children:[["3","Home"],["4","Back"],["187","Recents"]].map(e=>{let[t,s]=e;return(0,n.jsx)("button",{type:"button",disabled:x||!a,onClick:()=>{m("key",{keycode:t}),eT()},className:"rounded-xl border border-white/10 bg-white/[0.06] py-3 text-xs font-semibold text-zinc-200 hover:bg-white/[0.1]",children:s},t)})}),(0,n.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:x||!a,onClick:()=>{m("key",{keycode:"24"}),eT()},className:"rounded-xl border border-white/10 bg-black/30 py-2 text-[11px] text-zinc-300",children:"Vol+"}),(0,n.jsx)("button",{type:"button",disabled:x||!a,onClick:()=>{m("key",{keycode:"25"}),eT()},className:"rounded-xl border border-white/10 bg-black/30 py-2 text-[11px] text-zinc-300",children:"Vol−"})]})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-cyan-500/15 bg-cyan-500/[0.05] p-4",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-cyan-300/80",children:s("手势","Gestures")}),(0,n.jsx)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:["up","down","left","right"].map(e=>(0,n.jsx)("button",{type:"button",disabled:x||!a,onClick:()=>{m("swipe",{direction:e}),eT()},className:"rounded-lg border border-white/10 bg-black/30 py-2 font-mono text-[10px] uppercase text-zinc-300",children:e},e))})]})]})]})]})]})]})}let eo=[{label:"getprop",cmd:"getprop ro.build.version.release"},{label:"top pkg",cmd:"dumpsys activity activities | grep -E 'mResumedActivity' | tail -n 1"},{label:"usb",cmd:"dumpsys usb | head -n 60"},{label:"surface",cmd:"dumpsys SurfaceFlinger | head -n 40"}];function ec(e,t,s){return e?(0,n.jsx)("span",{className:"rounded bg-emerald-500/15 px-2 py-0.5 text-[10px] text-emerald-200",children:t}):(0,n.jsx)("span",{className:"rounded bg-zinc-500/15 px-2 py-0.5 text-[10px] text-zinc-400",children:s})}function ed(e){var t,s,l,i,a,r,o,c,d,x,u,m,h,p,g;let{t:b,notify:f,fetchJson:v,apiBase:w,busy:j,androidSerial:N,setAndroidSerial:k,devices:_,adbAvailable:z,apkPath:S,setApkPath:C,onAndroidAction:L,onCopy:P,onRefreshDevices:T}=e,[E,U]=(0,Z.useState)(null),[I,B]=(0,Z.useState)(null),[W,K]=(0,Z.useState)(null),[H,F]=(0,Z.useState)(null),[Y,G]=(0,Z.useState)(""),[q,V]=(0,Z.useState)([]),[J,$]=(0,Z.useState)("getprop ro.product.model"),[X,Q]=(0,Z.useState)(""),[ee,et]=(0,Z.useState)("300"),[es,en]=(0,Z.useState)(""),[el,ei]=(0,Z.useState)(null),[ea,ed]=(0,Z.useState)([]),[ex,eu]=(0,Z.useState)(null),[em,eh]=(0,Z.useState)("https://"),[ep,eg]=(0,Z.useState)(""),[eb,ef]=(0,Z.useState)(!1),[ev,ey]=(0,Z.useState)(null),ew=!!(j||ev),ej=_.find(e=>e.serial===N)||null,eN=(0,Z.useCallback)(async()=>{if(!N||!z){U(null),B(null);return}ey("overview"),B(null);try{let e=await v("/android/overview?serial=".concat(encodeURIComponent(N)));U(e)}catch(e){U(null),B(e.message)}finally{ey(null)}},[z,N,v]),ek=(0,Z.useCallback)(async()=>{F(null);try{let e=await v("/redroid/summary");K(e)}catch(e){K(null),F(e.message)}},[v]);(0,Z.useEffect)(()=>{eN()},[eN]),(0,Z.useEffect)(()=>{ek()},[ek]);let e_=async()=>{if(!N){f(b("请选择设备","Pick a device"));return}ey("packages");try{let e=encodeURIComponent(Y.trim()),t=await v("/android/packages?serial=".concat(encodeURIComponent(N),"&query=").concat(e,"&limit=80"));V(t.packages||[])}catch(e){f(e.message),V([])}finally{ey(null)}},ez=async()=>{if(!N){f(b("请选择设备","Pick a device"));return}let e=J.trim();if(e){ey("shell");try{var t,s;let n=await v("/android/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"shell",serial:N,payload:{command:e}})});Q(null!==(s=null!==(t=n.output)&&void 0!==t?t:n.message)&&void 0!==s?s:"")}catch(e){Q(e.message)}finally{ey(null)}}},eS=(0,Z.useCallback)(async e=>{if(!N)return;let t=Math.min(3e3,Math.max(1,parseInt(ee,10)||200)),s=!!(null==e?void 0:e.silent);s||ey("logcat"),ei(null);try{var n;let e=await v("/android/logcat?serial=".concat(encodeURIComponent(N),"&lines=").concat(t));en(null!==(n=e.text)&&void 0!==n?n:"")}catch(e){en(""),ei(e.message)}finally{s||ey(null)}},[N,v,ee]);(0,Z.useEffect)(()=>{if(!eb||!N||!z)return;let e=window.setInterval(()=>void eS({silent:!0}),3e3);return eS({silent:!0}),()=>clearInterval(e)},[z,N,eb,eS]);let eC=async()=>{if(!N){f(b("请选择设备","Pick a device"));return}ey("ui"),eu(null);try{let e=await v("/android/ui?serial=".concat(encodeURIComponent(N),"&limit=100"));ed(e.nodes||[])}catch(e){ed([]),eu(e.message)}finally{ey(null)}},eR=async(e,t)=>{ey("redroid:".concat(e));try{let s=await v("/redroid/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,name:t||""})});s.summary&&K(s.summary),f(s.message||"OK"),await ek(),T()}catch(e){f(e.message)}finally{ey(null)}},eL=async e=>{await L("key",{keycode:e})},eP=async()=>{let e=ep.trim();if(!e){f(b("请输入文字","Enter text"));return}await L("text",{text:e})},eM=async()=>{let e=em.trim();if(!e||"https://"===e){f(b("请输入 URL","Enter URL"));return}await L("open_url",{url:e})};return(0,n.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:b("安卓设备工作台","Android workstation")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:b("USB 真机与 Redroid 共用一套控制面,优先保证 USB 真机稳定。","USB phone and Redroid share one control surface.")})]}),z?(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:ew||!N,onClick:()=>void eN(),className:"rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300",children:b("刷新设备","Refresh device")}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>{ek(),T()},className:"rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300",children:b("刷新 Redroid","Refresh Redroid")})]}):(0,n.jsx)("span",{className:"text-xs text-amber-200/90",children:b("宿主机未检测到 adb","adb not found on host")})]}),(0,n.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:_.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>k(e.serial),className:"rounded-xl border px-4 py-2 text-left text-xs ".concat(N===e.serial?"border-violet-500/50 bg-violet-500/10 text-white":"border-white/10 bg-black/30 text-zinc-400"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"font-medium text-zinc-200",children:e.model||e.serial}),e.transport?(0,n.jsx)("span",{className:"rounded bg-white/10 px-1.5 py-0.5 font-mono text-[9px] uppercase text-zinc-500",children:e.transport}):null,e.kind?(0,n.jsx)("span",{className:"rounded bg-cyan-500/10 px-1.5 py-0.5 font-mono text-[9px] uppercase text-cyan-200",children:e.kind}):null]}),(0,n.jsx)("div",{className:"text-[10px] text-zinc-600",children:e.serial}),"device"!==(e.state||"").toLowerCase()?(0,n.jsx)("div",{className:"mt-1 text-[10px] font-medium text-amber-200/90",children:"unauthorized"===e.state?b("未授权,请在手机上允许 USB 调试。","Unauthorized, allow USB debugging on device."):"".concat(b("状态","State"),": ").concat(e.state)}):null]},e.serial))}),z&&0===_.length?(0,n.jsx)("p",{className:"mt-4 rounded-lg border border-amber-500/20 bg-amber-500/5 p-3 text-xs leading-relaxed text-amber-200/90",children:b("当前没有已授权设备。USB 真机请检查调试授权;Redroid 请先启动实例,再 adb connect 127.0.0.1:5555。","No authorized devices. For USB phones, confirm USB debugging. For Redroid, start an instance then adb connect 127.0.0.1:5555.")}):null]}),(0,n.jsxs)("div",{className:"grid gap-4 xl:grid-cols-[1.1fr_0.9fr]",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-violet-500/15 bg-zinc-950/50 p-5",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-violet-300/90",children:b("真机诊断","Phone diagnostics")}),I?(0,n.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:I}):null,E?(0,n.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,n.jsxs)("dl",{className:"space-y-1.5 font-mono text-[11px] text-zinc-400",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"inline text-zinc-600",children:"model"})," ",(0,n.jsxs)("dd",{className:"inline text-zinc-300",children:[E.brand," ",E.model]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"inline text-zinc-600",children:"android"})," ",(0,n.jsxs)("dd",{className:"inline text-zinc-300",children:[E.android_version," (sdk ",E.sdk,")"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"inline text-zinc-600",children:"kind"})," ",(0,n.jsxs)("dd",{className:"inline text-zinc-300",children:[E.kind||(null==ej?void 0:ej.kind)||"unknown"," / ",E.transport||(null==ej?void 0:ej.transport)||"unknown"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"inline text-zinc-600",children:"display"})," ",(0,n.jsx)("dd",{className:"inline text-zinc-300",children:E.resolution})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"inline text-zinc-600",children:"rotation"})," ",(0,n.jsx)("dd",{className:"inline text-zinc-300",children:E.rotation})]}),(0,n.jsx)("div",{className:"whitespace-pre-wrap text-[10px] leading-snug text-zinc-500",children:E.battery}),(0,n.jsx)("div",{className:"line-clamp-3 text-[10px] text-zinc-500",children:E.focus})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[ec(null===(t=E.diagnostics)||void 0===t?void 0:t.ready,b("已启动","Boot ready"),b("未完成启动","Boot pending")),ec(null===(s=E.diagnostics)||void 0===s?void 0:s.google_play,"Google Play","No Play"),ec(null===(l=E.diagnostics)||void 0===l?void 0:l.google_services,"GMS","No GMS"),ec(null===(i=E.diagnostics)||void 0===i?void 0:i.magisk,"Magisk","No Magisk"),ec(null===(a=E.diagnostics)||void 0===a?void 0:a.root,"Root","No root")]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/5 bg-black/20 p-3 text-[11px] text-zinc-400",children:[(0,n.jsxs)("div",{children:["boot_completed: ",(null===(r=E.diagnostics)||void 0===r?void 0:r.boot_completed)||"-"]}),(0,n.jsxs)("div",{children:["provisioned: ",(null===(o=E.diagnostics)||void 0===o?void 0:o.device_provisioned)||"-"]}),(0,n.jsxs)("div",{children:["setup_complete: ",(null===(c=E.diagnostics)||void 0===c?void 0:c.user_setup_complete)||"-"]}),(0,n.jsxs)("div",{children:["abi: ",(null===(d=E.diagnostics)||void 0===d?void 0:d.abi)||"-"]}),(0,n.jsxs)("div",{className:"truncate",children:["hardware: ",(null===(x=E.diagnostics)||void 0===x?void 0:x.hardware)||"-"]})]})]}):I?null:(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:b("加载中","Loading")})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-cyan-500/15 bg-zinc-950/50 p-5",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-300/90",children:b("Redroid 板块","Redroid panel")}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("start"),className:"rounded-lg bg-emerald-500/20 px-3 py-1.5 text-xs text-emerald-100 ring-1 ring-emerald-500/30",children:b("启动默认实例","Start default")})]}),H?(0,n.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:H}):null,W?(0,n.jsxs)("div",{className:"mt-3 space-y-3 text-[11px] text-zinc-400",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,n.jsxs)("div",{children:["arch: ",W.arch||"-"]}),(0,n.jsxs)("div",{className:"truncate",children:["image: ",W.image||"-"]}),(0,n.jsxs)("div",{children:["profile: ",W.device_profile||"-"]}),(0,n.jsxs)("div",{children:["gpu: ",W.gpu_mode||"-"]}),(0,n.jsxs)("div",{children:["adb: 127.0.0.1:",W.default_port||5555]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[ec(null===(u=W.requirements)||void 0===u?void 0:u.docker_available,"Docker","No Docker"),ec(null===(m=W.requirements)||void 0===m?void 0:m.adb_available,"ADB","No ADB"),ec(null===(h=W.requirements)||void 0===h?void 0:h.kvm,"KVM","No KVM"),ec(null===(p=W.requirements)||void 0===p?void 0:p.binderfs,"binderfs","No binderfs")]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(W.instances||[]).map(e=>{var t,s,l,i;return(0,n.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-medium text-zinc-100",children:e.name}),(0,n.jsxs)("div",{className:"font-mono text-[10px] text-zinc-500",children:[e.port?"127.0.0.1:".concat(e.port):"-"," / ",e.status_text||"-"]})]}),(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("start",e.name),className:"rounded bg-emerald-500/15 px-2 py-1 text-[10px] text-emerald-200",children:"Start"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("restart",e.name),className:"rounded bg-amber-500/15 px-2 py-1 text-[10px] text-amber-200",children:"Restart"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("adb_connect",e.name),className:"rounded bg-cyan-500/15 px-2 py-1 text-[10px] text-cyan-200",children:"ADB"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("stop",e.name),className:"rounded bg-rose-500/15 px-2 py-1 text-[10px] text-rose-200",children:"Stop"})]})]}),(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[ec(null===(t=e.diagnostics)||void 0===t?void 0:t.ready,b("系统就绪","System ready"),b("启动中","Booting")),ec(null===(s=e.diagnostics)||void 0===s?void 0:s.google_play,"Play","No Play"),ec(null===(l=e.diagnostics)||void 0===l?void 0:l.magisk,"Magisk","No Magisk"),ec(null===(i=e.diagnostics)||void 0===i?void 0:i.root,"Root","No root")]}),e.data_dir?(0,n.jsx)("div",{className:"mt-2 truncate font-mono text-[10px] text-zinc-500",children:e.data_dir}):null]},e.name)}),(null===(g=W.instances)||void 0===g?void 0:g.length)?null:(0,n.jsx)("p",{className:"rounded-xl border border-white/5 bg-black/20 p-3 text-xs text-zinc-500",children:b("当前没有 Redroid 实例。默认动作会创建 redroid13-1。","No Redroid instances yet. Default actions create redroid13-1.")})]})]}):(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:b("读取 Redroid 状态中","Loading Redroid status")})]})]}),(0,n.jsx)(er,{t:b,apiBase:w,fetchJson:v,serial:N,devices:_,setSerial:k,adbAvailable:z,lock:ew,overview:E,onAndroidAction:L,notify:f,onRefreshDevices:T}),z&&N?(0,n.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-300/90",children:b("快捷控制","Quick controls")}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("3"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Home"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("4"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Back"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("187"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Recents"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void L("wake"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Wake"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void L("launch_package",{package:"com.zhiliaoapp.musically"}),className:"rounded-lg bg-gradient-to-r from-pink-500/25 to-violet-500/25 px-3 py-1.5 text-xs ring-1 ring-white/10",children:"TikTok"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("24"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Vol+"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("25"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Vol-"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL("66"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Enter"})]}),(0,n.jsx)("p",{className:"mt-3 text-[10px] text-zinc-600",children:b("滑动手势","Swipe gestures")}),(0,n.jsx)("div",{className:"mt-1 flex flex-wrap gap-2",children:["up","down","left","right"].map(e=>(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void L("swipe",{direction:e}),className:"rounded-lg border border-white/10 bg-black/30 px-2.5 py-1 font-mono text-[10px] uppercase text-zinc-300",children:e},e))}),(0,n.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-black/20 p-3",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:b("ADB 文本输入","ADB text input")}),(0,n.jsxs)("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row",children:[(0,n.jsx)("input",{className:"min-w-0 flex-1 rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-xs",value:ep,onChange:e=>eg(e.target.value),placeholder:"hello / 123",onKeyDown:e=>{"Enter"===e.key&&eP()}}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eP(),className:"rounded-lg bg-emerald-500/20 px-3 py-2 text-xs text-emerald-100 ring-1 ring-emerald-500/30",children:b("发送","Send")})]})]}),(0,n.jsxs)("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,n.jsx)("input",{className:"min-w-0 flex-1 rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-xs",value:em,onChange:e=>eh(e.target.value),placeholder:"https://"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eM(),className:"rounded-lg bg-violet-500/20 px-3 py-2 text-xs text-violet-100 ring-1 ring-violet-500/30",children:b("打开链接","Open URL")})]})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,n.jsxs)("h4",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-cyan-300/90",children:[(0,n.jsx)(R.Z,{className:"h-4 w-4"}),b("USB 真机优化建议","USB optimization")]}),(0,n.jsxs)("ul",{className:"mt-3 space-y-2 text-xs leading-relaxed text-zinc-400",children:[(0,n.jsx)("li",{children:b("优先使用主板直连 USB,不要经过不稳的 HUB。","Prefer direct motherboard USB, not unstable hubs.")}),(0,n.jsx)("li",{children:b("开发板端固定 adb server,避免频繁 kill-server。","Keep adb server stable and avoid frequent kill-server.")}),(0,n.jsx)("li",{children:b("镜像页默认支持 scrcpy H.264 真流,截图模式作为回退。","Use scrcpy H.264 live stream first, screenshot mode as fallback.")}),(0,n.jsx)("li",{children:b("如果 TikTok / YouTube App 直播,要先确认屏幕常亮、分辨率稳定、USB 供电足够。","For TikTok / YouTube app live, keep screen on, resolution stable, and USB power sufficient.")})]})]})]}):null,z&&N?(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(A.Z,{className:"h-4 w-4 text-emerald-400"}),b("包名搜索与启动","Packages")]}),(0,n.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row",children:[(0,n.jsx)("input",{className:"min-w-0 flex-1 rounded-xl border border-white/10 bg-black/40 px-4 py-2 text-sm",value:Y,onChange:e=>G(e.target.value),placeholder:"tiktok / musically / youtube",onKeyDown:e=>{"Enter"===e.key&&e_()}}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void e_(),className:"rounded-xl bg-emerald-500/20 px-4 py-2 text-sm text-emerald-100 ring-1 ring-emerald-500/30",children:b("搜索","Search")})]}),(0,n.jsxs)("ul",{className:"mt-4 max-h-48 space-y-1 overflow-y-auto rounded-lg border border-white/5 bg-black/30 p-2 font-mono text-[11px]",children:[q.map(e=>(0,n.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 py-1 text-zinc-400",children:[(0,n.jsx)("span",{className:"min-w-0 truncate text-zinc-300",children:e.package}),(0,n.jsxs)("span",{className:"flex shrink-0 gap-1",children:[(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void L("launch_package",{package:e.package}),className:"rounded bg-white/10 px-2 py-0.5 text-[10px] text-zinc-200",children:b("启动","Launch")}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void L("force_stop",{package:e.package}),className:"rounded bg-rose-500/15 px-2 py-0.5 text-[10px] text-rose-200",children:b("停止","Stop")})]})]},e.package)),q.length?null:(0,n.jsx)("li",{className:"py-2 text-center text-zinc-600",children:b("暂无结果","No results")})]})]}):null,z&&N?(0,n.jsxs)("div",{className:"grid gap-6 xl:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(D.Z,{className:"h-4 w-4 text-amber-400"}),"ADB shell"]}),(0,n.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:eo.map(e=>(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>$(e.cmd),className:"rounded-md border border-white/10 bg-white/[0.04] px-2 py-1 text-[10px] text-zinc-400 hover:text-zinc-200",children:e.label},e.label))}),(0,n.jsx)("textarea",{className:"mt-3 min-h-[100px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-3 font-mono text-xs text-zinc-200",value:J,onChange:e=>$(e.target.value),spellCheck:!1,onKeyDown:e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),ez())}}),(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void ez(),className:"rounded-xl bg-amber-500/20 px-4 py-2 text-sm text-amber-100 ring-1 ring-amber-500/30",children:"shell"===ev?(0,n.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}),"Run"]}):"Run"}),X?(0,n.jsxs)("button",{type:"button",disabled:!X,onClick:()=>P(X),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1.5 text-xs text-zinc-400 hover:text-zinc-200",children:[(0,n.jsx)(M.Z,{className:"h-3.5 w-3.5"}),b("复制输出","Copy")]}):null]}),X?(0,n.jsx)("pre",{className:"mt-3 max-h-64 overflow-auto whitespace-pre-wrap rounded-lg border border-white/5 bg-black/40 p-3 font-mono text-[11px] text-zinc-400 xl:max-h-[min(24rem,50vh)]",children:X}):null]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:b("Logcat","Logcat")}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,n.jsx)("input",{className:"w-24 rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-xs",value:ee,onChange:e=>et(e.target.value)}),(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-[11px] text-zinc-400",children:[(0,n.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:eb,onChange:e=>ef(e.target.checked)}),b("每 3 秒自动刷新","Auto every 3s")]}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eS(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:b("拉取日志","Pull logs")}),es?(0,n.jsxs)("button",{type:"button",onClick:()=>P(es),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1.5 text-xs text-zinc-400 hover:text-zinc-200",children:[(0,n.jsx)(M.Z,{className:"h-3.5 w-3.5"}),b("复制","Copy")]}):null]}),el?(0,n.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:el}):null,es?(0,n.jsx)("pre",{className:"mt-3 max-h-72 overflow-auto whitespace-pre-wrap rounded-lg border border-white/5 bg-black/50 p-3 font-mono text-[10px] leading-tight text-zinc-500 xl:max-h-[min(24rem,50vh)]",children:es}):null]})]}):null,z&&N?(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(O.Z,{className:"h-4 w-4 text-fuchsia-400"}),b("界面节点","UI nodes")]}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eC(),className:"mt-3 rounded-xl border border-fuchsia-500/30 bg-fuchsia-500/10 px-4 py-2 text-sm text-fuchsia-100",children:b("刷新节点","Refresh nodes")}),ex?(0,n.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:ex}):null,(0,n.jsxs)("ul",{className:"mt-3 max-h-64 space-y-1 overflow-y-auto rounded-lg border border-white/5 bg-black/30 p-2 text-[11px]",children:[ea.map((e,t)=>(0,n.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-white/[0.04] py-1.5 text-zinc-400 last:border-0",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("span",{className:"text-zinc-200",children:e.label}),e.resource_id?(0,n.jsx)("span",{className:"ml-2 font-mono text-[10px] text-zinc-600",children:e.resource_id}):null,(0,n.jsxs)("div",{className:"font-mono text-[10px] text-zinc-600",children:["(",e.center_x,", ",e.center_y,")",e.clickable?" click":""]})]}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void L("tap",{x:e.center_x,y:e.center_y}),className:"shrink-0 rounded bg-white/10 px-2 py-1 text-[10px] text-zinc-200",children:"Tap"})]},"".concat(e.center_x,"-").concat(e.center_y,"-").concat(t))),ea.length||ex?null:(0,n.jsx)("li",{className:"py-4 text-center text-zinc-600",children:b("尚未加载","Not loaded")})]})]}):null,z&&N?(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:b("安装 APK","Install APK")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:b("先 adb push 到 /sdcard/ 再执行安装。","Push the APK to /sdcard/ first.")}),(0,n.jsx)("input",{className:"mt-4 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm",value:S,onChange:e=>C(e.target.value)}),(0,n.jsx)("button",{type:"button",disabled:ew||!z||!N,onClick:()=>void L("install_apk",{path:S}),className:"mt-3 rounded-xl bg-emerald-500/20 px-4 py-2 text-sm font-medium text-emerald-100 ring-1 ring-emerald-500/30",children:"pm install"})]}):null]})}var ex=s(9897),eu=s(4554),em=s(7689),eh=s(8401);function ep(e){let{t,title:s,subtitle:l,steps:i,onNavigate:a}=e;return(0,n.jsxs)("div",{className:"rounded-2xl border border-violet-500/25 bg-gradient-to-br from-violet-500/10 via-zinc-950/40 to-fuchsia-500/5 p-6 shadow-lg shadow-violet-900/10",children:[(0,n.jsx)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:s}),(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-400",children:l}),(0,n.jsx)("div",{className:"mt-6 flex flex-col items-center gap-4 sm:flex-row sm:flex-wrap sm:justify-center",children:i.map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[e.openUrl||e.target&&a?(0,n.jsxs)("button",{type:"button",onClick:()=>{if(e.openUrl){window.open((0,eh.p)(e.openUrl),"_blank","noopener,noreferrer");return}e.target&&a&&a(e.target)},className:"flex min-h-[4rem] min-w-[7rem] flex-col items-center justify-center rounded-2xl bg-gradient-to-br px-4 py-2 text-center text-xs font-bold text-white shadow-lg ring-2 ring-white/10 transition hover:ring-violet-400/50 hover:brightness-110 ".concat(e.gradient),children:[(0,n.jsx)("span",{children:e.label}),e.sub?(0,n.jsx)("span",{className:"mt-1 text-[10px] font-normal text-white/80",children:e.sub}):null]}):(0,n.jsxs)("div",{className:"flex min-h-[4rem] min-w-[7rem] flex-col items-center justify-center rounded-2xl bg-gradient-to-br px-4 py-2 text-center text-xs font-bold text-white shadow-lg ".concat(e.gradient),children:[(0,n.jsx)("span",{children:e.label}),e.sub?(0,n.jsx)("span",{className:"mt-1 text-[10px] font-normal text-white/80",children:e.sub}):null]}),t8?e.slice(-8):e;if(e.includes("live2/")){let t=e.split("/"),s=t[t.length-1]||"";return s.length>8?s.slice(-8):s}}}let t=e.trim();return!t||t.includes("\n")||t.toLowerCase().startsWith("rtmp")?"":t.length>8?t.slice(-8):t}function ej(e){let t=[];for(let s of e.split(/\r?\n/)){let e=s.trim();if(!e||e.startsWith("#")||!/douyin\.com|v\.douyin\.com/i.test(e))continue;let n=e.match(/(https?:\/\/live\.douyin\.com\/[a-zA-Z0-9_-]+)/i);if(n){t.push(n[1].replace(/^http:\/\//i,"https://"));continue}let l=e.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);if(l){t.push("https://live.douyin.com/".concat(l[1]));continue}let i=e.match(/(\d{8,})/);i&&t.push("https://live.douyin.com/".concat(i[1]))}return Array.from(new Set(t)).slice(0,16)}function eN(e){let t=(e||"").trim().replace(/^[\s"'`[\]()()【】]+|[\s"'`[\]()()【】]+$/g,"");return!(t=(t=(t=(t=t.replace(/^(?:主播|房间名|直播间|抖音源|源站|标题)\s*[::]\s*/i,"")).replace(/https?:\/\/(?:www\.)?live\.douyin\.com\/[a-zA-Z0-9_-]+/gi,"")).replace(/(?:等待直播|正在直播|直播中|已开播|开始推流|主播已下播|下播|录制中|推流中).*$/i,"")).trim().replace(/^[\s,,;;||\-—::]+|[\s,,;;||\-—::]+$/g,""))||/^[-—_无未知]+$/i.test(t)||/^(unknown|null|undefined|none|nan)$/i.test(t)||/live\.douyin\.com/i.test(t)||/^\d{5,}$/.test(t)||/^(监测|格式|错误|无录制任务)/.test(t)?"":t.slice(0,48)}function ek(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=function(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(!e||e.startsWith("#"))continue;let s=e.match(/https?:\/\/(?:www\.)?live\.douyin\.com\/[a-zA-Z0-9_-]+/i);if(!s||null==s.index)continue;let n=eN(e.slice(s.index+s[0].length));if(n)return n;let l=e.split(/[,,||]/,2);if(l.length>1){let e=eN(l[1]);if(e)return e}}return""}(e)||function(e){var t,s,n;let l=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).slice(-160),i=/(?:主播|房间名|直播间|抖音源|源站|标题)\s*[::]\s*(.{1,80})/i,a=/(?:序号\s*\d+\s*)?(.{1,80}?)\s*(?:等待直播|主播已下播|下播)/i,r=/(?:获取失败|错误|异常|error|failed|exception)/i;for(let e of[/(?:正在录制|录制中)\s*\d*\s*个?\s*[::]\s*([^\[\r\n]{1,80})/i,/(?:序号\s*\d+\s*)?(.{1,80}?)\s*(?:正在直播中|正在直播|直播中|已开播|开始推流|录制中|推流中)/i])for(let s=l.length-1;s>=0;s-=1){let n=eN((null===(t=l[s].match(e))||void 0===t?void 0:t[1])||"");if(n)return n}for(let e=l.length-1;e>=0;e-=1){if(r.test(l[e]))continue;let t=eN((null===(s=l[e].match(i))||void 0===s?void 0:s[1])||"");if(t)return t}for(let e=l.length-1;e>=0;e-=1){let t=eN((null===(n=l[e].match(a))||void 0===n?void 0:n[1])||"");if(t)return t}return""}(t);if(s)return s;let n=e_(t)||ez(e)[0]||"";return n?"抖音直播间 ".concat(n):""}function e_(e){if(!e)return null;let t=null;for(let s of e.split(/\r?\n/)){let e=s.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);e&&(t=e[1]);let n=s.match(/https?:\/\/[^/\s]*douyin\.com\/(\d{8,})/i);n&&(t=n[1])}return t}function ez(e){let t=[];for(let s of e.split(/\r?\n/)){let e=s.trim();if(!e||e.startsWith("#")||!/douyin\.com|v\.douyin\.com/i.test(e))continue;let n=e.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);if(n){t.push(n[1]);continue}let l=e.match(/(\d{8,})/);t.push(l?l[1]:e.slice(0,96))}return Array.from(new Set(t)).slice(0,12)}function eS(e){let t="",s=!0,n="",l=!0,i=e.split(/\r?\n/),a=!1;for(let e of i){let i=e.trim();if(/^\[youtube\]/i.test(i)){a=!0;continue}if(/^\[/.test(i)){a=!1;continue}if(!a||!i||i.startsWith("#")||i.startsWith(";"))continue;let r=i.indexOf("=");if(r<0)continue;let o=i.slice(0,r).trim().toLowerCase(),c=i.slice(r+1).trim().split(/[#;]/)[0].trim();"key"===o||"stream_key"===o?t=c:"rtmps"===o?s=!/^(0|false|否)/i.test(c):"bitrate"===o?n=c:"fast_audio"===o&&(l=/^(1|true|yes|是|开|on)/i.test(c))}return{key:t,rtmps:s,bitrate:n,fastAudio:l}}function eC(e){return"URL_config.".concat(e.replace(/[^a-zA-Z0-9_.-]/g,"_"),".ini")}function eR(e){let t=e.bitrate.trim()?"bitrate = ".concat(e.bitrate.trim()):"# bitrate = 4000";return"[youtube]\n# YouTube 推流 key(工作室 → 直播 → 串流密钥)\nkey = ".concat(e.key.trim(),"\n\n# 使用 RTMPS;填 否 则 RTMP\nrtmps = ").concat(e.rtmps?"是":"否","\n\n# 视频比特率 kbps(可选)\n").concat(t,"\n\n# 轻量音频链,减轻 CPU:1 / 是\nfast_audio = ").concat(e.fastAudio?"1":"0","\n")}function eL(e){if(e<60)return"".concat(e,"s");let t=Math.floor(e/60);return t<60?"".concat(t,"m ").concat(e%60,"s"):"".concat(Math.floor(t/60),"h ").concat(t%60,"m")}function eP(e){var t,s,l;let{t:i,currentProc:a,fetchJson:r,urlListText:o,keySuffixUi:c,showKeyRow:d=!0,pollMs:x=1e3,refreshToken:u=0,monitorRow:m}=e,[h,p]=(0,Z.useState)(""),[g,b]=(0,Z.useState)(""),[f,v]=(0,Z.useState)(""),[y,j]=(0,Z.useState)(""),[N,k]=(0,Z.useState)(""),[_,z]=(0,Z.useState)([]),[S,C]=(0,Z.useState)(null),[R,L]=(0,Z.useState)(""),[P,M]=(0,Z.useState)(""),[T,E]=(0,Z.useState)(""),[U,I]=(0,Z.useState)(""),[A,D]=(0,Z.useState)(!1),[O,B]=(0,Z.useState)(!1),[W,H]=(0,Z.useState)(!1),[F,Y]=(0,Z.useState)(!1),[V,J]=(0,Z.useState)(null),[$,X]=(0,Z.useState)(0),[Q,ee]=(0,Z.useState)(!0),et=(0,Z.useRef)(null),es=(0,Z.useRef)(null),en=(0,Z.useRef)(!1),el=(0,Z.useRef)(!1),ei=(0,Z.useRef)(!1),ea=(0,Z.useRef)(a),er=(0,Z.useRef)(0),eo=ez(o),ec=/^(online|running)$/i.test(h),ed=e_(g),ex=ej(o),eu=null!==(s=ex[0])&&void 0!==s?s:"",em=W||!!(null==m?void 0:m.is_pushing)||["streaming","relay_slow"].includes(y.trim().toLowerCase()),eh="number"==typeof(null==m?void 0:m.ffmpeg_speed)?m.ffmpeg_speed.toFixed(2):null,ep="number"==typeof(null==m?void 0:m.ffmpeg_frame)?String(m.ffmpeg_frame):null,eb=_.length?_.join(", "):em||(null==m?void 0:m.ffmpeg_active)?i("转推活跃(PID 未采集)","Relay active (PID n/a)"):i("无","none"),ef=A&&em&&!O,ev=ef?"":P,ey=ef?"":T,ew=ex.length>1&&em&&!ey&&!ev&&!ed&&(A||!!U||!!R),eN=ev||ed||(ew?null:null!==(l=null===(t=eu.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i))||void 0===t?void 0:t[1])&&void 0!==l?l:null),eS=ey||(ev?"https://live.douyin.com/".concat(ev):"")||(ed?"https://live.douyin.com/".concat(ed):"")||(ew?null:eu||null),eC=ef?ek("",g):ek(o,g),eR=(ef?"":U)||(ef?"":R)||eC||(eN?"抖音直播间 ".concat(eN):""),eP="youtube_key_rejected"===y.trim().toLowerCase(),eM=(0,Z.useCallback)(async()=>{let e=ea.current.trim();if(!e)return;if(el.current){ei.current=!0;return}el.current=!0;let t=++er.current;try{let s=await r("/status?process=".concat(encodeURIComponent(e),"&light=1"));if(t!==er.current||e!==ea.current.trim())return;let n=s.process_status||"unknown";p(n),b(s.recent_log||""),v(s.recent_error||""),j(s.business_status||""),k(s.business_note||""),z(Array.isArray(s.ffmpeg_pids)?s.ffmpeg_pids:[]),C("number"==typeof s.log_age_seconds?s.log_age_seconds:null),L(s.source_title||""),M(s.source_room_id||""),E(s.source_url||""),I(s.source_display||""),D(!!s.source_ambiguous),B(!!s.source_current),H(!!s.is_pushing);let l=/^(online|running)$/i.test(n);l&&!en.current&&J(Date.now()),l||J(null),en.current=l}catch(s){if(t!==er.current||e!==ea.current.trim())return;p("error"),j("error"),k(""),z([]),C(null),L(""),M(""),E(""),I(""),D(!1),B(!1),H(!1)}finally{el.current=!1,ei.current&&(ei.current=!1,window.setTimeout(()=>void eM(),0))}},[r]);(0,Z.useEffect)(()=>{if(ea.current=a,er.current+=1,ei.current=!1,!a){p(""),b(""),v(""),j(""),k(""),z([]),C(null),L(""),M(""),E(""),I(""),D(!1),B(!1),H(!1),J(null),en.current=!1;return}p(""),b(""),v(""),j(""),k(""),z([]),C(null),L(""),M(""),E(""),I(""),D(!1),B(!1),H(!1),J(null),en.current=!1,eM()},[a,eM]),(0,Z.useEffect)(()=>{let e=()=>ee("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{a&&eM()},[a,eM,u]),(0,Z.useEffect)(()=>{if(F||!a||x<=0)return;let e=window.setInterval(()=>void eM(),x);return()=>clearInterval(e)},[F,a,eM,x]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&eM()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[eM]),(0,Z.useEffect)(()=>{if(!V)return;let e=window.setInterval(()=>X(e=>e+1),1e3);return()=>clearInterval(e)},[V]),(0,Z.useEffect)(()=>{if(F||!Q)return;let e=et.current;e&&(e.scrollTop=e.scrollHeight)},[g,F,Q]),(0,Z.useEffect)(()=>{if(F||!Q)return;let e=es.current;e&&(e.scrollTop=e.scrollHeight)},[f,F,Q]);let eT=null==V?i("—(未检测到在线)","— (not online)"):eL(Math.max(0,Math.floor((Date.now()-V)/1e3))),eE=F?i("已暂停刷新","Paused"):x<=0?i("已暂停","Paused"):x>=3e4?i("约 30 秒","~30s"):x>=15e3?i("约 15 秒","~15s"):x>=12e3?i("约 12 秒","~12s"):x>=5e3?i("约 5 秒","~5s"):x>=2500?i("约 2.5 秒","~2.5s"):x>=2e3?i("约 2 秒","~2s"):x>=800?i("约 1 秒","~1s"):"".concat(x,"ms"),eU=F?"bg-amber-500/20 text-amber-100 ring-amber-500/35":x>=3e4?"bg-sky-500/15 text-sky-100 ring-sky-500/25":x>=4e3?"bg-zinc-500/15 text-zinc-200/90 ring-zinc-500/25":"bg-emerald-500/15 text-emerald-200/90 ring-emerald-500/25";return(0,n.jsxs)("section",{className:"rounded-2xl border border-emerald-500/20 bg-gradient-to-b from-emerald-500/[0.07] to-zinc-950/80 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsx)("span",{className:"sr-only","aria-hidden":!0,children:$}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:i("当前直播日志","Live process log")}),em?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/15 px-2.5 py-0.5 text-[10px] font-medium text-emerald-100 ring-1 ring-emerald-500/25",children:[(0,n.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,n.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-70"}),(0,n.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-emerald-400"})]}),i("推流中","Pushing")]}):null,(0,n.jsx)("span",{className:"rounded-full bg-white/10 px-2 py-0.5 font-mono text-[10px] text-zinc-300 ring-1 ring-white/10",children:a||"—"}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-medium ring-1 ".concat(eU),children:eE})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsxs)("button",{type:"button",onClick:()=>void eM(),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5"}),i("立即拉取","Refresh")]}),(0,n.jsxs)("button",{type:"button",onClick:()=>Y(e=>!e),className:"inline-flex items-center gap-1 rounded-lg px-3 py-1.5 text-xs ring-1 ".concat(F?"bg-amber-500/20 text-amber-100 ring-amber-500/35":"border border-white/10 bg-black/30 text-zinc-300"),children:[F?(0,n.jsx)(G.Z,{className:"h-3.5 w-3.5"}):(0,n.jsx)(q.Z,{className:"h-3.5 w-3.5"}),F?i("继续自动刷新","Resume"):i("暂停自动刷新","Pause")]})]})]}),(0,n.jsxs)("div",{className:"mt-4 space-y-3 rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:i("进程状态","Process")}),(0,n.jsx)("span",{className:"mt-2 inline-flex rounded-full px-2.5 py-0.5 text-[11px] font-medium ring-1 ".concat(function(e){let t=(e||"").trim().toLowerCase();return"online"===t||"running"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"stopped"===t||"stopping"===t?"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25":"not_found"===t||"errored"===t||"error"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"}(h)),children:function(e,t){let s=(t||"unknown").toLowerCase();return"online"===s||"running"===s?e("运行中(PM2/进程在线)","Running (process online)"):"stopped"===s||"stopping"===s?e("已停止","Stopped"):"not_found"===s||"errored"===s?e("未运行或未找到","Not running / not found"):"invalid"===s?e("无效进程名","Invalid process"):t||"—"}(i,h)})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:i("业务状态","Business")}),(0,n.jsx)("span",{className:"mt-2 inline-flex max-w-full rounded-full px-2.5 py-0.5 text-[11px] font-medium ring-1 ".concat(function(e){let t=(e||"").trim().toLowerCase();return"streaming"===t||"relay_slow"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"waiting_source"===t||"monitoring"===t||"source_live"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"misconfigured"===t||"youtube_key_rejected"===t||"error"===t||"stale"===t||"source_stalled"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"}(y)),title:function(e,t,s){let n=(t||"").toLowerCase();return"streaming"===n?e("正在推流到 YouTube","Pushing to YouTube"):"relay_slow"===n?e("推流速度偏低","Relay running slowly"):"waiting_source"===n?e("等待上游直播源开播","Waiting for the upstream live source"):"source_live"===n?e("源站已开播,转推 Worker 未启动","Source live detected, but no active FFmpeg relay worker"):"monitoring"===n?e("进程在线,监控源站中","Process online and monitoring the source"):"misconfigured"===n?e("YouTube 密钥缺失或无效","YouTube key missing or invalid"):"youtube_key_rejected"===n?e("YouTube 推流失败:串流密钥无效、过期或不属于当前直播间","YouTube rejected the stream key"):"source_stalled"===n?e("上游源站卡住","Upstream source stalled"):"stale"===n?e("进程在线但日志心跳过期","Process online but the log heartbeat is stale"):"error"===n?e("检测到近期进程错误","Recent process error detected"):(null==s?void 0:s.trim())?s.trim():e("暂无业务状态","No business-state hint yet")}(i,y,N),children:function(e,t){let s=(t||"").toLowerCase();return"streaming"===s?e("推流中","Pushing"):"relay_slow"===s?e("低速","Slow"):"waiting_source"===s?e("等源","Wait source"):"source_live"===s?e("源开播","Source live"):"monitoring"===s?e("监控中","Monitoring"):"misconfigured"===s?e("密钥异常","Key invalid"):"youtube_key_rejected"===s?e("密钥被拒","Key rejected"):"source_stalled"===s?e("源卡住","Stalled"):"stale"===s?e("心跳过期","Stale"):"error"===s?e("异常","Error"):e("未知","Unknown")}(i,y)})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:i("本次在线时长(估算)","Online duration (est.)")}),(0,n.jsx)("p",{className:"mt-2 font-mono text-sm font-semibold text-cyan-200/90",children:eT})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:i("FFmpeg workers","FFmpeg workers")}),(0,n.jsx)("p",{className:"mt-2 font-mono text-sm text-zinc-200",children:eb}),eh||ep?(0,n.jsxs)("p",{className:"mt-1 font-mono text-[10px] text-zinc-500",children:[eh?"speed ".concat(eh,"x"):"",eh&&ep?" \xb7 ":"",ep?"frame ".concat(ep):""]}):null,null!=S?(0,n.jsxs)("p",{className:"mt-1 text-[10px] text-zinc-600",children:[i("日志心跳","Log heartbeat")," ",eL(Math.max(0,Math.floor(S)))]}):null]})]}),eR?(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 px-3 py-2.5",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:i("当前转播源","Current relay source")}),(0,n.jsx)("p",{className:"mt-1 text-sm font-medium text-zinc-200",children:eR})]}):null,d?(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs",children:[(0,n.jsx)("span",{className:"text-zinc-500",children:i("YouTube key 尾码(参考)","YT key suffix")}),(0,n.jsx)("span",{className:"font-mono text-zinc-300",children:c||"—"})]}):null,eP?(0,n.jsx)("div",{className:"rounded-lg border border-rose-500/30 bg-rose-500/[0.10] px-3 py-2.5 text-xs text-rose-100 ring-1 ring-rose-500/15",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(eg.Z,{className:"mt-0.5 h-4 w-4 shrink-0 text-rose-300","aria-hidden":!0}),(0,n.jsx)("p",{children:i("YouTube 已拒绝本次 RTMPS 推流。请从 YouTube Studio 当前直播间复制完整串流密钥,保存到当前线路后重新开始;如果密钥确认无误,再检查到 YouTube RTMPS 的网络/代理。","YouTube rejected this RTMPS publish. Copy the full stream key for the current live event from YouTube Studio, save it to this lane, then start again; if the key is correct, check network/proxy access to YouTube RTMPS.")})]})}):null,eS?(0,n.jsxs)("div",{className:"rounded-lg border border-violet-500/20 bg-violet-500/[0.06] px-3 py-2.5",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium text-zinc-400",children:ed?i("当前直播源站(日志)","Current source (from log)"):ec?i("配置中的源站地址","Configured source URL"):i("源站快捷入口","Source quick link")}),(0,n.jsxs)("a",{href:eS,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs font-medium text-violet-100 ring-1 ring-violet-500/35 transition hover:bg-violet-500/30",children:[(0,n.jsx)(K.Z,{className:"h-3.5 w-3.5 shrink-0 opacity-90"}),eR||i("打开抖音直播页","Open Douyin live")]})]}),eN&&eR&&!eR.includes(eN)?(0,n.jsxs)("p",{className:"mt-2 font-mono text-[10px] text-zinc-600",children:["room:",eN]}):null,eo.length>1&&ed?(0,n.jsxs)("p",{className:"mt-2 text-[10px] text-zinc-600",children:[i("配置中还有","Also in config:")," ",eo.filter(e=>e!==eN).slice(0,3).map(e=>(0,n.jsx)("a",{href:"https://live.douyin.com/".concat(e),target:"_blank",rel:"noreferrer",className:"ml-1 text-violet-400/90 underline-offset-2 hover:underline",children:e},e)),eo.length>4?"…":null]}):null]}):(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:i("(日志与地址列表中暂无抖音房间)","(No Douyin room in log or URL list)")})]}),"not_found"!==h&&"invalid"!==h?(0,n.jsxs)("div",{className:"mt-4 grid gap-4 lg:grid-cols-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-emerald-400/90",children:i("进程输出(stdout / 合并日志)","Process output")}),(0,n.jsx)("pre",{ref:et,className:"log-live-scroll mt-2 max-h-[min(22rem,42vh)] min-h-[12rem] overflow-auto whitespace-pre-wrap rounded-xl border border-emerald-500/20 bg-black/55 p-3 font-mono text-[10px] leading-relaxed text-emerald-100/95",children:g.trim()||i("(暂无)","(empty)")})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-rose-400/90",children:i("异常信息(stderr)","Stderr")}),(0,n.jsx)("pre",{ref:es,className:"log-live-scroll mt-2 max-h-[min(22rem,42vh)] min-h-[12rem] overflow-auto whitespace-pre-wrap rounded-xl border border-rose-500/20 bg-black/55 p-3 font-mono text-[10px] leading-relaxed text-rose-100/95",children:f.trim()||i("(暂无)","(empty)")})]})]}):(0,n.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:i("进程未在 PM2 / 本地注册表中运行,日志区域已隐藏。","Process not running — log panes hidden.")})]})}function eM(e){return/tiktok/i.test(e.script)||/tiktok/i.test(e.pm2)}let eT=[{id:"720p60",labelZh:"720p @ 60Hz",labelEn:"720p @ 60Hz",spec:"1280x720, 59.94/60Hz, RGB/YUV 有限",hintZh:"板端 HDMI 输出时序与显示端一致;下游画布建议 1280\xd7720。",hintEn:"Match SoC HDMI timing to the display; downstream canvas e.g. 1280\xd7720."},{id:"1080p30",labelZh:"1080p @ 30Hz",labelEn:"1080p @ 30Hz",spec:"1920x1080, 30Hz",hintZh:"带宽紧张时可优先 1080p30;检查线材与接口规格。",hintEn:"Prefer 1080p30 when bandwidth is tight; check cable and port specs."},{id:"1080p60",labelZh:"1080p @ 60Hz",labelEn:"1080p @ 60Hz",spec:"1920x1080, 60Hz, 高刷转播",hintZh:"两端均需稳定支持 1080p60;长时间运行注意散热。",hintEn:"Both ends need stable 1080p60; mind thermals for long runs."}],eE="live-hub-tiktok-hdmi-check-v1",eU="live-hub-tiktok-hdmi-notes-v1",eZ="live-hub-tiktok-source-mode-v1";function eI(e){var t;let{t:s,busy:l,entries:i,currentProc:a,setCurrentProc:r,urlConfig:o,setUrlConfig:c,onRunProcess:d,onSaveUrlConfig:x,onReplayGoLive:u,onCopy:m,fetchJson:h,apiPrefix:p,quickLinks:g,hdmiStatus:b,notify:f,onNavigate:v}=e,y=(0,Z.useMemo)(()=>i.filter(eM),[i]),w=y.length?y:i,[j,N]=(0,Z.useState)("srs"),[k,_]=(0,Z.useState)([]),[z,R]=(0,Z.useState)(!1),[L,P]=(0,Z.useState)(!1),[T,E]=(0,Z.useState)("1080p30"),[U,I]=(0,Z.useState)("1080p30"),[A,D]=(0,Z.useState)(!1),[O,B]=(0,Z.useState)(!0),[W,K]=(0,Z.useState)(null),H=(0,Z.useRef)(!1),F=(0,Z.useRef)(o),[G,q]=(0,Z.useState)(""),[V,$]=(0,Z.useState)({}),X=(0,Z.useCallback)(e=>{F.current=e,c(e)},[c]),Q=(0,Z.useCallback)(e=>{N(e);try{window.localStorage.setItem(eZ,e)}catch(e){}},[]);(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(eZ);("ffmpeg"===e||"replay"===e||"srs"===e)&&("ffmpeg"!==e&&"replay"!==e?N(e):N("srs"))}catch(e){}},[]),(0,Z.useEffect)(()=>{H.current=!1},[a]),(0,Z.useEffect)(()=>{F.current=o},[o]);let ee=(0,Z.useCallback)(async()=>{if(a)try{var e;let t=new URLSearchParams({process:a,_ts:String(Date.now())}),s=await h("/get_url_config?".concat(t));X(null!==(e=s.content)&&void 0!==e?e:"")}catch(e){}},[X,a,h]);(0,Z.useEffect)(()=>{if(!a||!O||"ffmpeg"!==j)return;let e=window.setInterval(()=>{H.current||ee()},8e3);return()=>clearInterval(e)},[a,O,ee,j]),(0,Z.useEffect)(()=>{"ffmpeg"===j&&a&&ee()},[j,a,ee]);let et=(0,Z.useCallback)(async()=>{if(a){R(!0);try{var e;let t=await h("/tiktok_replay/list?process=".concat(encodeURIComponent(a)));_(null!==(e=t.files)&&void 0!==e?e:[])}catch(e){f(e.message),_([])}finally{R(!1)}}},[a,h,f]);(0,Z.useEffect)(()=>{"replay"===j&&a&&et()},[j,a,et]),(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(eE);e&&$(JSON.parse(e))}catch(e){}try{q(window.localStorage.getItem(eU)||"")}catch(e){}},[]);let es=(0,Z.useCallback)(e=>{$(e);try{window.localStorage.setItem(eE,JSON.stringify(e))}catch(e){}},[]),en=e=>{q(e);try{window.localStorage.setItem(eU,e)}catch(e){}},el=async()=>{if(a){D(!0),K(null),H.current=!1;try{var e;let t=new URLSearchParams({process:a,_ts:String(Date.now())}),n=await h("/get_url_config?".concat(t));X(null!==(e=n.content)&&void 0!==e?e:""),K(s("已从服务器读取 URL_config","Reloaded URL_config from server"))}catch(e){K(e.message)}finally{D(!1)}}},ei=async()=>{try{await Promise.resolve(x(F.current)),H.current=!1}catch(e){}},ea=async e=>{if(a){P(!0);try{await h("/tiktok_replay/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:a,filename:e})}),f(s("已删除文件","File removed")),await et()}catch(e){f(e.message)}finally{P(!1)}}},er=async e=>{var t;let n=null===(t=e.target.files)||void 0===t?void 0:t[0];if(e.target.value="",n&&a){P(!0);try{let e=new FormData;e.append("file",n);let t=await (0,J.N)("".concat(p,"/tiktok_replay/upload?process=").concat(encodeURIComponent(a)),{method:"POST",body:e});f(t.message||s("上传成功","Uploaded")),await et()}catch(e){f(e.message)}finally{P(!1)}}},eo=l||A||L,ec=eT.find(e=>e.id===U),ed=!!(null==b?void 0:b.can_stream_hdmi),eh=(null==b?void 0:b.preferred_device)||(null==b?void 0:null===(t=b.video_devices)||void 0===t?void 0:t[0])||"";return(0,n.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[v?(0,n.jsx)(ep,{t:s,title:s("TikTok HDMI 硬件链路","TikTok HDMI hardware chain"),subtitle:s("板端编码经 HDMI 到显示/下游设备;与「网络」页顶卡相同的箭头风格。","Encode on SoC → HDMI → display/downstream; same arrow style as Network header."),onNavigate:v,steps:[{label:"FFmpeg",sub:s("采集 / 推流","Capture"),gradient:"from-cyan-400 to-blue-500",target:"live_tiktok"},{label:"HDMI",sub:s("板载输出","SoC out"),gradient:"from-violet-500 to-fuchsia-500"},{label:"Android",sub:s("AOSP / 手机","AOSP"),gradient:"from-amber-400 to-orange-500",target:"android"}]}):null,(0,n.jsx)("div",{className:"rounded-2xl border border-cyan-500/25 bg-gradient-to-br from-cyan-500/[0.14] via-zinc-950/80 to-fuchsia-500/10 p-6 shadow-xl shadow-cyan-900/10",children:(0,n.jsx)("div",{className:"flex flex-wrap items-start gap-4",children:(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-cyan-500/35 to-fuchsia-600/25 ring-1 ring-white/10",children:(0,n.jsx)(C.Z,{className:"h-5 w-5 text-cyan-200"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold tracking-tight text-white",children:s("TikTok 无人直播(单路)","TikTok unmanned (single lane)")}),(0,n.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:s("布局对齐 YouTube 单频道:直播开关 + 源站 + URL_config;无 stream key,输出走 HDMI 硬件链路。","Same layout as YouTube single: controls + URLs; no stream key — HDMI hardware path.")})]})]})})}),(0,n.jsx)("div",{className:"rounded-2xl border border-cyan-500/20 bg-cyan-500/[0.06] p-4 ring-1 ring-white/[0.04]",children:(0,n.jsx)("p",{className:"text-xs leading-relaxed text-cyan-100/90",children:s("HDMI 互斥:后端在「开始 / 重新开始」TikTok 或 obs*.sh(SRS 拉流上屏)时,会自动停止其它正在占用 HDMI 链路的同类进程;与 YouTube 推流互不干扰。","HDMI mutex: starting TikTok or obs*.sh stops other TikTok/OBS HDMI sinks; YouTube RTMP is unaffected.")})}),(0,n.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(ex.Z,{className:"h-4 w-4 text-cyan-300"}),s("X86 HDMI 采集状态","X86 HDMI capture status")]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:s("这里直接显示主机是否识别到采集卡和 /dev/video 设备,可用于验证 ARM HDMI 进 X86 的链路。","Shows whether the host sees the capture card and /dev/video nodes for ARM-to-X86 HDMI ingest.")})]}),(0,n.jsx)("span",{className:"rounded-full px-3 py-1 text-[11px] font-semibold ring-1 ".concat(ed?"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30":"bg-rose-500/15 text-rose-200 ring-rose-500/25"),children:ed?s("可推流","Ready"):s("未就绪","Not ready")})]}),(0,n.jsxs)("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-4 text-[11px] text-zinc-400",children:[(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"device: "}),(0,n.jsx)("span",{className:"font-mono text-zinc-200",children:eh||"—"})]}),(0,n.jsxs)("p",{className:"mt-2",children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"video nodes: "}),(0,n.jsx)("span",{className:"font-mono text-zinc-200",children:((null==b?void 0:b.video_devices)||[]).join(", ")||"—"})]}),(0,n.jsxs)("p",{className:"mt-2",children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"usb matches: "}),(0,n.jsx)("span",{className:"text-zinc-300",children:((null==b?void 0:b.usb_capture_matches)||[]).length||0})]})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-4 text-[11px] text-zinc-400",children:[(0,n.jsx)("p",{className:"text-zinc-600",children:s("建议 FFmpeg","Suggested FFmpeg")}),(0,n.jsx)("p",{className:"mt-2 break-all font-mono text-zinc-200",children:(null==b?void 0:b.suggested_ffmpeg_cmd)||"—"}),(null==b?void 0:b.suggested_ffmpeg_cmd)?(0,n.jsxs)("button",{type:"button",onClick:()=>m(b.suggested_ffmpeg_cmd||""),className:"mt-3 inline-flex items-center gap-2 rounded-lg bg-cyan-500/15 px-3 py-2 text-xs font-medium text-cyan-100 ring-1 ring-cyan-500/25",children:[(0,n.jsx)(M.Z,{className:"h-3.5 w-3.5"}),s("复制命令","Copy command")]}):null]})]}),((null==b?void 0:b.issues)||[]).length?(0,n.jsx)("ul",{className:"mt-4 list-inside list-disc space-y-1 text-[11px] text-amber-200/85",children:((null==b?void 0:b.issues)||[]).map(e=>(0,n.jsx)("li",{children:e},e))}):null]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-amber-500/20 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-amber-200/90",children:[(0,n.jsx)(Y.Z,{className:"h-4 w-4"}),(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:s("直播开关","Live control")})]}),(0,n.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:s("TikTok 进程(PM2)","TikTok PM2 process")}),(0,n.jsx)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:a,onChange:e=>r(e.target.value),children:w.map(e=>(0,n.jsxs)("option",{value:e.pm2,children:[e.label," (",e.pm2,")"]},e.pm2))}),(0,n.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:s("直播源","Video source")}),(0,n.jsxs)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:j,onChange:e=>Q(e.target.value),children:[(0,n.jsx)("option",{value:"ffmpeg",hidden:!0,children:"FFmpeg(抖音 / TikTok 等直播间 URL)"}),(0,n.jsx)("option",{value:"replay",hidden:!0,children:s("录播素材(本地上传)","VOD upload")}),(0,n.jsx)("option",{value:"srs",children:s("SRS(OBS 推流)","SRS (OBS)")})]}),"srs"===j?(0,n.jsx)("p",{className:"mt-2 text-[11px] leading-relaxed text-amber-200/85",children:s("此模式不显示 URL_config:请在 OBS 中填写下方 RTMP 推流地址;板端 SRS 拉流上屏仍可能占用 HDMI,与 TikTok 进程互斥规则不变。","URL_config is hidden: set the RTMP URL in OBS. SRS pull-to-HDMI may still mutex with TikTok per server rules.")}):null,(0,n.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[["start",s("开始直播","Start"),"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30"],["stop",s("停止直播","Stop"),"bg-rose-500/15 text-rose-200 ring-rose-500/25"],["restart",s("重新开始","Restart"),"bg-amber-500/15 text-amber-200 ring-amber-500/25"]].map(e=>{let[t,s,l]=e;return(0,n.jsx)("button",{type:"button",disabled:eo,onClick:()=>d(t),className:"rounded-xl px-4 py-3 text-sm font-medium ring-1 ".concat(l),children:s},t)})}),(0,n.jsxs)("p",{className:"mt-3 text-center text-[11px] text-zinc-500",children:[s("当前 HDMI 预设(备忘)","HDMI preset (memo)"),":"," ",(0,n.jsx)("span",{className:"font-mono text-cyan-300/90",children:ec?s(ec.labelZh,ec.labelEn):U})]})]}),"replay"===j?(0,n.jsxs)("div",{className:"rounded-2xl border border-violet-500/25 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(eu.Z,{className:"h-4 w-4 text-violet-300"}),s("录播素材","VOD library")]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsxs)("label",{className:"inline-flex cursor-pointer items-center gap-2 rounded-xl bg-violet-500/15 px-3 py-2 text-xs font-medium text-violet-100 ring-1 ring-violet-500/30",children:[(0,n.jsx)(em.Z,{className:"h-3.5 w-3.5"}),(0,n.jsx)("span",{children:s("上传视频","Upload")}),(0,n.jsx)("input",{type:"file",accept:".mp4,.mkv,.ts,.flv,.mov,.m4v,.webm",className:"hidden",onChange:er})]}),(0,n.jsx)("button",{type:"button",disabled:eo||!a,onClick:()=>void et(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-3 py-2 text-xs text-zinc-300",children:s("刷新列表","Refresh")})]})]}),(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:s("文件保存在服务器 config/tiktok_replay/对应进程目录;点「开始直播」会写入 replayfile 行并启动 PM2 进程。停播请用上方「停止直播」。","Files under config/tiktok_replay/. Go live writes replayfile + starts PM2. Use Stop above to stop.")}),z?(0,n.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:s("加载中…","Loading…")}):0===k.length?(0,n.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:s("暂无文件,请先上传。","No files yet.")}):(0,n.jsx)("ul",{className:"mt-4 space-y-2",children:k.map(e=>(0,n.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 rounded-xl border border-white/10 bg-black/30 px-3 py-2 text-xs text-zinc-300",children:[(0,n.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono",children:e.name}),(0,n.jsxs)("span",{className:"shrink-0 text-zinc-500",children:[(e.size/1048576).toFixed(1)," MB"]}),(0,n.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:eo,onClick:()=>void(async()=>{try{await Promise.resolve(u(e.replay_url,e.name))}catch(e){}})(),className:"rounded-lg bg-emerald-500/20 px-2 py-1 text-[11px] text-emerald-100 ring-1 ring-emerald-500/30",children:s("开始直播","Go live")}),(0,n.jsx)("button",{type:"button",disabled:eo,onClick:()=>d("stop"),className:"rounded-lg bg-rose-500/15 px-2 py-1 text-[11px] text-rose-100 ring-1 ring-rose-500/25",children:s("停播","Stop")}),(0,n.jsxs)("button",{type:"button",disabled:eo,onClick:()=>void ea(e.name),className:"inline-flex items-center gap-1 rounded-lg bg-zinc-700/40 px-2 py-1 text-[11px] text-zinc-200",children:[(0,n.jsx)(S.Z,{className:"h-3 w-3"}),s("删除","Del")]})]})]},e.name))})]}):null,"srs"===j?(0,n.jsxs)("div",{className:"rounded-2xl border border-emerald-500/25 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:s("SRS / OBS 推流","SRS / OBS ingest")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:s("OBS:设置 → 推流 → 服务选「自定义」,服务器填 RTMP 地址;串流密钥可与 SRS 应用配置一致(默认 live/livestream)。","OBS → Stream → Custom: RTMP URL as server; stream key per SRS app (default live/livestream).")}),(0,n.jsxs)("dl",{className:"mt-4 space-y-3 text-xs",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"text-zinc-500",children:s("RTMP 推流地址(OBS 服务器)","RTMP publish URL")}),(0,n.jsxs)("dd",{className:"mt-1 flex flex-wrap items-center gap-2 font-mono text-emerald-200/90",children:[(0,n.jsx)("span",{className:"break-all",children:g.srs_rtmp_publish||"—"}),g.srs_rtmp_publish?(0,n.jsx)("button",{type:"button",className:"shrink-0 text-cyan-300 hover:text-cyan-200",onClick:()=>m(g.srs_rtmp_publish),children:(0,n.jsx)(M.Z,{className:"h-3.5 w-3.5"})}):null]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"text-zinc-500",children:s("HTTP-FLV 预览","HTTP-FLV preview")}),(0,n.jsxs)("dd",{className:"mt-1 flex flex-wrap items-center gap-2 font-mono text-zinc-400",children:[(0,n.jsx)("span",{className:"break-all",children:g.srs_play_flv||g.srs_http||"—"}),g.srs_play_flv||g.srs_http?(0,n.jsx)("button",{type:"button",className:"shrink-0 text-cyan-300 hover:text-cyan-200",onClick:()=>m(g.srs_play_flv||g.srs_http),children:(0,n.jsx)(M.Z,{className:"h-3.5 w-3.5"})}):null]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"text-zinc-500",children:s("SRS 控制台","SRS web UI")}),(0,n.jsx)("dd",{className:"mt-1 font-mono text-zinc-400",children:(0,n.jsx)("a",{href:g.srs_http||"#",target:"_blank",rel:"noreferrer",className:"text-cyan-300 hover:underline",children:g.srs_http||"—"})})]})]})]}):null,(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(ex.Z,{className:"h-4 w-4 text-cyan-400"}),s("HDMI 硬件与时序","HDMI timing")]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:s("点选一路作为现场备忘;与板端 ffmpeg/OBS 采集参数对齐。","Pick a preset as field memo; match capture settings.")}),(0,n.jsx)("div",{className:"mt-4 grid gap-3 md:grid-cols-3",children:eT.map(e=>{let t=T===e.id,l=U===e.id;return(0,n.jsxs)("button",{type:"button",onClick:()=>{E(t?null:e.id),I(e.id)},className:"rounded-2xl border p-4 text-left transition ".concat(l?"border-cyan-500/50 ring-1 ring-cyan-500/20":""," ").concat(t?"border-cyan-500/40 bg-cyan-500/10":"border-white/[0.08] bg-zinc-950/50 hover:border-white/15"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(ex.Z,{className:"h-4 w-4 text-cyan-400"}),s(e.labelZh,e.labelEn)]}),(0,n.jsx)("p",{className:"mt-2 font-mono text-[11px] text-zinc-400",children:e.spec}),t?(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:s(e.hintZh,e.hintEn)}):null]},e.id)})}),(0,n.jsxs)("div",{className:"mt-6 rounded-xl border border-white/5 bg-black/25 p-4",children:[(0,n.jsx)("p",{className:"text-xs font-semibold text-zinc-400",children:s("上线前检查清单(本地保存)","Pre-flight checklist (local)")}),(0,n.jsx)("ul",{className:"mt-3 space-y-2",children:[{id:"cable",zh:"HDMI 线材插紧、方向正确(如需转接头确认规格)",en:"HDMI cable seated; adapter specs OK"},{id:"thermal",zh:"长时间推流注意散热,过热会掉帧黑屏",en:"Thermal headroom for long runs"}].map(e=>(0,n.jsxs)("li",{className:"flex items-start gap-2 text-xs text-zinc-400",children:[(0,n.jsx)("input",{type:"checkbox",className:"mt-0.5 rounded border-white/20 bg-black/40",checked:!!V[e.id],onChange:t=>es({...V,[e.id]:t.target.checked})}),(0,n.jsx)("span",{children:s(e.zh,e.en)})]},e.id))}),(0,n.jsx)("label",{className:"mt-4 block text-[11px] text-zinc-500",children:s("HDMI / 走线备忘","HDMI / wiring notes")}),(0,n.jsx)("textarea",{className:"mt-1 min-h-[72px] w-full resize-y rounded-lg border border-white/10 bg-black/40 p-3 text-xs text-zinc-300",value:G,onChange:e=>en(e.target.value),spellCheck:!1,placeholder:s("接口、线长、显示器型号…","Ports, cable length, display model…")})]})]}),"ffmpeg"===j?(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:s("直播地址列表 \xb7 URL_config.ini","URL_config.ini")}),(0,n.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 text-xs text-cyan-300 hover:text-cyan-200",onClick:()=>m(o),children:[(0,n.jsx)(M.Z,{className:"h-3.5 w-3.5"}),s("复制全文","Copy all")]})]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:s("一行一个地址;可勾选自动从服务器刷新,或点「重新读取」手动同步。","One URL per line; enable auto-refresh or reload from server.")}),(0,n.jsx)("div",{className:"mt-2 flex flex-wrap items-center gap-4 text-xs text-zinc-400",children:(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-2",children:[(0,n.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:O,onChange:e=>B(e.target.checked)}),s("每 8 秒自动从服务器刷新","Auto-refresh from server every 8s")]})}),W?(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:W}):null,(0,n.jsx)("textarea",{className:"mt-4 min-h-[200px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:o,onChange:e=>{H.current=!0,X(e.target.value)},spellCheck:!1}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:eo,onClick:()=>void el(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-300",children:s("重新读取","Reload from server")}),(0,n.jsx)("button",{type:"button",disabled:eo,onClick:()=>void ei(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm font-medium text-cyan-100 ring-1 ring-cyan-500/30",children:s("保存 URL 配置","Save URL config")})]})]}):null,(0,n.jsx)(eP,{t:s,currentProc:a,fetchJson:h,urlListText:"ffmpeg"===j?o:"",keySuffixUi:"",showKeyRow:!1})]})}var eA=s(875),eD=s(4822),eO=s(9170);function eB(e){e.traverse(e=>{e.geometry&&e.geometry.dispose();let t=e.material;Array.isArray(t)?t.forEach(e=>e.dispose()):t&&t.dispose()})}function eW(e){let{tr:t,className:l="",liveActive:i=0,onOpenStudio:a}=e,r=(0,Z.useRef)(null),o=(0,Z.useRef)(null),[d,x]=(0,Z.useState)("idle"),[u,m]=(0,Z.useState)(0),p=(0,Z.useRef)(i);p.current=i;let g=(0,Z.useCallback)(()=>{x("idle"),m(e=>e+1)},[]);return(0,Z.useEffect)(()=>{let e;let t=o.current,n=r.current;if(!t||!n)return;let l=!1,i=0,a=null,c=!1,d=0,u=()=>{cancelAnimationFrame(i),cancelAnimationFrame(d),null==a||a.disconnect(),null==e||e(),e=void 0,t.replaceChildren()},m=()=>{if(l||c)return;let a=t.clientWidth,r=t.clientHeight;a<16||r<16||(c=!0,x("loading"),s.e(689).then(s.bind(s,1448)).then(t=>{let s;if(l||!o.current)return;let a=o.current,r=a.clientWidth,c=a.clientHeight,d=new t.Scene,u=new t.PerspectiveCamera(48,r/c,.1,80);u.position.set(0,1.1,7.2);try{s=new t.WebGLRenderer({antialias:!0,alpha:!0,powerPreference:"high-performance"})}catch(e){l||x("failed");return}s.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),s.setSize(r,c,!1),s.setClearColor(0,0);let m=s.domElement;m.style.display="block",m.style.width="100%",m.style.height="100%",a.replaceChildren(m);let h=new t.HemisphereLight(16762092,4482815,.85);d.add(h);let g=new t.DirectionalLight(16777215,.9);g.position.set(4,8,6),d.add(g);let b=new t.PointLight(8189439,.6,20);b.position.set(-3,2,-2),d.add(b);let f=new t.Group,v=new t.MeshStandardMaterial({color:2762048,metalness:.15,roughness:.55}),y=new t.MeshStandardMaterial({color:16724821,emissive:4456465,metalness:.35,roughness:.25}),w=new t.MeshStandardMaterial({color:16777215,emissive:2236962,metalness:.2,roughness:.3}),j=new t.MeshStandardMaterial({color:2487534,emissive:340024,metalness:.25,roughness:.35}),N=new t.MeshStandardMaterial({color:16657493,emissive:2229520,metalness:.2,roughness:.4}),k=new t.Mesh(new t.BoxGeometry(3.2,.35,2.2),v);k.position.y=-.85,f.add(k);let _=new t.Mesh(new t.TorusGeometry(.72,.09,12,48),y);_.rotation.x=Math.PI/2,_.position.set(-.85,.15,.2),f.add(_);let z=new t.Mesh(new t.ConeGeometry(.35,.5,3),w);z.rotation.z=-Math.PI/2,z.rotation.y=Math.PI,z.position.set(-.55,.18,.2),f.add(z);let S=new t.Mesh(new t.CylinderGeometry(.22,.28,.95,20),j);S.position.set(1.05,.35,-.15),S.rotation.z=.12,f.add(S);let C=new t.Mesh(new t.SphereGeometry(.26,16,16),N);C.position.set(1.05,.92,-.15),f.add(C);let R=new t.BufferGeometry,L=new Float32Array(360);for(let e=0;e<120;e++)L[3*e]=(Math.random()-.5)*14,L[3*e+1]=(Math.random()-.3)*8,L[3*e+2]=(Math.random()-.5)*8-2;R.setAttribute("position",new t.BufferAttribute(L,3));let P=new t.PointsMaterial({color:16777215,size:.06,transparent:!0,opacity:.7}),M=new t.Points(R,P);d.add(M),d.add(f);let T=0,E=0,U=e=>{let t=a.getBoundingClientRect();t.width&&t.height&&(T=((e.clientX-t.left)/t.width-.5)*2,E=((e.clientY-t.top)/t.height-.5)*2)},Z=()=>{T=0,E=0};n.addEventListener("pointermove",U),n.addEventListener("pointerleave",Z);let I=performance.now(),A=!document.hidden,D=()=>{A=!document.hidden};document.addEventListener("visibilitychange",D);let O=()=>{if(l||(i=requestAnimationFrame(O),!A))return;let e=(performance.now()-I)/1e3,t=p.current,n=t>0?.5+.5*Math.sin(4*e):0;f.rotation.y=.25*Math.sin(.35*e)+.12*e+.08*T,f.rotation.x=-.06*E,f.position.y=.06*Math.sin(.9*e),_.rotation.z=.4*e,M.rotation.y=.02*e,u.position.x+=(.35*T-u.position.x)*.06,u.position.y+=(1.1+-.2*E-u.position.y)*.06,u.lookAt(0,.1,0),t>0?(y.emissive.setHex(4456465),y.emissiveIntensity=.4+1.2*n,j.emissiveIntensity=.3+.5*n):(y.emissiveIntensity=1,j.emissiveIntensity=1),s.render(d,u)};O();let B=new ResizeObserver(()=>{if(!o.current||l)return;let e=o.current.clientWidth,t=o.current.clientHeight;e<16||t<16||(u.aspect=e/t,u.updateProjectionMatrix(),s.setSize(e,t,!1))});B.observe(a),l||x("ready"),e=()=>{var e;document.removeEventListener("visibilitychange",D),n.removeEventListener("pointermove",U),n.removeEventListener("pointerleave",Z),B.disconnect(),eB(f),eB(M),R.dispose(),P.dispose(),s.dispose(),null===(e=s.forceContextLoss)||void 0===e||e.call(s),a.replaceChildren()}}).catch(()=>{l||x("failed")}))},h=0,g=()=>{l||c||(h+=1,m(),!c&&h<120?d=requestAnimationFrame(g):!c&&h>=120&&x("failed"))};return(a=new ResizeObserver(()=>{c||m()})).observe(t),g(),()=>{l=!0,u()}},[u]),(0,n.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col ".concat(l),children:[(0,n.jsxs)("div",{className:"mb-2 flex shrink-0 items-center justify-between gap-2 px-1",children:[(0,n.jsx)("p",{className:"text-[10px] font-medium uppercase tracking-wider text-fuchsia-200/80",children:t("直播工作室 \xb7 3D","Live studio \xb7 3D")}),i>0?(0,n.jsxs)("span",{className:"studio-live-badge inline-flex items-center gap-1 rounded-full bg-rose-500/20 px-2 py-0.5 text-[9px] font-bold uppercase tracking-wide text-rose-100 ring-1 ring-rose-400/40",children:[(0,n.jsxs)("span",{className:"relative flex h-1.5 w-1.5",children:[(0,n.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-rose-400 opacity-70"}),(0,n.jsx)("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-rose-400"})]}),"LIVE \xd7",i]}):null]}),(0,n.jsxs)("div",{ref:r,className:"studio-scene-shell relative min-h-0 flex-1 overflow-hidden rounded-xl bg-gradient-to-b from-fuchsia-950/40 to-cyan-950/20 ring-1 ring-white/10",children:[(0,n.jsx)("div",{ref:o,className:"absolute inset-0","aria-hidden":!0}),"idle"===d||"loading"===d?(0,n.jsxs)("div",{className:"pointer-events-none absolute inset-0 flex flex-col items-center justify-center gap-2",children:[(0,n.jsx)("div",{className:"studio-scene-shimmer absolute inset-0 opacity-60"}),(0,n.jsx)(h.Z,{className:"relative h-5 w-5 animate-pulse text-fuchsia-300/70"}),(0,n.jsx)("p",{className:"relative text-[10px] text-zinc-500",children:t("加载 3D 场景…","Loading 3D scene…")})]}):null,"failed"===d?(0,n.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 px-4 text-center",children:[(0,n.jsx)(c.Z,{className:"h-8 w-8 text-fuchsia-300/70"}),(0,n.jsx)("p",{className:"text-[11px] text-zinc-400",children:t("WebGL 不可用,已显示占位预览","WebGL unavailable — showing placeholder")}),(0,n.jsxs)("button",{type:"button",onClick:g,className:"inline-flex items-center gap-1.5 rounded-lg border border-fuchsia-400/30 bg-fuchsia-500/10 px-3 py-1.5 text-[10px] font-semibold text-fuchsia-100 transition hover:bg-fuchsia-500/20",children:[(0,n.jsx)(w.Z,{className:"h-3 w-3"}),t("重试","Retry")]})]}):null,a?(0,n.jsxs)("button",{type:"button",onClick:a,className:"absolute bottom-2 right-2 z-10 inline-flex items-center gap-1 rounded-lg border border-white/10 bg-black/45 px-2.5 py-1 text-[10px] font-semibold text-zinc-200 backdrop-blur-sm transition hover:border-fuchsia-400/35 hover:bg-black/60 hover:text-white",children:[(0,n.jsx)(h.Z,{className:"h-3 w-3 text-fuchsia-300"}),t("进入工作室","Open studio")]}):null]})]})}function eK(e){if(null==e||!Number.isFinite(e))return"—";if(0===e)return"0 B";let t=["B","KB","MB","GB","TB"],s=e,n=0;for(;s>=1024&&n=10||0===n?0:1)," ").concat(t[n])}function eH(e){let t=eK(e);return"—"===t?t:"".concat(t,"/s")}function eF(e,t){return t&&Number.isFinite(e)&&Number.isFinite(t)?Math.min(100,Math.max(0,Math.round(e/t*100))):0}function eY(e){return"online"===e||"running"===e||"streaming"===e?"bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/30":"configured"===e?"bg-sky-500/15 text-sky-200 ring-1 ring-sky-500/25":"skipped"===e?"bg-slate-500/15 text-slate-300 ring-1 ring-slate-500/30":"stopped"===e||"not_found"===e?"bg-zinc-500/15 text-zinc-400 ring-1 ring-zinc-500/25":"error"===e?"bg-rose-500/15 text-rose-300 ring-1 ring-rose-500/35":"bg-violet-500/15 text-violet-200 ring-1 ring-violet-500/30"}let eG=[{id:"live_youtube",zh:"YouTube 无人直播",en:"YouTube Live",icon:Y.Z,accent:"from-rose-500/20 to-violet-500/10 text-rose-100 ring-rose-500/25"},{id:"live_tiktok",zh:"TikTok HDMI",en:"TikTok HDMI",icon:c.Z,accent:"from-cyan-500/20 to-sky-500/10 text-cyan-100 ring-cyan-500/25"},{id:"android",zh:"安卓投屏",en:"Android",icon:d.Z,accent:"from-emerald-500/20 to-teal-500/10 text-emerald-100 ring-emerald-500/25"},{id:"services",zh:"服务编排",en:"Services",icon:r.Z,accent:"from-indigo-500/20 to-violet-500/10 text-indigo-100 ring-indigo-500/25"},{id:"network",zh:"网络 / WG",en:"Network",icon:E.Z,accent:"from-amber-500/20 to-orange-500/10 text-amber-100 ring-amber-500/25"},{id:"studio",zh:"工作室",en:"Studio",icon:h.Z,accent:"from-fuchsia-500/20 to-pink-500/10 text-fuchsia-100 ring-fuchsia-500/25"}],eq=["control_plane","netdata","filebrowser","webtty","neko_browser","srs_http","youtube_events"];function eV(e){let{label:t,value:s,sub:l,pct:i,icon:a,theme:r}=e,o=2*Math.PI*18,c=null!=i?i/100*o:0;return(0,n.jsx)("div",{className:"group relative overflow-hidden rounded-2xl border p-3.5 transition hover:-translate-y-0.5 ".concat("light"===r?"border-slate-200/90 bg-white/90 shadow-sm shadow-slate-200/40":"border-white/[0.07] bg-gradient-to-br from-white/[0.06] to-transparent shadow-lg shadow-black/20"),children:(0,n.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(a,{className:"h-4 w-4 shrink-0 ".concat("light"===r?"text-violet-600":"text-violet-300/90")}),(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:t})]}),(0,n.jsx)("p",{className:"mt-2 font-mono text-xl font-bold leading-none ".concat("light"===r?"text-slate-900":"text-white"),children:s}),(0,n.jsx)("p",{className:"mt-1 text-[10px] text-zinc-500",children:l})]}),null!=i?(0,n.jsxs)("svg",{className:"h-11 w-11 shrink-0 -rotate-90",viewBox:"0 0 44 44","aria-hidden":!0,children:[(0,n.jsx)("circle",{cx:"22",cy:"22",r:18,fill:"none",className:"stroke-white/10",strokeWidth:"4"}),(0,n.jsx)("circle",{cx:"22",cy:"22",r:18,fill:"none",className:"".concat(i>=90?"stroke-rose-400":i>=75?"stroke-amber-400":"stroke-cyan-400"," transition-all duration-500"),strokeWidth:"4",strokeDasharray:"".concat(c," ").concat(o),strokeLinecap:"round"}),(0,n.jsxs)("text",{x:"22",y:"24",textAnchor:"middle",className:"fill-zinc-400 text-[8px] font-bold rotate-90 origin-center",children:[i,"%"]})]}):null]})})}function eJ(e){let{id:t,title:s,subtitle:l,defaultOpen:i=!0,theme:a,children:r,badge:o}=e,[c,d]=(0,Z.useState)(i);return(0,n.jsxs)("section",{id:t,className:"overflow-hidden rounded-2xl border ".concat("light"===a?"border-slate-200/90 bg-white/80":"border-white/[0.07] bg-zinc-950/35"),children:[(0,n.jsxs)("button",{type:"button",onClick:()=>d(e=>!e),className:"flex w-full items-center gap-3 px-4 py-3.5 text-left transition ".concat("light"===a?"hover:bg-slate-50":"hover:bg-white/[0.03]"),"aria-expanded":c,children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold ".concat("light"===a?"text-slate-900":"text-white"),children:s}),o]}),l?(0,n.jsx)("p",{className:"mt-0.5 text-[11px] text-zinc-500",children:l}):null]}),(0,n.jsx)(eA.Z,{className:"h-4 w-4 shrink-0 text-zinc-500 transition ".concat(c?"rotate-180":"")})]}),c?(0,n.jsx)("div",{className:"border-t border-white/[0.05] px-4 pb-4 pt-3",children:r}):null]})}function e$(e){let{theme:t}=e;return(0,n.jsxs)("div",{className:"space-y-4 animate-pulse",children:[(0,n.jsx)("div",{className:"h-28 rounded-2xl border ".concat("light"===t?"bg-slate-100":"bg-white/[0.04]")}),(0,n.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:Array.from({length:4}).map((e,s)=>(0,n.jsx)("div",{className:"h-24 rounded-2xl border ".concat("light"===t?"bg-slate-100":"bg-white/[0.04]")},s))}),(0,n.jsx)("div",{className:"h-72 rounded-2xl border ".concat("light"===t?"bg-slate-100":"bg-white/[0.04]")})]})}function eX(e){var t,s,i,c,d,x,u,m,h,p,g,b,f,v,y,w,j,N,_,z,S,C,R,P,M,T,U,I,A,D,O,B,W,H,F,Y,G,q,V,J,$,X,Q,ee,et,es,en,el,ei,ea,er,eo,ec,ed;let{dash:ex,deployCheck:eu,dashErr:em,loading:ep,theme:eg,t:eb,onNavigate:ef,nekoLinks:ev,nekoPortsLabel:ey,showStreamProbes:ew,quickLinks:ej}=e,eN=null!==(Q=null==ex?void 0:null===(t=ex.services)||void 0===t?void 0:t.filter(e=>e.running).length)&&void 0!==Q?Q:0,ek=null!==(ee=null==ex?void 0:null===(s=ex.services)||void 0===s?void 0:s.length)&&void 0!==ee?ee:0,e_=(null==ex?void 0:null===(c=ex.snapshot)||void 0===c?void 0:null===(i=c.memory)||void 0===i?void 0:i.total)||0,ez=null!==(es=null!==(et=null==ex?void 0:null===(x=ex.snapshot)||void 0===x?void 0:null===(d=x.memory)||void 0===d?void 0:d.available)&&void 0!==et?et:null==ex?void 0:null===(m=ex.snapshot)||void 0===m?void 0:null===(u=m.memory)||void 0===u?void 0:u.free)&&void 0!==es?es:0,eS=Math.max(0,e_-ez),eC=(null==ex?void 0:null===(p=ex.snapshot)||void 0===p?void 0:null===(h=p.disk)||void 0===h?void 0:h.total)||0,eR=(null==ex?void 0:null===(b=ex.snapshot)||void 0===b?void 0:null===(g=b.disk)||void 0===g?void 0:g.free)||0,eL=(null==ex?void 0:null===(f=ex.live)||void 0===f?void 0:f.processes)||[],eP=(null==ex?void 0:null===(v=ex.live_events)||void 0===v?void 0:v.process_digest)||[],eM=eP.filter(e=>{let t=(e.status||"").toLowerCase();return"online"===t||"running"===t||"streaming"===t}).length,eT=(0,Z.useMemo)(()=>eq.map(e=>({key:e,url:ej[e]})).filter(e=>e.url&&/^https?:\/\//i.test(e.url)),[ej]),eE=(0,Z.useMemo)(()=>((null==ex?void 0:ex.services)||[]).filter(e=>["live-console","live-edge","srs","neko","shellcrash"].some(t=>e.service_id.includes(t.replace("live-",""))||e.service_id===t)).slice(0,6),[null==ex?void 0:ex.services]);return ep&&!ex?(0,n.jsx)(e$,{theme:eg}):(0,n.jsxs)("div",{className:"space-y-5",children:[em?(0,n.jsxs)("div",{className:"rounded-2xl border border-rose-500/25 bg-rose-950/20 p-4 text-sm text-rose-200",children:[eb("无法加载仪表盘:","Dashboard error: "),em]}):null,(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"relative overflow-hidden rounded-2xl border p-4 sm:p-5 ".concat("light"===eg?"border-violet-200/80 bg-gradient-to-br from-violet-50 via-white to-cyan-50 shadow-sm":"border-violet-500/20 bg-gradient-to-br from-violet-600/10 via-zinc-950/80 to-cyan-500/10"),children:[(0,n.jsx)("div",{className:"pointer-events-none absolute -right-8 -top-8 h-40 w-40 rounded-full bg-fuchsia-500/15 blur-3xl"}),(0,n.jsx)("div",{className:"pointer-events-none absolute -bottom-10 left-1/3 h-32 w-32 rounded-full bg-cyan-500/10 blur-3xl"}),(0,n.jsxs)("div",{className:"relative flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/15 px-2.5 py-0.5 text-[10px] font-semibold text-emerald-200 ring-1 ring-emerald-500/30",children:[(0,n.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,n.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-60"}),(0,n.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-emerald-400"})]}),(null==ex?void 0:null===(y=ex.stack)||void 0===y?void 0:y.hostname)||"live"]}),(null==eu?void 0:eu.ready)?(0,n.jsx)("span",{className:"rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-200 ring-1 ring-emerald-500/20",children:eb("交付就绪","Deploy ready")}):eu?(0,n.jsx)("span",{className:"rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-200 ring-1 ring-amber-500/20",children:eb("待验收","Needs checks")}):null,eM>0?(0,n.jsxs)("span",{className:"rounded-full bg-rose-500/15 px-2 py-0.5 text-[10px] font-semibold text-rose-100 ring-1 ring-rose-500/25",children:[eM," ",eb("路直播活跃","live lanes active")]}):null]}),(0,n.jsxs)("h2",{className:"mt-2 text-lg font-bold tracking-tight sm:text-xl ".concat("light"===eg?"text-slate-900":"text-white"),children:[(null==ex?void 0:null===(w=ex.stack)||void 0===w?void 0:w.mdns_host)||"live.local",(0,n.jsx)("span",{className:"ml-2 text-sm font-normal ".concat("light"===eg?"text-slate-500":"text-zinc-500"),children:((null==ex?void 0:null===(j=ex.stack)||void 0===j?void 0:j.ips)||[]).join(" \xb7 ")||"—"})]}),(0,n.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-500",children:[null==ex?void 0:null===(N=ex.stack)||void 0===N?void 0:N.machine," \xb7 ",null==ex?void 0:null===(_=ex.stack)||void 0===_?void 0:_.kernel," \xb7 Python ",(null==ex?void 0:null===(z=ex.stack)||void 0===z?void 0:z.python)||"—"]})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:eT.slice(0,4).map(e=>(0,n.jsxs)("a",{href:(0,eh.p)(e.url),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border px-3 py-2 text-[11px] font-medium transition hover:-translate-y-0.5 ".concat("light"===eg?"border-slate-200 bg-white text-slate-700 shadow-sm":"border-white/10 bg-black/30 text-zinc-200 hover:bg-black/45"),children:[e.key.replace(/_/g," "),(0,n.jsx)(K.Z,{className:"h-3 w-3 opacity-60"})]},e.key))})]})]}),(0,n.jsx)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 xl:grid-cols-6",children:eG.map((e,t)=>(0,n.jsxs)(l.E.button,{type:"button",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.04*t},whileHover:{y:-2},whileTap:{scale:.98},onClick:()=>ef(e.id),className:"flex items-center gap-2 rounded-xl border bg-gradient-to-br px-3 py-3 text-left text-[11px] font-semibold ring-1 transition ".concat(e.accent),children:[(0,n.jsx)(e.icon,{className:"h-4 w-4 shrink-0 opacity-90"}),(0,n.jsx)("span",{className:"line-clamp-2 leading-snug",children:eb(e.zh,e.en)}),(0,n.jsx)(k.Z,{className:"ml-auto h-3.5 w-3.5 shrink-0 opacity-50"})]},e.id))}),(0,n.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsx)(eV,{theme:eg,icon:eD.Z,label:eb("CPU 1m","CPU 1m"),value:null!==(en=null==ex?void 0:null===(R=ex.snapshot)||void 0===R?void 0:null===(C=R.cpu_load)||void 0===C?void 0:null===(S=C["1m"])||void 0===S?void 0:S.toFixed(2))&&void 0!==en?en:"—",sub:"5m ".concat(null!==(el=null==ex?void 0:null===(T=ex.snapshot)||void 0===T?void 0:null===(M=T.cpu_load)||void 0===M?void 0:null===(P=M["5m"])||void 0===P?void 0:P.toFixed(2))&&void 0!==el?el:"—"," \xb7 15m ").concat(null!==(ei=null==ex?void 0:null===(A=ex.snapshot)||void 0===A?void 0:null===(I=A.cpu_load)||void 0===I?void 0:null===(U=I["15m"])||void 0===U?void 0:U.toFixed(2))&&void 0!==ei?ei:"—")}),(0,n.jsx)(eV,{theme:eg,icon:a.Z,label:eb("内存","Memory"),value:eK(ez),sub:"/ ".concat(eK(e_)),pct:e_?eF(eS,e_):void 0}),(0,n.jsx)(eV,{theme:eg,icon:L.Z,label:eb("磁盘","Disk"),value:eK(eR),sub:eb("可用","free"),pct:eC?eF(Math.max(0,eC-eR),eC):void 0}),(0,n.jsx)(eV,{theme:eg,icon:r.Z,label:eb("服务","Services"),value:"".concat(eN,"/").concat(ek||"—"),sub:function(e){if(null==e||!Number.isFinite(e))return"—";let t=Math.max(0,Math.floor(e)),s=Math.floor(t/86400),n=Math.floor(t%86400/3600),l=Math.floor(t%3600/60);return s>0?"".concat(s,"d ").concat(n,"h"):n>0?"".concat(n,"h ").concat(l,"m"):"".concat(l,"m")}(null==ex?void 0:null===(D=ex.snapshot)||void 0===D?void 0:D.uptime_seconds)+" "+eb("运行","uptime")})]}),(0,n.jsxs)("div",{className:"grid gap-4 xl:grid-cols-5 xl:items-stretch",children:[(0,n.jsx)(l.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:"flex h-[248px] flex-col overflow-hidden xl:col-span-3 rounded-2xl border p-3 backdrop-blur-xl ".concat("light"===eg?"border-slate-200/90 bg-white/85":"border-white/[0.07] bg-zinc-950/40"),children:(0,n.jsx)(eO.Z,{snapshot:null!==(ea=null==ex?void 0:ex.snapshot)&&void 0!==ea?ea:null,theme:eg,tr:eb,compact:!0})}),(0,n.jsx)(l.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.05},className:"flex h-[248px] flex-col overflow-hidden xl:col-span-2 rounded-2xl border p-3 ".concat("light"===eg?"border-fuchsia-200/80 bg-gradient-to-br from-fuchsia-50/90 via-white to-cyan-50/70":"border-fuchsia-500/20 bg-gradient-to-br from-fuchsia-500/10 via-zinc-950/60 to-cyan-500/10"),children:(0,n.jsx)(eW,{tr:eb,className:"h-full",liveActive:eM,onOpenStudio:()=>ef("studio")})})]}),(0,n.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-2xl border p-4 ".concat("light"===eg?"border-violet-200/70 bg-white/90":"border-violet-500/20 bg-gradient-to-br from-violet-500/[0.08] to-transparent"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold ".concat("light"===eg?"text-slate-900":"text-white"),children:eb("直播进程","Live processes")}),(0,n.jsx)("span",{className:"rounded-full bg-white/10 px-2 py-0.5 font-mono text-[10px] text-zinc-400",children:(null==ex?void 0:null===(O=ex.live)||void 0===O?void 0:O.backend_mode)||"—"})]}),(0,n.jsxs)("ul",{className:"mt-3 max-h-52 space-y-2 overflow-y-auto pr-1",children:[(eL.length?eL:eP).slice(0,8).map(e=>{let t="pm2"in e?e.pm2:"",s="label"in e&&e.label||t,l="process_status"in e&&e.process_status||"status"in e&&e.status||"",i="".concat(t," ").concat(s).toLowerCase(),a=i.includes("tiktok")||i.includes("hdmi")?"live_tiktok":i.includes("youtube")||i.includes("yt")?"live_youtube":null;return(0,n.jsxs)("li",{role:a?"button":void 0,tabIndex:a?0:void 0,onClick:a?()=>ef(a):void 0,onKeyDown:a?e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),ef(a))}:void 0,className:"flex items-center gap-3 rounded-xl border px-3 py-2 transition ".concat("light"===eg?"border-slate-200 bg-slate-50/80":"border-white/[0.06] bg-black/25 hover:border-violet-400/20"," ").concat(a?"cursor-pointer hover:-translate-y-px hover:border-violet-400/30":""),children:[(0,n.jsx)(o.Z,{className:"h-4 w-4 shrink-0 text-violet-300/80"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"truncate text-xs font-medium text-zinc-200",children:s}),(0,n.jsx)("p",{className:"truncate font-mono text-[10px] text-zinc-600",children:t})]}),(0,n.jsx)("span",{className:"shrink-0 rounded-md px-2 py-0.5 text-[10px] font-medium ".concat(eY(l||"")),children:function(e,t){let s=(e||"").trim().toLowerCase();return"online"===s||"running"===s||"streaming"===s?t("运行中","Running"):"configured"===s?t("已配置","Configured"):"not_found"===s?t("未注册","Unregistered"):"stopped"===s?t("已停止","Stopped"):"error"===s?t("异常","Error"):e||"—"}(l||"",eb)})]},t||s)}),eL.length||eP.length?null:(0,n.jsx)("li",{className:"py-6 text-center text-xs text-zinc-600",children:eb("暂无直播进程","No live processes")})]}),(0,n.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>ef("live_youtube"),className:"rounded-xl bg-violet-500/20 py-2 text-[11px] font-semibold text-violet-100 ring-1 ring-violet-500/30 transition hover:bg-violet-500/30",children:"YouTube"}),(0,n.jsx)("button",{type:"button",onClick:()=>ef("live_tiktok"),className:"rounded-xl bg-cyan-500/20 py-2 text-[11px] font-semibold text-cyan-100 ring-1 ring-cyan-500/30 transition hover:bg-cyan-500/30",children:"TikTok"})]})]}),(null==ex?void 0:null===(W=ex.network)||void 0===W?void 0:null===(B=W.interfaces)||void 0===B?void 0:B.length)?(0,n.jsxs)("div",{className:"rounded-2xl border p-4 ".concat("light"===eg?"border-cyan-200/70 bg-white/90":"border-cyan-500/15 bg-cyan-500/[0.05]"),children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===eg?"text-slate-900":"text-white"),children:[(0,n.jsx)(E.Z,{className:"h-4 w-4 text-cyan-300"}),eb("网络吞吐","Network throughput")]}),(0,n.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/20 px-3 py-2.5",children:[(0,n.jsxs)("p",{className:"text-[10px] uppercase text-cyan-300/70",children:["↓ ",eb("下行","Down")]}),(0,n.jsx)("p",{className:"mt-1 font-mono text-lg font-bold text-cyan-100",children:eH(ex.network.total_rx_bps)})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/20 px-3 py-2.5",children:[(0,n.jsxs)("p",{className:"text-[10px] uppercase text-cyan-300/70",children:["↑ ",eb("上行","Up")]}),(0,n.jsx)("p",{className:"mt-1 font-mono text-lg font-bold text-cyan-100",children:eH(ex.network.total_tx_bps)})]})]}),(0,n.jsx)("div",{className:"mt-3 space-y-2",children:(ex.network.interfaces||[]).slice(0,3).map(e=>(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-lg border border-white/[0.05] bg-black/20 px-3 py-2 font-mono text-[10px]",children:[(0,n.jsx)("span",{className:"font-semibold text-cyan-200/90",children:e.name}),(0,n.jsxs)("span",{className:"text-zinc-500",children:["↓ ",eH(e.rx_bps)," \xb7 ↑ ",eH(e.tx_bps)]})]},e.name))})]}):null]}),eE.length?(0,n.jsx)("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:eE.map(e=>(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-xl border px-3 py-2.5 ".concat("light"===eg?"border-slate-200 bg-white":"border-white/[0.06] bg-black/25"),children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"truncate text-xs font-medium text-zinc-200",children:e.label}),(0,n.jsx)("p",{className:"truncate text-[10px] text-zinc-600",children:e.service_id})]}),(0,n.jsx)("span",{className:"shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(eY(e.running?"online":e.status)),children:e.running?eb("运行中","Running"):e.status})]},e.service_id))}):null,(0,n.jsxs)("div",{className:"space-y-3",children:[eu?(0,n.jsxs)(eJ,{id:"deploy",theme:eg,title:eb("安装验收","Deployment health"),subtitle:eb("API / 边缘反代 / mDNS 可用性","API, edge proxy, mDNS"),defaultOpen:!eu.ready,badge:(0,n.jsxs)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(eu.ready?"bg-emerald-500/15 text-emerald-200":"bg-amber-500/15 text-amber-200"),children:[eu.pass_count,"/",eu.total_count]}),children:[(0,n.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[(0,n.jsx)("p",{className:"text-sm text-zinc-300",children:eu.ready?eb("必需检查已通过,控制面可交付。","Required checks passed."):eb("部分检查未通过,请查看失败项。","Some checks failed.")}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(eu.urls||{}).filter(e=>{let[,t]=e;return!!t}).slice(0,5).map(e=>{let[t,s]=e;return(0,n.jsx)("a",{href:(0,eh.p)(s),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-white/10 bg-white/5 px-2.5 py-1.5 text-[10px] text-zinc-300",children:t},t)})})]}),(eu.failing_checks||[]).length?(0,n.jsx)("ul",{className:"mt-3 space-y-1.5",children:eu.failing_checks.slice(0,4).map(e=>(0,n.jsxs)("li",{className:"rounded-lg border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-100",children:[e.label,": ",e.detail||"—"]},e.id))}):null]}):null,(null==ex?void 0:ex.hardware)?(0,n.jsx)(eJ,{id:"hardware",theme:eg,title:eb("硬件能力","Hardware profile"),subtitle:eb("GPU / NPU / FFmpeg 策略","GPU, NPU, FFmpeg"),defaultOpen:!1,children:(0,n.jsxs)("div",{className:"grid gap-3 font-mono text-[11px] text-zinc-400 sm:grid-cols-2",children:[(0,n.jsxs)("p",{children:["arch ",String(null!==(er=ex.hardware.arch)&&void 0!==er?er:"—")]}),(0,n.jsxs)("p",{children:["GPU ",ex.hardware.gpu&&"object"==typeof ex.hardware.gpu&&ex.hardware.gpu.present?eb("有","yes"):eb("无","no")]}),(0,n.jsxs)("p",{className:"sm:col-span-2",children:["hwaccels"," ",(ex.hardware.ffmpeg_hwaccels||[]).join(", ")||"—"]})]})}):null,(null==ex?void 0:null===(H=ex.stack)||void 0===H?void 0:H.neko_login)?(0,n.jsxs)(eJ,{id:"neko",theme:eg,title:"Neko ".concat(eb("登录","sign-in")),subtitle:ey||eb("多实例","multi-instance"),defaultOpen:!1,children:[(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:ev.map(e=>(0,n.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"rounded-lg border border-fuchsia-400/20 bg-black/25 px-3 py-2 text-[11px] text-fuchsia-100",children:[e.label," \xb7 ",e.accessLabel]},e.key))}),(0,n.jsx)("p",{className:"mt-3 text-[11px] text-amber-200/85",children:eb("昵称随意,密码须与环境变量一致(默认 12345678)。","Display name is free; password must match NEKO_* (default 12345678).")})]}):null,ew&&(null==ex?void 0:ex.probes)?(0,n.jsx)(eJ,{id:"probes",theme:eg,title:eb("推流探针","Stream probes"),subtitle:"SRS \xb7 Neko",defaultOpen:!1,children:(0,n.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[ex.probes.srs?(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3 text-[11px]",children:[(0,n.jsx)("p",{className:"font-semibold text-white",children:"SRS"}),(0,n.jsxs)("p",{className:"mt-1 text-zinc-500",children:["API ",ex.probes.srs.api_ok?"OK":"—"," \xb7 :",ex.probes.srs.port," \xb7 RTT ",null!==(ec=null!==(eo=null===(F=ex.probes.srs.http)||void 0===F?void 0:F.latency_ms)&&void 0!==eo?eo:null===(Y=ex.probes.srs.tcp)||void 0===Y?void 0:Y.latency_ms)&&void 0!==ec?ec:"—"," ms"]}),(null===(G=ex.probes.srs.http)||void 0===G?void 0:G.error)?(0,n.jsx)("p",{className:"mt-1 text-amber-300/80",children:ex.probes.srs.http.error}):null]}):null,ex.probes.neko?(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3 text-[11px]",children:[(0,n.jsx)("p",{className:"font-semibold text-white",children:"Neko"}),(0,n.jsxs)("p",{className:"mt-1 text-zinc-500",children:[ex.probes.neko.running_count,"/",ex.probes.neko.required_count," ",eb("在线","online")," \xb7 HTTP ",null!==(ed=null===(q=ex.probes.neko.http)||void 0===q?void 0:q.http_code)&&void 0!==ed?ed:"—"]}),(null===(V=ex.probes.neko.http)||void 0===V?void 0:V.error)?(0,n.jsx)("p",{className:"mt-1 text-amber-300/80",children:ex.probes.neko.http.error}):null]}):null]})}):null,(null==ex?void 0:null===($=ex.live_events)||void 0===$?void 0:null===(J=$.pm2_tail)||void 0===J?void 0:J.length)||eP.length?(0,n.jsx)(eJ,{id:"feeds",theme:eg,title:eb("事件流","Event feed"),defaultOpen:!1,children:(0,n.jsx)("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap rounded-lg border border-white/[0.05] bg-black/40 p-3 font-mono text-[10px] text-zinc-400",children:((null==ex?void 0:null===(X=ex.live_events)||void 0===X?void 0:X.pm2_tail)||[]).slice(-12).join("\n")||eb("暂无日志","No logs")})}):null]})]})}var eQ=s(5468),e0=s(1094),e1=s(5621),e5=s(91),e2=s(2208),e3=s(1723),e4=s(9397),e6=s(90);let e8="live-hub-youtube-pro-v2",e9="youtube2__",e7=/[^a-zA-Z0-9_.-]+/g,te=new Set(["douyin_youtube","tiktok","obs","web"]);function tt(e,t){var s;let n=(e||"").trim();if(!function(e){let t=(e||"").trim();return!t||/\?{2,}/.test(t)||/?{2,}/.test(t)||/�/.test(t)||/锟|绾胯矾|çº|è·|Â/.test(t)||/^(undefined|null|nan)$/i.test(t)}(n))return n;let l=(null===(s=n.match(/\d+/))||void 0===s?void 0:s[0])||String(Math.max(0,t)+1);return"线路 ".concat(l)}function ts(e){return e.map((e,t)=>({...e,name:tt(e.name,t)}))}function tn(e){return(e||"").trim().replace(e7,"_")}function tl(e,t){let s=tn(e);return!s||te.has(s)||s===e9?tm(t):"youtube"===s||s.startsWith(e9)?s:tm(s)}function ti(e){return tl(String(e.pm2Name||""),String(e.id||""))}function ta(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e||"object"!=typeof e)return null;let s=String(e.id||"").trim();return s?{id:s,name:tt("string"==typeof e.name?e.name:"",t),streamKeySuffix:"string"==typeof e.streamKeySuffix?e.streamKeySuffix:void 0,streamKey:"string"==typeof e.streamKey?e.streamKey:void 0,urlLines:"string"==typeof e.urlLines?e.urlLines:void 0,pm2Name:tl("string"==typeof e.pm2Name?e.pm2Name:"",s),notes:"string"==typeof e.notes?e.notes:void 0}:null}function tr(e){if(!e)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))return[];let s=t.map((e,t)=>ta(e,t)).filter(e=>null!==e);return ts(s)}catch(e){return[]}}function to(e){window.localStorage.setItem(e8,JSON.stringify(ts(e)))}let tc=["/hub/youtube_pro_channels","/youtube_pro_channels"];async function td(e){for(let s of tc)try{var t;let n=await e(s);return{fetched:!0,channels:(t=n.channels,Array.isArray(t)?ts(t.map((e,t)=>ta(e,t)).filter(e=>null!==e)):[])}}catch(e){}return{fetched:!1,channels:[]}}async function tx(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=null,l=ts(t);for(let t of tc)try{var i;let a=await e(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({channels:l,force:!!s.force})});if((null===(i=a.neko)||void 0===i?void 0:i.ok)===!1){let e=a.neko.desired?" desired=".concat(a.neko.desired):"",t=a.neko.current?" current=".concat(a.neko.current):"";n=Error("Neko capacity expansion failed:".concat(e).concat(t," ").concat(a.neko.reason||"unknown error").trim());break}return}catch(e){n=e instanceof Error?e:Error(String(e))}throw null!=n?n:Error("youtube_pro_channels sync failed")}function tu(){return"ch_".concat(Date.now().toString(36),"_").concat(Math.random().toString(36).slice(2,7))}function tm(e){return"".concat(e9).concat(tn(e)||"channel")}function th(e){return/youtube/i.test(e.script)||/youtube/i.test(e.pm2)}function tp(e){return e.trim().toLowerCase().startsWith("youtube2__")}function tg(e){return(e.split("/").pop()||e).replace(/\.[^.]+$/,"")}function tb(e){var t;return!!e&&(/youtube/i.test(e.pm2)||/youtube/i.test(null!==(t=e.script)&&void 0!==t?t:""))}function tf(e,t){let s=((null==t?void 0:t.business_status)||"").trim().toLowerCase();return(null==t?void 0:t.is_pushing)||"streaming"===s?0:tz(null==t?void 0:t.process_status)?1:"youtube"===e.pm2.trim().toLowerCase()?2:"youtube"===tg(e.script).trim().toLowerCase()?3:10}let tv="live-hub-youtube-mode-v1",ty=new Set(["douyin_youtube","tiktok","obs","web"]);function tw(e){var t,s,n;return{name:e.name,streamKey:null!==(t=e.streamKey)&&void 0!==t?t:"",pm2Name:null!==(s=e.pm2Name)&&void 0!==s?s:tm(e.id),notes:null!==(n=e.notes)&&void 0!==n?n:""}}function tj(e){return Object.fromEntries(e.map(e=>[e.id,tw(e)]))}function tN(e){let t=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return!!(null==e?void 0:e.is_pushing)||"streaming"===t||"relay_slow"===t}function tk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if((null==e?void 0:e.source_ambiguous)&&tN(e)&&!(null==e?void 0:e.source_current))return(s?ek("",s).trim():"")||"";{let t=((null==e?void 0:e.source_display)||(null==e?void 0:e.source_title)||"").trim();if(t)return t}let n=ek(t,s).trim();if(n)return n;let l=((null==e?void 0:e.source_room_id)||"").trim();return l?"抖音直播间 ".concat(l):""}function t_(e){var t;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=((null==e?void 0:e.source_url)||"").trim();if(n)return n;let l=ej(s);return tN(e)&&((null==e?void 0:e.source_ambiguous)||(null==e?void 0:e.source_display)||(null==e?void 0:e.source_title))&&l.length>1?"":null!==(t=l[0])&&void 0!==t?t:""}function tz(e){return/^(online|running)$/i.test((e||"").trim())}function tS(e,t){let s=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"ready"===s?t("已配置","Ready"):"streaming"===s?t("推流中","Pushing"):"source_stalled"===s?t("源卡住","Source stalled"):"relay_slow"===s?t("低速推流","Relay slow"):"waiting_source"===s?t("等待上游","Waiting source"):"source_live"===s?t("源已开播,转推未起","Source live, relay down"):"monitoring"===s?t("监控中","Monitoring"):"misconfigured"===s?t("密钥异常","Key invalid"):"youtube_key_rejected"===s?t("密钥被 YouTube 拒绝","Key rejected"):"stale"===s?t("心跳过期","Stale"):"error"===s?t("异常","Error"):tz(null==e?void 0:e.process_status)?t("运行中","Running"):((null==e?void 0:e.process_status)||"").trim()||t("未运行","Idle")}function tC(e){let t=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"ready"===t?"bg-sky-500/15 text-sky-100 ring-sky-500/25":"streaming"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"relay_slow"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"source_stalled"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/25":"waiting_source"===t||"monitoring"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"source_live"===t?"bg-sky-500/15 text-sky-100 ring-sky-500/25":"misconfigured"===t||"youtube_key_rejected"===t||"error"===t||"stale"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/25":tz(null==e?void 0:e.process_status)?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"bg-zinc-600/20 text-zinc-400 ring-zinc-500/25"}function tR(e){let t=Math.max(0,Math.floor(e||0));if(t<60)return"".concat(t,"s");let s=Math.floor(t/60);return s<60?"".concat(s,"m ").concat(t%60,"s"):"".concat(Math.floor(s/60),"h ").concat(s%60,"m")}function tL(e){if(!e)return"-";try{return new Date(1e3*e).toLocaleString()}catch(e){return"-"}}function tP(e){let t=(e||"").toLowerCase();return"active"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"error"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"ended"===t?"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25":"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25"}function tM(e,t){let s=(e||"").toLowerCase();return"active"===s?t("直播中","Live"):"ended"===s?t("已结束","Ended"):"error"===s?t("异常","Problem"):"idle"===s?t("等待中","Waiting"):t("记录","Record")}function tT(e,t){return null==e?t?t("未知","Unknown"):"-":e.toLocaleString()}function tE(e,t){return e?(e.source_title||e.channel_name||"").trim()||(e.source_room_id?t("抖音直播间 ".concat(e.source_room_id),"Douyin room ".concat(e.source_room_id)):e.process?t("直播线路 ".concat(e.process),"Relay lane ".concat(e.process)):t("直播事件 #".concat(e.id),"Live event #".concat(e.id))):t("未选择直播","No event selected")}function tU(e,t){return e?e.source_room_id?t("抖音房间 ".concat(e.source_room_id),"Douyin room ".concat(e.source_room_id)):e.source_url?e.source_url.replace(/^https?:\/\//,""):t("来源未识别","Unknown source"):"-"}function tZ(e,t){let s=Math.max(0,Math.floor(e||0));if(s<60)return t("".concat(s," 秒"),"".concat(s,"s"));let n=Math.floor(s/60);if(n<60)return t("".concat(n," 分 ").concat(s%60," 秒"),"".concat(n,"m ").concat(s%60,"s"));let l=Math.floor(n/60),i=n%60;return t("".concat(l," 小时 ").concat(i," 分"),"".concat(l,"h ").concat(i,"m"))}function tI(e){if(!e)return"-";try{return new Date(1e3*e).toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch(e){return"-"}}function tA(e,t){var s;if(!e)return"-";let n=(e.status||"").toLowerCase(),l="".concat(e.last_health||""," ").concat(e.last_live_status||""," ").concat(e.last_popup_text||"").toLowerCase();return"error"===n||/error|failed|poor|unstable|异常|错误|失败/.test(l)?t("需要处理","Needs attention"):e.last_popup_text?t("有弹窗","Popup seen"):(null!==(s=e.quality_score)&&void 0!==s?s:100)<50?t("质量偏低","Low quality"):t("正常","Normal")}function tD(e){let t=tA(e,e=>e);return"需要处理"===t||"质量偏低"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"有弹窗"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/30":"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25"}function tO(e){let t=Number(e||0);return t>=80?"text-emerald-200":t>=55?"text-amber-200":"text-rose-200"}function tB(e){let t=(e||"").toLowerCase();return"critical"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"warning"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/30":"ok"===t?"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25":"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25"}function tW(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"number"!=typeof e||Number.isNaN(e)?"-":"".concat(e.toFixed(e>=100?0:2).replace(/\.00$/,"")).concat(t)}function tK(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith("#"))}function tH(e,t){return tK(e).length>0&&0===tK(t).length}function tF(e){let{kind:t,busyKind:s,targetPm2:l,busy:i,online:a,label:r,className:o,baseLock:c,onRun:d,notify:x,t:u,compact:m}=e,h=function(e){if(!(null==e?void 0:e.startsWith("proc:")))return null;let t=e.slice(5),s=t.indexOf(":");if(s<=0)return null;let n=t.slice(0,s),l=t.slice(s+1);return l&&["start","stop","restart"].includes(n)?{action:n,pm2:l}:null}(i),p=h&&h.pm2===l,g=null!=s?s:t,b=!!(p&&h.action===g),f=!!(p&&h.action!==g),v="start"===t&&a,w="stop"===t&&!a,j="restart"===t&&!a,N=v||w||j;return(0,n.jsxs)("button",{type:"button",onClick:()=>{if(!b){if(f){x(u("请等待当前操作完成","Wait for the current action to finish"));return}if(v){x(u("已在直播中,无需重复开始","Already live"));return}if(w){x(u("当前未在直播,无法停止","Not live — cannot stop"));return}if(j){x(u("进程未运行时请使用「开始直播」","Use Start when the process is not running"));return}c||d()}},className:"relative overflow-hidden rounded-xl ring-1 transition ".concat(m?"min-h-[2rem] px-3 py-1.5 text-xs font-medium":"min-h-[2.75rem] px-4 py-3 text-sm font-medium"," ").concat(o," ").concat(N||c||b||f?"cursor-not-allowed":""," ").concat(N&&!b?"opacity-45":""," ").concat(f?"opacity-35":""," ").concat(b?"ring-violet-400/40":""),children:[b?(0,n.jsx)("span",{className:"absolute inset-0 flex items-center justify-center bg-black/25 backdrop-blur-[2px]",children:(0,n.jsx)(y.Z,{className:"".concat(m?"h-4 w-4":"h-6 w-6"," animate-spin text-white")})}):null,(0,n.jsxs)("span",{className:"inline-flex items-center justify-center gap-1.5 ".concat(b?"invisible":""),children:[N?(0,n.jsx)(eQ.Z,{className:"".concat(m?"h-3 w-3":"h-4 w-4"," shrink-0 opacity-90"),"aria-hidden":!0}):null,r]})]})}function tY(e){var t,s,l,i,r,o,d,x,u,m,h,p,g,b,f,v,j,N,k,_,z,C,R,L,P,M,T,E,U,I;let{t:A,busy:D,entries:O,currentProc:B,setCurrentProc:W,urlConfig:H,setUrlConfig:F,onRunProcess:q,onSaveUrlConfig:V,fetchJson:J,liveProcesses:$,notify:X,onNavigate:Q,onRefresh:ee,quickLinks:et}=e,es=(0,Z.useMemo)(()=>O.filter(th),[O]),en=(0,Z.useMemo)(()=>(function(e,t){let s=e.filter(e=>th(e)&&!tp(e.pm2)),n=s.filter(e=>th(e)&&e.pm2.trim()===tg(e.script).trim()),l=n.length?[...n]:s.length?[...s]:[...e],i=new Set(l.map(e=>e.pm2.trim()));for(let e of t.filter(e=>tb(e)&&!tp(e.pm2))){var a,r,o,c;let t=e.pm2.trim();if(!t||i.has(t))continue;let n=(e.business_status||"").trim().toLowerCase();if(!e.is_pushing&&"streaming"!==n&&!tz(e.process_status))continue;let d=s.find(e=>e.pm2.trim()===t);l.push(null!=d?d:{pm2:t,script:null!==(o=null!==(r=e.script)&&void 0!==r?r:null===(a=s[0])||void 0===a?void 0:a.script)&&void 0!==o?o:"youtube.py",label:null!==(c=e.label)&&void 0!==c?c:t}),i.add(t)}return l})(es.length?es:O,$),[O,$,es]),el=(0,Z.useMemo)(()=>(function(e,t){if(!e.length)return"";let s=new Map(t.filter(tb).map(e=>[e.pm2.trim(),e])),n=e[0],l=tf(n,s.get(n.pm2.trim()));for(let t of e.slice(1)){let e=tf(t,s.get(t.pm2.trim()));e"youtube"===e.pm2.trim().toLowerCase());if(n)return n.pm2;let l=e.find(e=>"youtube"===tg(e.script).trim().toLowerCase());return l?l.pm2:null!==(s=null===(t=e[0])||void 0===t?void 0:t.pm2)&&void 0!==s?s:""}(en),[$,en]),[ei,ea]=(0,Z.useState)("single"),[er,eo]=(0,Z.useState)([]),[ec,ed]=(0,Z.useState)(""),[ex,eu]=(0,Z.useState)(H),[em,eb]=(0,Z.useState)(""),[ef,eN]=(0,Z.useState)({key:"",rtmps:!0,bitrate:"",fastAudio:!0}),[ek,e_]=(0,Z.useState)(null),[ez,eL]=(0,Z.useState)(!1),[eM,eT]=(0,Z.useState)(""),[eE,eU]=(0,Z.useState)(!0),[eZ,eI]=(0,Z.useState)(!1),[eA,eD]=(0,Z.useState)(!1),[eO,eB]=(0,Z.useState)(null),[eW,eK]=(0,Z.useState)({}),[eH,eF]=(0,Z.useState)(!1),[eY,eG]=(0,Z.useState)(null),[eq,eV]=(0,Z.useState)(0),[eJ,e$]=(0,Z.useState)(null),[eX,eQ]=(0,Z.useState)(null),[e9,e7]=(0,Z.useState)(!1),[te,tl]=(0,Z.useState)(null),[ta,tc]=(0,Z.useState)(!1),[tY,tG]=(0,Z.useState)(!0),[tq,tV]=(0,Z.useState)(null),[tJ,t$]=(0,Z.useState)(null),tX=(0,Z.useRef)(!1),tQ=(0,Z.useRef)(H),t0=(0,Z.useRef)(eM),t1=(0,Z.useRef)([]),t5=(0,Z.useRef)(B),t2=(0,Z.useRef)(0),t3=(0,Z.useRef)(0),t4=(0,Z.useRef)(0),t6=(0,Z.useRef)(0),t8=(0,Z.useRef)({}),t9=(0,Z.useRef)({}),t7=(0,Z.useCallback)(e=>{tQ.current=e,eu(e),F(e)},[F]),se=(0,Z.useCallback)(e=>{t0.current=e,eT(e)},[]),st=(0,Z.useCallback)(e=>{let t=e.trim();if(!t)return Promise.resolve("");let s=t8.current[t];if(s)return s;let n=new URLSearchParams({process:t,_ts:String(Date.now())}),l=J("/get_url_config?".concat(n)).then(e=>{var t;return null!==(t=e.content)&&void 0!==t?t:""});return t8.current[t]=l,l.then(()=>{t8.current[t]===l&&delete t8.current[t]},()=>{t8.current[t]===l&&delete t8.current[t]}),l},[J]),ss=(0,Z.useCallback)(e=>{let t=e.trim();if(!t)return Promise.resolve("");let s=t9.current[t];if(s)return s;let n=new URLSearchParams({process:t,_ts:String(Date.now())}),l=J("/get_config?".concat(n)).then(e=>{var t;return null!==(t=e.content)&&void 0!==t?t:""});return t9.current[t]=l,l.then(()=>{t9.current[t]===l&&delete t9.current[t]},()=>{t9.current[t]===l&&delete t9.current[t]}),l},[J]),sn=(0,Z.useCallback)(()=>{let e=++t4.current;return eI(!0),e},[]),sl=(0,Z.useCallback)(e=>{e===t4.current&&eI(!1)},[]),si=(0,Z.useCallback)(()=>{let e=++t6.current;return eL(!0),e},[]),sa=(0,Z.useCallback)(e=>{e===t6.current&&eL(!1)},[]);(0,Z.useEffect)(()=>{let e=()=>tG("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{tX.current=!1},[B]),(0,Z.useEffect)(()=>{t5.current=B},[B]),(0,Z.useEffect)(()=>{"single"===ei&&(tQ.current=H,eu(H))},[ei,H]),(0,Z.useEffect)(()=>{t0.current=eM},[eM]),(0,Z.useEffect)(()=>{t1.current=er},[er]),(0,Z.useEffect)(()=>{t2.current+=1,t3.current+=1,tX.current=!1,eB(null)},[ei,ec]);let sr=(0,Z.useCallback)(async()=>{let e=t5.current.trim();if(!e)return;if("pro"===ei){let t=t1.current.find(e=>e.id===ec);if(!t||ti(t)!==e)return}let t=++t2.current;try{let l=await st(e);if(t!==t2.current||e!==t5.current.trim()||tX.current)return;if("single"===ei)t7(l);else{var s,n;let e=null!==(n=null===(s=t1.current.find(e=>e.id===ec))||void 0===s?void 0:s.urlLines)&&void 0!==n?n:"";if(tH(e,l)){se(e);return}se(l)}}catch(e){}},[ec,se,t7,ei,st]),so=(0,Z.useMemo)(()=>({pageVisible:tY}).pageVisible?12e3:0,[tY]);(0,Z.useEffect)(()=>{if(!B||!eE||so<=0)return;let e=window.setInterval(()=>{tX.current||sr()},so);return()=>clearInterval(e)},[B,eE,sr,so]);let sc=async()=>{let e=t5.current.trim();if(!e)return;if("pro"===ei){let t=t1.current.find(e=>e.id===ec);if(!t||ti(t)!==e)return}let t=sn();eB(null),tX.current=!1;let s=++t2.current;try{let t=await st(e);if(s!==t2.current||e!==t5.current.trim())return;if(tX.current){eB(A("检测到本地未保存修改,已保留当前草稿","Kept the local unsaved draft"));return}if("single"===ei)t7(t);else{var n,l;let e=null!==(l=null===(n=t1.current.find(e=>e.id===ec))||void 0===n?void 0:n.urlLines)&&void 0!==l?l:"";if(tH(e,t)){se(e),eB(A("服务器暂无已保存 URL,已保留本地草稿","Server has no saved URLs, kept the local draft"));return}se(t)}eB(A("已从服务器读取 URL_config","Reloaded URL_config from server"))}catch(t){if(s!==t2.current||e!==t5.current.trim())return;eB(t.message)}finally{sl(t)}};(0,Z.useEffect)(()=>{try{let e=window.localStorage.getItem(tv);("pro"===e||"single"===e)&&ea(e)}catch(e){}},[]),(0,Z.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await td(J);if(t.fetched&&t.channels.length&&!e){let e=ts(t.channels);t1.current=e,eo(e),eK(tj(e)),to(e);return}}catch(e){}if(e)return;let t=function(){let e=window.localStorage.getItem(e8);if(!e&&(e=window.localStorage.getItem("live-hub-youtube-pro-v1"))){let t=tr(e);if(t.length)return window.localStorage.setItem(e8,JSON.stringify(t)),t}return tr(e)}(),s=ts(t.length>0?t:[{id:tu(),name:"线路 1",streamKey:"",urlLines:"",pm2Name:"youtube",notes:""}]);t1.current=s,eo(s),eK(tj(s)),to(s)})(),()=>{e=!0}},[J]),(0,Z.useEffect)(()=>{if(!er.length){ec&&ed("");return}ec&&er.some(e=>e.id===ec)||ed(er[0].id)},[er,ec]);let sd=er.find(e=>e.id===ec)||er[0],sx=(0,Z.useMemo)(()=>er.find(e=>ti(e)===B),[er,B]),su=(0,Z.useCallback)(e=>$.find(t=>t.pm2===e),[$]),sm=(0,Z.useCallback)(e=>{var t;return null===(t=su(e))||void 0===t?void 0:t.process_status},[su]),sh=su(B),sp=su(B);(0,Z.useEffect)(()=>{"single"===ei&&el&&!B&&(t5.current=el,W(el))},[B,ei,el,W]);let sg=(0,Z.useCallback)(e=>{let t=ts(e);t1.current=t,eo(t),to(t)},[]),sb=(0,Z.useCallback)((e,t)=>{let s=e.trim();if(!s)return;let n=!1,l=t1.current.map(e=>ti(e)!==s?e:(n=!0,{...e,...t}));n&&sg(l)},[sg]),sf=(0,Z.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};await tx(J,e,t)},[J]),sv=(0,Z.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};sg(e),sf(e,t).catch(e=>{X("".concat(A("多频道列表未同步到服务器","Channel list not saved on server"),": ").concat(e.message))})},[sg,X,sf,A]),sy=(0,Z.useMemo)(()=>{var e;return sd?null!==(e=eW[sd.id])&&void 0!==e?e:tw(sd):null},[sd,eW]);(0,Z.useEffect)(()=>{sd&&eK(e=>e[sd.id]?e:{...e,[sd.id]:tw(sd)})},[sd]),(0,Z.useEffect)(()=>{if(!sd||"youtube"!==ti(sd))return;let e=ef.key.trim();e&&eK(t=>{var s;let n=null!==(s=t[sd.id])&&void 0!==s?s:tw(sd);return n.streamKey.trim()===e&&"youtube"===n.pm2Name||n.streamKey.trim()?t:{...t,[sd.id]:{...n,streamKey:e,pm2Name:"youtube"}}})},[sd,ef.key]),(0,Z.useEffect)(()=>{eG(null)},[ec]);let sw=(0,Z.useCallback)((e,t)=>{sd&&(eK(s=>{var n;return{...s,[sd.id]:{...null!==(n=s[sd.id])&&void 0!==n?n:tw(sd),[e]:t}}}),eG(null))},[sd]),sj=sd?ti(sd):"",sN=sd&&sy?ti({id:sd.id,pm2Name:sy.pm2Name}):"",sk=!!sd&&!!sy&&sN!==sj,s_=(0,Z.useMemo)(()=>{if(!sd||!sy)return{ok:!1,message:A("请选择线路","Pick a lane"),normalizedName:"",normalizedPm2:"",normalizedStreamKey:"",normalizedNotes:""};let e=er.findIndex(e=>e.id===sd.id),t=tt(sy.name,e>=0?e:0),s=ti({id:sd.id,pm2Name:sy.pm2Name});return s?ty.has(s)?{ok:!1,message:A("该进程名保留给系统模块,请换一个","This PM2 name is reserved"),normalizedName:t,normalizedPm2:s,normalizedStreamKey:sy.streamKey.trim(),normalizedNotes:sy.notes.trim()}:er.find(e=>e.id!==sd.id&&ti(e)===s)?{ok:!1,message:A("该进程名已被其它线路占用","Another lane already uses this PM2 name"),normalizedName:t,normalizedPm2:s,normalizedStreamKey:sy.streamKey.trim(),normalizedNotes:sy.notes.trim()}:{ok:!0,message:"",normalizedName:t,normalizedPm2:s,normalizedStreamKey:sy.streamKey.trim(),normalizedNotes:sy.notes.trim()}:{ok:!1,message:A("进程名不能为空","PM2 name is required"),normalizedName:t,normalizedPm2:s,normalizedStreamKey:sy.streamKey.trim(),normalizedNotes:sy.notes.trim()}},[sd,sy,er,A]),sz=(0,Z.useMemo)(()=>{if(!sd||!sy)return!1;let e=tw(sd);return sy.name!==e.name||sy.streamKey!==e.streamKey||tn(sy.pm2Name)!==tn(e.pm2Name)||sy.notes!==e.notes},[sd,sy]),sS=(0,Z.useCallback)(async e=>{let t=e.trim();if(!t)return;let s=++t2.current,n=++t3.current;tX.current=!1;let l=sn(),i=si();eB(A("正在同步单频道配置...","Syncing single-channel config...")),e_(null);try{let[e,l]=await Promise.allSettled([st(t),ss(t)]);if(s===t2.current&&t===t5.current.trim()&&("fulfilled"===e.status?(t7(e.value),eB(A("单频道配置已实时同步","Single-channel config synced"))):eB(e.reason instanceof Error?e.reason.message:String(e.reason))),n===t3.current&&t===t5.current.trim()){if("fulfilled"===l.status){let e=l.value;eb(e),eN(eS(e))}else e_(l.reason instanceof Error?l.reason.message:String(l.reason))}}finally{sl(l),sa(i),t===t5.current.trim()&&eV(e=>e+1)}},[t7,sn,si,sl,sa,st,ss,A]),sC=(0,Z.useCallback)(async e=>{let t=ti(e).trim();if(!t)return;let s=++t2.current,n=++t3.current;tX.current=!1;let l=sn(),i=si();eB(A("正在同步当前线路配置...","Syncing current lane config...")),e_(null);try{let[l,i]=await Promise.allSettled([st(t),ss(t)]);if(s===t2.current&&t===t5.current.trim()){if("fulfilled"===l.status){var a;let s=l.value,n=null!==(a=e.urlLines)&&void 0!==a?a:"";tH(n,s)?(se(n),sb(t,{urlLines:n}),eB(A("服务器暂无已保存 URL,已保留当前线路草稿","Server has no saved URLs, kept this lane draft"))):(se(s),sb(t,{urlLines:s}),eB(A("当前线路地址已实时同步","Current lane URLs synced")))}else eB(l.reason instanceof Error?l.reason.message:String(l.reason))}if(n===t3.current&&t===t5.current.trim()){if("fulfilled"===i.status){let t=i.value,s=eS(t);eb(t),eN(s),s.key.trim()&&eK(t=>{var n,l;let i=null!==(n=t[e.id])&&void 0!==n?n:tw(e);return i.streamKey.trim()&&i.streamKey.trim()!==(null!==(l=e.streamKey)&&void 0!==l?l:"").trim()||i.streamKey.trim()===s.key.trim()?t:{...t,[e.id]:{...i,streamKey:s.key.trim()}}})}else e_(i.reason instanceof Error?i.reason.message:String(i.reason))}}finally{sl(l),sa(i),t===t5.current.trim()&&eV(e=>e+1)}},[se,sn,si,sl,sa,sb,st,ss,A]);(0,Z.useCallback)(async()=>{try{var e,t;let s=await td(J);if(!s.fetched||!s.channels.length)return;let n=ts(s.channels);t1.current=n,eo(n),eK(tj(n)),to(n);let l=null!==(e=n.find(e=>e.id===ec))&&void 0!==e?e:n[0];if(!l)return;ed(l.id),se((null!==(t=l.urlLines)&&void 0!==t?t:"").trim());let i=ti(l);t5.current=i,W(i),sC(l)}catch(e){}},[ec,se,J,sC,W]);let sR=(0,Z.useCallback)(e=>{var t,s,n,l;if("pro"===e&&"single"===ei&&!ef.key.trim()){X(A("请先填写并保存 YouTube 推流 key,再切换到多频道 Pro","Fill and save the YouTube stream key before switching to Multi Pro"));return}if("single"===e){let e=t5.current.trim(),s=sd?ti(sd):"",n="pro"===ei?s||e:e||el||(null===(t=en[0])||void 0===t?void 0:t.pm2)||"";n&&(t5.current=n,W(n),sS(n))}if("pro"===e&&er.length){let e=t5.current.trim(),t=null!==(n=null!==(s=er.find(t=>ti(t)===e))&&void 0!==s?s:er.find(e=>e.id===ec))&&void 0!==n?n:er[0];if(se((null!==(l=null==t?void 0:t.urlLines)&&void 0!==l?l:"").trim()),t){ed(t.id);let e=ti(t);t5.current=e,W(e),sC(t)}}ea(e);try{window.localStorage.setItem(tv,e)}catch(e){}},[er,se,sd,ec,ei,X,el,sC,sS,W,en,A,ef.key]),sL=(0,Z.useCallback)(e=>{var t;se((null!==(t=e.urlLines)&&void 0!==t?t:"").trim()),ed(e.id);let s=ti(e);t5.current=s,W(s),sC(e)},[se,sC,W]);(0,Z.useEffect)(()=>{if("pro"!==ei||!ec)return;let e=er.find(e=>e.id===ec);if(!e)return;let t=ti(e);t5.current=t,W(t)},[ei,ec,er,W]);let sP=(0,Z.useCallback)(async()=>{let e=t5.current.trim();if(!e)return;let t=++t3.current,s=si();e_(null);try{let s=await ss(e);if(t!==t3.current||e!==t5.current.trim())return;eb(s),eN(eS(s))}catch(s){if(t!==t3.current||e!==t5.current.trim())return;e_(s.message)}finally{sa(s)}},[si,sa,ss]);(0,Z.useEffect)(()=>{if(B){if("pro"===ei){if(!sd||B!==ti(sd))return;sr(),sP(),eV(e=>e+1);return}sS(B)}},[sd,ec,B,sP,ei,sr,sS]);let sM=(0,Z.useCallback)(async()=>{var e;if(!sd||!sy)throw Error(A("请选择线路","Pick a lane"));if(!s_.ok)throw Error(s_.message);let t=t0.current,s=er.map(e=>e.id===sd.id?{...e,name:s_.normalizedName,streamKey:s_.normalizedStreamKey,pm2Name:s_.normalizedPm2,notes:s_.normalizedNotes,urlLines:t}:e);return await sf(s,{force:!0}),sg(s),eK(e=>({...e,[sd.id]:{name:s_.normalizedName,streamKey:s_.normalizedStreamKey,pm2Name:s_.normalizedPm2,notes:s_.normalizedNotes}})),{next:s,savedLane:null!==(e=s.find(e=>e.id===sd.id))&&void 0!==e?e:{...sd,name:s_.normalizedName,streamKey:s_.normalizedStreamKey,pm2Name:s_.normalizedPm2,notes:s_.normalizedNotes,urlLines:t},pm2:s_.normalizedPm2}},[sd,sy,s_,sg,er,sf,A]),sT=(0,Z.useCallback)(async()=>{if(sd){eF(!0),eG(null);try{let e=await sM();t5.current=e.pm2,W(e.pm2),eG(A("线路设置已保存","Lane settings saved"))}catch(t){let e=t.message;eG(e),X(e)}finally{eF(!1)}}},[sd,X,sM,W,A]),sE=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t5.current,s=t.trim();if(!s){e_(A("请选择进程","Pick a process"));return}t3.current+=1;let n=si();e_(null);try{let t=new URLSearchParams({process:s});await J("/save_config?".concat(t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e})}),eb(e),sb(s,{streamKey:eS(e).key}),e_(A("youtube.ini 已保存","youtube.ini saved"))}catch(e){e_(e.message)}finally{sa(n)}},sU=async()=>{let e=eR(ef);await sE(e)},sZ=async()=>{t3.current+=1;let e=si();e_(null);try{var t,s;let e=em||eR(ef),n=await J("/config_optimize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:"app-config",path:(s=t5.current,"youtube.".concat(s.replace(/[^a-zA-Z0-9_.-]/g,"_"),".ini")),content:e,action:"youtube_balanced_preset"})}),l=null!==(t=n.content)&&void 0!==t?t:e;eb(l),eN(eS(l)),e_(n.message||A("已应用 YouTube 预设","Applied YouTube preset"))}catch(e){e_(e.message)}finally{sa(e)}},sI=(0,Z.useMemo)(()=>{var e,t;if("single"===ei)return ew("key = ".concat(ef.key));let s=null!==(t=null!==(e=null==sy?void 0:sy.streamKey)&&void 0!==e?e:null==sd?void 0:sd.streamKey)&&void 0!==t?t:"";return ew("key = ".concat(s))},[ei,null==sd?void 0:sd.streamKey,ef.key,null==sy?void 0:sy.streamKey]),sA=sI?"…".concat(sI):"—",sD=async()=>{if(!sd){let e=A("请选择线路后再保存地址","Pick a lane before saving URLs");eG(e),X(e);return}if(s7){eG(s7),X(s7);return}try{eF(!0),eG(null),t2.current+=1;let e=t0.current,t=await sM();t5.current=t.pm2,W(t.pm2),await Promise.resolve(V(e,t.pm2)),tX.current=!1,eG(A("线路与地址已保存","Lane settings and URLs saved"))}catch(t){let e=t instanceof Error?t.message:String(t);eG(e),X(e)}finally{eF(!1)}},sO=async()=>{if(s7){X(s7);return}let e=t5.current.trim();if(!e){X(A("请选择进程","Pick a process"));return}try{t2.current+=1,await Promise.resolve(V(tQ.current,e)),sb(e,{urlLines:tQ.current}),tX.current=!1}catch(e){}},sB=async()=>{let e="single"===ei?tQ.current:t0.current;eD(!0),eB(null);try{var t;let s=await J("/config_optimize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:"app-config",path:eC(t5.current),content:e,action:"dedupe_urls"})}),n=null!==(t=s.content)&&void 0!==t?t:e;"single"===ei?t7(n):se(n),tX.current=!0,eB(s.message||A("已去重当前 URL 列表","Deduplicated current URL list"))}catch(e){eB(e.message)}finally{eD(!1)}},sW=async()=>{if(!sd||!sy)return;let e=eS(em||eR(ef)),t=eR({key:sy.streamKey.trim(),rtmps:e.rtmps,bitrate:e.bitrate,fastAudio:e.fastAudio});eF(!0),eG(null);try{let e=await sM();t5.current=e.pm2,W(e.pm2),await sE(t,e.pm2),eG(A("线路设置与 youtube.ini 已保存","Lane settings and youtube.ini saved"))}catch(t){let e=t.message;eG(e),X(e)}finally{eF(!1)}},sK="single"===ei?ex:eM,sH=(0,Z.useMemo)(()=>tK(sK).length,[sK]),sF=(0,Z.useMemo)(()=>ej(sK).length,[sK]),sY=(0,Z.useMemo)(()=>(0,e6.O0)(et),[et]),sG=(0,Z.useMemo)(()=>(0,e6.U_)(sY,"pro"===ei&&sd?er.findIndex(e=>e.id===sd.id):0),[sd,er,ei,sY]),sq=sG.link?(0,eh.p)(sG.link.url):(0,eh.p)("http://live.local:9200/"),sV=(0,Z.useMemo)(()=>(0,e6.Tc)(sY),[sY]),sJ=(0,Z.useMemo)(()=>{var e;return[null===(e=sG.link)||void 0===e?void 0:e.url,null==et?void 0:et.chromium_remote_debug,null==et?void 0:et.srs_api].filter(e=>!!e)},[et,null===(t=sG.link)||void 0===t?void 0:t.url]),s$=(0,Z.useCallback)(async(e,t)=>{if(!tq&&("delete"!==t||window.confirm("".concat(e.label,": 删除容器?浏览器配置和登录数据会保留,之后点“启动”会自动重建。")))){tV("".concat(e.id,":").concat(t)),t$(null);try{let s=await J("/neko/instance_action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id,action:t})}),n=s.running?A("运行中","running"):s.exists?A("已停止","stopped"):A("容器不存在","missing"),l=s.message||"".concat(e.label,": ").concat(n);t$("".concat(l," \xb7 ").concat(n)),await (null==ee?void 0:ee())}catch(t){let e=t.message;t$(e),X(e)}finally{tV(null)}}},[J,tq,X,ee,A]),sX=(0,Z.useCallback)(async e=>{let t=sd?ti(sd):"";return sd&&e===t?await sM():(sg(er),await sf(er,{force:!0}),{next:er,savedLane:null!=sd?sd:null,pm2:e})},[sd,sg,er,sM,sf]),sQ=(0,Z.useCallback)(async(e,t)=>{let s=!!sd&&ti(sd)===t;if("stop"!==e){var n,l;let e=er,s=t;try{let n=await sX(t);e=n.next,s=n.pm2}catch(e){X("".concat(A("当前线路保存失败","Failed to save the active lane"),": ").concat(e.message));return}let i=e.find(e=>ti(e)===s),a=null!==(n=null==i?void 0:i.urlLines)&&void 0!==n?n:"";if(!(null!==(l=null==i?void 0:i.streamKey)&&void 0!==l?l:"").trim()){X(A("请先填写当前线路的推流密钥","Fill the stream key before starting"));return}if(!tK(a).length){X(A("请先填写当前线路的直播地址","Fill the source URLs before starting"));return}t=s}s&&W(t),q(e,t)},[sd,er,sX,X,q,W,A]),s0=(0,Z.useCallback)(async e=>{e7(!0);try{var t,s,n,l;let i=await J("/hub/youtube/live/summary");e$(i);let a=i.active||[],r=t5.current.trim(),o=null!==(l=null!==(n=null!=e?e:r?null===(t=a.find(e=>e.process===r))||void 0===t?void 0:t.id:void 0)&&void 0!==n?n:null===(s=a[0])||void 0===s?void 0:s.id)&&void 0!==l?l:null==eX?void 0:eX.id;if(o){let e=await J("/hub/youtube/live/events/".concat(encodeURIComponent(String(o))));e.event&&eQ(e.event)}}catch(e){}finally{e7(!1)}},[J,null==eX?void 0:eX.id]),s1=(0,Z.useCallback)(async e=>{e7(!0);try{let t=await J("/hub/youtube/live/events/".concat(encodeURIComponent(String(e))));eQ(t.event||null)}catch(e){X(e.message)}finally{e7(!1)}},[J,X]),s5=null!==(x=null==eJ?void 0:null===(s=eJ.active)||void 0===s?void 0:s.length)&&void 0!==x?x:0,s2=(0,Z.useMemo)(()=>{var e;return(e={activeEvents:s5,pageVisible:tY}).pageVisible?e.activeEvents>0?4e3:12e3:3e4},[s5,tY]);(0,Z.useEffect)(()=>{if(s0(null),s2<=0)return;let e=window.setInterval(()=>void s0(),s2);return()=>window.clearInterval(e)},[s2,s0]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&s0(null)};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[s0]);let s3=(0,Z.useCallback)(async()=>{tc(!0);try{let e=await J("/hub/youtube/quality_guard");tl(e)}catch(e){}finally{tc(!1)}},[J]),s4=null!==(u=null==te?void 0:null===(l=te.summary)||void 0===l?void 0:l.pushing_lanes)&&void 0!==u?u:0,s6=(0,Z.useMemo)(()=>{var e;return(e={pushingLanes:s4,pageVisible:tY}).pageVisible?e.pushingLanes>0?6e3:15e3:3e4},[s4,tY]);(0,Z.useEffect)(()=>{if(s3(),s6<=0)return;let e=window.setInterval(()=>void s3(),s6);return()=>window.clearInterval(e)},[s6,s3]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&s3()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[s3]);let s8=!!D||ez||eZ||eA||eH,s9=!!D||eH,s7=ez?A("正在读取 youtube.ini,稍后再保存地址","youtube.ini is loading; save URLs after it finishes"):eZ?A("正在重新读取地址列表,稍后再保存","URL list is reloading; save after it finishes"):eA?A("正在整理地址列表,稍后再保存","URL list is being optimized; save after it finishes"):D?A("正在执行其他操作,稍后再保存地址","Another operation is running; save URLs after it finishes"):"",ne="single"===ei?sp:sh,nt=(0,Z.useMemo)(()=>"pro"===ei?ey($.filter(e=>tb(e))):ev(sp),[ei,$,sp]),ns=(0,Z.useMemo)(()=>(function(e){if(e.paused)return 0;if(!e.pageVisible)return 3e4;switch(e.activity){case"hot":return 800;case"warm":return 2e3;default:return 4e3}})({activity:nt,pageVisible:tY}),[nt,tY]),nn=tz(sm(B)),nl=sd?tk(su(ti(sd)),eM||sd.urlLines||""):"",ni=tN(sp),na=(0,Z.useMemo)(()=>{var e,t,s;let n=(null==eJ?void 0:eJ.active)||[],l=B.trim();return l?null!==(s=null!==(t=n.find(e=>e.process===l))&&void 0!==t?t:n[0])&&void 0!==s?s:null:null!==(e=n[0])&&void 0!==e?e:null},[B,null==eJ?void 0:eJ.active]),nr=(0,Z.useMemo)(()=>{var e;if("single"===ei)return ex;let t=er.find(e=>ti(e)===B);return t&&t.id===(null==sd?void 0:sd.id)?eM:(null!==(e=null==t?void 0:t.urlLines)&&void 0!==e?e:"").trim()||eM},[null==sd?void 0:sd.id,er,ei,eM,B,ex]),no=tk(sp,nr),nc=t_(sp,nr),nd=null==te?void 0:null===(i=te.lanes)||void 0===i?void 0:i.find(e=>e.process===B),nx=null==nd?void 0:nd.metrics,nu=null!==(m=null==nd?void 0:nd.score)&&void 0!==m?m:null,nm="pro"===ei?$.filter(e=>tb(e)&&tN(e)).length:ni?1:0,nh="number"==typeof(null==sp?void 0:sp.ffmpeg_speed)?sp.ffmpeg_speed.toFixed(2):"number"==typeof(null==nx?void 0:nx.speed)?nx.speed.toFixed(2):null,np="number"==typeof(null==sp?void 0:sp.ffmpeg_frame)?String(sp.ffmpeg_frame):"number"==typeof(null==nx?void 0:nx.frame)?String(nx.frame):null,ng="number"==typeof(null==nx?void 0:nx.bitrate)?"".concat(Math.round(nx.bitrate)," kbps"):null,nb="number"==typeof(null==sp?void 0:sp.ffmpeg_time_seconds)?tZ(sp.ffmpeg_time_seconds,A):null,nf=!sI||0===sF,nv=sI?ef.rtmps?"RTMPS":"RTMP":A("检查密钥","Check key"),ny=e=>{var t;let s=(null===(t=sG.link)||void 0===t?void 0:t.id)===e.id,l=tq==="".concat(e.id,":start"),i=tq==="".concat(e.id,":stop"),a=tq==="".concat(e.id,":delete"),r=!!tq,o=e.id===sY.length&&sY.length>1,c=r||!o;return(0,n.jsxs)("div",{className:"flex min-h-[2.5rem] items-stretch overflow-hidden rounded-lg border text-xs ring-1 ".concat(s?"border-emerald-400/30 bg-emerald-500/15 text-emerald-50 ring-emerald-400/25":"border-white/10 bg-white/5 text-zinc-200 ring-white/10"),children:[(0,n.jsxs)("a",{href:(0,eh.p)(e.url),target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 px-3 py-2 hover:bg-white/[0.04]",children:[(0,n.jsx)("span",{className:"font-semibold",children:e.label}),(0,n.jsx)("span",{className:"rounded-full bg-emerald-500/15 px-1.5 py-0.5 text-[10px] text-emerald-100",children:e.accessLabel}),(0,n.jsxs)("span",{className:"font-mono text-white/70",children:[e.host||"",e.port?":".concat(e.port):""]})]}),(0,n.jsxs)("div",{className:"flex border-l border-white/10",children:[(0,n.jsxs)("button",{type:"button",disabled:r,title:A("启动 Neko 容器","Start Neko container"),onClick:()=>void s$(e,"start"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 px-2 text-emerald-100 hover:bg-emerald-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[l?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(G.Z,{className:"h-3.5 w-3.5"}),A("启动","Start")]}),(0,n.jsxs)("button",{type:"button",disabled:r,title:A("停止 Neko 容器","Stop Neko container"),onClick:()=>void s$(e,"stop"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 border-l border-white/10 px-2 text-amber-100 hover:bg-amber-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[i?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(e0.Z,{className:"h-3.5 w-3.5"}),A("停止","Stop")]}),(0,n.jsxs)("button",{type:"button",disabled:c,title:o?A("删除最后一个 Neko 实例,保留浏览器配置数据","Delete the last Neko instance and keep browser profile data"):A("只能删除最后一个 Neko 实例","Only the last Neko instance can be deleted"),onClick:()=>void s$(e,"delete"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 border-l border-white/10 px-2 text-rose-100 hover:bg-rose-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[a?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(S.Z,{className:"h-3.5 w-3.5"}),A("删除","Delete")]})]})]},e.key)},nw=(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-4 text-xs text-zinc-400",children:[(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-2",children:[(0,n.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:eE,onChange:e=>eU(e.target.checked)}),A("后台自动从服务器刷新(空闲约 12 秒)","Auto-refresh from server (~12s when idle)")]}),(0,n.jsx)("button",{type:"button",disabled:s8,onClick:()=>void sc(),className:"rounded-lg border border-white/10 px-3 py-1.5 text-zinc-200 hover:bg-white/5",children:A("手动重新读取","Reload from server")}),(0,n.jsx)("button",{type:"button",disabled:s8,onClick:()=>void sB(),className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-1.5 text-cyan-100 hover:bg-cyan-500/15",children:eA?A("去重中...","Deduplicating..."):A("智能去重","Deduplicate")})]}),nj=(null==eJ?void 0:eJ.active)||[],nN=(null==eJ?void 0:eJ.latest)||[],nk=(null==eJ?void 0:eJ.alerts)||[],n_=(null==eJ?void 0:eJ.stats)||{},nz=[{label:A("活动事件","Active"),value:null!==(h=n_.active_events)&&void 0!==h?h:nj.length,Icon:a.Z},{label:A("历史事件","History"),value:null!==(p=n_.total_events)&&void 0!==p?p:nN.length,Icon:e1.Z},{label:A("采样点","Samples"),value:null!==(g=n_.sample_count)&&void 0!==g?g:0,Icon:e5.Z},{label:A("峰值在线","Viewer peak"),value:null!==(b=n_.viewer_peak)&&void 0!==b?b:0,Icon:e2.Z},{label:A("累计时长","Total duration"),value:tR(n_.total_duration_seconds),Icon:e3.Z}],nS=(0,n.jsxs)("section",{className:"rounded-2xl border border-cyan-500/20 bg-gradient-to-br from-cyan-500/[0.08] via-zinc-950/80 to-emerald-500/[0.05] p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(e5.Z,{className:"h-4 w-4 text-cyan-300"}),A("直播事件中枢","Live event center")]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:A("事件、转播对象、时长、页面采集、弹窗和告警全部写入本地 SQLite,可追溯。","Events, source rooms, duration, browser telemetry, popups, and alerts are stored locally.")})]}),(0,n.jsxs)("button",{type:"button",onClick:()=>void s0(),className:"inline-flex items-center gap-2 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-2 text-xs text-zinc-200 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(e9?"animate-spin":"")}),A("刷新事件","Refresh events")]})]}),(0,n.jsx)("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 xl:grid-cols-5",children:nz.map(e=>{let{label:t,value:s,Icon:l}=e;return(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-zinc-500",children:[(0,n.jsx)(l,{className:"h-3.5 w-3.5 text-cyan-300"}),t]}),(0,n.jsx)("p",{className:"mt-2 font-mono text-lg font-semibold text-white",children:String(s)})]},t)})}),(0,n.jsxs)("div",{className:"mt-5 grid gap-4 xl:grid-cols-[minmax(0,1fr)_minmax(22rem,0.9fr)]",children:[(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-200/90",children:A("正在转播","Active relay")}),(0,n.jsx)("span",{className:"rounded-full bg-emerald-500/15 px-2 py-0.5 text-[10px] text-emerald-100 ring-1 ring-emerald-500/25",children:nj.length})]}),(0,n.jsxs)("div",{className:"mt-3 space-y-2",children:[(nj.length?nj:nN.slice(0,1)).map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>void s1(e.id),className:"block w-full rounded-lg border border-white/[0.06] bg-white/[0.03] px-3 py-2 text-left transition hover:bg-white/[0.06]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"truncate text-sm font-medium text-white",children:e.source_title||e.channel_name||e.source_room_id||e.process||"#".concat(e.id)}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tP(e.status)),children:e.status||"event"})]}),(0,n.jsxs)("div",{className:"mt-1 flex flex-wrap gap-2 font-mono text-[10px] text-zinc-500",children:[(0,n.jsx)("span",{children:e.process||"-"}),(0,n.jsx)("span",{children:e.source_room_id?"room:".concat(e.source_room_id):A("未知来源","unknown source")}),(0,n.jsx)("span",{children:tR(e.duration_seconds)}),(0,n.jsx)("span",{children:null!=e.last_viewer_count?"".concat(e.last_viewer_count," online"):""})]})]},e.id)),nj.length||nN.length?null:(0,n.jsx)("p",{className:"text-xs text-zinc-600",children:A("暂无事件;开始直播或打开 Neko 中的 YouTube Studio 后会自动生成。","No events yet. Start a relay or open YouTube Studio in Neko.")})]})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-zinc-400",children:A("最近事件","Recent events")}),(0,n.jsx)("div",{className:"mt-3 divide-y divide-white/[0.06]",children:nN.slice(0,8).map(e=>{var t;return(0,n.jsxs)("button",{type:"button",onClick:()=>void s1(e.id),className:"flex w-full items-center justify-between gap-3 py-2 text-left",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"truncate text-xs font-medium text-zinc-200",children:e.source_title||e.source_room_id||e.channel_name||e.process||"#".concat(e.id)}),(0,n.jsxs)("p",{className:"mt-0.5 font-mono text-[10px] text-zinc-600",children:[tL(e.started_at)," \xb7 ",tR(e.duration_seconds)]})]}),(0,n.jsxs)("span",{className:"shrink-0 rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tP(e.status)),children:[null!==(t=e.quality_score)&&void 0!==t?t:0,"/100"]})]},e.id)})})]})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-200/90",children:A("事件详情页","Event detail")}),eX?(0,n.jsx)("button",{type:"button",onClick:()=>eQ(null),className:"text-[11px] text-zinc-500 hover:text-zinc-300",children:A("收起","Close")}):null]}),eX?(0,n.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("p",{className:"truncate text-sm font-semibold text-white",children:eX.source_title||eX.source_room_id||eX.process}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tP(eX.status)),children:eX.status})]}),(0,n.jsxs)("div",{className:"mt-2 grid gap-2 text-[11px] text-zinc-400 sm:grid-cols-2",children:[(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Process:"})," ",eX.process||"-"]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Room:"})," ",eX.source_room_id||"-"]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Started:"})," ",tL(eX.started_at)]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Duration:"})," ",tR(eX.duration_seconds)]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Viewers:"})," ",null!==(f=eX.last_viewer_count)&&void 0!==f?f:"-"," / peak ",null!==(v=eX.viewer_peak)&&void 0!==v?v:0]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Health:"})," ",eX.last_health||eX.last_live_status||"-"]})]}),(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[eX.source_url?(0,n.jsx)("a",{href:eX.source_url,target:"_blank",rel:"noreferrer",className:"rounded-lg bg-violet-500/15 px-2.5 py-1.5 text-[11px] text-violet-100 ring-1 ring-violet-500/25",children:A("打开源直播间","Open source")}):null,eX.last_page_url?(0,n.jsx)("a",{href:eX.last_page_url,target:"_blank",rel:"noreferrer",className:"rounded-lg bg-cyan-500/15 px-2.5 py-1.5 text-[11px] text-cyan-100 ring-1 ring-cyan-500/25",children:A("打开 Studio 页面","Open Studio page")}):null]})]}),(eX.alerts||nk).slice(0,4).length?(0,n.jsxs)("div",{className:"rounded-lg border border-amber-500/20 bg-amber-500/[0.06] p-3",children:[(0,n.jsxs)("h5",{className:"flex items-center gap-2 text-xs font-semibold text-amber-100",children:[(0,n.jsx)(eg.Z,{className:"h-3.5 w-3.5"}),A("弹窗 / 告警","Popups / alerts")]}),(0,n.jsx)("div",{className:"mt-2 space-y-1",children:(eX.alerts||nk).slice(0,4).map((e,t)=>(0,n.jsxs)("p",{className:"text-[11px] text-amber-100/85",children:[e.title||e.severity||"alert",": ",e.message||"-"]},"".concat(e.id||t)))})]}):null,(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsx)("h5",{className:"text-xs font-semibold text-zinc-300",children:A("采样时间线","Sample timeline")}),(0,n.jsxs)("div",{className:"mt-2 max-h-52 space-y-2 overflow-auto pr-1",children:[(eX.samples||[]).slice(0,12).map(e=>{var t;return(0,n.jsxs)("div",{className:"rounded-md border border-white/[0.05] bg-black/25 px-2 py-1.5",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 font-mono text-[10px] text-zinc-500",children:[(0,n.jsx)("span",{children:tL(e.ts)}),(0,n.jsx)("span",{children:e.source||"sample"})]}),(0,n.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-300",children:[e.live_status||"-"," \xb7 ",e.health||"-"," \xb7 ",null!==(t=e.viewer_count)&&void 0!==t?t:"-"," online"]}),e.popup_text?(0,n.jsx)("p",{className:"mt-1 text-[10px] text-amber-100/80",children:e.popup_text}):null]},e.id)}),(eX.samples||[]).length?null:(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:A("暂无采样;Chrome 扩展或状态接口会自动写入。","No samples yet. The Chrome extension or status API will fill this.")})]})]})]}):(0,n.jsx)("p",{className:"mt-3 text-xs text-zinc-600",children:A("选择左侧事件查看完整详情。","Select an event to see details.")})]})]})]}),nC=[...nj,...nN.filter(e=>!nj.some(t=>t.id===e.id))].slice(0,12),nR=eX||nC[0]||null,nL=(null==nR?void 0:nR.samples)||[],nP=(null==nR?void 0:null===(r=nR.alerts)||void 0===r?void 0:r.length)?nR.alerts:nk,nM=[{label:A("正在直播","Live now"),value:String(null!==(j=n_.active_events)&&void 0!==j?j:nj.length),helper:A("当前仍在推流的场次","Events still pushing"),Icon:Y.Z,tone:"text-emerald-200"},{label:A("总场次","Total events"),value:String(null!==(N=n_.total_events)&&void 0!==N?N:nN.length),helper:A("本机数据库里的直播记录","Stored locally"),Icon:e1.Z,tone:"text-cyan-200"},{label:A("累计时长","Total duration"),value:tZ(n_.total_duration_seconds,A),helper:A("已结束场次累计","Ended events total"),Icon:e3.Z,tone:"text-violet-200"},{label:A("最高在线","Peak viewers"),value:tT(null!==(k=n_.viewer_peak)&&void 0!==k?k:0,A),helper:A("Chrome/Studio 采集峰值","Captured from Studio"),Icon:e2.Z,tone:"text-amber-200"}],nT=(0,n.jsxs)("section",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/90 p-6 ring-1 ring-cyan-500/10",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-base font-semibold text-white",children:[(0,n.jsx)(e5.Z,{className:"h-5 w-5 text-cyan-300"}),A("直播事件中枢","Live event center")]}),(0,n.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-zinc-400",children:A("这里按运营视角展示:谁在播、转播哪个直播间、播了多久、观众多少、Studio 是否弹窗、有没有异常。机器编号只放在详情底部。","Built for operators: what is live, source room, duration, viewers, Studio popups, and issues. Technical ids stay in the detail footer.")})]}),(0,n.jsxs)("button",{type:"button",onClick:()=>void s0(),className:"inline-flex items-center gap-2 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-2 text-xs text-zinc-200 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(e9?"animate-spin":"")}),A("刷新","Refresh")]})]}),(0,n.jsx)("div",{className:"mt-5 grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:nM.map(e=>{let{label:t,value:s,helper:l,Icon:i,tone:a}=e;return(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.035] p-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,n.jsx)("p",{className:"text-xs text-zinc-500",children:t}),(0,n.jsx)(i,{className:"h-4 w-4 ".concat(a)})]}),(0,n.jsx)("p",{className:"mt-2 text-2xl font-semibold tracking-tight text-white",children:s}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-600",children:l})]},t)})}),(0,n.jsxs)("div",{className:"mt-6 grid gap-5 xl:grid-cols-[minmax(0,1.1fr)_minmax(25rem,0.9fr)]",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-white/[0.06] px-4 py-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"text-sm font-semibold text-white",children:nj.length?A("正在直播","Live now"):A("最近直播记录","Recent live events")}),(0,n.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:nj.length?A("优先显示还在推流的场次。","Active relays are listed first."):A("当前没有正在直播的场次,下方是最近历史。","Nothing is live now; showing recent history.")})]}),(0,n.jsxs)("span",{className:"rounded-full bg-cyan-500/10 px-2.5 py-1 text-xs text-cyan-100 ring-1 ring-cyan-500/20",children:[nC.length," ",A("条记录","records")]})]}),(0,n.jsxs)("div",{className:"divide-y divide-white/[0.06]",children:[nC.map(e=>{var t;let s=(null==nR?void 0:nR.id)===e.id;return(0,n.jsxs)("button",{type:"button",onClick:()=>void s1(e.id),className:"grid w-full gap-3 px-4 py-4 text-left transition md:grid-cols-[minmax(0,1fr)_8rem_7rem_7rem] ".concat(s?"bg-cyan-500/[0.08]":"hover:bg-white/[0.04]"),children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(tP(e.status)),children:tM(e.status,A)}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(tD(e)),children:tA(e,A)})]}),(0,n.jsx)("p",{className:"mt-2 truncate text-sm font-semibold text-white",children:tE(e,A)}),(0,n.jsxs)("p",{className:"mt-1 truncate text-xs text-zinc-500",children:[tU(e,A)," ","->"," YouTube"]})]}),(0,n.jsxs)("div",{className:"self-center",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:A("开始","Started")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-300",children:tI(e.started_at)})]}),(0,n.jsxs)("div",{className:"self-center",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:A("时长","Duration")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-300",children:tZ(e.duration_seconds,A)})]}),(0,n.jsxs)("div",{className:"self-center",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:A("在线/峰值","Viewers")}),(0,n.jsxs)("p",{className:"mt-1 text-xs text-zinc-300",children:[tT(e.last_viewer_count,A)," / ",tT(null!==(t=e.viewer_peak)&&void 0!==t?t:0,A)]})]})]},e.id)}),nC.length?null:(0,n.jsxs)("div",{className:"px-4 py-10 text-center",children:[(0,n.jsx)(c.Z,{className:"mx-auto h-8 w-8 text-zinc-700"}),(0,n.jsx)("p",{className:"mt-3 text-sm font-medium text-zinc-300",children:A("还没有直播记录","No live events yet")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-600",children:A("启动转播或在 Neko 打开 YouTube Studio 后,这里会自动生成可追溯记录。","Start a relay or open YouTube Studio in Neko to create traceable records.")})]})]})]}),(0,n.jsx)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:nR?(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"text-xs text-cyan-300",children:A("这场直播","Selected event")}),(0,n.jsx)("h4",{className:"mt-1 truncate text-lg font-semibold text-white",children:tE(nR,A)}),(0,n.jsxs)("p",{className:"mt-1 text-sm text-zinc-500",children:[tU(nR,A)," ","->"," YouTube"]})]}),(0,n.jsx)("span",{className:"rounded-full px-2.5 py-1 text-xs ring-1 ".concat(tP(nR.status)),children:tM(nR.status,A)})]})}),(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:A("直播时长","Duration")}),(0,n.jsx)("p",{className:"mt-1 text-lg font-semibold text-white",children:tZ(nR.duration_seconds,A)}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:tL(nR.started_at)})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:A("观众","Viewers")}),(0,n.jsxs)("p",{className:"mt-1 text-lg font-semibold text-white",children:[tT(nR.last_viewer_count,A),(0,n.jsxs)("span",{className:"ml-2 text-xs font-normal text-zinc-500",children:[A("峰值","peak")," ",tT(null!==(_=nR.viewer_peak)&&void 0!==_?_:0,A)]})]}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:A("来自 Chrome 插件/Studio 页面采集","Captured from Studio")})]})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("h5",{className:"text-sm font-semibold text-white",children:A("Studio 状态","Studio status")}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(tD(nR)),children:tA(nR,A)})]}),(0,n.jsxs)("div",{className:"mt-3 space-y-2 text-sm text-zinc-300",children:[(0,n.jsx)("p",{children:nR.last_live_status||nR.last_health||A("暂未采集到 Studio 状态","No Studio status captured yet")}),nR.last_popup_text?(0,n.jsx)("p",{className:"rounded-md border border-amber-500/20 bg-amber-500/[0.08] px-3 py-2 text-xs text-amber-100",children:nR.last_popup_text}):(0,n.jsx)("p",{className:"text-xs text-zinc-600",children:A("没有记录到弹窗。","No popup recorded.")}),nR.last_page_title||nR.last_page_url?(0,n.jsx)("p",{className:"truncate text-xs text-zinc-500",children:nR.last_page_title||nR.last_page_url}):null]}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[nR.source_url?(0,n.jsxs)("a",{href:nR.source_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-lg bg-violet-500/15 px-2.5 py-1.5 text-xs text-violet-100 ring-1 ring-violet-500/25",children:[A("打开源直播间","Open source")," ",(0,n.jsx)(K.Z,{className:"h-3 w-3"})]}):null,nR.last_page_url?(0,n.jsxs)("a",{href:nR.last_page_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-lg bg-cyan-500/15 px-2.5 py-1.5 text-xs text-cyan-100 ring-1 ring-cyan-500/25",children:[A("打开 Studio","Open Studio")," ",(0,n.jsx)(K.Z,{className:"h-3 w-3"})]}):null]})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsx)("h5",{className:"text-sm font-semibold text-white",children:A("采样时间线","Telemetry timeline")}),(0,n.jsxs)("div",{className:"mt-3 max-h-64 space-y-2 overflow-auto pr-1",children:[nL.slice(0,10).map(e=>(0,n.jsxs)("div",{className:"rounded-md border border-white/[0.05] bg-black/25 px-3 py-2",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[(0,n.jsx)("span",{className:"text-zinc-400",children:tI(e.ts)}),(0,n.jsx)("span",{className:"text-zinc-600",children:e.source||A("采样","sample")})]}),(0,n.jsxs)("p",{className:"mt-1 text-sm text-zinc-200",children:[e.live_status||e.health||A("状态未识别","Unknown status"),(0,n.jsxs)("span",{className:"ml-2 text-xs text-zinc-500",children:[A("在线","online")," ",tT(e.viewer_count,A)]})]}),e.popup_text?(0,n.jsx)("p",{className:"mt-1 text-xs text-amber-100",children:e.popup_text}):null]},e.id)),nL.length?null:(0,n.jsx)("p",{className:"rounded-md border border-white/[0.05] bg-black/20 px-3 py-3 text-xs text-zinc-500",children:eX?A("这场直播暂时没有采样明细。","No telemetry samples for this event yet."):A("点击左侧记录后加载完整采样明细。","Click a record on the left to load full telemetry samples.")})]})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsxs)("h5",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(eg.Z,{className:"h-4 w-4 text-amber-300"}),A("告警和弹窗","Alerts and popups")]}),(0,n.jsxs)("div",{className:"mt-3 space-y-2",children:[nP.slice(0,4).map((e,t)=>(0,n.jsxs)("p",{className:"rounded-md border border-amber-500/15 bg-amber-500/[0.06] px-3 py-2 text-xs text-amber-100",children:[e.title||e.severity||A("提示","Notice"),": ",e.message||"-"]},"".concat(e.id||t))),nP.length?null:(0,n.jsx)("p",{className:"text-xs text-zinc-600",children:A("没有告警。","No alerts.")})]})]}),(0,n.jsxs)("p",{className:"truncate text-[11px] text-zinc-700",children:[A("技术标识","Technical id"),": #",nR.id," \xb7 ",nR.process||"-"," \xb7 ",nR.event_uuid||"-"]})]}):(0,n.jsxs)("div",{className:"flex min-h-[24rem] flex-col items-center justify-center text-center",children:[(0,n.jsx)(e5.Z,{className:"h-10 w-10 text-zinc-700"}),(0,n.jsx)("p",{className:"mt-3 text-sm font-medium text-zinc-300",children:A("等待第一场直播","Waiting for the first live event")}),(0,n.jsx)("p",{className:"mt-1 max-w-sm text-xs text-zinc-600",children:A("开始转播后,这里会变成这场直播的详情页。","After a relay starts, this panel becomes the event detail page.")})]})})]})]}),nE=(null==te?void 0:te.summary)||{},nU=(null==te?void 0:te.lanes)||[],nZ=(null==te?void 0:te.recommendations)||[],nI=(0,n.jsxs)("section",{className:"rounded-2xl border border-emerald-500/20 bg-gradient-to-br from-emerald-500/[0.08] via-zinc-950/90 to-cyan-500/[0.06] p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-base font-semibold text-white",children:[(0,n.jsx)(a.Z,{className:"h-5 w-5 text-emerald-300"}),A("算法友好质量守护","Algorithm-friendly quality guard")]}),(0,n.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-zinc-400",children:A("目标不是刷数据,而是让直播信号长期稳定:不断流、不卡顿、Studio 状态可见、异常能追踪。","The goal is stable, policy-safe signal quality: no drops, no stalls, visible Studio state, and traceable issues.")})]}),(0,n.jsxs)("button",{type:"button",onClick:()=>void s3(),className:"inline-flex items-center gap-2 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-2 text-xs text-zinc-200 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(ta?"animate-spin":"")}),A("重新检测","Check now")]})]}),(0,n.jsxs)("div",{className:"mt-5 grid gap-3 md:grid-cols-[12rem_minmax(0,1fr)]",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/30 p-4",children:[(0,n.jsx)("p",{className:"text-xs text-zinc-500",children:A("综合分","Score")}),(0,n.jsx)("p",{className:"mt-2 text-5xl font-semibold tracking-tight ".concat(tO(null==te?void 0:te.score)),children:null!==(z=null==te?void 0:te.score)&&void 0!==z?z:0}),(0,n.jsx)("p",{className:"mt-2 text-[11px] text-zinc-600",children:A("80 以上适合长时间无人值守","80+ is suitable for long unattended runs")})]}),(0,n.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[[A("推流线路","Lanes"),"".concat(null!==(C=nE.pushing_lanes)&&void 0!==C?C:0,"/").concat(null!==(R=nE.lanes)&&void 0!==R?R:0)],[A("活动事件","Active events"),String(null!==(L=nE.active_events)&&void 0!==L?L:0)],[A("Studio 采样","Studio samples"),String(null!==(P=nE.sample_count)&&void 0!==P?P:0)],[A("最高在线","Viewer peak"),tT(null!==(M=nE.viewer_peak)&&void 0!==M?M:0,A)]].map(e=>{let[t,s]=e;return(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsx)("p",{className:"text-xs text-zinc-500",children:t}),(0,n.jsx)("p",{className:"mt-2 text-2xl font-semibold text-white",children:s})]},t)})})]}),(0,n.jsxs)("div",{className:"mt-5 grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(20rem,0.8fr)]",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25",children:[(0,n.jsxs)("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[(0,n.jsx)("h4",{className:"text-sm font-semibold text-white",children:A("线路质量","Lane quality")}),(0,n.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:A("从进程、FFmpeg 日志、配置和事件采样综合判断。","Combined from process state, FFmpeg logs, config, and event telemetry.")})]}),(0,n.jsxs)("div",{className:"divide-y divide-white/[0.06]",children:[nU.map(e=>{var t,s,l,i,a,r,o,c,d;let x=(e.source_display||e.source_title||"").trim()||e.label||e.process||"-",u=[e.label,e.process].filter(Boolean).join(" \xb7 ");return(0,n.jsxs)("div",{className:"grid gap-3 px-4 py-4 md:grid-cols-[minmax(0,1fr)_6rem_14rem]",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("p",{className:"truncate text-sm font-semibold text-white",children:x}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(e.is_pushing?"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"),children:e.is_pushing?A("推流中","Pushing"):A("未推流","Idle")}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(e.rtmps?"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25":"bg-amber-500/15 text-amber-100 ring-amber-500/25"),children:e.rtmps?"RTMPS":A("非 RTMPS","No RTMPS")})]}),(0,n.jsx)("p",{className:"mt-1 truncate text-xs text-zinc-600",children:u||"-"}),(0,n.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:(e.issues||[]).slice(0,3).map((e,t)=>(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tB(e.level)),children:e.text||e.level},"".concat(e.text||t)))})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:A("分数","Score")}),(0,n.jsx)("p",{className:"mt-1 text-2xl font-semibold ".concat(tO(e.score)),children:null!==(r=e.score)&&void 0!==r?r:0})]}),(0,n.jsxs)("div",{className:"grid grid-cols-3 gap-2 font-mono text-[11px] text-zinc-300",children:[(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"fps"}),tW(null===(t=e.metrics)||void 0===t?void 0:t.fps)]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"speed"}),tW(null===(s=e.metrics)||void 0===s?void 0:s.speed,"x")]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"kbps"}),tW(null===(l=e.metrics)||void 0===l?void 0:l.bitrate)]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"drop"}),null!==(o=null===(i=e.metrics)||void 0===i?void 0:i.drop)&&void 0!==o?o:"-"]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"urls"}),null!==(c=e.url_count)&&void 0!==c?c:0]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"err"}),null!==(d=null===(a=e.metrics)||void 0===a?void 0:a.error_count)&&void 0!==d?d:0]})]})]},e.process||e.label)}),nU.length?null:(0,n.jsx)("div",{className:"px-4 py-8 text-center text-sm text-zinc-500",children:A("没有发现 YouTube 线路。","No YouTube lanes found.")})]})]}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsx)("h4",{className:"text-sm font-semibold text-white",children:A("下一步建议","Next actions")}),(0,n.jsxs)("div",{className:"mt-3 space-y-2",children:[nZ.slice(0,6).map((e,t)=>(0,n.jsx)("p",{className:"rounded-lg px-3 py-2 text-xs ring-1 ".concat(tB(e.level)),children:e.text||"-"},"".concat(e.text||t))),nZ.length?null:(0,n.jsx)("p",{className:"text-xs text-zinc-600",children:A("暂无建议。","No recommendations.")})]})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsx)("h4",{className:"text-sm font-semibold text-white",children:"FFmpeg"}),(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-400",children:(null==te?void 0:null===(o=te.ffmpeg_profile)||void 0===o?void 0:o.target)||"1080p30 / RTMPS / AAC / stable relay"}),(0,n.jsx)("ul",{className:"mt-3 space-y-1.5 text-xs text-zinc-500",children:((null==te?void 0:null===(d=te.ffmpeg_profile)||void 0===d?void 0:d.guardrails)||[]).slice(0,4).map(e=>(0,n.jsxs)("li",{children:["- ",e]},e))})]})]})]})]}),nA=(0,n.jsxs)("section",{className:"rounded-2xl border border-white/[0.08] bg-gradient-to-br from-zinc-950/95 via-zinc-950/80 to-violet-500/[0.06] p-5 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,n.jsxs)("div",{className:"relative mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-black/40 ring-1 ring-white/10",children:[(0,n.jsx)(Y.Z,{className:"h-5 w-5 ".concat(ni?"text-emerald-300":"text-zinc-500")}),ni?(0,n.jsxs)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3 w-3",children:[(0,n.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-60"}),(0,n.jsx)("span",{className:"relative inline-flex h-3 w-3 rounded-full bg-emerald-400"})]}):null]}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:A("转播实况","Relay snapshot")}),(0,n.jsx)("span",{className:"rounded-full px-2.5 py-0.5 text-[11px] font-medium ring-1 ".concat(tC(sp)),children:tS(sp,A)}),ni?(0,n.jsx)("span",{className:"rounded-full bg-emerald-500/15 px-2.5 py-0.5 text-[11px] text-emerald-100 ring-1 ring-emerald-500/25",children:A("正在推流","Pushing")}):null]}),(0,n.jsx)("p",{className:"mt-1 truncate text-sm text-zinc-300",children:no||A("未配置抖音直播源","No Douyin source configured")}),(0,n.jsxs)("p",{className:"mt-1 font-mono text-[11px] text-zinc-600",children:[B||"—","pro"===ei&&nm>0?" \xb7 ".concat(nm,"/").concat(er.length," ").concat(A("路推流中","lanes pushing")):""]})]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[nc?(0,n.jsxs)("a",{href:nc,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg border border-violet-500/25 bg-violet-500/10 px-3 py-1.5 text-xs text-violet-100 ring-1 ring-violet-500/20 hover:bg-violet-500/15",children:[(0,n.jsx)(K.Z,{className:"h-3.5 w-3.5"}),A("打开源站","Open source")]}):null,sG.link?(0,n.jsxs)("a",{href:sq,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg border border-emerald-500/25 bg-emerald-500/10 px-3 py-1.5 text-xs text-emerald-100 ring-1 ring-emerald-500/20 hover:bg-emerald-500/15",children:[(0,n.jsx)(K.Z,{className:"h-3.5 w-3.5"}),A("Studio","Studio")]}):null,(0,n.jsxs)("button",{type:"button",onClick:()=>void(null==ee||ee()),className:"inline-flex items-center gap-1.5 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5"}),A("刷新全局","Refresh")]})]})]}),(0,n.jsx)("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-7",children:[{label:A("FFmpeg 速度","FFmpeg speed"),value:nh?"".concat(nh,"x"):"—",warn:null==sp?void 0:sp.ffmpeg_speed_low,helper:nb||A("等待进程上报","Waiting for metrics")},{label:A("编码帧","Encoded frame"),value:null!=np?np:"—",warn:null==sp?void 0:sp.ffmpeg_progress_stalled,helper:(null==sp?void 0:sp.ffmpeg_active)?A("Worker 活跃","Worker active"):A("无活跃 Worker","No active worker")},{label:A("码率","Bitrate"),value:null!=ng?ng:"—",warn:!1,helper:(null==nx?void 0:nx.fps)!=null?"".concat(nx.fps," fps"):A("质量守护采样","Quality guard")},{label:A("质量分","Quality score"),value:null!=nu?String(nu):"—",warn:null!=nu&&nu<55,helper:A("当前线路综合评估","Current lane score")},{label:A("活动场次","Active events"),value:String(s5),warn:!1,helper:A("本地事件库","Local event store")},{label:A("抖音地址","Douyin URLs"),value:String(sF),warn:0===sF,helper:"".concat(sH," ").concat(A("条有效地址","valid URLs"))},{label:A("密钥尾码","Key suffix"),value:sA,warn:!sI,helper:nv}].map(e=>{let{label:t,value:s,warn:l,helper:i}=e;return(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3 min-w-0",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:t}),(0,n.jsx)("p",{className:"mt-1 text-xl font-semibold tracking-tight ".concat(l?"text-amber-200":"text-white"),children:s}),(0,n.jsx)("p",{className:"mt-1 text-[10px] text-zinc-600",children:i})]},t)})}),na&&ni?(0,n.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-3 rounded-xl border border-cyan-500/20 bg-cyan-500/[0.06] px-4 py-3 text-xs",children:[(0,n.jsx)("span",{className:"font-medium text-cyan-100",children:A("本场直播","This event")}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 ring-1 ".concat(tP(na.status)),children:tM(na.status,A)}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 ring-1 ".concat(tD(na)),children:tA(na,A)}),(0,n.jsxs)("span",{className:"text-zinc-400",children:[A("观众","Viewers")," ",tT(na.last_viewer_count,A)," \xb7 ",tZ(na.duration_seconds,A)]}),na.last_popup_text?(0,n.jsxs)("span",{className:"text-amber-200",children:[A("弹窗","Popup"),": ",na.last_popup_text]}):null]}):null]});return(0,n.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6",children:[Q?(0,n.jsx)(ep,{t:A,title:A("YouTube 转播链路","YouTube relay chain"),subtitle:A("与「网络」页相同风格的链路示意:代理 → 编码推流 → 浏览器侧操作工作室。","Same visual language as Network: proxy → encode → browser studio."),onNavigate:Q,steps:[{label:"ShellCrash",sub:A("透明代理","Proxy"),gradient:"from-violet-500 to-fuchsia-500",target:"network"},{label:"FFmpeg",sub:A("推流 / 转码","Stream"),gradient:"from-cyan-400 to-blue-500",target:"live_youtube"},{label:"Neko",sub:sG.link?"".concat(A("Chromium 工作室","Chromium studio")," \xb7 ").concat(sG.link.label):A("Chromium 工作室","Chromium studio"),gradient:"from-emerald-400 to-teal-500",openUrl:sq}]}):null,(0,n.jsx)("div",{className:"rounded-2xl border border-violet-500/25 bg-gradient-to-br from-violet-500/[0.12] via-zinc-950/80 to-cyan-500/5 p-6 shadow-xl shadow-violet-900/10",children:(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-red-500/30 to-violet-600/30 ring-1 ring-white/10",children:(0,n.jsx)(c.Z,{className:"h-5 w-5 text-red-200"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold tracking-tight text-white",children:A("YouTube 无人直播","YouTube unmanned live")}),(0,n.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:A("单路一条流;多路时每条线路独立保存自己的密钥、URL 列表和 PM2 任务。填好后保存,再点「开始」。Neko 浏览器仅作辅助工作室,不再阻塞推流。","Single lane or multi-lane: every lane keeps its own key, URL list, and PM2 task. Save, then Start. Neko is optional browser tooling and no longer blocks streaming.")})]})]}),(0,n.jsxs)("div",{className:"ml-auto flex shrink-0 self-start rounded-xl border border-white/10 bg-black/30 p-1 ".concat(""),"aria-hidden":!1,children:[(0,n.jsx)("button",{type:"button",onClick:()=>sR("single"),className:"rounded-lg px-4 py-2 text-xs font-medium transition ".concat("single"===ei?"bg-violet-500/25 text-white":"text-zinc-500 hover:text-zinc-300"),children:A("单频道","Single")}),(0,n.jsx)("button",{type:"button",onClick:()=>sR("pro"),className:"rounded-lg px-4 py-2 text-xs font-medium transition ".concat("pro"===ei?"bg-violet-500/25 text-white":"text-zinc-500 hover:text-zinc-300"),children:A("多频道 Pro","Multi Pro")})]})]})}),nA,sJ.length?(0,n.jsxs)("div",{className:"space-y-2",children:[tJ?(0,n.jsx)("p",{className:"text-xs text-zinc-400",children:tJ}):null,(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[sG.link?(0,n.jsx)("a",{href:sq,target:"_blank",rel:"noreferrer",className:"rounded-lg border border-emerald-500/20 bg-emerald-500/10 px-3 py-2 text-xs text-emerald-100 ring-1 ring-emerald-500/20",children:A("打开当前线路 Neko 工作室","Open lane Neko studio")}):null,sY.length?(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:sY.map(e=>ny(e))}):null,(null==et?void 0:et.chromium_remote_debug)?(0,n.jsx)("a",{href:(0,eh.p)(et.chromium_remote_debug),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-2 text-xs text-cyan-100 ring-1 ring-cyan-500/20",children:A("打开 Chromium 调试","Open Chromium debug")}):null,(null==et?void 0:et.srs_api)?(0,n.jsx)("a",{href:(0,eh.p)(et.srs_api),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-violet-500/20 bg-violet-500/10 px-3 py-2 text-xs text-violet-100 ring-1 ring-violet-500/20",children:A("打开 SRS API","Open SRS API")}):null]})]}):null,(0,n.jsxs)("div",{className:"rounded-2xl border border-amber-500/20 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-amber-200/90",children:[(0,n.jsx)(Y.Z,{className:"h-4 w-4"}),(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:A("直播开关","Live control")})]}),"single"===ei?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:A("转播任务","Relay task")}),(0,n.jsxs)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:B,onChange:e=>{let t=e.target.value;t5.current=t,W(t),sS(t)},children:[B&&!en.some(e=>e.pm2===B)?(0,n.jsxs)("option",{value:B,children:[sx?"".concat(sx.name||sx.id," (").concat(B,")"):B,sh?" (".concat(tS(sh,A),")"):""]}):null,en.map(e=>(0,n.jsxs)("option",{value:e.pm2,children:[function(e,t){let s=tg(e.script).toLowerCase();return s.startsWith("douyin_youtube")?t("抖音→YouTube","Douyin → YouTube"):s.startsWith("youtube")?t("YouTube","YouTube"):e.label}(e,A)," (",e.pm2,")"]},e.pm2))]}),(0,n.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[(0,n.jsx)(tF,{kind:"start",targetPm2:B,busy:D,online:nn,label:A("开始直播","Start"),className:"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30",baseLock:!1,onRun:()=>q("start",B),notify:X,t:A}),(0,n.jsx)(tF,{kind:"stop",targetPm2:B,busy:D,online:nn,label:A("停止直播","Stop"),className:"bg-rose-500/15 text-rose-200 ring-rose-500/25",baseLock:!1,onRun:()=>q("stop",B),notify:X,t:A}),(0,n.jsx)(tF,{kind:"restart",targetPm2:B,busy:D,online:nn,label:A("重新开始","Restart"),className:"bg-amber-500/15 text-amber-200 ring-amber-500/25",baseLock:!1,onRun:()=>q("restart",B),notify:X,t:A})]}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-2 text-xs",children:[(0,n.jsx)("span",{className:"rounded-full px-2.5 py-0.5 font-medium ring-1 ".concat(tC(ne)),children:tS(ne,A)}),"number"==typeof(null==ne?void 0:ne.ffmpeg_speed)?(0,n.jsxs)("span",{className:"font-mono text-zinc-400 ".concat(ne.ffmpeg_speed_low?"text-amber-300":""),children:["speed ",ne.ffmpeg_speed.toFixed(2),"x"]}):null,"number"==typeof(null==ne?void 0:ne.ffmpeg_frame)?(0,n.jsxs)("span",{className:"font-mono text-zinc-400 ".concat(ne.ffmpeg_progress_stalled?"text-rose-300":""),children:["frame ",ne.ffmpeg_frame]}):null]})]}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"mt-4 rounded-xl border border-cyan-500/25 bg-gradient-to-br from-cyan-500/[0.1] via-zinc-950/50 to-violet-500/[0.06] p-4 ring-1 ring-white/[0.04]",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-200/90",children:A("Pro 转播实况","Pro relay status")}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:A("对齐桌面端:每路独立 URL / youtube 配置文件;点左侧信息切换编辑,右侧控制进程。","Per-lane config files like desktop; click row info to edit, use right-side controls for PM2.")}),sV?(0,n.jsxs)("p",{className:"mt-2 text-[11px] text-zinc-500",children:[A("Neko 实例","Neko instances"),": ",sV]}):null,(0,n.jsx)("div",{className:"mt-3 max-h-[min(24rem,55vh)] space-y-2 overflow-y-auto pr-1",children:er.map(e=>{var t,s,l,i;let a=ti(e),r=su(a),o=sm(a),c=ec===e.id,d=c?eM:(null!==(t=e.urlLines)&&void 0!==t?t:"").trim(),x=c?null!==(l=null!==(s=null==sy?void 0:sy.streamKey)&&void 0!==s?s:e.streamKey)&&void 0!==l?l:"":null!==(i=e.streamKey)&&void 0!==i?i:"",u=tK(d),m=ej(d),h=t_(r,d),p=ew("key = ".concat(x)),g=tz(o),b=er.findIndex(t=>t.id===e.id),f=(0,e6.U_)(sY,b).link,v=tt(e.name,b>=0?b:0),y=tk(r,d),w="number"==typeof(null==r?void 0:r.ffmpeg_speed)?"speed ".concat(r.ffmpeg_speed.toFixed(2),"x"):"",j="number"==typeof(null==r?void 0:r.ffmpeg_frame)?"frame ".concat(r.ffmpeg_frame):"";return(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-lg border px-3 py-2.5 text-left text-xs transition sm:flex-nowrap ".concat(c?"border-violet-500/45 bg-violet-500/[0.1]":"border-white/10 bg-black/30 hover:border-white/18"),children:[(0,n.jsxs)("button",{type:"button",className:"min-w-0 flex-1 text-left",onClick:()=>{t5.current=ti(e),sL(e)},children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"font-medium text-zinc-100",children:y||A("未配置抖音直播源","No Douyin source")}),(0,n.jsx)("span",{className:"shrink-0 rounded-md px-2 py-0.5 text-[10px] font-medium ring-1 ".concat(tC(r)),children:tS(r,A)}),f?(0,n.jsxs)("span",{className:"shrink-0 rounded-md bg-emerald-500/15 px-2 py-0.5 text-[10px] font-medium text-emerald-100 ring-1 ring-emerald-500/25",children:[f.label," \xb7 ",f.accessLabel]}):null]}),(0,n.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 font-mono text-[10px] text-zinc-500",children:[(0,n.jsxs)("span",{title:v,children:[A("线路","Lane")," ",v]}),(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsxs)("span",{children:["key …",p||"—"]}),(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsx)("span",{className:"truncate",title:a,children:a}),(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsxs)("span",{children:["URL ",u.length]}),(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsxs)("span",{children:["DY ",m.length]}),w?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsx)("span",{className:(null==r?void 0:r.ffmpeg_speed_low)?"text-amber-300":"text-zinc-500",children:w})]}):null,j?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsx)("span",{className:(null==r?void 0:r.ffmpeg_progress_stalled)?"text-rose-300":"text-zinc-500",children:j})]}):null]}),h?(0,n.jsx)("a",{href:h,target:"_blank",rel:"noreferrer",className:"mt-1 block max-w-full truncate text-cyan-300/90 underline-offset-2 hover:underline",onClick:e=>e.stopPropagation(),title:h,children:y?"".concat(A("打开源站","Open source")," \xb7 ").concat(h.replace(/^https?:\/\//,"")):h.replace(/^https?:\/\//,"")}):(0,n.jsx)("span",{className:"mt-1 block text-zinc-600",children:"—"})]}),(0,n.jsxs)("div",{className:"flex w-full shrink-0 flex-wrap items-center justify-end gap-1.5 sm:w-auto",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,n.jsx)(tF,{kind:"start",targetPm2:a,busy:D,online:g,label:A("开始","Start"),className:"rounded-lg bg-emerald-500/20 text-emerald-100 ring-emerald-500/30",baseLock:!1,onRun:()=>void sQ("start",a),notify:X,t:A,compact:!0}),(0,n.jsx)(tF,{kind:"stop",targetPm2:a,busy:D,online:g,label:A("停止","Stop"),className:"rounded-lg bg-rose-500/15 text-rose-100 ring-rose-500/25",baseLock:!1,onRun:()=>void sQ("stop",a),notify:X,t:A,compact:!0}),(0,n.jsx)(tF,{kind:"restart",targetPm2:a,busy:D,online:g,label:A("重新开始","Restart"),className:"rounded-lg bg-amber-500/15 text-amber-100 ring-amber-500/25",baseLock:!1,onRun:()=>void sQ("restart",a),notify:X,t:A,compact:!0}),f?(0,n.jsxs)("button",{type:"button",onClick:()=>{window.open((0,eh.p)(f.url),"_blank","noopener,noreferrer")},className:"inline-flex min-h-[2rem] items-center justify-center rounded-lg border border-emerald-500/25 bg-emerald-500/10 px-2.5 py-1.5 text-emerald-100 ring-1 ring-emerald-500/20 transition hover:bg-emerald-500/20",title:"".concat(A("打开该线路 Neko 工作室","Open this lane's Neko studio")," \xb7 ").concat(f.label).concat(f.port?" :".concat(f.port):""),"aria-label":"".concat(A("打开该线路 Neko 工作室","Open this lane's Neko studio")," \xb7 ").concat(f.label),children:[(0,n.jsx)("span",{className:"sr-only",children:A("打开该线路 Neko 工作室","Open this lane's Neko studio")}),(0,n.jsx)("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"\uD83D\uDC31"}),(0,n.jsx)(K.Z,{className:"ml-1 h-3.5 w-3.5 shrink-0","aria-hidden":!0})]}):null]})]},e.id)})})]})})]}),(0,n.jsx)(eP,{t:A,currentProc:B,fetchJson:J,urlListText:nr,keySuffixUi:sI,showKeyRow:!0,pollMs:ns,refreshToken:eq,monitorRow:null!=sp?sp:void 0}),nI,nT||nS,(0,n.jsxs)("section",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 ring-1 ring-white/[0.03]",children:[(0,n.jsxs)("div",{className:"border-b border-white/[0.06] px-6 py-4",children:[(0,n.jsxs)("h3",{className:"text-sm font-semibold text-white",children:[A("配置与地址","Config and URLs"),nf?(0,n.jsx)("span",{className:"ml-2 rounded-md bg-amber-500/15 px-2 py-0.5 text-[10px] font-medium text-amber-100 ring-1 ring-amber-500/25",children:A("待完善","Needs setup")}):null]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:A("密钥、youtube.ini、URL 列表","Keys, youtube.ini, URL list")})]}),(0,n.jsxs)("div",{className:"space-y-6 p-6 pt-4",children:["single"===ei?(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:A("YouTube 相关设置","YouTube settings")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:A("串流参数写进 youtube.ini,无需 Google 登录。","Stream settings go to youtube.ini — no Google login.")}),(0,n.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,n.jsx)("label",{className:"block text-xs text-zinc-400",children:A("串流密钥","Stream key")}),(0,n.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm font-mono text-zinc-200",spellCheck:!1,autoComplete:"off",value:ef.key,onChange:e=>eN(t=>({...t,key:e.target.value})),placeholder:"xxxx-xxxx-xxxx-xxxx-xxxx"}),(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-3",children:[(0,n.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-zinc-400",children:["RTMPS",(0,n.jsxs)("select",{className:"rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-sm text-white",value:ef.rtmps?"1":"0",onChange:e=>eN(t=>({...t,rtmps:"1"===e.target.value})),children:[(0,n.jsx)("option",{value:"1",children:A("是(默认)","Yes")}),(0,n.jsx)("option",{value:"0",children:A("否 → RTMP","No")})]})]}),(0,n.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-zinc-400",children:[A("比特率 kbps","Bitrate kbps"),(0,n.jsx)("input",{className:"rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-sm",value:ef.bitrate,onChange:e=>eN(t=>({...t,bitrate:e.target.value})),placeholder:"4000"})]}),(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 pt-6 text-xs text-zinc-300",children:[(0,n.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:ef.fastAudio,onChange:e=>eN(t=>({...t,fastAudio:e.target.checked}))}),"fast_audio(",A("轻量音频","lighter audio"),")"]})]})]}),(0,n.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,n.jsxs)("button",{type:"button",disabled:s8,onClick:()=>void sP(),className:"inline-flex items-center gap-2 rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-200",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(ez?"animate-spin":"")}),A("重新读取","Reload")]}),(0,n.jsxs)("button",{type:"button",disabled:s8,onClick:()=>void sU(),className:"inline-flex items-center gap-2 rounded-xl bg-violet-500/25 px-4 py-2 text-sm font-medium text-violet-100 ring-1 ring-violet-500/35",children:[ez?(0,n.jsx)(y.Z,{className:"h-4 w-4 animate-spin"}):null,A("保存 youtube.ini","Save youtube.ini")]}),(0,n.jsx)("button",{type:"button",disabled:s8,onClick:()=>void sZ(),className:"rounded-xl border border-cyan-500/20 bg-cyan-500/10 px-4 py-2 text-sm text-cyan-100",children:A("平衡预设","Balanced preset")}),(0,n.jsx)("button",{type:"button",disabled:s8,onClick:()=>{eN(eS(em)),e_(A("已从下方原文同步到表单","Synced from raw"))},className:"rounded-xl border border-white/10 px-4 py-2 text-sm text-zinc-400",children:A("从原文同步表单","Parse raw")})]}),(0,n.jsxs)("details",{className:"mt-4 rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,n.jsx)("summary",{className:"cursor-pointer text-xs text-zinc-500",children:A("高级:youtube.ini 原文","Raw youtube.ini")}),(0,n.jsx)("textarea",{className:"mt-2 h-36 w-full resize-y rounded-lg border border-white/10 bg-black/50 p-3 font-mono text-[11px] text-zinc-400",value:em,onChange:e=>eb(e.target.value),spellCheck:!1}),(0,n.jsx)("button",{type:"button",disabled:s8,className:"mt-2 rounded-lg bg-cyan-500/15 px-3 py-1.5 text-xs text-cyan-200",onClick:()=>void sE(em),children:A("保存原文","Save raw")})]}),ek?(0,n.jsx)("p",{className:"mt-2 font-mono text-xs text-zinc-500",children:ek}):null]}):(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"text-sm font-semibold text-white",children:[A("当前线路","Current lane"),sd?(0,n.jsxs)("span",{className:"ml-2 font-normal text-zinc-400",children:["\xb7 ",nl||A("未配置抖音直播源","No Douyin source")]}):null,sz?(0,n.jsx)("span",{className:"ml-2 rounded-md bg-amber-500/15 px-2 py-0.5 text-[10px] font-medium text-amber-100 ring-1 ring-amber-500/25",children:A("有未保存修改","Unsaved")}):null]}),sd?(0,n.jsxs)("p",{className:"mt-0.5 font-mono text-[11px] text-zinc-500",children:[A("配置名","Config"),": ",tt(sd.name,Math.max(0,er.findIndex(e=>e.id===sd.id)))," \xb7 PM2: ",sj,sk?" → ".concat(sN):""," \xb7 ","key ",A("尾码","suffix"),": ",sA]}):null]}),(0,n.jsxs)("button",{type:"button",disabled:s9,className:"inline-flex items-center gap-1 rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs text-violet-100 ring-1 ring-violet-500/30",onClick:()=>{let e=tu(),t={id:e,name:"".concat(A("线路","Ch")," ").concat(er.length+1),streamKey:"",urlLines:"",pm2Name:tm(e),notes:""};eK(s=>({...s,[e]:tw(t)})),sv([...er,t],{force:!0}),ed(e),t5.current=ti(t),W(t5.current),se(""),t2.current+=1,t3.current+=1,tX.current=!1,eb(""),eN(eS("")),eB(A("新线路已切换,地址列表为空","New lane selected with an empty URL list"))},children:[(0,n.jsx)(e4.Z,{className:"h-3.5 w-3.5"}),A("新增线路","Add lane")]})]}),sd?(0,n.jsxs)("div",{className:"mt-4 space-y-3 border-t border-white/5 pt-4",children:[(0,n.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-3 py-2 text-sm",value:null!==(T=null==sy?void 0:sy.name)&&void 0!==T?T:"",onChange:e=>sw("name",e.target.value),placeholder:A("线路名称","Lane name")}),(0,n.jsx)("label",{className:"block text-xs text-zinc-500",children:A("串流密钥","Stream key")}),(0,n.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-3 py-2 font-mono text-sm",spellCheck:!1,value:null!==(E=null==sy?void 0:sy.streamKey)&&void 0!==E?E:"",onChange:e=>sw("streamKey",e.target.value),placeholder:"xxxx-xxxx… / rtmp(s)://…"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:s9,onClick:()=>void sT(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-100",children:eH?A("保存中...","Saving..."):A("保存线路设置","Save lane")}),(0,n.jsx)("button",{type:"button",disabled:s9,onClick:()=>void sW(),className:"rounded-xl bg-violet-500/25 px-4 py-2 text-sm font-medium text-violet-100 ring-1 ring-violet-500/35",children:A("写入 youtube.ini","Write youtube.ini")})]}),s_.ok?null:(0,n.jsx)("p",{className:"text-xs text-rose-300",children:s_.message}),(0,n.jsxs)("details",{className:"rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,n.jsx)("summary",{className:"cursor-pointer text-xs text-zinc-500",children:A("高级:进程名","Advanced: process name")}),(0,n.jsx)("input",{className:"mt-2 w-full rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-xs",value:null!==(U=null==sy?void 0:sy.pm2Name)&&void 0!==U?U:tm(sd.id),onChange:e=>sw("pm2Name",e.target.value),spellCheck:!1,placeholder:"youtube2__…"}),(0,n.jsxs)("p",{className:"mt-2 font-mono text-[11px] text-zinc-500",children:[A("实际生效","Effective"),": ",sN||"—"]}),s_.message&&!s_.ok?(0,n.jsx)("p",{className:"mt-2 text-[11px] text-rose-300",children:s_.message}):null]}),(0,n.jsx)("textarea",{className:"h-16 w-full resize-y rounded-xl border border-white/10 bg-black/40 p-3 text-xs text-zinc-300",value:null!==(I=null==sy?void 0:sy.notes)&&void 0!==I?I:"",onChange:e=>sw("notes",e.target.value),placeholder:A("备注(可选)","Notes (optional)")}),eY?(0,n.jsx)("p",{className:"text-xs text-zinc-400",children:eY}):null,(0,n.jsxs)("button",{type:"button",disabled:s8||er.length<2,className:"inline-flex items-center gap-1 text-xs text-rose-300 hover:text-rose-200 disabled:opacity-30",onClick:()=>{var e,t;let s=er.filter(e=>e.id!==sd.id),n=null!==(e=s[0])&&void 0!==e?e:null;if(eK(e=>{let t={...e};return delete t[sd.id],t}),sv(s,{force:!0}),ed((null==n?void 0:n.id)||""),n){let e=ti(n);t5.current=e,W(e),se((null!==(t=n.urlLines)&&void 0!==t?t:"").trim()),sC(n)}else t5.current="",W(""),se("")},children:[(0,n.jsx)(S.Z,{className:"h-3.5 w-3.5"}),A("删除此线路","Delete lane")]})]}):null]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:A("直播地址列表","URL list")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:A("每条线路独立写入自己的 URL_config..ini,不再复用或回填所谓“全局地址”。","Each lane writes to its own URL_config..ini with no shared global URL draft.")}),(0,n.jsx)("p",{className:"mt-1 font-mono text-[10px] text-zinc-600",children:B?eC(B):"URL_config.ini"}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2 text-[11px]",children:[(0,n.jsxs)("span",{className:"rounded-full border border-cyan-500/20 bg-cyan-500/10 px-2.5 py-1 text-cyan-100",children:[A("有效地址","Valid URLs"),": ",sH]}),(0,n.jsxs)("span",{className:"rounded-full border border-violet-500/20 bg-violet-500/10 px-2.5 py-1 text-violet-100",children:["Douyin: ",sF]})]}),nw,eO?(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:eO}):null,(0,n.jsx)("textarea",{className:"mt-4 min-h-[160px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:eM,onChange:e=>{tX.current=!0,se(e.target.value)},spellCheck:!1,placeholder:"https://live.douyin.com/..."}),(0,n.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:(0,n.jsx)("button",{type:"button",disabled:eH,title:s7||void 0,onClick:()=>void sD(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:A("保存地址","Save URLs")})})]})]}),"single"===ei?(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:A("直播地址列表 \xb7 URL_config.ini","URL_config.ini")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:A("一行一个地址;可自动刷新或手动重新读取。","One URL per line; auto-refresh or reload.")}),(0,n.jsx)("p",{className:"mt-1 font-mono text-[10px] text-zinc-600",children:B?eC(B):"URL_config.ini"}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2 text-[11px]",children:[(0,n.jsxs)("span",{className:"rounded-full border border-cyan-500/20 bg-cyan-500/10 px-2.5 py-1 text-cyan-100",children:[A("有效地址","Valid URLs"),": ",sH]}),(0,n.jsxs)("span",{className:"rounded-full border border-violet-500/20 bg-violet-500/10 px-2.5 py-1 text-violet-100",children:["Douyin: ",sF]})]}),nw,eO?(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:eO}):null,(0,n.jsx)("textarea",{className:"mt-4 min-h-[200px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:ex,onChange:e=>{tX.current=!0,t7(e.target.value)},spellCheck:!1}),(0,n.jsx)("button",{type:"button",disabled:eH,title:s7||void 0,onClick:()=>void sO(),className:"mt-3 rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:A("保存 URL 配置","Save URL config")})]}):null]})]})]})}var tG=s(257);let tq=["dashboard","services","live_youtube","live_tiktok","android","studio","network","settings"],tV=()=>void 0!==tG&&tG.env.NEXT_PUBLIC_API_URL||"";function tJ(e){if(null==e||!Number.isFinite(e))return"—";if(0===e)return"0 B";let t=["B","KB","MB","GB","TB"],s=e,n=0;for(;s>=1024&&n=10||0===n?0:1)," ").concat(t[n])}function t$(e){if(null==e||!Number.isFinite(e))return"—";let t=Math.max(0,Math.floor(e));if(t<60)return"".concat(t,"s");let s=Math.floor(t/60);if(s<60)return"".concat(s,"m");let n=Math.floor(s/60);return n<48?"".concat(n,"h"):"".concat(Math.floor(n/24),"d")}function tX(e){return"online"===e||"running"===e?"bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/30":"configured"===e?"bg-sky-500/15 text-sky-200 ring-1 ring-sky-500/25":"skipped"===e?"bg-slate-500/15 text-slate-300 ring-1 ring-slate-500/30":"stopped"===e||"not_found"===e?"bg-zinc-500/15 text-zinc-400 ring-1 ring-zinc-500/25":"error"===e?"bg-rose-500/15 text-rose-300 ring-1 ring-rose-500/35":"bg-violet-500/15 text-violet-200 ring-1 ring-violet-500/30"}function tQ(e,t){let s=null!=t?t:(e,t)=>t||e,n=(e||"").trim().toLowerCase();return"connected"===n?s("高速可用","Ready"):"configured"===n?s("已配置","Configured"):"detected"===n?s("接口已起","Detected"):"idle"===n?s("等待握手","Idle"):"stale"===n?s("握手过期","Stale"):"down"===n?s("未连接","Down"):e||"—"}function t0(){var e,t,s,C,A,D,O,B,W,K,H,F,Y,G,q,V,$,X,Q,ee,et,es,en,el,ei,ea,er,eo,ec,ex,eu,em,ep,eg,eb,ef,ev,ew,ej,eN,ek,e_,ez,eS,eC,eR,eL,eP,eM,eT,eE,eU,eZ,eA,eD,eO,eB,eW,eK,eH,eF,eY,eG,eq,eV,eJ,e$;let eQ=tV(),[e0,e1]=(0,Z.useState)("zh"),[e5,e2]=(0,Z.useState)("dark"),[e3,e4]=(0,Z.useState)("dashboard"),[e8,e9]=(0,Z.useState)(!1),[e7,te]=(0,Z.useState)(!1),[tt,ts]=(0,Z.useState)(null),[tn,tl]=(0,Z.useState)(null),[ti,ta]=(0,Z.useState)(!0),[tr,to]=(0,Z.useState)(null),[tc,td]=(0,Z.useState)(null),[tx,tu]=(0,Z.useState)(null),[tm,th]=(0,Z.useState)(!0),[tp,tg]=(0,Z.useState)([]),[tb,tf]=(0,Z.useState)([]),[tv,ty]=(0,Z.useState)(""),[tw,tj]=(0,Z.useState)(""),[tN,tk]=(0,Z.useState)("/sdcard/app.apk"),[t_,tz]=(0,Z.useState)(""),[tS,tC]=(0,Z.useState)(null),[tR,tL]=(0,Z.useState)(null),[tP,tM]=(0,Z.useState)(!0),[tT,tE]=(0,Z.useState)(!0),[tU,tZ]=(0,Z.useState)("tencent-relay-wg0"),[tI,tA]=(0,Z.useState)(""),[tD,tO]=(0,Z.useState)(null),[tB,tW]=(0,Z.useState)(null),[tK,tH]=(0,Z.useState)(null),[tF,tG]=(0,Z.useState)(!1),[t0,t1]=(0,Z.useState)(!0),[t5,t2]=(0,Z.useState)("overlay"),[t3,t4]=(0,Z.useState)(""),[t6,t8]=(0,Z.useState)(""),[t9,t7]=(0,Z.useState)(""),[se,st]=(0,Z.useState)("255.255.255.255"),[ss,sn]=(0,Z.useState)("9"),[sl,si]=(0,Z.useState)([]),[sa,sr]=(0,Z.useState)(""),[so,sc]=(0,Z.useState)(""),[sd,sx]=(0,Z.useState)(""),[su,sm]=(0,Z.useState)([]),[sh,sp]=(0,Z.useState)(""),[sg,sb]=(0,Z.useState)("115200"),[sf,sv]=(0,Z.useState)("AT"),[sy,sw]=(0,Z.useState)(""),[sj,sN]=(0,Z.useState)(null),sk=(0,Z.useRef)(null),s_=(0,Z.useRef)(null),sz=(0,Z.useRef)(null),sS=(0,Z.useRef)(tv),sC=(0,Z.useRef)(0),sR=(0,Z.useRef)(null),sL=(0,Z.useCallback)((e,t)=>"zh"===e0?e:t,[e0]),sP=(0,Z.useCallback)(e=>{td(e),null!=sR.current&&window.clearTimeout(sR.current),sR.current=window.setTimeout(()=>{td(null),sR.current=null},2800)},[]),sM=(0,Z.useCallback)(async(e,t)=>(0,J.N)("".concat(eQ).concat(e),t),[eQ]),sT=(0,Z.useCallback)(async()=>{if(s_.current)return s_.current;let e=(async()=>{try{let e=await sM("/stack/summary");ts(t=>({...null!=t?t:{},stack:e})),tl(null),tu(Date.now())}catch(e){tl(e.message)}finally{s_.current=null}})();return s_.current=e,e},[sM]),sE=(0,Z.useCallback)(async()=>{if(sk.current)return sk.current;let e=(async()=>{try{var e;let[t,s]=await Promise.allSettled([sM("/hub/dashboard"),sM("/deploy/check")]);if("fulfilled"!==t.status)throw t.reason;let n=t.value;ts(n),tl(null),tu(Date.now()),"fulfilled"===s.status?tL(s.value):tL(null);let l=(null===(e=n.android)||void 0===e?void 0:e.devices)||[];if(l.length&&!t_){let e=l.find(e=>"device"===(e.state||"").toLowerCase());tz((null!=e?e:l[0]).serial)}}catch(e){tl(e.message),tL(null)}finally{ta(!1),sk.current=null}})();return sk.current=e,e},[t_,sM]),sU=(0,Z.useMemo)(()=>{let e=new URLSearchParams({light:"1"});return"live_youtube"===e3?e.set("family","youtube"):"live_tiktok"===e3&&e.set("family","tiktok"),"/process_monitor?".concat(e.toString())},[e3]),sZ=(0,Z.useMemo)(()=>ey(tb),[tb]),sI=(0,Z.useMemo)(()=>(function(e){if(!e.pageVisible)return 3e4;if("live_youtube"===e.view||"live_tiktok"===e.view)switch(e.activity){case"hot":return 800;case"warm":return 2500;default:return 5e3}return 4e3})({view:e3,activity:sZ,pageVisible:tm}),[e3,sZ,tm]),sA=(0,Z.useCallback)(async()=>{if(sz.current)return sz.current;let e=(async()=>{try{let e=(await sM(sU)).entries||[];tf(e),tg(e.map(e=>({pm2:e.pm2,script:e.script,label:e.label}))),tu(Date.now()),ty(t=>!e.length||t&&e.some(e=>e.pm2===t)?t:e[0].pm2)}catch(e){}finally{sz.current=null}})();return sz.current=e,e},[sM,sU]);(0,Z.useEffect)(()=>{e4(function(){let e=new URLSearchParams(window.location.search).get("view");return e&&tq.includes(e)?e:"/youtube-events"===window.location.pathname.replace(/\/$/,"")?"live_youtube":"dashboard"}()),e9(!0);let e=window.localStorage.getItem("live-hub-lang");("zh"===e||"en"===e)&&e1(e);let t=window.localStorage.getItem("live-hub-theme");("light"===t||"dark"===t)&&e2(t)},[]),(0,Z.useEffect)(()=>{if(!e8)return;let e=new URL(window.location.href);"dashboard"===e3?e.searchParams.delete("view"):e.searchParams.set("view",e3),window.history.replaceState(null,"",e.toString())},[e3,e8]),(0,Z.useEffect)(()=>{window.localStorage.setItem("live-hub-lang",e0)},[e0]),(0,Z.useEffect)(()=>{document.documentElement.setAttribute("data-theme",e5);try{window.localStorage.setItem("live-hub-theme",e5)}catch(e){}},[e5]),(0,Z.useEffect)(()=>{let e=()=>th("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,Z.useEffect)(()=>{if(!e7)return;let e=e=>{"Escape"===e.key&&te(!1)};window.addEventListener("keydown",e);let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",e),document.body.style.overflow=t}},[e7]),(0,Z.useEffect)(()=>()=>{null!=sR.current&&window.clearTimeout(sR.current)},[]),(0,Z.useEffect)(()=>{try{"0"===localStorage.getItem("livehub.autorefresh")&&tM(!1),"0"===localStorage.getItem("livehub.showStreamProbes")&&tE(!1)}catch(e){}},[]),(0,Z.useEffect)(()=>{if(e8){if("live_youtube"===e3||"live_tiktok"===e3){ta(!1),sT();return}sE()}},[sE,sT,e3,e8]),(0,Z.useEffect)(()=>{e8&&sA()},[sA,e8]),(0,Z.useEffect)(()=>{if(!e8||!tP||!tm||"live_youtube"===e3||"live_tiktok"===e3)return;let e=window.setInterval(()=>{sE()},1e4);return()=>clearInterval(e)},[tP,tm,sE,e3,e8]),(0,Z.useEffect)(()=>{if(!e8||!tP)return;let e=window.setInterval(()=>{sA()},sI);return()=>clearInterval(e)},[tP,sI,sA,e8]),(0,Z.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&sA()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[sA]),(0,Z.useEffect)(()=>{sS.current=tv},[tv]),(0,Z.useEffect)(()=>{"settings"===e3&&(async()=>{try{let e=await sM("/hub/config");tC(e)}catch(e){tC(null)}})()},[sM,e3]);let sD=(0,Z.useMemo)(()=>{var e;let t=(null==tt?void 0:null===(e=tt.stack)||void 0===e?void 0:e.quick_links)||{},s={};for(let[e,n]of Object.entries(t))/^https?:\/\//i.test(n)?s[e]=(0,eh.p)(n):s[e]=n;return s},[null==tt?void 0:null===(e=tt.stack)||void 0===e?void 0:e.quick_links]),sO=(0,Z.useMemo)(()=>{let e=new Map;for(let t of(null==tt?void 0:tt.services)||[])e.set(t.service_id,t);return e},[null==tt?void 0:tt.services]),sB=(0,Z.useMemo)(()=>["homeassistant","frigate","ntfy","wol"].map(e=>sO.get(e)).filter(Boolean),[sO]),sW=sO.get("wol"),sK=(0,Z.useMemo)(()=>(0,e6.O0)(sD),[sD]),sH=(0,Z.useMemo)(()=>(0,e6.Tc)(sK),[sK]),sF=(0,Z.useMemo)(()=>((null==tB?void 0:tB.interfaces)||[]).flatMap(e=>e.peers||[]),[null==tB?void 0:tB.interfaces]),sY=(0,Z.useMemo)(()=>((null==tB?void 0:tB.interfaces)||[]).flatMap(e=>e.configured_peers||[]),[null==tB?void 0:tB.interfaces]),sG=(0,Z.useMemo)(()=>((null==tB?void 0:tB.repo_configs)||[]).flatMap(e=>e.peers||[]).map(e=>({...e,status_source:"config",config_source:"repo"})),[null==tB?void 0:tB.repo_configs]),sq=sF[0]||sY[0]||sG[0]||null,sV=(0,Z.useMemo)(()=>{for(let e of[...sF,...sY,...sG]){let t=e.endpoint_host||function(e){let t=(e||"").trim();if(!t)return"";if(t.startsWith("[")){let e=t.indexOf("]");return e>0?t.slice(1,e):""}let s=t.lastIndexOf(":");return s>0?t.slice(0,s):t}(e.endpoint);if(t)return t}return""},[sY,sG,sF]),sJ=(null==tD?void 0:null===(t=tD.windows_route_template)||void 0===t?void 0:t.endpoint_host)||(null==tD?void 0:null===(C=tD.peers)||void 0===C?void 0:null===(s=C.find(e=>e.endpoint_host))||void 0===s?void 0:s.endpoint_host)||sV||"",s$=(0,Z.useMemo)(()=>{if(!sJ)return"";let e=t3.trim()||"",t=t6.trim()||"";return"route -p add ".concat(sJ," mask 255.255.255.255 ").concat(e," metric 1 if ").concat(t)},[sJ,t3,t6]),sX=(0,Z.useCallback)(async()=>{try{var e;let t=await sM("/hub/network/wireguard/status");tW(null!==(e=t.wireguard)&&void 0!==e?e:null)}catch(e){tW(null)}},[sM]),sQ=(0,Z.useCallback)(async()=>{tG(!0);try{let e=await sM("/hub/network/system_probe");tH(null!=e?e:null)}catch(e){tH(null)}finally{tG(!1)}},[sM]);(0,Z.useEffect)(()=>{"network"===e3&&(sX(),sQ())},[sQ,sX,e3]);let s0=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=tI.trim();if(!t){sP(sL("请先选择或粘贴 WireGuard 配置","Pick or paste a WireGuard config first"));return}to(e?"wg:apply":"wg:save");try{var s;let n=await sM("/hub/network/wireguard/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:tU,content:t,route_mode:t5,apply:e})});tO(null!==(s=n.wireguard)&&void 0!==s?s:null),await sX(),sP(e?sL("WireGuard 配置已保存并应用","WireGuard config saved and applied"):sL("WireGuard 配置已保存","WireGuard config saved"))}catch(e){sP(e.message)}finally{to(null)}},s1=async e=>{to("wg:neko:".concat(e));try{await sM("/hub/network/wireguard/neko_access",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,restart:!0})}),await sX(),await sE(),sP("remote"===e?"Neko switched to WireGuard remote access":"Neko switched back to LAN")}catch(e){sP(e.message),await sX()}finally{to(null)}},s5=async()=>{await s0(!1)},s2=async e=>{let t=(e||"").trim();if(t){to("wg:load:".concat(t));try{var s;let e=await sM("/hub/network/wireguard/config/".concat(encodeURIComponent(t)));tZ(e.name||t),tA(e.content||""),tO(null!==(s=e.wireguard)&&void 0!==s?s:null),t1(!0),sP(sL("已载入 WireGuard 配置","WireGuard config loaded"))}catch(e){sP(e.message)}finally{to(null)}}},s3=async e=>{if(e)try{let t=await e.text();tA(t),tU.trim()||tZ(e.name.replace(/\.conf$/i,""))}catch(e){sP(e.message)}},s4=async(e,t)=>{to("svc:".concat(e));try{let s=await sM("/service_action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({service:e,action:t})});"error"===s.status?sP(s.detail||s.message||sL("操作失败","Action failed")):sP(s.message||"OK"),await sE()}catch(e){sP(e.message)}finally{to(null)}},s6=async()=>{let e=t9.trim(),t=se.trim()||"255.255.255.255",s=Number(ss.trim()||"9");if(!e){sP(sL("请输入 MAC 地址","Enter a MAC address"));return}if(!Number.isInteger(s)||s<1||s>65535){sP(sL("端口必须在 1-65535 之间","Port must be 1-65535"));return}to("wol:wake");try{let n=await sM("/studio/wol/wake",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mac:e,broadcast:t,port:s})});sP(n.message||sL("唤醒包已发送","Wake packet sent"))}catch(e){sP(e.message)}finally{to(null)}},s8=(0,Z.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{let t=await sM(e?"/studio/wol/devices/probe":"/studio/wol/devices",e?{method:"POST"}:void 0);si(t.devices||[])}catch(t){e&&sP(t.message)}},[sM,sP]),s9=async()=>{let e=t9.trim();if(!e){sP(sL("请输入 MAC 地址","Enter a MAC address"));return}to("wol:save");try{var t;let s=await sM("/studio/wol/devices",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:so,mac:e,ip:sd})});si(s.devices||[]),sr((null===(t=s.device)||void 0===t?void 0:t.mac)||e),sP(s.message||sL("设备已保存","Device saved"))}catch(e){sP(e.message)}finally{to(null)}},s7=async()=>{let e=(sa||t9).trim();if(e){to("wol:delete");try{let t=await sM("/studio/wol/devices/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mac:e})});si(t.devices||[]),sr(""),t7(""),sc(""),sx(""),sP(sL("设备已删除","Device removed"))}catch(e){sP(e.message)}finally{to(null)}}},ne=(0,Z.useCallback)(async()=>{try{let e=(await sM("/studio/serial/ports")).ports||[];sm(e),sp(t=>{var s;return t&&e.some(e=>e.path===t)?t:(null===(s=e[0])||void 0===s?void 0:s.path)||t})}catch(e){sm([])}},[sM]),nt=(0,Z.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{let t=await sM("/studio/ops/summary".concat(e?"?refresh=1":""));sN(t)}catch(t){e&&sP(t.message)}},[sM,sP]),ns=async()=>{to("studio:snapshot");try{let e=await sM("/studio/ops/snapshot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:"studio"})});await nt(!1),sP(e.message||sL("系统快照已创建","System snapshot created"))}catch(e){sP(e.message)}finally{to(null)}};(0,Z.useEffect)(()=>{if("studio"!==e3)return;s8(!0),nt(!0);let e=window.setInterval(()=>{s8(!0),nt(!1)},3e4);return()=>window.clearInterval(e)},[ne,nt,s8,e3]);let nn=async(e,t)=>{let s=(null!=t?t:tv).trim();if(s){to("proc:".concat(e,":").concat(s));try{let t=await sM("/".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:s})});sP(String(t.output||t.message||"OK")),await sA(),"live_youtube"===e3||"live_tiktok"===e3?sE():await sE()}catch(e){sP(e.message)}finally{to(null)}}},nl=async(e,t)=>{let s=(null!=t?t:tv).trim();if(!s)throw sP(sL("请选择要保存地址的进程","Pick a process before saving URLs")),Error(sL("请选择要保存地址的进程","Pick a process before saving URLs"));let n=null!=e?e:tw,l=++sC.current;to("save:url");try{let e=new URLSearchParams({process:s}),t=await sM("/save_url_config?".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n})});l===sC.current&&s===sS.current.trim()&&tj(n),sP(t.path?sL("URL 配置已保存: ".concat(t.path),"URL config saved: ".concat(t.path)):sL("URL 配置已保存","URL config saved"))}catch(e){throw sP(e.message),e}finally{to(null)}},ni=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t_){sP(sL("请选择设备","Pick a device"));return}to("adb:".concat(e));try{let s=await sM("/android/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,serial:t_,payload:t})});sP(s.message||"OK")}catch(e){sP(e.message)}finally{to(null)}},na=[{id:"dashboard",icon:a.Z,labelZh:"总览",labelEn:"Dashboard"},{id:"services",icon:r.Z,labelZh:"服务",labelEn:"Services"},{id:"live_youtube",icon:o.Z,labelZh:"YouTube 无人直播",labelEn:"YouTube unmanned"},{id:"live_tiktok",icon:c.Z,labelZh:"TikTok 无人直播",labelEn:"TikTok unmanned"},{id:"android",icon:d.Z,labelZh:"安卓",labelEn:"Android"},{id:"studio",icon:x.Z,labelZh:"工作室",labelEn:"Studio"},{id:"network",icon:u.Z,labelZh:"网络",labelEn:"Network"},{id:"settings",icon:m.Z,labelZh:"设置",labelEn:"Settings"}],nr=e=>{(async()=>{var t;if(null===(t=navigator.clipboard)||void 0===t?void 0:t.writeText){await navigator.clipboard.writeText(e);return}let s=document.createElement("textarea");s.value=e,s.readOnly=!0,s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.select(),document.execCommand("copy"),s.remove()})().then(()=>sP(sL("已复制","Copied")),()=>sP(sL("复制失败","Copy failed")))},no=tx?new Date(tx).toLocaleTimeString("zh"===e0?"zh-CN":"en-US",{hour12:!1}):sL("未同步","Not synced"),nc=tm?sL("前台自动刷新","Auto refresh"):sL("后台已暂停刷新","Refresh paused in background");return(0,n.jsxs)("div",{className:"lp-root min-h-screen transition-colors duration-300 ".concat("light"===e5?"bg-slate-100 text-slate-900 selection:bg-violet-400/25":"bg-[#050508] text-zinc-100 selection:bg-violet-500/30"),children:[(0,n.jsx)("div",{className:"lp-noise pointer-events-none fixed inset-0 z-0 ".concat("light"===e5?"opacity-[0.06]":"opacity-[0.22]"),"aria-hidden":!0}),(0,n.jsx)("div",{className:"lp-aurora pointer-events-none fixed -left-1/4 top-0 h-[42rem] w-[42rem] rounded-full blur-[120px] ".concat("light"===e5?"bg-violet-400/15":"bg-violet-600/20"),"aria-hidden":!0}),(0,n.jsx)("div",{className:"lp-aurora2 pointer-events-none fixed bottom-0 right-0 h-[36rem] w-[36rem] rounded-full blur-[100px] ".concat("light"===e5?"bg-cyan-400/10":"bg-cyan-500/10"),"aria-hidden":!0}),tc?(0,n.jsx)(l.E.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},role:"status","aria-live":"polite","aria-atomic":"true",className:"fixed bottom-6 left-1/2 z-[100] max-w-md -translate-x-1/2 rounded-2xl border border-white/10 bg-zinc-950/95 px-5 py-3 text-center text-sm text-zinc-100 shadow-2xl shadow-black/50 backdrop-blur-xl",children:tc}):null,(0,n.jsxs)("div",{className:"relative z-10 flex min-h-screen",children:[(0,n.jsxs)("aside",{className:"hidden w-64 shrink-0 flex-col border-r px-4 py-6 backdrop-blur-2xl lg:flex ".concat("light"===e5?"border-slate-200/90 bg-white/70":"border-white/[0.06] bg-zinc-950/40"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 px-2",children:[(0,n.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-gradient-to-br from-violet-500 to-cyan-400 shadow-lg shadow-violet-500/25",children:(0,n.jsx)(h.Z,{className:"h-4 w-4 text-white"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-[0.2em] ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:"live.local"}),(0,n.jsx)("p",{className:"text-sm font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:sL("无人直播系统","Unmanned Live System")})]})]}),(0,n.jsx)("nav",{className:"mt-10 flex flex-1 flex-col gap-1",children:na.map(e=>{let t=e.icon,s=e3===e.id;return(0,n.jsxs)("button",{type:"button",onClick:()=>e4(e.id),"aria-current":s?"page":void 0,className:"flex items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm font-medium transition ".concat("light"===e5?s?"bg-violet-100/90 text-slate-900 shadow-inner shadow-violet-200/50":"text-slate-600 hover:bg-slate-200/60 hover:text-slate-900":s?"bg-white/[0.08] text-white shadow-inner shadow-white/5":"text-zinc-500 hover:bg-white/[0.04] hover:text-zinc-200"),children:[(0,n.jsx)(t,{className:"h-4 w-4 ".concat("light"===e5?s?"text-violet-600":"text-slate-400":s?"text-violet-300":"text-zinc-600")}),sL(e.labelZh,e.labelEn),s?(0,n.jsx)(p.Z,{className:"ml-auto h-4 w-4 ".concat("light"===e5?"text-slate-400":"text-zinc-600")}):null]},e.id)})})]}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,n.jsxs)("header",{className:"sticky top-0 z-20 flex items-center justify-between gap-3 border-b px-4 py-3 backdrop-blur-xl lg:px-8 ".concat("light"===e5?"border-slate-200/80 bg-white/75 text-slate-900":"border-white/[0.06] bg-zinc-950/70 text-white"),children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,n.jsx)("button",{type:"button",className:"rounded-xl border p-2 lg:hidden ".concat("light"===e5?"border-slate-200 bg-white/80":"border-white/10 bg-white/5"),onClick:()=>te(!0),"aria-label":"Menu",children:(0,n.jsx)(g.Z,{className:"h-5 w-5"})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h1",{className:"truncate text-lg font-semibold tracking-tight lg:text-xl ".concat("light"===e5?"text-slate-900":"text-white"),children:sL((null===(A=na.find(e=>e.id===e3))||void 0===A?void 0:A.labelZh)||"",(null===(D=na.find(e=>e.id===e3))||void 0===D?void 0:D.labelEn)||"")}),(0,n.jsxs)("p",{className:"truncate text-xs ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:[(null==tt?void 0:null===(O=tt.stack)||void 0===O?void 0:O.mdns_host)||"live.local"," \xb7"," ","dark"===e5?sL("夜间","Dark mode"):sL("日间","Light mode")," \xb7 ",nc," \xb7"," ",sL("最后同步","Last sync")," ",no]})]})]}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5 sm:gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>e2(e=>"dark"===e?"light":"dark"),className:"rounded-xl border p-2 transition ".concat("light"===e5?"border-slate-200 bg-white text-amber-500 shadow-sm":"border-white/10 bg-white/[0.06] text-violet-200"),title:"dark"===e5?sL("切换到日间","Switch to light"):sL("切换到夜间","Switch to dark"),"aria-label":"dark"===e5?sL("日间模式","Light mode"):sL("夜间模式","Dark mode"),"aria-pressed":"light"===e5,children:"dark"===e5?(0,n.jsx)(b.Z,{className:"h-5 w-5",strokeWidth:2}):(0,n.jsx)(f.Z,{className:"h-5 w-5",strokeWidth:2})}),(0,n.jsxs)("button",{type:"button",onClick:()=>e1(e=>"zh"===e?"en":"zh"),className:"relative rounded-xl border p-2 transition ".concat("light"===e5?"border-slate-200 bg-white text-cyan-600 shadow-sm":"border-white/10 bg-white/[0.06] text-cyan-200"),title:"zh"===e0?"English":"中文","aria-label":sL("切换语言","Toggle language"),"aria-pressed":"en"===e0,children:[(0,n.jsx)(v.Z,{className:"h-5 w-5",strokeWidth:2}),(0,n.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 flex h-4 min-w-[1rem] items-center justify-center rounded px-0.5 text-[9px] font-bold leading-none ".concat("light"===e5?"bg-cyan-100 text-cyan-800":"bg-cyan-500/30 text-cyan-100"),children:"zh"===e0?"中":"A"})]}),(0,n.jsxs)("button",{type:"button",disabled:!!tr,onClick:()=>void Promise.all([sE(),sA()]),className:"flex items-center gap-2 rounded-xl border px-3 py-2 text-xs font-medium transition disabled:opacity-40 ".concat("light"===e5?"border-slate-200 bg-white text-slate-700 hover:bg-slate-50":"border-white/10 bg-white/[0.04] text-zinc-300 hover:bg-white/[0.07]"),children:[tr?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5"}),(0,n.jsx)("span",{className:"hidden sm:inline",children:sL("刷新","Refresh")})]})]})]}),(0,n.jsx)("main",{className:"flex-1 px-4 py-6 lg:px-8 lg:py-8",children:(0,n.jsx)(i.M,{mode:"wait",children:(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.28,ease:[.22,1,.36,1]},children:["dashboard"===e3?(0,n.jsx)(eX,{dash:tt,deployCheck:tR,dashErr:tn,loading:ti,theme:e5,t:sL,onNavigate:e4,nekoLinks:sK,nekoPortsLabel:sH,showStreamProbes:tT,quickLinks:sD}):null,"services"===e3?(0,n.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:[((null==tt?void 0:tt.services)||[]).map((e,t)=>(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.04*t},whileHover:{y:-2},className:"rounded-2xl border border-white/[0.07] bg-gradient-to-b from-white/[0.05] to-transparent p-5",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"font-semibold text-white",children:e.label}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500 line-clamp-2",children:e.description})]}),(0,n.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(tX(e.running?"online":e.status)),children:e.running?sL("运行中","Running"):e.status})]}),e.detail?(0,n.jsx)("p",{className:"mt-2 text-[11px] leading-snug line-clamp-6 ".concat("skipped"===e.status?"text-slate-300/90":"text-amber-200/85"),children:e.detail}):null,"shellcrash"===e.service_id&&e.available&&!e.running?(0,n.jsx)("p",{className:"mt-2 text-[11px] text-zinc-500",children:sL("stopped 为常态:仅当需要透明代理 / 规则分流时再手动点 Start,不建议设置自启。","Stopped is normal; click Start manually only when the proxy is needed. Autostart stays off.")}):null,(0,n.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[e.url?(0,n.jsx)("a",{href:(0,eh.p)(e.url),target:"_blank",rel:"noreferrer",className:"rounded-lg bg-violet-500/15 px-3 py-1.5 text-xs font-medium text-violet-200 ring-1 ring-violet-500/25",children:sL("打开面板","Open panel")}):null,(0,n.jsx)("button",{type:"button",disabled:!!tr||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?sL("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||sL("当前不可操作","Unavailable"),onClick:()=>void s4(e.service_id,"start"),className:"rounded-lg bg-emerald-500/20 px-3 py-1.5 text-xs font-medium text-emerald-200 ring-1 ring-emerald-500/30 disabled:opacity-30",children:"Start"}),(0,n.jsx)("button",{type:"button",disabled:!!tr||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?sL("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||sL("当前不可操作","Unavailable"),onClick:()=>void s4(e.service_id,"install"),className:"rounded-lg bg-sky-500/15 px-3 py-1.5 text-xs font-medium text-sky-200 ring-1 ring-sky-500/25 disabled:opacity-30",children:"Install"}),(0,n.jsx)("button",{type:"button",disabled:!!tr||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?sL("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||sL("当前不可操作","Unavailable"),onClick:()=>void s4(e.service_id,"restart"),className:"rounded-lg bg-amber-500/15 px-3 py-1.5 text-xs font-medium text-amber-200 ring-1 ring-amber-500/25 disabled:opacity-30",children:"Restart"}),(0,n.jsx)("button",{type:"button",disabled:!!tr||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?sL("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||sL("当前不可操作","Unavailable"),onClick:()=>void s4(e.service_id,"upgrade"),className:"rounded-lg bg-indigo-500/15 px-3 py-1.5 text-xs font-medium text-indigo-200 ring-1 ring-indigo-500/25 disabled:opacity-30",children:"Upgrade"}),(0,n.jsx)("button",{type:"button",disabled:!!tr||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?sL("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||sL("当前不可操作","Unavailable"),onClick:()=>void s4(e.service_id,"stop"),className:"rounded-lg bg-rose-500/15 px-3 py-1.5 text-xs font-medium text-rose-200 ring-1 ring-rose-500/25 disabled:opacity-30",children:"Stop"}),(0,n.jsx)("button",{type:"button",disabled:!!tr||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?sL("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||sL("当前不可操作","Unavailable"),onClick:()=>void s4(e.service_id,"uninstall"),className:"rounded-lg bg-zinc-500/15 px-3 py-1.5 text-xs font-medium text-zinc-200 ring-1 ring-zinc-500/25 disabled:opacity-30",children:"Uninstall"})]})]},e.service_id)),(null==tt?void 0:null===(B=tt.services)||void 0===B?void 0:B.length)?null:(0,n.jsx)("p",{className:"text-sm text-zinc-500",children:sL("暂无服务数据","No services")})]}):null,"live_youtube"===e3?(0,n.jsx)(tY,{t:sL,busy:tr,entries:tp,currentProc:tv,setCurrentProc:ty,urlConfig:tw,setUrlConfig:tj,onRunProcess:(e,t)=>void nn(e,t),onSaveUrlConfig:(e,t)=>nl(e,t),fetchJson:sM,liveProcesses:tb.length?tb:null!==(eO=null==tt?void 0:null===(W=tt.live)||void 0===W?void 0:W.processes)&&void 0!==eO?eO:[],notify:sP,quickLinks:sD,onRefresh:()=>sE(),onNavigate:e=>e4(e)}):null,"live_tiktok"===e3?(0,n.jsx)(eI,{t:sL,busy:!!tr,entries:tp,currentProc:tv,setCurrentProc:ty,urlConfig:tw,setUrlConfig:tj,onRunProcess:e=>void nn(e),onSaveUrlConfig:e=>nl(e),onReplayGoLive:async(e,t)=>{let s=t.replace(/[,,|]/g,"_");await nl("原画,".concat(e,",主播: ").concat(s)),await nn("start")},onCopy:nr,fetchJson:sM,apiPrefix:eQ,quickLinks:sD,hdmiStatus:null==tt?void 0:tt.hdmi,notify:sP,onNavigate:e=>e4(e)}):null,"android"===e3?(0,n.jsx)(ed,{t:sL,notify:sP,fetchJson:sM,apiBase:eQ,busy:tr,androidSerial:t_,setAndroidSerial:tz,devices:(null==tt?void 0:null===(K=tt.android)||void 0===K?void 0:K.devices)||[],adbAvailable:!!(null==tt?void 0:null===(H=tt.android)||void 0===H?void 0:H.adb_available),apkPath:tN,setApkPath:tk,onAndroidAction:(e,t)=>ni(e,null!=t?t:{}),onCopy:nr,onRefreshDevices:()=>void sE()}):null,"studio"===e3?(0,n.jsxs)("div",{className:"mx-auto max-w-7xl space-y-5",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-base font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:[(0,n.jsx)(x.Z,{className:"h-5 w-5 ".concat("light"===e5?"text-emerald-700":"text-emerald-300")}),sL("工作室","Studio")]}),(0,n.jsx)("p",{className:"mt-1 text-xs ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:"Home Assistant / Frigate / WOL"})]}),(0,n.jsxs)("span",{className:"w-fit rounded-full px-3 py-1 text-[11px] font-semibold ".concat("light"===e5?"bg-emerald-50 text-emerald-800 ring-1 ring-emerald-200":"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25"),children:[sB.filter(e=>null==e?void 0:e.running).length,"/",sB.length||4," online"]})]}),(0,n.jsxs)("div",{className:"grid gap-4 xl:grid-cols-4",children:[[{id:"homeassistant",label:"Home Assistant",icon:x.Z,fallbackUrl:sD.homeassistant,iconClass:"light"===e5?"text-emerald-700":"text-emerald-300",openClass:"light"===e5?"bg-emerald-50 text-emerald-800 ring-1 ring-emerald-200 hover:bg-emerald-100":"bg-emerald-500/15 text-emerald-100 ring-1 ring-emerald-400/25 hover:bg-emerald-500/25"},{id:"frigate",label:"Frigate NVR",icon:j.Z,fallbackUrl:sD.frigate,iconClass:"light"===e5?"text-cyan-700":"text-cyan-300",openClass:"light"===e5?"bg-cyan-50 text-cyan-800 ring-1 ring-cyan-200 hover:bg-cyan-100":"bg-cyan-500/15 text-cyan-100 ring-1 ring-cyan-400/25 hover:bg-cyan-500/25"},{id:"ntfy",label:"ntfy",icon:N.Z,fallbackUrl:sD.ntfy,iconClass:"light"===e5?"text-violet-700":"text-violet-300",openClass:"light"===e5?"bg-violet-50 text-violet-800 ring-1 ring-violet-200 hover:bg-violet-100":"bg-violet-500/15 text-violet-100 ring-1 ring-violet-400/25 hover:bg-violet-500/25"}].map(e=>{let t=sO.get(e.id),s=e.icon,i=(null==t?void 0:t.url)||e.fallbackUrl||"",a=!!tr||(null==t?void 0:t.available)===!1;return(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e5?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:[(0,n.jsx)(s,{className:"h-4 w-4 ".concat(e.iconClass)}),e.label]}),(0,n.jsx)("p",{className:"mt-2 line-clamp-2 text-xs ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:(null==t?void 0:t.description)||("frigate"===e.id?"Camera NVR and detection console":"Local automation workspace")})]}),(0,n.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(tX((null==t?void 0:t.running)?"online":(null==t?void 0:t.status)||"unknown")),children:(null==t?void 0:t.running)?sL("运行中","Running"):(null==t?void 0:t.status)||"unknown"})]}),(null==t?void 0:t.detail)?(0,n.jsx)("p",{className:"mt-3 line-clamp-4 font-mono text-[11px] ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:t.detail}):null,(0,n.jsxs)("div",{className:"mt-5 flex flex-wrap gap-2",children:[i?(0,n.jsxs)("a",{href:(0,eh.p)(i),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 rounded-lg px-3 py-2 text-xs font-semibold transition ".concat(e.openClass),children:[(0,n.jsx)(k.Z,{className:"h-3.5 w-3.5"}),sL("打开","Open")]}):null,(0,n.jsx)("button",{type:"button",disabled:a,onClick:()=>void s4(e.id,"start"),className:"rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:"Start"}),(0,n.jsx)("button",{type:"button",disabled:a,onClick:()=>void s4(e.id,"restart"),className:"rounded-lg bg-amber-500/15 px-3 py-2 text-xs font-semibold text-amber-100 ring-1 ring-amber-400/25 transition hover:bg-amber-500/25 disabled:opacity-40",children:"Restart"}),(0,n.jsx)("button",{type:"button",disabled:a,onClick:()=>void s4(e.id,"stop"),className:"rounded-lg bg-rose-500/15 px-3 py-2 text-xs font-semibold text-rose-100 ring-1 ring-rose-400/25 transition hover:bg-rose-500/25 disabled:opacity-40",children:"Stop"})]})]},e.id)}),(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e5?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:[(0,n.jsx)(_.Z,{className:"h-4 w-4 ".concat("light"===e5?"text-amber-700":"text-amber-300")}),sL("WOL 网络唤醒","WOL Network Wake")]}),(0,n.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:(null==sW?void 0:sW.detail)||"broadcast=255.255.255.255;port=9"})]}),(0,n.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(tX((null==sW?void 0:sW.status)||"ready")),children:(null==sW?void 0:sW.status)||"ready"})]}),(0,n.jsxs)("div",{className:"mt-5 grid gap-3",children:[(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsxs)("select",{value:sa,onChange:e=>{let t=e.target.value;sr(t);let s=sl.find(e=>e.mac===t);s&&(t7(s.mac),sc(s.name||""),sx(s.ip||""))},className:"min-w-0 flex-1 rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===e5?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100"),children:[(0,n.jsx)("option",{value:"",children:sL("选择设备","Select device")}),sl.map(e=>(0,n.jsx)("option",{value:e.mac,children:(e.name||e.ip||e.mac)+(e.reachable?" \xb7 online":"")},e.mac))]}),(0,n.jsx)("button",{type:"button",disabled:"wol:probe"===tr,onClick:()=>{to("wol:probe"),s8(!0).finally(()=>to(null))},className:"inline-flex items-center justify-center rounded-lg bg-cyan-500/15 px-3 py-2 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/25 transition hover:bg-cyan-500/25 disabled:opacity-40",children:(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat("wol:probe"===tr?"animate-spin":"")})})]}),(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:sL("名称","Name")}),(0,n.jsx)("input",{value:so,onChange:e=>sc(e.target.value),placeholder:"NAS / PC",className:"mt-1 w-full rounded-lg border px-3 py-2 text-sm outline-none ".concat("light"===e5?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:"IP"}),(0,n.jsx)("input",{value:sd,onChange:e=>sx(e.target.value),placeholder:"10.0.0.10",inputMode:"decimal",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e5?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]})]}),(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:"MAC"}),(0,n.jsx)("input",{value:t9,onChange:e=>t7(e.target.value),placeholder:"AA:BB:CC:DD:EE:FF",autoCapitalize:"characters",spellCheck:!1,className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e5?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,1fr)_7rem]",children:[(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:"Broadcast"}),(0,n.jsx)("input",{value:se,onChange:e=>st(e.target.value),placeholder:"255.255.255.255",inputMode:"decimal",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e5?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:"Port"}),(0,n.jsx)("input",{value:ss,onChange:e=>sn(e.target.value),inputMode:"numeric",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===e5?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]})]}),(0,n.jsxs)("button",{type:"button",disabled:"wol:wake"===tr||(null==sW?void 0:sW.available)===!1,onClick:()=>void s6(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-amber-500/18 px-3 py-2.5 text-xs font-semibold text-amber-100 ring-1 ring-amber-400/30 transition hover:bg-amber-500/28 disabled:opacity-40",children:["wol:wake"===tr?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(_.Z,{className:"h-3.5 w-3.5"}),sL("唤醒","Wake")]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,n.jsxs)("button",{type:"button",disabled:"wol:save"===tr,onClick:()=>void s9(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:["wol:save"===tr?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(z.Z,{className:"h-3.5 w-3.5"}),sL("保存","Save")]}),(0,n.jsxs)("button",{type:"button",disabled:"wol:delete"===tr||!(sa||t9),onClick:()=>void s7(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-rose-500/15 px-3 py-2 text-xs font-semibold text-rose-100 ring-1 ring-rose-400/25 transition hover:bg-rose-500/25 disabled:opacity-40",children:["wol:delete"===tr?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(S.Z,{className:"h-3.5 w-3.5"}),sL("删除","Delete")]})]})]})]})]}),null,(0,n.jsxs)("div",{className:"grid gap-4 xl:grid-cols-4",children:[(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e5?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:[(0,n.jsx)(R.Z,{className:"h-4 w-4 ".concat("light"===e5?"text-emerald-700":"text-emerald-300")}),"System Doctor"]}),(0,n.jsxs)("p",{className:"mt-2 text-xs ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:[null!==(eB=null==sj?void 0:null===(F=sj.doctor)||void 0===F?void 0:F.services_running)&&void 0!==eB?eB:0,"/",null!==(eW=null==sj?void 0:null===(Y=sj.doctor)||void 0===Y?void 0:Y.services_available)&&void 0!==eW?eW:0," services"]})]}),(0,n.jsxs)("span",{className:"rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(tX((null==sj?void 0:null===(G=sj.doctor)||void 0===G?void 0:G.status)||"unknown")),children:[null!==(eK=null==sj?void 0:null===(q=sj.doctor)||void 0===q?void 0:q.score)&&void 0!==eK?eK:0,"/100"]})]}),(0,n.jsxs)("div",{className:"mt-4 space-y-2 text-xs ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:[(0,n.jsxs)("p",{children:[sL("严重","Critical"),": ",null!==(eH=null==sj?void 0:null===(V=sj.doctor)||void 0===V?void 0:V.critical)&&void 0!==eH?eH:0," / ",sL("警告","Warnings"),": ",null!==(eF=null==sj?void 0:null===($=sj.doctor)||void 0===$?void 0:$.warnings)&&void 0!==eF?eF:0]}),((null==sj?void 0:null===(X=sj.doctor)||void 0===X?void 0:X.recommendations)||[]).slice(0,2).map(e=>(0,n.jsxs)("p",{className:"line-clamp-2",children:["- ",e]},e))]})]}),(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e5?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:[(0,n.jsx)(L.Z,{className:"h-4 w-4 ".concat("light"===e5?"text-cyan-700":"text-cyan-300")}),sL("设备资产","Device inventory")]}),(0,n.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:"LAN / USB"})]}),(0,n.jsx)("button",{type:"button",disabled:"studio:ops"===tr,onClick:()=>{to("studio:ops"),nt(!0).finally(()=>to(null))},className:"inline-flex items-center justify-center rounded-lg px-2.5 py-2 text-xs font-semibold ring-1 transition disabled:opacity-40 ".concat("light"===e5?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat("studio:ops"===tr?"animate-spin":"")})})]}),(0,n.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-2 text-center text-xs",children:[["WOL",null!==(eY=null==sj?void 0:null===(ee=sj.inventory)||void 0===ee?void 0:null===(Q=ee.counts)||void 0===Q?void 0:Q.wol)&&void 0!==eY?eY:0],["Video",null!==(eG=null==sj?void 0:null===(es=sj.inventory)||void 0===es?void 0:null===(et=es.counts)||void 0===et?void 0:et.video)&&void 0!==eG?eG:0]].map(e=>{let[t,s]=e;return(0,n.jsxs)("div",{className:"rounded-lg border px-2 py-2 ".concat("light"===e5?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:s}),(0,n.jsx)("p",{className:"light"===e5?"text-slate-500":"text-zinc-500",children:t})]},t)})})]}),(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e5?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:[(0,n.jsx)(h.Z,{className:"h-4 w-4 ".concat("light"===e5?"text-amber-700":"text-amber-300")}),sL("自动化配方","Automation recipes")]}),(0,n.jsx)("div",{className:"mt-4 space-y-2",children:((null==sj?void 0:sj.recipes)||[]).slice(0,3).map(e=>(0,n.jsx)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===e5?"border-slate-200 bg-slate-50 text-slate-700":"border-white/10 bg-black/30 text-zinc-300"),children:(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"line-clamp-1 font-semibold",children:e.title}),(0,n.jsx)("span",{className:"ready"===e.status?"text-emerald-400":"text-amber-300",children:e.status})]})},e.id||e.title))})]}),(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===e5?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:[(0,n.jsx)(r.Z,{className:"h-4 w-4 ".concat("light"===e5?"text-violet-700":"text-violet-300")}),sL("备份快照","Backup snapshots")]}),(0,n.jsxs)("p",{className:"mt-2 text-xs ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:[((null==sj?void 0:null===(en=sj.backups)||void 0===en?void 0:en.snapshots)||[]).length," snapshots"]})]}),(0,n.jsxs)("button",{type:"button",disabled:"studio:snapshot"===tr,onClick:()=>void ns(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-violet-500/15 px-3 py-2 text-xs font-semibold text-violet-100 ring-1 ring-violet-400/25 transition hover:bg-violet-500/25 disabled:opacity-40",children:["studio:snapshot"===tr?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(P.Z,{className:"h-3.5 w-3.5"}),sL("创建","Create")]})]}),(0,n.jsx)("p",{className:"mt-4 line-clamp-2 text-xs ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:(null===(el=((null==sj?void 0:null===(ei=sj.backups)||void 0===ei?void 0:ei.snapshots)||[])[0])||void 0===el?void 0:el.name)||sL("暂无快照","No snapshots yet")})]})]})]}):null,"network"===e3?(0,n.jsxs)("div",{className:"mx-auto max-w-7xl space-y-6",children:[(0,n.jsxs)("div",{className:"rounded-2xl border p-6 shadow-xl ".concat("light"===e5?"border-cyan-200/90 bg-white shadow-cyan-100/50":"border-cyan-500/20 bg-zinc-950/55 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:[(0,n.jsx)(R.Z,{className:"h-4 w-4 ".concat("light"===e5?"text-cyan-700":"text-cyan-300")}),"WireGuard VPS"]}),(0,n.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:sL("导入 VPS wg-quick 配置,保存到受管配置目录,并生成 Windows 端点旁路路由命令。","Import a VPS wg-quick config, save it under managed config, and generate the Windows endpoint bypass route.")})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsxs)("span",{className:"rounded-full px-3 py-1 text-[11px] font-semibold ".concat((null==tB?void 0:tB.active)?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-400/25":"bg-amber-500/15 text-amber-200 ring-1 ring-amber-400/25"),children:[tQ(null==tB?void 0:null===(ea=tB.quality)||void 0===ea?void 0:ea.status,sL),"number"==typeof(null==tB?void 0:null===(er=tB.quality)||void 0===er?void 0:er.score)?" \xb7 ".concat(tB.quality.score,"/100"):""]}),(null==tD?void 0:tD.relative_path)?(0,n.jsx)("div",{className:"rounded-lg border px-3 py-2 text-[11px] ".concat("light"===e5?"border-cyan-200 bg-cyan-50 text-cyan-900":"border-cyan-400/20 bg-cyan-500/10 text-cyan-100"),children:tD.relative_path}):null,(0,n.jsxs)("button",{onClick:()=>{sX(),sQ()},disabled:"wg:status"===tr||tF,className:"inline-flex items-center gap-2 rounded-lg px-3 py-2 text-xs font-semibold ring-1 transition disabled:opacity-40 ".concat("light"===e5?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(tF?"animate-spin":"")}),tF?sL("探测中","Probing"):sL("刷新","Refresh")]})]})]}),(0,n.jsxs)("div",{className:"mt-5 grid gap-3 lg:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e5?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:sL("当前接口","Active interfaces")}),(0,n.jsxs)("div",{className:"mt-2 rounded-lg border px-3 py-2 text-xs ".concat("light"===e5?"border-cyan-100 bg-white text-slate-700":"border-cyan-400/15 bg-cyan-500/10 text-cyan-100"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"font-semibold",children:tQ(null==tB?void 0:null===(eo=tB.quality)||void 0===eo?void 0:eo.status,sL)}),(0,n.jsx)("span",{className:"font-mono",children:"number"==typeof(null==tB?void 0:null===(ec=tB.quality)||void 0===ec?void 0:ec.score)?"".concat(tB.quality.score,"/100"):"—"})]}),(0,n.jsxs)("p",{className:"mt-1 text-[11px] ".concat("light"===e5?"text-slate-500":"text-cyan-100/75"),children:[sL("新鲜握手","Fresh peers"),": ",null!==(eq=null==tB?void 0:null===(ex=tB.quality)||void 0===ex?void 0:ex.fresh_peer_count)&&void 0!==eq?eq:0,"/",null!==(eV=null==tB?void 0:null===(eu=tB.quality)||void 0===eu?void 0:eu.peer_count)&&void 0!==eV?eV:0," \xb7 ",sL("最佳握手","Best handshake"),": ",t$(null==tB?void 0:null===(em=tB.quality)||void 0===em?void 0:em.best_handshake_age_seconds)]})]}),(0,n.jsx)("div",{className:"mt-2 space-y-2",children:((null==tB?void 0:tB.interfaces)||[]).length?((null==tB?void 0:tB.interfaces)||[]).map(e=>{var t,s,l;return(0,n.jsxs)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===e5?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-zinc-950/60 text-zinc-200"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"font-semibold",children:e.name||"wg"}),(0,n.jsx)("span",{className:(null===(t=e.systemd)||void 0===t?void 0:t.active)==="active"?"text-emerald-400":"text-amber-300",children:(null===(s=e.systemd)||void 0===s?void 0:s.active)||"active"})]}),(0,n.jsx)("p",{className:"mt-1 font-mono text-[11px]",children:(e.addresses||[]).join(", ")||"—"}),(0,n.jsxs)("p",{className:"mt-1 text-[11px] ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:[e.details_available?sL("运行细节可读","Runtime details readable"):sL("运行细节受限","Runtime details limited"),(null===(l=e.configured_from)||void 0===l?void 0:l.name)?" \xb7 ".concat(sL("配置","Config"),": ").concat(e.configured_from.name):""]})]},e.name||"wg")}):(0,n.jsx)("p",{className:"text-xs ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:sL("未发现 wg show 输出","No wg show output")})})]}),(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e5?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:sL("对端与流量","Peer and traffic")}),(()=>{var e;let t=(null==sq?void 0:sq.status_source)==="wg"?sL("运行态","Runtime"):(null==sq?void 0:sq.config_source)==="system"?sL("系统配置","System config"):(null==sq?void 0:sq.config_source)==="repo"?sL("受管配置","Managed config"):sL("配置态","Config");return sq?(0,n.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-[11px] ".concat("light"===e5?"text-slate-700":"text-zinc-300"),children:[(0,n.jsxs)("p",{children:["Source: ",t]}),(0,n.jsxs)("p",{children:["Endpoint: ",sq.endpoint||"—"]}),(0,n.jsxs)("p",{children:["AllowedIPs: ",(sq.allowed_ips||[]).join(", ")||"—"]}),(0,n.jsxs)("p",{children:["Handshake:"," ","config"===sq.status_source?sL("运行态需 root/CAP_NET_ADMIN","Runtime details need root/CAP_NET_ADMIN"):t$(sq.latest_handshake_age_seconds)]}),(0,n.jsxs)("p",{children:["RX/TX: ",tJ(sq.transfer_rx_bytes)," / ",tJ(sq.transfer_tx_bytes)]}),(0,n.jsxs)("p",{children:["Keepalive: ",null!==(e=sq.persistent_keepalive)&&void 0!==e?e:"—"]})]}):(0,n.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:sL("暂无 peer 数据","No peer data yet")})})(),((null==tB?void 0:tB.endpoint_routes)||[]).length?(0,n.jsx)("div",{className:"mt-3 space-y-1 rounded-lg border px-3 py-2 font-mono text-[10px] ".concat("light"===e5?"border-slate-200 bg-white text-slate-600":"border-white/10 bg-zinc-950/60 text-zinc-400"),children:((null==tB?void 0:tB.endpoint_routes)||[]).slice(0,2).map(e=>(0,n.jsxs)("p",{className:e.uses_wireguard_interface?"text-amber-300":"",children:["route ",e.host||"endpoint",": ",e.route||(e.ok?"ok":"unavailable")]},e.host||e.route||"endpoint-route"))}):null]}),(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e5?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:sL("Neko 访问模式","Neko access mode")}),(0,n.jsx)("div",{className:"mt-2 grid grid-cols-2 rounded-lg p-1 text-xs font-semibold ".concat("light"===e5?"bg-slate-200/70":"bg-black/40"),children:["lan","remote"].map(e=>{var t,s;let l=((null==tB?void 0:null===(t=tB.neko_access)||void 0===t?void 0:t.mode)||"lan")===e,i=(null==tr?void 0:tr.startsWith("wg:neko"))||"remote"===e&&!(null==tB?void 0:null===(s=tB.neko_access)||void 0===s?void 0:s.remote_ready);return(0,n.jsx)("button",{onClick:()=>void s1(e),disabled:i,className:"rounded-md px-2.5 py-1.5 transition disabled:opacity-40 ".concat(l?"light"===e5?"bg-white text-cyan-800 shadow-sm":"bg-cyan-500/25 text-cyan-100 ring-1 ring-cyan-400/25":"light"===e5?"text-slate-600 hover:bg-white/60":"text-zinc-300 hover:bg-white/10"),children:"lan"===e?sL("局域网","LAN"):sL("远控","Remote")},e)})}),(0,n.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-[11px] ".concat("light"===e5?"text-slate-700":"text-zinc-300"),children:[(0,n.jsxs)("p",{children:["NAT1TO1: ",(null==tB?void 0:null===(ep=tB.neko_access)||void 0===ep?void 0:ep.nat1to1)||"-"]}),(0,n.jsxs)("p",{children:["LAN: ",(null==tB?void 0:null===(eg=tB.neko_access)||void 0===eg?void 0:eg.lan_host)||"-"]}),(0,n.jsxs)("p",{children:["WG: ",(null==tB?void 0:null===(eb=tB.neko_access)||void 0===eb?void 0:eb.wireguard_host)||"-"]}),(0,n.jsxs)("p",{children:["Target: ",(null==tB?void 0:null===(ef=tB.neko_access)||void 0===ef?void 0:ef.target_nat1to1)||"-"]}),(0,n.jsxs)("p",{children:["ShellCrash: ",(null==tB?void 0:null===(ev=tB.shellcrash)||void 0===ev?void 0:ev.running)?"running:".concat((null==tB?void 0:null===(ew=tB.shellcrash)||void 0===ew?void 0:ew.mixed_port)||"7890"):"stopped"]})]}),((null==tB?void 0:null===(ej=tB.neko_access)||void 0===ej?void 0:ej.remote_urls)||[]).length?(0,n.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:((null==tB?void 0:null===(eN=tB.neko_access)||void 0===eN?void 0:eN.remote_urls)||[]).slice(0,4).map(e=>(0,n.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"rounded-lg px-2.5 py-1.5 text-[11px] font-semibold ring-1 transition ".concat("light"===e5?"bg-white text-cyan-800 ring-cyan-100 hover:bg-cyan-50":"bg-cyan-500/10 text-cyan-100 ring-cyan-400/20 hover:bg-cyan-500/15"),children:["Neko ",e.id||1," \xb7 ",e.kind||"remote"]},"".concat(e.kind||"remote","-").concat(e.id||0,"-").concat(e.url||"")))}):null]}),(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e5?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:"Google / Douyin"}),(0,n.jsx)("div",{className:"mt-2 space-y-2",children:["google","youtube","douyin"].map(e=>{let t=((null==tK?void 0:tK.direct)||[]).find(t=>t.target===e),s=!!(null==t?void 0:t.ok),l=!t,i=tF&&l,a=(null==t?void 0:t.label)||("google"===e?"Google":"youtube"===e?"YouTube":"Douyin");return(0,n.jsxs)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===e5?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-zinc-950/60 text-zinc-200"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"font-semibold",children:a}),(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(i?"bg-cyan-500/15 text-cyan-100 ring-1 ring-cyan-500/25":l?"bg-zinc-500/15 text-zinc-300 ring-1 ring-zinc-500/25":s?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25":"bg-rose-500/15 text-rose-200 ring-1 ring-rose-500/25"),children:[i?(0,n.jsx)(y.Z,{className:"h-3 w-3 animate-spin"}):null,i?sL("探测中","Probing"):l?sL("等待结果","Waiting"):s?"OK":"FAIL"]})]}),(0,n.jsxs)("p",{className:"mt-1 font-mono text-[10px] ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:[(null==t?void 0:t.elapsed_ms)!=null?"".concat(t.elapsed_ms," ms"):i?sL("正在连接 ".concat(a,"..."),"Connecting ".concat(a,"...")):sL("等待探测结果","Waiting for probe result"),(null==t?void 0:t.status)?" \xb7 HTTP ".concat(t.status):""]}),!s&&(null==t?void 0:t.error)?(0,n.jsx)("p",{className:"mt-1 line-clamp-2 text-[10px] text-amber-200/80",children:t.error}):null]},e)})}),(0,n.jsxs)("div",{className:"mt-3 space-y-1 font-mono text-[11px] ".concat("light"===e5?"text-slate-700":"text-zinc-300"),children:[(0,n.jsxs)("p",{children:["Mode: ",tF?sL("正在探测直连链路与代理链路","Probing direct/proxy paths"):(null==tK?void 0:tK.mode)||"-"]}),(0,n.jsxs)("p",{children:["ShellCrash: ",(null==tK?void 0:null===(ek=tK.shellcrash)||void 0===ek?void 0:ek.running)?"running:".concat((null==tK?void 0:null===(e_=tK.shellcrash)||void 0===e_?void 0:e_.mixed_port)||"7890"):"manual/stopped"]}),(0,n.jsxs)("p",{children:["Autostart: ",(null==tK?void 0:null===(ez=tK.shellcrash_policy)||void 0===ez?void 0:ez.autostart_on_direct_fail)?"on direct fail":"off"]}),(0,n.jsxs)("p",{children:["Neko attach: ",(null==tK?void 0:null===(eS=tK.shellcrash_policy)||void 0===eS?void 0:eS.attach_neko)||"auto"]})]}),tF?(0,n.jsxs)("p",{className:"mt-3 inline-flex items-center gap-2 text-xs ".concat("light"===e5?"text-cyan-700":"text-cyan-200"),children:[(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}),sL("正在探测 Google / YouTube / Douyin,请等待结果返回。","Probing Google / YouTube / Douyin. Waiting for results.")]}):(null==tK?void 0:tK.summary)?(0,n.jsx)("p",{className:"mt-3 text-xs ".concat("light"===e5?"text-slate-600":"text-zinc-500"),children:tK.summary}):null]})]}),(null==tB?void 0:null===(eC=tB.recommendations)||void 0===eC?void 0:eC.length)?(0,n.jsx)("div",{className:"mt-3 rounded-xl border px-4 py-3 text-xs ".concat("light"===e5?"border-amber-200 bg-amber-50 text-amber-800":"border-amber-400/20 bg-amber-500/10 text-amber-100"),children:(tB.recommendations||[]).join(" \xb7 ")}):null,(null==tB?void 0:null===(eL=tB.quality)||void 0===eL?void 0:null===(eR=eL.reasons)||void 0===eR?void 0:eR.length)?(0,n.jsx)("div",{className:"mt-3 rounded-xl border px-4 py-3 text-xs ".concat("light"===e5?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-black/25 text-zinc-300"),children:(tB.quality.reasons||[]).slice(0,4).join(" \xb7 ")}):null,(0,n.jsxs)("div",{className:"mt-5 grid gap-4 lg:grid-cols-[minmax(0,1fr)_22rem]",children:[(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[14rem_minmax(0,1fr)]",children:[(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:sL("配置名","Config name")}),(0,n.jsx)("input",{value:tU,onChange:e=>tZ(e.target.value),className:"mt-1 w-full rounded-lg border px-3 py-2 text-sm outline-none ".concat("light"===e5?"border-slate-200 bg-white text-slate-900 focus:border-cyan-400":"border-white/10 bg-black/30 text-zinc-100 focus:border-cyan-400/60")})]}),(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:sL("配置文件","Config file")}),(0,n.jsx)("input",{type:"file",accept:".conf,.txt,text/plain",onChange:e=>{var t;s3(null===(t=e.target.files)||void 0===t?void 0:t[0])},className:"mt-1 w-full rounded-lg border px-3 py-2 text-xs file:mr-3 file:rounded-md file:border-0 file:px-3 file:py-1.5 file:text-xs file:font-semibold ".concat("light"===e5?"border-slate-200 bg-white text-slate-700 file:bg-cyan-50 file:text-cyan-800":"border-white/10 bg-black/30 text-zinc-300 file:bg-cyan-500/15 file:text-cyan-100")})]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-xl border px-3 py-2 ".concat("light"===e5?"border-slate-200 bg-slate-50":"border-white/10 bg-black/25"),children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:sL("保存模式","Save mode")}),["overlay","preserve"].map(e=>(0,n.jsx)("button",{onClick:()=>t2(e),className:"rounded-md px-2.5 py-1 text-[11px] font-semibold transition ".concat(t5===e?"bg-cyan-500/20 text-cyan-100 ring-1 ring-cyan-400/30":"light"===e5?"bg-white text-slate-600 ring-1 ring-slate-200 hover:bg-slate-100":"bg-white/5 text-zinc-300 ring-1 ring-white/10 hover:bg-white/10"),children:"overlay"===e?sL("组网不接管默认路由","Overlay only"):sL("保留原路由","Preserve routes")},e)),(0,n.jsx)("button",{onClick:()=>t1(e=>!e),className:"ml-auto inline-flex items-center gap-2 rounded-lg px-3 py-1.5 text-xs font-semibold ring-1 transition ".concat("light"===e5?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:t0?sL("锁定","Lock"):sL("编辑","Edit")}),(0,n.jsxs)("button",{onClick:()=>void s0(!1),disabled:"wg:save"===tr,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-500/20 px-3 py-1.5 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/30 transition hover:bg-cyan-500/30 disabled:opacity-40",children:["wg:save"===tr?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(P.Z,{className:"h-3.5 w-3.5"}),sL("保存","Save")]}),(0,n.jsxs)("button",{onClick:()=>void s0(!0),disabled:"wg:apply"===tr,className:"inline-flex items-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-1.5 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:["wg:apply"===tr?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(o.Z,{className:"h-3.5 w-3.5"}),sL("保存并应用","Save & apply")]})]}),(0,n.jsx)("textarea",{value:tI,onChange:e=>tA(e.target.value),readOnly:!t0,spellCheck:!1,placeholder:"[Interface] Address = 10.88.0.6/32 PrivateKey = ... [Peer] Endpoint = 129.204.21.129:51820 AllowedIPs = 10.88.0.0/24",className:"min-h-56 w-full resize-y rounded-xl border p-3 font-mono text-xs leading-relaxed outline-none ".concat("light"===e5?"border-slate-200 bg-slate-50 text-slate-900 focus:border-cyan-400":"border-white/10 bg-black/40 text-zinc-100 focus:border-cyan-400/60"," ").concat(t0?"":"opacity-75")}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsxs)("button",{onClick:()=>void s5(),disabled:"wg:save"===tr,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-500/20 px-3 py-2 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/30 transition hover:bg-cyan-500/30 disabled:opacity-40",children:["wg:save"===tr?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(P.Z,{className:"h-3.5 w-3.5"}),sL("解析并保存","Parse & save")]}),(null==tD?void 0:tD.redacted_config)?(0,n.jsxs)("button",{onClick:()=>nr(tD.redacted_config||""),className:"inline-flex items-center gap-2 rounded-lg bg-zinc-500/15 px-3 py-2 text-xs font-semibold text-zinc-100 ring-1 ring-white/10 transition hover:bg-zinc-500/25",children:[(0,n.jsx)(M.Z,{className:"h-3.5 w-3.5"}),sL("复制脱敏配置","Copy redacted")]}):null]})]}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e5?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,n.jsx)("p",{className:"text-xs font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:sL("解析结果","Parsed config")}),(0,n.jsxs)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat("light"===e5?"bg-cyan-100 text-cyan-800":"bg-cyan-500/15 text-cyan-200"),children:[null!==(eJ=null==tD?void 0:tD.peer_count)&&void 0!==eJ?eJ:0," peers"]})]}),(0,n.jsxs)("div",{className:"mt-3 space-y-2 font-mono text-[11px] ".concat("light"===e5?"text-slate-700":"text-zinc-300"),children:[(0,n.jsxs)("p",{children:["Address: ",((null==tD?void 0:null===(eP=tD.interface)||void 0===eP?void 0:eP.addresses)||[]).join(", ")||"—"]}),(0,n.jsxs)("p",{children:["Endpoint: ",(null==tD?void 0:null===(eT=tD.peers)||void 0===eT?void 0:null===(eM=eT[0])||void 0===eM?void 0:eM.endpoint)||"—"]}),(0,n.jsxs)("p",{children:["AllowedIPs: ",((null==tD?void 0:null===(eU=tD.peers)||void 0===eU?void 0:null===(eE=eU[0])||void 0===eE?void 0:eE.allowed_ips)||[]).join(", ")||"—"]}),(0,n.jsxs)("p",{children:["MTU: ",null!==(e$=null==tD?void 0:null===(eZ=tD.interface)||void 0===eZ?void 0:eZ.mtu)&&void 0!==e$?e$:"—"]})]}),(null==tD?void 0:null===(eA=tD.warnings)||void 0===eA?void 0:eA.length)?(0,n.jsx)("ul",{className:"mt-3 space-y-1 text-[11px] ".concat("light"===e5?"text-amber-700":"text-amber-200"),children:tD.warnings.map(e=>(0,n.jsx)("li",{children:e},e))}):null]}),(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e5?"border-slate-200 bg-white":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"text-xs font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:sL("已保存配置","Saved configs")}),(0,n.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:((null==tB?void 0:tB.repo_configs)||[]).length?((null==tB?void 0:tB.repo_configs)||[]).map(e=>(0,n.jsx)("button",{onClick:()=>void s2(e.name),className:"rounded-lg px-3 py-1.5 text-[11px] font-semibold ring-1 transition ".concat("light"===e5?"bg-slate-50 text-slate-700 ring-slate-200 hover:bg-slate-100":"bg-white/5 text-zinc-200 ring-white/10 hover:bg-white/10"),children:e.name||e.relative_path},e.name||e.relative_path||"wireguard-config")):(0,n.jsx)("span",{className:"text-[11px] ".concat("light"===e5?"text-slate-500":"text-zinc-500"),children:sL("暂无受管配置","No managed configs")})})]}),(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===e5?"border-slate-200 bg-white":"border-white/10 bg-black/30"),children:[(0,n.jsxs)("p",{className:"flex items-center gap-2 text-xs font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:[(0,n.jsx)(T.Z,{className:"h-3.5 w-3.5"}),sL("Windows 端点路由","Windows endpoint route")]}),(0,n.jsxs)("div",{className:"mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-1",children:[(0,n.jsx)("input",{value:t3,onChange:e=>t4(e.target.value),placeholder:sL("网关,如 192.168.2.1","Gateway, e.g. 192.168.2.1"),className:"rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===e5?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100")}),(0,n.jsx)("input",{value:t6,onChange:e=>t8(e.target.value),placeholder:sL("接口 ifIndex,如 21","Interface ifIndex, e.g. 21"),className:"rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===e5?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100")})]}),(0,n.jsx)("code",{className:"mt-3 block break-all rounded-lg border p-3 text-[11px] ".concat("light"===e5?"border-slate-200 bg-slate-50 text-slate-800":"border-white/10 bg-black/40 text-zinc-200"),children:s$||"route -p add mask 255.255.255.255 metric 1 if "}),(0,n.jsxs)("button",{onClick:()=>nr(s$),disabled:!s$,className:"mt-3 inline-flex items-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:[(0,n.jsx)(M.Z,{className:"h-3.5 w-3.5"}),sL("复制命令","Copy command")]})]})]})]})]}),(0,n.jsxs)("div",{className:"rounded-2xl border p-6 ".concat("light"===e5?"border-violet-200/90 bg-gradient-to-br from-violet-50 via-white to-fuchsia-50/80":"border-violet-500/25 bg-gradient-to-br from-violet-500/10 via-zinc-950/40 to-fuchsia-500/5"),children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===e5?"text-slate-900":"text-white"),children:[(0,n.jsx)(E.Z,{className:"h-4 w-4 ".concat("light"===e5?"text-violet-600":"text-violet-300")}),sL("ShellCrash 网络面板","ShellCrash panel")]}),(0,n.jsx)("p",{className:"mt-2 text-xs ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:sL("透明代理与规则分流直接在本页完成,无需跳转;流媒体与其它系统服务请在「服务」页管理。","Proxy rules and YAML editing are embedded here. Use Services for SRS/Neko/Chromium, etc.")}),(0,n.jsx)("div",{className:"mt-6 flex flex-col items-center gap-4 sm:flex-row sm:justify-center",children:[{tx:sL("互联网","Internet"),c:"from-cyan-400 to-blue-500"},{tx:"ShellCrash",c:"from-violet-500 to-fuchsia-500"},{tx:sL("本机 / 安卓","Host / Android"),c:"from-emerald-400 to-teal-500"}].map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)("div",{className:"flex h-16 w-28 items-center justify-center rounded-2xl bg-gradient-to-br ".concat(e.c," text-xs font-bold text-white shadow-lg"),children:e.tx}),t<2?(0,n.jsx)(p.Z,{className:"hidden h-5 w-5 sm:block ".concat("light"===e5?"text-slate-400":"text-zinc-600")}):null]},e.tx))})]}),(0,n.jsx)("div",{className:"overflow-hidden rounded-2xl border shadow-xl ".concat("light"===e5?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:(0,n.jsx)("div",{className:"max-h-[min(78vh,56rem)] min-h-[22rem] overflow-y-auto overflow-x-hidden",children:(0,n.jsx)(I.d,{embeddedShellCrash:!0,portalLang:e0})})})]}):null,"settings"===e3?(0,n.jsxs)("div",{className:"mx-auto max-w-lg space-y-6",children:[(0,n.jsx)("p",{className:"text-sm ".concat("light"===e5?"text-slate-600":"text-zinc-400"),children:sL("常用选项(本机偏好);完整文件与 JSON 编辑见下方链接。","Local preferences; full file/JSON editor via the link below.")}),(0,n.jsxs)("div",{className:"space-y-4 rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,n.jsxs)("label",{className:"flex cursor-pointer items-center justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium text-white",children:sL("总览自动刷新","Auto-refresh dashboard")}),(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:"10s"})]}),(0,n.jsx)("input",{type:"checkbox",className:"h-5 w-5 accent-violet-500",checked:tP,onChange:e=>{let t=e.target.checked;tM(t);try{localStorage.setItem("livehub.autorefresh",t?"1":"0")}catch(e){}sP(t?sL("已开启刷新","Auto refresh on"):sL("已暂停刷新","Paused"))}})]}),(0,n.jsxs)("label",{className:"flex cursor-pointer items-center justify-between gap-4 border-t border-white/[0.06] pt-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium text-white",children:sL("总览显示 SRS / Neko 探针","Show SRS/Neko probes")}),(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:sL("关闭可精简首页","Hide stream probe cards")})]}),(0,n.jsx)("input",{type:"checkbox",className:"h-5 w-5 accent-violet-500",checked:tT,onChange:e=>{let t=e.target.checked;tE(t);try{localStorage.setItem("livehub.showStreamProbes",t?"1":"0")}catch(e){}}})]})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/40 p-5",children:[(0,n.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-zinc-500",children:sL("配置快照","Config snapshot")}),(0,n.jsx)("p",{className:"mt-2 font-mono text-[11px] text-zinc-400",children:String((null==tS?void 0:tS.config_root)||"—")}),(0,n.jsxs)("p",{className:"mt-3 text-sm text-zinc-300",children:[sL("主机名","Hostname"),":"," ",(0,n.jsx)("span",{className:"font-mono text-violet-200",children:(()=>{var e,t,s;let n=null==tS?void 0:tS.system;return(null==n?void 0:null===(t=n.identity)||void 0===t?void 0:null===(e=t.hostname_alias)||void 0===e?void 0:e.trim())||((null==tt?void 0:null===(s=tt.stack)||void 0===s?void 0:s.mdns_host)||"").replace(/\.local$/i,"")||"—"})()})]}),(0,n.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:null==tS?void 0:null===(eD=tS.services)||void 0===eD?void 0:eD.slice(0,8).map(e=>(0,n.jsxs)("span",{className:"rounded-full px-2.5 py-1 text-[10px] font-medium ".concat(e.enabled?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25":"bg-zinc-500/15 text-zinc-400"),children:[e.id," ",e.enabled?"ON":"off"]},e.id))})]}),(0,n.jsxs)("a",{href:"/console?tab=config",className:"inline-flex w-full items-center justify-center gap-2 rounded-xl border py-3 text-sm transition ".concat("light"===e5?"border-slate-200 bg-slate-50 text-violet-700 hover:bg-slate-100":"border-white/10 bg-white/[0.05] text-violet-200 hover:bg-white/[0.08]"),children:[sL("完整配置中心(文件 / JSON)","Full config center (files / JSON)"),(0,n.jsx)(k.Z,{className:"h-4 w-4"})]})]}):null]},e3)})})]})]}),(0,n.jsx)(i.M,{children:e7?(0,n.jsx)(l.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm lg:hidden",onClick:()=>te(!1),children:(0,n.jsxs)(l.E.aside,{initial:{x:-280},animate:{x:0},exit:{x:-280},transition:{type:"spring",damping:28,stiffness:320},className:"absolute left-0 top-0 h-full w-[min(88vw,280px)] border-r border-white/10 bg-zinc-950 p-4 shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsx)("button",{type:"button",onClick:()=>te(!1),className:"rounded-lg p-2",children:(0,n.jsx)(U.Z,{className:"h-5 w-5"})})}),(0,n.jsx)("nav",{className:"mt-4 flex flex-col gap-1",children:na.map(e=>{let t=e.icon,s=e3===e.id;return(0,n.jsxs)("button",{type:"button",onClick:()=>{e4(e.id),te(!1)},"aria-current":s?"page":void 0,className:"flex items-center gap-3 rounded-xl px-3 py-3 text-left text-sm transition ".concat(s?"bg-white/[0.08] text-white shadow-inner shadow-white/5":"text-zinc-300 hover:bg-white/[0.04]"),children:[(0,n.jsx)(t,{className:"h-4 w-4 ".concat(s?"text-violet-300":"text-violet-400")}),sL(e.labelZh,e.labelEn)]},e.id)})})]})}):null})]})}}}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/chunks/54-2994f988b170fe04.js b/d2ypp2/web-console/out/_next/static/chunks/54-2994f988b170fe04.js deleted file mode 100644 index 92b1bdd..0000000 --- a/d2ypp2/web-console/out/_next/static/chunks/54-2994f988b170fe04.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[54],{6054:function(e,t,s){s.d(t,{Z:function(){return tW}});var n=s(7437),l=s(6247),i=s(7586),a=s(4401),r=s(6137),o=s(4372),c=s(5901),d=s(3388),x=s(4938),u=s(3420),m=s(8728),h=s(2023),p=s(407),b=s(6840),g=s(7226),f=s(5929),v=s(7945),y=s(1817),w=s(7168),j=s(4822),N=s(4428),k=s(1723),_=s(2926),z=s(3581),S=s(4766),C=s(7580),R=s(9688),P=s(4743),L=s(8930),T=s(3651),M=s(4286),E=s(7265),U=s(8867),Z=s(8406),I=s(2489),A=s(2265);function D(e){let{tr:t}=e,l=(0,A.useRef)(null);return(0,A.useEffect)(()=>{let e;if(!l.current)return;let t=!1,n=0;return s.e(689).then(s.bind(s,1448)).then(s=>{if(t||!l.current)return;let i=l.current,a=Math.max(i.clientWidth,280),r=Math.max(i.clientHeight,200),o=new s.Scene,c=new s.PerspectiveCamera(48,a/r,.1,80);c.position.set(0,1.1,7.2);let d=new s.WebGLRenderer({antialias:!0,alpha:!0});d.setPixelRatio(Math.min(window.devicePixelRatio,2)),d.setSize(a,r),d.setClearColor(0,0),i.appendChild(d.domElement);let x=new s.HemisphereLight(16762092,4482815,.85);o.add(x);let u=new s.DirectionalLight(16777215,.9);u.position.set(4,8,6),o.add(u);let m=new s.PointLight(8189439,.6,20);m.position.set(-3,2,-2),o.add(m);let h=new s.Group,p=new s.Mesh(new s.BoxGeometry(3.2,.35,2.2),new s.MeshStandardMaterial({color:2762048,metalness:.15,roughness:.55}));p.position.y=-.85,h.add(p);let b=new s.Mesh(new s.TorusGeometry(.72,.09,12,48),new s.MeshStandardMaterial({color:16724821,emissive:4456465,metalness:.35,roughness:.25}));b.rotation.x=Math.PI/2,b.position.set(-.85,.15,.2),h.add(b);let g=new s.Mesh(new s.ConeGeometry(.35,.5,3),new s.MeshStandardMaterial({color:16777215,emissive:2236962,metalness:.2,roughness:.3}));g.rotation.z=-Math.PI/2,g.rotation.y=Math.PI,g.position.set(-.55,.18,.2),h.add(g);let f=new s.Mesh(new s.CylinderGeometry(.22,.28,.95,20),new s.MeshStandardMaterial({color:2487534,emissive:340024,metalness:.25,roughness:.35}));f.position.set(1.05,.35,-.15),f.rotation.z=.12,h.add(f);let v=new s.Mesh(new s.SphereGeometry(.26,16,16),new s.MeshStandardMaterial({color:16657493,emissive:2229520,metalness:.2,roughness:.4}));v.position.set(1.05,.92,-.15),h.add(v);let y=new s.BufferGeometry,w=new Float32Array(360);for(let e=0;e<120;e++)w[3*e]=(Math.random()-.5)*14,w[3*e+1]=(Math.random()-.3)*8,w[3*e+2]=(Math.random()-.5)*8-2;y.setAttribute("position",new s.BufferAttribute(w,3));let j=new s.Points(y,new s.PointsMaterial({color:16777215,size:.06,transparent:!0,opacity:.7}));o.add(j),o.add(h);let N=performance.now(),k=()=>{if(t)return;n=requestAnimationFrame(k);let e=(performance.now()-N)/1e3;h.rotation.y=.25*Math.sin(.35*e)+.12*e,h.position.y=.06*Math.sin(.9*e),b.rotation.z=.4*e,j.rotation.y=.02*e,d.render(o,c)};k();let _=new ResizeObserver(()=>{if(!l.current||t)return;let e=Math.max(l.current.clientWidth,280),s=Math.max(l.current.clientHeight,200);c.aspect=e/s,c.updateProjectionMatrix(),d.setSize(e,s)});_.observe(i),e=()=>{cancelAnimationFrame(n),_.disconnect(),d.dispose(),y.dispose(),d.domElement.parentNode===i&&i.removeChild(d.domElement)}}),()=>{t=!0,cancelAnimationFrame(n),null==e||e()}},[]),(0,n.jsxs)("div",{className:"flex h-full min-h-[14rem] flex-col",children:[(0,n.jsx)("p",{className:"mb-2 px-1 text-[10px] font-medium uppercase tracking-wider text-fuchsia-200/80",children:t("直播工作室 \xb7 3D","Live studio \xb7 3D")}),(0,n.jsx)("div",{ref:l,className:"relative min-h-[12rem] flex-1 overflow-hidden rounded-xl bg-gradient-to-b from-fuchsia-950/40 to-cyan-950/20 ring-1 ring-white/10"})]})}var O=s(9170),K=s(2246),B=s(4794),W=s(221),H=s(8124),F=s(2101),Y=s(9985),G=s(6362),q=s(3468),J=s(6443),V=s(5287),$=s(3276),X=s(9227),Q=s(257),ee=s(1387);class et{reset(){if(this.buf=new Uint8Array(0),this.sps=null,this.pps=null,this.configured=!1,this.configuring=!1,this.ts=0,this.decoder){try{this.decoder.close()}catch(e){}this.decoder=null}}push(e){let t=new Uint8Array(e.byteLength);t.set(new Uint8Array(e)),this.buf=function(e,t){let s=new Uint8Array(e.length+t.length);return s.set(e,0),s.set(t,e.length),s}(this.buf,t),this.drainAvcc()}drainAvcc(){let e=this.buf,t=0;for(;t+4<=e.length;){var s;let n=e[s=t]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3];if(n<=0||n>6291456){this.buf=new Uint8Array(e.subarray(t+1)),t=0;continue}if(t+4+n>e.length)break;let l=e.subarray(t+4,t+4+n);t+=4+n,this.handleNal(l)}t>0&&(this.buf=new Uint8Array(e.subarray(t)))}handleNal(e){if(e.length<2)return;let t=31&e[0];if(7===t?this.sps=new Uint8Array(e):8===t&&(this.pps=new Uint8Array(e)),this.sps&&this.pps&&!this.configured&&!this.configuring&&this.configure(),!this.configured||!this.decoder||1!==t&&5!==t&&7!==t&&8!==t||7===t||8===t)return;let s=new Uint8Array(4+e.length);new DataView(s.buffer).setUint32(0,e.length,!1),s.set(e,4);try{let e=new EncodedVideoChunk({type:5===t?"key":"delta",timestamp:this.ts,data:s});this.ts+=33333,this.decoder.decode(e)}catch(e){this.onDecodeError(e.message||String(e))}}async configure(){if(this.sps&&this.pps&&!this.configured&&!this.configuring){this.configuring=!0;try{let e=function(e,t){let s=e.subarray(1),n=t.subarray(1),l=new Uint8Array(11+s.length+3+n.length),i=0;return l[i++]=1,l[i++]=e[1],l[i++]=e[2],l[i++]=e[3],l[i++]=255,l[i++]=225,l[i++]=s.length>>8&255,l[i++]=255&s.length,l.set(s,i),i+=s.length,l[i++]=1,l[i++]=n.length>>8&255,l[i++]=255&n.length,l.set(n,i),l}(this.sps,this.pps),t=function(e){let t=e=>e.toString(16).padStart(2,"0").toUpperCase();return"avc1.".concat(t(e[1])).concat(t(e[2])).concat(t(e[3]))}(this.sps),s=new VideoDecoder({output:e=>{var t;let s=this.canvas.getContext("2d");if(!s){e.close();return}(this.canvas.width!==e.displayWidth||this.canvas.height!==e.displayHeight)&&(this.canvas.width=e.displayWidth,this.canvas.height=e.displayHeight),s.drawImage(e,0,0),e.close(),null===(t=this.onFrame)||void 0===t||t.call(this)},error:e=>this.onDecodeError(String(e.message||e))});await s.configure({codec:t,description:e,optimizeForLatency:!0}),this.decoder=s,this.configured=!0}catch(e){this.onDecodeError(e.message||String(e))}finally{this.configuring=!1}}}constructor(e,t,s){this.canvas=e,this.onDecodeError=t,this.onFrame=s,this.buf=new Uint8Array(0),this.decoder=null,this.configured=!1,this.configuring=!1,this.ts=0,this.sps=null,this.pps=null}}function es(){return"undefined"!=typeof VideoDecoder&&"undefined"!=typeof VideoFrame}let en="live-hub-adb-bookmarks-v1";function el(e,t,s){let n,l,i,a;let r=e.getBoundingClientRect(),o=e.width,c=e.height;if(!o||!c)return null;let d=r.width/r.height,x=o/c;x>d?(n=r.width,l=r.width/x,i=0,a=(r.height-l)/2):(l=r.height,n=r.height*x,i=(r.width-n)/2,a=0);let u=t-r.left-i,m=s-r.top-a;return u<0||m<0||u>n||m>l?null:{x:Math.max(0,Math.min(o-1,Math.round(u/n*o))),y:Math.max(0,Math.min(c-1,Math.round(m/l*c)))}}function ei(e,t,s){let n,l,i,a;let r=e.getBoundingClientRect(),o=e.naturalWidth,c=e.naturalHeight;if(!o||!c)return null;let d=r.width/r.height,x=o/c;x>d?(n=r.width,l=r.width/x,i=0,a=(r.height-l)/2):(l=r.height,n=r.height*x,i=(r.width-n)/2,a=0);let u=t-r.left-i,m=s-r.top-a;return u<0||m<0||u>n||m>l?null:{x:Math.max(0,Math.min(o-1,Math.round(u/n*o))),y:Math.max(0,Math.min(c-1,Math.round(m/l*c)))}}let ea=[0,280,450,700,1100];function er(e){switch(e){case"usb":return{Icon:F.Z,zh:"USB",en:"USB",cls:"bg-amber-500/20 text-amber-100 ring-amber-500/35"};case"tcp":return{Icon:_.Z,zh:"网络",en:"TCP",cls:"bg-cyan-500/20 text-cyan-100 ring-cyan-500/35"};case"emulator":return{Icon:T.Z,zh:"模拟器",en:"Emu",cls:"bg-fuchsia-500/20 text-fuchsia-100 ring-fuchsia-500/35"};default:return{Icon:d.Z,zh:"?",en:"?",cls:"bg-zinc-600/30 text-zinc-400"}}}let eo="https://github.com/Genymobile/scrcpy",ec="https://github.com/viarotel-org/escrcpy";function ed(e,t){let s=t.startsWith("/")?t:"/".concat(t),n=(e||"").trim().replace(/\/$/,"");return n?"".concat(n).concat(s):s}function ex(e){var t;let{t:s,apiBase:l,fetchJson:i,serial:a,devices:r,setSerial:o,adbAvailable:c,lock:x,overview:u,onAndroidAction:m,notify:p,onRefreshDevices:b}=e,[g,f]=(0,A.useState)(0),[v,y]=(0,A.useState)(450),[j,N]=(0,A.useState)(!1),[k,_]=(0,A.useState)(null),[z,S]=(0,A.useState)(null),[C,R]=(0,A.useState)(!0),[P,L]=(0,A.useState)(""),[T,M]=(0,A.useState)(""),[E,U]=(0,A.useState)("37777"),[Z,I]=(0,A.useState)(""),[D,O]=(0,A.useState)(!1),[K,B]=(0,A.useState)([]),[W,H]=(0,A.useState)(!1),[F,ex]=(0,A.useState)(null),[eu,em]=(0,A.useState)(!1),[eh,ep]=(0,A.useState)(null),[eb,eg]=(0,A.useState)(null),[ef,ev]=(0,A.useState)(!0),ey=(0,A.useRef)(null),ew=(0,A.useRef)(null),ej=(0,A.useRef)(null),eN=(0,A.useRef)(null),ek=(0,A.useRef)(null),e_=(0,A.useRef)(null),ez=(0,A.useRef)(0),eS=(0,A.useRef)(!1),eC=(0,A.useRef)(null),eR=(0,A.useRef)(!1),eP=null===(t=r.find(e=>e.serial===a))||void 0===t?void 0:t.transport,eL=v>0,eT=a?"".concat(ed(l,"/android/screenshot"),"?serial=").concat(encodeURIComponent(a),"&ts=").concat(g).concat(eL?"&fast=1":""):"",eM=(0,A.useCallback)(()=>{f(e=>e+1)},[]),eE=(0,A.useCallback)(()=>{null!=eC.current&&(window.clearTimeout(eC.current),eC.current=null)},[]);(0,A.useEffect)(()=>{let e=()=>ev("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,A.useEffect)(()=>{try{let e=window.localStorage.getItem(en);if(e){let t=JSON.parse(e);Array.isArray(t)&&B(t.map(String).filter(Boolean).slice(0,24))}}catch(e){}},[]);let eU=e=>{let t=e.trim();if(!t)return;let n=[t,...K.filter(e=>e!==t)].slice(0,16);B(n);try{window.localStorage.setItem(en,JSON.stringify(n))}catch(e){}p(s("已保存快捷地址","Saved quick address"))};(0,A.useEffect)(()=>{if(!a||!c){S(null);return}let e=!1;return(async()=>{try{let t=await (0,ee.N)("".concat(ed(l,"/android/display_metrics"),"?serial=").concat(encodeURIComponent(a)));if(e)return;"number"==typeof t.width&&"number"==typeof t.height&&S({width:t.width,height:t.height})}catch(e){}})(),()=>{e=!0}},[l,c,a]),(0,A.useEffect)(()=>{if(!c||!a||v<=0||W||!ef)return;let e=window.setInterval(()=>f(e=>e+1),v);return()=>clearInterval(e)},[c,v,ef,a,W]),(0,A.useEffect)(()=>{ef&&c&&a&&!W&&eM()},[c,eM,ef,a,W]),(0,A.useEffect)(()=>{if(!c){eg(null);return}let e=!1;return(async()=>{try{let t=await (0,ee.N)(ed(l,"/android/scrcpy/info"));e||eg(t)}catch(e){}})(),()=>{e=!0}},[l,c]),(0,A.useEffect)(()=>{W||ep(null)},[W]),(0,A.useEffect)(()=>{ex(null),eS.current=!1},[a]),(0,A.useEffect)(()=>{let e=r.find(e=>e.serial===a),t=!!(a&&F===a);if(c&&a&&(null==e?void 0:e.state)==="device"&&(null==eb?void 0:eb.server_jar)&&es()&&!t){H(!0),y(0);return}if(t||!a||!c||eb&&!eb.server_jar||!es()||e&&"device"!==e.state){H(!1);return}},[a,r,c,eb,F]),(0,A.useEffect)(()=>{if(!W||!a||!c){var e,t;eE(),eS.current=!0,eR.current=!1,null===(e=eN.current)||void 0===e||e.close(),eN.current=null,null===(t=ek.current)||void 0===t||t.reset(),ek.current=null,em(!1);return}if(!es()){ep(s("当前浏览器不支持 WebCodecs H.264","WebCodecs H.264 not supported in this browser")),H(!1);return}let n=ej.current;if(!n)return;let i=e=>{var t;eE(),eS.current=!0,null===(t=eN.current)||void 0===t||t.close(),ep(e),H(!1),y(450),ex(a),window.setTimeout(()=>eM(),120)},r=new et(n,e=>i("".concat(s("实时画面解码失败,已切回截图模式","Live stream decode failed, using screenshot mode"),": ").concat(e)),()=>{eR.current=!0,eE()});ek.current=r,eS.current=!1,eR.current=!1;let o=new WebSocket(function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1920,n=(function(e){let t=(e||"").trim();if(t)try{let e=new URL(t,window.location.href),s="https:"===e.protocol?"wss:":"ws:";return"".concat(s,"//").concat(e.host)}catch(e){}let s=void 0!==Q&&Q.env.NEXT_PUBLIC_API_URL?String(Q.env.NEXT_PUBLIC_API_URL).trim():"";if(s)try{let e=new URL(s,window.location.href),t="https:"===e.protocol?"wss:":"ws:";return"".concat(t,"//").concat(e.host)}catch(e){}let n=window.location.port;if("3000"===n||"3001"===n){let e=window.location.hostname||"127.0.0.1";return"ws://".concat(e,":").concat("8001")}let{protocol:l,host:i}=window.location;return"".concat("https:"===l?"wss:":"ws:","//").concat(i)})(e).replace(/\/$/,""),l=new URLSearchParams({serial:t,max_size:String(s)});return"".concat(n,"/android/scrcpy/ws?").concat(l.toString())}(l,a));return eN.current=o,o.binaryType="arraybuffer",o.onopen=()=>{em(!0),ep(null),eE(),eC.current=window.setTimeout(()=>{eR.current||i(s("实时画面无首帧,已切回截图模式","No first live frame, using screenshot mode"))},5200)},o.onmessage=e=>{var t;if("string"==typeof e.data){try{let t=JSON.parse(e.data);t.error&&ep(t.error)}catch(e){}return}null===(t=ek.current)||void 0===t||t.push(e.data)},o.onerror=()=>{ep(s("WebSocket 异常","WebSocket error"))},o.onclose=()=>{var e;em(!1),null===(e=ek.current)||void 0===e||e.reset(),ek.current=null,eE(),W&&!eS.current&&i(s("实时画面连接失败,已切回截图模式","Live stream failed, using screenshot mode"))},()=>{eE(),eS.current=!0,eR.current=!1,o.close(),eN.current=null,r.reset(),ek.current===r&&(ek.current=null)}},[W,a,c,l,eM,eE,s]),(0,A.useEffect)(()=>{a&&c&&(ez.current=0,f(e=>e+1))},[a,c]);let eZ=async()=>{let e=P.trim();if(!e){p(s("填写 host:port","Enter host:port"));return}O(!0);try{let t=await i("/android/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e})});p(t.message||(t.ok?"OK":s("连接结果见日志","See message"))),b(),eM()}catch(e){p(e.message)}finally{O(!1)}},eI=async e=>{O(!0);try{let t=await i("/android/disconnect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e})});p(t.message||"OK"),b()}catch(e){p(e.message)}finally{O(!1)}},eA=async()=>{let e=T.trim(),t=parseInt(E,10)||37777,n=Z.trim();if(!e||!n){p(s("填写配对 IP 与码","Host + code required"));return}O(!0);try{let l=await i("/android/pair",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({host:e,port:t,code:n})});p(l.message||(l.ok?s("配对成功后再点连接","Paired — now Connect"):"pair"))}catch(e){p(e.message)}finally{O(!1)}},eD=async e=>{if(!C||x||!c||!a)return;let t=ew.current;if(!t)return;let n=ei(t,e.clientX,e.clientY);if(!n)return;let l=Date.now(),i=ey.current;i&&l-i.t<320&&28>Math.abs(i.x-n.x)&&28>Math.abs(i.y-n.y)?(ey.current=null,await m("double_tap",{x:n.x,y:n.y}),p(s("双击","Double tap"))):(ey.current={t:l,x:n.x,y:n.y},await m("tap",{x:n.x,y:n.y})),eM()},eO=async e=>{if(e.preventDefault(),x||!c||!a)return;let t=ew.current;if(!t)return;let n=ei(t,e.clientX,e.clientY);n&&(await m("long_press",{x:n.x,y:n.y,duration:720}),p(s("长按","Long press")),eM())},eK=async e=>{if(!C||x||!c||!a)return;let t=ej.current;if(!t)return;let n=el(t,e.clientX,e.clientY);if(!n)return;let l=Date.now(),i=ey.current;i&&l-i.t<320&&28>Math.abs(i.x-n.x)&&28>Math.abs(i.y-n.y)?(ey.current=null,await m("double_tap",{x:n.x,y:n.y}),p(s("双击","Double tap"))):(ey.current={t:l,x:n.x,y:n.y},await m("tap",{x:n.x,y:n.y})),W||eM()},eB=async e=>{if(e.preventDefault(),x||!c||!a)return;let t=ej.current;if(!t)return;let n=el(t,e.clientX,e.clientY);n&&(await m("long_press",{x:n.x,y:n.y,duration:720}),p(s("长按","Long press")),W||eM())};if(!c)return(0,n.jsx)("div",{className:"rounded-2xl border border-amber-500/25 bg-amber-500/[0.06] p-6 text-center text-sm text-amber-200/90",children:s("宿主机未安装 adb,无法使用 Live 控制台。","adb is required for the Live console.")});let eW=er(eP),eH=eW.Icon;return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-sky-500/20 bg-gradient-to-br from-sky-500/[0.08] via-zinc-950/80 to-zinc-900/90 p-4 ring-1 ring-white/[0.05]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-white/[0.06] pb-3",children:[(0,n.jsx)(Y.Z,{className:"h-4 w-4 text-sky-400"}),(0,n.jsx)("h4",{className:"text-sm font-semibold text-white",children:s("链路管理","Link manager")}),(0,n.jsx)("span",{className:"text-[10px] text-zinc-500",children:s("USB / Redroid :5555 / 无线调试(先配对再连接)","USB \xb7 Redroid :5555 \xb7 wireless (pair then connect)")})]}),(0,n.jsxs)("div",{className:"mt-3 grid gap-3 lg:grid-cols-2",children:[(0,n.jsxs)("div",{className:"space-y-2 rounded-xl border border-white/[0.06] bg-black/35 p-3",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:"adb connect"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("input",{className:"min-w-[12rem] flex-1 rounded-lg border border-white/10 bg-black/50 px-3 py-2 font-mono text-xs text-zinc-200",placeholder:"192.168.1.10:5555",value:P,onChange:e=>L(e.target.value),onKeyDown:e=>"Enter"===e.key&&void eZ()}),(0,n.jsx)("button",{type:"button",disabled:D||x,onClick:()=>void eZ(),className:"rounded-lg bg-sky-500/25 px-3 py-2 text-xs font-semibold text-sky-100 ring-1 ring-sky-400/40",children:D?"…":"Connect"}),(0,n.jsx)("button",{type:"button",disabled:D||x||!P.trim(),onClick:()=>eU(P),className:"rounded-lg border border-white/10 px-3 py-2 text-xs text-zinc-400 hover:text-zinc-200",children:s("存书签","Pin")})]}),K.length?(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-1",children:K.map(e=>(0,n.jsx)("button",{type:"button",className:"rounded-md bg-white/[0.06] px-2 py-0.5 font-mono text-[10px] text-zinc-400 hover:bg-white/10",onClick:()=>L(e),children:e},e))}):null,(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 pt-2",children:[(0,n.jsx)("button",{type:"button",disabled:D||x||!a,onClick:()=>void eI(a),className:"rounded-lg border border-rose-500/30 bg-rose-500/10 px-2.5 py-1.5 text-[10px] text-rose-200",children:s("断开当前 TCP","Disconnect current")}),(0,n.jsx)("button",{type:"button",disabled:D||x,onClick:()=>void eI(""),className:"rounded-lg border border-white/10 px-2.5 py-1.5 text-[10px] text-zinc-500 hover:text-zinc-300",children:s("断开全部 TCP","Disconnect all TCP")}),(0,n.jsxs)("button",{type:"button",disabled:D||x,onClick:()=>{b(),eM(),p(s("已刷新设备列表","Devices refreshed"))},className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-2.5 py-1.5 text-[10px] text-zinc-400",children:[(0,n.jsx)(w.Z,{className:"h-3 w-3"}),"ADB list"]})]})]}),(0,n.jsxs)("div",{className:"space-y-2 rounded-xl border border-white/[0.06] bg-black/35 p-3",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:"adb pair(无线调试)"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("input",{className:"w-32 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs",placeholder:"IP",value:T,onChange:e=>M(e.target.value)}),(0,n.jsx)("input",{className:"w-20 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs",placeholder:"port",value:E,onChange:e=>U(e.target.value)}),(0,n.jsx)("input",{className:"min-w-[6rem] flex-1 rounded-lg border border-white/10 bg-black/50 px-2 py-1.5 font-mono text-xs tracking-widest",placeholder:"123456",value:Z,onChange:e=>I(e.target.value)}),(0,n.jsx)("button",{type:"button",disabled:D||x,onClick:()=>void eA(),className:"rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs text-violet-100 ring-1 ring-violet-400/35",children:"Pair"})]}),(0,n.jsx)("p",{className:"text-[10px] leading-relaxed text-zinc-600",children:s("手机上「无线调试」会显示配对端口与 6 位码;配对成功后用上方 connect 连接 adb 显示的 IP:5555。","Use the pairing port + 6-digit code from Wireless debugging; then connect to the listed adb IP:5555.")})]})]})]}),(0,n.jsxs)("div",{className:"relative overflow-hidden rounded-3xl border border-emerald-500/25 bg-gradient-to-br from-emerald-500/[0.12] via-zinc-950/90 to-violet-500/[0.08] p-1 shadow-2xl shadow-emerald-900/20 ring-1 ring-white/[0.06]",children:[(0,n.jsx)("div",{className:"pointer-events-none absolute -right-20 -top-20 h-56 w-56 rounded-full bg-emerald-500/10 blur-3xl","aria-hidden":!0}),(0,n.jsxs)("div",{className:"relative rounded-[1.35rem] border border-white/[0.06] bg-zinc-950/80 p-4 backdrop-blur-sm",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br from-emerald-400/30 to-violet-500/25 ring-1 ring-white/10",children:(0,n.jsx)(h.Z,{className:"h-6 w-6 text-emerald-200"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-base font-semibold tracking-tight text-white",children:s("无人直播系统 \xb7 ADB 云控台","Unmanned Live System \xb7 ADB farm console")}),(0,n.jsxs)("p",{className:"mt-1 max-w-xl text-[11px] leading-relaxed text-zinc-500",children:[s("统一适配 USB / Redroid / 无线 adb:已授权设备默认走官方 scrcpy-server 的 WebSocket H.264 真流(与桌面 ","USB / Redroid / wireless adb: authorized devices default to official scrcpy-server WebSocket H.264 (same stack as "),(0,n.jsx)("a",{href:ec,target:"_blank",rel:"noreferrer",className:"text-emerald-300/90 underline-offset-2 hover:underline",children:"escrcpy"}),s(" / "," / "),(0,n.jsx)("a",{href:eo,target:"_blank",rel:"noreferrer",className:"text-emerald-300/90 underline-offset-2 hover:underline",children:"scrcpy"}),s(");无 jar 或关闭真流时用截图。","); PNG screenshot when jar missing or stream off.")]})]})]}),(0,n.jsxs)("div",{className:"flex shrink-0 flex-col gap-1.5 self-start sm:flex-row",children:[(0,n.jsxs)("a",{href:ec,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-white/10 bg-white/[0.04] px-3 py-2 text-[11px] font-medium text-zinc-300 hover:bg-white/[0.07]",children:["escrcpy",(0,n.jsx)(G.Z,{className:"h-3.5 w-3.5 opacity-70"})]}),(0,n.jsxs)("a",{href:eo,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-xl border border-white/10 bg-white/[0.04] px-3 py-2 text-[11px] font-medium text-zinc-300 hover:bg-white/[0.07]",children:["scrcpy",(0,n.jsx)(G.Z,{className:"h-3.5 w-3.5 opacity-70"})]})]})]}),r.length>0?(0,n.jsxs)("div",{className:"mt-5",children:[(0,n.jsxs)("p",{className:"mb-2 flex items-center gap-2 text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:[(0,n.jsx)(q.Z,{className:"h-3.5 w-3.5"}),s("设备矩阵","Device matrix")]}),(0,n.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-1 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:r.map(e=>{let t="device"===e.state,l=a===e.serial,i=er(e.transport),r=i.Icon;return(0,n.jsxs)("button",{type:"button",onClick:()=>o(e.serial),className:"flex min-w-[9rem] flex-col rounded-xl border px-3 py-2 text-left transition ".concat(l?"border-emerald-500/50 bg-emerald-500/15 ring-1 ring-emerald-400/30":"border-white/10 bg-black/30 hover:border-white/20"),children:[(0,n.jsxs)("span",{className:"flex items-center gap-1.5 text-xs font-medium text-zinc-200",children:[(0,n.jsx)(d.Z,{className:"h-3.5 w-3.5 text-emerald-400/80"}),(0,n.jsx)("span",{className:"truncate",children:e.model||e.serial.slice(0,10)})]}),(0,n.jsx)("span",{className:"mt-0.5 truncate font-mono text-[9px] text-zinc-600",children:e.serial}),(0,n.jsxs)("div",{className:"mt-1 flex flex-wrap gap-1",children:[(0,n.jsxs)("span",{className:"inline-flex items-center gap-0.5 rounded-md px-1.5 py-0.5 text-[9px] font-semibold ring-1 ".concat(i.cls),children:[(0,n.jsx)(r,{className:"h-2.5 w-2.5"}),s(i.zh,i.en)]}),(0,n.jsx)("span",{className:"rounded-md px-1.5 py-0.5 text-[9px] font-semibold ".concat(t?"bg-emerald-500/20 text-emerald-200":"bg-zinc-600/30 text-zinc-500"),children:e.state})]})]},e.serial)})})]}):null,(0,n.jsxs)("div",{className:"mt-6 grid gap-6 xl:grid-cols-12",children:[(0,n.jsxs)("div",{className:"xl:col-span-8",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-white/[0.06] pb-3",children:[(0,n.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:s("刷新间隔","Interval")}),ea.map(e=>(0,n.jsx)("button",{type:"button",onClick:()=>y(e),className:"rounded-lg px-2.5 py-1 text-[10px] font-semibold transition ".concat(v===e?"bg-violet-500/25 text-violet-100 ring-1 ring-violet-400/35":"bg-black/30 text-zinc-500 hover:text-zinc-300"),children:0===e?s("手动","Manual"):"".concat(e,"ms")},e)),(0,n.jsxs)("span",{className:"ml-1 inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[9px] font-medium ring-1 ".concat(eW.cls),children:[(0,n.jsx)(eH,{className:"h-3 w-3"}),"tcp"===eP?s("建议 ≥450ms","Suggest ≥450ms"):s("可试 280ms","Try 280ms")]}),(0,n.jsxs)("button",{type:"button",disabled:x,onClick:()=>void eM(),className:"ml-auto inline-flex items-center gap-1 rounded-lg border border-white/10 bg-white/[0.05] px-2.5 py-1 text-[10px] text-zinc-300 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3 w-3 ".concat(j?"animate-spin":"")}),s("下一帧","Next frame")]}),(0,n.jsx)("button",{type:"button",disabled:x||!a,onClick:()=>void m("wake"),className:"rounded-lg bg-amber-500/20 px-2.5 py-1 text-[10px] font-semibold text-amber-100 ring-1 ring-amber-500/30",children:"Wake"}),(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-[10px] text-zinc-400",children:[(0,n.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/50",checked:C,onChange:e=>R(e.target.checked)}),(0,n.jsx)(J.Z,{className:"h-3 w-3"}),s("点按穿透","Tap-through")]}),(0,n.jsxs)("button",{type:"button",disabled:x||!a||!(null==eb?void 0:eb.server_jar),title:eb&&!eb.server_jar&&eb.hint_zh?eb.hint_zh:s("官方 scrcpy-server + WebSocket H.264","Official scrcpy-server + WebSocket H.264"),onClick:()=>{H(e=>{let t=!e;return t?(ex(null),p(s("已开启实时画面(H.264 WebSocket)","Live H.264 WebSocket stream on"))):(a&&ex(a),p(s("已关闭实时画面(将使用截图)","Live stream off — screenshot mode"))),t})},className:"inline-flex items-center gap-1 rounded-lg border px-2.5 py-1 text-[10px] font-semibold transition ".concat(W?"border-cyan-400/50 bg-cyan-500/20 text-cyan-100 ring-1 ring-cyan-400/35":"border-white/10 bg-black/30 text-zinc-400 hover:text-zinc-200"),children:[(0,n.jsx)(V.Z,{className:"h-3 w-3"}),W?s("关闭真流","Stop WS"):s("实时画面","Live H.264")]})]}),eb&&!eb.server_jar?(0,n.jsxs)("p",{className:"mt-2 text-[10px] text-amber-200/80",children:[s("未检测到 scrcpy-server:启动时会自动拉取;内网可在 runtime.env 配置 SCRCPY_SERVER_DOWNLOAD_URL(支持 {tag})。","scrcpy-server missing: auto-fetched on startup; set SCRCPY_SERVER_DOWNLOAD_URL ({tag}) for mirrors."),eb.server_version?" (".concat(s("期望版本","version")," ").concat(eb.server_version,")"):null]}):null,(0,n.jsx)("p",{className:"mt-2 text-[10px] text-zinc-600",children:s("快捷键(镜像区聚焦时):H Home \xb7 B Back \xb7 R 多任务 \xb7 W 唤醒 \xb7 M 菜单","Hotkeys (mirror focused): H Home \xb7 B Back \xb7 R Recents \xb7 W Wake \xb7 M Menu")}),(0,n.jsxs)("div",{className:"relative mx-auto mt-4 max-h-[min(78vh,720px)] min-h-[280px]",children:[a?(0,n.jsxs)("div",{ref:e_,tabIndex:0,onKeyDown:e=>{if(!a||x)return;let t=e.target.tagName;if("INPUT"===t||"TEXTAREA"===t||"SELECT"===t)return;let s={h:["key",{keycode:"3"}],b:["key",{keycode:"4"}],r:["key",{keycode:"187"}],w:["wake",void 0],m:["key",{keycode:"82"}]}[e.key.toLowerCase()];s&&(e.preventDefault(),(async()=>{await m(s[0],s[1]),W||eM()})())},className:"relative flex justify-center outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/50",children:[(0,n.jsxs)("div",{className:"relative rounded-[2rem] border-[10px] border-zinc-800 bg-black shadow-inner shadow-black/80 ring-1 ring-white/10",style:{maxHeight:"min(72vh, 680px)"},children:[(0,n.jsx)("div",{className:"absolute left-1/2 top-0 z-10 h-5 w-24 -translate-x-1/2 rounded-b-xl bg-black/80"}),W?(0,n.jsx)("canvas",{ref:ej,className:"max-h-[min(72vh,680px)] w-auto max-w-full rounded-[1.35rem] object-contain ".concat(C?"cursor-crosshair":"cursor-default"),draggable:!1,onClick:eK,onContextMenu:eB}):(0,n.jsx)("img",{ref:ew,src:eT||void 0,alt:"device",className:"max-h-[min(72vh,680px)] w-auto max-w-full rounded-[1.35rem] object-contain ".concat(C?"cursor-crosshair":"cursor-default"),draggable:!1,onLoadStart:()=>{N(!0)},onLoad:()=>{N(!1),ez.current=0,_(null)},onError:()=>{N(!1),ez.current+=1,ez.current<=3?(_(null),window.setTimeout(()=>eM(),380+200*ez.current)):_(s("截图连续失败:检查 USB 授权 / 无线是否断开 / Redroid 端口","Screenshot failed repeatedly"))},onClick:eD,onContextMenu:eO})]}),eu?(0,n.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-cyan-500/90 px-2 py-0.5 text-[9px] font-bold text-cyan-950 shadow-lg",children:[(0,n.jsx)(V.Z,{className:"h-3 w-3"}),"SCRCPY\xb7WS"]}):v>0&&!W?(0,n.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-emerald-500/90 px-2 py-0.5 text-[9px] font-bold text-emerald-950 shadow-lg",children:[(0,n.jsx)($.Z,{className:"h-3 w-3"}),"LIVE"]}):W?null:(0,n.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex items-center gap-1 rounded-full bg-zinc-700/90 px-2 py-0.5 text-[9px] font-bold text-zinc-200",children:[(0,n.jsx)(X.Z,{className:"h-3 w-3"}),s("单帧","Still")]})]}):(0,n.jsx)("p",{className:"py-16 text-center text-sm text-zinc-600",children:s("请选择或连接设备","Pick or connect a device")}),eh?(0,n.jsx)("p",{className:"mt-3 text-center text-xs text-rose-300",children:eh}):null,k&&!W?(0,n.jsx)("p",{className:"mt-3 text-center text-xs text-rose-300",children:k}):null,(0,n.jsx)("p",{className:"mt-3 text-center text-[10px] text-zinc-600",children:s("左键单击 / 双击 \xb7 右键长按 \xb7 坐标对齐 PNG 像素","Left tap/double \xb7 right long-press \xb7 PNG pixel coords")})]})]}),(0,n.jsxs)("div",{className:"space-y-4 xl:col-span-4",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.07] bg-black/40 p-4",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:s("遥测","Telemetry")}),u?(0,n.jsxs)("dl",{className:"mt-3 space-y-2 font-mono text-[11px] text-zinc-400",children:[(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"device"}),(0,n.jsxs)("dd",{className:"text-right text-zinc-200",children:[u.brand," ",u.model]})]}),(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"Android"}),(0,n.jsxs)("dd",{className:"text-zinc-300",children:[u.android_version," (API ",u.sdk,")"]})]}),(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"wm size"}),(0,n.jsx)("dd",{className:"text-cyan-300/90",children:z?"".concat(z.width,"\xd7").concat(z.height):u.resolution||"—"})]}),(0,n.jsx)("div",{className:"whitespace-pre-wrap text-[10px] leading-snug text-zinc-500",children:u.battery})]}):(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-600",children:s("在上方点「刷新设备信息」","Use Refresh device info above")})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-violet-500/20 bg-gradient-to-b from-violet-500/[0.08] to-black/40 p-4",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-violet-300/80",children:s("导航坞","Nav dock")}),(0,n.jsx)("div",{className:"mt-3 grid grid-cols-3 gap-2",children:[["3","Home"],["4","Back"],["187","Recents"]].map(e=>{let[t,s]=e;return(0,n.jsx)("button",{type:"button",disabled:x||!a,onClick:()=>{m("key",{keycode:t}),eM()},className:"rounded-xl border border-white/10 bg-white/[0.06] py-3 text-xs font-semibold text-zinc-200 hover:bg-white/[0.1]",children:s},t)})}),(0,n.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:x||!a,onClick:()=>{m("key",{keycode:"24"}),eM()},className:"rounded-xl border border-white/10 bg-black/30 py-2 text-[11px] text-zinc-300",children:"Vol+"}),(0,n.jsx)("button",{type:"button",disabled:x||!a,onClick:()=>{m("key",{keycode:"25"}),eM()},className:"rounded-xl border border-white/10 bg-black/30 py-2 text-[11px] text-zinc-300",children:"Vol−"})]})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-cyan-500/15 bg-cyan-500/[0.05] p-4",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-cyan-300/80",children:s("手势","Gestures")}),(0,n.jsx)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:["up","down","left","right"].map(e=>(0,n.jsx)("button",{type:"button",disabled:x||!a,onClick:()=>{m("swipe",{direction:e}),eM()},className:"rounded-lg border border-white/10 bg-black/30 py-2 font-mono text-[10px] uppercase text-zinc-300",children:e},e))})]})]})]})]})]})]})}let eu=[{label:"getprop",cmd:"getprop ro.build.version.release"},{label:"top pkg",cmd:"dumpsys activity activities | grep -E 'mResumedActivity' | tail -n 1"},{label:"usb",cmd:"dumpsys usb | head -n 60"},{label:"surface",cmd:"dumpsys SurfaceFlinger | head -n 40"}];function em(e,t,s){return e?(0,n.jsx)("span",{className:"rounded bg-emerald-500/15 px-2 py-0.5 text-[10px] text-emerald-200",children:t}):(0,n.jsx)("span",{className:"rounded bg-zinc-500/15 px-2 py-0.5 text-[10px] text-zinc-400",children:s})}function eh(e){var t,s,l,i,a,r,o,c,d,x,u,m,h,p,b;let{t:g,notify:f,fetchJson:v,apiBase:w,busy:j,androidSerial:N,setAndroidSerial:k,devices:_,adbAvailable:z,apkPath:S,setApkPath:C,onAndroidAction:R,onCopy:P,onRefreshDevices:L}=e,[T,E]=(0,A.useState)(null),[Z,I]=(0,A.useState)(null),[D,O]=(0,A.useState)(null),[K,F]=(0,A.useState)(null),[Y,G]=(0,A.useState)(""),[q,J]=(0,A.useState)([]),[V,$]=(0,A.useState)("getprop ro.product.model"),[X,Q]=(0,A.useState)(""),[ee,et]=(0,A.useState)("300"),[es,en]=(0,A.useState)(""),[el,ei]=(0,A.useState)(null),[ea,er]=(0,A.useState)([]),[eo,ec]=(0,A.useState)(null),[ed,eh]=(0,A.useState)("https://"),[ep,eb]=(0,A.useState)(""),[eg,ef]=(0,A.useState)(!1),[ev,ey]=(0,A.useState)(null),ew=!!(j||ev),ej=_.find(e=>e.serial===N)||null,eN=(0,A.useCallback)(async()=>{if(!N||!z){E(null),I(null);return}ey("overview"),I(null);try{let e=await v("/android/overview?serial=".concat(encodeURIComponent(N)));E(e)}catch(e){E(null),I(e.message)}finally{ey(null)}},[z,N,v]),ek=(0,A.useCallback)(async()=>{F(null);try{let e=await v("/redroid/summary");O(e)}catch(e){O(null),F(e.message)}},[v]);(0,A.useEffect)(()=>{eN()},[eN]),(0,A.useEffect)(()=>{ek()},[ek]);let e_=async()=>{if(!N){f(g("请选择设备","Pick a device"));return}ey("packages");try{let e=encodeURIComponent(Y.trim()),t=await v("/android/packages?serial=".concat(encodeURIComponent(N),"&query=").concat(e,"&limit=80"));J(t.packages||[])}catch(e){f(e.message),J([])}finally{ey(null)}},ez=async()=>{if(!N){f(g("请选择设备","Pick a device"));return}let e=V.trim();if(e){ey("shell");try{var t,s;let n=await v("/android/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"shell",serial:N,payload:{command:e}})});Q(null!==(s=null!==(t=n.output)&&void 0!==t?t:n.message)&&void 0!==s?s:"")}catch(e){Q(e.message)}finally{ey(null)}}},eS=(0,A.useCallback)(async e=>{if(!N)return;let t=Math.min(3e3,Math.max(1,parseInt(ee,10)||200)),s=!!(null==e?void 0:e.silent);s||ey("logcat"),ei(null);try{var n;let e=await v("/android/logcat?serial=".concat(encodeURIComponent(N),"&lines=").concat(t));en(null!==(n=e.text)&&void 0!==n?n:"")}catch(e){en(""),ei(e.message)}finally{s||ey(null)}},[N,v,ee]);(0,A.useEffect)(()=>{if(!eg||!N||!z)return;let e=window.setInterval(()=>void eS({silent:!0}),3e3);return eS({silent:!0}),()=>clearInterval(e)},[z,N,eg,eS]);let eC=async()=>{if(!N){f(g("请选择设备","Pick a device"));return}ey("ui"),ec(null);try{let e=await v("/android/ui?serial=".concat(encodeURIComponent(N),"&limit=100"));er(e.nodes||[])}catch(e){er([]),ec(e.message)}finally{ey(null)}},eR=async(e,t)=>{ey("redroid:".concat(e));try{let s=await v("/redroid/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,name:t||""})});s.summary&&O(s.summary),f(s.message||"OK"),await ek(),L()}catch(e){f(e.message)}finally{ey(null)}},eP=async e=>{await R("key",{keycode:e})},eL=async()=>{let e=ep.trim();if(!e){f(g("请输入文字","Enter text"));return}await R("text",{text:e})},eT=async()=>{let e=ed.trim();if(!e||"https://"===e){f(g("请输入 URL","Enter URL"));return}await R("open_url",{url:e})};return(0,n.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:g("安卓设备工作台","Android workstation")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:g("USB 真机与 Redroid 共用一套控制面,优先保证 USB 真机稳定。","USB phone and Redroid share one control surface.")})]}),z?(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:ew||!N,onClick:()=>void eN(),className:"rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300",children:g("刷新设备","Refresh device")}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>{ek(),L()},className:"rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300",children:g("刷新 Redroid","Refresh Redroid")})]}):(0,n.jsx)("span",{className:"text-xs text-amber-200/90",children:g("宿主机未检测到 adb","adb not found on host")})]}),(0,n.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:_.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>k(e.serial),className:"rounded-xl border px-4 py-2 text-left text-xs ".concat(N===e.serial?"border-violet-500/50 bg-violet-500/10 text-white":"border-white/10 bg-black/30 text-zinc-400"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"font-medium text-zinc-200",children:e.model||e.serial}),e.transport?(0,n.jsx)("span",{className:"rounded bg-white/10 px-1.5 py-0.5 font-mono text-[9px] uppercase text-zinc-500",children:e.transport}):null,e.kind?(0,n.jsx)("span",{className:"rounded bg-cyan-500/10 px-1.5 py-0.5 font-mono text-[9px] uppercase text-cyan-200",children:e.kind}):null]}),(0,n.jsx)("div",{className:"text-[10px] text-zinc-600",children:e.serial}),"device"!==(e.state||"").toLowerCase()?(0,n.jsx)("div",{className:"mt-1 text-[10px] font-medium text-amber-200/90",children:"unauthorized"===e.state?g("未授权,请在手机上允许 USB 调试。","Unauthorized, allow USB debugging on device."):"".concat(g("状态","State"),": ").concat(e.state)}):null]},e.serial))}),z&&0===_.length?(0,n.jsx)("p",{className:"mt-4 rounded-lg border border-amber-500/20 bg-amber-500/5 p-3 text-xs leading-relaxed text-amber-200/90",children:g("当前没有已授权设备。USB 真机请检查调试授权;Redroid 请先启动实例,再 adb connect 127.0.0.1:5555。","No authorized devices. For USB phones, confirm USB debugging. For Redroid, start an instance then adb connect 127.0.0.1:5555.")}):null]}),(0,n.jsxs)("div",{className:"grid gap-4 xl:grid-cols-[1.1fr_0.9fr]",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-violet-500/15 bg-zinc-950/50 p-5",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-violet-300/90",children:g("真机诊断","Phone diagnostics")}),Z?(0,n.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:Z}):null,T?(0,n.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,n.jsxs)("dl",{className:"space-y-1.5 font-mono text-[11px] text-zinc-400",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"inline text-zinc-600",children:"model"})," ",(0,n.jsxs)("dd",{className:"inline text-zinc-300",children:[T.brand," ",T.model]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"inline text-zinc-600",children:"android"})," ",(0,n.jsxs)("dd",{className:"inline text-zinc-300",children:[T.android_version," (sdk ",T.sdk,")"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"inline text-zinc-600",children:"kind"})," ",(0,n.jsxs)("dd",{className:"inline text-zinc-300",children:[T.kind||(null==ej?void 0:ej.kind)||"unknown"," / ",T.transport||(null==ej?void 0:ej.transport)||"unknown"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"inline text-zinc-600",children:"display"})," ",(0,n.jsx)("dd",{className:"inline text-zinc-300",children:T.resolution})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"inline text-zinc-600",children:"rotation"})," ",(0,n.jsx)("dd",{className:"inline text-zinc-300",children:T.rotation})]}),(0,n.jsx)("div",{className:"whitespace-pre-wrap text-[10px] leading-snug text-zinc-500",children:T.battery}),(0,n.jsx)("div",{className:"line-clamp-3 text-[10px] text-zinc-500",children:T.focus})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[em(null===(t=T.diagnostics)||void 0===t?void 0:t.ready,g("已启动","Boot ready"),g("未完成启动","Boot pending")),em(null===(s=T.diagnostics)||void 0===s?void 0:s.google_play,"Google Play","No Play"),em(null===(l=T.diagnostics)||void 0===l?void 0:l.google_services,"GMS","No GMS"),em(null===(i=T.diagnostics)||void 0===i?void 0:i.magisk,"Magisk","No Magisk"),em(null===(a=T.diagnostics)||void 0===a?void 0:a.root,"Root","No root")]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/5 bg-black/20 p-3 text-[11px] text-zinc-400",children:[(0,n.jsxs)("div",{children:["boot_completed: ",(null===(r=T.diagnostics)||void 0===r?void 0:r.boot_completed)||"-"]}),(0,n.jsxs)("div",{children:["provisioned: ",(null===(o=T.diagnostics)||void 0===o?void 0:o.device_provisioned)||"-"]}),(0,n.jsxs)("div",{children:["setup_complete: ",(null===(c=T.diagnostics)||void 0===c?void 0:c.user_setup_complete)||"-"]}),(0,n.jsxs)("div",{children:["abi: ",(null===(d=T.diagnostics)||void 0===d?void 0:d.abi)||"-"]}),(0,n.jsxs)("div",{className:"truncate",children:["hardware: ",(null===(x=T.diagnostics)||void 0===x?void 0:x.hardware)||"-"]})]})]}):Z?null:(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:g("加载中","Loading")})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-cyan-500/15 bg-zinc-950/50 p-5",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-300/90",children:g("Redroid 板块","Redroid panel")}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("start"),className:"rounded-lg bg-emerald-500/20 px-3 py-1.5 text-xs text-emerald-100 ring-1 ring-emerald-500/30",children:g("启动默认实例","Start default")})]}),K?(0,n.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:K}):null,D?(0,n.jsxs)("div",{className:"mt-3 space-y-3 text-[11px] text-zinc-400",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,n.jsxs)("div",{children:["arch: ",D.arch||"-"]}),(0,n.jsxs)("div",{className:"truncate",children:["image: ",D.image||"-"]}),(0,n.jsxs)("div",{children:["profile: ",D.device_profile||"-"]}),(0,n.jsxs)("div",{children:["gpu: ",D.gpu_mode||"-"]}),(0,n.jsxs)("div",{children:["adb: 127.0.0.1:",D.default_port||5555]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[em(null===(u=D.requirements)||void 0===u?void 0:u.docker_available,"Docker","No Docker"),em(null===(m=D.requirements)||void 0===m?void 0:m.adb_available,"ADB","No ADB"),em(null===(h=D.requirements)||void 0===h?void 0:h.kvm,"KVM","No KVM"),em(null===(p=D.requirements)||void 0===p?void 0:p.binderfs,"binderfs","No binderfs")]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(D.instances||[]).map(e=>{var t,s,l,i;return(0,n.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"font-medium text-zinc-100",children:e.name}),(0,n.jsxs)("div",{className:"font-mono text-[10px] text-zinc-500",children:[e.port?"127.0.0.1:".concat(e.port):"-"," / ",e.status_text||"-"]})]}),(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("start",e.name),className:"rounded bg-emerald-500/15 px-2 py-1 text-[10px] text-emerald-200",children:"Start"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("restart",e.name),className:"rounded bg-amber-500/15 px-2 py-1 text-[10px] text-amber-200",children:"Restart"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("adb_connect",e.name),className:"rounded bg-cyan-500/15 px-2 py-1 text-[10px] text-cyan-200",children:"ADB"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eR("stop",e.name),className:"rounded bg-rose-500/15 px-2 py-1 text-[10px] text-rose-200",children:"Stop"})]})]}),(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[em(null===(t=e.diagnostics)||void 0===t?void 0:t.ready,g("系统就绪","System ready"),g("启动中","Booting")),em(null===(s=e.diagnostics)||void 0===s?void 0:s.google_play,"Play","No Play"),em(null===(l=e.diagnostics)||void 0===l?void 0:l.magisk,"Magisk","No Magisk"),em(null===(i=e.diagnostics)||void 0===i?void 0:i.root,"Root","No root")]}),e.data_dir?(0,n.jsx)("div",{className:"mt-2 truncate font-mono text-[10px] text-zinc-500",children:e.data_dir}):null]},e.name)}),(null===(b=D.instances)||void 0===b?void 0:b.length)?null:(0,n.jsx)("p",{className:"rounded-xl border border-white/5 bg-black/20 p-3 text-xs text-zinc-500",children:g("当前没有 Redroid 实例。默认动作会创建 redroid13-1。","No Redroid instances yet. Default actions create redroid13-1.")})]})]}):(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:g("读取 Redroid 状态中","Loading Redroid status")})]})]}),(0,n.jsx)(ex,{t:g,apiBase:w,fetchJson:v,serial:N,devices:_,setSerial:k,adbAvailable:z,lock:ew,overview:T,onAndroidAction:R,notify:f,onRefreshDevices:L}),z&&N?(0,n.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-300/90",children:g("快捷控制","Quick controls")}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eP("3"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Home"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eP("4"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Back"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eP("187"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Recents"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("wake"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Wake"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("launch_package",{package:"com.zhiliaoapp.musically"}),className:"rounded-lg bg-gradient-to-r from-pink-500/25 to-violet-500/25 px-3 py-1.5 text-xs ring-1 ring-white/10",children:"TikTok"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eP("24"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Vol+"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eP("25"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Vol-"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eP("66"),className:"rounded-lg border border-white/10 bg-white/[0.04] px-3 py-1.5 text-xs",children:"Enter"})]}),(0,n.jsx)("p",{className:"mt-3 text-[10px] text-zinc-600",children:g("滑动手势","Swipe gestures")}),(0,n.jsx)("div",{className:"mt-1 flex flex-wrap gap-2",children:["up","down","left","right"].map(e=>(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("swipe",{direction:e}),className:"rounded-lg border border-white/10 bg-black/30 px-2.5 py-1 font-mono text-[10px] uppercase text-zinc-300",children:e},e))}),(0,n.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-black/20 p-3",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:g("ADB 文本输入","ADB text input")}),(0,n.jsxs)("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row",children:[(0,n.jsx)("input",{className:"min-w-0 flex-1 rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-xs",value:ep,onChange:e=>eb(e.target.value),placeholder:"hello / 123",onKeyDown:e=>{"Enter"===e.key&&eL()}}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eL(),className:"rounded-lg bg-emerald-500/20 px-3 py-2 text-xs text-emerald-100 ring-1 ring-emerald-500/30",children:g("发送","Send")})]})]}),(0,n.jsxs)("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,n.jsx)("input",{className:"min-w-0 flex-1 rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-xs",value:ed,onChange:e=>eh(e.target.value),placeholder:"https://"}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eT(),className:"rounded-lg bg-violet-500/20 px-3 py-2 text-xs text-violet-100 ring-1 ring-violet-500/30",children:g("打开链接","Open URL")})]})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,n.jsxs)("h4",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-cyan-300/90",children:[(0,n.jsx)(M.Z,{className:"h-4 w-4"}),g("USB 真机优化建议","USB optimization")]}),(0,n.jsxs)("ul",{className:"mt-3 space-y-2 text-xs leading-relaxed text-zinc-400",children:[(0,n.jsx)("li",{children:g("优先使用主板直连 USB,不要经过不稳的 HUB。","Prefer direct motherboard USB, not unstable hubs.")}),(0,n.jsx)("li",{children:g("开发板端固定 adb server,避免频繁 kill-server。","Keep adb server stable and avoid frequent kill-server.")}),(0,n.jsx)("li",{children:g("镜像页默认支持 scrcpy H.264 真流,截图模式作为回退。","Use scrcpy H.264 live stream first, screenshot mode as fallback.")}),(0,n.jsx)("li",{children:g("如果 TikTok / YouTube App 直播,要先确认屏幕常亮、分辨率稳定、USB 供电足够。","For TikTok / YouTube app live, keep screen on, resolution stable, and USB power sufficient.")})]})]})]}):null,z&&N?(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(B.Z,{className:"h-4 w-4 text-emerald-400"}),g("包名搜索与启动","Packages")]}),(0,n.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row",children:[(0,n.jsx)("input",{className:"min-w-0 flex-1 rounded-xl border border-white/10 bg-black/40 px-4 py-2 text-sm",value:Y,onChange:e=>G(e.target.value),placeholder:"tiktok / musically / youtube",onKeyDown:e=>{"Enter"===e.key&&e_()}}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void e_(),className:"rounded-xl bg-emerald-500/20 px-4 py-2 text-sm text-emerald-100 ring-1 ring-emerald-500/30",children:g("搜索","Search")})]}),(0,n.jsxs)("ul",{className:"mt-4 max-h-48 space-y-1 overflow-y-auto rounded-lg border border-white/5 bg-black/30 p-2 font-mono text-[11px]",children:[q.map(e=>(0,n.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 py-1 text-zinc-400",children:[(0,n.jsx)("span",{className:"min-w-0 truncate text-zinc-300",children:e.package}),(0,n.jsxs)("span",{className:"flex shrink-0 gap-1",children:[(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("launch_package",{package:e.package}),className:"rounded bg-white/10 px-2 py-0.5 text-[10px] text-zinc-200",children:g("启动","Launch")}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("force_stop",{package:e.package}),className:"rounded bg-rose-500/15 px-2 py-0.5 text-[10px] text-rose-200",children:g("停止","Stop")})]})]},e.package)),q.length?null:(0,n.jsx)("li",{className:"py-2 text-center text-zinc-600",children:g("暂无结果","No results")})]})]}):null,z&&N?(0,n.jsxs)("div",{className:"grid gap-6 xl:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(W.Z,{className:"h-4 w-4 text-amber-400"}),"ADB shell"]}),(0,n.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:eu.map(e=>(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>$(e.cmd),className:"rounded-md border border-white/10 bg-white/[0.04] px-2 py-1 text-[10px] text-zinc-400 hover:text-zinc-200",children:e.label},e.label))}),(0,n.jsx)("textarea",{className:"mt-3 min-h-[100px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-3 font-mono text-xs text-zinc-200",value:V,onChange:e=>$(e.target.value),spellCheck:!1,onKeyDown:e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),ez())}}),(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void ez(),className:"rounded-xl bg-amber-500/20 px-4 py-2 text-sm text-amber-100 ring-1 ring-amber-500/30",children:"shell"===ev?(0,n.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}),"Run"]}):"Run"}),X?(0,n.jsxs)("button",{type:"button",disabled:!X,onClick:()=>P(X),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1.5 text-xs text-zinc-400 hover:text-zinc-200",children:[(0,n.jsx)(U.Z,{className:"h-3.5 w-3.5"}),g("复制输出","Copy")]}):null]}),X?(0,n.jsx)("pre",{className:"mt-3 max-h-64 overflow-auto whitespace-pre-wrap rounded-lg border border-white/5 bg-black/40 p-3 font-mono text-[11px] text-zinc-400 xl:max-h-[min(24rem,50vh)]",children:X}):null]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:g("Logcat","Logcat")}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,n.jsx)("input",{className:"w-24 rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-xs",value:ee,onChange:e=>et(e.target.value)}),(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-[11px] text-zinc-400",children:[(0,n.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:eg,onChange:e=>ef(e.target.checked)}),g("每 3 秒自动刷新","Auto every 3s")]}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eS(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:g("拉取日志","Pull logs")}),es?(0,n.jsxs)("button",{type:"button",onClick:()=>P(es),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1.5 text-xs text-zinc-400 hover:text-zinc-200",children:[(0,n.jsx)(U.Z,{className:"h-3.5 w-3.5"}),g("复制","Copy")]}):null]}),el?(0,n.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:el}):null,es?(0,n.jsx)("pre",{className:"mt-3 max-h-72 overflow-auto whitespace-pre-wrap rounded-lg border border-white/5 bg-black/50 p-3 font-mono text-[10px] leading-tight text-zinc-500 xl:max-h-[min(24rem,50vh)]",children:es}):null]})]}):null,z&&N?(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(H.Z,{className:"h-4 w-4 text-fuchsia-400"}),g("界面节点","UI nodes")]}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void eC(),className:"mt-3 rounded-xl border border-fuchsia-500/30 bg-fuchsia-500/10 px-4 py-2 text-sm text-fuchsia-100",children:g("刷新节点","Refresh nodes")}),eo?(0,n.jsx)("p",{className:"mt-2 text-xs text-rose-300",children:eo}):null,(0,n.jsxs)("ul",{className:"mt-3 max-h-64 space-y-1 overflow-y-auto rounded-lg border border-white/5 bg-black/30 p-2 text-[11px]",children:[ea.map((e,t)=>(0,n.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-white/[0.04] py-1.5 text-zinc-400 last:border-0",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("span",{className:"text-zinc-200",children:e.label}),e.resource_id?(0,n.jsx)("span",{className:"ml-2 font-mono text-[10px] text-zinc-600",children:e.resource_id}):null,(0,n.jsxs)("div",{className:"font-mono text-[10px] text-zinc-600",children:["(",e.center_x,", ",e.center_y,")",e.clickable?" click":""]})]}),(0,n.jsx)("button",{type:"button",disabled:ew,onClick:()=>void R("tap",{x:e.center_x,y:e.center_y}),className:"shrink-0 rounded bg-white/10 px-2 py-1 text-[10px] text-zinc-200",children:"Tap"})]},"".concat(e.center_x,"-").concat(e.center_y,"-").concat(t))),ea.length||eo?null:(0,n.jsx)("li",{className:"py-4 text-center text-zinc-600",children:g("尚未加载","Not loaded")})]})]}):null,z&&N?(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:g("安装 APK","Install APK")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:g("先 adb push 到 /sdcard/ 再执行安装。","Push the APK to /sdcard/ first.")}),(0,n.jsx)("input",{className:"mt-4 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm",value:S,onChange:e=>C(e.target.value)}),(0,n.jsx)("button",{type:"button",disabled:ew||!z||!N,onClick:()=>void R("install_apk",{path:S}),className:"mt-3 rounded-xl bg-emerald-500/20 px-4 py-2 text-sm font-medium text-emerald-100 ring-1 ring-emerald-500/30",children:"pm install"})]}):null]})}var ep=s(9897),eb=s(4554),eg=s(7689),ef=s(8401);function ev(e){let{t,title:s,subtitle:l,steps:i,onNavigate:a}=e;return(0,n.jsxs)("div",{className:"rounded-2xl border border-violet-500/25 bg-gradient-to-br from-violet-500/10 via-zinc-950/40 to-fuchsia-500/5 p-6 shadow-lg shadow-violet-900/10",children:[(0,n.jsx)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:s}),(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-400",children:l}),(0,n.jsx)("div",{className:"mt-6 flex flex-col items-center gap-4 sm:flex-row sm:flex-wrap sm:justify-center",children:i.map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[e.openUrl||e.target&&a?(0,n.jsxs)("button",{type:"button",onClick:()=>{if(e.openUrl){window.open((0,ef.p)(e.openUrl),"_blank","noopener,noreferrer");return}e.target&&a&&a(e.target)},className:"flex min-h-[4rem] min-w-[7rem] flex-col items-center justify-center rounded-2xl bg-gradient-to-br px-4 py-2 text-center text-xs font-bold text-white shadow-lg ring-2 ring-white/10 transition hover:ring-violet-400/50 hover:brightness-110 ".concat(e.gradient),children:[(0,n.jsx)("span",{children:e.label}),e.sub?(0,n.jsx)("span",{className:"mt-1 text-[10px] font-normal text-white/80",children:e.sub}):null]}):(0,n.jsxs)("div",{className:"flex min-h-[4rem] min-w-[7rem] flex-col items-center justify-center rounded-2xl bg-gradient-to-br px-4 py-2 text-center text-xs font-bold text-white shadow-lg ".concat(e.gradient),children:[(0,n.jsx)("span",{children:e.label}),e.sub?(0,n.jsx)("span",{className:"mt-1 text-[10px] font-normal text-white/80",children:e.sub}):null]}),t8?e.slice(-8):e;if(e.includes("live2/")){let t=e.split("/"),s=t[t.length-1]||"";return s.length>8?s.slice(-8):s}}}let t=e.trim();return!t||t.includes("\n")||t.toLowerCase().startsWith("rtmp")?"":t.length>8?t.slice(-8):t}function ez(e){let t=[];for(let s of e.split(/\r?\n/)){let e=s.trim();if(!e||e.startsWith("#")||!/douyin\.com|v\.douyin\.com/i.test(e))continue;let n=e.match(/(https?:\/\/live\.douyin\.com\/[a-zA-Z0-9_-]+)/i);if(n){t.push(n[1].replace(/^http:\/\//i,"https://"));continue}let l=e.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);if(l){t.push("https://live.douyin.com/".concat(l[1]));continue}let i=e.match(/(\d{8,})/);i&&t.push("https://live.douyin.com/".concat(i[1]))}return Array.from(new Set(t)).slice(0,16)}function eS(e){let t=(e||"").trim().replace(/^[\s"'`[\]()()【】]+|[\s"'`[\]()()【】]+$/g,"");return!(t=(t=(t=(t=t.replace(/^(?:主播|房间名|直播间|抖音源|源站|标题)\s*[::]\s*/i,"")).replace(/https?:\/\/(?:www\.)?live\.douyin\.com\/[a-zA-Z0-9_-]+/gi,"")).replace(/(?:等待直播|正在直播|直播中|已开播|开始推流|主播已下播|下播|录制中|推流中).*$/i,"")).trim().replace(/^[\s,,;;||\-—::]+|[\s,,;;||\-—::]+$/g,""))||/^[-—_无未知]+$/i.test(t)||/^(unknown|null|undefined|none|nan)$/i.test(t)||/live\.douyin\.com/i.test(t)||/^\d{5,}$/.test(t)||/^(监测|格式|错误|无录制任务)/.test(t)?"":t.slice(0,48)}function eC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=function(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(!e||e.startsWith("#"))continue;let s=e.match(/https?:\/\/(?:www\.)?live\.douyin\.com\/[a-zA-Z0-9_-]+/i);if(!s||null==s.index)continue;let n=eS(e.slice(s.index+s[0].length));if(n)return n;let l=e.split(/[,,||]/,2);if(l.length>1){let e=eS(l[1]);if(e)return e}}return""}(e)||function(e){var t,s,n;let l=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).slice(-160),i=/(?:主播|房间名|直播间|抖音源|源站|标题)\s*[::]\s*(.{1,80})/i,a=/(?:序号\s*\d+\s*)?(.{1,80}?)\s*(?:等待直播|主播已下播|下播)/i,r=/(?:获取失败|错误|异常|error|failed|exception)/i;for(let e of[/(?:正在录制|录制中)\s*\d*\s*个?\s*[::]\s*([^\[\r\n]{1,80})/i,/(?:序号\s*\d+\s*)?(.{1,80}?)\s*(?:正在直播中|正在直播|直播中|已开播|开始推流|录制中|推流中)/i])for(let s=l.length-1;s>=0;s-=1){let n=eS((null===(t=l[s].match(e))||void 0===t?void 0:t[1])||"");if(n)return n}for(let e=l.length-1;e>=0;e-=1){if(r.test(l[e]))continue;let t=eS((null===(s=l[e].match(i))||void 0===s?void 0:s[1])||"");if(t)return t}for(let e=l.length-1;e>=0;e-=1){let t=eS((null===(n=l[e].match(a))||void 0===n?void 0:n[1])||"");if(t)return t}return""}(t);if(s)return s;let n=eR(t)||eP(e)[0]||"";return n?"抖音直播间 ".concat(n):""}function eR(e){if(!e)return null;let t=null;for(let s of e.split(/\r?\n/)){let e=s.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);e&&(t=e[1]);let n=s.match(/https?:\/\/[^/\s]*douyin\.com\/(\d{8,})/i);n&&(t=n[1])}return t}function eP(e){let t=[];for(let s of e.split(/\r?\n/)){let e=s.trim();if(!e||e.startsWith("#")||!/douyin\.com|v\.douyin\.com/i.test(e))continue;let n=e.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i);if(n){t.push(n[1]);continue}let l=e.match(/(\d{8,})/);t.push(l?l[1]:e.slice(0,96))}return Array.from(new Set(t)).slice(0,12)}function eL(e){let t="",s=!0,n="",l=!0,i=e.split(/\r?\n/),a=!1;for(let e of i){let i=e.trim();if(/^\[youtube\]/i.test(i)){a=!0;continue}if(/^\[/.test(i)){a=!1;continue}if(!a||!i||i.startsWith("#")||i.startsWith(";"))continue;let r=i.indexOf("=");if(r<0)continue;let o=i.slice(0,r).trim().toLowerCase(),c=i.slice(r+1).trim().split(/[#;]/)[0].trim();"key"===o||"stream_key"===o?t=c:"rtmps"===o?s=!/^(0|false|否)/i.test(c):"bitrate"===o?n=c:"fast_audio"===o&&(l=/^(1|true|yes|是|开|on)/i.test(c))}return{key:t,rtmps:s,bitrate:n,fastAudio:l}}function eT(e){return"URL_config.".concat(e.replace(/[^a-zA-Z0-9_.-]/g,"_"),".ini")}function eM(e){let t=e.bitrate.trim()?"bitrate = ".concat(e.bitrate.trim()):"# bitrate = 4000";return"[youtube]\n# YouTube 推流 key(工作室 → 直播 → 串流密钥)\nkey = ".concat(e.key.trim(),"\n\n# 使用 RTMPS;填 否 则 RTMP\nrtmps = ").concat(e.rtmps?"是":"否","\n\n# 视频比特率 kbps(可选)\n").concat(t,"\n\n# 轻量音频链,减轻 CPU:1 / 是\nfast_audio = ").concat(e.fastAudio?"1":"0","\n")}function eE(e){if(e<60)return"".concat(e,"s");let t=Math.floor(e/60);return t<60?"".concat(t,"m ").concat(e%60,"s"):"".concat(Math.floor(t/60),"h ").concat(t%60,"m")}function eU(e){var t,s,l;let{t:i,currentProc:a,fetchJson:r,urlListText:o,keySuffixUi:c,showKeyRow:d=!0,pollMs:x=1e3,refreshToken:u=0,monitorRow:m}=e,[h,p]=(0,A.useState)(""),[b,g]=(0,A.useState)(""),[f,v]=(0,A.useState)(""),[y,j]=(0,A.useState)(""),[N,k]=(0,A.useState)(""),[_,z]=(0,A.useState)([]),[S,C]=(0,A.useState)(null),[R,P]=(0,A.useState)(""),[L,T]=(0,A.useState)(""),[M,E]=(0,A.useState)(""),[U,Z]=(0,A.useState)(""),[I,D]=(0,A.useState)(!1),[O,K]=(0,A.useState)(!1),[B,W]=(0,A.useState)(!1),[H,F]=(0,A.useState)(!1),[Y,q]=(0,A.useState)(null),[J,V]=(0,A.useState)(0),[Q,ee]=(0,A.useState)(!0),et=(0,A.useRef)(null),es=(0,A.useRef)(null),en=(0,A.useRef)(!1),el=(0,A.useRef)(!1),ei=(0,A.useRef)(!1),ea=(0,A.useRef)(a),er=(0,A.useRef)(0),eo=eP(o),ec=/^(online|running)$/i.test(h),ed=eR(b),ex=ez(o),eu=null!==(s=ex[0])&&void 0!==s?s:"",em=B||!!(null==m?void 0:m.is_pushing)||["streaming","relay_slow"].includes(y.trim().toLowerCase()),eh="number"==typeof(null==m?void 0:m.ffmpeg_speed)?m.ffmpeg_speed.toFixed(2):null,ep="number"==typeof(null==m?void 0:m.ffmpeg_frame)?String(m.ffmpeg_frame):null,eb=_.length?_.join(", "):em||(null==m?void 0:m.ffmpeg_active)?i("转推活跃(PID 未采集)","Relay active (PID n/a)"):i("无","none"),eg=I&&em&&!O,ef=eg?"":L,ev=eg?"":M,ew=ex.length>1&&em&&!ev&&!ef&&!ed&&(I||!!U||!!R),ej=ef||ed||(ew?null:null!==(l=null===(t=eu.match(/live\.douyin\.com\/([a-zA-Z0-9_-]+)/i))||void 0===t?void 0:t[1])&&void 0!==l?l:null),eN=ev||(ef?"https://live.douyin.com/".concat(ef):"")||(ed?"https://live.douyin.com/".concat(ed):"")||(ew?null:eu||null),ek=eg?eC("",b):eC(o,b),e_=(eg?"":U)||(eg?"":R)||ek||(ej?"抖音直播间 ".concat(ej):""),eS="youtube_key_rejected"===y.trim().toLowerCase(),eL=(0,A.useCallback)(async()=>{let e=ea.current.trim();if(!e)return;if(el.current){ei.current=!0;return}el.current=!0;let t=++er.current;try{let s=await r("/status?process=".concat(encodeURIComponent(e),"&light=1"));if(t!==er.current||e!==ea.current.trim())return;let n=s.process_status||"unknown";p(n),g(s.recent_log||""),v(s.recent_error||""),j(s.business_status||""),k(s.business_note||""),z(Array.isArray(s.ffmpeg_pids)?s.ffmpeg_pids:[]),C("number"==typeof s.log_age_seconds?s.log_age_seconds:null),P(s.source_title||""),T(s.source_room_id||""),E(s.source_url||""),Z(s.source_display||""),D(!!s.source_ambiguous),K(!!s.source_current),W(!!s.is_pushing);let l=/^(online|running)$/i.test(n);l&&!en.current&&q(Date.now()),l||q(null),en.current=l}catch(s){if(t!==er.current||e!==ea.current.trim())return;p("error"),j("error"),k(""),z([]),C(null),P(""),T(""),E(""),Z(""),D(!1),K(!1),W(!1)}finally{el.current=!1,ei.current&&(ei.current=!1,window.setTimeout(()=>void eL(),0))}},[r]);(0,A.useEffect)(()=>{if(ea.current=a,er.current+=1,ei.current=!1,!a){p(""),g(""),v(""),j(""),k(""),z([]),C(null),P(""),T(""),E(""),Z(""),D(!1),K(!1),W(!1),q(null),en.current=!1;return}p(""),g(""),v(""),j(""),k(""),z([]),C(null),P(""),T(""),E(""),Z(""),D(!1),K(!1),W(!1),q(null),en.current=!1,eL()},[a,eL]),(0,A.useEffect)(()=>{let e=()=>ee("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,A.useEffect)(()=>{a&&eL()},[a,eL,u]),(0,A.useEffect)(()=>{if(H||!a||x<=0)return;let e=window.setInterval(()=>void eL(),x);return()=>clearInterval(e)},[H,a,eL,x]),(0,A.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&eL()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[eL]),(0,A.useEffect)(()=>{if(!Y)return;let e=window.setInterval(()=>V(e=>e+1),1e3);return()=>clearInterval(e)},[Y]),(0,A.useEffect)(()=>{if(H||!Q)return;let e=et.current;e&&(e.scrollTop=e.scrollHeight)},[b,H,Q]),(0,A.useEffect)(()=>{if(H||!Q)return;let e=es.current;e&&(e.scrollTop=e.scrollHeight)},[f,H,Q]);let eT=null==Y?i("—(未检测到在线)","— (not online)"):eE(Math.max(0,Math.floor((Date.now()-Y)/1e3))),eM=H?i("已暂停刷新","Paused"):x<=0?i("已暂停","Paused"):x>=3e4?i("约 30 秒","~30s"):x>=15e3?i("约 15 秒","~15s"):x>=12e3?i("约 12 秒","~12s"):x>=5e3?i("约 5 秒","~5s"):x>=2500?i("约 2.5 秒","~2.5s"):x>=2e3?i("约 2 秒","~2s"):x>=800?i("约 1 秒","~1s"):"".concat(x,"ms"),eU=H?"bg-amber-500/20 text-amber-100 ring-amber-500/35":x>=3e4?"bg-sky-500/15 text-sky-100 ring-sky-500/25":x>=4e3?"bg-zinc-500/15 text-zinc-200/90 ring-zinc-500/25":"bg-emerald-500/15 text-emerald-200/90 ring-emerald-500/25";return(0,n.jsxs)("section",{className:"rounded-2xl border border-emerald-500/20 bg-gradient-to-b from-emerald-500/[0.07] to-zinc-950/80 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsx)("span",{className:"sr-only","aria-hidden":!0,children:J}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:i("当前直播日志","Live process log")}),em?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-emerald-500/15 px-2.5 py-0.5 text-[10px] font-medium text-emerald-100 ring-1 ring-emerald-500/25",children:[(0,n.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,n.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-70"}),(0,n.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-emerald-400"})]}),i("推流中","Pushing")]}):null,(0,n.jsx)("span",{className:"rounded-full bg-white/10 px-2 py-0.5 font-mono text-[10px] text-zinc-300 ring-1 ring-white/10",children:a||"—"}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-medium ring-1 ".concat(eU),children:eM})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsxs)("button",{type:"button",onClick:()=>void eL(),className:"inline-flex items-center gap-1 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5"}),i("立即拉取","Refresh")]}),(0,n.jsxs)("button",{type:"button",onClick:()=>F(e=>!e),className:"inline-flex items-center gap-1 rounded-lg px-3 py-1.5 text-xs ring-1 ".concat(H?"bg-amber-500/20 text-amber-100 ring-amber-500/35":"border border-white/10 bg-black/30 text-zinc-300"),children:[H?(0,n.jsx)($.Z,{className:"h-3.5 w-3.5"}):(0,n.jsx)(X.Z,{className:"h-3.5 w-3.5"}),H?i("继续自动刷新","Resume"):i("暂停自动刷新","Pause")]})]})]}),(0,n.jsxs)("div",{className:"mt-4 space-y-3 rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:i("进程状态","Process")}),(0,n.jsx)("span",{className:"mt-2 inline-flex rounded-full px-2.5 py-0.5 text-[11px] font-medium ring-1 ".concat(function(e){let t=(e||"").trim().toLowerCase();return"online"===t||"running"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"stopped"===t||"stopping"===t?"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25":"not_found"===t||"errored"===t||"error"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"}(h)),children:function(e,t){let s=(t||"unknown").toLowerCase();return"online"===s||"running"===s?e("运行中(PM2/进程在线)","Running (process online)"):"stopped"===s||"stopping"===s?e("已停止","Stopped"):"not_found"===s||"errored"===s?e("未运行或未找到","Not running / not found"):"invalid"===s?e("无效进程名","Invalid process"):t||"—"}(i,h)})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:i("业务状态","Business")}),(0,n.jsx)("span",{className:"mt-2 inline-flex max-w-full rounded-full px-2.5 py-0.5 text-[11px] font-medium ring-1 ".concat(function(e){let t=(e||"").trim().toLowerCase();return"streaming"===t||"relay_slow"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"waiting_source"===t||"monitoring"===t||"source_live"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"misconfigured"===t||"youtube_key_rejected"===t||"error"===t||"stale"===t||"source_stalled"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"}(y)),title:function(e,t,s){let n=(t||"").toLowerCase();return"streaming"===n?e("正在推流到 YouTube","Pushing to YouTube"):"relay_slow"===n?e("推流速度偏低","Relay running slowly"):"waiting_source"===n?e("等待上游直播源开播","Waiting for the upstream live source"):"source_live"===n?e("源站已开播,转推 Worker 未启动","Source live detected, but no active FFmpeg relay worker"):"monitoring"===n?e("进程在线,监控源站中","Process online and monitoring the source"):"misconfigured"===n?e("YouTube 密钥缺失或无效","YouTube key missing or invalid"):"youtube_key_rejected"===n?e("YouTube 推流失败:串流密钥无效、过期或不属于当前直播间","YouTube rejected the stream key"):"source_stalled"===n?e("上游源站卡住","Upstream source stalled"):"stale"===n?e("进程在线但日志心跳过期","Process online but the log heartbeat is stale"):"error"===n?e("检测到近期进程错误","Recent process error detected"):(null==s?void 0:s.trim())?s.trim():e("暂无业务状态","No business-state hint yet")}(i,y,N),children:function(e,t){let s=(t||"").toLowerCase();return"streaming"===s?e("推流中","Pushing"):"relay_slow"===s?e("低速","Slow"):"waiting_source"===s?e("等源","Wait source"):"source_live"===s?e("源开播","Source live"):"monitoring"===s?e("监控中","Monitoring"):"misconfigured"===s?e("密钥异常","Key invalid"):"youtube_key_rejected"===s?e("密钥被拒","Key rejected"):"source_stalled"===s?e("源卡住","Stalled"):"stale"===s?e("心跳过期","Stale"):"error"===s?e("异常","Error"):e("未知","Unknown")}(i,y)})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:i("本次在线时长(估算)","Online duration (est.)")}),(0,n.jsx)("p",{className:"mt-2 font-mono text-sm font-semibold text-cyan-200/90",children:eT})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:i("FFmpeg workers","FFmpeg workers")}),(0,n.jsx)("p",{className:"mt-2 font-mono text-sm text-zinc-200",children:eb}),eh||ep?(0,n.jsxs)("p",{className:"mt-1 font-mono text-[10px] text-zinc-500",children:[eh?"speed ".concat(eh,"x"):"",eh&&ep?" \xb7 ":"",ep?"frame ".concat(ep):""]}):null,null!=S?(0,n.jsxs)("p",{className:"mt-1 text-[10px] text-zinc-600",children:[i("日志心跳","Log heartbeat")," ",eE(Math.max(0,Math.floor(S)))]}):null]})]}),e_?(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.05] bg-black/20 px-3 py-2.5",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:i("当前转播源","Current relay source")}),(0,n.jsx)("p",{className:"mt-1 text-sm font-medium text-zinc-200",children:e_})]}):null,d?(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs",children:[(0,n.jsx)("span",{className:"text-zinc-500",children:i("YouTube key 尾码(参考)","YT key suffix")}),(0,n.jsx)("span",{className:"font-mono text-zinc-300",children:c||"—"})]}):null,eS?(0,n.jsx)("div",{className:"rounded-lg border border-rose-500/30 bg-rose-500/[0.10] px-3 py-2.5 text-xs text-rose-100 ring-1 ring-rose-500/15",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(ey.Z,{className:"mt-0.5 h-4 w-4 shrink-0 text-rose-300","aria-hidden":!0}),(0,n.jsx)("p",{children:i("YouTube 已拒绝本次 RTMPS 推流。请从 YouTube Studio 当前直播间复制完整串流密钥,保存到当前线路后重新开始;如果密钥确认无误,再检查到 YouTube RTMPS 的网络/代理。","YouTube rejected this RTMPS publish. Copy the full stream key for the current live event from YouTube Studio, save it to this lane, then start again; if the key is correct, check network/proxy access to YouTube RTMPS.")})]})}):null,eN?(0,n.jsxs)("div",{className:"rounded-lg border border-violet-500/20 bg-violet-500/[0.06] px-3 py-2.5",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium text-zinc-400",children:ed?i("当前直播源站(日志)","Current source (from log)"):ec?i("配置中的源站地址","Configured source URL"):i("源站快捷入口","Source quick link")}),(0,n.jsxs)("a",{href:eN,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs font-medium text-violet-100 ring-1 ring-violet-500/35 transition hover:bg-violet-500/30",children:[(0,n.jsx)(G.Z,{className:"h-3.5 w-3.5 shrink-0 opacity-90"}),e_||i("打开抖音直播页","Open Douyin live")]})]}),ej&&e_&&!e_.includes(ej)?(0,n.jsxs)("p",{className:"mt-2 font-mono text-[10px] text-zinc-600",children:["room:",ej]}):null,eo.length>1&&ed?(0,n.jsxs)("p",{className:"mt-2 text-[10px] text-zinc-600",children:[i("配置中还有","Also in config:")," ",eo.filter(e=>e!==ej).slice(0,3).map(e=>(0,n.jsx)("a",{href:"https://live.douyin.com/".concat(e),target:"_blank",rel:"noreferrer",className:"ml-1 text-violet-400/90 underline-offset-2 hover:underline",children:e},e)),eo.length>4?"…":null]}):null]}):(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:i("(日志与地址列表中暂无抖音房间)","(No Douyin room in log or URL list)")})]}),"not_found"!==h&&"invalid"!==h?(0,n.jsxs)("div",{className:"mt-4 grid gap-4 lg:grid-cols-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-emerald-400/90",children:i("进程输出(stdout / 合并日志)","Process output")}),(0,n.jsx)("pre",{ref:et,className:"log-live-scroll mt-2 max-h-[min(22rem,42vh)] min-h-[12rem] overflow-auto whitespace-pre-wrap rounded-xl border border-emerald-500/20 bg-black/55 p-3 font-mono text-[10px] leading-relaxed text-emerald-100/95",children:b.trim()||i("(暂无)","(empty)")})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-rose-400/90",children:i("异常信息(stderr)","Stderr")}),(0,n.jsx)("pre",{ref:es,className:"log-live-scroll mt-2 max-h-[min(22rem,42vh)] min-h-[12rem] overflow-auto whitespace-pre-wrap rounded-xl border border-rose-500/20 bg-black/55 p-3 font-mono text-[10px] leading-relaxed text-rose-100/95",children:f.trim()||i("(暂无)","(empty)")})]})]}):(0,n.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:i("进程未在 PM2 / 本地注册表中运行,日志区域已隐藏。","Process not running — log panes hidden.")})]})}function eZ(e){return/tiktok/i.test(e.script)||/tiktok/i.test(e.pm2)}let eI=[{id:"720p60",labelZh:"720p @ 60Hz",labelEn:"720p @ 60Hz",spec:"1280x720, 59.94/60Hz, RGB/YUV 有限",hintZh:"板端 HDMI 输出时序与显示端一致;下游画布建议 1280\xd7720。",hintEn:"Match SoC HDMI timing to the display; downstream canvas e.g. 1280\xd7720."},{id:"1080p30",labelZh:"1080p @ 30Hz",labelEn:"1080p @ 30Hz",spec:"1920x1080, 30Hz",hintZh:"带宽紧张时可优先 1080p30;检查线材与接口规格。",hintEn:"Prefer 1080p30 when bandwidth is tight; check cable and port specs."},{id:"1080p60",labelZh:"1080p @ 60Hz",labelEn:"1080p @ 60Hz",spec:"1920x1080, 60Hz, 高刷转播",hintZh:"两端均需稳定支持 1080p60;长时间运行注意散热。",hintEn:"Both ends need stable 1080p60; mind thermals for long runs."}],eA="live-hub-tiktok-hdmi-check-v1",eD="live-hub-tiktok-hdmi-notes-v1",eO="live-hub-tiktok-source-mode-v1";function eK(e){var t;let{t:s,busy:l,entries:i,currentProc:a,setCurrentProc:r,urlConfig:o,setUrlConfig:c,onRunProcess:d,onSaveUrlConfig:x,onReplayGoLive:u,onCopy:m,fetchJson:h,apiPrefix:p,quickLinks:b,hdmiStatus:g,notify:f,onNavigate:v}=e,y=(0,A.useMemo)(()=>i.filter(eZ),[i]),w=y.length?y:i,[j,N]=(0,A.useState)("srs"),[k,_]=(0,A.useState)([]),[z,S]=(0,A.useState)(!1),[C,R]=(0,A.useState)(!1),[P,M]=(0,A.useState)("1080p30"),[E,Z]=(0,A.useState)("1080p30"),[I,D]=(0,A.useState)(!1),[O,K]=(0,A.useState)(!0),[B,W]=(0,A.useState)(null),H=(0,A.useRef)(!1),F=(0,A.useRef)(o),[Y,G]=(0,A.useState)(""),[q,J]=(0,A.useState)({}),$=(0,A.useCallback)(e=>{F.current=e,c(e)},[c]),X=(0,A.useCallback)(e=>{N(e);try{window.localStorage.setItem(eO,e)}catch(e){}},[]);(0,A.useEffect)(()=>{try{let e=window.localStorage.getItem(eO);("ffmpeg"===e||"replay"===e||"srs"===e)&&("ffmpeg"!==e&&"replay"!==e?N(e):N("srs"))}catch(e){}},[]),(0,A.useEffect)(()=>{H.current=!1},[a]),(0,A.useEffect)(()=>{F.current=o},[o]);let Q=(0,A.useCallback)(async()=>{if(a)try{var e;let t=new URLSearchParams({process:a,_ts:String(Date.now())}),s=await h("/get_url_config?".concat(t));$(null!==(e=s.content)&&void 0!==e?e:"")}catch(e){}},[$,a,h]);(0,A.useEffect)(()=>{if(!a||!O||"ffmpeg"!==j)return;let e=window.setInterval(()=>{H.current||Q()},8e3);return()=>clearInterval(e)},[a,O,Q,j]),(0,A.useEffect)(()=>{"ffmpeg"===j&&a&&Q()},[j,a,Q]);let et=(0,A.useCallback)(async()=>{if(a){S(!0);try{var e;let t=await h("/tiktok_replay/list?process=".concat(encodeURIComponent(a)));_(null!==(e=t.files)&&void 0!==e?e:[])}catch(e){f(e.message),_([])}finally{S(!1)}}},[a,h,f]);(0,A.useEffect)(()=>{"replay"===j&&a&&et()},[j,a,et]),(0,A.useEffect)(()=>{try{let e=window.localStorage.getItem(eA);e&&J(JSON.parse(e))}catch(e){}try{G(window.localStorage.getItem(eD)||"")}catch(e){}},[]);let es=(0,A.useCallback)(e=>{J(e);try{window.localStorage.setItem(eA,JSON.stringify(e))}catch(e){}},[]),en=e=>{G(e);try{window.localStorage.setItem(eD,e)}catch(e){}},el=async()=>{if(a){D(!0),W(null),H.current=!1;try{var e;let t=new URLSearchParams({process:a,_ts:String(Date.now())}),n=await h("/get_url_config?".concat(t));$(null!==(e=n.content)&&void 0!==e?e:""),W(s("已从服务器读取 URL_config","Reloaded URL_config from server"))}catch(e){W(e.message)}finally{D(!1)}}},ei=async()=>{try{await Promise.resolve(x(F.current)),H.current=!1}catch(e){}},ea=async e=>{if(a){R(!0);try{await h("/tiktok_replay/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:a,filename:e})}),f(s("已删除文件","File removed")),await et()}catch(e){f(e.message)}finally{R(!1)}}},er=async e=>{var t;let n=null===(t=e.target.files)||void 0===t?void 0:t[0];if(e.target.value="",n&&a){R(!0);try{let e=new FormData;e.append("file",n);let t=await (0,ee.N)("".concat(p,"/tiktok_replay/upload?process=").concat(encodeURIComponent(a)),{method:"POST",body:e});f(t.message||s("上传成功","Uploaded")),await et()}catch(e){f(e.message)}finally{R(!1)}}},eo=l||I||C,ec=eI.find(e=>e.id===E),ed=!!(null==g?void 0:g.can_stream_hdmi),ex=(null==g?void 0:g.preferred_device)||(null==g?void 0:null===(t=g.video_devices)||void 0===t?void 0:t[0])||"";return(0,n.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[v?(0,n.jsx)(ev,{t:s,title:s("TikTok HDMI 硬件链路","TikTok HDMI hardware chain"),subtitle:s("板端编码经 HDMI 到显示/下游设备;与「网络」页顶卡相同的箭头风格。","Encode on SoC → HDMI → display/downstream; same arrow style as Network header."),onNavigate:v,steps:[{label:"FFmpeg",sub:s("采集 / 推流","Capture"),gradient:"from-cyan-400 to-blue-500",target:"live_tiktok"},{label:"HDMI",sub:s("板载输出","SoC out"),gradient:"from-violet-500 to-fuchsia-500"},{label:"Android",sub:s("AOSP / 手机","AOSP"),gradient:"from-amber-400 to-orange-500",target:"android"}]}):null,(0,n.jsx)("div",{className:"rounded-2xl border border-cyan-500/25 bg-gradient-to-br from-cyan-500/[0.14] via-zinc-950/80 to-fuchsia-500/10 p-6 shadow-xl shadow-cyan-900/10",children:(0,n.jsx)("div",{className:"flex flex-wrap items-start gap-4",children:(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-cyan-500/35 to-fuchsia-600/25 ring-1 ring-white/10",children:(0,n.jsx)(T.Z,{className:"h-5 w-5 text-cyan-200"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold tracking-tight text-white",children:s("TikTok 无人直播(单路)","TikTok unmanned (single lane)")}),(0,n.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:s("布局对齐 YouTube 单频道:直播开关 + 源站 + URL_config;无 stream key,输出走 HDMI 硬件链路。","Same layout as YouTube single: controls + URLs; no stream key — HDMI hardware path.")})]})]})})}),(0,n.jsx)("div",{className:"rounded-2xl border border-cyan-500/20 bg-cyan-500/[0.06] p-4 ring-1 ring-white/[0.04]",children:(0,n.jsx)("p",{className:"text-xs leading-relaxed text-cyan-100/90",children:s("HDMI 互斥:后端在「开始 / 重新开始」TikTok 或 obs*.sh(SRS 拉流上屏)时,会自动停止其它正在占用 HDMI 链路的同类进程;与 YouTube 推流互不干扰。","HDMI mutex: starting TikTok or obs*.sh stops other TikTok/OBS HDMI sinks; YouTube RTMP is unaffected.")})}),(0,n.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(ep.Z,{className:"h-4 w-4 text-cyan-300"}),s("X86 HDMI 采集状态","X86 HDMI capture status")]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:s("这里直接显示主机是否识别到采集卡和 /dev/video 设备,可用于验证 ARM HDMI 进 X86 的链路。","Shows whether the host sees the capture card and /dev/video nodes for ARM-to-X86 HDMI ingest.")})]}),(0,n.jsx)("span",{className:"rounded-full px-3 py-1 text-[11px] font-semibold ring-1 ".concat(ed?"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30":"bg-rose-500/15 text-rose-200 ring-rose-500/25"),children:ed?s("可推流","Ready"):s("未就绪","Not ready")})]}),(0,n.jsxs)("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-4 text-[11px] text-zinc-400",children:[(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"device: "}),(0,n.jsx)("span",{className:"font-mono text-zinc-200",children:ex||"—"})]}),(0,n.jsxs)("p",{className:"mt-2",children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"video nodes: "}),(0,n.jsx)("span",{className:"font-mono text-zinc-200",children:((null==g?void 0:g.video_devices)||[]).join(", ")||"—"})]}),(0,n.jsxs)("p",{className:"mt-2",children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"usb matches: "}),(0,n.jsx)("span",{className:"text-zinc-300",children:((null==g?void 0:g.usb_capture_matches)||[]).length||0})]})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/25 p-4 text-[11px] text-zinc-400",children:[(0,n.jsx)("p",{className:"text-zinc-600",children:s("建议 FFmpeg","Suggested FFmpeg")}),(0,n.jsx)("p",{className:"mt-2 break-all font-mono text-zinc-200",children:(null==g?void 0:g.suggested_ffmpeg_cmd)||"—"}),(null==g?void 0:g.suggested_ffmpeg_cmd)?(0,n.jsxs)("button",{type:"button",onClick:()=>m(g.suggested_ffmpeg_cmd||""),className:"mt-3 inline-flex items-center gap-2 rounded-lg bg-cyan-500/15 px-3 py-2 text-xs font-medium text-cyan-100 ring-1 ring-cyan-500/25",children:[(0,n.jsx)(U.Z,{className:"h-3.5 w-3.5"}),s("复制命令","Copy command")]}):null]})]}),((null==g?void 0:g.issues)||[]).length?(0,n.jsx)("ul",{className:"mt-4 list-inside list-disc space-y-1 text-[11px] text-amber-200/85",children:((null==g?void 0:g.issues)||[]).map(e=>(0,n.jsx)("li",{children:e},e))}):null]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-amber-500/20 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-amber-200/90",children:[(0,n.jsx)(V.Z,{className:"h-4 w-4"}),(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:s("直播开关","Live control")})]}),(0,n.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:s("TikTok 进程(PM2)","TikTok PM2 process")}),(0,n.jsx)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:a,onChange:e=>r(e.target.value),children:w.map(e=>(0,n.jsxs)("option",{value:e.pm2,children:[e.label," (",e.pm2,")"]},e.pm2))}),(0,n.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:s("直播源","Video source")}),(0,n.jsxs)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:j,onChange:e=>X(e.target.value),children:[(0,n.jsx)("option",{value:"ffmpeg",hidden:!0,children:"FFmpeg(抖音 / TikTok 等直播间 URL)"}),(0,n.jsx)("option",{value:"replay",hidden:!0,children:s("录播素材(本地上传)","VOD upload")}),(0,n.jsx)("option",{value:"srs",children:s("SRS(OBS 推流)","SRS (OBS)")})]}),"srs"===j?(0,n.jsx)("p",{className:"mt-2 text-[11px] leading-relaxed text-amber-200/85",children:s("此模式不显示 URL_config:请在 OBS 中填写下方 RTMP 推流地址;板端 SRS 拉流上屏仍可能占用 HDMI,与 TikTok 进程互斥规则不变。","URL_config is hidden: set the RTMP URL in OBS. SRS pull-to-HDMI may still mutex with TikTok per server rules.")}):null,(0,n.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[["start",s("开始直播","Start"),"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30"],["stop",s("停止直播","Stop"),"bg-rose-500/15 text-rose-200 ring-rose-500/25"],["restart",s("重新开始","Restart"),"bg-amber-500/15 text-amber-200 ring-amber-500/25"]].map(e=>{let[t,s,l]=e;return(0,n.jsx)("button",{type:"button",disabled:eo,onClick:()=>d(t),className:"rounded-xl px-4 py-3 text-sm font-medium ring-1 ".concat(l),children:s},t)})}),(0,n.jsxs)("p",{className:"mt-3 text-center text-[11px] text-zinc-500",children:[s("当前 HDMI 预设(备忘)","HDMI preset (memo)"),":"," ",(0,n.jsx)("span",{className:"font-mono text-cyan-300/90",children:ec?s(ec.labelZh,ec.labelEn):E})]})]}),"replay"===j?(0,n.jsxs)("div",{className:"rounded-2xl border border-violet-500/25 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(eb.Z,{className:"h-4 w-4 text-violet-300"}),s("录播素材","VOD library")]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsxs)("label",{className:"inline-flex cursor-pointer items-center gap-2 rounded-xl bg-violet-500/15 px-3 py-2 text-xs font-medium text-violet-100 ring-1 ring-violet-500/30",children:[(0,n.jsx)(eg.Z,{className:"h-3.5 w-3.5"}),(0,n.jsx)("span",{children:s("上传视频","Upload")}),(0,n.jsx)("input",{type:"file",accept:".mp4,.mkv,.ts,.flv,.mov,.m4v,.webm",className:"hidden",onChange:er})]}),(0,n.jsx)("button",{type:"button",disabled:eo||!a,onClick:()=>void et(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-3 py-2 text-xs text-zinc-300",children:s("刷新列表","Refresh")})]})]}),(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:s("文件保存在服务器 config/tiktok_replay/对应进程目录;点「开始直播」会写入 replayfile 行并启动 PM2 进程。停播请用上方「停止直播」。","Files under config/tiktok_replay/. Go live writes replayfile + starts PM2. Use Stop above to stop.")}),z?(0,n.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:s("加载中…","Loading…")}):0===k.length?(0,n.jsx)("p",{className:"mt-4 text-xs text-zinc-500",children:s("暂无文件,请先上传。","No files yet.")}):(0,n.jsx)("ul",{className:"mt-4 space-y-2",children:k.map(e=>(0,n.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 rounded-xl border border-white/10 bg-black/30 px-3 py-2 text-xs text-zinc-300",children:[(0,n.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono",children:e.name}),(0,n.jsxs)("span",{className:"shrink-0 text-zinc-500",children:[(e.size/1048576).toFixed(1)," MB"]}),(0,n.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:eo,onClick:()=>void(async()=>{try{await Promise.resolve(u(e.replay_url,e.name))}catch(e){}})(),className:"rounded-lg bg-emerald-500/20 px-2 py-1 text-[11px] text-emerald-100 ring-1 ring-emerald-500/30",children:s("开始直播","Go live")}),(0,n.jsx)("button",{type:"button",disabled:eo,onClick:()=>d("stop"),className:"rounded-lg bg-rose-500/15 px-2 py-1 text-[11px] text-rose-100 ring-1 ring-rose-500/25",children:s("停播","Stop")}),(0,n.jsxs)("button",{type:"button",disabled:eo,onClick:()=>void ea(e.name),className:"inline-flex items-center gap-1 rounded-lg bg-zinc-700/40 px-2 py-1 text-[11px] text-zinc-200",children:[(0,n.jsx)(L.Z,{className:"h-3 w-3"}),s("删除","Del")]})]})]},e.name))})]}):null,"srs"===j?(0,n.jsxs)("div",{className:"rounded-2xl border border-emerald-500/25 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:s("SRS / OBS 推流","SRS / OBS ingest")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:s("OBS:设置 → 推流 → 服务选「自定义」,服务器填 RTMP 地址;串流密钥可与 SRS 应用配置一致(默认 live/livestream)。","OBS → Stream → Custom: RTMP URL as server; stream key per SRS app (default live/livestream).")}),(0,n.jsxs)("dl",{className:"mt-4 space-y-3 text-xs",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"text-zinc-500",children:s("RTMP 推流地址(OBS 服务器)","RTMP publish URL")}),(0,n.jsxs)("dd",{className:"mt-1 flex flex-wrap items-center gap-2 font-mono text-emerald-200/90",children:[(0,n.jsx)("span",{className:"break-all",children:b.srs_rtmp_publish||"—"}),b.srs_rtmp_publish?(0,n.jsx)("button",{type:"button",className:"shrink-0 text-cyan-300 hover:text-cyan-200",onClick:()=>m(b.srs_rtmp_publish),children:(0,n.jsx)(U.Z,{className:"h-3.5 w-3.5"})}):null]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"text-zinc-500",children:s("HTTP-FLV 预览","HTTP-FLV preview")}),(0,n.jsxs)("dd",{className:"mt-1 flex flex-wrap items-center gap-2 font-mono text-zinc-400",children:[(0,n.jsx)("span",{className:"break-all",children:b.srs_play_flv||b.srs_http||"—"}),b.srs_play_flv||b.srs_http?(0,n.jsx)("button",{type:"button",className:"shrink-0 text-cyan-300 hover:text-cyan-200",onClick:()=>m(b.srs_play_flv||b.srs_http),children:(0,n.jsx)(U.Z,{className:"h-3.5 w-3.5"})}):null]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"text-zinc-500",children:s("SRS 控制台","SRS web UI")}),(0,n.jsx)("dd",{className:"mt-1 font-mono text-zinc-400",children:(0,n.jsx)("a",{href:b.srs_http||"#",target:"_blank",rel:"noreferrer",className:"text-cyan-300 hover:underline",children:b.srs_http||"—"})})]})]})]}):null,(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(ep.Z,{className:"h-4 w-4 text-cyan-400"}),s("HDMI 硬件与时序","HDMI timing")]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:s("点选一路作为现场备忘;与板端 ffmpeg/OBS 采集参数对齐。","Pick a preset as field memo; match capture settings.")}),(0,n.jsx)("div",{className:"mt-4 grid gap-3 md:grid-cols-3",children:eI.map(e=>{let t=P===e.id,l=E===e.id;return(0,n.jsxs)("button",{type:"button",onClick:()=>{M(t?null:e.id),Z(e.id)},className:"rounded-2xl border p-4 text-left transition ".concat(l?"border-cyan-500/50 ring-1 ring-cyan-500/20":""," ").concat(t?"border-cyan-500/40 bg-cyan-500/10":"border-white/[0.08] bg-zinc-950/50 hover:border-white/15"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(ep.Z,{className:"h-4 w-4 text-cyan-400"}),s(e.labelZh,e.labelEn)]}),(0,n.jsx)("p",{className:"mt-2 font-mono text-[11px] text-zinc-400",children:e.spec}),t?(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:s(e.hintZh,e.hintEn)}):null]},e.id)})}),(0,n.jsxs)("div",{className:"mt-6 rounded-xl border border-white/5 bg-black/25 p-4",children:[(0,n.jsx)("p",{className:"text-xs font-semibold text-zinc-400",children:s("上线前检查清单(本地保存)","Pre-flight checklist (local)")}),(0,n.jsx)("ul",{className:"mt-3 space-y-2",children:[{id:"cable",zh:"HDMI 线材插紧、方向正确(如需转接头确认规格)",en:"HDMI cable seated; adapter specs OK"},{id:"thermal",zh:"长时间推流注意散热,过热会掉帧黑屏",en:"Thermal headroom for long runs"}].map(e=>(0,n.jsxs)("li",{className:"flex items-start gap-2 text-xs text-zinc-400",children:[(0,n.jsx)("input",{type:"checkbox",className:"mt-0.5 rounded border-white/20 bg-black/40",checked:!!q[e.id],onChange:t=>es({...q,[e.id]:t.target.checked})}),(0,n.jsx)("span",{children:s(e.zh,e.en)})]},e.id))}),(0,n.jsx)("label",{className:"mt-4 block text-[11px] text-zinc-500",children:s("HDMI / 走线备忘","HDMI / wiring notes")}),(0,n.jsx)("textarea",{className:"mt-1 min-h-[72px] w-full resize-y rounded-lg border border-white/10 bg-black/40 p-3 text-xs text-zinc-300",value:Y,onChange:e=>en(e.target.value),spellCheck:!1,placeholder:s("接口、线长、显示器型号…","Ports, cable length, display model…")})]})]}),"ffmpeg"===j?(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:s("直播地址列表 \xb7 URL_config.ini","URL_config.ini")}),(0,n.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 text-xs text-cyan-300 hover:text-cyan-200",onClick:()=>m(o),children:[(0,n.jsx)(U.Z,{className:"h-3.5 w-3.5"}),s("复制全文","Copy all")]})]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:s("一行一个地址;可勾选自动从服务器刷新,或点「重新读取」手动同步。","One URL per line; enable auto-refresh or reload from server.")}),(0,n.jsx)("div",{className:"mt-2 flex flex-wrap items-center gap-4 text-xs text-zinc-400",children:(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-2",children:[(0,n.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:O,onChange:e=>K(e.target.checked)}),s("每 8 秒自动从服务器刷新","Auto-refresh from server every 8s")]})}),B?(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:B}):null,(0,n.jsx)("textarea",{className:"mt-4 min-h-[200px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:o,onChange:e=>{H.current=!0,$(e.target.value)},spellCheck:!1}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:eo,onClick:()=>void el(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-300",children:s("重新读取","Reload from server")}),(0,n.jsx)("button",{type:"button",disabled:eo,onClick:()=>void ei(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm font-medium text-cyan-100 ring-1 ring-cyan-500/30",children:s("保存 URL 配置","Save URL config")})]})]}):null,(0,n.jsx)(eU,{t:s,currentProc:a,fetchJson:h,urlListText:"ffmpeg"===j?o:"",keySuffixUi:"",showKeyRow:!1})]})}var eB=s(5468),eW=s(1094),eH=s(5621),eF=s(91),eY=s(2208),eG=s(9397),eq=s(90);let eJ="live-hub-youtube-pro-v2",eV="youtube2__",e$=/[^a-zA-Z0-9_.-]+/g,eX=new Set(["douyin_youtube","tiktok","obs","web"]);function eQ(e,t){var s;let n=(e||"").trim();if(!function(e){let t=(e||"").trim();return!t||/\?{2,}/.test(t)||/?{2,}/.test(t)||/�/.test(t)||/锟|绾胯矾|çº|è·|Â/.test(t)||/^(undefined|null|nan)$/i.test(t)}(n))return n;let l=(null===(s=n.match(/\d+/))||void 0===s?void 0:s[0])||String(Math.max(0,t)+1);return"线路 ".concat(l)}function e0(e){return e.map((e,t)=>({...e,name:eQ(e.name,t)}))}function e1(e){return(e||"").trim().replace(e$,"_")}function e5(e,t){let s=e1(e);return!s||eX.has(s)||s===eV?tt(t):"youtube"===s||s.startsWith(eV)?s:tt(s)}function e2(e){return e5(String(e.pm2Name||""),String(e.id||""))}function e3(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e||"object"!=typeof e)return null;let s=String(e.id||"").trim();return s?{id:s,name:eQ("string"==typeof e.name?e.name:"",t),streamKeySuffix:"string"==typeof e.streamKeySuffix?e.streamKeySuffix:void 0,streamKey:"string"==typeof e.streamKey?e.streamKey:void 0,urlLines:"string"==typeof e.urlLines?e.urlLines:void 0,pm2Name:e5("string"==typeof e.pm2Name?e.pm2Name:"",s),notes:"string"==typeof e.notes?e.notes:void 0}:null}function e4(e){if(!e)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))return[];let s=t.map((e,t)=>e3(e,t)).filter(e=>null!==e);return e0(s)}catch(e){return[]}}function e6(e){window.localStorage.setItem(eJ,JSON.stringify(e0(e)))}let e8=["/hub/youtube_pro_channels","/youtube_pro_channels"];async function e9(e){for(let s of e8)try{var t;let n=await e(s);return{fetched:!0,channels:(t=n.channels,Array.isArray(t)?e0(t.map((e,t)=>e3(e,t)).filter(e=>null!==e)):[])}}catch(e){}return{fetched:!1,channels:[]}}async function e7(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=null,l=e0(t);for(let t of e8)try{var i;let a=await e(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({channels:l,force:!!s.force})});if((null===(i=a.neko)||void 0===i?void 0:i.ok)===!1){let e=a.neko.desired?" desired=".concat(a.neko.desired):"",t=a.neko.current?" current=".concat(a.neko.current):"";n=Error("Neko capacity expansion failed:".concat(e).concat(t," ").concat(a.neko.reason||"unknown error").trim());break}return}catch(e){n=e instanceof Error?e:Error(String(e))}throw null!=n?n:Error("youtube_pro_channels sync failed")}function te(){return"ch_".concat(Date.now().toString(36),"_").concat(Math.random().toString(36).slice(2,7))}function tt(e){return"".concat(eV).concat(e1(e)||"channel")}function ts(e){return/youtube/i.test(e.script)||/youtube/i.test(e.pm2)}function tn(e){return e.trim().toLowerCase().startsWith("youtube2__")}function tl(e){return(e.split("/").pop()||e).replace(/\.[^.]+$/,"")}function ti(e){var t;return!!e&&(/youtube/i.test(e.pm2)||/youtube/i.test(null!==(t=e.script)&&void 0!==t?t:""))}function ta(e,t){let s=((null==t?void 0:t.business_status)||"").trim().toLowerCase();return(null==t?void 0:t.is_pushing)||"streaming"===s?0:th(null==t?void 0:t.process_status)?1:"youtube"===e.pm2.trim().toLowerCase()?2:"youtube"===tl(e.script).trim().toLowerCase()?3:10}let tr="live-hub-youtube-mode-v1",to=new Set(["douyin_youtube","tiktok","obs","web"]);function tc(e){var t,s,n;return{name:e.name,streamKey:null!==(t=e.streamKey)&&void 0!==t?t:"",pm2Name:null!==(s=e.pm2Name)&&void 0!==s?s:tt(e.id),notes:null!==(n=e.notes)&&void 0!==n?n:""}}function td(e){return Object.fromEntries(e.map(e=>[e.id,tc(e)]))}function tx(e){let t=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return!!(null==e?void 0:e.is_pushing)||"streaming"===t||"relay_slow"===t}function tu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if((null==e?void 0:e.source_ambiguous)&&tx(e)&&!(null==e?void 0:e.source_current))return(s?eC("",s).trim():"")||"";{let t=((null==e?void 0:e.source_display)||(null==e?void 0:e.source_title)||"").trim();if(t)return t}let n=eC(t,s).trim();if(n)return n;let l=((null==e?void 0:e.source_room_id)||"").trim();return l?"抖音直播间 ".concat(l):""}function tm(e){var t;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=((null==e?void 0:e.source_url)||"").trim();if(n)return n;let l=ez(s);return tx(e)&&((null==e?void 0:e.source_ambiguous)||(null==e?void 0:e.source_display)||(null==e?void 0:e.source_title))&&l.length>1?"":null!==(t=l[0])&&void 0!==t?t:""}function th(e){return/^(online|running)$/i.test((e||"").trim())}function tp(e,t){let s=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"ready"===s?t("已配置","Ready"):"streaming"===s?t("推流中","Pushing"):"source_stalled"===s?t("源卡住","Source stalled"):"relay_slow"===s?t("低速推流","Relay slow"):"waiting_source"===s?t("等待上游","Waiting source"):"source_live"===s?t("源已开播,转推未起","Source live, relay down"):"monitoring"===s?t("监控中","Monitoring"):"misconfigured"===s?t("密钥异常","Key invalid"):"youtube_key_rejected"===s?t("密钥被 YouTube 拒绝","Key rejected"):"stale"===s?t("心跳过期","Stale"):"error"===s?t("异常","Error"):th(null==e?void 0:e.process_status)?t("运行中","Running"):((null==e?void 0:e.process_status)||"").trim()||t("未运行","Idle")}function tb(e){let t=((null==e?void 0:e.business_status)||"").trim().toLowerCase();return"ready"===t?"bg-sky-500/15 text-sky-100 ring-sky-500/25":"streaming"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"relay_slow"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"source_stalled"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/25":"waiting_source"===t||"monitoring"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/25":"source_live"===t?"bg-sky-500/15 text-sky-100 ring-sky-500/25":"misconfigured"===t||"youtube_key_rejected"===t||"error"===t||"stale"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/25":th(null==e?void 0:e.process_status)?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"bg-zinc-600/20 text-zinc-400 ring-zinc-500/25"}function tg(e){let t=Math.max(0,Math.floor(e||0));if(t<60)return"".concat(t,"s");let s=Math.floor(t/60);return s<60?"".concat(s,"m ").concat(t%60,"s"):"".concat(Math.floor(s/60),"h ").concat(s%60,"m")}function tf(e){if(!e)return"-";try{return new Date(1e3*e).toLocaleString()}catch(e){return"-"}}function tv(e){let t=(e||"").toLowerCase();return"active"===t?"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30":"error"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"ended"===t?"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25":"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25"}function ty(e,t){let s=(e||"").toLowerCase();return"active"===s?t("直播中","Live"):"ended"===s?t("已结束","Ended"):"error"===s?t("异常","Problem"):"idle"===s?t("等待中","Waiting"):t("记录","Record")}function tw(e,t){return null==e?t?t("未知","Unknown"):"-":e.toLocaleString()}function tj(e,t){return e?(e.source_title||e.channel_name||"").trim()||(e.source_room_id?t("抖音直播间 ".concat(e.source_room_id),"Douyin room ".concat(e.source_room_id)):e.process?t("直播线路 ".concat(e.process),"Relay lane ".concat(e.process)):t("直播事件 #".concat(e.id),"Live event #".concat(e.id))):t("未选择直播","No event selected")}function tN(e,t){return e?e.source_room_id?t("抖音房间 ".concat(e.source_room_id),"Douyin room ".concat(e.source_room_id)):e.source_url?e.source_url.replace(/^https?:\/\//,""):t("来源未识别","Unknown source"):"-"}function tk(e,t){let s=Math.max(0,Math.floor(e||0));if(s<60)return t("".concat(s," 秒"),"".concat(s,"s"));let n=Math.floor(s/60);if(n<60)return t("".concat(n," 分 ").concat(s%60," 秒"),"".concat(n,"m ").concat(s%60,"s"));let l=Math.floor(n/60),i=n%60;return t("".concat(l," 小时 ").concat(i," 分"),"".concat(l,"h ").concat(i,"m"))}function t_(e){if(!e)return"-";try{return new Date(1e3*e).toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch(e){return"-"}}function tz(e,t){var s;if(!e)return"-";let n=(e.status||"").toLowerCase(),l="".concat(e.last_health||""," ").concat(e.last_live_status||""," ").concat(e.last_popup_text||"").toLowerCase();return"error"===n||/error|failed|poor|unstable|异常|错误|失败/.test(l)?t("需要处理","Needs attention"):e.last_popup_text?t("有弹窗","Popup seen"):(null!==(s=e.quality_score)&&void 0!==s?s:100)<50?t("质量偏低","Low quality"):t("正常","Normal")}function tS(e){let t=tz(e,e=>e);return"需要处理"===t||"质量偏低"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"有弹窗"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/30":"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25"}function tC(e){let t=Number(e||0);return t>=80?"text-emerald-200":t>=55?"text-amber-200":"text-rose-200"}function tR(e){let t=(e||"").toLowerCase();return"critical"===t?"bg-rose-500/15 text-rose-100 ring-rose-500/30":"warning"===t?"bg-amber-500/15 text-amber-100 ring-amber-500/30":"ok"===t?"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25":"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25"}function tP(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"number"!=typeof e||Number.isNaN(e)?"-":"".concat(e.toFixed(e>=100?0:2).replace(/\.00$/,"")).concat(t)}function tL(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith("#"))}function tT(e,t){return tL(e).length>0&&0===tL(t).length}function tM(e){let{kind:t,busyKind:s,targetPm2:l,busy:i,online:a,label:r,className:o,baseLock:c,onRun:d,notify:x,t:u,compact:m}=e,h=function(e){if(!(null==e?void 0:e.startsWith("proc:")))return null;let t=e.slice(5),s=t.indexOf(":");if(s<=0)return null;let n=t.slice(0,s),l=t.slice(s+1);return l&&["start","stop","restart"].includes(n)?{action:n,pm2:l}:null}(i),p=h&&h.pm2===l,b=null!=s?s:t,g=!!(p&&h.action===b),f=!!(p&&h.action!==b),v="start"===t&&a,w="stop"===t&&!a,j="restart"===t&&!a,N=v||w||j;return(0,n.jsxs)("button",{type:"button",onClick:()=>{if(!g){if(f){x(u("请等待当前操作完成","Wait for the current action to finish"));return}if(v){x(u("已在直播中,无需重复开始","Already live"));return}if(w){x(u("当前未在直播,无法停止","Not live — cannot stop"));return}if(j){x(u("进程未运行时请使用「开始直播」","Use Start when the process is not running"));return}c||d()}},className:"relative overflow-hidden rounded-xl ring-1 transition ".concat(m?"min-h-[2rem] px-3 py-1.5 text-xs font-medium":"min-h-[2.75rem] px-4 py-3 text-sm font-medium"," ").concat(o," ").concat(N||c||g||f?"cursor-not-allowed":""," ").concat(N&&!g?"opacity-45":""," ").concat(f?"opacity-35":""," ").concat(g?"ring-violet-400/40":""),children:[g?(0,n.jsx)("span",{className:"absolute inset-0 flex items-center justify-center bg-black/25 backdrop-blur-[2px]",children:(0,n.jsx)(y.Z,{className:"".concat(m?"h-4 w-4":"h-6 w-6"," animate-spin text-white")})}):null,(0,n.jsxs)("span",{className:"inline-flex items-center justify-center gap-1.5 ".concat(g?"invisible":""),children:[N?(0,n.jsx)(eB.Z,{className:"".concat(m?"h-3 w-3":"h-4 w-4"," shrink-0 opacity-90"),"aria-hidden":!0}):null,r]})]})}function tE(e){var t,s,l,i,r,o,d,x,u,m,h,p,b,g,f,v,j,N,_,z,S,C,R,P,T,M,E,U,Z,I;let{t:D,busy:O,entries:K,currentProc:B,setCurrentProc:W,urlConfig:H,setUrlConfig:F,onRunProcess:Y,onSaveUrlConfig:q,fetchJson:J,liveProcesses:X,notify:Q,onNavigate:ee,onRefresh:et,quickLinks:es}=e,en=(0,A.useMemo)(()=>K.filter(ts),[K]),el=(0,A.useMemo)(()=>(function(e,t){let s=e.filter(e=>ts(e)&&!tn(e.pm2)),n=s.filter(e=>ts(e)&&e.pm2.trim()===tl(e.script).trim()),l=n.length?[...n]:s.length?[...s]:[...e],i=new Set(l.map(e=>e.pm2.trim()));for(let e of t.filter(e=>ti(e)&&!tn(e.pm2))){var a,r,o,c;let t=e.pm2.trim();if(!t||i.has(t))continue;let n=(e.business_status||"").trim().toLowerCase();if(!e.is_pushing&&"streaming"!==n&&!th(e.process_status))continue;let d=s.find(e=>e.pm2.trim()===t);l.push(null!=d?d:{pm2:t,script:null!==(o=null!==(r=e.script)&&void 0!==r?r:null===(a=s[0])||void 0===a?void 0:a.script)&&void 0!==o?o:"youtube.py",label:null!==(c=e.label)&&void 0!==c?c:t}),i.add(t)}return l})(en.length?en:K,X),[K,X,en]),ei=(0,A.useMemo)(()=>(function(e,t){if(!e.length)return"";let s=new Map(t.filter(ti).map(e=>[e.pm2.trim(),e])),n=e[0],l=ta(n,s.get(n.pm2.trim()));for(let t of e.slice(1)){let e=ta(t,s.get(t.pm2.trim()));e"youtube"===e.pm2.trim().toLowerCase());if(n)return n.pm2;let l=e.find(e=>"youtube"===tl(e.script).trim().toLowerCase());return l?l.pm2:null!==(s=null===(t=e[0])||void 0===t?void 0:t.pm2)&&void 0!==s?s:""}(el),[X,el]),[ea,er]=(0,A.useState)("single"),[eo,ec]=(0,A.useState)([]),[ed,ex]=(0,A.useState)(""),[eu,em]=(0,A.useState)(H),[eh,ep]=(0,A.useState)(""),[eb,eg]=(0,A.useState)({key:"",rtmps:!0,bitrate:"",fastAudio:!0}),[ew,ej]=(0,A.useState)(null),[eS,eC]=(0,A.useState)(!1),[eR,eP]=(0,A.useState)(""),[eE,eZ]=(0,A.useState)(!0),[eI,eA]=(0,A.useState)(!1),[eD,eO]=(0,A.useState)(!1),[eK,eB]=(0,A.useState)(null),[eV,e$]=(0,A.useState)({}),[eX,e5]=(0,A.useState)(!1),[e3,e8]=(0,A.useState)(null),[tE,tU]=(0,A.useState)(0),[tZ,tI]=(0,A.useState)(null),[tA,tD]=(0,A.useState)(null),[tO,tK]=(0,A.useState)(!1),[tB,tW]=(0,A.useState)(null),[tH,tF]=(0,A.useState)(!1),[tY,tG]=(0,A.useState)(!0),[tq,tJ]=(0,A.useState)(null),[tV,t$]=(0,A.useState)(null),tX=(0,A.useRef)(!1),tQ=(0,A.useRef)(H),t0=(0,A.useRef)(eR),t1=(0,A.useRef)([]),t5=(0,A.useRef)(B),t2=(0,A.useRef)(0),t3=(0,A.useRef)(0),t4=(0,A.useRef)(0),t6=(0,A.useRef)(0),t8=(0,A.useRef)({}),t9=(0,A.useRef)({}),t7=(0,A.useCallback)(e=>{tQ.current=e,em(e),F(e)},[F]),se=(0,A.useCallback)(e=>{t0.current=e,eP(e)},[]),st=(0,A.useCallback)(e=>{let t=e.trim();if(!t)return Promise.resolve("");let s=t8.current[t];if(s)return s;let n=new URLSearchParams({process:t,_ts:String(Date.now())}),l=J("/get_url_config?".concat(n)).then(e=>{var t;return null!==(t=e.content)&&void 0!==t?t:""});return t8.current[t]=l,l.then(()=>{t8.current[t]===l&&delete t8.current[t]},()=>{t8.current[t]===l&&delete t8.current[t]}),l},[J]),ss=(0,A.useCallback)(e=>{let t=e.trim();if(!t)return Promise.resolve("");let s=t9.current[t];if(s)return s;let n=new URLSearchParams({process:t,_ts:String(Date.now())}),l=J("/get_config?".concat(n)).then(e=>{var t;return null!==(t=e.content)&&void 0!==t?t:""});return t9.current[t]=l,l.then(()=>{t9.current[t]===l&&delete t9.current[t]},()=>{t9.current[t]===l&&delete t9.current[t]}),l},[J]),sn=(0,A.useCallback)(()=>{let e=++t4.current;return eA(!0),e},[]),sl=(0,A.useCallback)(e=>{e===t4.current&&eA(!1)},[]),si=(0,A.useCallback)(()=>{let e=++t6.current;return eC(!0),e},[]),sa=(0,A.useCallback)(e=>{e===t6.current&&eC(!1)},[]);(0,A.useEffect)(()=>{let e=()=>tG("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,A.useEffect)(()=>{tX.current=!1},[B]),(0,A.useEffect)(()=>{t5.current=B},[B]),(0,A.useEffect)(()=>{"single"===ea&&(tQ.current=H,em(H))},[ea,H]),(0,A.useEffect)(()=>{t0.current=eR},[eR]),(0,A.useEffect)(()=>{t1.current=eo},[eo]),(0,A.useEffect)(()=>{t2.current+=1,t3.current+=1,tX.current=!1,eB(null)},[ea,ed]);let sr=(0,A.useCallback)(async()=>{let e=t5.current.trim();if(!e)return;if("pro"===ea){let t=t1.current.find(e=>e.id===ed);if(!t||e2(t)!==e)return}let t=++t2.current;try{let l=await st(e);if(t!==t2.current||e!==t5.current.trim()||tX.current)return;if("single"===ea)t7(l);else{var s,n;let e=null!==(n=null===(s=t1.current.find(e=>e.id===ed))||void 0===s?void 0:s.urlLines)&&void 0!==n?n:"";if(tT(e,l)){se(e);return}se(l)}}catch(e){}},[ed,se,t7,ea,st]),so=(0,A.useMemo)(()=>({pageVisible:tY}).pageVisible?12e3:0,[tY]);(0,A.useEffect)(()=>{if(!B||!eE||so<=0)return;let e=window.setInterval(()=>{tX.current||sr()},so);return()=>clearInterval(e)},[B,eE,sr,so]);let sc=async()=>{let e=t5.current.trim();if(!e)return;if("pro"===ea){let t=t1.current.find(e=>e.id===ed);if(!t||e2(t)!==e)return}let t=sn();eB(null),tX.current=!1;let s=++t2.current;try{let t=await st(e);if(s!==t2.current||e!==t5.current.trim())return;if(tX.current){eB(D("检测到本地未保存修改,已保留当前草稿","Kept the local unsaved draft"));return}if("single"===ea)t7(t);else{var n,l;let e=null!==(l=null===(n=t1.current.find(e=>e.id===ed))||void 0===n?void 0:n.urlLines)&&void 0!==l?l:"";if(tT(e,t)){se(e),eB(D("服务器暂无已保存 URL,已保留本地草稿","Server has no saved URLs, kept the local draft"));return}se(t)}eB(D("已从服务器读取 URL_config","Reloaded URL_config from server"))}catch(t){if(s!==t2.current||e!==t5.current.trim())return;eB(t.message)}finally{sl(t)}};(0,A.useEffect)(()=>{try{let e=window.localStorage.getItem(tr);("pro"===e||"single"===e)&&er(e)}catch(e){}},[]),(0,A.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await e9(J);if(t.fetched&&t.channels.length&&!e){let e=e0(t.channels);t1.current=e,ec(e),e$(td(e)),e6(e);return}}catch(e){}if(e)return;let t=function(){let e=window.localStorage.getItem(eJ);if(!e&&(e=window.localStorage.getItem("live-hub-youtube-pro-v1"))){let t=e4(e);if(t.length)return window.localStorage.setItem(eJ,JSON.stringify(t)),t}return e4(e)}(),s=e0(t.length>0?t:[{id:te(),name:"线路 1",streamKey:"",urlLines:"",pm2Name:"youtube",notes:""}]);t1.current=s,ec(s),e$(td(s)),e6(s)})(),()=>{e=!0}},[J]),(0,A.useEffect)(()=>{if(!eo.length){ed&&ex("");return}ed&&eo.some(e=>e.id===ed)||ex(eo[0].id)},[eo,ed]);let sd=eo.find(e=>e.id===ed)||eo[0],sx=(0,A.useMemo)(()=>eo.find(e=>e2(e)===B),[eo,B]),su=(0,A.useCallback)(e=>X.find(t=>t.pm2===e),[X]),sm=(0,A.useCallback)(e=>{var t;return null===(t=su(e))||void 0===t?void 0:t.process_status},[su]),sh=su(B),sp=su(B);(0,A.useEffect)(()=>{"single"===ea&&ei&&!B&&(t5.current=ei,W(ei))},[B,ea,ei,W]);let sb=(0,A.useCallback)(e=>{let t=e0(e);t1.current=t,ec(t),e6(t)},[]),sg=(0,A.useCallback)((e,t)=>{let s=e.trim();if(!s)return;let n=!1,l=t1.current.map(e=>e2(e)!==s?e:(n=!0,{...e,...t}));n&&sb(l)},[sb]),sf=(0,A.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};await e7(J,e,t)},[J]),sv=(0,A.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};sb(e),sf(e,t).catch(e=>{Q("".concat(D("多频道列表未同步到服务器","Channel list not saved on server"),": ").concat(e.message))})},[sb,Q,sf,D]),sy=(0,A.useMemo)(()=>{var e;return sd?null!==(e=eV[sd.id])&&void 0!==e?e:tc(sd):null},[sd,eV]);(0,A.useEffect)(()=>{sd&&e$(e=>e[sd.id]?e:{...e,[sd.id]:tc(sd)})},[sd]),(0,A.useEffect)(()=>{if(!sd||"youtube"!==e2(sd))return;let e=eb.key.trim();e&&e$(t=>{var s;let n=null!==(s=t[sd.id])&&void 0!==s?s:tc(sd);return n.streamKey.trim()===e&&"youtube"===n.pm2Name||n.streamKey.trim()?t:{...t,[sd.id]:{...n,streamKey:e,pm2Name:"youtube"}}})},[sd,eb.key]),(0,A.useEffect)(()=>{e8(null)},[ed]);let sw=(0,A.useCallback)((e,t)=>{sd&&(e$(s=>{var n;return{...s,[sd.id]:{...null!==(n=s[sd.id])&&void 0!==n?n:tc(sd),[e]:t}}}),e8(null))},[sd]),sj=sd?e2(sd):"",sN=sd&&sy?e2({id:sd.id,pm2Name:sy.pm2Name}):"",sk=!!sd&&!!sy&&sN!==sj,s_=(0,A.useMemo)(()=>{if(!sd||!sy)return{ok:!1,message:D("请选择线路","Pick a lane"),normalizedName:"",normalizedPm2:"",normalizedStreamKey:"",normalizedNotes:""};let e=eo.findIndex(e=>e.id===sd.id),t=eQ(sy.name,e>=0?e:0),s=e2({id:sd.id,pm2Name:sy.pm2Name});return s?to.has(s)?{ok:!1,message:D("该进程名保留给系统模块,请换一个","This PM2 name is reserved"),normalizedName:t,normalizedPm2:s,normalizedStreamKey:sy.streamKey.trim(),normalizedNotes:sy.notes.trim()}:eo.find(e=>e.id!==sd.id&&e2(e)===s)?{ok:!1,message:D("该进程名已被其它线路占用","Another lane already uses this PM2 name"),normalizedName:t,normalizedPm2:s,normalizedStreamKey:sy.streamKey.trim(),normalizedNotes:sy.notes.trim()}:{ok:!0,message:"",normalizedName:t,normalizedPm2:s,normalizedStreamKey:sy.streamKey.trim(),normalizedNotes:sy.notes.trim()}:{ok:!1,message:D("进程名不能为空","PM2 name is required"),normalizedName:t,normalizedPm2:s,normalizedStreamKey:sy.streamKey.trim(),normalizedNotes:sy.notes.trim()}},[sd,sy,eo,D]),sz=(0,A.useMemo)(()=>{if(!sd||!sy)return!1;let e=tc(sd);return sy.name!==e.name||sy.streamKey!==e.streamKey||e1(sy.pm2Name)!==e1(e.pm2Name)||sy.notes!==e.notes},[sd,sy]),sS=(0,A.useCallback)(async e=>{let t=e.trim();if(!t)return;let s=++t2.current,n=++t3.current;tX.current=!1;let l=sn(),i=si();eB(D("正在同步单频道配置...","Syncing single-channel config...")),ej(null);try{let[e,l]=await Promise.allSettled([st(t),ss(t)]);if(s===t2.current&&t===t5.current.trim()&&("fulfilled"===e.status?(t7(e.value),eB(D("单频道配置已实时同步","Single-channel config synced"))):eB(e.reason instanceof Error?e.reason.message:String(e.reason))),n===t3.current&&t===t5.current.trim()){if("fulfilled"===l.status){let e=l.value;ep(e),eg(eL(e))}else ej(l.reason instanceof Error?l.reason.message:String(l.reason))}}finally{sl(l),sa(i),t===t5.current.trim()&&tU(e=>e+1)}},[t7,sn,si,sl,sa,st,ss,D]),sC=(0,A.useCallback)(async e=>{let t=e2(e).trim();if(!t)return;let s=++t2.current,n=++t3.current;tX.current=!1;let l=sn(),i=si();eB(D("正在同步当前线路配置...","Syncing current lane config...")),ej(null);try{let[l,i]=await Promise.allSettled([st(t),ss(t)]);if(s===t2.current&&t===t5.current.trim()){if("fulfilled"===l.status){var a;let s=l.value,n=null!==(a=e.urlLines)&&void 0!==a?a:"";tT(n,s)?(se(n),sg(t,{urlLines:n}),eB(D("服务器暂无已保存 URL,已保留当前线路草稿","Server has no saved URLs, kept this lane draft"))):(se(s),sg(t,{urlLines:s}),eB(D("当前线路地址已实时同步","Current lane URLs synced")))}else eB(l.reason instanceof Error?l.reason.message:String(l.reason))}if(n===t3.current&&t===t5.current.trim()){if("fulfilled"===i.status){let t=i.value,s=eL(t);ep(t),eg(s),s.key.trim()&&e$(t=>{var n,l;let i=null!==(n=t[e.id])&&void 0!==n?n:tc(e);return i.streamKey.trim()&&i.streamKey.trim()!==(null!==(l=e.streamKey)&&void 0!==l?l:"").trim()||i.streamKey.trim()===s.key.trim()?t:{...t,[e.id]:{...i,streamKey:s.key.trim()}}})}else ej(i.reason instanceof Error?i.reason.message:String(i.reason))}}finally{sl(l),sa(i),t===t5.current.trim()&&tU(e=>e+1)}},[se,sn,si,sl,sa,sg,st,ss,D]);(0,A.useCallback)(async()=>{try{var e,t;let s=await e9(J);if(!s.fetched||!s.channels.length)return;let n=e0(s.channels);t1.current=n,ec(n),e$(td(n)),e6(n);let l=null!==(e=n.find(e=>e.id===ed))&&void 0!==e?e:n[0];if(!l)return;ex(l.id),se((null!==(t=l.urlLines)&&void 0!==t?t:"").trim());let i=e2(l);t5.current=i,W(i),sC(l)}catch(e){}},[ed,se,J,sC,W]);let sR=(0,A.useCallback)(e=>{var t,s,n,l;if("pro"===e&&"single"===ea&&!eb.key.trim()){Q(D("请先填写并保存 YouTube 推流 key,再切换到多频道 Pro","Fill and save the YouTube stream key before switching to Multi Pro"));return}if("single"===e){let e=t5.current.trim(),s=sd?e2(sd):"",n="pro"===ea?s||e:e||ei||(null===(t=el[0])||void 0===t?void 0:t.pm2)||"";n&&(t5.current=n,W(n),sS(n))}if("pro"===e&&eo.length){let e=t5.current.trim(),t=null!==(n=null!==(s=eo.find(t=>e2(t)===e))&&void 0!==s?s:eo.find(e=>e.id===ed))&&void 0!==n?n:eo[0];if(se((null!==(l=null==t?void 0:t.urlLines)&&void 0!==l?l:"").trim()),t){ex(t.id);let e=e2(t);t5.current=e,W(e),sC(t)}}er(e);try{window.localStorage.setItem(tr,e)}catch(e){}},[eo,se,sd,ed,ea,Q,ei,sC,sS,W,el,D,eb.key]),sP=(0,A.useCallback)(e=>{var t;se((null!==(t=e.urlLines)&&void 0!==t?t:"").trim()),ex(e.id);let s=e2(e);t5.current=s,W(s),sC(e)},[se,sC,W]);(0,A.useEffect)(()=>{if("pro"!==ea||!ed)return;let e=eo.find(e=>e.id===ed);if(!e)return;let t=e2(e);t5.current=t,W(t)},[ea,ed,eo,W]);let sL=(0,A.useCallback)(async()=>{let e=t5.current.trim();if(!e)return;let t=++t3.current,s=si();ej(null);try{let s=await ss(e);if(t!==t3.current||e!==t5.current.trim())return;ep(s),eg(eL(s))}catch(s){if(t!==t3.current||e!==t5.current.trim())return;ej(s.message)}finally{sa(s)}},[si,sa,ss]);(0,A.useEffect)(()=>{if(B){if("pro"===ea){if(!sd||B!==e2(sd))return;sr(),sL(),tU(e=>e+1);return}sS(B)}},[sd,ed,B,sL,ea,sr,sS]);let sT=(0,A.useCallback)(async()=>{var e;if(!sd||!sy)throw Error(D("请选择线路","Pick a lane"));if(!s_.ok)throw Error(s_.message);let t=t0.current,s=eo.map(e=>e.id===sd.id?{...e,name:s_.normalizedName,streamKey:s_.normalizedStreamKey,pm2Name:s_.normalizedPm2,notes:s_.normalizedNotes,urlLines:t}:e);return await sf(s,{force:!0}),sb(s),e$(e=>({...e,[sd.id]:{name:s_.normalizedName,streamKey:s_.normalizedStreamKey,pm2Name:s_.normalizedPm2,notes:s_.normalizedNotes}})),{next:s,savedLane:null!==(e=s.find(e=>e.id===sd.id))&&void 0!==e?e:{...sd,name:s_.normalizedName,streamKey:s_.normalizedStreamKey,pm2Name:s_.normalizedPm2,notes:s_.normalizedNotes,urlLines:t},pm2:s_.normalizedPm2}},[sd,sy,s_,sb,eo,sf,D]),sM=(0,A.useCallback)(async()=>{if(sd){e5(!0),e8(null);try{let e=await sT();t5.current=e.pm2,W(e.pm2),e8(D("线路设置已保存","Lane settings saved"))}catch(t){let e=t.message;e8(e),Q(e)}finally{e5(!1)}}},[sd,Q,sT,W,D]),sE=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t5.current,s=t.trim();if(!s){ej(D("请选择进程","Pick a process"));return}t3.current+=1;let n=si();ej(null);try{let t=new URLSearchParams({process:s});await J("/save_config?".concat(t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e})}),ep(e),sg(s,{streamKey:eL(e).key}),ej(D("youtube.ini 已保存","youtube.ini saved"))}catch(e){ej(e.message)}finally{sa(n)}},sU=async()=>{let e=eM(eb);await sE(e)},sZ=async()=>{t3.current+=1;let e=si();ej(null);try{var t,s;let e=eh||eM(eb),n=await J("/config_optimize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:"app-config",path:(s=t5.current,"youtube.".concat(s.replace(/[^a-zA-Z0-9_.-]/g,"_"),".ini")),content:e,action:"youtube_balanced_preset"})}),l=null!==(t=n.content)&&void 0!==t?t:e;ep(l),eg(eL(l)),ej(n.message||D("已应用 YouTube 预设","Applied YouTube preset"))}catch(e){ej(e.message)}finally{sa(e)}},sI=(0,A.useMemo)(()=>{var e,t;if("single"===ea)return e_("key = ".concat(eb.key));let s=null!==(t=null!==(e=null==sy?void 0:sy.streamKey)&&void 0!==e?e:null==sd?void 0:sd.streamKey)&&void 0!==t?t:"";return e_("key = ".concat(s))},[ea,null==sd?void 0:sd.streamKey,eb.key,null==sy?void 0:sy.streamKey]),sA=sI?"…".concat(sI):"—",sD=async()=>{if(!sd){let e=D("请选择线路后再保存地址","Pick a lane before saving URLs");e8(e),Q(e);return}if(s7){e8(s7),Q(s7);return}try{e5(!0),e8(null),t2.current+=1;let e=t0.current,t=await sT();t5.current=t.pm2,W(t.pm2),await Promise.resolve(q(e,t.pm2)),tX.current=!1,e8(D("线路与地址已保存","Lane settings and URLs saved"))}catch(t){let e=t instanceof Error?t.message:String(t);e8(e),Q(e)}finally{e5(!1)}},sO=async()=>{if(s7){Q(s7);return}let e=t5.current.trim();if(!e){Q(D("请选择进程","Pick a process"));return}try{t2.current+=1,await Promise.resolve(q(tQ.current,e)),sg(e,{urlLines:tQ.current}),tX.current=!1}catch(e){}},sK=async()=>{let e="single"===ea?tQ.current:t0.current;eO(!0),eB(null);try{var t;let s=await J("/config_optimize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({root:"app-config",path:eT(t5.current),content:e,action:"dedupe_urls"})}),n=null!==(t=s.content)&&void 0!==t?t:e;"single"===ea?t7(n):se(n),tX.current=!0,eB(s.message||D("已去重当前 URL 列表","Deduplicated current URL list"))}catch(e){eB(e.message)}finally{eO(!1)}},sB=async()=>{if(!sd||!sy)return;let e=eL(eh||eM(eb)),t=eM({key:sy.streamKey.trim(),rtmps:e.rtmps,bitrate:e.bitrate,fastAudio:e.fastAudio});e5(!0),e8(null);try{let e=await sT();t5.current=e.pm2,W(e.pm2),await sE(t,e.pm2),e8(D("线路设置与 youtube.ini 已保存","Lane settings and youtube.ini saved"))}catch(t){let e=t.message;e8(e),Q(e)}finally{e5(!1)}},sW="single"===ea?eu:eR,sH=(0,A.useMemo)(()=>tL(sW).length,[sW]),sF=(0,A.useMemo)(()=>ez(sW).length,[sW]),sY=(0,A.useMemo)(()=>(0,eq.O0)(es),[es]),sG=(0,A.useMemo)(()=>(0,eq.U_)(sY,"pro"===ea&&sd?eo.findIndex(e=>e.id===sd.id):0),[sd,eo,ea,sY]),sq=sG.link?(0,ef.p)(sG.link.url):(0,ef.p)("http://live.local:9200/"),sJ=(0,A.useMemo)(()=>(0,eq.Tc)(sY),[sY]),sV=(0,A.useMemo)(()=>{var e;return[null===(e=sG.link)||void 0===e?void 0:e.url,null==es?void 0:es.chromium_remote_debug,null==es?void 0:es.srs_api].filter(e=>!!e)},[es,null===(t=sG.link)||void 0===t?void 0:t.url]),s$=(0,A.useCallback)(async(e,t)=>{if(!tq&&("delete"!==t||window.confirm("".concat(e.label,": 删除容器?浏览器配置和登录数据会保留,之后点“启动”会自动重建。")))){tJ("".concat(e.id,":").concat(t)),t$(null);try{let s=await J("/neko/instance_action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id,action:t})}),n=s.running?D("运行中","running"):s.exists?D("已停止","stopped"):D("容器不存在","missing"),l=s.message||"".concat(e.label,": ").concat(n);t$("".concat(l," \xb7 ").concat(n)),await (null==et?void 0:et())}catch(t){let e=t.message;t$(e),Q(e)}finally{tJ(null)}}},[J,tq,Q,et,D]),sX=(0,A.useCallback)(async e=>{let t=sd?e2(sd):"";return sd&&e===t?await sT():(sb(eo),await sf(eo,{force:!0}),{next:eo,savedLane:null!=sd?sd:null,pm2:e})},[sd,sb,eo,sT,sf]),sQ=(0,A.useCallback)(async(e,t)=>{let s=!!sd&&e2(sd)===t;if("stop"!==e){var n,l;let e=eo,s=t;try{let n=await sX(t);e=n.next,s=n.pm2}catch(e){Q("".concat(D("当前线路保存失败","Failed to save the active lane"),": ").concat(e.message));return}let i=e.find(e=>e2(e)===s),a=null!==(n=null==i?void 0:i.urlLines)&&void 0!==n?n:"";if(!(null!==(l=null==i?void 0:i.streamKey)&&void 0!==l?l:"").trim()){Q(D("请先填写当前线路的推流密钥","Fill the stream key before starting"));return}if(!tL(a).length){Q(D("请先填写当前线路的直播地址","Fill the source URLs before starting"));return}t=s}s&&W(t),Y(e,t)},[sd,eo,sX,Q,Y,W,D]),s0=(0,A.useCallback)(async e=>{tK(!0);try{var t,s,n,l;let i=await J("/hub/youtube/live/summary");tI(i);let a=i.active||[],r=t5.current.trim(),o=null!==(l=null!==(n=null!=e?e:r?null===(t=a.find(e=>e.process===r))||void 0===t?void 0:t.id:void 0)&&void 0!==n?n:null===(s=a[0])||void 0===s?void 0:s.id)&&void 0!==l?l:null==tA?void 0:tA.id;if(o){let e=await J("/hub/youtube/live/events/".concat(encodeURIComponent(String(o))));e.event&&tD(e.event)}}catch(e){}finally{tK(!1)}},[J,null==tA?void 0:tA.id]),s1=(0,A.useCallback)(async e=>{tK(!0);try{let t=await J("/hub/youtube/live/events/".concat(encodeURIComponent(String(e))));tD(t.event||null)}catch(e){Q(e.message)}finally{tK(!1)}},[J,Q]),s5=null!==(x=null==tZ?void 0:null===(s=tZ.active)||void 0===s?void 0:s.length)&&void 0!==x?x:0,s2=(0,A.useMemo)(()=>{var e;return(e={activeEvents:s5,pageVisible:tY}).pageVisible?e.activeEvents>0?4e3:12e3:3e4},[s5,tY]);(0,A.useEffect)(()=>{if(s0(null),s2<=0)return;let e=window.setInterval(()=>void s0(),s2);return()=>window.clearInterval(e)},[s2,s0]),(0,A.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&s0(null)};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[s0]);let s3=(0,A.useCallback)(async()=>{tF(!0);try{let e=await J("/hub/youtube/quality_guard");tW(e)}catch(e){}finally{tF(!1)}},[J]),s4=null!==(u=null==tB?void 0:null===(l=tB.summary)||void 0===l?void 0:l.pushing_lanes)&&void 0!==u?u:0,s6=(0,A.useMemo)(()=>{var e;return(e={pushingLanes:s4,pageVisible:tY}).pageVisible?e.pushingLanes>0?6e3:15e3:3e4},[s4,tY]);(0,A.useEffect)(()=>{if(s3(),s6<=0)return;let e=window.setInterval(()=>void s3(),s6);return()=>window.clearInterval(e)},[s6,s3]),(0,A.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&s3()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[s3]);let s8=!!O||eS||eI||eD||eX,s9=!!O||eX,s7=eS?D("正在读取 youtube.ini,稍后再保存地址","youtube.ini is loading; save URLs after it finishes"):eI?D("正在重新读取地址列表,稍后再保存","URL list is reloading; save after it finishes"):eD?D("正在整理地址列表,稍后再保存","URL list is being optimized; save after it finishes"):O?D("正在执行其他操作,稍后再保存地址","Another operation is running; save URLs after it finishes"):"",ne="single"===ea?sp:sh,nt=(0,A.useMemo)(()=>"pro"===ea?ek(X.filter(e=>ti(e))):eN(sp),[ea,X,sp]),ns=(0,A.useMemo)(()=>(function(e){if(e.paused)return 0;if(!e.pageVisible)return 3e4;switch(e.activity){case"hot":return 800;case"warm":return 2e3;default:return 4e3}})({activity:nt,pageVisible:tY}),[nt,tY]),nn=th(sm(B)),nl=sd?tu(su(e2(sd)),eR||sd.urlLines||""):"",ni=tx(sp),na=(0,A.useMemo)(()=>{var e,t,s;let n=(null==tZ?void 0:tZ.active)||[],l=B.trim();return l?null!==(s=null!==(t=n.find(e=>e.process===l))&&void 0!==t?t:n[0])&&void 0!==s?s:null:null!==(e=n[0])&&void 0!==e?e:null},[B,null==tZ?void 0:tZ.active]),nr=(0,A.useMemo)(()=>{var e;if("single"===ea)return eu;let t=eo.find(e=>e2(e)===B);return t&&t.id===(null==sd?void 0:sd.id)?eR:(null!==(e=null==t?void 0:t.urlLines)&&void 0!==e?e:"").trim()||eR},[null==sd?void 0:sd.id,eo,ea,eR,B,eu]),no=tu(sp,nr),nc=tm(sp,nr),nd=null==tB?void 0:null===(i=tB.lanes)||void 0===i?void 0:i.find(e=>e.process===B),nx=null==nd?void 0:nd.metrics,nu=null!==(m=null==nd?void 0:nd.score)&&void 0!==m?m:null,nm="pro"===ea?X.filter(e=>ti(e)&&tx(e)).length:ni?1:0,nh="number"==typeof(null==sp?void 0:sp.ffmpeg_speed)?sp.ffmpeg_speed.toFixed(2):"number"==typeof(null==nx?void 0:nx.speed)?nx.speed.toFixed(2):null,np="number"==typeof(null==sp?void 0:sp.ffmpeg_frame)?String(sp.ffmpeg_frame):"number"==typeof(null==nx?void 0:nx.frame)?String(nx.frame):null,nb="number"==typeof(null==nx?void 0:nx.bitrate)?"".concat(Math.round(nx.bitrate)," kbps"):null,ng="number"==typeof(null==sp?void 0:sp.ffmpeg_time_seconds)?tk(sp.ffmpeg_time_seconds,D):null,nf=!sI||0===sF,nv=sI?eb.rtmps?"RTMPS":"RTMP":D("检查密钥","Check key"),ny=e=>{var t;let s=(null===(t=sG.link)||void 0===t?void 0:t.id)===e.id,l=tq==="".concat(e.id,":start"),i=tq==="".concat(e.id,":stop"),a=tq==="".concat(e.id,":delete"),r=!!tq,o=e.id===sY.length&&sY.length>1,c=r||!o;return(0,n.jsxs)("div",{className:"flex min-h-[2.5rem] items-stretch overflow-hidden rounded-lg border text-xs ring-1 ".concat(s?"border-emerald-400/30 bg-emerald-500/15 text-emerald-50 ring-emerald-400/25":"border-white/10 bg-white/5 text-zinc-200 ring-white/10"),children:[(0,n.jsxs)("a",{href:(0,ef.p)(e.url),target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 px-3 py-2 hover:bg-white/[0.04]",children:[(0,n.jsx)("span",{className:"font-semibold",children:e.label}),(0,n.jsx)("span",{className:"rounded-full bg-emerald-500/15 px-1.5 py-0.5 text-[10px] text-emerald-100",children:e.accessLabel}),(0,n.jsxs)("span",{className:"font-mono text-white/70",children:[e.host||"",e.port?":".concat(e.port):""]})]}),(0,n.jsxs)("div",{className:"flex border-l border-white/10",children:[(0,n.jsxs)("button",{type:"button",disabled:r,title:D("启动 Neko 容器","Start Neko container"),onClick:()=>void s$(e,"start"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 px-2 text-emerald-100 hover:bg-emerald-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[l?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)($.Z,{className:"h-3.5 w-3.5"}),D("启动","Start")]}),(0,n.jsxs)("button",{type:"button",disabled:r,title:D("停止 Neko 容器","Stop Neko container"),onClick:()=>void s$(e,"stop"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 border-l border-white/10 px-2 text-amber-100 hover:bg-amber-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[i?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(eW.Z,{className:"h-3.5 w-3.5"}),D("停止","Stop")]}),(0,n.jsxs)("button",{type:"button",disabled:c,title:o?D("删除最后一个 Neko 实例,保留浏览器配置数据","Delete the last Neko instance and keep browser profile data"):D("只能删除最后一个 Neko 实例","Only the last Neko instance can be deleted"),onClick:()=>void s$(e,"delete"),className:"inline-flex min-w-[3.75rem] items-center justify-center gap-1 border-l border-white/10 px-2 text-rose-100 hover:bg-rose-500/15 disabled:cursor-not-allowed disabled:opacity-45",children:[a?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(L.Z,{className:"h-3.5 w-3.5"}),D("删除","Delete")]})]})]},e.key)},nw=(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-4 text-xs text-zinc-400",children:[(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-2",children:[(0,n.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:eE,onChange:e=>eZ(e.target.checked)}),D("后台自动从服务器刷新(空闲约 12 秒)","Auto-refresh from server (~12s when idle)")]}),(0,n.jsx)("button",{type:"button",disabled:s8,onClick:()=>void sc(),className:"rounded-lg border border-white/10 px-3 py-1.5 text-zinc-200 hover:bg-white/5",children:D("手动重新读取","Reload from server")}),(0,n.jsx)("button",{type:"button",disabled:s8,onClick:()=>void sK(),className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-1.5 text-cyan-100 hover:bg-cyan-500/15",children:eD?D("去重中...","Deduplicating..."):D("智能去重","Deduplicate")})]}),nj=(null==tZ?void 0:tZ.active)||[],nN=(null==tZ?void 0:tZ.latest)||[],nk=(null==tZ?void 0:tZ.alerts)||[],n_=(null==tZ?void 0:tZ.stats)||{},nz=[{label:D("活动事件","Active"),value:null!==(h=n_.active_events)&&void 0!==h?h:nj.length,Icon:a.Z},{label:D("历史事件","History"),value:null!==(p=n_.total_events)&&void 0!==p?p:nN.length,Icon:eH.Z},{label:D("采样点","Samples"),value:null!==(b=n_.sample_count)&&void 0!==b?b:0,Icon:eF.Z},{label:D("峰值在线","Viewer peak"),value:null!==(g=n_.viewer_peak)&&void 0!==g?g:0,Icon:eY.Z},{label:D("累计时长","Total duration"),value:tg(n_.total_duration_seconds),Icon:k.Z}],nS=(0,n.jsxs)("section",{className:"rounded-2xl border border-cyan-500/20 bg-gradient-to-br from-cyan-500/[0.08] via-zinc-950/80 to-emerald-500/[0.05] p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(eF.Z,{className:"h-4 w-4 text-cyan-300"}),D("直播事件中枢","Live event center")]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:D("事件、转播对象、时长、页面采集、弹窗和告警全部写入本地 SQLite,可追溯。","Events, source rooms, duration, browser telemetry, popups, and alerts are stored locally.")})]}),(0,n.jsxs)("button",{type:"button",onClick:()=>void s0(),className:"inline-flex items-center gap-2 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-2 text-xs text-zinc-200 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(tO?"animate-spin":"")}),D("刷新事件","Refresh events")]})]}),(0,n.jsx)("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 xl:grid-cols-5",children:nz.map(e=>{let{label:t,value:s,Icon:l}=e;return(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-zinc-500",children:[(0,n.jsx)(l,{className:"h-3.5 w-3.5 text-cyan-300"}),t]}),(0,n.jsx)("p",{className:"mt-2 font-mono text-lg font-semibold text-white",children:String(s)})]},t)})}),(0,n.jsxs)("div",{className:"mt-5 grid gap-4 xl:grid-cols-[minmax(0,1fr)_minmax(22rem,0.9fr)]",children:[(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-200/90",children:D("正在转播","Active relay")}),(0,n.jsx)("span",{className:"rounded-full bg-emerald-500/15 px-2 py-0.5 text-[10px] text-emerald-100 ring-1 ring-emerald-500/25",children:nj.length})]}),(0,n.jsxs)("div",{className:"mt-3 space-y-2",children:[(nj.length?nj:nN.slice(0,1)).map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>void s1(e.id),className:"block w-full rounded-lg border border-white/[0.06] bg-white/[0.03] px-3 py-2 text-left transition hover:bg-white/[0.06]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"truncate text-sm font-medium text-white",children:e.source_title||e.channel_name||e.source_room_id||e.process||"#".concat(e.id)}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tv(e.status)),children:e.status||"event"})]}),(0,n.jsxs)("div",{className:"mt-1 flex flex-wrap gap-2 font-mono text-[10px] text-zinc-500",children:[(0,n.jsx)("span",{children:e.process||"-"}),(0,n.jsx)("span",{children:e.source_room_id?"room:".concat(e.source_room_id):D("未知来源","unknown source")}),(0,n.jsx)("span",{children:tg(e.duration_seconds)}),(0,n.jsx)("span",{children:null!=e.last_viewer_count?"".concat(e.last_viewer_count," online"):""})]})]},e.id)),nj.length||nN.length?null:(0,n.jsx)("p",{className:"text-xs text-zinc-600",children:D("暂无事件;开始直播或打开 Neko 中的 YouTube Studio 后会自动生成。","No events yet. Start a relay or open YouTube Studio in Neko.")})]})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-zinc-400",children:D("最近事件","Recent events")}),(0,n.jsx)("div",{className:"mt-3 divide-y divide-white/[0.06]",children:nN.slice(0,8).map(e=>{var t;return(0,n.jsxs)("button",{type:"button",onClick:()=>void s1(e.id),className:"flex w-full items-center justify-between gap-3 py-2 text-left",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"truncate text-xs font-medium text-zinc-200",children:e.source_title||e.source_room_id||e.channel_name||e.process||"#".concat(e.id)}),(0,n.jsxs)("p",{className:"mt-0.5 font-mono text-[10px] text-zinc-600",children:[tf(e.started_at)," \xb7 ",tg(e.duration_seconds)]})]}),(0,n.jsxs)("span",{className:"shrink-0 rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tv(e.status)),children:[null!==(t=e.quality_score)&&void 0!==t?t:0,"/100"]})]},e.id)})})]})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-200/90",children:D("事件详情页","Event detail")}),tA?(0,n.jsx)("button",{type:"button",onClick:()=>tD(null),className:"text-[11px] text-zinc-500 hover:text-zinc-300",children:D("收起","Close")}):null]}),tA?(0,n.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("p",{className:"truncate text-sm font-semibold text-white",children:tA.source_title||tA.source_room_id||tA.process}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tv(tA.status)),children:tA.status})]}),(0,n.jsxs)("div",{className:"mt-2 grid gap-2 text-[11px] text-zinc-400 sm:grid-cols-2",children:[(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Process:"})," ",tA.process||"-"]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Room:"})," ",tA.source_room_id||"-"]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Started:"})," ",tf(tA.started_at)]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Duration:"})," ",tg(tA.duration_seconds)]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Viewers:"})," ",null!==(f=tA.last_viewer_count)&&void 0!==f?f:"-"," / peak ",null!==(v=tA.viewer_peak)&&void 0!==v?v:0]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Health:"})," ",tA.last_health||tA.last_live_status||"-"]})]}),(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[tA.source_url?(0,n.jsx)("a",{href:tA.source_url,target:"_blank",rel:"noreferrer",className:"rounded-lg bg-violet-500/15 px-2.5 py-1.5 text-[11px] text-violet-100 ring-1 ring-violet-500/25",children:D("打开源直播间","Open source")}):null,tA.last_page_url?(0,n.jsx)("a",{href:tA.last_page_url,target:"_blank",rel:"noreferrer",className:"rounded-lg bg-cyan-500/15 px-2.5 py-1.5 text-[11px] text-cyan-100 ring-1 ring-cyan-500/25",children:D("打开 Studio 页面","Open Studio page")}):null]})]}),(tA.alerts||nk).slice(0,4).length?(0,n.jsxs)("div",{className:"rounded-lg border border-amber-500/20 bg-amber-500/[0.06] p-3",children:[(0,n.jsxs)("h5",{className:"flex items-center gap-2 text-xs font-semibold text-amber-100",children:[(0,n.jsx)(ey.Z,{className:"h-3.5 w-3.5"}),D("弹窗 / 告警","Popups / alerts")]}),(0,n.jsx)("div",{className:"mt-2 space-y-1",children:(tA.alerts||nk).slice(0,4).map((e,t)=>(0,n.jsxs)("p",{className:"text-[11px] text-amber-100/85",children:[e.title||e.severity||"alert",": ",e.message||"-"]},"".concat(e.id||t)))})]}):null,(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsx)("h5",{className:"text-xs font-semibold text-zinc-300",children:D("采样时间线","Sample timeline")}),(0,n.jsxs)("div",{className:"mt-2 max-h-52 space-y-2 overflow-auto pr-1",children:[(tA.samples||[]).slice(0,12).map(e=>{var t;return(0,n.jsxs)("div",{className:"rounded-md border border-white/[0.05] bg-black/25 px-2 py-1.5",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 font-mono text-[10px] text-zinc-500",children:[(0,n.jsx)("span",{children:tf(e.ts)}),(0,n.jsx)("span",{children:e.source||"sample"})]}),(0,n.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-300",children:[e.live_status||"-"," \xb7 ",e.health||"-"," \xb7 ",null!==(t=e.viewer_count)&&void 0!==t?t:"-"," online"]}),e.popup_text?(0,n.jsx)("p",{className:"mt-1 text-[10px] text-amber-100/80",children:e.popup_text}):null]},e.id)}),(tA.samples||[]).length?null:(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:D("暂无采样;Chrome 扩展或状态接口会自动写入。","No samples yet. The Chrome extension or status API will fill this.")})]})]})]}):(0,n.jsx)("p",{className:"mt-3 text-xs text-zinc-600",children:D("选择左侧事件查看完整详情。","Select an event to see details.")})]})]})]}),nC=[...nj,...nN.filter(e=>!nj.some(t=>t.id===e.id))].slice(0,12),nR=tA||nC[0]||null,nP=(null==nR?void 0:nR.samples)||[],nL=(null==nR?void 0:null===(r=nR.alerts)||void 0===r?void 0:r.length)?nR.alerts:nk,nT=[{label:D("正在直播","Live now"),value:String(null!==(j=n_.active_events)&&void 0!==j?j:nj.length),helper:D("当前仍在推流的场次","Events still pushing"),Icon:V.Z,tone:"text-emerald-200"},{label:D("总场次","Total events"),value:String(null!==(N=n_.total_events)&&void 0!==N?N:nN.length),helper:D("本机数据库里的直播记录","Stored locally"),Icon:eH.Z,tone:"text-cyan-200"},{label:D("累计时长","Total duration"),value:tk(n_.total_duration_seconds,D),helper:D("已结束场次累计","Ended events total"),Icon:k.Z,tone:"text-violet-200"},{label:D("最高在线","Peak viewers"),value:tw(null!==(_=n_.viewer_peak)&&void 0!==_?_:0,D),helper:D("Chrome/Studio 采集峰值","Captured from Studio"),Icon:eY.Z,tone:"text-amber-200"}],nM=(0,n.jsxs)("section",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/90 p-6 ring-1 ring-cyan-500/10",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-base font-semibold text-white",children:[(0,n.jsx)(eF.Z,{className:"h-5 w-5 text-cyan-300"}),D("直播事件中枢","Live event center")]}),(0,n.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-zinc-400",children:D("这里按运营视角展示:谁在播、转播哪个直播间、播了多久、观众多少、Studio 是否弹窗、有没有异常。机器编号只放在详情底部。","Built for operators: what is live, source room, duration, viewers, Studio popups, and issues. Technical ids stay in the detail footer.")})]}),(0,n.jsxs)("button",{type:"button",onClick:()=>void s0(),className:"inline-flex items-center gap-2 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-2 text-xs text-zinc-200 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(tO?"animate-spin":"")}),D("刷新","Refresh")]})]}),(0,n.jsx)("div",{className:"mt-5 grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:nT.map(e=>{let{label:t,value:s,helper:l,Icon:i,tone:a}=e;return(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.035] p-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,n.jsx)("p",{className:"text-xs text-zinc-500",children:t}),(0,n.jsx)(i,{className:"h-4 w-4 ".concat(a)})]}),(0,n.jsx)("p",{className:"mt-2 text-2xl font-semibold tracking-tight text-white",children:s}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-600",children:l})]},t)})}),(0,n.jsxs)("div",{className:"mt-6 grid gap-5 xl:grid-cols-[minmax(0,1.1fr)_minmax(25rem,0.9fr)]",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-white/[0.06] px-4 py-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"text-sm font-semibold text-white",children:nj.length?D("正在直播","Live now"):D("最近直播记录","Recent live events")}),(0,n.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:nj.length?D("优先显示还在推流的场次。","Active relays are listed first."):D("当前没有正在直播的场次,下方是最近历史。","Nothing is live now; showing recent history.")})]}),(0,n.jsxs)("span",{className:"rounded-full bg-cyan-500/10 px-2.5 py-1 text-xs text-cyan-100 ring-1 ring-cyan-500/20",children:[nC.length," ",D("条记录","records")]})]}),(0,n.jsxs)("div",{className:"divide-y divide-white/[0.06]",children:[nC.map(e=>{var t;let s=(null==nR?void 0:nR.id)===e.id;return(0,n.jsxs)("button",{type:"button",onClick:()=>void s1(e.id),className:"grid w-full gap-3 px-4 py-4 text-left transition md:grid-cols-[minmax(0,1fr)_8rem_7rem_7rem] ".concat(s?"bg-cyan-500/[0.08]":"hover:bg-white/[0.04]"),children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(tv(e.status)),children:ty(e.status,D)}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(tS(e)),children:tz(e,D)})]}),(0,n.jsx)("p",{className:"mt-2 truncate text-sm font-semibold text-white",children:tj(e,D)}),(0,n.jsxs)("p",{className:"mt-1 truncate text-xs text-zinc-500",children:[tN(e,D)," ","->"," YouTube"]})]}),(0,n.jsxs)("div",{className:"self-center",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:D("开始","Started")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-300",children:t_(e.started_at)})]}),(0,n.jsxs)("div",{className:"self-center",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:D("时长","Duration")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-300",children:tk(e.duration_seconds,D)})]}),(0,n.jsxs)("div",{className:"self-center",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:D("在线/峰值","Viewers")}),(0,n.jsxs)("p",{className:"mt-1 text-xs text-zinc-300",children:[tw(e.last_viewer_count,D)," / ",tw(null!==(t=e.viewer_peak)&&void 0!==t?t:0,D)]})]})]},e.id)}),nC.length?null:(0,n.jsxs)("div",{className:"px-4 py-10 text-center",children:[(0,n.jsx)(c.Z,{className:"mx-auto h-8 w-8 text-zinc-700"}),(0,n.jsx)("p",{className:"mt-3 text-sm font-medium text-zinc-300",children:D("还没有直播记录","No live events yet")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-600",children:D("启动转播或在 Neko 打开 YouTube Studio 后,这里会自动生成可追溯记录。","Start a relay or open YouTube Studio in Neko to create traceable records.")})]})]})]}),(0,n.jsx)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:nR?(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"text-xs text-cyan-300",children:D("这场直播","Selected event")}),(0,n.jsx)("h4",{className:"mt-1 truncate text-lg font-semibold text-white",children:tj(nR,D)}),(0,n.jsxs)("p",{className:"mt-1 text-sm text-zinc-500",children:[tN(nR,D)," ","->"," YouTube"]})]}),(0,n.jsx)("span",{className:"rounded-full px-2.5 py-1 text-xs ring-1 ".concat(tv(nR.status)),children:ty(nR.status,D)})]})}),(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:D("直播时长","Duration")}),(0,n.jsx)("p",{className:"mt-1 text-lg font-semibold text-white",children:tk(nR.duration_seconds,D)}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:tf(nR.started_at)})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:D("观众","Viewers")}),(0,n.jsxs)("p",{className:"mt-1 text-lg font-semibold text-white",children:[tw(nR.last_viewer_count,D),(0,n.jsxs)("span",{className:"ml-2 text-xs font-normal text-zinc-500",children:[D("峰值","peak")," ",tw(null!==(z=nR.viewer_peak)&&void 0!==z?z:0,D)]})]}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:D("来自 Chrome 插件/Studio 页面采集","Captured from Studio")})]})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("h5",{className:"text-sm font-semibold text-white",children:D("Studio 状态","Studio status")}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(tS(nR)),children:tz(nR,D)})]}),(0,n.jsxs)("div",{className:"mt-3 space-y-2 text-sm text-zinc-300",children:[(0,n.jsx)("p",{children:nR.last_live_status||nR.last_health||D("暂未采集到 Studio 状态","No Studio status captured yet")}),nR.last_popup_text?(0,n.jsx)("p",{className:"rounded-md border border-amber-500/20 bg-amber-500/[0.08] px-3 py-2 text-xs text-amber-100",children:nR.last_popup_text}):(0,n.jsx)("p",{className:"text-xs text-zinc-600",children:D("没有记录到弹窗。","No popup recorded.")}),nR.last_page_title||nR.last_page_url?(0,n.jsx)("p",{className:"truncate text-xs text-zinc-500",children:nR.last_page_title||nR.last_page_url}):null]}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[nR.source_url?(0,n.jsxs)("a",{href:nR.source_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-lg bg-violet-500/15 px-2.5 py-1.5 text-xs text-violet-100 ring-1 ring-violet-500/25",children:[D("打开源直播间","Open source")," ",(0,n.jsx)(G.Z,{className:"h-3 w-3"})]}):null,nR.last_page_url?(0,n.jsxs)("a",{href:nR.last_page_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-lg bg-cyan-500/15 px-2.5 py-1.5 text-xs text-cyan-100 ring-1 ring-cyan-500/25",children:[D("打开 Studio","Open Studio")," ",(0,n.jsx)(G.Z,{className:"h-3 w-3"})]}):null]})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsx)("h5",{className:"text-sm font-semibold text-white",children:D("采样时间线","Telemetry timeline")}),(0,n.jsxs)("div",{className:"mt-3 max-h-64 space-y-2 overflow-auto pr-1",children:[nP.slice(0,10).map(e=>(0,n.jsxs)("div",{className:"rounded-md border border-white/[0.05] bg-black/25 px-3 py-2",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[(0,n.jsx)("span",{className:"text-zinc-400",children:t_(e.ts)}),(0,n.jsx)("span",{className:"text-zinc-600",children:e.source||D("采样","sample")})]}),(0,n.jsxs)("p",{className:"mt-1 text-sm text-zinc-200",children:[e.live_status||e.health||D("状态未识别","Unknown status"),(0,n.jsxs)("span",{className:"ml-2 text-xs text-zinc-500",children:[D("在线","online")," ",tw(e.viewer_count,D)]})]}),e.popup_text?(0,n.jsx)("p",{className:"mt-1 text-xs text-amber-100",children:e.popup_text}):null]},e.id)),nP.length?null:(0,n.jsx)("p",{className:"rounded-md border border-white/[0.05] bg-black/20 px-3 py-3 text-xs text-zinc-500",children:tA?D("这场直播暂时没有采样明细。","No telemetry samples for this event yet."):D("点击左侧记录后加载完整采样明细。","Click a record on the left to load full telemetry samples.")})]})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-white/[0.06] bg-white/[0.03] p-3",children:[(0,n.jsxs)("h5",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(ey.Z,{className:"h-4 w-4 text-amber-300"}),D("告警和弹窗","Alerts and popups")]}),(0,n.jsxs)("div",{className:"mt-3 space-y-2",children:[nL.slice(0,4).map((e,t)=>(0,n.jsxs)("p",{className:"rounded-md border border-amber-500/15 bg-amber-500/[0.06] px-3 py-2 text-xs text-amber-100",children:[e.title||e.severity||D("提示","Notice"),": ",e.message||"-"]},"".concat(e.id||t))),nL.length?null:(0,n.jsx)("p",{className:"text-xs text-zinc-600",children:D("没有告警。","No alerts.")})]})]}),(0,n.jsxs)("p",{className:"truncate text-[11px] text-zinc-700",children:[D("技术标识","Technical id"),": #",nR.id," \xb7 ",nR.process||"-"," \xb7 ",nR.event_uuid||"-"]})]}):(0,n.jsxs)("div",{className:"flex min-h-[24rem] flex-col items-center justify-center text-center",children:[(0,n.jsx)(eF.Z,{className:"h-10 w-10 text-zinc-700"}),(0,n.jsx)("p",{className:"mt-3 text-sm font-medium text-zinc-300",children:D("等待第一场直播","Waiting for the first live event")}),(0,n.jsx)("p",{className:"mt-1 max-w-sm text-xs text-zinc-600",children:D("开始转播后,这里会变成这场直播的详情页。","After a relay starts, this panel becomes the event detail page.")})]})})]})]}),nE=(null==tB?void 0:tB.summary)||{},nU=(null==tB?void 0:tB.lanes)||[],nZ=(null==tB?void 0:tB.recommendations)||[],nI=(0,n.jsxs)("section",{className:"rounded-2xl border border-emerald-500/20 bg-gradient-to-br from-emerald-500/[0.08] via-zinc-950/90 to-cyan-500/[0.06] p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-base font-semibold text-white",children:[(0,n.jsx)(a.Z,{className:"h-5 w-5 text-emerald-300"}),D("算法友好质量守护","Algorithm-friendly quality guard")]}),(0,n.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-zinc-400",children:D("目标不是刷数据,而是让直播信号长期稳定:不断流、不卡顿、Studio 状态可见、异常能追踪。","The goal is stable, policy-safe signal quality: no drops, no stalls, visible Studio state, and traceable issues.")})]}),(0,n.jsxs)("button",{type:"button",onClick:()=>void s3(),className:"inline-flex items-center gap-2 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-2 text-xs text-zinc-200 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(tH?"animate-spin":"")}),D("重新检测","Check now")]})]}),(0,n.jsxs)("div",{className:"mt-5 grid gap-3 md:grid-cols-[12rem_minmax(0,1fr)]",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/30 p-4",children:[(0,n.jsx)("p",{className:"text-xs text-zinc-500",children:D("综合分","Score")}),(0,n.jsx)("p",{className:"mt-2 text-5xl font-semibold tracking-tight ".concat(tC(null==tB?void 0:tB.score)),children:null!==(S=null==tB?void 0:tB.score)&&void 0!==S?S:0}),(0,n.jsx)("p",{className:"mt-2 text-[11px] text-zinc-600",children:D("80 以上适合长时间无人值守","80+ is suitable for long unattended runs")})]}),(0,n.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[[D("推流线路","Lanes"),"".concat(null!==(C=nE.pushing_lanes)&&void 0!==C?C:0,"/").concat(null!==(R=nE.lanes)&&void 0!==R?R:0)],[D("活动事件","Active events"),String(null!==(P=nE.active_events)&&void 0!==P?P:0)],[D("Studio 采样","Studio samples"),String(null!==(T=nE.sample_count)&&void 0!==T?T:0)],[D("最高在线","Viewer peak"),tw(null!==(M=nE.viewer_peak)&&void 0!==M?M:0,D)]].map(e=>{let[t,s]=e;return(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsx)("p",{className:"text-xs text-zinc-500",children:t}),(0,n.jsx)("p",{className:"mt-2 text-2xl font-semibold text-white",children:s})]},t)})})]}),(0,n.jsxs)("div",{className:"mt-5 grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(20rem,0.8fr)]",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25",children:[(0,n.jsxs)("div",{className:"border-b border-white/[0.06] px-4 py-3",children:[(0,n.jsx)("h4",{className:"text-sm font-semibold text-white",children:D("线路质量","Lane quality")}),(0,n.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:D("从进程、FFmpeg 日志、配置和事件采样综合判断。","Combined from process state, FFmpeg logs, config, and event telemetry.")})]}),(0,n.jsxs)("div",{className:"divide-y divide-white/[0.06]",children:[nU.map(e=>{var t,s,l,i,a,r,o,c,d;let x=(e.source_display||e.source_title||"").trim()||e.label||e.process||"-",u=[e.label,e.process].filter(Boolean).join(" \xb7 ");return(0,n.jsxs)("div",{className:"grid gap-3 px-4 py-4 md:grid-cols-[minmax(0,1fr)_6rem_14rem]",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("p",{className:"truncate text-sm font-semibold text-white",children:x}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(e.is_pushing?"bg-emerald-500/15 text-emerald-100 ring-emerald-500/25":"bg-zinc-600/20 text-zinc-300 ring-zinc-500/25"),children:e.is_pushing?D("推流中","Pushing"):D("未推流","Idle")}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[11px] ring-1 ".concat(e.rtmps?"bg-cyan-500/15 text-cyan-100 ring-cyan-500/25":"bg-amber-500/15 text-amber-100 ring-amber-500/25"),children:e.rtmps?"RTMPS":D("非 RTMPS","No RTMPS")})]}),(0,n.jsx)("p",{className:"mt-1 truncate text-xs text-zinc-600",children:u||"-"}),(0,n.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:(e.issues||[]).slice(0,3).map((e,t)=>(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ring-1 ".concat(tR(e.level)),children:e.text||e.level},"".concat(e.text||t)))})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-600",children:D("分数","Score")}),(0,n.jsx)("p",{className:"mt-1 text-2xl font-semibold ".concat(tC(e.score)),children:null!==(r=e.score)&&void 0!==r?r:0})]}),(0,n.jsxs)("div",{className:"grid grid-cols-3 gap-2 font-mono text-[11px] text-zinc-300",children:[(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"fps"}),tP(null===(t=e.metrics)||void 0===t?void 0:t.fps)]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"speed"}),tP(null===(s=e.metrics)||void 0===s?void 0:s.speed,"x")]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"kbps"}),tP(null===(l=e.metrics)||void 0===l?void 0:l.bitrate)]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"drop"}),null!==(o=null===(i=e.metrics)||void 0===i?void 0:i.drop)&&void 0!==o?o:"-"]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"urls"}),null!==(c=e.url_count)&&void 0!==c?c:0]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"block text-zinc-600",children:"err"}),null!==(d=null===(a=e.metrics)||void 0===a?void 0:a.error_count)&&void 0!==d?d:0]})]})]},e.process||e.label)}),nU.length?null:(0,n.jsx)("div",{className:"px-4 py-8 text-center text-sm text-zinc-500",children:D("没有发现 YouTube 线路。","No YouTube lanes found.")})]})]}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsx)("h4",{className:"text-sm font-semibold text-white",children:D("下一步建议","Next actions")}),(0,n.jsxs)("div",{className:"mt-3 space-y-2",children:[nZ.slice(0,6).map((e,t)=>(0,n.jsx)("p",{className:"rounded-lg px-3 py-2 text-xs ring-1 ".concat(tR(e.level)),children:e.text||"-"},"".concat(e.text||t))),nZ.length?null:(0,n.jsx)("p",{className:"text-xs text-zinc-600",children:D("暂无建议。","No recommendations.")})]})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-4",children:[(0,n.jsx)("h4",{className:"text-sm font-semibold text-white",children:"FFmpeg"}),(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-400",children:(null==tB?void 0:null===(o=tB.ffmpeg_profile)||void 0===o?void 0:o.target)||"1080p30 / RTMPS / AAC / stable relay"}),(0,n.jsx)("ul",{className:"mt-3 space-y-1.5 text-xs text-zinc-500",children:((null==tB?void 0:null===(d=tB.ffmpeg_profile)||void 0===d?void 0:d.guardrails)||[]).slice(0,4).map(e=>(0,n.jsxs)("li",{children:["- ",e]},e))})]})]})]})]}),nA=(0,n.jsxs)("section",{className:"rounded-2xl border border-white/[0.08] bg-gradient-to-br from-zinc-950/95 via-zinc-950/80 to-violet-500/[0.06] p-5 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,n.jsxs)("div",{className:"relative mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-black/40 ring-1 ring-white/10",children:[(0,n.jsx)(V.Z,{className:"h-5 w-5 ".concat(ni?"text-emerald-300":"text-zinc-500")}),ni?(0,n.jsxs)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3 w-3",children:[(0,n.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-60"}),(0,n.jsx)("span",{className:"relative inline-flex h-3 w-3 rounded-full bg-emerald-400"})]}):null]}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:D("转播实况","Relay snapshot")}),(0,n.jsx)("span",{className:"rounded-full px-2.5 py-0.5 text-[11px] font-medium ring-1 ".concat(tb(sp)),children:tp(sp,D)}),ni?(0,n.jsx)("span",{className:"rounded-full bg-emerald-500/15 px-2.5 py-0.5 text-[11px] text-emerald-100 ring-1 ring-emerald-500/25",children:D("正在推流","Pushing")}):null]}),(0,n.jsx)("p",{className:"mt-1 truncate text-sm text-zinc-300",children:no||D("未配置抖音直播源","No Douyin source configured")}),(0,n.jsxs)("p",{className:"mt-1 font-mono text-[11px] text-zinc-600",children:[B||"—","pro"===ea&&nm>0?" \xb7 ".concat(nm,"/").concat(eo.length," ").concat(D("路推流中","lanes pushing")):""]})]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[nc?(0,n.jsxs)("a",{href:nc,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg border border-violet-500/25 bg-violet-500/10 px-3 py-1.5 text-xs text-violet-100 ring-1 ring-violet-500/20 hover:bg-violet-500/15",children:[(0,n.jsx)(G.Z,{className:"h-3.5 w-3.5"}),D("打开源站","Open source")]}):null,sG.link?(0,n.jsxs)("a",{href:sq,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg border border-emerald-500/25 bg-emerald-500/10 px-3 py-1.5 text-xs text-emerald-100 ring-1 ring-emerald-500/20 hover:bg-emerald-500/15",children:[(0,n.jsx)(G.Z,{className:"h-3.5 w-3.5"}),D("Studio","Studio")]}):null,(0,n.jsxs)("button",{type:"button",onClick:()=>void(null==et||et()),className:"inline-flex items-center gap-1.5 rounded-lg border border-white/10 bg-white/[0.05] px-3 py-1.5 text-xs text-zinc-300 hover:bg-white/[0.08]",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5"}),D("刷新全局","Refresh")]})]})]}),(0,n.jsx)("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-7",children:[{label:D("FFmpeg 速度","FFmpeg speed"),value:nh?"".concat(nh,"x"):"—",warn:null==sp?void 0:sp.ffmpeg_speed_low,helper:ng||D("等待进程上报","Waiting for metrics")},{label:D("编码帧","Encoded frame"),value:null!=np?np:"—",warn:null==sp?void 0:sp.ffmpeg_progress_stalled,helper:(null==sp?void 0:sp.ffmpeg_active)?D("Worker 活跃","Worker active"):D("无活跃 Worker","No active worker")},{label:D("码率","Bitrate"),value:null!=nb?nb:"—",warn:!1,helper:(null==nx?void 0:nx.fps)!=null?"".concat(nx.fps," fps"):D("质量守护采样","Quality guard")},{label:D("质量分","Quality score"),value:null!=nu?String(nu):"—",warn:null!=nu&&nu<55,helper:D("当前线路综合评估","Current lane score")},{label:D("活动场次","Active events"),value:String(s5),warn:!1,helper:D("本地事件库","Local event store")},{label:D("抖音地址","Douyin URLs"),value:String(sF),warn:0===sF,helper:"".concat(sH," ").concat(D("条有效地址","valid URLs"))},{label:D("密钥尾码","Key suffix"),value:sA,warn:!sI,helper:nv}].map(e=>{let{label:t,value:s,warn:l,helper:i}=e;return(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 p-3 min-w-0",children:[(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:t}),(0,n.jsx)("p",{className:"mt-1 text-xl font-semibold tracking-tight ".concat(l?"text-amber-200":"text-white"),children:s}),(0,n.jsx)("p",{className:"mt-1 text-[10px] text-zinc-600",children:i})]},t)})}),na&&ni?(0,n.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-3 rounded-xl border border-cyan-500/20 bg-cyan-500/[0.06] px-4 py-3 text-xs",children:[(0,n.jsx)("span",{className:"font-medium text-cyan-100",children:D("本场直播","This event")}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 ring-1 ".concat(tv(na.status)),children:ty(na.status,D)}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 ring-1 ".concat(tS(na)),children:tz(na,D)}),(0,n.jsxs)("span",{className:"text-zinc-400",children:[D("观众","Viewers")," ",tw(na.last_viewer_count,D)," \xb7 ",tk(na.duration_seconds,D)]}),na.last_popup_text?(0,n.jsxs)("span",{className:"text-amber-200",children:[D("弹窗","Popup"),": ",na.last_popup_text]}):null]}):null]});return(0,n.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6",children:[ee?(0,n.jsx)(ev,{t:D,title:D("YouTube 转播链路","YouTube relay chain"),subtitle:D("与「网络」页相同风格的链路示意:代理 → 编码推流 → 浏览器侧操作工作室。","Same visual language as Network: proxy → encode → browser studio."),onNavigate:ee,steps:[{label:"ShellCrash",sub:D("透明代理","Proxy"),gradient:"from-violet-500 to-fuchsia-500",target:"network"},{label:"FFmpeg",sub:D("推流 / 转码","Stream"),gradient:"from-cyan-400 to-blue-500",target:"live_youtube"},{label:"Neko",sub:sG.link?"".concat(D("Chromium 工作室","Chromium studio")," \xb7 ").concat(sG.link.label):D("Chromium 工作室","Chromium studio"),gradient:"from-emerald-400 to-teal-500",openUrl:sq}]}):null,(0,n.jsx)("div",{className:"rounded-2xl border border-violet-500/25 bg-gradient-to-br from-violet-500/[0.12] via-zinc-950/80 to-cyan-500/5 p-6 shadow-xl shadow-violet-900/10",children:(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-red-500/30 to-violet-600/30 ring-1 ring-white/10",children:(0,n.jsx)(c.Z,{className:"h-5 w-5 text-red-200"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold tracking-tight text-white",children:D("YouTube 无人直播","YouTube unmanned live")}),(0,n.jsx)("p",{className:"mt-0.5 text-xs text-zinc-500",children:D("单路一条流;多路时每条线路独立保存自己的密钥、URL 列表和 PM2 任务。填好后保存,再点「开始」。Neko 浏览器仅作辅助工作室,不再阻塞推流。","Single lane or multi-lane: every lane keeps its own key, URL list, and PM2 task. Save, then Start. Neko is optional browser tooling and no longer blocks streaming.")})]})]}),(0,n.jsxs)("div",{className:"ml-auto flex shrink-0 self-start rounded-xl border border-white/10 bg-black/30 p-1 ".concat(""),"aria-hidden":!1,children:[(0,n.jsx)("button",{type:"button",onClick:()=>sR("single"),className:"rounded-lg px-4 py-2 text-xs font-medium transition ".concat("single"===ea?"bg-violet-500/25 text-white":"text-zinc-500 hover:text-zinc-300"),children:D("单频道","Single")}),(0,n.jsx)("button",{type:"button",onClick:()=>sR("pro"),className:"rounded-lg px-4 py-2 text-xs font-medium transition ".concat("pro"===ea?"bg-violet-500/25 text-white":"text-zinc-500 hover:text-zinc-300"),children:D("多频道 Pro","Multi Pro")})]})]})}),nA,sV.length?(0,n.jsxs)("div",{className:"space-y-2",children:[tV?(0,n.jsx)("p",{className:"text-xs text-zinc-400",children:tV}):null,(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[sG.link?(0,n.jsx)("a",{href:sq,target:"_blank",rel:"noreferrer",className:"rounded-lg border border-emerald-500/20 bg-emerald-500/10 px-3 py-2 text-xs text-emerald-100 ring-1 ring-emerald-500/20",children:D("打开当前线路 Neko 工作室","Open lane Neko studio")}):null,sY.length?(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:sY.map(e=>ny(e))}):null,(null==es?void 0:es.chromium_remote_debug)?(0,n.jsx)("a",{href:(0,ef.p)(es.chromium_remote_debug),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-cyan-500/20 bg-cyan-500/10 px-3 py-2 text-xs text-cyan-100 ring-1 ring-cyan-500/20",children:D("打开 Chromium 调试","Open Chromium debug")}):null,(null==es?void 0:es.srs_api)?(0,n.jsx)("a",{href:(0,ef.p)(es.srs_api),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-violet-500/20 bg-violet-500/10 px-3 py-2 text-xs text-violet-100 ring-1 ring-violet-500/20",children:D("打开 SRS API","Open SRS API")}):null]})]}):null,(0,n.jsxs)("div",{className:"rounded-2xl border border-amber-500/20 bg-zinc-950/60 p-6 ring-1 ring-white/[0.04]",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-amber-200/90",children:[(0,n.jsx)(V.Z,{className:"h-4 w-4"}),(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:D("直播开关","Live control")})]}),"single"===ea?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("label",{className:"mt-4 block text-xs font-semibold uppercase tracking-wider text-zinc-500",children:D("转播任务","Relay task")}),(0,n.jsxs)("select",{className:"mt-2 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm text-white",value:B,onChange:e=>{let t=e.target.value;t5.current=t,W(t),sS(t)},children:[B&&!el.some(e=>e.pm2===B)?(0,n.jsxs)("option",{value:B,children:[sx?"".concat(sx.name||sx.id," (").concat(B,")"):B,sh?" (".concat(tp(sh,D),")"):""]}):null,el.map(e=>(0,n.jsxs)("option",{value:e.pm2,children:[function(e,t){let s=tl(e.script).toLowerCase();return s.startsWith("douyin_youtube")?t("抖音→YouTube","Douyin → YouTube"):s.startsWith("youtube")?t("YouTube","YouTube"):e.label}(e,D)," (",e.pm2,")"]},e.pm2))]}),(0,n.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3",children:[(0,n.jsx)(tM,{kind:"start",targetPm2:B,busy:O,online:nn,label:D("开始直播","Start"),className:"bg-emerald-500/20 text-emerald-200 ring-emerald-500/30",baseLock:!1,onRun:()=>Y("start",B),notify:Q,t:D}),(0,n.jsx)(tM,{kind:"stop",targetPm2:B,busy:O,online:nn,label:D("停止直播","Stop"),className:"bg-rose-500/15 text-rose-200 ring-rose-500/25",baseLock:!1,onRun:()=>Y("stop",B),notify:Q,t:D}),(0,n.jsx)(tM,{kind:"restart",targetPm2:B,busy:O,online:nn,label:D("重新开始","Restart"),className:"bg-amber-500/15 text-amber-200 ring-amber-500/25",baseLock:!1,onRun:()=>Y("restart",B),notify:Q,t:D})]}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-2 text-xs",children:[(0,n.jsx)("span",{className:"rounded-full px-2.5 py-0.5 font-medium ring-1 ".concat(tb(ne)),children:tp(ne,D)}),"number"==typeof(null==ne?void 0:ne.ffmpeg_speed)?(0,n.jsxs)("span",{className:"font-mono text-zinc-400 ".concat(ne.ffmpeg_speed_low?"text-amber-300":""),children:["speed ",ne.ffmpeg_speed.toFixed(2),"x"]}):null,"number"==typeof(null==ne?void 0:ne.ffmpeg_frame)?(0,n.jsxs)("span",{className:"font-mono text-zinc-400 ".concat(ne.ffmpeg_progress_stalled?"text-rose-300":""),children:["frame ",ne.ffmpeg_frame]}):null]})]}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"mt-4 rounded-xl border border-cyan-500/25 bg-gradient-to-br from-cyan-500/[0.1] via-zinc-950/50 to-violet-500/[0.06] p-4 ring-1 ring-white/[0.04]",children:[(0,n.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-cyan-200/90",children:D("Pro 转播实况","Pro relay status")}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:D("对齐桌面端:每路独立 URL / youtube 配置文件;点左侧信息切换编辑,右侧控制进程。","Per-lane config files like desktop; click row info to edit, use right-side controls for PM2.")}),sJ?(0,n.jsxs)("p",{className:"mt-2 text-[11px] text-zinc-500",children:[D("Neko 实例","Neko instances"),": ",sJ]}):null,(0,n.jsx)("div",{className:"mt-3 max-h-[min(24rem,55vh)] space-y-2 overflow-y-auto pr-1",children:eo.map(e=>{var t,s,l,i;let a=e2(e),r=su(a),o=sm(a),c=ed===e.id,d=c?eR:(null!==(t=e.urlLines)&&void 0!==t?t:"").trim(),x=c?null!==(l=null!==(s=null==sy?void 0:sy.streamKey)&&void 0!==s?s:e.streamKey)&&void 0!==l?l:"":null!==(i=e.streamKey)&&void 0!==i?i:"",u=tL(d),m=ez(d),h=tm(r,d),p=e_("key = ".concat(x)),b=th(o),g=eo.findIndex(t=>t.id===e.id),f=(0,eq.U_)(sY,g).link,v=eQ(e.name,g>=0?g:0),y=tu(r,d),w="number"==typeof(null==r?void 0:r.ffmpeg_speed)?"speed ".concat(r.ffmpeg_speed.toFixed(2),"x"):"",j="number"==typeof(null==r?void 0:r.ffmpeg_frame)?"frame ".concat(r.ffmpeg_frame):"";return(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-lg border px-3 py-2.5 text-left text-xs transition sm:flex-nowrap ".concat(c?"border-violet-500/45 bg-violet-500/[0.1]":"border-white/10 bg-black/30 hover:border-white/18"),children:[(0,n.jsxs)("button",{type:"button",className:"min-w-0 flex-1 text-left",onClick:()=>{t5.current=e2(e),sP(e)},children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"font-medium text-zinc-100",children:y||D("未配置抖音直播源","No Douyin source")}),(0,n.jsx)("span",{className:"shrink-0 rounded-md px-2 py-0.5 text-[10px] font-medium ring-1 ".concat(tb(r)),children:tp(r,D)}),f?(0,n.jsxs)("span",{className:"shrink-0 rounded-md bg-emerald-500/15 px-2 py-0.5 text-[10px] font-medium text-emerald-100 ring-1 ring-emerald-500/25",children:[f.label," \xb7 ",f.accessLabel]}):null]}),(0,n.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 font-mono text-[10px] text-zinc-500",children:[(0,n.jsxs)("span",{title:v,children:[D("线路","Lane")," ",v]}),(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsxs)("span",{children:["key …",p||"—"]}),(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsx)("span",{className:"truncate",title:a,children:a}),(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsxs)("span",{children:["URL ",u.length]}),(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsxs)("span",{children:["DY ",m.length]}),w?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsx)("span",{className:(null==r?void 0:r.ffmpeg_speed_low)?"text-amber-300":"text-zinc-500",children:w})]}):null,j?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"}),(0,n.jsx)("span",{className:(null==r?void 0:r.ffmpeg_progress_stalled)?"text-rose-300":"text-zinc-500",children:j})]}):null]}),h?(0,n.jsx)("a",{href:h,target:"_blank",rel:"noreferrer",className:"mt-1 block max-w-full truncate text-cyan-300/90 underline-offset-2 hover:underline",onClick:e=>e.stopPropagation(),title:h,children:y?"".concat(D("打开源站","Open source")," \xb7 ").concat(h.replace(/^https?:\/\//,"")):h.replace(/^https?:\/\//,"")}):(0,n.jsx)("span",{className:"mt-1 block text-zinc-600",children:"—"})]}),(0,n.jsxs)("div",{className:"flex w-full shrink-0 flex-wrap items-center justify-end gap-1.5 sm:w-auto",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,n.jsx)(tM,{kind:"start",targetPm2:a,busy:O,online:b,label:D("开始","Start"),className:"rounded-lg bg-emerald-500/20 text-emerald-100 ring-emerald-500/30",baseLock:!1,onRun:()=>void sQ("start",a),notify:Q,t:D,compact:!0}),(0,n.jsx)(tM,{kind:"stop",targetPm2:a,busy:O,online:b,label:D("停止","Stop"),className:"rounded-lg bg-rose-500/15 text-rose-100 ring-rose-500/25",baseLock:!1,onRun:()=>void sQ("stop",a),notify:Q,t:D,compact:!0}),(0,n.jsx)(tM,{kind:"restart",targetPm2:a,busy:O,online:b,label:D("重新开始","Restart"),className:"rounded-lg bg-amber-500/15 text-amber-100 ring-amber-500/25",baseLock:!1,onRun:()=>void sQ("restart",a),notify:Q,t:D,compact:!0}),f?(0,n.jsxs)("button",{type:"button",onClick:()=>{window.open((0,ef.p)(f.url),"_blank","noopener,noreferrer")},className:"inline-flex min-h-[2rem] items-center justify-center rounded-lg border border-emerald-500/25 bg-emerald-500/10 px-2.5 py-1.5 text-emerald-100 ring-1 ring-emerald-500/20 transition hover:bg-emerald-500/20",title:"".concat(D("打开该线路 Neko 工作室","Open this lane's Neko studio")," \xb7 ").concat(f.label).concat(f.port?" :".concat(f.port):""),"aria-label":"".concat(D("打开该线路 Neko 工作室","Open this lane's Neko studio")," \xb7 ").concat(f.label),children:[(0,n.jsx)("span",{className:"sr-only",children:D("打开该线路 Neko 工作室","Open this lane's Neko studio")}),(0,n.jsx)("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"\uD83D\uDC31"}),(0,n.jsx)(G.Z,{className:"ml-1 h-3.5 w-3.5 shrink-0","aria-hidden":!0})]}):null]})]},e.id)})})]})})]}),(0,n.jsx)(eU,{t:D,currentProc:B,fetchJson:J,urlListText:nr,keySuffixUi:sI,showKeyRow:!0,pollMs:ns,refreshToken:tE,monitorRow:null!=sp?sp:void 0}),nI,nM||nS,(0,n.jsxs)("section",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/50 ring-1 ring-white/[0.03]",children:[(0,n.jsxs)("div",{className:"border-b border-white/[0.06] px-6 py-4",children:[(0,n.jsxs)("h3",{className:"text-sm font-semibold text-white",children:[D("配置与地址","Config and URLs"),nf?(0,n.jsx)("span",{className:"ml-2 rounded-md bg-amber-500/15 px-2 py-0.5 text-[10px] font-medium text-amber-100 ring-1 ring-amber-500/25",children:D("待完善","Needs setup")}):null]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:D("密钥、youtube.ini、URL 列表","Keys, youtube.ini, URL list")})]}),(0,n.jsxs)("div",{className:"space-y-6 p-6 pt-4",children:["single"===ea?(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:D("YouTube 相关设置","YouTube settings")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:D("串流参数写进 youtube.ini,无需 Google 登录。","Stream settings go to youtube.ini — no Google login.")}),(0,n.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,n.jsx)("label",{className:"block text-xs text-zinc-400",children:D("串流密钥","Stream key")}),(0,n.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm font-mono text-zinc-200",spellCheck:!1,autoComplete:"off",value:eb.key,onChange:e=>eg(t=>({...t,key:e.target.value})),placeholder:"xxxx-xxxx-xxxx-xxxx-xxxx"}),(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-3",children:[(0,n.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-zinc-400",children:["RTMPS",(0,n.jsxs)("select",{className:"rounded-lg border border-white/10 bg-black/40 px-3 py-2 text-sm text-white",value:eb.rtmps?"1":"0",onChange:e=>eg(t=>({...t,rtmps:"1"===e.target.value})),children:[(0,n.jsx)("option",{value:"1",children:D("是(默认)","Yes")}),(0,n.jsx)("option",{value:"0",children:D("否 → RTMP","No")})]})]}),(0,n.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-zinc-400",children:[D("比特率 kbps","Bitrate kbps"),(0,n.jsx)("input",{className:"rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-sm",value:eb.bitrate,onChange:e=>eg(t=>({...t,bitrate:e.target.value})),placeholder:"4000"})]}),(0,n.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 pt-6 text-xs text-zinc-300",children:[(0,n.jsx)("input",{type:"checkbox",className:"rounded border-white/20 bg-black/40",checked:eb.fastAudio,onChange:e=>eg(t=>({...t,fastAudio:e.target.checked}))}),"fast_audio(",D("轻量音频","lighter audio"),")"]})]})]}),(0,n.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,n.jsxs)("button",{type:"button",disabled:s8,onClick:()=>void sL(),className:"inline-flex items-center gap-2 rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-200",children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(eS?"animate-spin":"")}),D("重新读取","Reload")]}),(0,n.jsxs)("button",{type:"button",disabled:s8,onClick:()=>void sU(),className:"inline-flex items-center gap-2 rounded-xl bg-violet-500/25 px-4 py-2 text-sm font-medium text-violet-100 ring-1 ring-violet-500/35",children:[eS?(0,n.jsx)(y.Z,{className:"h-4 w-4 animate-spin"}):null,D("保存 youtube.ini","Save youtube.ini")]}),(0,n.jsx)("button",{type:"button",disabled:s8,onClick:()=>void sZ(),className:"rounded-xl border border-cyan-500/20 bg-cyan-500/10 px-4 py-2 text-sm text-cyan-100",children:D("平衡预设","Balanced preset")}),(0,n.jsx)("button",{type:"button",disabled:s8,onClick:()=>{eg(eL(eh)),ej(D("已从下方原文同步到表单","Synced from raw"))},className:"rounded-xl border border-white/10 px-4 py-2 text-sm text-zinc-400",children:D("从原文同步表单","Parse raw")})]}),(0,n.jsxs)("details",{className:"mt-4 rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,n.jsx)("summary",{className:"cursor-pointer text-xs text-zinc-500",children:D("高级:youtube.ini 原文","Raw youtube.ini")}),(0,n.jsx)("textarea",{className:"mt-2 h-36 w-full resize-y rounded-lg border border-white/10 bg-black/50 p-3 font-mono text-[11px] text-zinc-400",value:eh,onChange:e=>ep(e.target.value),spellCheck:!1}),(0,n.jsx)("button",{type:"button",disabled:s8,className:"mt-2 rounded-lg bg-cyan-500/15 px-3 py-1.5 text-xs text-cyan-200",onClick:()=>void sE(eh),children:D("保存原文","Save raw")})]}),ew?(0,n.jsx)("p",{className:"mt-2 font-mono text-xs text-zinc-500",children:ew}):null]}):(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"text-sm font-semibold text-white",children:[D("当前线路","Current lane"),sd?(0,n.jsxs)("span",{className:"ml-2 font-normal text-zinc-400",children:["\xb7 ",nl||D("未配置抖音直播源","No Douyin source")]}):null,sz?(0,n.jsx)("span",{className:"ml-2 rounded-md bg-amber-500/15 px-2 py-0.5 text-[10px] font-medium text-amber-100 ring-1 ring-amber-500/25",children:D("有未保存修改","Unsaved")}):null]}),sd?(0,n.jsxs)("p",{className:"mt-0.5 font-mono text-[11px] text-zinc-500",children:[D("配置名","Config"),": ",eQ(sd.name,Math.max(0,eo.findIndex(e=>e.id===sd.id)))," \xb7 PM2: ",sj,sk?" → ".concat(sN):""," \xb7 ","key ",D("尾码","suffix"),": ",sA]}):null]}),(0,n.jsxs)("button",{type:"button",disabled:s9,className:"inline-flex items-center gap-1 rounded-lg bg-violet-500/20 px-3 py-1.5 text-xs text-violet-100 ring-1 ring-violet-500/30",onClick:()=>{let e=te(),t={id:e,name:"".concat(D("线路","Ch")," ").concat(eo.length+1),streamKey:"",urlLines:"",pm2Name:tt(e),notes:""};e$(s=>({...s,[e]:tc(t)})),sv([...eo,t],{force:!0}),ex(e),t5.current=e2(t),W(t5.current),se(""),t2.current+=1,t3.current+=1,tX.current=!1,ep(""),eg(eL("")),eB(D("新线路已切换,地址列表为空","New lane selected with an empty URL list"))},children:[(0,n.jsx)(eG.Z,{className:"h-3.5 w-3.5"}),D("新增线路","Add lane")]})]}),sd?(0,n.jsxs)("div",{className:"mt-4 space-y-3 border-t border-white/5 pt-4",children:[(0,n.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-3 py-2 text-sm",value:null!==(E=null==sy?void 0:sy.name)&&void 0!==E?E:"",onChange:e=>sw("name",e.target.value),placeholder:D("线路名称","Lane name")}),(0,n.jsx)("label",{className:"block text-xs text-zinc-500",children:D("串流密钥","Stream key")}),(0,n.jsx)("input",{className:"w-full rounded-xl border border-white/10 bg-black/40 px-3 py-2 font-mono text-sm",spellCheck:!1,value:null!==(U=null==sy?void 0:sy.streamKey)&&void 0!==U?U:"",onChange:e=>sw("streamKey",e.target.value),placeholder:"xxxx-xxxx… / rtmp(s)://…"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("button",{type:"button",disabled:s9,onClick:()=>void sM(),className:"rounded-xl border border-white/10 bg-white/[0.05] px-4 py-2 text-sm text-zinc-100",children:eX?D("保存中...","Saving..."):D("保存线路设置","Save lane")}),(0,n.jsx)("button",{type:"button",disabled:s9,onClick:()=>void sB(),className:"rounded-xl bg-violet-500/25 px-4 py-2 text-sm font-medium text-violet-100 ring-1 ring-violet-500/35",children:D("写入 youtube.ini","Write youtube.ini")})]}),s_.ok?null:(0,n.jsx)("p",{className:"text-xs text-rose-300",children:s_.message}),(0,n.jsxs)("details",{className:"rounded-xl border border-white/5 bg-black/20 p-3",children:[(0,n.jsx)("summary",{className:"cursor-pointer text-xs text-zinc-500",children:D("高级:进程名","Advanced: process name")}),(0,n.jsx)("input",{className:"mt-2 w-full rounded-lg border border-white/10 bg-black/40 px-3 py-2 font-mono text-xs",value:null!==(Z=null==sy?void 0:sy.pm2Name)&&void 0!==Z?Z:tt(sd.id),onChange:e=>sw("pm2Name",e.target.value),spellCheck:!1,placeholder:"youtube2__…"}),(0,n.jsxs)("p",{className:"mt-2 font-mono text-[11px] text-zinc-500",children:[D("实际生效","Effective"),": ",sN||"—"]}),s_.message&&!s_.ok?(0,n.jsx)("p",{className:"mt-2 text-[11px] text-rose-300",children:s_.message}):null]}),(0,n.jsx)("textarea",{className:"h-16 w-full resize-y rounded-xl border border-white/10 bg-black/40 p-3 text-xs text-zinc-300",value:null!==(I=null==sy?void 0:sy.notes)&&void 0!==I?I:"",onChange:e=>sw("notes",e.target.value),placeholder:D("备注(可选)","Notes (optional)")}),e3?(0,n.jsx)("p",{className:"text-xs text-zinc-400",children:e3}):null,(0,n.jsxs)("button",{type:"button",disabled:s8||eo.length<2,className:"inline-flex items-center gap-1 text-xs text-rose-300 hover:text-rose-200 disabled:opacity-30",onClick:()=>{var e,t;let s=eo.filter(e=>e.id!==sd.id),n=null!==(e=s[0])&&void 0!==e?e:null;if(e$(e=>{let t={...e};return delete t[sd.id],t}),sv(s,{force:!0}),ex((null==n?void 0:n.id)||""),n){let e=e2(n);t5.current=e,W(e),se((null!==(t=n.urlLines)&&void 0!==t?t:"").trim()),sC(n)}else t5.current="",W(""),se("")},children:[(0,n.jsx)(L.Z,{className:"h-3.5 w-3.5"}),D("删除此线路","Delete lane")]})]}):null]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:D("直播地址列表","URL list")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:D("每条线路独立写入自己的 URL_config..ini,不再复用或回填所谓“全局地址”。","Each lane writes to its own URL_config..ini with no shared global URL draft.")}),(0,n.jsx)("p",{className:"mt-1 font-mono text-[10px] text-zinc-600",children:B?eT(B):"URL_config.ini"}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2 text-[11px]",children:[(0,n.jsxs)("span",{className:"rounded-full border border-cyan-500/20 bg-cyan-500/10 px-2.5 py-1 text-cyan-100",children:[D("有效地址","Valid URLs"),": ",sH]}),(0,n.jsxs)("span",{className:"rounded-full border border-violet-500/20 bg-violet-500/10 px-2.5 py-1 text-violet-100",children:["Douyin: ",sF]})]}),nw,eK?(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:eK}):null,(0,n.jsx)("textarea",{className:"mt-4 min-h-[160px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:eR,onChange:e=>{tX.current=!0,se(e.target.value)},spellCheck:!1,placeholder:"https://live.douyin.com/..."}),(0,n.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:(0,n.jsx)("button",{type:"button",disabled:eX,title:s7||void 0,onClick:()=>void sD(),className:"rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:D("保存地址","Save URLs")})})]})]}),"single"===ea?(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:D("直播地址列表 \xb7 URL_config.ini","URL_config.ini")}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500",children:D("一行一个地址;可自动刷新或手动重新读取。","One URL per line; auto-refresh or reload.")}),(0,n.jsx)("p",{className:"mt-1 font-mono text-[10px] text-zinc-600",children:B?eT(B):"URL_config.ini"}),(0,n.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2 text-[11px]",children:[(0,n.jsxs)("span",{className:"rounded-full border border-cyan-500/20 bg-cyan-500/10 px-2.5 py-1 text-cyan-100",children:[D("有效地址","Valid URLs"),": ",sH]}),(0,n.jsxs)("span",{className:"rounded-full border border-violet-500/20 bg-violet-500/10 px-2.5 py-1 text-violet-100",children:["Douyin: ",sF]})]}),nw,eK?(0,n.jsx)("p",{className:"mt-2 text-xs text-zinc-500",children:eK}):null,(0,n.jsx)("textarea",{className:"mt-4 min-h-[200px] w-full resize-y rounded-xl border border-white/10 bg-black/50 p-4 font-mono text-xs text-zinc-300",value:eu,onChange:e=>{tX.current=!0,t7(e.target.value)},spellCheck:!1}),(0,n.jsx)("button",{type:"button",disabled:eX,title:s7||void 0,onClick:()=>void sO(),className:"mt-3 rounded-xl bg-cyan-500/20 px-4 py-2 text-sm text-cyan-100 ring-1 ring-cyan-500/30",children:D("保存 URL 配置","Save URL config")})]}):null]})]})]})}var tU=s(257);let tZ=["dashboard","services","live_youtube","live_tiktok","android","studio","network","settings"],tI=()=>void 0!==tU&&tU.env.NEXT_PUBLIC_API_URL||"";function tA(e){if(null==e||!Number.isFinite(e))return"—";if(0===e)return"0 B";let t=["B","KB","MB","GB","TB"],s=e,n=0;for(;s>=1024&&n=10||0===n?0:1)," ").concat(t[n])}function tD(e){if(null==e||!Number.isFinite(e))return"—";let t=Math.max(0,Math.floor(e));if(t<60)return"".concat(t,"s");let s=Math.floor(t/60);if(s<60)return"".concat(s,"m");let n=Math.floor(s/60);return n<48?"".concat(n,"h"):"".concat(Math.floor(n/24),"d")}function tO(e){let t=tA(e);return"—"===t?t:"".concat(t,"/s")}function tK(e){return"online"===e||"running"===e?"bg-emerald-500/15 text-emerald-300 ring-1 ring-emerald-500/30":"configured"===e?"bg-sky-500/15 text-sky-200 ring-1 ring-sky-500/25":"skipped"===e?"bg-slate-500/15 text-slate-300 ring-1 ring-slate-500/30":"stopped"===e||"not_found"===e?"bg-zinc-500/15 text-zinc-400 ring-1 ring-zinc-500/25":"error"===e?"bg-rose-500/15 text-rose-300 ring-1 ring-rose-500/35":"bg-violet-500/15 text-violet-200 ring-1 ring-violet-500/30"}function tB(e,t){let s=null!=t?t:(e,t)=>t||e,n=(e||"").trim().toLowerCase();return"connected"===n?s("高速可用","Ready"):"configured"===n?s("已配置","Configured"):"detected"===n?s("接口已起","Detected"):"idle"===n?s("等待握手","Idle"):"stale"===n?s("握手过期","Stale"):"down"===n?s("未连接","Down"):e||"—"}function tW(){var e,t,s,T,B,W,H,F,Y,G,q,J,V,$,X,Q,et,es,en,el,ei,ea,er,eo,ec,ed,ex,eu,em,ep,eb,eg,ev,ey,ew,ej,eN,e_,ez,eS,eC,eR,eP,eL,eT,eM,eE,eU,eZ,eI,eA,eD,eO,eB,eW,eH,eF,eY,eG,eJ,eV,e$,eX,eQ,e0,e1,e5,e2,e3,e4,e6,e8,e9,e7,te,tt,ts,tn,tl,ti,ta,tr,to,tc,td,tx,tu,tm,th,tp,tb,tg,tf,tv,ty,tw,tj,tN,tk,t_,tz,tS,tC,tR,tP,tL,tT,tM,tU,tW,tH,tF;let tY=tI(),[tG,tq]=(0,A.useState)("zh"),[tJ,tV]=(0,A.useState)("dark"),[t$,tX]=(0,A.useState)("dashboard"),[tQ,t0]=(0,A.useState)(!1),[t1,t5]=(0,A.useState)(!1),[t2,t3]=(0,A.useState)(null),[t4,t6]=(0,A.useState)(null),[t8,t9]=(0,A.useState)(!0),[t7,se]=(0,A.useState)(null),[st,ss]=(0,A.useState)(null),[sn,sl]=(0,A.useState)(null),[si,sa]=(0,A.useState)(!0),[sr,so]=(0,A.useState)([]),[sc,sd]=(0,A.useState)([]),[sx,su]=(0,A.useState)(""),[sm,sh]=(0,A.useState)(""),[sp,sb]=(0,A.useState)("/sdcard/app.apk"),[sg,sf]=(0,A.useState)(""),[sv,sy]=(0,A.useState)(null),[sw,sj]=(0,A.useState)(null),[sN,sk]=(0,A.useState)(!0),[s_,sz]=(0,A.useState)(!0),[sS,sC]=(0,A.useState)("tencent-relay-wg0"),[sR,sP]=(0,A.useState)(""),[sL,sT]=(0,A.useState)(null),[sM,sE]=(0,A.useState)(null),[sU,sZ]=(0,A.useState)(null),[sI,sA]=(0,A.useState)(!1),[sD,sO]=(0,A.useState)(!0),[sK,sB]=(0,A.useState)("overlay"),[sW,sH]=(0,A.useState)(""),[sF,sY]=(0,A.useState)(""),[sG,sq]=(0,A.useState)(""),[sJ,sV]=(0,A.useState)("255.255.255.255"),[s$,sX]=(0,A.useState)("9"),[sQ,s0]=(0,A.useState)([]),[s1,s5]=(0,A.useState)(""),[s2,s3]=(0,A.useState)(""),[s4,s6]=(0,A.useState)(""),[s8,s9]=(0,A.useState)([]),[s7,ne]=(0,A.useState)(""),[nt,ns]=(0,A.useState)("115200"),[nn,nl]=(0,A.useState)("AT"),[ni,na]=(0,A.useState)(""),[nr,no]=(0,A.useState)(null),nc=(0,A.useRef)(null),nd=(0,A.useRef)(null),nx=(0,A.useRef)(null),nu=(0,A.useRef)(sx),nm=(0,A.useRef)(0),nh=(0,A.useRef)(null),np=(0,A.useCallback)((e,t)=>"zh"===tG?e:t,[tG]),nb=(0,A.useCallback)(e=>{ss(e),null!=nh.current&&window.clearTimeout(nh.current),nh.current=window.setTimeout(()=>{ss(null),nh.current=null},2800)},[]),ng=(0,A.useCallback)(async(e,t)=>(0,ee.N)("".concat(tY).concat(e),t),[tY]),nf=(0,A.useCallback)(async()=>{if(nd.current)return nd.current;let e=(async()=>{try{let e=await ng("/stack/summary");t3(t=>({...null!=t?t:{},stack:e})),t6(null),sl(Date.now())}catch(e){t6(e.message)}finally{nd.current=null}})();return nd.current=e,e},[ng]),nv=(0,A.useCallback)(async()=>{if(nc.current)return nc.current;let e=(async()=>{try{var e;let[t,s]=await Promise.allSettled([ng("/hub/dashboard"),ng("/deploy/check")]);if("fulfilled"!==t.status)throw t.reason;let n=t.value;t3(n),t6(null),sl(Date.now()),"fulfilled"===s.status?sj(s.value):sj(null);let l=(null===(e=n.android)||void 0===e?void 0:e.devices)||[];if(l.length&&!sg){let e=l.find(e=>"device"===(e.state||"").toLowerCase());sf((null!=e?e:l[0]).serial)}}catch(e){t6(e.message),sj(null)}finally{t9(!1),nc.current=null}})();return nc.current=e,e},[sg,ng]),ny=(0,A.useMemo)(()=>{let e=new URLSearchParams({light:"1"});return"live_youtube"===t$?e.set("family","youtube"):"live_tiktok"===t$&&e.set("family","tiktok"),"/process_monitor?".concat(e.toString())},[t$]),nw=(0,A.useMemo)(()=>ek(sc),[sc]),nj=(0,A.useMemo)(()=>(function(e){if(!e.pageVisible)return 3e4;if("live_youtube"===e.view||"live_tiktok"===e.view)switch(e.activity){case"hot":return 800;case"warm":return 2500;default:return 5e3}return 4e3})({view:t$,activity:nw,pageVisible:si}),[t$,nw,si]),nN=(0,A.useCallback)(async()=>{if(nx.current)return nx.current;let e=(async()=>{try{let e=(await ng(ny)).entries||[];sd(e),so(e.map(e=>({pm2:e.pm2,script:e.script,label:e.label}))),sl(Date.now()),su(t=>!e.length||t&&e.some(e=>e.pm2===t)?t:e[0].pm2)}catch(e){}finally{nx.current=null}})();return nx.current=e,e},[ng,ny]);(0,A.useEffect)(()=>{tX(function(){let e=new URLSearchParams(window.location.search).get("view");return e&&tZ.includes(e)?e:"/youtube-events"===window.location.pathname.replace(/\/$/,"")?"live_youtube":"dashboard"}()),t0(!0);let e=window.localStorage.getItem("live-hub-lang");("zh"===e||"en"===e)&&tq(e);let t=window.localStorage.getItem("live-hub-theme");("light"===t||"dark"===t)&&tV(t)},[]),(0,A.useEffect)(()=>{if(!tQ)return;let e=new URL(window.location.href);"dashboard"===t$?e.searchParams.delete("view"):e.searchParams.set("view",t$),window.history.replaceState(null,"",e.toString())},[t$,tQ]),(0,A.useEffect)(()=>{window.localStorage.setItem("live-hub-lang",tG)},[tG]),(0,A.useEffect)(()=>{document.documentElement.setAttribute("data-theme",tJ);try{window.localStorage.setItem("live-hub-theme",tJ)}catch(e){}},[tJ]),(0,A.useEffect)(()=>{let e=()=>sa("visible"===document.visibilityState);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,A.useEffect)(()=>{if(!t1)return;let e=e=>{"Escape"===e.key&&t5(!1)};window.addEventListener("keydown",e);let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",e),document.body.style.overflow=t}},[t1]),(0,A.useEffect)(()=>()=>{null!=nh.current&&window.clearTimeout(nh.current)},[]),(0,A.useEffect)(()=>{try{"0"===localStorage.getItem("livehub.autorefresh")&&sk(!1),"0"===localStorage.getItem("livehub.showStreamProbes")&&sz(!1)}catch(e){}},[]),(0,A.useEffect)(()=>{if(tQ){if("live_youtube"===t$||"live_tiktok"===t$){t9(!1),nf();return}nv()}},[nv,nf,t$,tQ]),(0,A.useEffect)(()=>{tQ&&nN()},[nN,tQ]),(0,A.useEffect)(()=>{if(!tQ||!sN||!si||"live_youtube"===t$||"live_tiktok"===t$)return;let e=window.setInterval(()=>{nv()},1e4);return()=>clearInterval(e)},[sN,si,nv,t$,tQ]),(0,A.useEffect)(()=>{if(!tQ||!sN)return;let e=window.setInterval(()=>{nN()},nj);return()=>clearInterval(e)},[sN,nj,nN,tQ]),(0,A.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&nN()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[nN]),(0,A.useEffect)(()=>{nu.current=sx},[sx]),(0,A.useEffect)(()=>{"settings"===t$&&(async()=>{try{let e=await ng("/hub/config");sy(e)}catch(e){sy(null)}})()},[ng,t$]);let nk=(0,A.useMemo)(()=>{var e;let t=(null==t2?void 0:null===(e=t2.stack)||void 0===e?void 0:e.quick_links)||{},s={};for(let[e,n]of Object.entries(t))/^https?:\/\//i.test(n)?s[e]=(0,ef.p)(n):s[e]=n;return s},[null==t2?void 0:null===(e=t2.stack)||void 0===e?void 0:e.quick_links]),n_=(0,A.useMemo)(()=>{let e=new Map;for(let t of(null==t2?void 0:t2.services)||[])e.set(t.service_id,t);return e},[null==t2?void 0:t2.services]),nz=(0,A.useMemo)(()=>["homeassistant","frigate","ntfy","wol"].map(e=>n_.get(e)).filter(Boolean),[n_]),nS=n_.get("wol"),nC=(0,A.useMemo)(()=>(0,eq.O0)(nk),[nk]),nR=(0,A.useMemo)(()=>(0,eq.Tc)(nC),[nC]),nP=(0,A.useMemo)(()=>((null==sM?void 0:sM.interfaces)||[]).flatMap(e=>e.peers||[]),[null==sM?void 0:sM.interfaces]),nL=(0,A.useMemo)(()=>((null==sM?void 0:sM.interfaces)||[]).flatMap(e=>e.configured_peers||[]),[null==sM?void 0:sM.interfaces]),nT=(0,A.useMemo)(()=>((null==sM?void 0:sM.repo_configs)||[]).flatMap(e=>e.peers||[]).map(e=>({...e,status_source:"config",config_source:"repo"})),[null==sM?void 0:sM.repo_configs]),nM=nP[0]||nL[0]||nT[0]||null,nE=(0,A.useMemo)(()=>{for(let e of[...nP,...nL,...nT]){let t=e.endpoint_host||function(e){let t=(e||"").trim();if(!t)return"";if(t.startsWith("[")){let e=t.indexOf("]");return e>0?t.slice(1,e):""}let s=t.lastIndexOf(":");return s>0?t.slice(0,s):t}(e.endpoint);if(t)return t}return""},[nL,nT,nP]),nU=(null==sL?void 0:null===(t=sL.windows_route_template)||void 0===t?void 0:t.endpoint_host)||(null==sL?void 0:null===(T=sL.peers)||void 0===T?void 0:null===(s=T.find(e=>e.endpoint_host))||void 0===s?void 0:s.endpoint_host)||nE||"",nZ=(0,A.useMemo)(()=>{if(!nU)return"";let e=sW.trim()||"",t=sF.trim()||"";return"route -p add ".concat(nU," mask 255.255.255.255 ").concat(e," metric 1 if ").concat(t)},[nU,sW,sF]),nI=(0,A.useCallback)(async()=>{try{var e;let t=await ng("/hub/network/wireguard/status");sE(null!==(e=t.wireguard)&&void 0!==e?e:null)}catch(e){sE(null)}},[ng]),nA=(0,A.useCallback)(async()=>{sA(!0);try{let e=await ng("/hub/network/system_probe");sZ(null!=e?e:null)}catch(e){sZ(null)}finally{sA(!1)}},[ng]);(0,A.useEffect)(()=>{"network"===t$&&(nI(),nA())},[nA,nI,t$]);let nD=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=sR.trim();if(!t){nb(np("请先选择或粘贴 WireGuard 配置","Pick or paste a WireGuard config first"));return}se(e?"wg:apply":"wg:save");try{var s;let n=await ng("/hub/network/wireguard/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:sS,content:t,route_mode:sK,apply:e})});sT(null!==(s=n.wireguard)&&void 0!==s?s:null),await nI(),nb(e?np("WireGuard 配置已保存并应用","WireGuard config saved and applied"):np("WireGuard 配置已保存","WireGuard config saved"))}catch(e){nb(e.message)}finally{se(null)}},nO=async e=>{se("wg:neko:".concat(e));try{await ng("/hub/network/wireguard/neko_access",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,restart:!0})}),await nI(),await nv(),nb("remote"===e?"Neko switched to WireGuard remote access":"Neko switched back to LAN")}catch(e){nb(e.message),await nI()}finally{se(null)}},nK=async()=>{await nD(!1)},nB=async e=>{let t=(e||"").trim();if(t){se("wg:load:".concat(t));try{var s;let e=await ng("/hub/network/wireguard/config/".concat(encodeURIComponent(t)));sC(e.name||t),sP(e.content||""),sT(null!==(s=e.wireguard)&&void 0!==s?s:null),sO(!0),nb(np("已载入 WireGuard 配置","WireGuard config loaded"))}catch(e){nb(e.message)}finally{se(null)}}},nW=async e=>{if(e)try{let t=await e.text();sP(t),sS.trim()||sC(e.name.replace(/\.conf$/i,""))}catch(e){nb(e.message)}},nH=async(e,t)=>{se("svc:".concat(e));try{let s=await ng("/service_action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({service:e,action:t})});"error"===s.status?nb(s.detail||s.message||np("操作失败","Action failed")):nb(s.message||"OK"),await nv()}catch(e){nb(e.message)}finally{se(null)}},nF=async()=>{let e=sG.trim(),t=sJ.trim()||"255.255.255.255",s=Number(s$.trim()||"9");if(!e){nb(np("请输入 MAC 地址","Enter a MAC address"));return}if(!Number.isInteger(s)||s<1||s>65535){nb(np("端口必须在 1-65535 之间","Port must be 1-65535"));return}se("wol:wake");try{let n=await ng("/studio/wol/wake",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mac:e,broadcast:t,port:s})});nb(n.message||np("唤醒包已发送","Wake packet sent"))}catch(e){nb(e.message)}finally{se(null)}},nY=(0,A.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{let t=await ng(e?"/studio/wol/devices/probe":"/studio/wol/devices",e?{method:"POST"}:void 0);s0(t.devices||[])}catch(t){e&&nb(t.message)}},[ng,nb]),nG=async()=>{let e=sG.trim();if(!e){nb(np("请输入 MAC 地址","Enter a MAC address"));return}se("wol:save");try{var t;let s=await ng("/studio/wol/devices",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s2,mac:e,ip:s4})});s0(s.devices||[]),s5((null===(t=s.device)||void 0===t?void 0:t.mac)||e),nb(s.message||np("设备已保存","Device saved"))}catch(e){nb(e.message)}finally{se(null)}},nq=async()=>{let e=(s1||sG).trim();if(e){se("wol:delete");try{let t=await ng("/studio/wol/devices/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mac:e})});s0(t.devices||[]),s5(""),sq(""),s3(""),s6(""),nb(np("设备已删除","Device removed"))}catch(e){nb(e.message)}finally{se(null)}}},nJ=(0,A.useCallback)(async()=>{try{let e=(await ng("/studio/serial/ports")).ports||[];s9(e),ne(t=>{var s;return t&&e.some(e=>e.path===t)?t:(null===(s=e[0])||void 0===s?void 0:s.path)||t})}catch(e){s9([])}},[ng]),nV=(0,A.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{let t=await ng("/studio/ops/summary".concat(e?"?refresh=1":""));no(t)}catch(t){e&&nb(t.message)}},[ng,nb]),n$=async()=>{se("studio:snapshot");try{let e=await ng("/studio/ops/snapshot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:"studio"})});await nV(!1),nb(e.message||np("系统快照已创建","System snapshot created"))}catch(e){nb(e.message)}finally{se(null)}};(0,A.useEffect)(()=>{if("studio"!==t$)return;nY(!0),nV(!0);let e=window.setInterval(()=>{nY(!0),nV(!1)},3e4);return()=>window.clearInterval(e)},[nJ,nV,nY,t$]);let nX=async(e,t)=>{let s=(null!=t?t:sx).trim();if(s){se("proc:".concat(e,":").concat(s));try{let t=await ng("/".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process:s})});nb(String(t.output||t.message||"OK")),await nN(),"live_youtube"===t$||"live_tiktok"===t$?nv():await nv()}catch(e){nb(e.message)}finally{se(null)}}},nQ=async(e,t)=>{let s=(null!=t?t:sx).trim();if(!s)throw nb(np("请选择要保存地址的进程","Pick a process before saving URLs")),Error(np("请选择要保存地址的进程","Pick a process before saving URLs"));let n=null!=e?e:sm,l=++nm.current;se("save:url");try{let e=new URLSearchParams({process:s}),t=await ng("/save_url_config?".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n})});l===nm.current&&s===nu.current.trim()&&sh(n),nb(t.path?np("URL 配置已保存: ".concat(t.path),"URL config saved: ".concat(t.path)):np("URL 配置已保存","URL config saved"))}catch(e){throw nb(e.message),e}finally{se(null)}},n0=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!sg){nb(np("请选择设备","Pick a device"));return}se("adb:".concat(e));try{let s=await ng("/android/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,serial:sg,payload:t})});nb(s.message||"OK")}catch(e){nb(e.message)}finally{se(null)}},n1=[{id:"dashboard",icon:a.Z,labelZh:"总览",labelEn:"Dashboard"},{id:"services",icon:r.Z,labelZh:"服务",labelEn:"Services"},{id:"live_youtube",icon:o.Z,labelZh:"YouTube 无人直播",labelEn:"YouTube unmanned"},{id:"live_tiktok",icon:c.Z,labelZh:"TikTok 无人直播",labelEn:"TikTok unmanned"},{id:"android",icon:d.Z,labelZh:"安卓",labelEn:"Android"},{id:"studio",icon:x.Z,labelZh:"工作室",labelEn:"Studio"},{id:"network",icon:u.Z,labelZh:"网络",labelEn:"Network"},{id:"settings",icon:m.Z,labelZh:"设置",labelEn:"Settings"}],n5=e=>{(async()=>{var t;if(null===(t=navigator.clipboard)||void 0===t?void 0:t.writeText){await navigator.clipboard.writeText(e);return}let s=document.createElement("textarea");s.value=e,s.readOnly=!0,s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.select(),document.execCommand("copy"),s.remove()})().then(()=>nb(np("已复制","Copied")),()=>nb(np("复制失败","Copy failed")))},n2=null!==(td=null==t2?void 0:null===(B=t2.services)||void 0===B?void 0:B.filter(e=>e.running&&e.available).length)&&void 0!==td?td:0,n3=null!==(tx=null==t2?void 0:null===(W=t2.services)||void 0===W?void 0:W.length)&&void 0!==tx?tx:0,n4=sn?new Date(sn).toLocaleTimeString("zh"===tG?"zh-CN":"en-US",{hour12:!1}):np("未同步","Not synced"),n6=si?np("前台自动刷新","Auto refresh"):np("后台已暂停刷新","Refresh paused in background");return(0,n.jsxs)("div",{className:"lp-root min-h-screen transition-colors duration-300 ".concat("light"===tJ?"bg-slate-100 text-slate-900 selection:bg-violet-400/25":"bg-[#050508] text-zinc-100 selection:bg-violet-500/30"),children:[(0,n.jsx)("div",{className:"lp-noise pointer-events-none fixed inset-0 z-0 ".concat("light"===tJ?"opacity-[0.06]":"opacity-[0.22]"),"aria-hidden":!0}),(0,n.jsx)("div",{className:"lp-aurora pointer-events-none fixed -left-1/4 top-0 h-[42rem] w-[42rem] rounded-full blur-[120px] ".concat("light"===tJ?"bg-violet-400/15":"bg-violet-600/20"),"aria-hidden":!0}),(0,n.jsx)("div",{className:"lp-aurora2 pointer-events-none fixed bottom-0 right-0 h-[36rem] w-[36rem] rounded-full blur-[100px] ".concat("light"===tJ?"bg-cyan-400/10":"bg-cyan-500/10"),"aria-hidden":!0}),st?(0,n.jsx)(l.E.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},role:"status","aria-live":"polite","aria-atomic":"true",className:"fixed bottom-6 left-1/2 z-[100] max-w-md -translate-x-1/2 rounded-2xl border border-white/10 bg-zinc-950/95 px-5 py-3 text-center text-sm text-zinc-100 shadow-2xl shadow-black/50 backdrop-blur-xl",children:st}):null,(0,n.jsxs)("div",{className:"relative z-10 flex min-h-screen",children:[(0,n.jsxs)("aside",{className:"hidden w-64 shrink-0 flex-col border-r px-4 py-6 backdrop-blur-2xl lg:flex ".concat("light"===tJ?"border-slate-200/90 bg-white/70":"border-white/[0.06] bg-zinc-950/40"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 px-2",children:[(0,n.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-xl bg-gradient-to-br from-violet-500 to-cyan-400 shadow-lg shadow-violet-500/25",children:(0,n.jsx)(h.Z,{className:"h-4 w-4 text-white"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-[0.2em] ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:"live.local"}),(0,n.jsx)("p",{className:"text-sm font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:np("无人直播系统","Unmanned Live System")})]})]}),(0,n.jsx)("nav",{className:"mt-10 flex flex-1 flex-col gap-1",children:n1.map(e=>{let t=e.icon,s=t$===e.id;return(0,n.jsxs)("button",{type:"button",onClick:()=>tX(e.id),"aria-current":s?"page":void 0,className:"flex items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm font-medium transition ".concat("light"===tJ?s?"bg-violet-100/90 text-slate-900 shadow-inner shadow-violet-200/50":"text-slate-600 hover:bg-slate-200/60 hover:text-slate-900":s?"bg-white/[0.08] text-white shadow-inner shadow-white/5":"text-zinc-500 hover:bg-white/[0.04] hover:text-zinc-200"),children:[(0,n.jsx)(t,{className:"h-4 w-4 ".concat("light"===tJ?s?"text-violet-600":"text-slate-400":s?"text-violet-300":"text-zinc-600")}),np(e.labelZh,e.labelEn),s?(0,n.jsx)(p.Z,{className:"ml-auto h-4 w-4 ".concat("light"===tJ?"text-slate-400":"text-zinc-600")}):null]},e.id)})})]}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,n.jsxs)("header",{className:"sticky top-0 z-20 flex items-center justify-between gap-3 border-b px-4 py-3 backdrop-blur-xl lg:px-8 ".concat("light"===tJ?"border-slate-200/80 bg-white/75 text-slate-900":"border-white/[0.06] bg-zinc-950/70 text-white"),children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,n.jsx)("button",{type:"button",className:"rounded-xl border p-2 lg:hidden ".concat("light"===tJ?"border-slate-200 bg-white/80":"border-white/10 bg-white/5"),onClick:()=>t5(!0),"aria-label":"Menu",children:(0,n.jsx)(b.Z,{className:"h-5 w-5"})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h1",{className:"truncate text-lg font-semibold tracking-tight lg:text-xl ".concat("light"===tJ?"text-slate-900":"text-white"),children:np((null===(H=n1.find(e=>e.id===t$))||void 0===H?void 0:H.labelZh)||"",(null===(F=n1.find(e=>e.id===t$))||void 0===F?void 0:F.labelEn)||"")}),(0,n.jsxs)("p",{className:"truncate text-xs ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:[(null==t2?void 0:null===(Y=t2.stack)||void 0===Y?void 0:Y.mdns_host)||"live.local"," \xb7"," ","dark"===tJ?np("夜间","Dark mode"):np("日间","Light mode")," \xb7 ",n6," \xb7"," ",np("最后同步","Last sync")," ",n4]})]})]}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5 sm:gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>tV(e=>"dark"===e?"light":"dark"),className:"rounded-xl border p-2 transition ".concat("light"===tJ?"border-slate-200 bg-white text-amber-500 shadow-sm":"border-white/10 bg-white/[0.06] text-violet-200"),title:"dark"===tJ?np("切换到日间","Switch to light"):np("切换到夜间","Switch to dark"),"aria-label":"dark"===tJ?np("日间模式","Light mode"):np("夜间模式","Dark mode"),"aria-pressed":"light"===tJ,children:"dark"===tJ?(0,n.jsx)(g.Z,{className:"h-5 w-5",strokeWidth:2}):(0,n.jsx)(f.Z,{className:"h-5 w-5",strokeWidth:2})}),(0,n.jsxs)("button",{type:"button",onClick:()=>tq(e=>"zh"===e?"en":"zh"),className:"relative rounded-xl border p-2 transition ".concat("light"===tJ?"border-slate-200 bg-white text-cyan-600 shadow-sm":"border-white/10 bg-white/[0.06] text-cyan-200"),title:"zh"===tG?"English":"中文","aria-label":np("切换语言","Toggle language"),"aria-pressed":"en"===tG,children:[(0,n.jsx)(v.Z,{className:"h-5 w-5",strokeWidth:2}),(0,n.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 flex h-4 min-w-[1rem] items-center justify-center rounded px-0.5 text-[9px] font-bold leading-none ".concat("light"===tJ?"bg-cyan-100 text-cyan-800":"bg-cyan-500/30 text-cyan-100"),children:"zh"===tG?"中":"A"})]}),(0,n.jsxs)("button",{type:"button",disabled:!!t7,onClick:()=>void Promise.all([nv(),nN()]),className:"flex items-center gap-2 rounded-xl border px-3 py-2 text-xs font-medium transition disabled:opacity-40 ".concat("light"===tJ?"border-slate-200 bg-white text-slate-700 hover:bg-slate-50":"border-white/10 bg-white/[0.04] text-zinc-300 hover:bg-white/[0.07]"),children:[t7?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5"}),(0,n.jsx)("span",{className:"hidden sm:inline",children:np("刷新","Refresh")})]})]})]}),(0,n.jsx)("main",{className:"flex-1 px-4 py-6 lg:px-8 lg:py-8",children:(0,n.jsx)(i.M,{mode:"wait",children:(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.28,ease:[.22,1,.36,1]},children:["dashboard"===t$?(0,n.jsxs)("div",{className:"space-y-6",children:[t4?(0,n.jsxs)("div",{className:"rounded-2xl border border-rose-500/25 bg-rose-950/20 p-4 text-sm text-rose-200",children:[np("无法加载仪表盘:","Dashboard error: "),t4]}):null,(0,n.jsx)(l.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.02},className:"rounded-2xl border p-2 backdrop-blur-xl ".concat("light"===tJ?"border-slate-200/90 bg-white/80 shadow-sm shadow-slate-200/30":"border-white/[0.07] bg-zinc-950/30"),children:(0,n.jsx)(O.Z,{snapshot:null!==(tu=null==t2?void 0:t2.snapshot)&&void 0!==tu?tu:null,theme:tJ,tr:np})}),(0,n.jsx)(l.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.05},className:"rounded-2xl border p-3 shadow-lg ".concat("light"===tJ?"border-fuchsia-200/80 bg-gradient-to-br from-fuchsia-50/90 via-white to-cyan-50/70 shadow-fuchsia-100/40":"border-fuchsia-500/20 bg-gradient-to-br from-fuchsia-500/10 via-zinc-950/60 to-cyan-500/10 shadow-fuchsia-900/10"),children:(0,n.jsx)(D,{tr:np})}),(0,n.jsx)("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-5",children:[{icon:j.Z,label:np("CPU 1m","CPU 1m"),value:null!==(tm=null==t2?void 0:null===(J=t2.snapshot)||void 0===J?void 0:null===(q=J.cpu_load)||void 0===q?void 0:null===(G=q["1m"])||void 0===G?void 0:G.toFixed(2))&&void 0!==tm?tm:"—",sub:np("负载均值","Load avg")},{icon:a.Z,label:np("内存","Memory"),value:tA(null==t2?void 0:null===($=t2.snapshot)||void 0===$?void 0:null===(V=$.memory)||void 0===V?void 0:V.available),sub:"/ ".concat(tA(null==t2?void 0:null===(Q=t2.snapshot)||void 0===Q?void 0:null===(X=Q.memory)||void 0===X?void 0:X.total))},{icon:N.Z,label:np("磁盘可用","Disk free"),value:tA(null==t2?void 0:null===(es=t2.snapshot)||void 0===es?void 0:null===(et=es.disk)||void 0===et?void 0:et.free),sub:"/ ".concat(tA(null==t2?void 0:null===(el=t2.snapshot)||void 0===el?void 0:null===(en=el.disk)||void 0===en?void 0:en.total))},{icon:r.Z,label:np("服务在线","Services up"),value:"".concat(n2,"/").concat(n3||"—"),sub:np("基础服务层","Infra layer")},{icon:k.Z,label:np("运行时间","Uptime"),value:function(e){if(null==e||!Number.isFinite(e))return"—";let t=Math.max(0,Math.floor(e)),s=Math.floor(t/86400),n=Math.floor(t%86400/3600),l=Math.floor(t%3600/60);return s>0?"".concat(s,"d ").concat(n,"h"):n>0?"".concat(n,"h ").concat(l,"m"):"".concat(l,"m")}(null==t2?void 0:null===(ei=t2.snapshot)||void 0===ei?void 0:ei.uptime_seconds),sub:np("自开机","Since boot")}].map((e,t)=>(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.05*t,duration:.35,ease:[.22,1,.36,1]},whileHover:{y:-2},className:"group relative overflow-hidden rounded-xl border border-white/[0.07] bg-gradient-to-br from-white/[0.05] to-transparent p-3 shadow-lg shadow-black/20",children:[(0,n.jsx)("div",{className:"absolute -right-4 -top-4 h-16 w-16 rounded-full bg-violet-500/10 blur-xl transition group-hover:bg-violet-500/18"}),(0,n.jsx)(e.icon,{className:"h-4 w-4 text-violet-300/90"}),(0,n.jsx)("p",{className:"mt-2 text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:e.label}),(0,n.jsx)("p",{className:"mt-0.5 font-mono text-lg font-semibold leading-tight text-white",children:t8?"…":e.value}),(0,n.jsx)("p",{className:"mt-0.5 text-[10px] text-zinc-500",children:e.sub})]},e.label))}),(null==t2?void 0:t2.hardware)&&"object"==typeof t2.hardware?(0,n.jsxs)("div",{className:"rounded-2xl border border-indigo-500/25 bg-gradient-to-br from-indigo-500/[0.1] via-zinc-950/70 to-violet-500/[0.08] p-6 shadow-2xl shadow-indigo-500/5",children:[(0,n.jsx)("h3",{className:"text-base font-semibold text-white",children:np("系统硬件与软件能力","Hardware & software profile")}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:np("来自 hardware_probe;用于直播/解码策略参考。","From hardware_probe; guides decode/streaming posture.")}),(0,n.jsxs)("div",{className:"mt-5 grid gap-4 lg:grid-cols-2",children:[(0,n.jsxs)("div",{className:"space-y-3 rounded-xl border border-white/[0.06] bg-black/30 p-4",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-indigo-300/90",children:np("平台","Platform")}),(0,n.jsxs)("dl",{className:"space-y-2 font-mono text-[11px] text-zinc-400",children:[(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"arch"}),(0,n.jsx)("dd",{className:"text-right text-zinc-200",children:String(null!==(th=t2.hardware.arch)&&void 0!==th?th:"—")})]}),(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"kernel"}),(0,n.jsx)("dd",{className:"text-right text-zinc-200",children:String(null!==(tb=null!==(tp=t2.hardware.kernel)&&void 0!==tp?tp:null===(ea=t2.stack)||void 0===ea?void 0:ea.kernel)&&void 0!==tb?tb:"—")})]}),(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"Python"}),(0,n.jsx)("dd",{className:"text-right text-zinc-200",children:String(null!==(tg=null===(er=t2.stack)||void 0===er?void 0:er.python)&&void 0!==tg?tg:"—")})]}),(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"mDNS"}),(0,n.jsx)("dd",{className:"text-right text-cyan-200/90",children:null!==(tf=null===(eo=t2.stack)||void 0===eo?void 0:eo.mdns_host)&&void 0!==tf?tf:"—"})]}),(0,n.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"IP"}),(0,n.jsx)("dd",{className:"text-right text-zinc-300",children:((null===(ec=t2.stack)||void 0===ec?void 0:ec.ips)||[]).join(" \xb7 ")||"—"})]})]})]}),(0,n.jsxs)("div",{className:"space-y-3 rounded-xl border border-white/[0.06] bg-black/30 p-4",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-fuchsia-300/90",children:"GPU / NPU"}),(()=>{let e=t2.hardware.gpu,t=t2.hardware.npu;return(0,n.jsxs)("dl",{className:"space-y-2 font-mono text-[11px] text-zinc-400",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"GPU"}),(0,n.jsxs)("dd",{className:"mt-0.5 text-zinc-200",children:[(null==e?void 0:e.present)?np("已检测","present"):np("未检测","absent"),(null==e?void 0:e.driver)?" \xb7 ".concat(e.driver):""]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"render"}),(0,n.jsx)("dd",{className:"mt-0.5 break-all text-zinc-500",children:((null==e?void 0:e.render_nodes)||[]).join(", ")||"—"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("dt",{className:"text-zinc-600",children:"NPU"}),(0,n.jsx)("dd",{className:"mt-0.5 break-all text-zinc-500",children:(null==t?void 0:t.present)?(t.devices||[]).join(", "):np("—","—")})]})]})})()]}),(0,n.jsxs)("div",{className:"space-y-3 rounded-xl border border-white/[0.06] bg-black/30 p-4 lg:col-span-2",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-emerald-300/90",children:"ffmpeg / 建议策略"}),(()=>{var e,t,s,l;let i=t2.hardware.ffmpeg_hwaccels||[],a=t2.hardware.recommendation;return(0,n.jsxs)("div",{className:"space-y-2 text-[11px] text-zinc-400",children:[(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"hwaccels: "}),(0,n.jsx)("span",{className:"font-mono text-emerald-200/90",children:i.length?i.join(", "):"—"})]}),(0,n.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,n.jsxs)("p",{children:[(0,n.jsxs)("span",{className:"text-zinc-600",children:[np("解码","Decoder"),": "]}),(0,n.jsx)("span",{className:"text-zinc-200",children:null!==(e=null==a?void 0:a.video_decoder)&&void 0!==e?e:"—"})]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"HDMI: "}),(0,n.jsx)("span",{className:"text-zinc-200",children:null!==(t=null==a?void 0:a.hdmi_player)&&void 0!==t?t:"—"})]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("span",{className:"text-zinc-600",children:"Browser: "}),(0,n.jsx)("span",{className:"text-zinc-200",children:null!==(s=null==a?void 0:a.browser_hwaccel)&&void 0!==s?s:"—"})]}),(0,n.jsxs)("p",{children:[(0,n.jsxs)("span",{className:"text-zinc-600",children:[np("稳定模式","Stability"),": "]}),(0,n.jsx)("span",{className:"text-amber-200/90",children:null!==(l=null==a?void 0:a.stability_mode)&&void 0!==l?l:"—"})]})]}),((null==a?void 0:a.degradation_reasons)||[]).length?(0,n.jsx)("ul",{className:"mt-2 list-inside list-disc space-y-1 text-[10px] text-amber-200/80",children:((null==a?void 0:a.degradation_reasons)||[]).map(e=>(0,n.jsx)("li",{children:e},e))}):null]})})()]})]})]}):null,sw?(0,n.jsxs)("div",{className:"rounded-2xl border p-5 ".concat(sw.ready?"border-emerald-500/25 bg-gradient-to-br from-emerald-500/[0.08] via-zinc-950/50 to-cyan-500/[0.05]":"border-amber-500/30 bg-gradient-to-br from-amber-500/[0.1] via-zinc-950/55 to-rose-500/[0.05]"),children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:np("安装验收","Deployment health")}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:np("一键脚本完成后,本机 API、局域网入口、反向代理与 mDNS 的可用性检查。","Post-install checks for loopback API, LAN access, reverse proxy, and mDNS.")})]}),(0,n.jsx)("span",{className:"rounded-full px-3 py-1 text-[10px] font-semibold ".concat(sw.ready?"bg-emerald-500/20 text-emerald-100 ring-1 ring-emerald-500/30":"bg-amber-500/20 text-amber-100 ring-1 ring-amber-500/30"),children:sw.ready?np("可交付","Ready"):np("需处理","Needs attention")})]}),(0,n.jsxs)("div",{className:"mt-4 grid gap-4 lg:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/30 p-4",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:np("验收摘要","Acceptance summary")}),(0,n.jsxs)("p",{className:"mt-2 font-mono text-sm text-white",children:[null!==(tv=sw.pass_count)&&void 0!==tv?tv:0,"/",null!==(ty=sw.total_count)&&void 0!==ty?ty:0,(0,n.jsx)("span",{className:"ml-2 text-[11px] text-zinc-500",children:np("已通过","checks passed")})]}),(0,n.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-500",children:[np("必需项","Required"),": ",null!==(tw=sw.required_total)&&void 0!==tw?tw:0," \xb7 mDNS"," ",sw.mdns_enabled?np("已启用","enabled"):np("已关闭","disabled")," \xb7 edge"," ",sw.live_edge_enabled?np("已启用","enabled"):np("已关闭","disabled")]}),(0,n.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:Object.entries(sw.urls||{}).filter(e=>{let[,t]=e;return!!t}).slice(0,4).map(e=>{let[t,s]=e;return(0,n.jsx)("a",{href:(0,ef.p)(s),target:"_blank",rel:"noreferrer",className:"rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-[11px] text-zinc-200 ring-1 ring-white/10",children:t},t)})})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/30 p-4",children:[(0,n.jsx)("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500",children:(null===(ed=sw.failing_checks)||void 0===ed?void 0:ed.length)?np("失败项","Failing checks"):np("当前状态","Current state")}),(null===(ex=sw.failing_checks)||void 0===ex?void 0:ex.length)?(0,n.jsx)("ul",{className:"mt-2 space-y-2 text-[11px] text-zinc-300",children:sw.failing_checks.slice(0,4).map(e=>(0,n.jsxs)("li",{className:"rounded-lg border border-amber-500/20 bg-amber-500/10 px-3 py-2",children:[(0,n.jsx)("span",{className:"font-semibold text-amber-100",children:e.label}),(0,n.jsx)("span",{className:"ml-2 text-zinc-400",children:e.detail||"—"})]},e.id))}):(0,n.jsx)("p",{className:"mt-2 text-[11px] text-emerald-200/90",children:np("必需检查已全部通过,可直接用浏览器面板交付。","All required checks pass; browser control plane is ready.")}),(sw.hints||[]).length?(0,n.jsx)("ul",{className:"mt-3 list-inside list-disc space-y-1 text-[10px] text-zinc-400",children:(sw.hints||[]).slice(0,3).map(e=>(0,n.jsx)("li",{children:e},e))}):null]})]})]}):null,(null==t2?void 0:null===(eu=t2.stack)||void 0===eu?void 0:eu.neko_login)?(0,n.jsxs)("div",{className:"rounded-2xl border border-fuchsia-500/25 bg-gradient-to-r from-fuchsia-500/[0.08] to-violet-500/[0.06] p-5",children:[(0,n.jsxs)("h3",{className:"text-sm font-semibold text-white",children:["Neko ",np("登录","sign-in")]}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:t2.stack.neko_login.note_zh||np(nR?"Neko Chromium ".concat(nR," 使用下列账号策略。"):"Neko Chromium 多实例使用下列账号策略。",nR?"Neko Chromium ".concat(nR," uses the policy below."):"Neko Chromium instances use the policy below.")}),(0,n.jsx)("p",{className:"mt-2 text-[11px] text-amber-200/85",children:np("重要:两栏分开填——昵称随意,密码必须是环境变量里的口令(默认 12345678)。用错密码会像一直加载;勿把「用户名/密码」写在一行。","Use two fields: display name is free-form; password must match NEKO_* (default 12345678). Wrong password looks like infinite loading.")}),nC.length?(0,n.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:nC.map(e=>(0,n.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"rounded-lg border border-fuchsia-400/20 bg-black/25 px-3 py-2 text-[11px] text-fuchsia-100 ring-1 ring-fuchsia-400/20",children:[(0,n.jsx)("span",{className:"font-semibold",children:e.label}),(0,n.jsx)("span",{className:"ml-2 rounded-full bg-fuchsia-500/15 px-1.5 py-0.5 text-[10px] text-fuchsia-100",children:e.accessLabel}),(0,n.jsxs)("span",{className:"ml-2 font-mono text-fuchsia-100/75",children:[e.host||"",e.port?":".concat(e.port):""]})]},e.key))}):null,(0,n.jsxs)("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 font-mono text-sm",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/40 px-4 py-3",children:[(0,n.jsx)("p",{className:"text-[10px] uppercase text-zinc-500",children:np("昵称示例","Display Name Example")}),(0,n.jsx)("p",{className:"mt-1 text-fuchsia-200",children:null!==(tj=t2.stack.neko_login.user_login)&&void 0!==tj?tj:"live"}),(0,n.jsx)("p",{className:"mt-2 text-[10px] uppercase text-zinc-500",children:np("连接口令","Access Password")}),(0,n.jsx)("p",{className:"mt-0.5 text-fuchsia-100",children:null!==(tN=t2.stack.neko_login.user_password)&&void 0!==tN?tN:"—"})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/10 bg-black/40 px-4 py-3",children:[(0,n.jsx)("p",{className:"text-[10px] uppercase text-zinc-500",children:np("管理昵称示例","Admin Display Name Example")}),(0,n.jsx)("p",{className:"mt-1 text-violet-200",children:null!==(tk=t2.stack.neko_login.admin_login)&&void 0!==tk?tk:"admin"}),(0,n.jsx)("p",{className:"mt-2 text-[10px] uppercase text-zinc-500",children:np("管理口令","Admin Password")}),(0,n.jsx)("p",{className:"mt-0.5 text-violet-100",children:null!==(t_=t2.stack.neko_login.admin_password)&&void 0!==t_?t_:"—"})]})]}),(0,n.jsx)("p",{className:"mt-3 text-[10px] text-zinc-600",children:np("x86 默认使用 Neko 的 Chrome 镜像,ARM 默认使用 Chromium 镜像;默认保留管理员会话、开发者工具和 Tampermonkey 持久化。本栈未启用 Firefox 版 Neko。","x86 defaults to Neko’s Chrome image, ARM defaults to Chromium, and admin access, DevTools, plus persistent Tampermonkey stay enabled. This stack does not use Firefox Neko.")})]}):null,(null==t2?void 0:null===(ep=t2.network)||void 0===ep?void 0:null===(em=ep.interfaces)||void 0===em?void 0:em.length)?(0,n.jsxs)("div",{className:"rounded-2xl border border-cyan-500/15 bg-gradient-to-br from-cyan-500/[0.07] to-transparent p-5",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold text-white",children:[(0,n.jsx)(_.Z,{className:"h-4 w-4 text-cyan-300"}),np("网络带宽 / 流量","Network bandwidth / traffic")]}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:np("实时速率由总览自动刷新间隔计算;累计值来自系统网卡计数器。","Live rates are calculated from dashboard refresh deltas; totals come from kernel counters.")}),(0,n.jsxs)("div",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 px-4 py-3 font-mono text-[11px]",children:[(0,n.jsx)("p",{className:"text-[10px] uppercase tracking-[0.08em] text-cyan-300/70",children:np("实时下行","Live down")}),(0,n.jsx)("p",{className:"mt-1 text-lg font-semibold text-cyan-100",children:tO(t2.network.total_rx_bps)}),(0,n.jsxs)("p",{className:"mt-1 text-zinc-500",children:[np("累计","Total"),": ",tA(t2.network.total_rx_bytes)]})]}),(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 px-4 py-3 font-mono text-[11px]",children:[(0,n.jsx)("p",{className:"text-[10px] uppercase tracking-[0.08em] text-cyan-300/70",children:np("实时上行","Live up")}),(0,n.jsx)("p",{className:"mt-1 text-lg font-semibold text-cyan-100",children:tO(t2.network.total_tx_bps)}),(0,n.jsxs)("p",{className:"mt-1 text-zinc-500",children:[np("累计","Total"),": ",tA(t2.network.total_tx_bytes)]})]})]}),(0,n.jsx)("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:(t2.network.interfaces||[]).slice(0,6).map(e=>{var t,s,l,i;return(0,n.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-black/25 px-4 py-3 font-mono text-[11px]",children:[(0,n.jsx)("p",{className:"text-xs font-semibold text-cyan-200/90",children:e.name}),(0,n.jsxs)("p",{className:"mt-2 text-zinc-500",children:[np("链路","Link"),": ",e.operstate||"unknown"," ",(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"})," ",e.speed_mbps?"".concat(e.speed_mbps," Mbps"):np("未知速率","unknown speed")]}),(0,n.jsxs)("p",{className:"mt-2 text-zinc-500",children:["↓ ",tO(e.rx_bps)," ",(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"})," ",tA(e.rx_bytes)," ",(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"})," ",null!==(l=null===(t=e.rx_packets)||void 0===t?void 0:t.toLocaleString())&&void 0!==l?l:"—"," pkt"]}),(0,n.jsxs)("p",{className:"mt-0.5 text-zinc-500",children:["↑ ",tO(e.tx_bps)," ",(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"})," ",tA(e.tx_bytes)," ",(0,n.jsx)("span",{className:"text-zinc-600",children:"\xb7"})," ",null!==(i=null===(s=e.tx_packets)||void 0===s?void 0:s.toLocaleString())&&void 0!==i?i:"—"," pkt"]})]},e.name)})})]}):null,(null==t2?void 0:null===(eg=t2.live_events)||void 0===eg?void 0:null===(eb=eg.pm2_tail)||void 0===eb?void 0:eb.length)||(null==t2?void 0:null===(ey=t2.live_events)||void 0===ey?void 0:null===(ev=ey.process_digest)||void 0===ev?void 0:ev.length)?(0,n.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,n.jsxs)("div",{className:"rounded-2xl border border-amber-500/15 bg-zinc-950/40 p-5",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:np("直播 / PM2 事件","Live / PM2 feed")}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:np("PM2 合并日志尾部","PM2 merged log tail")}),(0,n.jsx)("pre",{className:"mt-3 max-h-48 overflow-auto whitespace-pre-wrap rounded-lg border border-white/[0.05] bg-black/40 p-3 font-mono text-[10px] leading-relaxed text-zinc-400",children:((null==t2?void 0:null===(ew=t2.live_events)||void 0===ew?void 0:ew.pm2_tail)||[]).join("\n")||np("暂无 PM2 输出","No PM2 output")})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-violet-500/15 bg-zinc-950/40 p-5",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-white",children:np("进程快照","Process digest")}),(0,n.jsx)("ul",{className:"mt-3 space-y-2",children:((null==t2?void 0:null===(ej=t2.live_events)||void 0===ej?void 0:ej.process_digest)||[]).map(e=>(0,n.jsxs)("li",{className:"flex items-center justify-between gap-2 rounded-lg border border-white/[0.05] bg-black/30 px-3 py-2 text-xs",children:[(0,n.jsx)("span",{className:"truncate text-zinc-300",children:e.label||e.pm2}),(0,n.jsx)("span",{className:"shrink-0 rounded-md px-2 py-0.5 text-[10px] font-medium ".concat(tK(e.status||"")),children:function(e,t){let s=(e||"").trim().toLowerCase();return"online"===s||"running"===s?t("运行中","Running"):"configured"===s?t("已配置","Configured"):"not_found"===s?t("未注册","Unregistered"):"stopped"===s?t("已停止","Stopped"):"error"===s?t("异常","Error"):e||"—"}(e.status||"",np)})]},e.pm2))})]})]}):null,null,(null==t2?void 0:t2.probes)&&s_?(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:[t2.probes.srs?(()=>{var e,t,s,l,i,a,r;let o=null===(e=t2.probes)||void 0===e?void 0:e.srs,c=null==o?void 0:null===(t=o.tcp)||void 0===t?void 0:t.reachable,d=null==o?void 0:null===(s=o.tcp_api)||void 0===s?void 0:s.reachable,x=null==o?void 0:o.http_ui,u=null==o?void 0:o.http,m=null==o?void 0:o.api_port,h=null!==(i=null==o?void 0:o.api_ok)&&void 0!==i?i:(null==u?void 0:u.http_code)===200,p=null==x?void 0:x.http_code;return(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.07] bg-zinc-950/40 p-4 backdrop-blur-sm",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("p",{className:"text-xs font-semibold text-white",children:"SRS"}),(0,n.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(h?"bg-emerald-500/20 text-emerald-200 ring-1 ring-emerald-500/30":"bg-rose-500/15 text-rose-200 ring-1 ring-rose-500/25"),children:h?np("API 正常","API OK"):np("API 异常","API down")})]}),(0,n.jsxs)("p",{className:"mt-1 font-mono text-[11px] text-zinc-500",children:[":",null!==(a=null==o?void 0:o.port)&&void 0!==a?a:"—"," / API :",null!=m?m:"—"," \xb7 TCP ",c?"OK":"—"," \xb7 API TCP"," ",d?"OK":"—"]}),(0,n.jsxs)("p",{className:"mt-1 font-mono text-[11px] text-zinc-500",children:["API HTTP ",null!==(r=null==u?void 0:u.http_code)&&void 0!==r?r:"—"," \xb7 ",np("根路径","root")," ",null!=p?p:"—",404===p?np("(无首页不影响推流)"," (no index is OK for streaming)"):null]}),(0,n.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-500",children:[np("延迟","RTT")," ",(null==u?void 0:u.latency_ms)!=null?"".concat(u.latency_ms," ms"):(null==o?void 0:null===(l=o.tcp)||void 0===l?void 0:l.latency_ms)!=null?"".concat(o.tcp.latency_ms," ms"):"—"]}),!h&&(null==u?void 0:u.error)?(0,n.jsx)("p",{className:"mt-1 line-clamp-2 text-[10px] text-amber-200/80",children:u.error}):null]})})():null,t2.probes.neko?(()=>{var e,t,s,l,i,a,r;let o=null===(e=t2.probes)||void 0===e?void 0:e.neko,c=null==o?void 0:null===(t=o.tcp)||void 0===t?void 0:t.reachable,d=null==o?void 0:o.http,x=(null==o?void 0:o.instances)||[],u=null!==(l=null==o?void 0:o.running_count)&&void 0!==l?l:x.filter(e=>{var t;return null===(t=e.tcp)||void 0===t?void 0:t.reachable}).length,m=null!==(i=null==o?void 0:o.required_count)&&void 0!==i?i:x.length;return(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.07] bg-zinc-950/40 p-4 backdrop-blur-sm",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("p",{className:"text-xs font-semibold text-white",children:"Neko Chromium"}),(0,n.jsxs)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(u>0?"bg-emerald-500/20 text-emerald-200 ring-1 ring-emerald-500/30":"bg-rose-500/15 text-rose-200 ring-1 ring-rose-500/25"),children:[u,"/",m||"—"," ",np("在线","online")]})]}),(0,n.jsx)("p",{className:"mt-1 text-[11px] text-zinc-500",children:np("Docker 内 Chromium(非 Chrome 品牌);arm64/x86 同一镜像。","Chromium in Docker (not Chrome branding); multi-arch.")}),(0,n.jsxs)("p",{className:"mt-2 font-mono text-[11px] text-zinc-500",children:[":",null!==(a=null==o?void 0:o.port)&&void 0!==a?a:"—"," \xb7 TCP ",c?"OK":"—"," \xb7 HTTP ",null!==(r=null==d?void 0:d.http_code)&&void 0!==r?r:"—"]}),(0,n.jsxs)("p",{className:"mt-1 text-[11px] text-zinc-500",children:[np("延迟","RTT")," ",(null==d?void 0:d.latency_ms)!=null?"".concat(d.latency_ms," ms"):(null==o?void 0:null===(s=o.tcp)||void 0===s?void 0:s.latency_ms)!=null?"".concat(o.tcp.latency_ms," ms"):"—"]}),x.length?(0,n.jsx)("div",{className:"mt-3 space-y-2",children:x.map(e=>{var t,s,l,i,a,r,o;return(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-lg border border-white/[0.05] bg-black/25 px-3 py-2",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("p",{className:"text-[11px] font-semibold text-zinc-200",children:["Neko ",null!==(a=e.id)&&void 0!==a?a:"?"]}),(0,n.jsxs)("p",{className:"font-mono text-[10px] text-zinc-500",children:[":",null!==(r=e.port)&&void 0!==r?r:"—"," \xb7 TCP ",(null===(t=e.tcp)||void 0===t?void 0:t.reachable)?"OK":"—"," \xb7 HTTP"," ",null!==(o=null===(s=e.http)||void 0===s?void 0:s.http_code)&&void 0!==o?o:"—"]})]}),(0,n.jsx)("span",{className:"shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat((null===(l=e.tcp)||void 0===l?void 0:l.reachable)?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25":"bg-zinc-500/15 text-zinc-400 ring-1 ring-zinc-500/25"),children:(null===(i=e.tcp)||void 0===i?void 0:i.reachable)?np("运行中","Running"):np("未连通","Offline")})]},"".concat(e.id,"-").concat(e.port))})}):null,!(null==d?void 0:d.reachable)&&(null==d?void 0:d.error)?(0,n.jsx)("p",{className:"mt-1 line-clamp-2 text-[10px] text-amber-200/80",children:d.error}):null]})})():null]}):null]}):null,"services"===t$?(0,n.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:[((null==t2?void 0:t2.services)||[]).map((e,t)=>(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.04*t},whileHover:{y:-2},className:"rounded-2xl border border-white/[0.07] bg-gradient-to-b from-white/[0.05] to-transparent p-5",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"font-semibold text-white",children:e.label}),(0,n.jsx)("p",{className:"mt-1 text-xs text-zinc-500 line-clamp-2",children:e.description})]}),(0,n.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(tK(e.running?"online":e.status)),children:e.running?np("运行中","Running"):e.status})]}),e.detail?(0,n.jsx)("p",{className:"mt-2 text-[11px] leading-snug line-clamp-6 ".concat("skipped"===e.status?"text-slate-300/90":"text-amber-200/85"),children:e.detail}):null,"shellcrash"===e.service_id&&e.available&&!e.running?(0,n.jsx)("p",{className:"mt-2 text-[11px] text-zinc-500",children:np("stopped 为常态:仅当需要透明代理 / 规则分流时再手动点 Start,不建议设置自启。","Stopped is normal; click Start manually only when the proxy is needed. Autostart stays off.")}):null,(0,n.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[e.url?(0,n.jsx)("a",{href:(0,ef.p)(e.url),target:"_blank",rel:"noreferrer",className:"rounded-lg bg-violet-500/15 px-3 py-1.5 text-xs font-medium text-violet-200 ring-1 ring-violet-500/25",children:np("打开面板","Open panel")}):null,(0,n.jsx)("button",{type:"button",disabled:!!t7||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?np("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||np("当前不可操作","Unavailable"),onClick:()=>void nH(e.service_id,"start"),className:"rounded-lg bg-emerald-500/20 px-3 py-1.5 text-xs font-medium text-emerald-200 ring-1 ring-emerald-500/30 disabled:opacity-30",children:"Start"}),(0,n.jsx)("button",{type:"button",disabled:!!t7||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?np("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||np("当前不可操作","Unavailable"),onClick:()=>void nH(e.service_id,"install"),className:"rounded-lg bg-sky-500/15 px-3 py-1.5 text-xs font-medium text-sky-200 ring-1 ring-sky-500/25 disabled:opacity-30",children:"Install"}),(0,n.jsx)("button",{type:"button",disabled:!!t7||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?np("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||np("当前不可操作","Unavailable"),onClick:()=>void nH(e.service_id,"restart"),className:"rounded-lg bg-amber-500/15 px-3 py-1.5 text-xs font-medium text-amber-200 ring-1 ring-amber-500/25 disabled:opacity-30",children:"Restart"}),(0,n.jsx)("button",{type:"button",disabled:!!t7||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?np("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||np("当前不可操作","Unavailable"),onClick:()=>void nH(e.service_id,"upgrade"),className:"rounded-lg bg-indigo-500/15 px-3 py-1.5 text-xs font-medium text-indigo-200 ring-1 ring-indigo-500/25 disabled:opacity-30",children:"Upgrade"}),(0,n.jsx)("button",{type:"button",disabled:!!t7||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?np("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||np("当前不可操作","Unavailable"),onClick:()=>void nH(e.service_id,"stop"),className:"rounded-lg bg-rose-500/15 px-3 py-1.5 text-xs font-medium text-rose-200 ring-1 ring-rose-500/25 disabled:opacity-30",children:"Stop"}),(0,n.jsx)("button",{type:"button",disabled:!!t7||!e.available||"android_gateway"===e.service_id&&"skipped"===e.status,title:"android_gateway"===e.service_id&&"skipped"===e.status?np("单网口无需网关","Not needed on single NIC"):e.available?void 0:e.detail||np("当前不可操作","Unavailable"),onClick:()=>void nH(e.service_id,"uninstall"),className:"rounded-lg bg-zinc-500/15 px-3 py-1.5 text-xs font-medium text-zinc-200 ring-1 ring-zinc-500/25 disabled:opacity-30",children:"Uninstall"})]})]},e.service_id)),(null==t2?void 0:null===(eN=t2.services)||void 0===eN?void 0:eN.length)?null:(0,n.jsx)("p",{className:"text-sm text-zinc-500",children:np("暂无服务数据","No services")})]}):null,"live_youtube"===t$?(0,n.jsx)(tE,{t:np,busy:t7,entries:sr,currentProc:sx,setCurrentProc:su,urlConfig:sm,setUrlConfig:sh,onRunProcess:(e,t)=>void nX(e,t),onSaveUrlConfig:(e,t)=>nQ(e,t),fetchJson:ng,liveProcesses:sc.length?sc:null!==(tz=null==t2?void 0:null===(e_=t2.live)||void 0===e_?void 0:e_.processes)&&void 0!==tz?tz:[],notify:nb,quickLinks:nk,onRefresh:()=>nv(),onNavigate:e=>tX(e)}):null,"live_tiktok"===t$?(0,n.jsx)(eK,{t:np,busy:!!t7,entries:sr,currentProc:sx,setCurrentProc:su,urlConfig:sm,setUrlConfig:sh,onRunProcess:e=>void nX(e),onSaveUrlConfig:e=>nQ(e),onReplayGoLive:async(e,t)=>{let s=t.replace(/[,,|]/g,"_");await nQ("原画,".concat(e,",主播: ").concat(s)),await nX("start")},onCopy:n5,fetchJson:ng,apiPrefix:tY,quickLinks:nk,hdmiStatus:null==t2?void 0:t2.hdmi,notify:nb,onNavigate:e=>tX(e)}):null,"android"===t$?(0,n.jsx)(eh,{t:np,notify:nb,fetchJson:ng,apiBase:tY,busy:t7,androidSerial:sg,setAndroidSerial:sf,devices:(null==t2?void 0:null===(ez=t2.android)||void 0===ez?void 0:ez.devices)||[],adbAvailable:!!(null==t2?void 0:null===(eS=t2.android)||void 0===eS?void 0:eS.adb_available),apkPath:sp,setApkPath:sb,onAndroidAction:(e,t)=>n0(e,null!=t?t:{}),onCopy:n5,onRefreshDevices:()=>void nv()}):null,"studio"===t$?(0,n.jsxs)("div",{className:"mx-auto max-w-7xl space-y-5",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-base font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:[(0,n.jsx)(x.Z,{className:"h-5 w-5 ".concat("light"===tJ?"text-emerald-700":"text-emerald-300")}),np("工作室","Studio")]}),(0,n.jsx)("p",{className:"mt-1 text-xs ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:"Home Assistant / Frigate / WOL"})]}),(0,n.jsxs)("span",{className:"w-fit rounded-full px-3 py-1 text-[11px] font-semibold ".concat("light"===tJ?"bg-emerald-50 text-emerald-800 ring-1 ring-emerald-200":"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25"),children:[nz.filter(e=>null==e?void 0:e.running).length,"/",nz.length||4," online"]})]}),(0,n.jsxs)("div",{className:"grid gap-4 xl:grid-cols-4",children:[[{id:"homeassistant",label:"Home Assistant",icon:x.Z,fallbackUrl:nk.homeassistant,iconClass:"light"===tJ?"text-emerald-700":"text-emerald-300",openClass:"light"===tJ?"bg-emerald-50 text-emerald-800 ring-1 ring-emerald-200 hover:bg-emerald-100":"bg-emerald-500/15 text-emerald-100 ring-1 ring-emerald-400/25 hover:bg-emerald-500/25"},{id:"frigate",label:"Frigate NVR",icon:z.Z,fallbackUrl:nk.frigate,iconClass:"light"===tJ?"text-cyan-700":"text-cyan-300",openClass:"light"===tJ?"bg-cyan-50 text-cyan-800 ring-1 ring-cyan-200 hover:bg-cyan-100":"bg-cyan-500/15 text-cyan-100 ring-1 ring-cyan-400/25 hover:bg-cyan-500/25"},{id:"ntfy",label:"ntfy",icon:S.Z,fallbackUrl:nk.ntfy,iconClass:"light"===tJ?"text-violet-700":"text-violet-300",openClass:"light"===tJ?"bg-violet-50 text-violet-800 ring-1 ring-violet-200 hover:bg-violet-100":"bg-violet-500/15 text-violet-100 ring-1 ring-violet-400/25 hover:bg-violet-500/25"}].map(e=>{let t=n_.get(e.id),s=e.icon,i=(null==t?void 0:t.url)||e.fallbackUrl||"",a=!!t7||(null==t?void 0:t.available)===!1;return(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===tJ?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:[(0,n.jsx)(s,{className:"h-4 w-4 ".concat(e.iconClass)}),e.label]}),(0,n.jsx)("p",{className:"mt-2 line-clamp-2 text-xs ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:(null==t?void 0:t.description)||("frigate"===e.id?"Camera NVR and detection console":"Local automation workspace")})]}),(0,n.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(tK((null==t?void 0:t.running)?"online":(null==t?void 0:t.status)||"unknown")),children:(null==t?void 0:t.running)?np("运行中","Running"):(null==t?void 0:t.status)||"unknown"})]}),(null==t?void 0:t.detail)?(0,n.jsx)("p",{className:"mt-3 line-clamp-4 font-mono text-[11px] ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:t.detail}):null,(0,n.jsxs)("div",{className:"mt-5 flex flex-wrap gap-2",children:[i?(0,n.jsxs)("a",{href:(0,ef.p)(i),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 rounded-lg px-3 py-2 text-xs font-semibold transition ".concat(e.openClass),children:[(0,n.jsx)(C.Z,{className:"h-3.5 w-3.5"}),np("打开","Open")]}):null,(0,n.jsx)("button",{type:"button",disabled:a,onClick:()=>void nH(e.id,"start"),className:"rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:"Start"}),(0,n.jsx)("button",{type:"button",disabled:a,onClick:()=>void nH(e.id,"restart"),className:"rounded-lg bg-amber-500/15 px-3 py-2 text-xs font-semibold text-amber-100 ring-1 ring-amber-400/25 transition hover:bg-amber-500/25 disabled:opacity-40",children:"Restart"}),(0,n.jsx)("button",{type:"button",disabled:a,onClick:()=>void nH(e.id,"stop"),className:"rounded-lg bg-rose-500/15 px-3 py-2 text-xs font-semibold text-rose-100 ring-1 ring-rose-400/25 transition hover:bg-rose-500/25 disabled:opacity-40",children:"Stop"})]})]},e.id)}),(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===tJ?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:[(0,n.jsx)(R.Z,{className:"h-4 w-4 ".concat("light"===tJ?"text-amber-700":"text-amber-300")}),np("WOL 网络唤醒","WOL Network Wake")]}),(0,n.jsx)("p",{className:"mt-2 text-xs ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:(null==nS?void 0:nS.detail)||"broadcast=255.255.255.255;port=9"})]}),(0,n.jsx)("span",{className:"shrink-0 rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(tK((null==nS?void 0:nS.status)||"ready")),children:(null==nS?void 0:nS.status)||"ready"})]}),(0,n.jsxs)("div",{className:"mt-5 grid gap-3",children:[(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsxs)("select",{value:s1,onChange:e=>{let t=e.target.value;s5(t);let s=sQ.find(e=>e.mac===t);s&&(sq(s.mac),s3(s.name||""),s6(s.ip||""))},className:"min-w-0 flex-1 rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100"),children:[(0,n.jsx)("option",{value:"",children:np("选择设备","Select device")}),sQ.map(e=>(0,n.jsx)("option",{value:e.mac,children:(e.name||e.ip||e.mac)+(e.reachable?" \xb7 online":"")},e.mac))]}),(0,n.jsx)("button",{type:"button",disabled:"wol:probe"===t7,onClick:()=>{se("wol:probe"),nY(!0).finally(()=>se(null))},className:"inline-flex items-center justify-center rounded-lg bg-cyan-500/15 px-3 py-2 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/25 transition hover:bg-cyan-500/25 disabled:opacity-40",children:(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat("wol:probe"===t7?"animate-spin":"")})})]}),(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:np("名称","Name")}),(0,n.jsx)("input",{value:s2,onChange:e=>s3(e.target.value),placeholder:"NAS / PC",className:"mt-1 w-full rounded-lg border px-3 py-2 text-sm outline-none ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:"IP"}),(0,n.jsx)("input",{value:s4,onChange:e=>s6(e.target.value),placeholder:"10.0.0.10",inputMode:"decimal",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]})]}),(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:"MAC"}),(0,n.jsx)("input",{value:sG,onChange:e=>sq(e.target.value),placeholder:"AA:BB:CC:DD:EE:FF",autoCapitalize:"characters",spellCheck:!1,className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,1fr)_7rem]",children:[(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:"Broadcast"}),(0,n.jsx)("input",{value:sJ,onChange:e=>sV(e.target.value),placeholder:"255.255.255.255",inputMode:"decimal",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]}),(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:"Port"}),(0,n.jsx)("input",{value:s$,onChange:e=>sX(e.target.value),inputMode:"numeric",className:"mt-1 w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-slate-900 focus:border-amber-400":"border-white/10 bg-black/35 text-zinc-100 focus:border-amber-400/60")})]})]}),(0,n.jsxs)("button",{type:"button",disabled:"wol:wake"===t7||(null==nS?void 0:nS.available)===!1,onClick:()=>void nF(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-amber-500/18 px-3 py-2.5 text-xs font-semibold text-amber-100 ring-1 ring-amber-400/30 transition hover:bg-amber-500/28 disabled:opacity-40",children:["wol:wake"===t7?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(R.Z,{className:"h-3.5 w-3.5"}),np("唤醒","Wake")]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,n.jsxs)("button",{type:"button",disabled:"wol:save"===t7,onClick:()=>void nG(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:["wol:save"===t7?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(P.Z,{className:"h-3.5 w-3.5"}),np("保存","Save")]}),(0,n.jsxs)("button",{type:"button",disabled:"wol:delete"===t7||!(s1||sG),onClick:()=>void nq(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-rose-500/15 px-3 py-2 text-xs font-semibold text-rose-100 ring-1 ring-rose-400/25 transition hover:bg-rose-500/25 disabled:opacity-40",children:["wol:delete"===t7?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(L.Z,{className:"h-3.5 w-3.5"}),np("删除","Delete")]})]})]})]})]}),null,(0,n.jsxs)("div",{className:"grid gap-4 xl:grid-cols-4",children:[(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===tJ?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:[(0,n.jsx)(M.Z,{className:"h-4 w-4 ".concat("light"===tJ?"text-emerald-700":"text-emerald-300")}),"System Doctor"]}),(0,n.jsxs)("p",{className:"mt-2 text-xs ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:[null!==(tS=null==nr?void 0:null===(eC=nr.doctor)||void 0===eC?void 0:eC.services_running)&&void 0!==tS?tS:0,"/",null!==(tC=null==nr?void 0:null===(eR=nr.doctor)||void 0===eR?void 0:eR.services_available)&&void 0!==tC?tC:0," services"]})]}),(0,n.jsxs)("span",{className:"rounded-full px-2.5 py-1 text-[10px] font-semibold ".concat(tK((null==nr?void 0:null===(eP=nr.doctor)||void 0===eP?void 0:eP.status)||"unknown")),children:[null!==(tR=null==nr?void 0:null===(eL=nr.doctor)||void 0===eL?void 0:eL.score)&&void 0!==tR?tR:0,"/100"]})]}),(0,n.jsxs)("div",{className:"mt-4 space-y-2 text-xs ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:[(0,n.jsxs)("p",{children:[np("严重","Critical"),": ",null!==(tP=null==nr?void 0:null===(eT=nr.doctor)||void 0===eT?void 0:eT.critical)&&void 0!==tP?tP:0," / ",np("警告","Warnings"),": ",null!==(tL=null==nr?void 0:null===(eM=nr.doctor)||void 0===eM?void 0:eM.warnings)&&void 0!==tL?tL:0]}),((null==nr?void 0:null===(eE=nr.doctor)||void 0===eE?void 0:eE.recommendations)||[]).slice(0,2).map(e=>(0,n.jsxs)("p",{className:"line-clamp-2",children:["- ",e]},e))]})]}),(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===tJ?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:[(0,n.jsx)(N.Z,{className:"h-4 w-4 ".concat("light"===tJ?"text-cyan-700":"text-cyan-300")}),np("设备资产","Device inventory")]}),(0,n.jsx)("p",{className:"mt-2 text-xs ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:"LAN / USB"})]}),(0,n.jsx)("button",{type:"button",disabled:"studio:ops"===t7,onClick:()=>{se("studio:ops"),nV(!0).finally(()=>se(null))},className:"inline-flex items-center justify-center rounded-lg px-2.5 py-2 text-xs font-semibold ring-1 transition disabled:opacity-40 ".concat("light"===tJ?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat("studio:ops"===t7?"animate-spin":"")})})]}),(0,n.jsx)("div",{className:"mt-4 grid grid-cols-2 gap-2 text-center text-xs",children:[["WOL",null!==(tT=null==nr?void 0:null===(eZ=nr.inventory)||void 0===eZ?void 0:null===(eU=eZ.counts)||void 0===eU?void 0:eU.wol)&&void 0!==tT?tT:0],["Video",null!==(tM=null==nr?void 0:null===(eA=nr.inventory)||void 0===eA?void 0:null===(eI=eA.counts)||void 0===eI?void 0:eI.video)&&void 0!==tM?tM:0]].map(e=>{let[t,s]=e;return(0,n.jsxs)("div",{className:"rounded-lg border px-2 py-2 ".concat("light"===tJ?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:s}),(0,n.jsx)("p",{className:"light"===tJ?"text-slate-500":"text-zinc-500",children:t})]},t)})})]}),(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===tJ?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:[(0,n.jsx)(h.Z,{className:"h-4 w-4 ".concat("light"===tJ?"text-amber-700":"text-amber-300")}),np("自动化配方","Automation recipes")]}),(0,n.jsx)("div",{className:"mt-4 space-y-2",children:((null==nr?void 0:nr.recipes)||[]).slice(0,3).map(e=>(0,n.jsx)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-slate-700":"border-white/10 bg-black/30 text-zinc-300"),children:(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"line-clamp-1 font-semibold",children:e.title}),(0,n.jsx)("span",{className:"ready"===e.status?"text-emerald-400":"text-amber-300",children:e.status})]})},e.id||e.title))})]}),(0,n.jsxs)(l.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"rounded-2xl border p-5 shadow-xl ".concat("light"===tJ?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:[(0,n.jsx)(r.Z,{className:"h-4 w-4 ".concat("light"===tJ?"text-violet-700":"text-violet-300")}),np("备份快照","Backup snapshots")]}),(0,n.jsxs)("p",{className:"mt-2 text-xs ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:[((null==nr?void 0:null===(eD=nr.backups)||void 0===eD?void 0:eD.snapshots)||[]).length," snapshots"]})]}),(0,n.jsxs)("button",{type:"button",disabled:"studio:snapshot"===t7,onClick:()=>void n$(),className:"inline-flex items-center justify-center gap-2 rounded-lg bg-violet-500/15 px-3 py-2 text-xs font-semibold text-violet-100 ring-1 ring-violet-400/25 transition hover:bg-violet-500/25 disabled:opacity-40",children:["studio:snapshot"===t7?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(E.Z,{className:"h-3.5 w-3.5"}),np("创建","Create")]})]}),(0,n.jsx)("p",{className:"mt-4 line-clamp-2 text-xs ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:(null===(eO=((null==nr?void 0:null===(eB=nr.backups)||void 0===eB?void 0:eB.snapshots)||[])[0])||void 0===eO?void 0:eO.name)||np("暂无快照","No snapshots yet")})]})]})]}):null,"network"===t$?(0,n.jsxs)("div",{className:"mx-auto max-w-7xl space-y-6",children:[(0,n.jsxs)("div",{className:"rounded-2xl border p-6 shadow-xl ".concat("light"===tJ?"border-cyan-200/90 bg-white shadow-cyan-100/50":"border-cyan-500/20 bg-zinc-950/55 shadow-black/30"),children:[(0,n.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:[(0,n.jsx)(M.Z,{className:"h-4 w-4 ".concat("light"===tJ?"text-cyan-700":"text-cyan-300")}),"WireGuard VPS"]}),(0,n.jsx)("p",{className:"mt-2 text-xs ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:np("导入 VPS wg-quick 配置,保存到受管配置目录,并生成 Windows 端点旁路路由命令。","Import a VPS wg-quick config, save it under managed config, and generate the Windows endpoint bypass route.")})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsxs)("span",{className:"rounded-full px-3 py-1 text-[11px] font-semibold ".concat((null==sM?void 0:sM.active)?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-400/25":"bg-amber-500/15 text-amber-200 ring-1 ring-amber-400/25"),children:[tB(null==sM?void 0:null===(eW=sM.quality)||void 0===eW?void 0:eW.status,np),"number"==typeof(null==sM?void 0:null===(eH=sM.quality)||void 0===eH?void 0:eH.score)?" \xb7 ".concat(sM.quality.score,"/100"):""]}),(null==sL?void 0:sL.relative_path)?(0,n.jsx)("div",{className:"rounded-lg border px-3 py-2 text-[11px] ".concat("light"===tJ?"border-cyan-200 bg-cyan-50 text-cyan-900":"border-cyan-400/20 bg-cyan-500/10 text-cyan-100"),children:sL.relative_path}):null,(0,n.jsxs)("button",{onClick:()=>{nI(),nA()},disabled:"wg:status"===t7||sI,className:"inline-flex items-center gap-2 rounded-lg px-3 py-2 text-xs font-semibold ring-1 transition disabled:opacity-40 ".concat("light"===tJ?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:[(0,n.jsx)(w.Z,{className:"h-3.5 w-3.5 ".concat(sI?"animate-spin":"")}),sI?np("探测中","Probing"):np("刷新","Refresh")]})]})]}),(0,n.jsxs)("div",{className:"mt-5 grid gap-3 lg:grid-cols-2 xl:grid-cols-4",children:[(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===tJ?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:np("当前接口","Active interfaces")}),(0,n.jsxs)("div",{className:"mt-2 rounded-lg border px-3 py-2 text-xs ".concat("light"===tJ?"border-cyan-100 bg-white text-slate-700":"border-cyan-400/15 bg-cyan-500/10 text-cyan-100"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"font-semibold",children:tB(null==sM?void 0:null===(eF=sM.quality)||void 0===eF?void 0:eF.status,np)}),(0,n.jsx)("span",{className:"font-mono",children:"number"==typeof(null==sM?void 0:null===(eY=sM.quality)||void 0===eY?void 0:eY.score)?"".concat(sM.quality.score,"/100"):"—"})]}),(0,n.jsxs)("p",{className:"mt-1 text-[11px] ".concat("light"===tJ?"text-slate-500":"text-cyan-100/75"),children:[np("新鲜握手","Fresh peers"),": ",null!==(tU=null==sM?void 0:null===(eG=sM.quality)||void 0===eG?void 0:eG.fresh_peer_count)&&void 0!==tU?tU:0,"/",null!==(tW=null==sM?void 0:null===(eJ=sM.quality)||void 0===eJ?void 0:eJ.peer_count)&&void 0!==tW?tW:0," \xb7 ",np("最佳握手","Best handshake"),": ",tD(null==sM?void 0:null===(eV=sM.quality)||void 0===eV?void 0:eV.best_handshake_age_seconds)]})]}),(0,n.jsx)("div",{className:"mt-2 space-y-2",children:((null==sM?void 0:sM.interfaces)||[]).length?((null==sM?void 0:sM.interfaces)||[]).map(e=>{var t,s,l;return(0,n.jsxs)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===tJ?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-zinc-950/60 text-zinc-200"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"font-semibold",children:e.name||"wg"}),(0,n.jsx)("span",{className:(null===(t=e.systemd)||void 0===t?void 0:t.active)==="active"?"text-emerald-400":"text-amber-300",children:(null===(s=e.systemd)||void 0===s?void 0:s.active)||"active"})]}),(0,n.jsx)("p",{className:"mt-1 font-mono text-[11px]",children:(e.addresses||[]).join(", ")||"—"}),(0,n.jsxs)("p",{className:"mt-1 text-[11px] ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:[e.details_available?np("运行细节可读","Runtime details readable"):np("运行细节受限","Runtime details limited"),(null===(l=e.configured_from)||void 0===l?void 0:l.name)?" \xb7 ".concat(np("配置","Config"),": ").concat(e.configured_from.name):""]})]},e.name||"wg")}):(0,n.jsx)("p",{className:"text-xs ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:np("未发现 wg show 输出","No wg show output")})})]}),(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===tJ?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:np("对端与流量","Peer and traffic")}),(()=>{var e;let t=(null==nM?void 0:nM.status_source)==="wg"?np("运行态","Runtime"):(null==nM?void 0:nM.config_source)==="system"?np("系统配置","System config"):(null==nM?void 0:nM.config_source)==="repo"?np("受管配置","Managed config"):np("配置态","Config");return nM?(0,n.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-[11px] ".concat("light"===tJ?"text-slate-700":"text-zinc-300"),children:[(0,n.jsxs)("p",{children:["Source: ",t]}),(0,n.jsxs)("p",{children:["Endpoint: ",nM.endpoint||"—"]}),(0,n.jsxs)("p",{children:["AllowedIPs: ",(nM.allowed_ips||[]).join(", ")||"—"]}),(0,n.jsxs)("p",{children:["Handshake:"," ","config"===nM.status_source?np("运行态需 root/CAP_NET_ADMIN","Runtime details need root/CAP_NET_ADMIN"):tD(nM.latest_handshake_age_seconds)]}),(0,n.jsxs)("p",{children:["RX/TX: ",tA(nM.transfer_rx_bytes)," / ",tA(nM.transfer_tx_bytes)]}),(0,n.jsxs)("p",{children:["Keepalive: ",null!==(e=nM.persistent_keepalive)&&void 0!==e?e:"—"]})]}):(0,n.jsx)("p",{className:"mt-2 text-xs ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:np("暂无 peer 数据","No peer data yet")})})(),((null==sM?void 0:sM.endpoint_routes)||[]).length?(0,n.jsx)("div",{className:"mt-3 space-y-1 rounded-lg border px-3 py-2 font-mono text-[10px] ".concat("light"===tJ?"border-slate-200 bg-white text-slate-600":"border-white/10 bg-zinc-950/60 text-zinc-400"),children:((null==sM?void 0:sM.endpoint_routes)||[]).slice(0,2).map(e=>(0,n.jsxs)("p",{className:e.uses_wireguard_interface?"text-amber-300":"",children:["route ",e.host||"endpoint",": ",e.route||(e.ok?"ok":"unavailable")]},e.host||e.route||"endpoint-route"))}):null]}),(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===tJ?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:np("Neko 访问模式","Neko access mode")}),(0,n.jsx)("div",{className:"mt-2 grid grid-cols-2 rounded-lg p-1 text-xs font-semibold ".concat("light"===tJ?"bg-slate-200/70":"bg-black/40"),children:["lan","remote"].map(e=>{var t,s;let l=((null==sM?void 0:null===(t=sM.neko_access)||void 0===t?void 0:t.mode)||"lan")===e,i=(null==t7?void 0:t7.startsWith("wg:neko"))||"remote"===e&&!(null==sM?void 0:null===(s=sM.neko_access)||void 0===s?void 0:s.remote_ready);return(0,n.jsx)("button",{onClick:()=>void nO(e),disabled:i,className:"rounded-md px-2.5 py-1.5 transition disabled:opacity-40 ".concat(l?"light"===tJ?"bg-white text-cyan-800 shadow-sm":"bg-cyan-500/25 text-cyan-100 ring-1 ring-cyan-400/25":"light"===tJ?"text-slate-600 hover:bg-white/60":"text-zinc-300 hover:bg-white/10"),children:"lan"===e?np("局域网","LAN"):np("远控","Remote")},e)})}),(0,n.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-[11px] ".concat("light"===tJ?"text-slate-700":"text-zinc-300"),children:[(0,n.jsxs)("p",{children:["NAT1TO1: ",(null==sM?void 0:null===(e$=sM.neko_access)||void 0===e$?void 0:e$.nat1to1)||"-"]}),(0,n.jsxs)("p",{children:["LAN: ",(null==sM?void 0:null===(eX=sM.neko_access)||void 0===eX?void 0:eX.lan_host)||"-"]}),(0,n.jsxs)("p",{children:["WG: ",(null==sM?void 0:null===(eQ=sM.neko_access)||void 0===eQ?void 0:eQ.wireguard_host)||"-"]}),(0,n.jsxs)("p",{children:["Target: ",(null==sM?void 0:null===(e0=sM.neko_access)||void 0===e0?void 0:e0.target_nat1to1)||"-"]}),(0,n.jsxs)("p",{children:["ShellCrash: ",(null==sM?void 0:null===(e1=sM.shellcrash)||void 0===e1?void 0:e1.running)?"running:".concat((null==sM?void 0:null===(e5=sM.shellcrash)||void 0===e5?void 0:e5.mixed_port)||"7890"):"stopped"]})]}),((null==sM?void 0:null===(e2=sM.neko_access)||void 0===e2?void 0:e2.remote_urls)||[]).length?(0,n.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:((null==sM?void 0:null===(e3=sM.neko_access)||void 0===e3?void 0:e3.remote_urls)||[]).slice(0,4).map(e=>(0,n.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"rounded-lg px-2.5 py-1.5 text-[11px] font-semibold ring-1 transition ".concat("light"===tJ?"bg-white text-cyan-800 ring-cyan-100 hover:bg-cyan-50":"bg-cyan-500/10 text-cyan-100 ring-cyan-400/20 hover:bg-cyan-500/15"),children:["Neko ",e.id||1," \xb7 ",e.kind||"remote"]},"".concat(e.kind||"remote","-").concat(e.id||0,"-").concat(e.url||"")))}):null]}),(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===tJ?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:"Google / Douyin"}),(0,n.jsx)("div",{className:"mt-2 space-y-2",children:["google","youtube","douyin"].map(e=>{let t=((null==sU?void 0:sU.direct)||[]).find(t=>t.target===e),s=!!(null==t?void 0:t.ok),l=!t,i=sI&&l,a=(null==t?void 0:t.label)||("google"===e?"Google":"youtube"===e?"YouTube":"Douyin");return(0,n.jsxs)("div",{className:"rounded-lg border px-3 py-2 text-xs ".concat("light"===tJ?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-zinc-950/60 text-zinc-200"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"font-semibold",children:a}),(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat(i?"bg-cyan-500/15 text-cyan-100 ring-1 ring-cyan-500/25":l?"bg-zinc-500/15 text-zinc-300 ring-1 ring-zinc-500/25":s?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25":"bg-rose-500/15 text-rose-200 ring-1 ring-rose-500/25"),children:[i?(0,n.jsx)(y.Z,{className:"h-3 w-3 animate-spin"}):null,i?np("探测中","Probing"):l?np("等待结果","Waiting"):s?"OK":"FAIL"]})]}),(0,n.jsxs)("p",{className:"mt-1 font-mono text-[10px] ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:[(null==t?void 0:t.elapsed_ms)!=null?"".concat(t.elapsed_ms," ms"):i?np("正在连接 ".concat(a,"..."),"Connecting ".concat(a,"...")):np("等待探测结果","Waiting for probe result"),(null==t?void 0:t.status)?" \xb7 HTTP ".concat(t.status):""]}),!s&&(null==t?void 0:t.error)?(0,n.jsx)("p",{className:"mt-1 line-clamp-2 text-[10px] text-amber-200/80",children:t.error}):null]},e)})}),(0,n.jsxs)("div",{className:"mt-3 space-y-1 font-mono text-[11px] ".concat("light"===tJ?"text-slate-700":"text-zinc-300"),children:[(0,n.jsxs)("p",{children:["Mode: ",sI?np("正在探测直连链路与代理链路","Probing direct/proxy paths"):(null==sU?void 0:sU.mode)||"-"]}),(0,n.jsxs)("p",{children:["ShellCrash: ",(null==sU?void 0:null===(e4=sU.shellcrash)||void 0===e4?void 0:e4.running)?"running:".concat((null==sU?void 0:null===(e6=sU.shellcrash)||void 0===e6?void 0:e6.mixed_port)||"7890"):"manual/stopped"]}),(0,n.jsxs)("p",{children:["Autostart: ",(null==sU?void 0:null===(e8=sU.shellcrash_policy)||void 0===e8?void 0:e8.autostart_on_direct_fail)?"on direct fail":"off"]}),(0,n.jsxs)("p",{children:["Neko attach: ",(null==sU?void 0:null===(e9=sU.shellcrash_policy)||void 0===e9?void 0:e9.attach_neko)||"auto"]})]}),sI?(0,n.jsxs)("p",{className:"mt-3 inline-flex items-center gap-2 text-xs ".concat("light"===tJ?"text-cyan-700":"text-cyan-200"),children:[(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}),np("正在探测 Google / YouTube / Douyin,请等待结果返回。","Probing Google / YouTube / Douyin. Waiting for results.")]}):(null==sU?void 0:sU.summary)?(0,n.jsx)("p",{className:"mt-3 text-xs ".concat("light"===tJ?"text-slate-600":"text-zinc-500"),children:sU.summary}):null]})]}),(null==sM?void 0:null===(e7=sM.recommendations)||void 0===e7?void 0:e7.length)?(0,n.jsx)("div",{className:"mt-3 rounded-xl border px-4 py-3 text-xs ".concat("light"===tJ?"border-amber-200 bg-amber-50 text-amber-800":"border-amber-400/20 bg-amber-500/10 text-amber-100"),children:(sM.recommendations||[]).join(" \xb7 ")}):null,(null==sM?void 0:null===(tt=sM.quality)||void 0===tt?void 0:null===(te=tt.reasons)||void 0===te?void 0:te.length)?(0,n.jsx)("div",{className:"mt-3 rounded-xl border px-4 py-3 text-xs ".concat("light"===tJ?"border-slate-200 bg-white text-slate-700":"border-white/10 bg-black/25 text-zinc-300"),children:(sM.quality.reasons||[]).slice(0,4).join(" \xb7 ")}):null,(0,n.jsxs)("div",{className:"mt-5 grid gap-4 lg:grid-cols-[minmax(0,1fr)_22rem]",children:[(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[14rem_minmax(0,1fr)]",children:[(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:np("配置名","Config name")}),(0,n.jsx)("input",{value:sS,onChange:e=>sC(e.target.value),className:"mt-1 w-full rounded-lg border px-3 py-2 text-sm outline-none ".concat("light"===tJ?"border-slate-200 bg-white text-slate-900 focus:border-cyan-400":"border-white/10 bg-black/30 text-zinc-100 focus:border-cyan-400/60")})]}),(0,n.jsxs)("label",{className:"block",children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:np("配置文件","Config file")}),(0,n.jsx)("input",{type:"file",accept:".conf,.txt,text/plain",onChange:e=>{var t;nW(null===(t=e.target.files)||void 0===t?void 0:t[0])},className:"mt-1 w-full rounded-lg border px-3 py-2 text-xs file:mr-3 file:rounded-md file:border-0 file:px-3 file:py-1.5 file:text-xs file:font-semibold ".concat("light"===tJ?"border-slate-200 bg-white text-slate-700 file:bg-cyan-50 file:text-cyan-800":"border-white/10 bg-black/30 text-zinc-300 file:bg-cyan-500/15 file:text-cyan-100")})]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-xl border px-3 py-2 ".concat("light"===tJ?"border-slate-200 bg-slate-50":"border-white/10 bg-black/25"),children:[(0,n.jsx)("span",{className:"text-[11px] font-medium ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:np("保存模式","Save mode")}),["overlay","preserve"].map(e=>(0,n.jsx)("button",{onClick:()=>sB(e),className:"rounded-md px-2.5 py-1 text-[11px] font-semibold transition ".concat(sK===e?"bg-cyan-500/20 text-cyan-100 ring-1 ring-cyan-400/30":"light"===tJ?"bg-white text-slate-600 ring-1 ring-slate-200 hover:bg-slate-100":"bg-white/5 text-zinc-300 ring-1 ring-white/10 hover:bg-white/10"),children:"overlay"===e?np("组网不接管默认路由","Overlay only"):np("保留原路由","Preserve routes")},e)),(0,n.jsx)("button",{onClick:()=>sO(e=>!e),className:"ml-auto inline-flex items-center gap-2 rounded-lg px-3 py-1.5 text-xs font-semibold ring-1 transition ".concat("light"===tJ?"bg-white text-slate-700 ring-slate-200 hover:bg-slate-50":"bg-white/5 text-zinc-100 ring-white/10 hover:bg-white/10"),children:sD?np("锁定","Lock"):np("编辑","Edit")}),(0,n.jsxs)("button",{onClick:()=>void nD(!1),disabled:"wg:save"===t7,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-500/20 px-3 py-1.5 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/30 transition hover:bg-cyan-500/30 disabled:opacity-40",children:["wg:save"===t7?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(E.Z,{className:"h-3.5 w-3.5"}),np("保存","Save")]}),(0,n.jsxs)("button",{onClick:()=>void nD(!0),disabled:"wg:apply"===t7,className:"inline-flex items-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-1.5 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:["wg:apply"===t7?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(o.Z,{className:"h-3.5 w-3.5"}),np("保存并应用","Save & apply")]})]}),(0,n.jsx)("textarea",{value:sR,onChange:e=>sP(e.target.value),readOnly:!sD,spellCheck:!1,placeholder:"[Interface] Address = 10.88.0.6/32 PrivateKey = ... [Peer] Endpoint = 129.204.21.129:51820 AllowedIPs = 10.88.0.0/24",className:"min-h-56 w-full resize-y rounded-xl border p-3 font-mono text-xs leading-relaxed outline-none ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-slate-900 focus:border-cyan-400":"border-white/10 bg-black/40 text-zinc-100 focus:border-cyan-400/60"," ").concat(sD?"":"opacity-75")}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsxs)("button",{onClick:()=>void nK(),disabled:"wg:save"===t7,className:"inline-flex items-center gap-2 rounded-lg bg-cyan-500/20 px-3 py-2 text-xs font-semibold text-cyan-100 ring-1 ring-cyan-400/30 transition hover:bg-cyan-500/30 disabled:opacity-40",children:["wg:save"===t7?(0,n.jsx)(y.Z,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(E.Z,{className:"h-3.5 w-3.5"}),np("解析并保存","Parse & save")]}),(null==sL?void 0:sL.redacted_config)?(0,n.jsxs)("button",{onClick:()=>n5(sL.redacted_config||""),className:"inline-flex items-center gap-2 rounded-lg bg-zinc-500/15 px-3 py-2 text-xs font-semibold text-zinc-100 ring-1 ring-white/10 transition hover:bg-zinc-500/25",children:[(0,n.jsx)(U.Z,{className:"h-3.5 w-3.5"}),np("复制脱敏配置","Copy redacted")]}):null]})]}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===tJ?"border-slate-200 bg-slate-50":"border-white/10 bg-black/30"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,n.jsx)("p",{className:"text-xs font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:np("解析结果","Parsed config")}),(0,n.jsxs)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-semibold ".concat("light"===tJ?"bg-cyan-100 text-cyan-800":"bg-cyan-500/15 text-cyan-200"),children:[null!==(tH=null==sL?void 0:sL.peer_count)&&void 0!==tH?tH:0," peers"]})]}),(0,n.jsxs)("div",{className:"mt-3 space-y-2 font-mono text-[11px] ".concat("light"===tJ?"text-slate-700":"text-zinc-300"),children:[(0,n.jsxs)("p",{children:["Address: ",((null==sL?void 0:null===(ts=sL.interface)||void 0===ts?void 0:ts.addresses)||[]).join(", ")||"—"]}),(0,n.jsxs)("p",{children:["Endpoint: ",(null==sL?void 0:null===(tl=sL.peers)||void 0===tl?void 0:null===(tn=tl[0])||void 0===tn?void 0:tn.endpoint)||"—"]}),(0,n.jsxs)("p",{children:["AllowedIPs: ",((null==sL?void 0:null===(ta=sL.peers)||void 0===ta?void 0:null===(ti=ta[0])||void 0===ti?void 0:ti.allowed_ips)||[]).join(", ")||"—"]}),(0,n.jsxs)("p",{children:["MTU: ",null!==(tF=null==sL?void 0:null===(tr=sL.interface)||void 0===tr?void 0:tr.mtu)&&void 0!==tF?tF:"—"]})]}),(null==sL?void 0:null===(to=sL.warnings)||void 0===to?void 0:to.length)?(0,n.jsx)("ul",{className:"mt-3 space-y-1 text-[11px] ".concat("light"===tJ?"text-amber-700":"text-amber-200"),children:sL.warnings.map(e=>(0,n.jsx)("li",{children:e},e))}):null]}),(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===tJ?"border-slate-200 bg-white":"border-white/10 bg-black/30"),children:[(0,n.jsx)("p",{className:"text-xs font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:np("已保存配置","Saved configs")}),(0,n.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:((null==sM?void 0:sM.repo_configs)||[]).length?((null==sM?void 0:sM.repo_configs)||[]).map(e=>(0,n.jsx)("button",{onClick:()=>void nB(e.name),className:"rounded-lg px-3 py-1.5 text-[11px] font-semibold ring-1 transition ".concat("light"===tJ?"bg-slate-50 text-slate-700 ring-slate-200 hover:bg-slate-100":"bg-white/5 text-zinc-200 ring-white/10 hover:bg-white/10"),children:e.name||e.relative_path},e.name||e.relative_path||"wireguard-config")):(0,n.jsx)("span",{className:"text-[11px] ".concat("light"===tJ?"text-slate-500":"text-zinc-500"),children:np("暂无受管配置","No managed configs")})})]}),(0,n.jsxs)("div",{className:"rounded-xl border p-4 ".concat("light"===tJ?"border-slate-200 bg-white":"border-white/10 bg-black/30"),children:[(0,n.jsxs)("p",{className:"flex items-center gap-2 text-xs font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:[(0,n.jsx)(Z.Z,{className:"h-3.5 w-3.5"}),np("Windows 端点路由","Windows endpoint route")]}),(0,n.jsxs)("div",{className:"mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-1",children:[(0,n.jsx)("input",{value:sW,onChange:e=>sH(e.target.value),placeholder:np("网关,如 192.168.2.1","Gateway, e.g. 192.168.2.1"),className:"rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100")}),(0,n.jsx)("input",{value:sF,onChange:e=>sY(e.target.value),placeholder:np("接口 ifIndex,如 21","Interface ifIndex, e.g. 21"),className:"rounded-lg border px-3 py-2 text-xs outline-none ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-slate-900":"border-white/10 bg-black/35 text-zinc-100")})]}),(0,n.jsx)("code",{className:"mt-3 block break-all rounded-lg border p-3 text-[11px] ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-slate-800":"border-white/10 bg-black/40 text-zinc-200"),children:nZ||"route -p add mask 255.255.255.255 metric 1 if "}),(0,n.jsxs)("button",{onClick:()=>n5(nZ),disabled:!nZ,className:"mt-3 inline-flex items-center gap-2 rounded-lg bg-emerald-500/15 px-3 py-2 text-xs font-semibold text-emerald-100 ring-1 ring-emerald-400/25 transition hover:bg-emerald-500/25 disabled:opacity-40",children:[(0,n.jsx)(U.Z,{className:"h-3.5 w-3.5"}),np("复制命令","Copy command")]})]})]})]})]}),(0,n.jsxs)("div",{className:"rounded-2xl border p-6 ".concat("light"===tJ?"border-violet-200/90 bg-gradient-to-br from-violet-50 via-white to-fuchsia-50/80":"border-violet-500/25 bg-gradient-to-br from-violet-500/10 via-zinc-950/40 to-fuchsia-500/5"),children:[(0,n.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold ".concat("light"===tJ?"text-slate-900":"text-white"),children:[(0,n.jsx)(_.Z,{className:"h-4 w-4 ".concat("light"===tJ?"text-violet-600":"text-violet-300")}),np("ShellCrash 网络面板","ShellCrash panel")]}),(0,n.jsx)("p",{className:"mt-2 text-xs ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:np("透明代理与规则分流直接在本页完成,无需跳转;流媒体与其它系统服务请在「服务」页管理。","Proxy rules and YAML editing are embedded here. Use Services for SRS/Neko/Chromium, etc.")}),(0,n.jsx)("div",{className:"mt-6 flex flex-col items-center gap-4 sm:flex-row sm:justify-center",children:[{tx:np("互联网","Internet"),c:"from-cyan-400 to-blue-500"},{tx:"ShellCrash",c:"from-violet-500 to-fuchsia-500"},{tx:np("本机 / 安卓","Host / Android"),c:"from-emerald-400 to-teal-500"}].map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)("div",{className:"flex h-16 w-28 items-center justify-center rounded-2xl bg-gradient-to-br ".concat(e.c," text-xs font-bold text-white shadow-lg"),children:e.tx}),t<2?(0,n.jsx)(p.Z,{className:"hidden h-5 w-5 sm:block ".concat("light"===tJ?"text-slate-400":"text-zinc-600")}):null]},e.tx))})]}),(0,n.jsx)("div",{className:"overflow-hidden rounded-2xl border shadow-xl ".concat("light"===tJ?"border-slate-200/90 bg-white shadow-slate-200/40":"border-white/[0.08] bg-zinc-950/50 shadow-black/30"),children:(0,n.jsx)("div",{className:"max-h-[min(78vh,56rem)] min-h-[22rem] overflow-y-auto overflow-x-hidden",children:(0,n.jsx)(K.d,{embeddedShellCrash:!0,portalLang:tG})})})]}):null,"settings"===t$?(0,n.jsxs)("div",{className:"mx-auto max-w-lg space-y-6",children:[(0,n.jsx)("p",{className:"text-sm ".concat("light"===tJ?"text-slate-600":"text-zinc-400"),children:np("常用选项(本机偏好);完整文件与 JSON 编辑见下方链接。","Local preferences; full file/JSON editor via the link below.")}),(0,n.jsxs)("div",{className:"space-y-4 rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-5",children:[(0,n.jsxs)("label",{className:"flex cursor-pointer items-center justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium text-white",children:np("总览自动刷新","Auto-refresh dashboard")}),(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:"10s"})]}),(0,n.jsx)("input",{type:"checkbox",className:"h-5 w-5 accent-violet-500",checked:sN,onChange:e=>{let t=e.target.checked;sk(t);try{localStorage.setItem("livehub.autorefresh",t?"1":"0")}catch(e){}nb(t?np("已开启刷新","Auto refresh on"):np("已暂停刷新","Paused"))}})]}),(0,n.jsxs)("label",{className:"flex cursor-pointer items-center justify-between gap-4 border-t border-white/[0.06] pt-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium text-white",children:np("总览显示 SRS / Neko 探针","Show SRS/Neko probes")}),(0,n.jsx)("p",{className:"text-[11px] text-zinc-500",children:np("关闭可精简首页","Hide stream probe cards")})]}),(0,n.jsx)("input",{type:"checkbox",className:"h-5 w-5 accent-violet-500",checked:s_,onChange:e=>{let t=e.target.checked;sz(t);try{localStorage.setItem("livehub.showStreamProbes",t?"1":"0")}catch(e){}}})]})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-white/[0.08] bg-zinc-950/40 p-5",children:[(0,n.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-zinc-500",children:np("配置快照","Config snapshot")}),(0,n.jsx)("p",{className:"mt-2 font-mono text-[11px] text-zinc-400",children:String((null==sv?void 0:sv.config_root)||"—")}),(0,n.jsxs)("p",{className:"mt-3 text-sm text-zinc-300",children:[np("主机名","Hostname"),":"," ",(0,n.jsx)("span",{className:"font-mono text-violet-200",children:(()=>{var e,t,s;let n=null==sv?void 0:sv.system;return(null==n?void 0:null===(t=n.identity)||void 0===t?void 0:null===(e=t.hostname_alias)||void 0===e?void 0:e.trim())||((null==t2?void 0:null===(s=t2.stack)||void 0===s?void 0:s.mdns_host)||"").replace(/\.local$/i,"")||"—"})()})]}),(0,n.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:null==sv?void 0:null===(tc=sv.services)||void 0===tc?void 0:tc.slice(0,8).map(e=>(0,n.jsxs)("span",{className:"rounded-full px-2.5 py-1 text-[10px] font-medium ".concat(e.enabled?"bg-emerald-500/15 text-emerald-200 ring-1 ring-emerald-500/25":"bg-zinc-500/15 text-zinc-400"),children:[e.id," ",e.enabled?"ON":"off"]},e.id))})]}),(0,n.jsxs)("a",{href:"/console?tab=config",className:"inline-flex w-full items-center justify-center gap-2 rounded-xl border py-3 text-sm transition ".concat("light"===tJ?"border-slate-200 bg-slate-50 text-violet-700 hover:bg-slate-100":"border-white/10 bg-white/[0.05] text-violet-200 hover:bg-white/[0.08]"),children:[np("完整配置中心(文件 / JSON)","Full config center (files / JSON)"),(0,n.jsx)(C.Z,{className:"h-4 w-4"})]})]}):null]},t$)})})]})]}),(0,n.jsx)(i.M,{children:t1?(0,n.jsx)(l.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm lg:hidden",onClick:()=>t5(!1),children:(0,n.jsxs)(l.E.aside,{initial:{x:-280},animate:{x:0},exit:{x:-280},transition:{type:"spring",damping:28,stiffness:320},className:"absolute left-0 top-0 h-full w-[min(88vw,280px)] border-r border-white/10 bg-zinc-950 p-4 shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsx)("button",{type:"button",onClick:()=>t5(!1),className:"rounded-lg p-2",children:(0,n.jsx)(I.Z,{className:"h-5 w-5"})})}),(0,n.jsx)("nav",{className:"mt-4 flex flex-col gap-1",children:n1.map(e=>{let t=e.icon,s=t$===e.id;return(0,n.jsxs)("button",{type:"button",onClick:()=>{tX(e.id),t5(!1)},"aria-current":s?"page":void 0,className:"flex items-center gap-3 rounded-xl px-3 py-3 text-left text-sm transition ".concat(s?"bg-white/[0.08] text-white shadow-inner shadow-white/5":"text-zinc-300 hover:bg-white/[0.04]"),children:[(0,n.jsx)(t,{className:"h-4 w-4 ".concat(s?"text-violet-300":"text-violet-400")}),np(e.labelZh,e.labelEn)]},e.id)})})]})}):null})]})}}}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/chunks/568-00230e48c631a139.js b/d2ypp2/web-console/out/_next/static/chunks/568-00230e48c631a139.js new file mode 100644 index 0000000..010a17e --- /dev/null +++ b/d2ypp2/web-console/out/_next/static/chunks/568-00230e48c631a139.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[568],{4401:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},7580:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]])},5468:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]])},4766:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},3651:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("cable",[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]])},3581:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]])},875:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},407:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},4372:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},1723:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]])},8867:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},4822:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]])},91:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},6362:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},2208:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},7265:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("file-up",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]])},4554:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]])},4428:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]])},4938:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]])},7945:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]])},8124:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]])},3468:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]])},9985:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},6840:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])},5901:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("monitor-play",[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]])},9897:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]])},7226:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]])},6443:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]])},3420:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]])},4794:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]])},9227:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]])},3276:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},9397:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},9688:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]])},5287:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("radio",[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},8406:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]])},4743:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},6137:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},8728:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},4286:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},3388:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]])},1094:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},5929:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},221:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},8930:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},7689:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},2101:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("usb",[["circle",{cx:"10",cy:"7",r:"1",key:"dypaad"}],["circle",{cx:"4",cy:"20",r:"1",key:"22iqad"}],["path",{d:"M4.7 19.3 19 5",key:"1enqfc"}],["path",{d:"m21 3-3 1 2 2Z",key:"d3ov82"}],["path",{d:"M9.26 7.68 5 12l2 5",key:"1esawj"}],["path",{d:"m10 14 5 2 3.5-3.5",key:"v8oal5"}],["path",{d:"m18 12 1-1 1 1-1 1Z",key:"1bh22v"}]])},2926:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]])},2489:function(t,e,i){i.d(e,{Z:function(){return n}});let n=(0,i(2829).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},7586:function(t,e,i){i.d(e,{M:function(){return x}});var n=i(7437),s=i(2265),r=i(8881),o=i(3576),a=i(2014),l=i(4252),h=i(3537),u=i(5750);function d(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}class c extends s.Component{getSnapshotBeforeUpdate(t){let e=this.props.childRef.current;if((0,h.R)(e)&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let t=e.offsetParent,i=(0,h.R)(t)&&t.offsetWidth||0,n=(0,h.R)(t)&&t.offsetHeight||0,s=getComputedStyle(e),r=this.props.sizeRef.current;r.height=parseFloat(s.height),r.width=parseFloat(s.width),r.top=e.offsetTop,r.left=e.offsetLeft,r.right=i-r.width-r.left,r.bottom=n-r.height-r.top}return null}componentDidUpdate(){}render(){return this.props.children}}function p(t){var e,i;let{children:r,isPresent:o,anchorX:a,anchorY:l,root:h,pop:p}=t,m=(0,s.useId)(),f=(0,s.useRef)(null),y=(0,s.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:v}=(0,s.useContext)(u._),g=function(...t){return s.useCallback(function(...t){return e=>{let i=!1,n=t.map(t=>{let n=d(t,e);return i||"function"!=typeof n||(i=!0),n});if(i)return()=>{for(let e=0;e{let{width:t,height:e,top:i,left:n,right:s,bottom:r}=y.current;if(o||!1===p||!f.current||!t||!e)return;f.current.dataset.motionPopId=m;let u=document.createElement("style");v&&(u.nonce=v);let d=null!=h?h:document.head;return d.appendChild(u),u.sheet&&u.sheet.insertRule('\n [data-motion-pop-id="'.concat(m,'"] {\n position: absolute !important;\n width: ').concat(t,"px !important;\n height: ").concat(e,"px !important;\n ").concat("left"===a?"left: ".concat(n):"right: ".concat(s),"px !important;\n ").concat("bottom"===l?"bottom: ".concat(r):"top: ".concat(i),"px !important;\n }\n ")),()=>{var t;null===(t=f.current)||void 0===t||t.removeAttribute("data-motion-pop-id"),d.contains(u)&&d.removeChild(u)}},[o]),(0,n.jsx)(c,{isPresent:o,childRef:f,sizeRef:y,pop:p,children:!1===p?r:s.cloneElement(r,{ref:g})})}let m=t=>{let{children:e,initial:i,isPresent:r,onExitComplete:a,custom:h,presenceAffectsLayout:u,mode:d,anchorX:c,anchorY:m,root:y}=t,v=(0,o.h)(f),g=(0,s.useId)(),x=!0,w=(0,s.useMemo)(()=>(x=!1,{id:g,initial:i,isPresent:r,custom:h,onExitComplete:t=>{for(let e of(v.set(t,!0),v.values()))if(!e)return;a&&a()},register:t=>(v.set(t,!1),()=>v.delete(t))}),[r,v,a]);return u&&x&&(w={...w}),(0,s.useMemo)(()=>{v.forEach((t,e)=>v.set(e,!1))},[r]),s.useEffect(()=>{r||v.size||!a||a()},[r]),e=(0,n.jsx)(p,{pop:"popLayout"===d,isPresent:r,anchorX:c,anchorY:m,root:y,children:e}),(0,n.jsx)(l.O.Provider,{value:w,children:e})};function f(){return new Map}var y=i(9637);let v=t=>t.key||"";function g(t){let e=[];return s.Children.forEach(t,t=>{(0,s.isValidElement)(t)&&e.push(t)}),e}let x=t=>{let{children:e,custom:i,initial:l=!0,onExitComplete:h,presenceAffectsLayout:u=!0,mode:d="sync",propagate:c=!1,anchorX:p="left",anchorY:f="top",root:x}=t,[w,k]=(0,y.oO)(c),b=(0,s.useMemo)(()=>g(e),[e]),M=c&&!w?[]:b.map(v),T=(0,s.useRef)(!0),S=(0,s.useRef)(b),P=(0,o.h)(()=>new Map),A=(0,s.useRef)(new Set),[E,V]=(0,s.useState)(b),[C,D]=(0,s.useState)(b);(0,a.L)(()=>{T.current=!1,S.current=b;for(let t=0;t{let e=v(t),s=(!c||!!w)&&(b===C||M.includes(e));return(0,n.jsx)(m,{isPresent:s,initial:(!T.current||!!l)&&void 0,custom:i,presenceAffectsLayout:u,mode:d,root:x,onExitComplete:s?void 0:()=>{if(A.current.has(e)||!P.has(e))return;A.current.add(e),P.set(e,!0);let t=!0;P.forEach(e=>{e||(t=!1)}),t&&(null==L||L(),D(S.current),c&&(null==k||k()),h&&h())},anchorX:p,anchorY:f,children:t},e)})})}},9637:function(t,e,i){i.d(e,{oO:function(){return r}});var n=i(2265),s=i(4252);function r(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],e=(0,n.useContext)(s.O);if(null===e)return[!0,null];let{isPresent:i,onExitComplete:r,register:o}=e,a=(0,n.useId)();(0,n.useEffect)(()=>{if(t)return o(a)},[t]);let l=(0,n.useCallback)(()=>t&&r&&r(a),[a,r,t]);return!i&&r?[!1,l]:[!0]}},8881:function(t,e,i){i.d(e,{p:function(){return n}});let n=(0,i(2265).createContext)({})},5750:function(t,e,i){i.d(e,{_:function(){return n}});let n=(0,i(2265).createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"})},4252:function(t,e,i){i.d(e,{O:function(){return n}});let n=(0,i(2265).createContext)(null)},6247:function(t,e,i){let n,s,r;i.d(e,{E:function(){return r2}});let o=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],a=new Set(o),l=(t,e,i)=>i>e?e:i"number"==typeof t,parse:parseFloat,transform:t=>t},u={...h,transform:t=>l(0,1,t)},d={...h,default:1},c=t=>Math.round(1e5*t)/1e5,p=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,m=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,f=(t,e)=>i=>!!("string"==typeof i&&m.test(i)&&i.startsWith(t)||e&&null!=i&&Object.prototype.hasOwnProperty.call(i,e)),y=(t,e,i)=>n=>{if("string"!=typeof n)return n;let[s,r,o,a]=n.match(p);return{[t]:parseFloat(s),[e]:parseFloat(r),[i]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},v=t=>l(0,255,t),g={...h,transform:t=>Math.round(v(t))},x={test:f("rgb","red"),parse:y("red","green","blue"),transform:({red:t,green:e,blue:i,alpha:n=1})=>"rgba("+g.transform(t)+", "+g.transform(e)+", "+g.transform(i)+", "+c(u.transform(n))+")"},w={test:f("#"),parse:function(t){let e="",i="",n="",s="";return t.length>5?(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),i=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,i+=i,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(i,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}},transform:x.transform},k=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),b=k("deg"),M=k("%"),T=k("px"),S=k("vh"),P=k("vw"),A={...M,parse:t=>M.parse(t)/100,transform:t=>M.transform(100*t)},E={test:f("hsl","hue"),parse:y("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:i,alpha:n=1})=>"hsla("+Math.round(t)+", "+M.transform(c(e))+", "+M.transform(c(i))+", "+c(u.transform(n))+")"},V={test:t=>x.test(t)||w.test(t)||E.test(t),parse:t=>x.test(t)?x.parse(t):E.test(t)?E.parse(t):w.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?x.transform(t):E.transform(t),getAnimatableNone:t=>{let e=V.parse(t);return e.alpha=0,V.transform(e)}},C=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,D="number",R="color",L=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function j(t){let e=t.toString(),i=[],n={color:[],number:[],var:[]},s=[],r=0,o=e.replace(L,t=>(V.test(t)?(n.color.push(r),s.push(R),i.push(V.parse(t))):t.startsWith("var(")?(n.var.push(r),s.push("var"),i.push(t)):(n.number.push(r),s.push(D),i.push(parseFloat(t))),++r,"${}")).split("${}");return{values:i,split:o,indexes:n,types:s}}function B({split:t,types:e}){let i=t.length;return n=>{let s="";for(let r=0;r"number"==typeof t?0:V.test(t)?V.getAnimatableNone(t):t,I=(t,e)=>"number"==typeof t?e?.trim().endsWith("/")?t:0:F(t),Z={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(p)?.length||0)+(t.match(C)?.length||0)>0},parse:function(t){return j(t).values},createTransformer:function(t){return B(j(t))},getAnimatableNone:function(t){let e=j(t);return B(e)(e.values.map((t,i)=>I(t,e.split[i])))}},O=new Set(["brightness","contrast","saturate","opacity"]);function z(t){let[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;let[n]=i.match(p)||[];if(!n)return t;let s=i.replace(n,""),r=O.has(e)?1:0;return n!==i&&(r*=100),e+"("+r+s+")"}let U=/\b([a-z-]*)\(.*?\)/gu,W={...Z,getAnimatableNone:t=>{let e=t.match(U);return e?e.map(z).join(" "):t}},N={...Z,getAnimatableNone:t=>{let e=Z.parse(t);return Z.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},$={...h,transform:Math.round},H={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,rotate:b,rotateX:b,rotateY:b,rotateZ:b,scale:d,scaleX:d,scaleY:d,scaleZ:d,skew:b,skewX:b,skewY:b,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:u,originX:A,originY:A,originZ:T,zIndex:$,fillOpacity:u,strokeOpacity:u,numOctaves:$},q={...H,color:V,backgroundColor:V,outlineColor:V,fill:V,stroke:V,borderColor:V,borderTopColor:V,borderRightColor:V,borderBottomColor:V,borderLeftColor:V,filter:W,WebkitFilter:W,mask:N,WebkitMask:N},Y=t=>q[t],X=()=>({translate:0,scale:1,origin:0,originPoint:0}),K=()=>({x:X(),y:X()}),G=()=>({min:0,max:0}),_=()=>({x:G(),y:G()}),J=t=>!!(t&&t.getVelocity),Q=new Set(["width","height","top","left","right","bottom",...o]),tt=t=>e=>e.test(t),te=[h,T,M,b,P,S,{test:t=>"auto"===t,parse:t=>t}],ti=t=>te.find(tt(t));i(257);let tn=()=>{},ts=()=>{},tr=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),to=t=>e=>"string"==typeof e&&e.startsWith(t),ta=to("--"),tl=to("var(--"),th=t=>!!tl(t)&&tu.test(t.split("/*")[0].trim()),tu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function td(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}let tc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,tp=t=>180*t/Math.PI,tm=t=>ty(tp(Math.atan2(t[1],t[0]))),tf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:tm,rotateZ:tm,skewX:t=>tp(Math.atan(t[1])),skewY:t=>tp(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ty=t=>((t%=360)<0&&(t+=360),t),tv=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),tg=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),tx={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tv,scaleY:tg,scale:t=>(tv(t)+tg(t))/2,rotateX:t=>ty(tp(Math.atan2(t[6],t[5]))),rotateY:t=>ty(tp(Math.atan2(-t[2],t[0]))),rotateZ:tm,rotate:tm,skewX:t=>tp(Math.atan(t[4])),skewY:t=>tp(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tw(t){return t.includes("scale")?1:0}function tk(t,e){let i,n;if(!t||"none"===t)return tw(e);let s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(s)i=tx,n=s;else{let e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=tf,n=e}if(!n)return tw(e);let r=i[e],o=n[1].split(",").map(tM);return"function"==typeof r?r(o):o[r]}let tb=(t,e)=>{let{transform:i="none"}=getComputedStyle(t);return tk(i,e)};function tM(t){return parseFloat(t.trim())}let tT=t=>t===h||t===T,tS=new Set(["x","y","z"]),tP=o.filter(t=>!tS.has(t)),tA={width:({x:t},{paddingLeft:e="0",paddingRight:i="0",boxSizing:n})=>{let s=t.max-t.min;return"border-box"===n?s:s-parseFloat(e)-parseFloat(i)},height:({y:t},{paddingTop:e="0",paddingBottom:i="0",boxSizing:n})=>{let s=t.max-t.min;return"border-box"===n?s:s-parseFloat(e)-parseFloat(i)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>tk(e,"x"),y:(t,{transform:e})=>tk(e,"y")};tA.translateX=tA.x,tA.translateY=tA.y;let tE=t=>t,tV={},tC=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],tD={value:null,addProjectionMetrics:null};function tR(t,e){let i=!1,n=!0,s={delta:0,timestamp:0,isProcessing:!1},r=()=>i=!0,o=tC.reduce((t,i)=>(t[i]=function(t,e){let i=new Set,n=new Set,s=!1,r=!1,o=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1},l=0;function h(e){o.has(e)&&(u.schedule(e),t()),l++,e(a)}let u={schedule:(t,e=!1,r=!1)=>{let a=r&&s?i:n;return e&&o.add(t),a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(a=t,s){r=!0;return}s=!0;let o=i;i=n,n=o,i.forEach(h),e&&tD.value&&tD.value.frameloop[e].push(l),l=0,i.clear(),s=!1,r&&(r=!1,u.process(t))}};return u}(r,e?i:void 0),t),{}),{setup:a,read:l,resolveKeyframes:h,preUpdate:u,update:d,preRender:c,render:p,postRender:m}=o,f=()=>{let r=tV.useManualTiming,o=r?s.timestamp:performance.now();i=!1,r||(s.delta=n?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),h.process(s),u.process(s),d.process(s),c.process(s),p.process(s),m.process(s),s.isProcessing=!1,i&&e&&(n=!1,t(f))},y=()=>{i=!0,n=!0,s.isProcessing||t(f)};return{schedule:tC.reduce((t,e)=>{let n=o[e];return t[e]=(t,e=!1,s=!1)=>(i||y(),n.schedule(t,e,s)),t},{}),cancel:t=>{for(let e=0;et.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{let e=function(t){let e=[];return tP.forEach(i=>{let n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(i.startsWith("scale")?1:0))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();let e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tO=!1,tZ=!1,tI.forEach(t=>t.complete(tz)),tI.clear()}function tW(){tI.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tO=!0)})}class tN{constructor(t,e,i,n,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(tI.add(this),tZ||(tZ=!0,tL.read(tW),tL.resolveKeyframes(tU))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;if(null===t[0]){let s=n?.get(),r=t[t.length-1];if(void 0!==s)t[0]=s;else if(i&&e){let n=i.readValue(e,r);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=r),n&&void 0===s&&n.set(t[0])}!function(t){for(let e=1;e/^0[^.\s]+$/u.test(t),tH=new Set([W,N]);function tq(t,e){let i=Y(t);return tH.has(i)||(i=Z),i.getAnimatableNone?i.getAnimatableNone(e):void 0}let tY=new Set(["auto","none","0"]);class tX extends tN{constructor(t,e,i,n,s){super(t,e,i,n,s,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}let tK=t=>1e3*t,tG=t=>t/1e3;function t_(t,e){-1===t.indexOf(e)&&t.push(e)}function tJ(t,e){let i=t.indexOf(e);i>-1&&t.splice(i,1)}class tQ{constructor(){this.subscriptions=[]}add(t){return t_(this.subscriptions,t),()=>tJ(this.subscriptions,t)}notify(t,e,i){let n=this.subscriptions.length;if(n){if(1===n)this.subscriptions[0](t,e,i);else for(let s=0;st.startsWith("--");function t1(t,e,i){t0(e)?t.style.setProperty(e,i):t.style[e]=i}function t2(t){let e;return()=>(void 0===e&&(e=t()),e)}let t5={};function t3(t,e){let i=t2(t);return()=>t5[e]??i()}let t4=t3(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),t9=t=>null!==t;function t6(t,{repeat:e,repeatType:i="loop"},n,s=1){let r=t.filter(t9),o=s<0||e&&"loop"!==i&&e%2==1?0:r.length-1;return o&&void 0!==n?n:r[o]}class t8{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}let t7={layout:0,mainThread:0,waapi:0},et=t=>Array.isArray(t)&&"number"==typeof t[0],ee=t3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),ei=(t,e,i=10)=>{let n="",s=Math.max(Math.round(e/i),2);for(let e=0;e`cubic-bezier(${t}, ${e}, ${i}, ${n})`,es={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:en([0,.65,.55,1]),circOut:en([.55,0,1,.45]),backIn:en([.31,.01,.66,-.59]),backOut:en([.33,1.53,.69,.99])};function er(t){return"function"==typeof t&&"applyToOptions"in t}class eo extends t8{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:e,name:i,keyframes:n,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=!!s,this.allowFlatten=r,this.options=t,ts("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");let l=function({type:t,...e}){return er(t)&&ee()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=function(t,e,i,{delay:n=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},h){let u={[e]:i};l&&(u.offset=l);let d=function t(e,i){if(e)return"function"==typeof e?ee()?ei(e,i):"ease-out":et(e)?en(e):Array.isArray(e)?e.map(e=>t(e,i)||es.easeOut):es[e]}(a,s);Array.isArray(d)&&(u.easing=d),tD.value&&t7.waapi++;let c={delay:n,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};h&&(c.pseudoElement=h);let p=t.animate(u,c);return tD.value&&p.finished.finally(()=>{t7.waapi--}),p}(e,i,n,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let t=t6(n,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(t),t1(e,i,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){return tG(Number(this.animation.effect?.getComputedTiming?.().duration||0))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+tG(t)}get time(){return tG(Number(this.animation.currentTime)||0)}set time(t){let e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=tK(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:i,observe:n}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&t4())?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),i&&(this.animation.rangeEnd=i),tE):n(this)}}let ea=new Set(["opacity","clipPath","filter","transform"]),{schedule:el,cancel:eh}=tR(queueMicrotask,!1);function eu(){n=void 0}let ed={now:()=>(void 0===n&&ed.set(tB.isProcessing||tV.useManualTiming?tB.timestamp:performance.now()),n),set:t=>{n=t,queueMicrotask(eu)}},ec=t=>!isNaN(parseFloat(t)),ep={current:void 0};class em{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{let e=ed.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=ed.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=ec(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new tQ);let i=this.events[t].add(e);return"change"===t?()=>{i(),tL.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ep.current&&ep.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var t;let e=ed.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return t=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*t:0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ef(t,e){return new em(t,e)}let ey=[...te,V,Z],ev=t=>ey.find(tt(t)),eg=new WeakMap;function ex(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ew(t){return"string"==typeof t||Array.isArray(t)}let ek=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eb=["initial",...ek];function eM(t){return ex(t.animate)||eb.some(e=>ew(t[e]))}function eT(t){return!!(eM(t)||t.variants)}let eS={current:null},eP={current:!1},eA="undefined"!=typeof window;function eE(t){let e=[{},{}];return t?.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function eV(t,e,i,n){if("function"==typeof e){let[s,r]=eE(n);e=e(void 0!==i?i:t.custom,s,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){let[s,r]=eE(n);e=e(void 0!==i?i:t.custom,s,r)}return e}let eC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],eD={};class eR{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,skipAnimations:s,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=tN,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let t=ed.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(eP.current||function(){if(eP.current=!0,eA){if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>eS.current=t.matches;t.addEventListener("change",e),e()}else eS.current=!1}}(),this.shouldReduceMotion=eS.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let t in this.projection&&this.projection.unmount(),tj(this.notifyUpdate),tj(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[t].clear();for(let t in this.features){let e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){let i;if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&ea.has(t)&&this.current instanceof HTMLElement){let{factory:i,keyframes:n,times:s,ease:r,duration:o}=e.accelerate,a=new eo({element:this.current,name:t,keyframes:n,times:s,ease:r,duration:tK(o)}),l=i(a);this.valueSubscriptions.set(t,()=>{l(),a.cancel()});return}let n=a.has(t);n&&this.onBindTransform&&this.onBindTransform();let s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&tL.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"undefined"!=typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in eD){let e=eD[t];if(!e)continue;let{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){let e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){let i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);let e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=ef(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(tr(i)||t$(i))?i=parseFloat(i):!ev(i)&&Z.test(e)&&(i=tq(t,e)),this.setBaseTarget(t,J(i)?i.get():i)),J(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){let e;let{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let n=eV(this.props,i,this.presenceContext?.custom);n&&(e=n[t])}if(i&&void 0!==e)return e;let n=this.getBaseTargetFromProps(this.props,t);return void 0===n||J(n)?void 0!==this.initialValues[t]&&void 0===e?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new tQ),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){el.render(this.render)}}class eL extends eR{constructor(){super(...arguments),this.KeyframeResolver=tX}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){let i=t.style;return i?i[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;J(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function ej(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}let eB=(t,e)=>e&&"number"==typeof t?e.transform(t):t,eF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eI=o.length;function eZ(t,e,i){let{style:n,vars:s,transformOrigin:r}=t,l=!1,h=!1;for(let t in e){let i=e[t];if(a.has(t)){l=!0;continue}if(ta(t)){s[t]=i;continue}{let e=eB(i,H[t]);t.startsWith("origin")?(h=!0,r[t]=e):n[t]=e}}if(!e.transform&&(l||i?n.transform=function(t,e,i){let n="",s=!0;for(let r=0;r"string"==typeof t&&"svg"===t.toLowerCase();function eH(t,{style:e,vars:i},n,s){let r;let o=t.style;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,n),i)o.setProperty(r,i[r])}function eq(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}let eY={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!T.test(t))return t;t=parseFloat(t)}let i=eq(t,e.target.x),n=eq(t,e.target.y);return`${i}% ${n}%`}},eX=(t,e,i)=>t+(e-t)*i,eK={borderRadius:{...eY,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:eY,borderTopRightRadius:eY,borderBottomLeftRadius:eY,borderBottomRightRadius:eY,boxShadow:{correct:(t,{treeScale:e,projectionDelta:i})=>{let n=Z.parse(t);if(n.length>5)return t;let s=Z.createTransformer(t),r="number"!=typeof n[0]?1:0,o=i.x.scale*e.x,a=i.y.scale*e.y;n[0+r]/=o,n[1+r]/=a;let l=eX(o,a,.5);return"number"==typeof n[2+r]&&(n[2+r]/=l),"number"==typeof n[3+r]&&(n[3+r]/=l),s(n)}}};function eG(t,{layout:e,layoutId:i}){return a.has(t)||t.startsWith("origin")||(e||void 0!==i)&&(!!eK[t]||"opacity"===t)}function e_(t,e,i){let n=t.style,s=e?.style,r={};if(!n)return r;for(let e in n)(J(n[e])||s&&J(s[e])||eG(e,t)||i?.getValue(e)?.liveStyle!==void 0)&&(r[e]=n[e]);return r}function eJ(t,e,i){let n=e_(t,e,i);for(let i in t)(J(t[i])||J(e[i]))&&(n[-1!==o.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]);return n}class eQ extends eL{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(a.has(e)){let t=Y(e);return t&&t.default||0}return e=eN.has(e)?e:ej(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return eJ(t,e,i)}build(t,e,i){eW(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){!function(t,e,i,n){for(let i in eH(t,e,void 0,n),e.attrs)t.setAttribute(eN.has(i)?i:ej(i),e.attrs[i])}(t,e,0,n)}mount(t){this.isSVGTag=e$(t.tagName),super.mount(t)}}function e0({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function e1(t){return void 0===t||1===t}function e2({scale:t,scaleX:e,scaleY:i}){return!e1(t)||!e1(e)||!e1(i)}function e5(t){return e2(t)||e3(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function e3(t){var e,i;return(e=t.x)&&"0%"!==e||(i=t.y)&&"0%"!==i}function e4(t,e,i,n,s){return void 0!==s&&(t=n+s*(t-n)),n+i*(t-n)+e}function e9(t,e=0,i=1,n,s){t.min=e4(t.min,e,i,n,s),t.max=e4(t.max,e,i,n,s)}function e6(t,{x:e,y:i}){e9(t.x,e.translate,e.scale,e.originPoint),e9(t.y,i.translate,i.scale,i.originPoint)}function e8(t,e){t.min+=e,t.max+=e}function e7(t,e,i,n,s=.5){let r=eX(t.min,t.max,s);e9(t,e,i,r,n)}function it(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function ie(t,e,i){let n=i??t;e7(t.x,it(e.x,n.x),e.scaleX,e.scale,e.originX),e7(t.y,it(e.y,n.y),e.scaleY,e.scale,e.originY)}function ii(t,e){return e0(function(t,e){if(!e)return t;let i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}class is extends eL{constructor(){super(...arguments),this.type="html",this.renderInstance=eH}readValueFromInstance(t,e){if(a.has(e))return this.projection?.isProjecting?tw(e):tb(t,e);{let i=window.getComputedStyle(t),n=(ta(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:e}){return ii(t,e)}build(t,e,i){eZ(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return e_(t,e,i)}}var ir,io=i(2265);let ia=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function il(t){if("string"!=typeof t||t.includes("-"));else if(ia.indexOf(t)>-1||/[A-Z]/u.test(t))return!0;return!1}var ih=i(7437),iu=i(8881);let id=(0,io.createContext)({strict:!1});var ic=i(5750);let ip=(0,io.createContext)({});function im(t){return Array.isArray(t)?t.join(" "):t}let iy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function iv(t,e,i){for(let n in e)J(e[n])||eG(n,i)||(t[n]=e[n])}let ig=()=>({...iy(),attrs:{}}),ix=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function iw(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ix.has(t)}let ik=t=>!iw(t);try{ir=require("@emotion/is-prop-valid").default,"function"==typeof ir&&(ik=t=>t.startsWith("on")?!iw(t):ir(t))}catch{}function ib(t){return J(t)?t.get():t}var iM=i(4252),iT=i(3576);let iS=t=>(e,i)=>{let n=(0,io.useContext)(ip),s=(0,io.useContext)(iM.O),r=()=>(function(t,e,i,n){let{scrapeMotionValuesFromProps:s,createRenderState:r}=t;return{latestValues:function(t,e,i,n){let s={},r=n(t,{});for(let t in r)s[t]=ib(r[t]);let{initial:o,animate:a}=t,l=eM(t),h=eT(t);e&&h&&!l&&!1!==t.inherit&&(void 0===o&&(o=e.initial),void 0===a&&(a=e.animate));let u=!!i&&!1===i.initial,d=(u=u||!1===o)?a:o;if(d&&"boolean"!=typeof d&&!ex(d)){let e=Array.isArray(d)?d:[d];for(let i=0;iiE[e].some(e=>!!t[e])};eD=t,iV=!0}(),eD}let iD=Symbol.for("motionComponentSymbol"),iR="data-"+ej("framerAppearId"),iL=(0,io.createContext)({});function ij(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}var iB=i(2014);function iF(t){var e,i;let{forwardMotionProps:n=!1,type:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;r&&function(t){let e=iC();for(let i in t)e[i]={...e[i],...t[i]};eD=e}(r);let a=s?"svg"===s:il(t),l=a?iA:iP;function h(e,i){let s;let r={...(0,io.useContext)(ic._),...e,layoutId:function(t){let{layoutId:e}=t,i=(0,io.useContext)(iu.p).id;return i&&void 0!==e?i+"-"+e:e}(e)},{isStatic:h}=r,u=function(t){let{initial:e,animate:i}=function(t,e){if(eM(t)){let{initial:e,animate:i}=t;return{initial:!1===e||ew(e)?e:void 0,animate:ew(i)?i:void 0}}return!1!==t.inherit?e:{}}(t,(0,io.useContext)(ip));return(0,io.useMemo)(()=>({initial:e,animate:i}),[im(e),im(i)])}(e),d=l(e,h);if(!h&&"undefined"!=typeof window){(0,io.useContext)(id).strict;let e=function(t){let{drag:e,layout:i}=iC();if(!e&&!i)return{};let n={...e,...i};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==i?void 0:i.isEnabled(t))?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(r);s=e.MeasureLayout,u.visualElement=function(t,e,i,n,s,r){var o,a,l,h;let{visualElement:u}=(0,io.useContext)(ip),d=(0,io.useContext)(id),c=(0,io.useContext)(iM.O),p=(0,io.useContext)(ic._),m=p.reducedMotion,f=p.skipAnimations,y=(0,io.useRef)(null),v=(0,io.useRef)(!1);n=n||d.renderer,!y.current&&n&&(y.current=n(t,{visualState:e,parent:u,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:m,skipAnimations:f,isSVG:r}),v.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));let g=y.current,x=(0,io.useContext)(iL);g&&!g.projection&&s&&("html"===g.type||"svg"===g.type)&&function(t,e,i,n){let{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:h,layoutAnchor:u,layoutCrossfade:d}=e;t.projection=new i(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){if(e)return!1!==e.options.allowProjection?e.projection:t(e.parent)}(t.parent)),t.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!o||a&&ij(a),visualElement:t,animationType:"string"==typeof r?r:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:l,layoutRoot:h,layoutAnchor:u})}(y.current,i,s,x);let w=(0,io.useRef)(!1);(0,io.useInsertionEffect)(()=>{g&&w.current&&g.update(i,c)});let k=i[iR],b=(0,io.useRef)(!!k&&"undefined"!=typeof window&&!(null===(o=(a=window).MotionHandoffIsComplete)||void 0===o?void 0:o.call(a,k))&&(null===(l=(h=window).MotionHasOptimisedAnimation)||void 0===l?void 0:l.call(h,k)));return(0,iB.L)(()=>{v.current=!0,g&&(w.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),b.current&&g.animationState&&g.animationState.animateChanges())}),(0,io.useEffect)(()=>{g&&(!b.current&&g.animationState&&g.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var t,e;null===(t=(e=window).MotionHandoffMarkAsComplete)||void 0===t||t.call(e,k)}),b.current=!1),g.enteringChildren=void 0)}),g}(t,d,r,o,e.ProjectionNode,a)}return(0,ih.jsxs)(ip.Provider,{value:u,children:[s&&u.visualElement?(0,ih.jsx)(s,{visualElement:u.visualElement,...r}):null,function(t,e,i,n,s){let{latestValues:r}=n,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,l=((null!=a?a:il(t))?function(t,e,i,n){let s=(0,io.useMemo)(()=>{let i=ig();return eW(i,e,e$(n),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){let e={};iv(e,t.style,t),s.style={...e,...s.style}}return s}:function(t,e){let i={},n=function(t,e){let i=t.style||{},n={};return iv(n,i,t),Object.assign(n,function(t,e){let{transformTemplate:i}=t;return(0,io.useMemo)(()=>{let t=iy();return eZ(t,e,i),Object.assign({},t.vars,t.style)},[e])}(t,e)),n}(t,e);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===t.drag?"none":"pan-".concat("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=n,i})(e,r,s,t),h=function(t,e,i){let n={};for(let s in t)("values"!==s||"object"!=typeof t.values)&&!J(t[s])&&(ik(s)||!0===i&&iw(s)||!e&&!iw(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}(e,"string"==typeof t,o),u=t!==io.Fragment?{...h,...l,ref:i}:{},{children:d}=e,c=(0,io.useMemo)(()=>J(d)?d.get():d,[d]);return(0,io.createElement)(t,{...u,children:c})}(t,e,function(t,e,i){let n=(0,io.useRef)(i);(0,io.useInsertionEffect)(()=>{n.current=i});let s=(0,io.useRef)(null);return(0,io.useCallback)(i=>{if(i){var r;null===(r=t.onMount)||void 0===r||r.call(t,i)}let o=n.current;if("function"==typeof o){if(i){let t=o(i);"function"==typeof t&&(s.current=t)}else s.current?(s.current(),s.current=null):o(i)}else o&&(o.current=i);e&&(i?e.mount(i):e.unmount())},[e])}(d,u.visualElement,i),d,h,n,a)]})}h.displayName="motion.".concat("string"==typeof t?t:"create(".concat(null!==(i=null!==(e=t.displayName)&&void 0!==e?e:t.name)&&void 0!==i?i:"",")"));let u=(0,io.forwardRef)(h);return u[iD]=t,u}class iI{constructor(t){this.isMounted=!1,this.node=t}update(){}}function iZ(t,e,i){let n=t.getProps();return eV(n,e,void 0!==i?i:n.custom,t)}function iO(t,e){if(t?.inherit&&e){let{inherit:i,...n}=t;return{...e,...n}}return t}function iz(t,e){let i=t?.[e]??t?.default??t;return i!==t?iO(i,t):i}let iU=t=>Array.isArray(t);function iW(t,e){let i=t.getValue("willChange");if(J(i)&&i.add)return i.add(e);if(!i&&tV.WillChange){let i=new tV.WillChange("auto");t.addValue("willChange",i),i.add(e)}}let iN=(t,e)=>i=>e(t(i)),i$=(...t)=>t.reduce(iN);function iH(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function iq(t,e){return i=>i>0?e:t}let iY=(t,e,i)=>{let n=t*t,s=i*(e*e-n)+n;return s<0?0:Math.sqrt(s)},iX=[w,x,E],iK=t=>iX.find(e=>e.test(t));function iG(t){let e=iK(t);if(tn(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let i=e.parse(t);return e===E&&(i=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let s=0,r=0,o=0;if(e/=100){let n=i<.5?i*(1+e):i+e-i*e,a=2*i-n;s=iH(a,n,t+1/3),r=iH(a,n,t),o=iH(a,n,t-1/3)}else s=r=o=i;return{red:Math.round(255*s),green:Math.round(255*r),blue:Math.round(255*o),alpha:n}}(i)),i}let i_=(t,e)=>{let i=iG(t),n=iG(e);if(!i||!n)return iq(t,e);let s={...i};return t=>(s.red=iY(i.red,n.red,t),s.green=iY(i.green,n.green,t),s.blue=iY(i.blue,n.blue,t),s.alpha=eX(i.alpha,n.alpha,t),x.transform(s))},iJ=new Set(["none","hidden"]);function iQ(t,e){return i=>eX(t,e,i)}function i0(t){return"number"==typeof t?iQ:"string"==typeof t?th(t)?iq:V.test(t)?i_:i5:Array.isArray(t)?i1:"object"==typeof t?V.test(t)?i_:i2:iq}function i1(t,e){let i=[...t],n=i.length,s=t.map((t,i)=>i0(t)(t,e[i]));return t=>{for(let e=0;e{for(let e in n)i[e]=n[e](t);return i}}let i5=(t,e)=>{let i=Z.createTransformer(e),n=j(t),s=j(e);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?iJ.has(t)&&!s.values.length||iJ.has(e)&&!n.values.length?iJ.has(t)?i=>i<=0?t:e:i=>i>=1?e:t:i$(i1(function(t,e){let i=[],n={color:0,var:0,number:0};for(let s=0;s{let e=({timestamp:e})=>t(e);return{start:(t=!0)=>tL.update(e,t),stop:()=>tj(e),now:()=>tB.isProcessing?tB.timestamp:ed.now()}};function i9(t){let e=0,i=t.next(e);for(;!i.done&&e<2e4;)e+=50,i=t.next(e);return e>=2e4?1/0:e}let i6={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function i8(t,e){return t*Math.sqrt(1-e*e)}let i7=["duration","bounce"],nt=["stiffness","damping","mass"];function ne(t,e){return e.some(e=>void 0!==t[e])}function ni(t=i6.visualDuration,e=i6.bounce){let i,n,s,r,o,a;let h="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:u,restDelta:d}=h,c=h.keyframes[0],p=h.keyframes[h.keyframes.length-1],m={done:!1,value:c},{stiffness:f,damping:y,mass:v,duration:g,velocity:x,isResolvedFromDuration:w}=function(t){let e={velocity:i6.velocity,stiffness:i6.stiffness,damping:i6.damping,mass:i6.mass,isResolvedFromDuration:!1,...t};if(!ne(t,nt)&&ne(t,i7)){if(e.velocity=0,t.visualDuration){let i=2*Math.PI/(1.2*t.visualDuration),n=i*i,s=2*l(.05,1,1-(t.bounce||0))*Math.sqrt(n);e={...e,mass:i6.mass,stiffness:n,damping:s}}else{let i=function({duration:t=i6.duration,bounce:e=i6.bounce,velocity:i=i6.velocity,mass:n=i6.mass}){let s,r;tn(t<=tK(i6.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=l(i6.minDamping,i6.maxDamping,o),t=l(i6.minDuration,i6.maxDuration,tG(t)),o<1?(s=e=>{let n=e*o,s=n*t;return .001-(n-i)/i8(e,o)*Math.exp(-s)},r=e=>{let n=e*o*t,r=Math.pow(o,2)*Math.pow(e,2)*t,a=i8(Math.pow(e,2),o);return(n*i+i-r)*Math.exp(-n)*(-s(e)+.001>0?-1:1)/a}):(s=e=>-.001+Math.exp(-e*t)*((e-i)*t+1),r=e=>t*t*(i-e)*Math.exp(-e*t));let a=function(t,e,i){let n=i;for(let i=1;i<12;i++)n-=t(n)/e(n);return n}(s,r,5/t);if(t=tK(t),isNaN(a))return{stiffness:i6.stiffness,damping:i6.damping,duration:t};{let e=Math.pow(a,2)*n;return{stiffness:e,damping:2*o*Math.sqrt(n*e),duration:t}}}({...t,velocity:0});(e={...e,...i,mass:i6.mass}).isResolvedFromDuration=!0}}return e}({...h,velocity:-tG(h.velocity||0)}),k=x||0,b=y/(2*Math.sqrt(f*v)),M=p-c,T=tG(Math.sqrt(f/v)),S=5>Math.abs(M);if(u||(u=S?i6.restSpeed.granular:i6.restSpeed.default),d||(d=S?i6.restDelta.granular:i6.restDelta.default),b<1)s=i8(T,b),r=(k+b*T*M)/s,i=t=>p-Math.exp(-b*T*t)*(r*Math.sin(s*t)+M*Math.cos(s*t)),o=b*T*r+M*s,a=b*T*M-r*s,n=t=>Math.exp(-b*T*t)*(o*Math.sin(s*t)+a*Math.cos(s*t));else if(1===b){i=t=>p-Math.exp(-T*t)*(M+(k+T*M)*t);let t=k+T*M;n=e=>Math.exp(-T*e)*(T*t*e-k)}else{let t=T*Math.sqrt(b*b-1);i=e=>{let i=Math.exp(-b*T*e),n=Math.min(t*e,300);return p-i*((k+b*T*M)*Math.sinh(n)+t*M*Math.cosh(n))/t};let e=(k+b*T*M)/t,s=b*T*e-M*t,r=b*T*M-e*t;n=e=>{let i=Math.exp(-b*T*e),n=Math.min(t*e,300);return i*(s*Math.sinh(n)+r*Math.cosh(n))}}let P={calculatedDuration:w&&g||null,velocity:t=>tK(n(t)),next:t=>{if(!w&&b<1){let e=Math.exp(-b*T*t),i=Math.sin(s*t),n=Math.cos(s*t),l=p-e*(r*i+M*n),h=tK(e*(o*i+a*n));return m.done=Math.abs(h)<=u&&Math.abs(p-l)<=d,m.value=m.done?p:l,m}let e=i(t);if(w)m.done=t>=g;else{let i=tK(n(t));m.done=Math.abs(i)<=u&&Math.abs(p-e)<=d}return m.value=m.done?p:e,m},toString:()=>{let t=Math.min(i9(P),2e4),e=ei(e=>P.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return P}function nn(t,e,i){var n,s;let r=Math.max(e-5,0);return n=i-t(r),(s=e-r)?1e3/s*n:0}function ns({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:h=.5,restSpeed:u}){let d,c;let p=t[0],m={done:!1,value:p},f=t=>void 0!==a&&tl,y=t=>void 0===a?l:void 0===l?a:Math.abs(a-t)-v*Math.exp(-t/n),k=t=>x+w(t),b=t=>{let e=w(t),i=k(t);m.done=Math.abs(e)<=h,m.value=m.done?x:i},M=t=>{f(m.value)&&(d=t,c=ni({keyframes:[m.value,y(m.value)],velocity:nn(k,t,m.value),damping:s,stiffness:r,restDelta:h,restSpeed:u}))};return M(0),{calculatedDuration:null,next:t=>{let e=!1;return(c||void 0!==d||(e=!0,b(t),M(t)),void 0!==d&&t>=d)?c.next(t-d):(e||b(t),m)}}}ni.applyToOptions=t=>{let e=function(t,e=100,i){let n=i({...t,keyframes:[0,e]}),s=Math.min(i9(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:tG(s)}}(t,100,ni);return t.ease=e.ease,t.duration=tK(e.duration),t.type="keyframes",t};let nr=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function no(t,e,i,n){if(t===e&&i===n)return tE;let s=e=>(function(t,e,i,n,s){let r,o;let a=0;do(r=nr(o=e+(i-e)/2,n,s)-t)>0?i=o:e=o;while(Math.abs(r)>1e-7&&++a<12);return o})(e,0,1,t,i);return t=>0===t||1===t?t:nr(s(t),e,n)}let na=no(.42,0,1,1),nl=no(0,0,.58,1),nh=no(.42,0,.58,1),nu=t=>Array.isArray(t)&&"number"!=typeof t[0],nd=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,nc=t=>e=>1-t(1-e),np=no(.33,1.53,.69,.99),nm=nc(np),nf=nd(nm),ny=t=>t>=1?1:(t*=2)<1?.5*nm(t):.5*(2-Math.pow(2,-10*(t-1))),nv=t=>1-Math.sin(Math.acos(t)),ng=nc(nv),nx=nd(nv),nw={linear:tE,easeIn:na,easeInOut:nh,easeOut:nl,circIn:nv,circInOut:nx,circOut:ng,backIn:nm,backInOut:nf,backOut:np,anticipate:ny},nk=t=>"string"==typeof t,nb=t=>{if(et(t)){ts(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,i,n,s]=t;return no(e,i,n,s)}return nk(t)?(ts(void 0!==nw[t],`Invalid easing type '${t}'`,"invalid-easing-type"),nw[t]):t},nM=(t,e,i)=>{let n=e-t;return 0===n?1:(i-t)/n};function nT({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){let s=nu(n)?n.map(nb):nb(n),r={done:!1,value:e[0]},o=function(t,e,{clamp:i=!0,ease:n,mixer:s}={}){let r=t.length;if(ts(r===e.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>e[0];if(2===r&&e[0]===e[1])return()=>e[1];let o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=function(t,e,i){let n=[],s=i||tV.mix||i3,r=t.length-1;for(let i=0;i{if(o&&i1)for(;nu(l(t[0],t[r-1],e)):u}((i&&i.length===e.length?i:function(t){let e=[0];return function(t,e){let i=t[t.length-1];for(let n=1;n<=e;n++){let s=nM(0,e,n);t.push(eX(i,1,s))}}(e,t.length-1),e}(e)).map(e=>e*t),e,{ease:Array.isArray(s)?s:e.map(()=>s||nh).splice(0,e.length-1)});return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}let nS={decay:ns,inertia:ns,tween:nT,keyframes:nT,spring:ni};function nP(t){"string"==typeof t.type&&(t.type=nS[t.type])}let nA=t=>t/100;class nE extends t8{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:t}=this.options;t&&t.updatedAt!==ed.now()&&this.tick(ed.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},t7.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){let{options:t}=this;nP(t);let{type:e=nT,repeat:i=0,repeatDelay:n=0,repeatType:s,velocity:r=0}=t,{keyframes:o}=t,a=e||nT;a!==nT&&"number"!=typeof o[0]&&(this.mixKeyframes=i$(nA,i3(o[0],o[1])),o=[0,100]);let l=a({...t,keyframes:o});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=i9(l));let{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){let e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){let i;let{generator:n,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:h}=this;if(null===this.startTime)return n.next(0);let{delay:u=0,keyframes:d,repeat:c,repeatType:p,repeatDelay:m,type:f,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);let g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let w=this.currentTime,k=n;if(c){let t=Math.min(this.currentTime,s)/a,e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,(e=Math.min(e,c+1))%2&&("reverse"===p?(i=1-i,m&&(i-=m/a)):"mirror"===p&&(k=o)),w=l(0,1,i)*a}x?(this.delayState.value=d[0],i=this.delayState):i=k.next(w),r&&!x&&(i.value=r(i.value));let{done:b}=i;x||null===h||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);let M=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return M&&f!==ns&&(i.value=t6(d,this.options,v,this.speed)),y&&y(i.value),M&&this.finish(),i}then(t,e){return this.finished.then(t,e)}get duration(){return tG(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+tG(t)}get time(){return tG(this.currentTime)}set time(t){t=tK(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){let t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let e=this.generator.next(t).value;return nn(t=>this.generator.next(t).value,t,e)}get speed(){return this.playbackSpeed}set speed(t){let e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(ed.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=tG(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=i4,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ed.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,t7.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}let nV={anticipate:ny,backInOut:nf,circInOut:nx};class nC extends eo{constructor(t){"string"==typeof t.ease&&t.ease in nV&&(t.ease=nV[t.ease]),nP(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:e,onUpdate:i,onComplete:n,element:s,...r}=this.options;if(!e)return;if(void 0!==t){e.set(t);return}let o=new nE({...r,autoplay:!1}),a=Math.max(10,ed.now()-this.startTime),h=l(0,10,a-10),u=o.sample(a).value,{name:d}=this.options;s&&d&&t1(s,d,u),e.setWithVelocity(o.sample(Math.max(0,a-h)).value,u,h),o.stop()}}let nD=(t,e)=>"zIndex"!==e&&!!("number"==typeof t||Array.isArray(t)||"string"==typeof t&&(Z.test(t)||"0"===t)&&!t.startsWith("url("));function nR(t){t.duration=0,t.type="keyframes"}let nL=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,nj=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),nB=t2(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class nF extends t8{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r="loop",keyframes:o,name:a,motionValue:l,element:h,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ed.now();let d={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:s,repeatType:r,name:a,motionValue:l,element:h,...u},c=h?.KeyframeResolver||tN;this.keyframeResolver=new c(o,(t,e,i)=>this.onKeyframesResolved(t,e,d,!i),a,l,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,n){let s;this.keyframeResolver=void 0;let{name:r,type:o,velocity:a,delay:l,isHandoff:h,onUpdate:u}=i;this.resolvedAt=ed.now();let d=!0;!function(t,e,i,n){let s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;let r=t[t.length-1],o=nD(s,e),a=nD(r,e);return tn(o===a,`You are trying to animate ${e} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!!o&&!!a&&(function(t){let e=t[0];if(1===t.length)return!0;for(let i=0;i40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},p=d&&!h&&function(t){let{motionValue:e,name:i,repeatDelay:n,repeatType:s,damping:r,type:o,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:h}=e.owner.getProps();return nB()&&i&&(ea.has(i)||nj.has(i)&&function(t){for(let e=0;e{this.notifyFinished()}).catch(tE),this.pendingTimeline&&(this.stopTimeline=s.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=s}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tz=!0,tW(),tU(),tz=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let nI={type:"spring",stiffness:500,damping:25,restSpeed:10},nZ=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),nO={type:"keyframes",duration:.8},nz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nU=(t,{keyframes:e})=>e.length>2?nO:a.has(t)?t.startsWith("scale")?nZ(e[1]):nI:nz,nW=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),nN=(t,e,i,n={},s,r)=>o=>{let a=iz(n,t)||{},l=a.delay||n.delay||0,{elapsed:h=0}=n;h-=tK(l);let u={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};!function(t){for(let e in t)if(!nW.has(e))return!0;return!1}(a)&&Object.assign(u,nU(t,u)),u.duration&&(u.duration=tK(u.duration)),u.repeatDelay&&(u.repeatDelay=tK(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if(!1!==u.type&&(0!==u.duration||u.repeatDelay)||(nR(u),0!==u.delay||(d=!0)),(tV.instantAnimations||tV.skipAnimations||s?.shouldSkipAnimations)&&(d=!0,nR(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!r&&void 0!==e.get()){let t=t6(u.keyframes,a);if(void 0!==t){tL.update(()=>{u.onUpdate(t),u.onComplete()});return}}return a.isSync?new nE(u):new nF(u)};function n$(t,e,{delay:i=0,transitionOverride:n,type:s}={}){let{transition:r,transitionEnd:o,...a}=e,l=t.getDefaultTransition();r=r?iO(r,l):l;let h=r?.reduceMotion;n&&(r=n);let u=[],d=s&&t.animationState&&t.animationState.getState()[s];for(let e in a){let n=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&function({protectedKeys:t,needsAnimating:e},i){let n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}(d,e))continue;let o={delay:i,...iz(r||{},e)},l=n.get();if(void 0!==l&&!n.isAnimating()&&!Array.isArray(s)&&s===l&&!o.velocity){tL.update(()=>n.set(s));continue}let c=!1;if(window.MotionHandoffAnimation){let i=t.props[iR];if(i){let t=window.MotionHandoffAnimation(i,e,tL);null!==t&&(o.startTime=t,c=!0)}}iW(t,e);let p=h??t.shouldReduceMotion;n.start(nN(e,n,s,p&&Q.has(e)?{type:!1}:o,t,c));let m=n.animation;m&&u.push(m)}if(o){let e=()=>tL.update(()=>{o&&function(t,e){let{transitionEnd:i={},transition:n={},...s}=iZ(t,e)||{};for(let e in s={...s,...i}){var r;let i=iU(r=s[e])?r[r.length-1]||0:r;t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,ef(i))}}(t,o)});u.length?Promise.all(u).then(e):e()}return u}function nH(t,e,i,n=0,s=1){let r=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),o=t.size,a=(o-1)*n;return"function"==typeof i?i(r,o):1===s?r*n:a-r*n}function nq(t,e,i={}){let n=iZ(t,e,"exit"===i.type?t.presenceContext?.custom:void 0),{transition:s=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(s=i.transitionOverride);let r=n?()=>Promise.all(n$(t,n,i)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(n=0)=>{let{delayChildren:r=0,staggerChildren:o,staggerDirection:a}=s;return function(t,e,i=0,n=0,s=0,r=1,o){let a=[];for(let l of t.variantChildren)l.notify("AnimationStart",e),a.push(nq(l,e,{...o,delay:i+("function"==typeof n?0:n)+nH(t.variantChildren,l,n,s,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,n,r,o,a,i)}:()=>Promise.resolve(),{when:a}=s;if(!a)return Promise.all([r(),o(i.delay)]);{let[t,e]="beforeChildren"===a?[r,o]:[o,r];return t().then(()=>e())}}let nY=eb.length;function nX(t,e){if(!Array.isArray(e))return!1;let i=e.length;if(i!==t.length)return!1;for(let n=0;nPromise.all(e.map(({animation:e,options:i})=>(function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e))n=Promise.all(e.map(e=>nq(t,e,i)));else if("string"==typeof e)n=nq(t,e,i);else{let s="function"==typeof e?iZ(t,e,i.custom):e;n=Promise.all(n$(t,s,i))}return n.then(()=>{t.notify("AnimationComplete",e)})})(t,e,i))),i=nJ(),n=!0,s=!1,r=e=>(i,n)=>{let s=iZ(t,n,"exit"===e?t.presenceContext?.custom:void 0);if(s){let{transition:t,transitionEnd:e,...n}=s;i={...i,...n,...e}}return i};function o(o){let{props:a}=t,l=function t(e){if(!e)return;if(!e.isControllingVariants){let i=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(i.initial=e.props.initial),i}let i={};for(let t=0;tc&&v,b=!1,M=Array.isArray(y)?y:[y],T=M.reduce(r(m),{});!1===g&&(T={});let{prevResolvedValues:S={}}=f,P={...S,...T},A=e=>{k=!0,u.has(e)&&(b=!0,u.delete(e)),f.needsAnimating[e]=!0;let i=t.getValue(e);i&&(i.liveStyle=!1)};for(let t in P){let e=T[t],i=S[t];if(!d.hasOwnProperty(t))(iU(e)&&iU(i)?nX(e,i):e===i)?void 0!==e&&u.has(t)?A(t):f.protectedKeys[t]=!0:null!=e?A(t):u.add(t)}f.prevProp=y,f.prevResolvedValues=T,f.isActive&&(d={...d,...T}),(n||s)&&t.blockInitialAnimation&&(k=!1);let E=x&&w,V=!E||b;k&&V&&h.push(...M.map(e=>{let i={type:m};if("string"==typeof e&&(n||s)&&!E&&t.manuallyAnimateOnMount&&t.parent){let{parent:n}=t,s=iZ(n,e);if(n.enteringChildren&&s){let{delayChildren:e}=s.transition||{};i.delay=nH(n.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(u.size){let e={};if("boolean"!=typeof a.initial){let i=iZ(t,Array.isArray(a.initial)?a.initial[0]:a.initial);i&&i.transition&&(e.transition=i.transition)}u.forEach(i=>{let n=t.getBaseTarget(i),s=t.getValue(i);s&&(s.liveStyle=!0),e[i]=n??null}),h.push({animation:e})}let m=!!h.length;return n&&(!1===a.initial||a.initial===a.animate)&&!t.manuallyAnimateOnMount&&(m=!1),n=!1,s=!1,m?e(h):Promise.resolve()}return{animateChanges:o,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;let s=o(e);for(let t in i)i[t].protectedKeys={};return s},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=nJ(),s=!0}}}(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();ex(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let n0=0;class n1 extends iI{constructor(){super(...arguments),this.id=n0++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&!1===i){if(this.isExitComplete){let{initial:t,custom:e}=this.node.getProps();if("string"==typeof t){let i=iZ(this.node,t,e);if(i){let{transition:t,transitionEnd:e,...n}=i;for(let t in n)this.node.getValue(t)?.jump(n[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>{this.isExitComplete=!0,e(this.id)})}mount(){let{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}let n2={x:!1,y:!1};function n5(t){return[t("x"),t("y")]}function n3(t){return t.max-t.min}function n4(t,e,i,n=.5){t.origin=n,t.originPoint=eX(e.min,e.max,t.origin),t.scale=n3(i)/n3(e),t.translate=eX(i.min,i.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function n9(t,e,i,n){n4(t.x,e.x,i.x,n?n.originX:void 0),n4(t.y,e.y,i.y,n?n.originY:void 0)}function n6(t,e,i,n=0){let s=n?eX(i.min,i.max,n):i.min;t.min=s+e.min,t.max=t.min+n3(e)}function n8(t,e,i,n=0){let s=n?eX(i.min,i.max,n):i.min;t.min=e.min-s,t.max=t.min+n3(e)}function n7(t,e,i,n){n8(t.x,e.x,i.x,n?.x),n8(t.y,e.y,i.y,n?.y)}let st=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),se=new Set(["INPUT","SELECT","TEXTAREA"]);function si(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}var sn=i(1464);function ss(t){return(0,sn.K)(t)&&"ownerSVGElement"in t}function sr(t,e,i){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let n=document;e&&(n=e.current);let s=i?.[t]??n.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}let so=new WeakMap,sa=(t,e,i)=>(n,s)=>s&&s[0]?s[0][t+"Size"]:ss(n)&&"getBBox"in n?n.getBBox()[e]:n[i],sl=sa("inline","width","offsetWidth"),sh=sa("block","height","offsetHeight");function su({target:t,borderBoxSize:e}){so.get(t)?.forEach(i=>{i(t,{get width(){return sl(t,e)},get height(){return sh(t,e)}})})}function sd(t){t.forEach(su)}let sc=new Set;function sp(t,e){return"function"==typeof t?(sc.add(t),r||(r=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};sc.forEach(e=>e(t))},window.addEventListener("resize",r)),()=>{sc.delete(t),sc.size||"function"!=typeof r||(window.removeEventListener("resize",r),r=void 0)}):function(t,e){s||"undefined"==typeof ResizeObserver||(s=new ResizeObserver(sd));let i=sr(t);return i.forEach(t=>{let i=so.get(t);i||(i=new Set,so.set(t,i)),i.add(e),s?.observe(t)}),()=>{i.forEach(t=>{let i=so.get(t);i?.delete(e),i?.size||s?.unobserve(t)})}}(t,e)}let sm=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function sf(t){return{point:{x:t.pageX,y:t.pageY}}}let sy=t=>e=>sm(e)&&t(e,sf(e));function sv(t,e,i,n){return si(t,e,sy(i),n)}let sg=({current:t})=>t?t.ownerDocument.defaultView:null,sx=(t,e)=>Math.abs(t-e),sw=new Set(["auto","scroll"]);class sk{constructor(t,e,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:s=!1,distanceThreshold:r=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var t,e;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=sb(this.lastRawMoveEventInfo,this.transformPagePoint));let i=sT(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,s=(t=i.offset,e={x:0,y:0},Math.sqrt(sx(t.x,e.x)**2+sx(t.y,e.y)**2)>=this.distanceThreshold);if(!n&&!s)return;let{point:r}=i,{timestamp:o}=tB;this.history.push({...r,timestamp:o});let{onStart:a,onMove:l}=this.handlers;n||(a&&a(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastRawMoveEventInfo=e,this.lastMoveEventInfo=sb(e,this.transformPagePoint),tL.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();let{onEnd:i,onSessionEnd:n,resumeAnimation:s}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&s&&s(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=sT("pointercancel"===t.type?this.lastMoveEventInfo:sb(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,r),n&&n(t,r)},!sm(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=n||window;let a=sb(sf(t),this.transformPagePoint),{point:l}=a,{timestamp:h}=tB;this.history=[{...l,timestamp:h}];let{onSessionStart:u}=e;u&&u(t,sT(a,this.history)),this.removeListeners=i$(sv(this.contextWindow,"pointermove",this.handlePointerMove),sv(this.contextWindow,"pointerup",this.handlePointerUp),sv(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(t){let e=t.parentElement;for(;e;){let t=getComputedStyle(e);(sw.has(t.overflowX)||sw.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){let e=this.scrollPositions.get(t);if(!e)return;let i=t===window,n=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:n.x-e.x,y:n.y-e.y};(0!==s.x||0!==s.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,n),tL.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),tj(this.updatePoint)}}function sb(t,e){return e?{point:e(t.point)}:t}function sM(t,e){return{x:t.x-e.x,y:t.y-e.y}}function sT({point:t},e){return{point:t,delta:sM(t,sS(e)),offset:sM(t,e[0]),velocity:function(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null,s=sS(t);for(;i>=0&&(n=t[i],!(s.timestamp-n.timestamp>tK(.1)));)i--;if(!n)return{x:0,y:0};n===t[0]&&t.length>2&&s.timestamp-n.timestamp>2*tK(.1)&&(n=t[1]);let r=tG(s.timestamp-n.timestamp);if(0===r)return{x:0,y:0};let o={x:(s.x-n.x)/r,y:(s.y-n.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}(e,.1)}}function sS(t){return t[t.length-1]}function sP(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function sA(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min{e&&this.snapToCursor(sf(t).point),this.stopAnimation()},onStart:(t,e)=>{let{drag:i,dragPropagation:n,onDragStart:s}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===i||"y"===i?n2[i]?null:(n2[i]=!0,()=>{n2[i]=!1}):n2.x||n2.y?null:(n2.x=n2.y=!0,()=>{n2.x=n2.y=!1}),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),n5(t=>{let e=this.getAxisMotionValue(t).get()||0;if(M.test(e)){let{projection:i}=this.visualElement;if(i&&i.layout){let n=i.layout.layoutBox[t];if(n){let t=n3(n);e=parseFloat(e)/100*t}}}this.originPoint[t]=e}),s&&tL.update(()=>s(t,e),!1,!0),iW(this.visualElement,"transform");let{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;let{dragPropagation:i,dragDirectionLock:n,onDirectionLock:s,onDrag:r}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:o}=e;if(n&&null===this.currentDirection){this.currentDirection=function(t,e=10){let i=null;return Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x"),i}(o),null!==this.currentDirection&&s&&s(this.currentDirection);return}this.updateAxis("x",e.point,o),this.updateAxis("y",e.point,o),this.visualElement.render(),r&&tL.update(()=>r(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{let{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:i,contextWindow:sg(this.visualElement),element:this.visualElement.current})}stop(t,e){let i=t||this.latestPointerEvent,n=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!n||!i)return;let{velocity:r}=n;this.startAnimation(r);let{onDragEnd:o}=this.getProps();o&&tL.postRender(()=>o(i,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,i){let{drag:n}=this.getProps();if(!i||!sL(t,n,this.currentDirection))return;let s=this.getAxisMotionValue(t),r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=function(t,{min:e,max:i},n){return void 0!==e&&ti&&(t=n?eX(i,t,n.max):Math.min(t,i)),t}(r,this.constraints[t],this.elastic[t])),s.set(r)}resolveConstraints(){let{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&ij(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=function(t,{top:e,left:i,bottom:n,right:s}){return{x:sP(t.x,i,s),y:sP(t.y,e,n)}}(i.layoutBox,t):this.constraints=!1,this.elastic=function(t=.35){return!1===t?t=0:!0===t&&(t=.35),{x:sE(t,"left","right"),y:sE(t,"top","bottom")}}(e),n!==this.constraints&&!ij(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&n5(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){let i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){var t;let{dragConstraints:e,onMeasureDragConstraints:i}=this.getProps();if(!e||!ij(e))return!1;let n=e.current;ts(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:s}=this.visualElement;if(!s||!s.layout)return!1;let r=function(t,e,i){let n=ii(t,i),{scroll:s}=e;return s&&(e8(n.x,s.offset.x),e8(n.y,s.offset.y)),n}(n,s.root,this.visualElement.getTransformPagePoint()),o={x:sA((t=s.layout.layoutBox).x,r.x),y:sA(t.y,r.y)};if(i){let t=i(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=e0(t))}return o}startAnimation(t){let{drag:e,dragMomentum:i,dragElastic:n,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{};return Promise.all(n5(o=>{if(!sL(o,e,this.currentDirection))return;let l=a&&a[o]||{};(!0===r||r===o)&&(l={min:0,max:0});let h={type:"inertia",velocity:i?t[o]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(o,h)})).then(o)}startAxisValueAnimation(t,e){let i=this.getAxisMotionValue(t);return iW(this.visualElement,t),i.start(nN(t,i,0,e,this.visualElement,!1))}stopAnimation(){n5(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps();return i[e]||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){n5(e=>{let{drag:i}=this.getProps();if(!sL(e,i,this.currentDirection))return;let{projection:n}=this.visualElement,s=this.getAxisMotionValue(e);if(n&&n.layout){let{min:i,max:r}=n.layout.layoutBox[e],o=s.get()||0;s.set(t[e]-eX(i,r,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:e}=this.getProps(),{projection:i}=this.visualElement;if(!ij(e)||!i||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};n5(t=>{let e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){let i=e.get();n[t]=function(t,e){let i=.5,n=n3(t),s=n3(e);return s>n?i=nM(e.min,e.max-n,t.min):n>s&&(i=nM(t.min,t.max-s,e.min)),l(0,1,i)}({min:i,max:i},this.constraints[t])}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),n5(e=>{if(!sL(e,t,null))return;let i=this.getAxisMotionValue(e),{min:s,max:r}=this.constraints[e];i.set(eX(s,r,n[e]))}),this.visualElement.render()}addListeners(){let t;if(!this.visualElement.current)return;sC.set(this.visualElement,this);let e=this.visualElement.current,i=sv(e,"pointerdown",t=>{let{drag:i,dragListener:n=!0}=this.getProps(),s=t.target,r=s!==e&&(se.has(s.tagName)||!0===s.isContentEditable);i&&n&&!r&&this.start(t)}),n=()=>{let{dragConstraints:i}=this.getProps();ij(i)&&i.current&&(this.constraints=this.resolveRefConstraints(),t||(t=function(t,e,i){let n=sp(t,sR(i)),s=sp(e,sR(i));return()=>{n(),s()}}(e,i.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,r=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),tL.read(n);let o=si(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(n5(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{o(),i(),r(),a&&a(),t&&t()}}getProps(){let t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:s=!1,dragElastic:r=.35,dragMomentum:o=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:s,dragElastic:r,dragMomentum:o}}}function sR(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function sL(t,e,i){return(!0===e||e===t)&&(null===i||i===t)}class sj extends iI{constructor(t){super(t),this.removeGroupControls=tE,this.removeListeners=tE,this.controls=new sD(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tE}update(){let{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}let sB=t=>(e,i)=>{t&&tL.update(()=>t(e,i),!1,!0)};class sF extends iI{constructor(){super(...arguments),this.removePointerDownListener=tE}onPointerDown(t){this.session=new sk(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sg(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:sB(t),onStart:sB(e),onMove:sB(i),onEnd:(t,e)=>{delete this.session,n&&tL.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=sv(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let sI={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var sZ=i(9637);let sO=!1;class sz extends io.Component{componentDidMount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),i&&i.register&&n&&i.register(s),sO&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sI.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:e,visualElement:i,drag:n,isPresent:s}=this.props,{projection:r}=i;return r&&(r.isPresent=s,t.layoutDependency!==e&&r.setOptions({...r.options,layoutDependency:e}),sO=!0,n||t.layoutDependency!==e||void 0===e||t.isPresent!==s?r.willUpdate():this.safeToRemove(),t.isPresent===s||(s?r.promote():r.relegate()||tL.postRender(()=>{let t=r.getStack();t&&t.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:t,layoutAnchor:e}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=e,i.root.didUpdate(),el.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;sO=!0,n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}}function sU(t){let[e,i]=(0,sZ.oO)(),n=(0,io.useContext)(iu.p);return(0,ih.jsx)(sz,{...t,layoutGroup:n,switchLayoutGroup:(0,io.useContext)(iL),isPresent:e,safeToRemove:i})}let sW=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],sN=sW.length,s$=t=>"string"==typeof t?parseFloat(t):t,sH=t=>"number"==typeof t||T.test(t);function sq(t,e){return void 0!==t[e]?t[e]:t.borderRadius}let sY=sK(0,.5,ng),sX=sK(.5,.95,tE);function sK(t,e,i){return n=>ne?1:i(nM(t,e,n))}function sG(t,e){t.min=e.min,t.max=e.max}function s_(t,e){sG(t.x,e.x),sG(t.y,e.y)}function sJ(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function sQ(t,e,i,n,s){return t-=e,t=n+1/i*(t-n),void 0!==s&&(t=n+1/s*(t-n)),t}function s0(t,e,[i,n,s],r,o){!function(t,e=0,i=1,n=.5,s,r=t,o=t){if(M.test(e)&&(e=parseFloat(e),e=eX(o.min,o.max,e/100)-o.min),"number"!=typeof e)return;let a=eX(r.min,r.max,n);t===r&&(a-=e),t.min=sQ(t.min,e,i,a,s),t.max=sQ(t.max,e,i,a,s)}(t,e[i],e[n],e[s],e.scale,r,o)}let s1=["x","scaleX","originX"],s2=["y","scaleY","originY"];function s5(t,e,i,n){s0(t.x,e,s1,i?i.x:void 0,n?n.x:void 0),s0(t.y,e,s2,i?i.y:void 0,n?n.y:void 0)}function s3(t){return 0===t.translate&&1===t.scale}function s4(t){return s3(t.x)&&s3(t.y)}function s9(t,e){return t.min===e.min&&t.max===e.max}function s6(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function s8(t,e){return s6(t.x,e.x)&&s6(t.y,e.y)}function s7(t){return n3(t.x)/n3(t.y)}function rt(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class re{constructor(){this.members=[]}add(t){t_(this.members,t);for(let e=this.members.length-1;e>=0;e--){let i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;let n=i.instance;n&&!1!==n.isConnected||i.snapshot||(tJ(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(tJ(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){let t=this.members[e];if(!1!==t.isPresent&&t.instance?.isConnected!==!1)return this.promote(t),!0}return!1}promote(t,e){let i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();let{layoutDependency:n}=i.options,{layoutDependency:s}=t.options;(void 0===n||n!==s)&&(t.resumeFrom=i,e&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let ri=(t,e)=>t.depth-e.depth;class rn{constructor(){this.children=[],this.isDirty=!1}add(t){t_(this.children,t),this.isDirty=!0}remove(t){tJ(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ri),this.isDirty=!1,this.children.forEach(t)}}let rs={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},rr=["","X","Y","Z"],ro=0;function ra(t,e,i,n){let{latestValues:s}=e;s[t]&&(i[t]=s[t],e.setStaticValue(t,0),n&&(n[t]=0))}function rl({attachResizeListener:t,defaultParent:e,measureScroll:i,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(t={},i=e?.()){this.id=ro++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,tD.value&&(rs.nodes=rs.calculatedTargetDeltas=rs.calculatedProjections=0),this.nodes.forEach(rd),this.nodes.forEach(rw),this.nodes.forEach(rk),this.nodes.forEach(rc),tD.addProjectionMetrics&&tD.addProjectionMetrics(rs)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;tL.read(()=>{n=window.innerWidth}),t(e,()=>{let t=window.innerWidth;t!==n&&(n=t,this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){let i=ed.now(),n=({timestamp:e})=>{let s=e-i;s>=250&&(tj(n),t(s-250))};return tL.setup(n,!0),()=>tj(n)}(s,0),sI.hasAnimatedSinceResize&&(sI.hasAnimatedSinceResize=!1,this.nodes.forEach(rx)))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||n)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let r=this.options.transition||s.getDefaultTransition()||rA,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!s8(this.targetLayout,n),h=!e&&i;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let e={...iz(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h)}else e||rx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tj(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rb),this.animationId++)}getTransformTemplate(){let{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:i}=e.options;if(!i)return;let n=i.props[iR];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",tL,!(t||i))}let{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&t(s)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),!this.snapshot||n3(this.snapshot.measuredBox.x)||n3(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}}(this.layoutCorrected,this.treeScale,this.path,e),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=_());let{target:a}=t;if(!a){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(sJ(this.prevProjectionDelta.x,this.projectionDelta.x),sJ(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),n9(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===r&&this.treeScale.y===o&&rt(this.projectionDelta.x,this.prevProjectionDelta.x)&&rt(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),tD.value&&rs.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){let t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=K(),this.projectionDelta=K(),this.projectionDeltaWithTransform=K()}setAnimationOrigin(t,e=!1){let i;let n=this.snapshot,s=n?n.latestValues:{},r={...this.latestValues},o=K();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;let a=_(),l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,d=!!(l&&!u&&!0===this.options.crossfade&&!this.path.some(rP));this.animationProgress=0,this.mixTargetDelta=e=>{let n=e/1e3;if(rT(o.x,t.x,n),rT(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var h,c,p,m;n7(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),p=this.relativeTarget,m=this.relativeTargetOrigin,rS(p.x,m.x,a.x,n),rS(p.y,m.y,a.y,n),i&&(h=this.relativeTarget,c=i,s9(h.x,c.x)&&s9(h.y,c.y))&&(this.isProjectionDirty=!1),i||(i=_()),s_(i,this.relativeTarget)}l&&(this.animationValues=r,function(t,e,i,n,s,r){s?(t.opacity=eX(0,i.opacity??1,sY(n)),t.opacityExit=eX(e.opacity??1,0,sX(n))):r&&(t.opacity=eX(e.opacity??1,i.opacity??1,n));for(let s=0;s{sI.hasAnimatedSinceResize=!0,t7.layout++,this.motionValue||(this.motionValue=ef(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(t,e,i){let n=J(t)?t:ef(t);return n.start(nN("",n,e,i)),n.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{t7.layout--},onComplete:()=>{t7.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let t=this.getLead(),{targetWithTransforms:e,target:i,layout:n,latestValues:s}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&rD(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||_();let e=n3(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;let n=n3(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}s_(e,i),ie(e,s),n9(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new re),this.sharedNodes.get(t).add(e);let i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){let t=this.getStack();return!t||t.lead===this}getLead(){let{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){let n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){let t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){let{visualElement:t}=this.options;if(!t)return;let e=!1,{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;let n={};i.z&&ra("z",t,n,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(rm),this.root.sharedNodes.clear()}}}function rh(t){t.updateLayout()}function ru(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:n}=t.layout,{animationType:s}=t.options,r=e.source!==t.layout.source;if("size"===s)n5(t=>{let n=r?e.measuredBox[t]:e.layoutBox[t],s=n3(n);n.min=i[t].min,n.max=n.min+s});else if("x"===s||"y"===s){let t="x"===s?"y":"x";sG(r?e.measuredBox[t]:e.layoutBox[t],i[t])}else rD(s,e.layoutBox,i)&&n5(n=>{let s=r?e.measuredBox[n]:e.layoutBox[n],o=n3(i[n]);s.max=s.min+o,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+o)});let o=K();n9(o,i,e.layoutBox);let a=K();r?n9(a,t.applyTransform(n,!0),e.measuredBox):n9(a,i,e.layoutBox);let l=!s4(o),h=!1;if(!t.resumeFrom){let n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:s,layout:r}=n;if(s&&r){let o=t.options.layoutAnchor||void 0,a=_();n7(a,e.layoutBox,s.layoutBox,o);let l=_();n7(l,i,r.layoutBox,o),s8(a,l)||(h=!0),n.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){let{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function rd(t){tD.value&&rs.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function rc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function rp(t){t.clearSnapshot()}function rm(t){t.clearMeasurements()}function rf(t){t.isLayoutDirty=!0,t.updateLayout()}function ry(t){t.isLayoutDirty=!1}function rv(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function rg(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rx(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rw(t){t.resolveTargetDelta()}function rk(t){t.calcProjection()}function rb(t){t.resetSkewAndRotation()}function rM(t){t.removeLeadSnapshot()}function rT(t,e,i){t.translate=eX(e.translate,0,i),t.scale=eX(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function rS(t,e,i,n){t.min=eX(e.min,i.min,n),t.max=eX(e.max,i.max,n)}function rP(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}let rA={duration:.45,ease:[.4,0,.1,1]},rE=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),rV=rE("applewebkit/")&&!rE("chrome/")?Math.round:tE;function rC(t){t.min=rV(t.min),t.max=rV(t.max)}function rD(t,e,i){return"position"===t||"preserve-aspect"===t&&!(.2>=Math.abs(s7(e)-s7(i)))}function rR(t){return t!==t.root&&t.scroll?.wasRoot}let rL=rl({attachResizeListener:(t,e)=>si(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),rj={current:void 0},rB=rl({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!rj.current){let t=new rL({});t.mount(window),t.setOptions({layoutScroll:!0}),rj.current=t}return rj.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>"fixed"===window.getComputedStyle(t).position});function rF(t,e){let i=sr(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},()=>n.abort()]}function rI(t,e,i){let{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);let s=n["onHover"+i];s&&tL.postRender(()=>s(e,sf(e)))}class rZ extends iI{mount(){let{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){let[n,s,r]=rF(t,i);return n.forEach(t=>{let i,n=!1,r=!1,o=()=>{t.removeEventListener("pointerleave",h)},a=t=>{i&&(i(t),i=void 0),o()},l=t=>{n=!1,window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l),r&&(r=!1,a(t))},h=t=>{if("touch"!==t.pointerType){if(n){r=!0;return}a(t)}};t.addEventListener("pointerenter",n=>{if("touch"===n.pointerType||n2.x||n2.y)return;r=!1;let o=e(t,n);"function"==typeof o&&(i=o,t.addEventListener("pointerleave",h,s))},s),t.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",l,s),window.addEventListener("pointercancel",l,s)},s)}),r}(t,(t,e)=>(rI(this.node,e,"Start"),t=>rI(this.node,t,"End"))))}unmount(){}}class rO extends iI{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=i$(si(this.node.current,"focus",()=>this.onFocus()),si(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}var rz=i(3537);let rU=(t,e)=>!!e&&(t===e||rU(t,e.parentElement)),rW=new WeakSet;function rN(t){return e=>{"Enter"===e.key&&t(e)}}function r$(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}let rH=(t,e)=>{let i=t.currentTarget;if(!i)return;let n=rN(()=>{if(rW.has(i))return;r$(i,"down");let t=rN(()=>{r$(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>r$(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)};function rq(t){return sm(t)&&!(n2.x||n2.y)}let rY=new WeakSet;function rX(t,e,i){let{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);let s=n["onTap"+("End"===i?"":i)];s&&tL.postRender(()=>s(e,sf(e)))}class rK extends iI{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:e,propagate:i}=this.node.props;this.unmount=function(t,e,i={}){let[n,s,r]=rF(t,i),o=t=>{let n=t.currentTarget;if(!rq(t)||rY.has(t))return;rW.add(n),i.stopPropagation&&rY.add(t);let r=e(n,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),rW.has(n)&&rW.delete(n),rq(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,n===window||n===document||i.useGlobalTarget||rU(n,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return n.forEach(t=>{(i.useGlobalTarget?window:t).addEventListener("pointerdown",o,s),(0,rz.R)(t)&&(t.addEventListener("focus",t=>rH(t,s)),st.has(t.tagName)||!0===t.isContentEditable||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r}(t,(t,e)=>(rX(this.node,e,"Start"),(t,{success:e})=>rX(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:i?.tap===!1})}unmount(){}}let rG=new WeakMap,r_=new WeakMap,rJ=t=>{let e=rG.get(t.target);e&&e(t)},rQ=t=>{t.forEach(rJ)},r0={some:0,all:1};class r1 extends iI{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:s}=t,r={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof n?n:r0[n]};this.stopObserver=function(t,e,i){let n=function({root:t,...e}){let i=t||document;r_.has(i)||r_.set(i,{});let n=r_.get(i),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(rQ,{root:t,...e})),n[s]}(e);return rG.set(t,i),n.observe(t),()=>{rG.delete(t),n.unobserve(t)}}(this.node.current,r,t=>{let{isIntersecting:e}=t;if(this.isInView===e||(this.isInView=e,s&&!e&&this.hasEnteredView))return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);let{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),r=e?i:n;r&&r(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}let r2=function(t,e){if("undefined"==typeof Proxy)return iF;let i=new Map,n=(i,n)=>iF(i,n,t,e);return new Proxy((t,e)=>n(t,e),{get:(s,r)=>"create"===r?n:(i.has(r)||i.set(r,iF(r,void 0,t,e)),i.get(r))})}({animation:{Feature:nQ},exit:{Feature:n1},inView:{Feature:r1},tap:{Feature:rK},focus:{Feature:rO},hover:{Feature:rZ},pan:{Feature:sF},drag:{Feature:sj,ProjectionNode:rB,MeasureLayout:sU},layout:{ProjectionNode:rB,MeasureLayout:sU}},(t,e)=>e.isSVG??il(t)?new eQ(e):new is(e,{allowProjection:t!==io.Fragment}))},3576:function(t,e,i){i.d(e,{h:function(){return s}});var n=i(2265);function s(t){let e=(0,n.useRef)(null);return null===e.current&&(e.current=t()),e.current}},2014:function(t,e,i){i.d(e,{L:function(){return s}});var n=i(2265);let s="undefined"!=typeof window?n.useLayoutEffect:n.useEffect},3537:function(t,e,i){i.d(e,{R:function(){return s}});var n=i(1464);function s(t){return(0,n.K)(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}},1464:function(t,e,i){i.d(e,{K:function(){return n}});function n(t){return"object"==typeof t&&null!==t}}}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/chunks/app/page-c4a7a1a690a447a0.js b/d2ypp2/web-console/out/_next/static/chunks/app/page-9ff3a078ec6e16cb.js similarity index 60% rename from d2ypp2/web-console/out/_next/static/chunks/app/page-c4a7a1a690a447a0.js rename to d2ypp2/web-console/out/_next/static/chunks/app/page-9ff3a078ec6e16cb.js index bc93758..72aed23 100644 --- a/d2ypp2/web-console/out/_next/static/chunks/app/page-c4a7a1a690a447a0.js +++ b/d2ypp2/web-console/out/_next/static/chunks/app/page-9ff3a078ec6e16cb.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{2195:function(n,e,u){Promise.resolve().then(u.bind(u,7340))},7340:function(n,e,u){"use strict";u.r(e),u.d(e,{default:function(){return t.Z}});var t=u(6054)}},function(n){n.O(0,[500,166,246,54,971,117,744],function(){return n(n.s=2195)}),_N_E=n.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{2195:function(n,e,u){Promise.resolve().then(u.bind(u,7340))},7340:function(n,e,u){"use strict";u.r(e),u.d(e,{default:function(){return t.Z}});var t=u(6348)}},function(n){n.O(0,[500,568,246,348,971,117,744],function(){return n(n.s=2195)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/chunks/app/youtube-events/page-a4e65759d65834d9.js b/d2ypp2/web-console/out/_next/static/chunks/app/youtube-events/page-a88e6c919a0b42a9.js similarity index 61% rename from d2ypp2/web-console/out/_next/static/chunks/app/youtube-events/page-a4e65759d65834d9.js rename to d2ypp2/web-console/out/_next/static/chunks/app/youtube-events/page-a88e6c919a0b42a9.js index 00173ee..04d3048 100644 --- a/d2ypp2/web-console/out/_next/static/chunks/app/youtube-events/page-a4e65759d65834d9.js +++ b/d2ypp2/web-console/out/_next/static/chunks/app/youtube-events/page-a88e6c919a0b42a9.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[851],{8797:function(n,e,u){Promise.resolve().then(u.bind(u,316))},316:function(n,e,u){"use strict";u.r(e),u.d(e,{default:function(){return t.Z}});var t=u(6054)}},function(n){n.O(0,[500,166,246,54,971,117,744],function(){return n(n.s=8797)}),_N_E=n.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[851],{8797:function(n,e,u){Promise.resolve().then(u.bind(u,316))},316:function(n,e,u){"use strict";u.r(e),u.d(e,{default:function(){return t.Z}});var t=u(6348)}},function(n){n.O(0,[500,568,246,348,971,117,744],function(){return n(n.s=8797)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/css/267c3a238bcbe8cf.css b/d2ypp2/web-console/out/_next/static/css/267c3a238bcbe8cf.css new file mode 100644 index 0000000..518b83c --- /dev/null +++ b/d2ypp2/web-console/out/_next/static/css/267c3a238bcbe8cf.css @@ -0,0 +1,3 @@ +@font-face{font-family:__geistSans_1e4310;src:url(/_next/static/media/4473ecc91f70f139-s.p.woff) format("woff");font-display:swap;font-weight:100 900}@font-face{font-family:__geistSans_Fallback_1e4310;src:local("Arial");ascent-override:85.83%;descent-override:20.52%;line-gap-override:9.33%;size-adjust:107.19%}.__className_1e4310{font-family:__geistSans_1e4310,__geistSans_Fallback_1e4310}.__variable_1e4310{--font-geist-sans:"__geistSans_1e4310","__geistSans_Fallback_1e4310"}@font-face{font-family:__geistMono_c3aa02;src:url(/_next/static/media/463dafcda517f24f-s.p.woff) format("woff");font-display:swap;font-weight:100 900}@font-face{font-family:__geistMono_Fallback_c3aa02;src:local("Arial");ascent-override:69.97%;descent-override:16.73%;line-gap-override:7.61%;size-adjust:131.49%}.__className_c3aa02{font-family:__geistMono_c3aa02,__geistMono_Fallback_c3aa02}.__variable_c3aa02{--font-geist-mono:"__geistMono_c3aa02","__geistMono_Fallback_c3aa02"}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/* +! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com +*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-bottom-0\.5{bottom:-.125rem}.-bottom-10{bottom:-2.5rem}.-left-1\/4{left:-25%}.-right-0\.5{right:-.125rem}.-right-20{right:-5rem}.-right-8{right:-2rem}.-top-0\.5{top:-.125rem}.-top-20{top:-5rem}.-top-8{top:-2rem}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-24{bottom:6rem}.bottom-3{bottom:.75rem}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-1\/2{left:50%}.left-1\/3{left:33.333333%}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.col-span-2{grid-column:span 2/span 2}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.line-clamp-1{-webkit-line-clamp:1}.line-clamp-1,.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.line-clamp-2{-webkit-line-clamp:2}.line-clamp-3{-webkit-line-clamp:3}.line-clamp-3,.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.line-clamp-4{-webkit-line-clamp:4}.line-clamp-6{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-72{height:18rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[168px\]{height:168px}.h-\[248px\]{height:248px}.h-\[30rem\]{height:30rem}.h-\[36rem\]{height:36rem}.h-\[42rem\]{height:42rem}.h-\[min\(72vh\2c 40rem\)\]{height:min(72vh,40rem)}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-64{max-height:16rem}.max-h-72{max-height:18rem}.max-h-\[28rem\]{max-height:28rem}.max-h-\[min\(22rem\2c 42vh\)\]{max-height:min(22rem,42vh)}.max-h-\[min\(24rem\2c 55vh\)\]{max-height:min(24rem,55vh)}.max-h-\[min\(70vh\2c 48rem\)\]{max-height:min(70vh,48rem)}.max-h-\[min\(72vh\2c 680px\)\]{max-height:min(72vh,680px)}.max-h-\[min\(78vh\2c 56rem\)\]{max-height:min(78vh,56rem)}.max-h-\[min\(78vh\2c 720px\)\]{max-height:min(78vh,720px)}.min-h-0{min-height:0}.min-h-16{min-height:4rem}.min-h-24{min-height:6rem}.min-h-56{min-height:14rem}.min-h-\[100px\]{min-height:100px}.min-h-\[12rem\]{min-height:12rem}.min-h-\[14rem\]{min-height:14rem}.min-h-\[160px\]{min-height:160px}.min-h-\[18rem\]{min-height:18rem}.min-h-\[2\.5rem\]{min-height:2.5rem}.min-h-\[2\.75rem\]{min-height:2.75rem}.min-h-\[200px\]{min-height:200px}.min-h-\[22rem\]{min-height:22rem}.min-h-\[24rem\]{min-height:24rem}.min-h-\[280px\]{min-height:280px}.min-h-\[2rem\]{min-height:2rem}.min-h-\[32rem\]{min-height:32rem}.min-h-\[3rem\]{min-height:3rem}.min-h-\[4rem\]{min-height:4rem}.min-h-\[6rem\]{min-height:6rem}.min-h-\[72px\]{min-height:72px}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[36rem\]{width:36rem}.w-\[42rem\]{width:42rem}.w-\[min\(88vw\2c 280px\)\]{width:min(88vw,280px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[12rem\]{min-width:12rem}.min-w-\[1rem\]{min-width:1rem}.min-w-\[3\.75rem\]{min-width:3.75rem}.min-w-\[6rem\]{min-width:6rem}.min-w-\[7rem\]{min-width:7rem}.min-w-\[9rem\]{min-width:9rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[min\(92vw\2c 28rem\)\]{max-width:min(92vw,28rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-center{transform-origin:center}.-translate-x-1\/2{--tw-translate-x:-50%}.-rotate-90,.-translate-x-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-crosshair{cursor:crosshair}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-2{column-gap:.5rem}.gap-y-0\.5{row-gap:.125rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-white\/\[0\.06\]>:not([hidden])~:not([hidden]){border-color:hsla(0,0%,100%,.06)}.self-start{align-self:flex-start}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[1\.35rem\]{border-radius:1.35rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-xl{border-bottom-right-radius:.75rem;border-bottom-left-radius:.75rem}.border{border-width:1px}.border-\[10px\]{border-width:10px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-amber-400\/20{border-color:rgba(251,191,36,.2)}.border-amber-400\/50{border-color:rgba(251,191,36,.5)}.border-amber-500\/15{border-color:rgba(245,158,11,.15)}.border-amber-500\/20{border-color:rgba(245,158,11,.2)}.border-amber-500\/25{border-color:rgba(245,158,11,.25)}.border-amber-500\/30{border-color:rgba(245,158,11,.3)}.border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.border-cyan-200\/70{border-color:rgba(165,243,252,.7)}.border-cyan-200\/90{border-color:rgba(165,243,252,.9)}.border-cyan-400\/15{border-color:rgba(34,211,238,.15)}.border-cyan-400\/20{border-color:rgba(34,211,238,.2)}.border-cyan-400\/50{border-color:rgba(34,211,238,.5)}.border-cyan-500\/15{border-color:rgba(6,182,212,.15)}.border-cyan-500\/20{border-color:rgba(6,182,212,.2)}.border-cyan-500\/25{border-color:rgba(6,182,212,.25)}.border-cyan-500\/30{border-color:rgba(6,182,212,.3)}.border-cyan-500\/40{border-color:rgba(6,182,212,.4)}.border-cyan-500\/50{border-color:rgba(6,182,212,.5)}.border-emerald-400\/30{border-color:rgba(52,211,153,.3)}.border-emerald-500\/15{border-color:rgba(16,185,129,.15)}.border-emerald-500\/20{border-color:rgba(16,185,129,.2)}.border-emerald-500\/25{border-color:rgba(16,185,129,.25)}.border-emerald-500\/30{border-color:rgba(16,185,129,.3)}.border-emerald-500\/50{border-color:rgba(16,185,129,.5)}.border-fuchsia-200\/80{border-color:rgba(245,208,254,.8)}.border-fuchsia-400\/20{border-color:rgba(232,121,249,.2)}.border-fuchsia-400\/30{border-color:rgba(232,121,249,.3)}.border-fuchsia-500\/20{border-color:rgba(217,70,239,.2)}.border-fuchsia-500\/30{border-color:rgba(217,70,239,.3)}.border-indigo-400\/50{border-color:rgba(129,140,248,.5)}.border-rose-500\/15{border-color:rgba(244,63,94,.15)}.border-rose-500\/20{border-color:rgba(244,63,94,.2)}.border-rose-500\/25{border-color:rgba(244,63,94,.25)}.border-rose-500\/30{border-color:rgba(244,63,94,.3)}.border-sky-400\/20{border-color:rgba(56,189,248,.2)}.border-sky-500\/20{border-color:rgba(14,165,233,.2)}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.border-slate-200\/80{border-color:rgba(226,232,240,.8)}.border-slate-200\/90{border-color:rgba(226,232,240,.9)}.border-slate-500\/30{border-color:rgba(100,116,139,.3)}.border-slate-700\/30{border-color:rgba(51,65,85,.3)}.border-violet-200\/70{border-color:rgba(221,214,254,.7)}.border-violet-200\/80{border-color:rgba(221,214,254,.8)}.border-violet-200\/90{border-color:rgba(221,214,254,.9)}.border-violet-500\/15{border-color:rgba(139,92,246,.15)}.border-violet-500\/20{border-color:rgba(139,92,246,.2)}.border-violet-500\/25{border-color:rgba(139,92,246,.25)}.border-violet-500\/30{border-color:rgba(139,92,246,.3)}.border-violet-500\/35{border-color:rgba(139,92,246,.35)}.border-violet-500\/45{border-color:rgba(139,92,246,.45)}.border-violet-500\/50{border-color:rgba(139,92,246,.5)}.border-white\/10{border-color:hsla(0,0%,100%,.1)}.border-white\/15{border-color:hsla(0,0%,100%,.15)}.border-white\/20{border-color:hsla(0,0%,100%,.2)}.border-white\/5{border-color:hsla(0,0%,100%,.05)}.border-white\/\[0\.04\]{border-color:hsla(0,0%,100%,.04)}.border-white\/\[0\.05\]{border-color:hsla(0,0%,100%,.05)}.border-white\/\[0\.06\]{border-color:hsla(0,0%,100%,.06)}.border-white\/\[0\.07\]{border-color:hsla(0,0%,100%,.07)}.border-white\/\[0\.08\]{border-color:hsla(0,0%,100%,.08)}.border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.bg-\[\#050508\]{--tw-bg-opacity:1;background-color:rgb(5 5 8/var(--tw-bg-opacity,1))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-amber-500\/10{background-color:rgba(245,158,11,.1)}.bg-amber-500\/15{background-color:rgba(245,158,11,.15)}.bg-amber-500\/20{background-color:rgba(245,158,11,.2)}.bg-amber-500\/5{background-color:rgba(245,158,11,.05)}.bg-amber-500\/\[0\.06\]{background-color:rgba(245,158,11,.06)}.bg-amber-500\/\[0\.08\]{background-color:rgba(245,158,11,.08)}.bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/10{background-color:rgba(0,0,0,.1)}.bg-black\/20{background-color:rgba(0,0,0,.2)}.bg-black\/25{background-color:rgba(0,0,0,.25)}.bg-black\/30{background-color:rgba(0,0,0,.3)}.bg-black\/35{background-color:rgba(0,0,0,.35)}.bg-black\/40{background-color:rgba(0,0,0,.4)}.bg-black\/45{background-color:rgba(0,0,0,.45)}.bg-black\/5{background-color:rgba(0,0,0,.05)}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-black\/55{background-color:rgba(0,0,0,.55)}.bg-black\/60{background-color:rgba(0,0,0,.6)}.bg-black\/75{background-color:rgba(0,0,0,.75)}.bg-black\/80{background-color:rgba(0,0,0,.8)}.bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-cyan-400\/10{background-color:rgba(34,211,238,.1)}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.bg-cyan-500\/10{background-color:rgba(6,182,212,.1)}.bg-cyan-500\/15{background-color:rgba(6,182,212,.15)}.bg-cyan-500\/20{background-color:rgba(6,182,212,.2)}.bg-cyan-500\/25{background-color:rgba(6,182,212,.25)}.bg-cyan-500\/30{background-color:rgba(6,182,212,.3)}.bg-cyan-500\/90{background-color:rgba(6,182,212,.9)}.bg-cyan-500\/\[0\.05\]{background-color:rgba(6,182,212,.05)}.bg-cyan-500\/\[0\.06\]{background-color:rgba(6,182,212,.06)}.bg-cyan-500\/\[0\.08\]{background-color:rgba(6,182,212,.08)}.bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.bg-cyan-600\/80{background-color:rgba(8,145,178,.8)}.bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-500\/10{background-color:rgba(16,185,129,.1)}.bg-emerald-500\/15{background-color:rgba(16,185,129,.15)}.bg-emerald-500\/20{background-color:rgba(16,185,129,.2)}.bg-emerald-500\/90{background-color:rgba(16,185,129,.9)}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.bg-fuchsia-500\/10{background-color:rgba(217,70,239,.1)}.bg-fuchsia-500\/15{background-color:rgba(217,70,239,.15)}.bg-fuchsia-500\/20{background-color:rgba(217,70,239,.2)}.bg-indigo-500\/15{background-color:rgba(99,102,241,.15)}.bg-rose-400{--tw-bg-opacity:1;background-color:rgb(251 113 133/var(--tw-bg-opacity,1))}.bg-rose-500\/10{background-color:rgba(244,63,94,.1)}.bg-rose-500\/15{background-color:rgba(244,63,94,.15)}.bg-rose-500\/20{background-color:rgba(244,63,94,.2)}.bg-rose-500\/\[0\.10\]{background-color:rgba(244,63,94,.1)}.bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.bg-rose-950\/20{background-color:rgba(76,5,25,.2)}.bg-rose-950\/25{background-color:rgba(76,5,25,.25)}.bg-sky-500\/10{background-color:rgba(14,165,233,.1)}.bg-sky-500\/15{background-color:rgba(14,165,233,.15)}.bg-sky-500\/25{background-color:rgba(14,165,233,.25)}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-slate-200\/70{background-color:rgba(226,232,240,.7)}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.bg-slate-50\/80{background-color:rgba(248,250,252,.8)}.bg-slate-500\/10{background-color:rgba(100,116,139,.1)}.bg-slate-500\/15{background-color:rgba(100,116,139,.15)}.bg-slate-800\/50{background-color:rgba(30,41,59,.5)}.bg-slate-950\/30{background-color:rgba(2,6,23,.3)}.bg-slate-950\/50{background-color:rgba(2,6,23,.5)}.bg-slate-950\/60{background-color:rgba(2,6,23,.6)}.bg-slate-950\/80{background-color:rgba(2,6,23,.8)}.bg-slate-950\/95{background-color:rgba(2,6,23,.95)}.bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-violet-100\/90{background-color:rgba(237,233,254,.9)}.bg-violet-400\/15{background-color:rgba(167,139,250,.15)}.bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.bg-violet-500\/10{background-color:rgba(139,92,246,.1)}.bg-violet-500\/15{background-color:rgba(139,92,246,.15)}.bg-violet-500\/20{background-color:rgba(139,92,246,.2)}.bg-violet-500\/25{background-color:rgba(139,92,246,.25)}.bg-violet-500\/\[0\.06\]{background-color:rgba(139,92,246,.06)}.bg-violet-500\/\[0\.1\]{background-color:rgba(139,92,246,.1)}.bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.bg-violet-600\/20{background-color:rgba(124,58,237,.2)}.bg-violet-600\/70{background-color:rgba(124,58,237,.7)}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/10{background-color:hsla(0,0%,100%,.1)}.bg-white\/5{background-color:hsla(0,0%,100%,.05)}.bg-white\/70{background-color:hsla(0,0%,100%,.7)}.bg-white\/75{background-color:hsla(0,0%,100%,.75)}.bg-white\/80{background-color:hsla(0,0%,100%,.8)}.bg-white\/85{background-color:hsla(0,0%,100%,.85)}.bg-white\/90{background-color:hsla(0,0%,100%,.9)}.bg-white\/\[0\.035\]{background-color:hsla(0,0%,100%,.035)}.bg-white\/\[0\.03\]{background-color:hsla(0,0%,100%,.03)}.bg-white\/\[0\.04\]{background-color:hsla(0,0%,100%,.04)}.bg-white\/\[0\.05\]{background-color:hsla(0,0%,100%,.05)}.bg-white\/\[0\.06\]{background-color:hsla(0,0%,100%,.06)}.bg-white\/\[0\.08\]{background-color:hsla(0,0%,100%,.08)}.bg-zinc-500\/15{background-color:hsla(240,4%,46%,.15)}.bg-zinc-600\/20{background-color:rgba(82,82,91,.2)}.bg-zinc-600\/30{background-color:rgba(82,82,91,.3)}.bg-zinc-700\/40{background-color:rgba(63,63,70,.4)}.bg-zinc-700\/90{background-color:rgba(63,63,70,.9)}.bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.bg-zinc-950\/35{background-color:rgba(9,9,11,.35)}.bg-zinc-950\/40{background-color:rgba(9,9,11,.4)}.bg-zinc-950\/50{background-color:rgba(9,9,11,.5)}.bg-zinc-950\/55{background-color:rgba(9,9,11,.55)}.bg-zinc-950\/60{background-color:rgba(9,9,11,.6)}.bg-zinc-950\/70{background-color:rgba(9,9,11,.7)}.bg-zinc-950\/80{background-color:rgba(9,9,11,.8)}.bg-zinc-950\/90{background-color:rgba(9,9,11,.9)}.bg-zinc-950\/95{background-color:rgba(9,9,11,.95)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from:#fbbf24 var(--tw-gradient-from-position);--tw-gradient-to:rgba(251,191,36,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-50\/90{--tw-gradient-from:rgba(255,251,235,.9) var(--tw-gradient-from-position);--tw-gradient-to:rgba(255,251,235,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/20{--tw-gradient-from:rgba(245,158,11,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/35{--tw-gradient-from:rgba(245,158,11,.35) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/\[0\.07\]{--tw-gradient-from:rgba(245,158,11,.07) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/\[0\.12\]{--tw-gradient-from:rgba(245,158,11,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-400{--tw-gradient-from:#22d3ee var(--tw-gradient-from-position);--tw-gradient-to:rgba(34,211,238,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/20{--tw-gradient-from:rgba(6,182,212,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/35{--tw-gradient-from:rgba(6,182,212,.35) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.08\]{--tw-gradient-from:rgba(6,182,212,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.14\]{--tw-gradient-from:rgba(6,182,212,.14) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.1\]{--tw-gradient-from:rgba(6,182,212,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-400{--tw-gradient-from:#34d399 var(--tw-gradient-from-position);--tw-gradient-to:rgba(52,211,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-400\/30{--tw-gradient-from:rgba(52,211,153,.3) var(--tw-gradient-from-position);--tw-gradient-to:rgba(52,211,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/20{--tw-gradient-from:rgba(16,185,129,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.07\]{--tw-gradient-from:rgba(16,185,129,.07) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.08\]{--tw-gradient-from:rgba(16,185,129,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.12\]{--tw-gradient-from:rgba(16,185,129,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-50\/90{--tw-gradient-from:rgba(253,244,255,.9) var(--tw-gradient-from-position);--tw-gradient-to:rgba(253,244,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-500\/10{--tw-gradient-from:rgba(217,70,239,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(217,70,239,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-500\/20{--tw-gradient-from:rgba(217,70,239,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(217,70,239,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-950\/40{--tw-gradient-from:rgba(74,4,78,.4) var(--tw-gradient-from-position);--tw-gradient-to:rgba(74,4,78,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-indigo-500\/20{--tw-gradient-from:rgba(99,102,241,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(99,102,241,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-pink-500\/25{--tw-gradient-from:rgba(236,72,153,.25) var(--tw-gradient-from-position);--tw-gradient-to:rgba(236,72,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-500\/30{--tw-gradient-from:rgba(239,68,68,.3) var(--tw-gradient-from-position);--tw-gradient-to:rgba(239,68,68,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-rose-500\/20{--tw-gradient-from:rgba(244,63,94,.2) var(--tw-gradient-from-position);--tw-gradient-to:rgba(244,63,94,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-sky-500\/\[0\.08\]{--tw-gradient-from:rgba(14,165,233,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(14,165,233,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-50{--tw-gradient-from:#f5f3ff var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,243,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500{--tw-gradient-from:#8b5cf6 var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/10{--tw-gradient-from:rgba(139,92,246,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/\[0\.08\]{--tw-gradient-from:rgba(139,92,246,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/\[0\.12\]{--tw-gradient-from:rgba(139,92,246,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-600\/10{--tw-gradient-from:rgba(124,58,237,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(124,58,237,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-white\/\[0\.05\]{--tw-gradient-from:hsla(0,0%,100%,.05) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-white\/\[0\.06\]{--tw-gradient-from:hsla(0,0%,100%,.06) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-zinc-950\/95{--tw-gradient-from:rgba(9,9,11,.95) var(--tw-gradient-from-position);--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-black\/25{--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(0,0,0,.25) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-white{--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#fff var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/40{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.4) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/50{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.5) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/60{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.6) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/80{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.8) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/90{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.9) var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-black\/40{--tw-gradient-to:rgba(0,0,0,.4) var(--tw-gradient-to-position)}.to-blue-500{--tw-gradient-to:#3b82f6 var(--tw-gradient-to-position)}.to-cyan-400{--tw-gradient-to:#22d3ee var(--tw-gradient-to-position)}.to-cyan-50{--tw-gradient-to:#ecfeff var(--tw-gradient-to-position)}.to-cyan-50\/70{--tw-gradient-to:rgba(236,254,255,.7) var(--tw-gradient-to-position)}.to-cyan-500\/10{--tw-gradient-to:rgba(6,182,212,.1) var(--tw-gradient-to-position)}.to-cyan-500\/5{--tw-gradient-to:rgba(6,182,212,.05) var(--tw-gradient-to-position)}.to-cyan-500\/\[0\.06\]{--tw-gradient-to:rgba(6,182,212,.06) var(--tw-gradient-to-position)}.to-cyan-950\/20{--tw-gradient-to:rgba(8,51,68,.2) var(--tw-gradient-to-position)}.to-emerald-500\/\[0\.05\]{--tw-gradient-to:rgba(16,185,129,.05) var(--tw-gradient-to-position)}.to-fuchsia-50\/80{--tw-gradient-to:rgba(253,244,255,.8) var(--tw-gradient-to-position)}.to-fuchsia-500{--tw-gradient-to:#d946ef var(--tw-gradient-to-position)}.to-fuchsia-500\/10{--tw-gradient-to:rgba(217,70,239,.1) var(--tw-gradient-to-position)}.to-fuchsia-500\/5{--tw-gradient-to:rgba(217,70,239,.05) var(--tw-gradient-to-position)}.to-fuchsia-600\/25{--tw-gradient-to:rgba(192,38,211,.25) var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to:#f97316 var(--tw-gradient-to-position)}.to-orange-500\/10{--tw-gradient-to:rgba(249,115,22,.1) var(--tw-gradient-to-position)}.to-pink-500\/10{--tw-gradient-to:rgba(236,72,153,.1) var(--tw-gradient-to-position)}.to-sky-500\/10{--tw-gradient-to:rgba(14,165,233,.1) var(--tw-gradient-to-position)}.to-slate-50{--tw-gradient-to:#f8fafc var(--tw-gradient-to-position)}.to-teal-500{--tw-gradient-to:#14b8a6 var(--tw-gradient-to-position)}.to-teal-500\/10{--tw-gradient-to:rgba(20,184,166,.1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.to-violet-500\/10{--tw-gradient-to:rgba(139,92,246,.1) var(--tw-gradient-to-position)}.to-violet-500\/25{--tw-gradient-to:rgba(139,92,246,.25) var(--tw-gradient-to-position)}.to-violet-500\/\[0\.06\]{--tw-gradient-to:rgba(139,92,246,.06) var(--tw-gradient-to-position)}.to-violet-500\/\[0\.08\]{--tw-gradient-to:rgba(139,92,246,.08) var(--tw-gradient-to-position)}.to-violet-600\/25{--tw-gradient-to:rgba(124,58,237,.25) var(--tw-gradient-to-position)}.to-violet-600\/30{--tw-gradient-to:rgba(124,58,237,.3) var(--tw-gradient-to-position)}.to-zinc-900\/90{--tw-gradient-to:rgba(24,24,27,.9) var(--tw-gradient-to-position)}.to-zinc-950\/80{--tw-gradient-to:rgba(9,9,11,.8) var(--tw-gradient-to-position)}.fill-zinc-400{fill:#a1a1aa}.stroke-amber-400{stroke:#fbbf24}.stroke-cyan-400{stroke:#22d3ee}.stroke-rose-400{stroke:#fb7185}.stroke-white\/10{stroke:hsla(0,0%,100%,.1)}.object-contain{object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-16{padding-bottom:4rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-5{padding-left:1.25rem}.pr-1{padding-right:.25rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.22em\]{letter-spacing:.22em}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[color\:var\(--text\)\]{color:var(--text)}.text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.text-amber-100\/80{color:hsla(48,96%,89%,.8)}.text-amber-100\/85{color:hsla(48,96%,89%,.85)}.text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.text-amber-200\/80{color:hsla(48,97%,77%,.8)}.text-amber-200\/85{color:hsla(48,97%,77%,.85)}.text-amber-200\/90{color:hsla(48,97%,77%,.9)}.text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.text-amber-300\/80{color:rgba(252,211,77,.8)}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-amber-400\/95{color:rgba(251,191,36,.95)}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.text-cyan-100\/75{color:rgba(207,250,254,.75)}.text-cyan-100\/90{color:rgba(207,250,254,.9)}.text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.text-cyan-200\/90{color:rgba(165,243,252,.9)}.text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.text-cyan-300\/70{color:rgba(103,232,249,.7)}.text-cyan-300\/80{color:rgba(103,232,249,.8)}.text-cyan-300\/90{color:rgba(103,232,249,.9)}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.text-cyan-400\/90{color:rgba(34,211,238,.9)}.text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.text-emerald-100\/95{color:rgba(209,250,229,.95)}.text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.text-emerald-200\/90{color:rgba(167,243,208,.9)}.text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.text-emerald-300\/90{color:rgba(110,231,183,.9)}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-emerald-400\/80{color:rgba(52,211,153,.8)}.text-emerald-400\/90{color:rgba(52,211,153,.9)}.text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.text-fuchsia-200\/80{color:rgba(245,208,254,.8)}.text-fuchsia-300{--tw-text-opacity:1;color:rgb(240 171 252/var(--tw-text-opacity,1))}.text-fuchsia-300\/70{color:rgba(240,171,252,.7)}.text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.text-rose-100\/95{color:rgba(255,228,230,.95)}.text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.text-rose-400\/90{color:rgba(251,113,133,.9)}.text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.text-sky-100\/80{color:rgba(224,242,254,.8)}.text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-300\/90{color:rgba(203,213,225,.9)}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.text-violet-300\/80{color:rgba(196,181,253,.8)}.text-violet-300\/90{color:rgba(196,181,253,.9)}.text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.text-violet-400\/90{color:rgba(167,139,250,.9)}.text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\/70{color:hsla(0,0%,100%,.7)}.text-white\/80{color:hsla(0,0%,100%,.8)}.text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.text-zinc-200\/90{color:hsla(240,6%,90%,.9)}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-violet-500{accent-color:#8b5cf6}.opacity-35{opacity:.35}.opacity-40{opacity:.4}.opacity-45{opacity:.45}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.opacity-\[0\.06\]{opacity:.06}.opacity-\[0\.22\]{opacity:.22}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-2xl,.shadow-inner{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,.05);--tw-shadow-colored:inset 0 2px 4px 0 var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-black\/20{--tw-shadow-color:rgba(0,0,0,.2);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/30{--tw-shadow-color:rgba(0,0,0,.3);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/50{--tw-shadow-color:rgba(0,0,0,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/80{--tw-shadow-color:rgba(0,0,0,.8);--tw-shadow:var(--tw-shadow-colored)}.shadow-cyan-100\/50{--tw-shadow-color:rgba(207,250,254,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-cyan-900\/10{--tw-shadow-color:rgba(22,78,99,.1);--tw-shadow:var(--tw-shadow-colored)}.shadow-emerald-900\/20{--tw-shadow-color:rgba(6,78,59,.2);--tw-shadow:var(--tw-shadow-colored)}.shadow-slate-200\/40{--tw-shadow-color:rgba(226,232,240,.4);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-200\/50{--tw-shadow-color:rgba(221,214,254,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-500\/25{--tw-shadow-color:rgba(139,92,246,.25);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-900\/10{--tw-shadow-color:rgba(76,29,149,.1);--tw-shadow:var(--tw-shadow-colored)}.shadow-white\/5{--tw-shadow-color:hsla(0,0%,100%,.05);--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-amber-400\/25{--tw-ring-color:rgba(251,191,36,.25)}.ring-amber-400\/30{--tw-ring-color:rgba(251,191,36,.3)}.ring-amber-500\/20{--tw-ring-color:rgba(245,158,11,.2)}.ring-amber-500\/25{--tw-ring-color:rgba(245,158,11,.25)}.ring-amber-500\/30{--tw-ring-color:rgba(245,158,11,.3)}.ring-amber-500\/35{--tw-ring-color:rgba(245,158,11,.35)}.ring-cyan-100{--tw-ring-opacity:1;--tw-ring-color:rgb(207 250 254/var(--tw-ring-opacity,1))}.ring-cyan-200{--tw-ring-opacity:1;--tw-ring-color:rgb(165 243 252/var(--tw-ring-opacity,1))}.ring-cyan-400\/20{--tw-ring-color:rgba(34,211,238,.2)}.ring-cyan-400\/25{--tw-ring-color:rgba(34,211,238,.25)}.ring-cyan-400\/30{--tw-ring-color:rgba(34,211,238,.3)}.ring-cyan-400\/35{--tw-ring-color:rgba(34,211,238,.35)}.ring-cyan-500\/10{--tw-ring-color:rgba(6,182,212,.1)}.ring-cyan-500\/20{--tw-ring-color:rgba(6,182,212,.2)}.ring-cyan-500\/25{--tw-ring-color:rgba(6,182,212,.25)}.ring-cyan-500\/30{--tw-ring-color:rgba(6,182,212,.3)}.ring-cyan-500\/35{--tw-ring-color:rgba(6,182,212,.35)}.ring-emerald-200{--tw-ring-opacity:1;--tw-ring-color:rgb(167 243 208/var(--tw-ring-opacity,1))}.ring-emerald-400\/25{--tw-ring-color:rgba(52,211,153,.25)}.ring-emerald-400\/30{--tw-ring-color:rgba(52,211,153,.3)}.ring-emerald-500\/20{--tw-ring-color:rgba(16,185,129,.2)}.ring-emerald-500\/25{--tw-ring-color:rgba(16,185,129,.25)}.ring-emerald-500\/30{--tw-ring-color:rgba(16,185,129,.3)}.ring-fuchsia-500\/25{--tw-ring-color:rgba(217,70,239,.25)}.ring-fuchsia-500\/35{--tw-ring-color:rgba(217,70,239,.35)}.ring-indigo-400\/30{--tw-ring-color:rgba(129,140,248,.3)}.ring-indigo-500\/25{--tw-ring-color:rgba(99,102,241,.25)}.ring-rose-400\/25{--tw-ring-color:rgba(251,113,133,.25)}.ring-rose-400\/40{--tw-ring-color:rgba(251,113,133,.4)}.ring-rose-500\/15{--tw-ring-color:rgba(244,63,94,.15)}.ring-rose-500\/25{--tw-ring-color:rgba(244,63,94,.25)}.ring-rose-500\/30{--tw-ring-color:rgba(244,63,94,.3)}.ring-rose-500\/35{--tw-ring-color:rgba(244,63,94,.35)}.ring-sky-400\/40{--tw-ring-color:rgba(56,189,248,.4)}.ring-sky-500\/25{--tw-ring-color:rgba(14,165,233,.25)}.ring-slate-200{--tw-ring-opacity:1;--tw-ring-color:rgb(226 232 240/var(--tw-ring-opacity,1))}.ring-slate-500\/30{--tw-ring-color:rgba(100,116,139,.3)}.ring-violet-200{--tw-ring-opacity:1;--tw-ring-color:rgb(221 214 254/var(--tw-ring-opacity,1))}.ring-violet-400\/25{--tw-ring-color:rgba(167,139,250,.25)}.ring-violet-400\/35{--tw-ring-color:rgba(167,139,250,.35)}.ring-violet-400\/40{--tw-ring-color:rgba(167,139,250,.4)}.ring-violet-500\/20{--tw-ring-color:rgba(139,92,246,.2)}.ring-violet-500\/25{--tw-ring-color:rgba(139,92,246,.25)}.ring-violet-500\/30{--tw-ring-color:rgba(139,92,246,.3)}.ring-violet-500\/35{--tw-ring-color:rgba(139,92,246,.35)}.ring-white\/10{--tw-ring-color:hsla(0,0%,100%,.1)}.ring-white\/\[0\.03\]{--tw-ring-color:hsla(0,0%,100%,.03)}.ring-white\/\[0\.04\]{--tw-ring-color:hsla(0,0%,100%,.04)}.ring-white\/\[0\.05\]{--tw-ring-color:hsla(0,0%,100%,.05)}.ring-white\/\[0\.06\]{--tw-ring-color:hsla(0,0%,100%,.06)}.ring-zinc-500\/25{--tw-ring-color:hsla(240,4%,46%,.25)}.blur-3xl{--tw-blur:blur(64px)}.blur-3xl,.blur-\[100px\]{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[100px\]{--tw-blur:blur(100px)}.blur-\[120px\]{--tw-blur:blur(120px)}.blur-\[120px\],.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(40px)}.backdrop-blur-2xl,.backdrop-blur-\[2px\]{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px)}.backdrop-blur-lg{--tw-backdrop-blur:blur(16px)}.backdrop-blur-lg,.backdrop-blur-md{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.backdrop-blur-sm,.backdrop-blur-xl{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur:blur(24px)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.glass{border-width:1px;border-color:hsla(0,0%,100%,.08);--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);--tw-shadow-color:rgba(0,0,0,.4);--tw-shadow:var(--tw-shadow-colored);background:var(--bg-card);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);transition:border-color .25s ease,box-shadow .25s ease,background .25s ease}html[data-theme=light] .glass{border-color:rgba(226,232,240,.9);--tw-shadow-color:rgba(148,163,184,.15);--tw-shadow:var(--tw-shadow-colored)}.section-title{font-size:1.125rem;line-height:1.75rem;font-weight:600;letter-spacing:-.025em;color:var(--text)}.section-lead{margin-top:.5rem}.meta-chip,.section-lead{font-size:.75rem;line-height:1rem;line-height:1.625;color:var(--muted)}.meta-chip{border-radius:1rem;border-width:1px;padding:.75rem 1rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;border-color:hsla(0,0%,100%,.1);background:rgba(0,0,0,.22)}html[data-theme=light] .meta-chip{border-color:rgba(226,232,240,.95);background:hsla(0,0%,100%,.72);color:var(--muted)}.tab-strip{margin-left:-.25rem;margin-right:-.25rem;display:flex;gap:.5rem;overflow-x:auto;padding-bottom:.375rem;padding-top:.125rem}@media (min-width:768px){.tab-strip{flex-wrap:wrap;overflow:visible}}.tab-strip{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}.tab-btn{flex-shrink:0;scroll-snap-align:start;border-radius:1rem;border-width:1px;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.tab-btn:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.tab-btn{--tw-ring-offset-color:var(--ring-offset);border-color:hsla(0,0%,100%,.12);background:rgba(0,0,0,.22);color:#cbd5e1}.tab-btn:hover{border-color:rgba(34,211,238,.25);color:#e2e8f0}.tab-btn-active{border-color:rgba(34,211,238,.45)!important;background:rgba(34,211,238,.12)!important;color:#cffafe!important}html[data-theme=light] .tab-btn{border-color:#e2e8f0;background:hsla(0,0%,100%,.75);color:#475569}html[data-theme=light] .tab-btn:hover{border-color:rgba(6,182,212,.45);color:#0f766e}html[data-theme=light] .tab-btn-active{border-color:rgba(6,182,212,.55)!important;background:rgba(207,250,254,.55)!important;color:#0e7490!important}.link-tile{display:block;border-radius:1rem;border-width:1px;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.link-tile:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.link-tile{--tw-ring-offset-color:var(--ring-offset);border-color:hsla(0,0%,100%,.1);background:rgba(0,0,0,.2);color:#f1f5f9}.link-tile:hover{border-color:rgba(34,211,238,.35)}html[data-theme=light] .link-tile{border-color:#e2e8f0;background:hsla(0,0%,100%,.65);color:#1e293b}.link-tile-accent{border-color:rgba(34,211,238,.28);background:rgba(34,211,238,.1);color:#ecfeff}.link-tile-accent:hover{border-color:rgba(34,211,238,.55)}html[data-theme=light] .link-tile-accent{border-color:rgba(6,182,212,.35);background:rgba(207,250,254,.65);color:#0e7490}.link-tile-warn{border-color:rgba(251,191,36,.25);background:rgba(251,191,36,.1);color:#fefce8}html[data-theme=light] .link-tile-warn{border-color:rgba(251,191,36,.45);background:hsla(55,92%,95%,.9);color:#78350f}.service-card{border-radius:1.5rem;border-width:1px;padding:1.25rem;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;border-color:hsla(0,0%,100%,.08);background:rgba(0,0,0,.2)}.service-card:hover{box-shadow:0 12px 40px -24px rgba(34,211,238,.35)}html[data-theme=light] .service-card{border-color:rgba(226,232,240,.95);background:hsla(0,0%,100%,.55)}.panel-inset{border-radius:1rem;border-width:1px;padding:1rem;font-size:.875rem;line-height:1.25rem;border-color:hsla(0,0%,100%,.08);background:rgba(0,0,0,.2);color:#cbd5e1}html[data-theme=light] .panel-inset{border-color:rgba(226,232,240,.85);background:hsla(0,0%,100%,.5);color:#334155}.field-select{width:100%;border-radius:1rem;border-width:1px;padding:.75rem 1rem;font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-color:hsla(0,0%,100%,.12);background:rgba(2,6,23,.55);color:#f8fafc}html[data-theme=light] .field-select{border-color:#e2e8f0;background:hsla(0,0%,100%,.9);color:#0f172a}.btn-focus:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.btn-focus{--tw-ring-offset-color:var(--ring-offset)}.\[-ms-overflow-style\:none\]{-ms-overflow-style:none}.\[scrollbar-width\:none\]{scrollbar-width:none}:root{--bg-deep:#060912;--bg-card:rgba(16,22,36,.78);--accent:#22d3ee;--accent2:#a78bfa;--danger:#f43f5e;--ok:#34d399;--text:#e8edf7;--muted:#94a3b8;--ring-offset:#060912;color-scheme:dark}html[data-theme=light]{--bg-deep:#f1f5f9;--bg-card:hsla(0,0%,100%,.88);--text:#0f172a;--muted:#64748b;--ring-offset:#f1f5f9;color-scheme:light}html{scroll-behavior:smooth}body{color:var(--text);background:var(--bg-deep);min-height:100vh;font-family:var(--font-geist-sans),system-ui,sans-serif;overflow-x:hidden;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transition:background-color .35s ease,color .25s ease}*{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.35) transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:rgba(148,163,184,.35);border-radius:999px}::-webkit-scrollbar-track{background:transparent}.app-bg-layer{position:fixed;inset:0;z-index:-1;opacity:.92;pointer-events:none;background:radial-gradient(ellipse 80% 50% at 50% -20%,rgba(34,211,238,.22),transparent),radial-gradient(ellipse 60% 40% at 100% 0,rgba(167,139,250,.18),transparent),radial-gradient(ellipse 50% 30% at 0 100%,rgba(59,130,246,.12),transparent);transition:opacity .35s ease}html[data-theme=light] .app-bg-layer{opacity:.75;background:radial-gradient(ellipse 80% 50% at 50% -20%,rgba(14,165,233,.12),transparent),radial-gradient(ellipse 60% 40% at 100% 0,rgba(139,92,246,.1),transparent),radial-gradient(ellipse 50% 30% at 0 100%,rgba(59,130,246,.08),transparent)}html[data-theme=light] .chart-surface{border-color:rgba(15,23,42,.12)!important;background:hsla(0,0%,100%,.65)!important}::selection{background:rgba(34,211,238,.25)}.safe-pb-nav{padding-bottom:calc(5.5rem + env(safe-area-inset-bottom, 0px))}@media (min-width:768px){.safe-pb-nav{padding-bottom:4rem}}@keyframes toast-in{0%{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%)}}.animate-toast-in{animation:toast-in .35s ease-out both}@keyframes pulse-soft{0%,to{opacity:1}50%{opacity:.65}}.animate-pulse-soft{animation:pulse-soft 2s ease-in-out infinite}.log-scroll{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.35) transparent}.log-scroll::-webkit-scrollbar{width:6px;height:6px}.log-scroll::-webkit-scrollbar-thumb{background:rgba(148,163,184,.35);border-radius:6px}.portal-grid-bg{background-image:linear-gradient(hsla(0,0%,100%,.05) 1px,transparent 0),linear-gradient(90deg,hsla(0,0%,100%,.05) 1px,transparent 0);background-size:28px 28px}.lp-noise{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E")}.studio-scene-shell{perspective:800px}.studio-scene-shimmer{background:linear-gradient(105deg,transparent 40%,rgba(244,114,182,.12) 50%,transparent 60%);background-size:200% 100%;animation:studio-shimmer 1.8s ease-in-out infinite}@keyframes studio-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.studio-live-badge{animation:studio-live-glow 2.4s ease-in-out infinite}@keyframes studio-live-glow{0%,to{box-shadow:0 0 0 0 rgba(244,63,94,0)}50%{box-shadow:0 0 12px 2px rgba(244,63,94,.25)}}@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}.selection\:bg-violet-400\/25 ::selection{background-color:rgba(167,139,250,.25)}.selection\:bg-violet-500\/30 ::selection{background-color:rgba(139,92,246,.3)}.selection\:bg-violet-400\/25::selection{background-color:rgba(167,139,250,.25)}.selection\:bg-violet-500\/30::selection{background-color:rgba(139,92,246,.3)}.file\:mr-3::file-selector-button{margin-right:.75rem}.file\:rounded-md::file-selector-button{border-radius:.375rem}.file\:border-0::file-selector-button{border-width:0}.file\:bg-cyan-50::file-selector-button{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.file\:bg-cyan-500\/15::file-selector-button{background-color:rgba(6,182,212,.15)}.file\:px-3::file-selector-button{padding-left:.75rem;padding-right:.75rem}.file\:py-1\.5::file-selector-button{padding-top:.375rem;padding-bottom:.375rem}.file\:text-xs::file-selector-button{font-size:.75rem;line-height:1rem}.file\:font-semibold::file-selector-button{font-weight:600}.file\:text-cyan-100::file-selector-button{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.file\:text-cyan-800::file-selector-button{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.last\:border-0:last-child{border-width:0}.hover\:-translate-y-0\.5:hover{--tw-translate-y:-0.125rem}.hover\:-translate-y-0\.5:hover,.hover\:-translate-y-px:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-px:hover{--tw-translate-y:-1px}.hover\:border-fuchsia-400\/35:hover{border-color:rgba(232,121,249,.35)}.hover\:border-violet-400\/20:hover{border-color:rgba(167,139,250,.2)}.hover\:border-violet-400\/30:hover{border-color:rgba(167,139,250,.3)}.hover\:border-white\/15:hover{border-color:hsla(0,0%,100%,.15)}.hover\:border-white\/20:hover{border-color:hsla(0,0%,100%,.2)}.hover\:bg-amber-500\/15:hover{background-color:rgba(245,158,11,.15)}.hover\:bg-amber-500\/25:hover{background-color:rgba(245,158,11,.25)}.hover\:bg-black\/45:hover{background-color:rgba(0,0,0,.45)}.hover\:bg-black\/60:hover{background-color:rgba(0,0,0,.6)}.hover\:bg-cyan-100:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.hover\:bg-cyan-50:hover{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.hover\:bg-cyan-500\/15:hover{background-color:rgba(6,182,212,.15)}.hover\:bg-cyan-500\/25:hover{background-color:rgba(6,182,212,.25)}.hover\:bg-cyan-500\/30:hover{background-color:rgba(6,182,212,.3)}.hover\:bg-emerald-100:hover{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.hover\:bg-emerald-500\/15:hover{background-color:rgba(16,185,129,.15)}.hover\:bg-emerald-500\/20:hover{background-color:rgba(16,185,129,.2)}.hover\:bg-emerald-500\/25:hover{background-color:rgba(16,185,129,.25)}.hover\:bg-fuchsia-500\/20:hover{background-color:rgba(217,70,239,.2)}.hover\:bg-rose-500\/15:hover{background-color:rgba(244,63,94,.15)}.hover\:bg-rose-500\/25:hover{background-color:rgba(244,63,94,.25)}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\:bg-slate-200\/60:hover{background-color:rgba(226,232,240,.6)}.hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.hover\:bg-violet-100:hover{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.hover\:bg-violet-500\/15:hover{background-color:rgba(139,92,246,.15)}.hover\:bg-violet-500\/25:hover{background-color:rgba(139,92,246,.25)}.hover\:bg-violet-500\/30:hover{background-color:rgba(139,92,246,.3)}.hover\:bg-white\/10:hover{background-color:hsla(0,0%,100%,.1)}.hover\:bg-white\/5:hover{background-color:hsla(0,0%,100%,.05)}.hover\:bg-white\/60:hover{background-color:hsla(0,0%,100%,.6)}.hover\:bg-white\/\[0\.03\]:hover{background-color:hsla(0,0%,100%,.03)}.hover\:bg-white\/\[0\.04\]:hover{background-color:hsla(0,0%,100%,.04)}.hover\:bg-white\/\[0\.06\]:hover{background-color:hsla(0,0%,100%,.06)}.hover\:bg-white\/\[0\.07\]:hover{background-color:hsla(0,0%,100%,.07)}.hover\:bg-white\/\[0\.08\]:hover{background-color:hsla(0,0%,100%,.08)}.hover\:bg-white\/\[0\.1\]:hover{background-color:hsla(0,0%,100%,.1)}.hover\:bg-zinc-500\/25:hover{background-color:hsla(240,4%,46%,.25)}.hover\:text-amber-300:hover{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.hover\:text-cyan-200:hover{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.hover\:text-rose-200:hover{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.hover\:text-zinc-200:hover{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.hover\:text-zinc-300:hover{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:ring-violet-400\/50:hover{--tw-ring-color:rgba(167,139,250,.5)}.hover\:brightness-110:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-amber-400:focus{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.focus\:border-amber-400\/60:focus{border-color:rgba(251,191,36,.6)}.focus\:border-cyan-400:focus{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.focus\:border-cyan-400\/60:focus{border-color:rgba(34,211,238,.6)}.focus\:border-indigo-400:focus{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.focus\:border-indigo-400\/60:focus{border-color:rgba(129,140,248,.6)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-emerald-500\/50:focus-visible{--tw-ring-color:rgba(16,185,129,.5)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-45:disabled{opacity:.45}@media (min-width:640px){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-\[14rem_minmax\(0\2c 1fr\)\]{grid-template-columns:14rem minmax(0,1fr)}.sm\:grid-cols-\[minmax\(0\2c 1fr\)_7rem\]{grid-template-columns:minmax(0,1fr) 7rem}.sm\:flex-row{flex-direction:row}.sm\:flex-wrap{flex-wrap:wrap}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-2{gap:.5rem}.sm\:p-5{padding:1.25rem}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\:bottom-6{bottom:1.5rem}.md\:hidden{display:none}.md\:h-56{height:14rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[12rem_minmax\(0\2c 1fr\)\]{grid-template-columns:12rem minmax(0,1fr)}.md\:grid-cols-\[minmax\(0\2c 1fr\)_6rem_14rem\]{grid-template-columns:minmax(0,1fr) 6rem 14rem}.md\:grid-cols-\[minmax\(0\2c 1fr\)_8rem_7rem_7rem\]{grid-template-columns:minmax(0,1fr) 8rem 7rem 7rem}}@media (min-width:1024px){.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\2c 1fr\)_22rem\]{grid-template-columns:minmax(0,1fr) 22rem}.lg\:grid-cols-\[minmax\(0\2c 1fr\)_8rem\]{grid-template-columns:minmax(0,1fr) 8rem}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-end{align-items:flex-end}.lg\:items-center{align-items:center}.lg\:justify-between{justify-content:space-between}.lg\:px-10{padding-left:2.5rem;padding-right:2.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-8{padding-top:2rem;padding-bottom:2rem}.lg\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:1280px){.xl\:col-span-12{grid-column:span 12/span 12}.xl\:col-span-2{grid-column:span 2/span 2}.xl\:col-span-3{grid-column:span 3/span 3}.xl\:col-span-4{grid-column:span 4/span 4}.xl\:col-span-8{grid-column:span 8/span 8}.xl\:max-h-\[min\(24rem\2c 50vh\)\]{max-height:min(24rem,50vh)}.xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.xl\:grid-cols-\[0\.95fr\2c 1\.05fr\]{grid-template-columns:.95fr 1.05fr}.xl\:grid-cols-\[1\.1fr_0\.9fr\]{grid-template-columns:1.1fr .9fr}.xl\:grid-cols-\[18rem\2c 1fr\]{grid-template-columns:18rem 1fr}.xl\:grid-cols-\[minmax\(0\2c 1\.1fr\)_minmax\(20rem\2c 0\.8fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(20rem,.8fr)}.xl\:grid-cols-\[minmax\(0\2c 1\.1fr\)_minmax\(25rem\2c 0\.9fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(25rem,.9fr)}.xl\:grid-cols-\[minmax\(0\2c 1fr\)_minmax\(22rem\2c 0\.9fr\)\]{grid-template-columns:minmax(0,1fr) minmax(22rem,.9fr)}.xl\:items-stretch{align-items:stretch}}@media (min-width:1536px){.\32xl\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:border-cyan-600\/25{border-color:rgba(8,145,178,.25)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:border-slate-200\/60{border-color:rgba(226,232,240,.6)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:bg-white\/90{background-color:hsla(0,0%,100%,.9)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:bg-white\/95{background-color:hsla(0,0%,100%,.95)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))} \ No newline at end of file diff --git a/d2ypp2/web-console/out/_next/static/css/cc13f62d91728e6a.css b/d2ypp2/web-console/out/_next/static/css/cc13f62d91728e6a.css deleted file mode 100644 index 3312427..0000000 --- a/d2ypp2/web-console/out/_next/static/css/cc13f62d91728e6a.css +++ /dev/null @@ -1,3 +0,0 @@ -@font-face{font-family:__geistSans_1e4310;src:url(/_next/static/media/4473ecc91f70f139-s.p.woff) format("woff");font-display:swap;font-weight:100 900}@font-face{font-family:__geistSans_Fallback_1e4310;src:local("Arial");ascent-override:85.83%;descent-override:20.52%;line-gap-override:9.33%;size-adjust:107.19%}.__className_1e4310{font-family:__geistSans_1e4310,__geistSans_Fallback_1e4310}.__variable_1e4310{--font-geist-sans:"__geistSans_1e4310","__geistSans_Fallback_1e4310"}@font-face{font-family:__geistMono_c3aa02;src:url(/_next/static/media/463dafcda517f24f-s.p.woff) format("woff");font-display:swap;font-weight:100 900}@font-face{font-family:__geistMono_Fallback_c3aa02;src:local("Arial");ascent-override:69.97%;descent-override:16.73%;line-gap-override:7.61%;size-adjust:131.49%}.__className_c3aa02{font-family:__geistMono_c3aa02,__geistMono_Fallback_c3aa02}.__variable_c3aa02{--font-geist-mono:"__geistMono_c3aa02","__geistMono_Fallback_c3aa02"}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/* -! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com -*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-bottom-0\.5{bottom:-.125rem}.-left-1\/4{left:-25%}.-right-0\.5{right:-.125rem}.-right-20{right:-5rem}.-right-4{right:-1rem}.-top-0\.5{top:-.125rem}.-top-20{top:-5rem}.-top-4{top:-1rem}.bottom-0{bottom:0}.bottom-24{bottom:6rem}.bottom-3{bottom:.75rem}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.right-3{right:.75rem}.top-0{top:0}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.col-span-2{grid-column:span 2/span 2}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.line-clamp-1{-webkit-line-clamp:1}.line-clamp-1,.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.line-clamp-2{-webkit-line-clamp:2}.line-clamp-3{-webkit-line-clamp:3}.line-clamp-3,.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.line-clamp-4{-webkit-line-clamp:4}.line-clamp-6{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-36{height:9rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[30rem\]{height:30rem}.h-\[36rem\]{height:36rem}.h-\[42rem\]{height:42rem}.h-\[min\(72vh\2c 40rem\)\]{height:min(72vh,40rem)}.h-full{height:100%}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-64{max-height:16rem}.max-h-72{max-height:18rem}.max-h-\[28rem\]{max-height:28rem}.max-h-\[min\(22rem\2c 42vh\)\]{max-height:min(22rem,42vh)}.max-h-\[min\(24rem\2c 55vh\)\]{max-height:min(24rem,55vh)}.max-h-\[min\(70vh\2c 48rem\)\]{max-height:min(70vh,48rem)}.max-h-\[min\(72vh\2c 680px\)\]{max-height:min(72vh,680px)}.max-h-\[min\(78vh\2c 56rem\)\]{max-height:min(78vh,56rem)}.max-h-\[min\(78vh\2c 720px\)\]{max-height:min(78vh,720px)}.min-h-0{min-height:0}.min-h-16{min-height:4rem}.min-h-24{min-height:6rem}.min-h-56{min-height:14rem}.min-h-\[100px\]{min-height:100px}.min-h-\[12rem\]{min-height:12rem}.min-h-\[14rem\]{min-height:14rem}.min-h-\[160px\]{min-height:160px}.min-h-\[18rem\]{min-height:18rem}.min-h-\[2\.5rem\]{min-height:2.5rem}.min-h-\[2\.75rem\]{min-height:2.75rem}.min-h-\[200px\]{min-height:200px}.min-h-\[22rem\]{min-height:22rem}.min-h-\[24rem\]{min-height:24rem}.min-h-\[280px\]{min-height:280px}.min-h-\[2rem\]{min-height:2rem}.min-h-\[32rem\]{min-height:32rem}.min-h-\[3rem\]{min-height:3rem}.min-h-\[4rem\]{min-height:4rem}.min-h-\[6rem\]{min-height:6rem}.min-h-\[72px\]{min-height:72px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[36rem\]{width:36rem}.w-\[42rem\]{width:42rem}.w-\[min\(88vw\2c 280px\)\]{width:min(88vw,280px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[12rem\]{min-width:12rem}.min-w-\[1rem\]{min-width:1rem}.min-w-\[3\.75rem\]{min-width:3.75rem}.min-w-\[6rem\]{min-width:6rem}.min-w-\[7rem\]{min-width:7rem}.min-w-\[9rem\]{min-width:9rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[min\(92vw\2c 28rem\)\]{max-width:min(92vw,28rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-crosshair{cursor:crosshair}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-2{column-gap:.5rem}.gap-y-0\.5{row-gap:.125rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-white\/\[0\.06\]>:not([hidden])~:not([hidden]){border-color:hsla(0,0%,100%,.06)}.self-start{align-self:flex-start}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[1\.35rem\]{border-radius:1.35rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-xl{border-bottom-right-radius:.75rem;border-bottom-left-radius:.75rem}.border{border-width:1px}.border-\[10px\]{border-width:10px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-200{--tw-border-opacity:1;border-color:rgb(253 230 138/var(--tw-border-opacity,1))}.border-amber-400\/20{border-color:rgba(251,191,36,.2)}.border-amber-400\/50{border-color:rgba(251,191,36,.5)}.border-amber-500\/15{border-color:rgba(245,158,11,.15)}.border-amber-500\/20{border-color:rgba(245,158,11,.2)}.border-amber-500\/25{border-color:rgba(245,158,11,.25)}.border-amber-500\/30{border-color:rgba(245,158,11,.3)}.border-cyan-100{--tw-border-opacity:1;border-color:rgb(207 250 254/var(--tw-border-opacity,1))}.border-cyan-200{--tw-border-opacity:1;border-color:rgb(165 243 252/var(--tw-border-opacity,1))}.border-cyan-200\/90{border-color:rgba(165,243,252,.9)}.border-cyan-400\/15{border-color:rgba(34,211,238,.15)}.border-cyan-400\/20{border-color:rgba(34,211,238,.2)}.border-cyan-400\/35{border-color:rgba(34,211,238,.35)}.border-cyan-400\/50{border-color:rgba(34,211,238,.5)}.border-cyan-500\/15{border-color:rgba(6,182,212,.15)}.border-cyan-500\/20{border-color:rgba(6,182,212,.2)}.border-cyan-500\/25{border-color:rgba(6,182,212,.25)}.border-cyan-500\/30{border-color:rgba(6,182,212,.3)}.border-cyan-500\/40{border-color:rgba(6,182,212,.4)}.border-cyan-500\/50{border-color:rgba(6,182,212,.5)}.border-emerald-400\/30{border-color:rgba(52,211,153,.3)}.border-emerald-500\/15{border-color:rgba(16,185,129,.15)}.border-emerald-500\/20{border-color:rgba(16,185,129,.2)}.border-emerald-500\/25{border-color:rgba(16,185,129,.25)}.border-emerald-500\/30{border-color:rgba(16,185,129,.3)}.border-emerald-500\/50{border-color:rgba(16,185,129,.5)}.border-fuchsia-200\/80{border-color:rgba(245,208,254,.8)}.border-fuchsia-400\/20{border-color:rgba(232,121,249,.2)}.border-fuchsia-500\/20{border-color:rgba(217,70,239,.2)}.border-fuchsia-500\/25{border-color:rgba(217,70,239,.25)}.border-fuchsia-500\/30{border-color:rgba(217,70,239,.3)}.border-indigo-400\/50{border-color:rgba(129,140,248,.5)}.border-indigo-500\/25{border-color:rgba(99,102,241,.25)}.border-rose-500\/15{border-color:rgba(244,63,94,.15)}.border-rose-500\/20{border-color:rgba(244,63,94,.2)}.border-rose-500\/25{border-color:rgba(244,63,94,.25)}.border-rose-500\/30{border-color:rgba(244,63,94,.3)}.border-sky-400\/20{border-color:rgba(56,189,248,.2)}.border-sky-500\/20{border-color:rgba(14,165,233,.2)}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.border-slate-200\/80{border-color:rgba(226,232,240,.8)}.border-slate-200\/90{border-color:rgba(226,232,240,.9)}.border-slate-500\/30{border-color:rgba(100,116,139,.3)}.border-slate-700\/30{border-color:rgba(51,65,85,.3)}.border-violet-200\/90{border-color:rgba(221,214,254,.9)}.border-violet-400\/35{border-color:rgba(167,139,250,.35)}.border-violet-500\/15{border-color:rgba(139,92,246,.15)}.border-violet-500\/20{border-color:rgba(139,92,246,.2)}.border-violet-500\/25{border-color:rgba(139,92,246,.25)}.border-violet-500\/30{border-color:rgba(139,92,246,.3)}.border-violet-500\/35{border-color:rgba(139,92,246,.35)}.border-violet-500\/45{border-color:rgba(139,92,246,.45)}.border-violet-500\/50{border-color:rgba(139,92,246,.5)}.border-white\/10{border-color:hsla(0,0%,100%,.1)}.border-white\/15{border-color:hsla(0,0%,100%,.15)}.border-white\/20{border-color:hsla(0,0%,100%,.2)}.border-white\/5{border-color:hsla(0,0%,100%,.05)}.border-white\/\[0\.04\]{border-color:hsla(0,0%,100%,.04)}.border-white\/\[0\.05\]{border-color:hsla(0,0%,100%,.05)}.border-white\/\[0\.06\]{border-color:hsla(0,0%,100%,.06)}.border-white\/\[0\.07\]{border-color:hsla(0,0%,100%,.07)}.border-white\/\[0\.08\]{border-color:hsla(0,0%,100%,.08)}.border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.bg-\[\#050508\]{--tw-bg-opacity:1;background-color:rgb(5 5 8/var(--tw-bg-opacity,1))}.bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.bg-amber-500\/10{background-color:rgba(245,158,11,.1)}.bg-amber-500\/15{background-color:rgba(245,158,11,.15)}.bg-amber-500\/20{background-color:rgba(245,158,11,.2)}.bg-amber-500\/5{background-color:rgba(245,158,11,.05)}.bg-amber-500\/\[0\.06\]{background-color:rgba(245,158,11,.06)}.bg-amber-500\/\[0\.08\]{background-color:rgba(245,158,11,.08)}.bg-amber-600{--tw-bg-opacity:1;background-color:rgb(217 119 6/var(--tw-bg-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/15{background-color:rgba(0,0,0,.15)}.bg-black\/20{background-color:rgba(0,0,0,.2)}.bg-black\/25{background-color:rgba(0,0,0,.25)}.bg-black\/30{background-color:rgba(0,0,0,.3)}.bg-black\/35{background-color:rgba(0,0,0,.35)}.bg-black\/40{background-color:rgba(0,0,0,.4)}.bg-black\/45{background-color:rgba(0,0,0,.45)}.bg-black\/50{background-color:rgba(0,0,0,.5)}.bg-black\/55{background-color:rgba(0,0,0,.55)}.bg-black\/60{background-color:rgba(0,0,0,.6)}.bg-black\/75{background-color:rgba(0,0,0,.75)}.bg-black\/80{background-color:rgba(0,0,0,.8)}.bg-cyan-100{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.bg-cyan-400\/10{background-color:rgba(34,211,238,.1)}.bg-cyan-50{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.bg-cyan-500\/10{background-color:rgba(6,182,212,.1)}.bg-cyan-500\/15{background-color:rgba(6,182,212,.15)}.bg-cyan-500\/20{background-color:rgba(6,182,212,.2)}.bg-cyan-500\/25{background-color:rgba(6,182,212,.25)}.bg-cyan-500\/30{background-color:rgba(6,182,212,.3)}.bg-cyan-500\/90{background-color:rgba(6,182,212,.9)}.bg-cyan-500\/\[0\.05\]{background-color:rgba(6,182,212,.05)}.bg-cyan-500\/\[0\.06\]{background-color:rgba(6,182,212,.06)}.bg-cyan-500\/\[0\.08\]{background-color:rgba(6,182,212,.08)}.bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity,1))}.bg-cyan-600\/80{background-color:rgba(8,145,178,.8)}.bg-emerald-400{--tw-bg-opacity:1;background-color:rgb(52 211 153/var(--tw-bg-opacity,1))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity,1))}.bg-emerald-500\/10{background-color:rgba(16,185,129,.1)}.bg-emerald-500\/15{background-color:rgba(16,185,129,.15)}.bg-emerald-500\/20{background-color:rgba(16,185,129,.2)}.bg-emerald-500\/90{background-color:rgba(16,185,129,.9)}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgb(5 150 105/var(--tw-bg-opacity,1))}.bg-fuchsia-500\/10{background-color:rgba(217,70,239,.1)}.bg-fuchsia-500\/15{background-color:rgba(217,70,239,.15)}.bg-fuchsia-500\/20{background-color:rgba(217,70,239,.2)}.bg-indigo-500\/15{background-color:rgba(99,102,241,.15)}.bg-rose-500\/10{background-color:rgba(244,63,94,.1)}.bg-rose-500\/15{background-color:rgba(244,63,94,.15)}.bg-rose-500\/\[0\.10\]{background-color:rgba(244,63,94,.1)}.bg-rose-600{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.bg-rose-950\/20{background-color:rgba(76,5,25,.2)}.bg-rose-950\/25{background-color:rgba(76,5,25,.25)}.bg-sky-500\/10{background-color:rgba(14,165,233,.1)}.bg-sky-500\/15{background-color:rgba(14,165,233,.15)}.bg-sky-500\/25{background-color:rgba(14,165,233,.25)}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-slate-200\/70{background-color:rgba(226,232,240,.7)}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.bg-slate-500\/10{background-color:rgba(100,116,139,.1)}.bg-slate-500\/15{background-color:rgba(100,116,139,.15)}.bg-slate-800\/50{background-color:rgba(30,41,59,.5)}.bg-slate-950\/30{background-color:rgba(2,6,23,.3)}.bg-slate-950\/50{background-color:rgba(2,6,23,.5)}.bg-slate-950\/60{background-color:rgba(2,6,23,.6)}.bg-slate-950\/80{background-color:rgba(2,6,23,.8)}.bg-slate-950\/95{background-color:rgba(2,6,23,.95)}.bg-violet-100{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.bg-violet-100\/90{background-color:rgba(237,233,254,.9)}.bg-violet-400\/15{background-color:rgba(167,139,250,.15)}.bg-violet-50{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity,1))}.bg-violet-500\/10{background-color:rgba(139,92,246,.1)}.bg-violet-500\/15{background-color:rgba(139,92,246,.15)}.bg-violet-500\/20{background-color:rgba(139,92,246,.2)}.bg-violet-500\/25{background-color:rgba(139,92,246,.25)}.bg-violet-500\/\[0\.06\]{background-color:rgba(139,92,246,.06)}.bg-violet-500\/\[0\.1\]{background-color:rgba(139,92,246,.1)}.bg-violet-600{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}.bg-violet-600\/20{background-color:rgba(124,58,237,.2)}.bg-violet-600\/70{background-color:rgba(124,58,237,.7)}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\/10{background-color:hsla(0,0%,100%,.1)}.bg-white\/5{background-color:hsla(0,0%,100%,.05)}.bg-white\/70{background-color:hsla(0,0%,100%,.7)}.bg-white\/75{background-color:hsla(0,0%,100%,.75)}.bg-white\/80{background-color:hsla(0,0%,100%,.8)}.bg-white\/90{background-color:hsla(0,0%,100%,.9)}.bg-white\/\[0\.035\]{background-color:hsla(0,0%,100%,.035)}.bg-white\/\[0\.03\]{background-color:hsla(0,0%,100%,.03)}.bg-white\/\[0\.04\]{background-color:hsla(0,0%,100%,.04)}.bg-white\/\[0\.05\]{background-color:hsla(0,0%,100%,.05)}.bg-white\/\[0\.06\]{background-color:hsla(0,0%,100%,.06)}.bg-white\/\[0\.08\]{background-color:hsla(0,0%,100%,.08)}.bg-zinc-500\/15{background-color:hsla(240,4%,46%,.15)}.bg-zinc-600\/20{background-color:rgba(82,82,91,.2)}.bg-zinc-600\/30{background-color:rgba(82,82,91,.3)}.bg-zinc-700\/40{background-color:rgba(63,63,70,.4)}.bg-zinc-700\/90{background-color:rgba(63,63,70,.9)}.bg-zinc-950{--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.bg-zinc-950\/30{background-color:rgba(9,9,11,.3)}.bg-zinc-950\/40{background-color:rgba(9,9,11,.4)}.bg-zinc-950\/50{background-color:rgba(9,9,11,.5)}.bg-zinc-950\/55{background-color:rgba(9,9,11,.55)}.bg-zinc-950\/60{background-color:rgba(9,9,11,.6)}.bg-zinc-950\/70{background-color:rgba(9,9,11,.7)}.bg-zinc-950\/80{background-color:rgba(9,9,11,.8)}.bg-zinc-950\/90{background-color:rgba(9,9,11,.9)}.bg-zinc-950\/95{background-color:rgba(9,9,11,.95)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from:#fbbf24 var(--tw-gradient-from-position);--tw-gradient-to:rgba(251,191,36,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-50\/90{--tw-gradient-from:rgba(255,251,235,.9) var(--tw-gradient-from-position);--tw-gradient-to:rgba(255,251,235,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/35{--tw-gradient-from:rgba(245,158,11,.35) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/\[0\.07\]{--tw-gradient-from:rgba(245,158,11,.07) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/\[0\.12\]{--tw-gradient-from:rgba(245,158,11,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-amber-500\/\[0\.1\]{--tw-gradient-from:rgba(245,158,11,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,158,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-400{--tw-gradient-from:#22d3ee var(--tw-gradient-from-position);--tw-gradient-to:rgba(34,211,238,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/35{--tw-gradient-from:rgba(6,182,212,.35) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.07\]{--tw-gradient-from:rgba(6,182,212,.07) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.08\]{--tw-gradient-from:rgba(6,182,212,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.14\]{--tw-gradient-from:rgba(6,182,212,.14) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-cyan-500\/\[0\.1\]{--tw-gradient-from:rgba(6,182,212,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(6,182,212,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-400{--tw-gradient-from:#34d399 var(--tw-gradient-from-position);--tw-gradient-to:rgba(52,211,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-400\/30{--tw-gradient-from:rgba(52,211,153,.3) var(--tw-gradient-from-position);--tw-gradient-to:rgba(52,211,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.07\]{--tw-gradient-from:rgba(16,185,129,.07) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.08\]{--tw-gradient-from:rgba(16,185,129,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-emerald-500\/\[0\.12\]{--tw-gradient-from:rgba(16,185,129,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(16,185,129,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-50\/90{--tw-gradient-from:rgba(253,244,255,.9) var(--tw-gradient-from-position);--tw-gradient-to:rgba(253,244,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-500\/10{--tw-gradient-from:rgba(217,70,239,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(217,70,239,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-500\/\[0\.08\]{--tw-gradient-from:rgba(217,70,239,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(217,70,239,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-fuchsia-950\/40{--tw-gradient-from:rgba(74,4,78,.4) var(--tw-gradient-from-position);--tw-gradient-to:rgba(74,4,78,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-indigo-500\/\[0\.1\]{--tw-gradient-from:rgba(99,102,241,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(99,102,241,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-pink-500\/25{--tw-gradient-from:rgba(236,72,153,.25) var(--tw-gradient-from-position);--tw-gradient-to:rgba(236,72,153,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-500\/30{--tw-gradient-from:rgba(239,68,68,.3) var(--tw-gradient-from-position);--tw-gradient-to:rgba(239,68,68,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-sky-500\/\[0\.08\]{--tw-gradient-from:rgba(14,165,233,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(14,165,233,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-50{--tw-gradient-from:#f5f3ff var(--tw-gradient-from-position);--tw-gradient-to:rgba(245,243,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500{--tw-gradient-from:#8b5cf6 var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/10{--tw-gradient-from:rgba(139,92,246,.1) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/30{--tw-gradient-from:rgba(139,92,246,.3) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/\[0\.08\]{--tw-gradient-from:rgba(139,92,246,.08) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-violet-500\/\[0\.12\]{--tw-gradient-from:rgba(139,92,246,.12) var(--tw-gradient-from-position);--tw-gradient-to:rgba(139,92,246,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-white\/\[0\.05\]{--tw-gradient-from:hsla(0,0%,100%,.05) var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-zinc-950\/95{--tw-gradient-from:rgba(9,9,11,.95) var(--tw-gradient-from-position);--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-black\/25{--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(0,0,0,.25) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-white{--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#fff var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/40{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.4) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/50{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.5) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/55{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.55) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/60{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.6) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/70{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.7) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/80{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.8) var(--tw-gradient-via-position),var(--tw-gradient-to)}.via-zinc-950\/90{--tw-gradient-to:rgba(9,9,11,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),rgba(9,9,11,.9) var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-black\/40{--tw-gradient-to:rgba(0,0,0,.4) var(--tw-gradient-to-position)}.to-blue-500{--tw-gradient-to:#3b82f6 var(--tw-gradient-to-position)}.to-cyan-400{--tw-gradient-to:#22d3ee var(--tw-gradient-to-position)}.to-cyan-50\/70{--tw-gradient-to:rgba(236,254,255,.7) var(--tw-gradient-to-position)}.to-cyan-500\/10{--tw-gradient-to:rgba(6,182,212,.1) var(--tw-gradient-to-position)}.to-cyan-500\/5,.to-cyan-500\/\[0\.05\]{--tw-gradient-to:rgba(6,182,212,.05) var(--tw-gradient-to-position)}.to-cyan-500\/\[0\.06\]{--tw-gradient-to:rgba(6,182,212,.06) var(--tw-gradient-to-position)}.to-cyan-950\/20{--tw-gradient-to:rgba(8,51,68,.2) var(--tw-gradient-to-position)}.to-emerald-500\/\[0\.05\]{--tw-gradient-to:rgba(16,185,129,.05) var(--tw-gradient-to-position)}.to-fuchsia-50\/80{--tw-gradient-to:rgba(253,244,255,.8) var(--tw-gradient-to-position)}.to-fuchsia-500{--tw-gradient-to:#d946ef var(--tw-gradient-to-position)}.to-fuchsia-500\/10{--tw-gradient-to:rgba(217,70,239,.1) var(--tw-gradient-to-position)}.to-fuchsia-500\/20{--tw-gradient-to:rgba(217,70,239,.2) var(--tw-gradient-to-position)}.to-fuchsia-500\/5{--tw-gradient-to:rgba(217,70,239,.05) var(--tw-gradient-to-position)}.to-fuchsia-500\/\[0\.06\]{--tw-gradient-to:rgba(217,70,239,.06) var(--tw-gradient-to-position)}.to-fuchsia-600\/25{--tw-gradient-to:rgba(192,38,211,.25) var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to:#f97316 var(--tw-gradient-to-position)}.to-rose-500\/\[0\.05\]{--tw-gradient-to:rgba(244,63,94,.05) var(--tw-gradient-to-position)}.to-slate-50{--tw-gradient-to:#f8fafc var(--tw-gradient-to-position)}.to-teal-500{--tw-gradient-to:#14b8a6 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.to-violet-500\/10{--tw-gradient-to:rgba(139,92,246,.1) var(--tw-gradient-to-position)}.to-violet-500\/25{--tw-gradient-to:rgba(139,92,246,.25) var(--tw-gradient-to-position)}.to-violet-500\/\[0\.06\]{--tw-gradient-to:rgba(139,92,246,.06) var(--tw-gradient-to-position)}.to-violet-500\/\[0\.08\]{--tw-gradient-to:rgba(139,92,246,.08) var(--tw-gradient-to-position)}.to-violet-600\/25{--tw-gradient-to:rgba(124,58,237,.25) var(--tw-gradient-to-position)}.to-violet-600\/30{--tw-gradient-to:rgba(124,58,237,.3) var(--tw-gradient-to-position)}.to-zinc-900\/90{--tw-gradient-to:rgba(24,24,27,.9) var(--tw-gradient-to-position)}.to-zinc-950\/80{--tw-gradient-to:rgba(9,9,11,.8) var(--tw-gradient-to-position)}.object-contain{object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-16{padding-bottom:4rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-5{padding-left:1.25rem}.pr-1{padding-right:.25rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.08em\]{letter-spacing:.08em}.tracking-\[0\.22em\]{letter-spacing:.22em}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[color\:var\(--text\)\]{color:var(--text)}.text-amber-100{--tw-text-opacity:1;color:rgb(254 243 199/var(--tw-text-opacity,1))}.text-amber-100\/80{color:hsla(48,96%,89%,.8)}.text-amber-100\/85{color:hsla(48,96%,89%,.85)}.text-amber-200{--tw-text-opacity:1;color:rgb(253 230 138/var(--tw-text-opacity,1))}.text-amber-200\/80{color:hsla(48,97%,77%,.8)}.text-amber-200\/85{color:hsla(48,97%,77%,.85)}.text-amber-200\/90{color:hsla(48,97%,77%,.9)}.text-amber-300{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.text-amber-400{--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.text-amber-400\/95{color:rgba(251,191,36,.95)}.text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.text-amber-700{--tw-text-opacity:1;color:rgb(180 83 9/var(--tw-text-opacity,1))}.text-amber-800{--tw-text-opacity:1;color:rgb(146 64 14/var(--tw-text-opacity,1))}.text-cyan-100{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.text-cyan-100\/75{color:rgba(207,250,254,.75)}.text-cyan-100\/90{color:rgba(207,250,254,.9)}.text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.text-cyan-200\/90{color:rgba(165,243,252,.9)}.text-cyan-300{--tw-text-opacity:1;color:rgb(103 232 249/var(--tw-text-opacity,1))}.text-cyan-300\/70{color:rgba(103,232,249,.7)}.text-cyan-300\/80{color:rgba(103,232,249,.8)}.text-cyan-300\/90{color:rgba(103,232,249,.9)}.text-cyan-400{--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity,1))}.text-cyan-400\/90{color:rgba(34,211,238,.9)}.text-cyan-50{--tw-text-opacity:1;color:rgb(236 254 255/var(--tw-text-opacity,1))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity,1))}.text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}.text-cyan-800{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.text-cyan-900{--tw-text-opacity:1;color:rgb(22 78 99/var(--tw-text-opacity,1))}.text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}.text-emerald-100{--tw-text-opacity:1;color:rgb(209 250 229/var(--tw-text-opacity,1))}.text-emerald-100\/95{color:rgba(209,250,229,.95)}.text-emerald-200{--tw-text-opacity:1;color:rgb(167 243 208/var(--tw-text-opacity,1))}.text-emerald-200\/90{color:rgba(167,243,208,.9)}.text-emerald-300{--tw-text-opacity:1;color:rgb(110 231 183/var(--tw-text-opacity,1))}.text-emerald-300\/90{color:rgba(110,231,183,.9)}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-emerald-400\/80{color:rgba(52,211,153,.8)}.text-emerald-400\/90{color:rgba(52,211,153,.9)}.text-emerald-50{--tw-text-opacity:1;color:rgb(236 253 245/var(--tw-text-opacity,1))}.text-emerald-700{--tw-text-opacity:1;color:rgb(4 120 87/var(--tw-text-opacity,1))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity,1))}.text-emerald-950{--tw-text-opacity:1;color:rgb(2 44 34/var(--tw-text-opacity,1))}.text-fuchsia-100{--tw-text-opacity:1;color:rgb(250 232 255/var(--tw-text-opacity,1))}.text-fuchsia-100\/75{color:rgba(250,232,255,.75)}.text-fuchsia-200{--tw-text-opacity:1;color:rgb(245 208 254/var(--tw-text-opacity,1))}.text-fuchsia-200\/80{color:rgba(245,208,254,.8)}.text-fuchsia-300\/90{color:rgba(240,171,252,.9)}.text-fuchsia-400{--tw-text-opacity:1;color:rgb(232 121 249/var(--tw-text-opacity,1))}.text-indigo-100{--tw-text-opacity:1;color:rgb(224 231 255/var(--tw-text-opacity,1))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity,1))}.text-indigo-300{--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity,1))}.text-indigo-300\/90{color:rgba(165,180,252,.9)}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity,1))}.text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.text-rose-100{--tw-text-opacity:1;color:rgb(255 228 230/var(--tw-text-opacity,1))}.text-rose-100\/95{color:rgba(255,228,230,.95)}.text-rose-200{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.text-rose-400\/90{color:rgba(251,113,133,.9)}.text-sky-100{--tw-text-opacity:1;color:rgb(224 242 254/var(--tw-text-opacity,1))}.text-sky-100\/80{color:rgba(224,242,254,.8)}.text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity,1))}.text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-300\/90{color:rgba(203,213,225,.9)}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.text-violet-100{--tw-text-opacity:1;color:rgb(237 233 254/var(--tw-text-opacity,1))}.text-violet-200{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity,1))}.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}.text-violet-300\/80{color:rgba(196,181,253,.8)}.text-violet-300\/90{color:rgba(196,181,253,.9)}.text-violet-400{--tw-text-opacity:1;color:rgb(167 139 250/var(--tw-text-opacity,1))}.text-violet-400\/90{color:rgba(167,139,250,.9)}.text-violet-600{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}.text-violet-700{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}.text-violet-800{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\/70{color:hsla(0,0%,100%,.7)}.text-white\/80{color:hsla(0,0%,100%,.8)}.text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity,1))}.text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.text-zinc-200\/90{color:hsla(240,6%,90%,.9)}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity,1))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity,1))}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-violet-500{accent-color:#8b5cf6}.opacity-35{opacity:.35}.opacity-40{opacity:.4}.opacity-45{opacity:.45}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.opacity-\[0\.06\]{opacity:.06}.opacity-\[0\.22\]{opacity:.22}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-2xl,.shadow-inner{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,.05);--tw-shadow-colored:inset 0 2px 4px 0 var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-black\/20{--tw-shadow-color:rgba(0,0,0,.2);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/30{--tw-shadow-color:rgba(0,0,0,.3);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/50{--tw-shadow-color:rgba(0,0,0,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-black\/80{--tw-shadow-color:rgba(0,0,0,.8);--tw-shadow:var(--tw-shadow-colored)}.shadow-cyan-100\/50{--tw-shadow-color:rgba(207,250,254,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-cyan-900\/10{--tw-shadow-color:rgba(22,78,99,.1);--tw-shadow:var(--tw-shadow-colored)}.shadow-emerald-900\/20{--tw-shadow-color:rgba(6,78,59,.2);--tw-shadow:var(--tw-shadow-colored)}.shadow-fuchsia-100\/40{--tw-shadow-color:rgba(250,232,255,.4);--tw-shadow:var(--tw-shadow-colored)}.shadow-fuchsia-900\/10{--tw-shadow-color:rgba(112,26,117,.1);--tw-shadow:var(--tw-shadow-colored)}.shadow-indigo-500\/5{--tw-shadow-color:rgba(99,102,241,.05);--tw-shadow:var(--tw-shadow-colored)}.shadow-slate-200\/30{--tw-shadow-color:rgba(226,232,240,.3);--tw-shadow:var(--tw-shadow-colored)}.shadow-slate-200\/40{--tw-shadow-color:rgba(226,232,240,.4);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-200\/50{--tw-shadow-color:rgba(221,214,254,.5);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-500\/25{--tw-shadow-color:rgba(139,92,246,.25);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-500\/5{--tw-shadow-color:rgba(139,92,246,.05);--tw-shadow:var(--tw-shadow-colored)}.shadow-violet-900\/10{--tw-shadow-color:rgba(76,29,149,.1);--tw-shadow:var(--tw-shadow-colored)}.shadow-white\/5{--tw-shadow-color:hsla(0,0%,100%,.05);--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-amber-400\/25{--tw-ring-color:rgba(251,191,36,.25)}.ring-amber-400\/30{--tw-ring-color:rgba(251,191,36,.3)}.ring-amber-500\/25{--tw-ring-color:rgba(245,158,11,.25)}.ring-amber-500\/30{--tw-ring-color:rgba(245,158,11,.3)}.ring-amber-500\/35{--tw-ring-color:rgba(245,158,11,.35)}.ring-cyan-100{--tw-ring-opacity:1;--tw-ring-color:rgb(207 250 254/var(--tw-ring-opacity,1))}.ring-cyan-200{--tw-ring-opacity:1;--tw-ring-color:rgb(165 243 252/var(--tw-ring-opacity,1))}.ring-cyan-400\/20{--tw-ring-color:rgba(34,211,238,.2)}.ring-cyan-400\/25{--tw-ring-color:rgba(34,211,238,.25)}.ring-cyan-400\/30{--tw-ring-color:rgba(34,211,238,.3)}.ring-cyan-400\/35{--tw-ring-color:rgba(34,211,238,.35)}.ring-cyan-500\/10{--tw-ring-color:rgba(6,182,212,.1)}.ring-cyan-500\/20{--tw-ring-color:rgba(6,182,212,.2)}.ring-cyan-500\/25{--tw-ring-color:rgba(6,182,212,.25)}.ring-cyan-500\/30{--tw-ring-color:rgba(6,182,212,.3)}.ring-cyan-500\/35{--tw-ring-color:rgba(6,182,212,.35)}.ring-emerald-200{--tw-ring-opacity:1;--tw-ring-color:rgb(167 243 208/var(--tw-ring-opacity,1))}.ring-emerald-400\/25{--tw-ring-color:rgba(52,211,153,.25)}.ring-emerald-400\/30{--tw-ring-color:rgba(52,211,153,.3)}.ring-emerald-500\/20{--tw-ring-color:rgba(16,185,129,.2)}.ring-emerald-500\/25{--tw-ring-color:rgba(16,185,129,.25)}.ring-emerald-500\/30{--tw-ring-color:rgba(16,185,129,.3)}.ring-fuchsia-400\/20{--tw-ring-color:rgba(232,121,249,.2)}.ring-fuchsia-500\/35{--tw-ring-color:rgba(217,70,239,.35)}.ring-indigo-400\/30{--tw-ring-color:rgba(129,140,248,.3)}.ring-indigo-500\/25{--tw-ring-color:rgba(99,102,241,.25)}.ring-rose-400\/25{--tw-ring-color:rgba(251,113,133,.25)}.ring-rose-500\/15{--tw-ring-color:rgba(244,63,94,.15)}.ring-rose-500\/25{--tw-ring-color:rgba(244,63,94,.25)}.ring-rose-500\/30{--tw-ring-color:rgba(244,63,94,.3)}.ring-rose-500\/35{--tw-ring-color:rgba(244,63,94,.35)}.ring-sky-400\/40{--tw-ring-color:rgba(56,189,248,.4)}.ring-sky-500\/25{--tw-ring-color:rgba(14,165,233,.25)}.ring-slate-200{--tw-ring-opacity:1;--tw-ring-color:rgb(226 232 240/var(--tw-ring-opacity,1))}.ring-slate-500\/30{--tw-ring-color:rgba(100,116,139,.3)}.ring-violet-200{--tw-ring-opacity:1;--tw-ring-color:rgb(221 214 254/var(--tw-ring-opacity,1))}.ring-violet-400\/25{--tw-ring-color:rgba(167,139,250,.25)}.ring-violet-400\/35{--tw-ring-color:rgba(167,139,250,.35)}.ring-violet-400\/40{--tw-ring-color:rgba(167,139,250,.4)}.ring-violet-500\/20{--tw-ring-color:rgba(139,92,246,.2)}.ring-violet-500\/25{--tw-ring-color:rgba(139,92,246,.25)}.ring-violet-500\/30{--tw-ring-color:rgba(139,92,246,.3)}.ring-violet-500\/35{--tw-ring-color:rgba(139,92,246,.35)}.ring-white\/10{--tw-ring-color:hsla(0,0%,100%,.1)}.ring-white\/\[0\.03\]{--tw-ring-color:hsla(0,0%,100%,.03)}.ring-white\/\[0\.04\]{--tw-ring-color:hsla(0,0%,100%,.04)}.ring-white\/\[0\.05\]{--tw-ring-color:hsla(0,0%,100%,.05)}.ring-white\/\[0\.06\]{--tw-ring-color:hsla(0,0%,100%,.06)}.ring-zinc-500\/25{--tw-ring-color:hsla(240,4%,46%,.25)}.blur-3xl{--tw-blur:blur(64px)}.blur-3xl,.blur-\[100px\]{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[100px\]{--tw-blur:blur(100px)}.blur-\[120px\]{--tw-blur:blur(120px)}.blur-\[120px\],.blur-xl{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-xl{--tw-blur:blur(24px)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(40px)}.backdrop-blur-2xl,.backdrop-blur-\[2px\]{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px)}.backdrop-blur-lg{--tw-backdrop-blur:blur(16px)}.backdrop-blur-lg,.backdrop-blur-md{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px)}.backdrop-blur-sm,.backdrop-blur-xl{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur:blur(24px)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.glass{border-width:1px;border-color:hsla(0,0%,100%,.08);--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);--tw-shadow-color:rgba(0,0,0,.4);--tw-shadow:var(--tw-shadow-colored);background:var(--bg-card);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);transition:border-color .25s ease,box-shadow .25s ease,background .25s ease}html[data-theme=light] .glass{border-color:rgba(226,232,240,.9);--tw-shadow-color:rgba(148,163,184,.15);--tw-shadow:var(--tw-shadow-colored)}.section-title{font-size:1.125rem;line-height:1.75rem;font-weight:600;letter-spacing:-.025em;color:var(--text)}.section-lead{margin-top:.5rem}.meta-chip,.section-lead{font-size:.75rem;line-height:1rem;line-height:1.625;color:var(--muted)}.meta-chip{border-radius:1rem;border-width:1px;padding:.75rem 1rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;border-color:hsla(0,0%,100%,.1);background:rgba(0,0,0,.22)}html[data-theme=light] .meta-chip{border-color:rgba(226,232,240,.95);background:hsla(0,0%,100%,.72);color:var(--muted)}.tab-strip{margin-left:-.25rem;margin-right:-.25rem;display:flex;gap:.5rem;overflow-x:auto;padding-bottom:.375rem;padding-top:.125rem}@media (min-width:768px){.tab-strip{flex-wrap:wrap;overflow:visible}}.tab-strip{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}.tab-btn{flex-shrink:0;scroll-snap-align:start;border-radius:1rem;border-width:1px;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.tab-btn:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.tab-btn{--tw-ring-offset-color:var(--ring-offset);border-color:hsla(0,0%,100%,.12);background:rgba(0,0,0,.22);color:#cbd5e1}.tab-btn:hover{border-color:rgba(34,211,238,.25);color:#e2e8f0}.tab-btn-active{border-color:rgba(34,211,238,.45)!important;background:rgba(34,211,238,.12)!important;color:#cffafe!important}html[data-theme=light] .tab-btn{border-color:#e2e8f0;background:hsla(0,0%,100%,.75);color:#475569}html[data-theme=light] .tab-btn:hover{border-color:rgba(6,182,212,.45);color:#0f766e}html[data-theme=light] .tab-btn-active{border-color:rgba(6,182,212,.55)!important;background:rgba(207,250,254,.55)!important;color:#0e7490!important}.link-tile{display:block;border-radius:1rem;border-width:1px;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.link-tile:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.link-tile{--tw-ring-offset-color:var(--ring-offset);border-color:hsla(0,0%,100%,.1);background:rgba(0,0,0,.2);color:#f1f5f9}.link-tile:hover{border-color:rgba(34,211,238,.35)}html[data-theme=light] .link-tile{border-color:#e2e8f0;background:hsla(0,0%,100%,.65);color:#1e293b}.link-tile-accent{border-color:rgba(34,211,238,.28);background:rgba(34,211,238,.1);color:#ecfeff}.link-tile-accent:hover{border-color:rgba(34,211,238,.55)}html[data-theme=light] .link-tile-accent{border-color:rgba(6,182,212,.35);background:rgba(207,250,254,.65);color:#0e7490}.link-tile-warn{border-color:rgba(251,191,36,.25);background:rgba(251,191,36,.1);color:#fefce8}html[data-theme=light] .link-tile-warn{border-color:rgba(251,191,36,.45);background:hsla(55,92%,95%,.9);color:#78350f}.service-card{border-radius:1.5rem;border-width:1px;padding:1.25rem;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;border-color:hsla(0,0%,100%,.08);background:rgba(0,0,0,.2)}.service-card:hover{box-shadow:0 12px 40px -24px rgba(34,211,238,.35)}html[data-theme=light] .service-card{border-color:rgba(226,232,240,.95);background:hsla(0,0%,100%,.55)}.panel-inset{border-radius:1rem;border-width:1px;padding:1rem;font-size:.875rem;line-height:1.25rem;border-color:hsla(0,0%,100%,.08);background:rgba(0,0,0,.2);color:#cbd5e1}html[data-theme=light] .panel-inset{border-color:rgba(226,232,240,.85);background:hsla(0,0%,100%,.5);color:#334155}.field-select{width:100%;border-radius:1rem;border-width:1px;padding:.75rem 1rem;font-size:.875rem;line-height:1.25rem;outline:2px solid transparent;outline-offset:2px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;border-color:hsla(0,0%,100%,.12);background:rgba(2,6,23,.55);color:#f8fafc}html[data-theme=light] .field-select{border-color:#e2e8f0;background:hsla(0,0%,100%,.9);color:#0f172a}.btn-focus:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(34,211,238,.5);--tw-ring-offset-width:2px}.btn-focus{--tw-ring-offset-color:var(--ring-offset)}.\[-ms-overflow-style\:none\]{-ms-overflow-style:none}.\[scrollbar-width\:none\]{scrollbar-width:none}:root{--bg-deep:#060912;--bg-card:rgba(16,22,36,.78);--accent:#22d3ee;--accent2:#a78bfa;--danger:#f43f5e;--ok:#34d399;--text:#e8edf7;--muted:#94a3b8;--ring-offset:#060912;color-scheme:dark}html[data-theme=light]{--bg-deep:#f1f5f9;--bg-card:hsla(0,0%,100%,.88);--text:#0f172a;--muted:#64748b;--ring-offset:#f1f5f9;color-scheme:light}html{scroll-behavior:smooth}body{color:var(--text);background:var(--bg-deep);min-height:100vh;font-family:var(--font-geist-sans),system-ui,sans-serif;overflow-x:hidden;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transition:background-color .35s ease,color .25s ease}*{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.35) transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:rgba(148,163,184,.35);border-radius:999px}::-webkit-scrollbar-track{background:transparent}.app-bg-layer{position:fixed;inset:0;z-index:-1;opacity:.92;pointer-events:none;background:radial-gradient(ellipse 80% 50% at 50% -20%,rgba(34,211,238,.22),transparent),radial-gradient(ellipse 60% 40% at 100% 0,rgba(167,139,250,.18),transparent),radial-gradient(ellipse 50% 30% at 0 100%,rgba(59,130,246,.12),transparent);transition:opacity .35s ease}html[data-theme=light] .app-bg-layer{opacity:.75;background:radial-gradient(ellipse 80% 50% at 50% -20%,rgba(14,165,233,.12),transparent),radial-gradient(ellipse 60% 40% at 100% 0,rgba(139,92,246,.1),transparent),radial-gradient(ellipse 50% 30% at 0 100%,rgba(59,130,246,.08),transparent)}html[data-theme=light] .chart-surface{border-color:rgba(15,23,42,.12)!important;background:hsla(0,0%,100%,.65)!important}::selection{background:rgba(34,211,238,.25)}.safe-pb-nav{padding-bottom:calc(5.5rem + env(safe-area-inset-bottom, 0px))}@media (min-width:768px){.safe-pb-nav{padding-bottom:4rem}}@keyframes toast-in{0%{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%)}}.animate-toast-in{animation:toast-in .35s ease-out both}@keyframes pulse-soft{0%,to{opacity:1}50%{opacity:.65}}.animate-pulse-soft{animation:pulse-soft 2s ease-in-out infinite}.log-scroll{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.35) transparent}.log-scroll::-webkit-scrollbar{width:6px;height:6px}.log-scroll::-webkit-scrollbar-thumb{background:rgba(148,163,184,.35);border-radius:6px}.portal-grid-bg{background-image:linear-gradient(hsla(0,0%,100%,.05) 1px,transparent 0),linear-gradient(90deg,hsla(0,0%,100%,.05) 1px,transparent 0);background-size:28px 28px}.lp-noise{background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E")}@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}.selection\:bg-violet-400\/25 ::selection{background-color:rgba(167,139,250,.25)}.selection\:bg-violet-500\/30 ::selection{background-color:rgba(139,92,246,.3)}.selection\:bg-violet-400\/25::selection{background-color:rgba(167,139,250,.25)}.selection\:bg-violet-500\/30::selection{background-color:rgba(139,92,246,.3)}.file\:mr-3::file-selector-button{margin-right:.75rem}.file\:rounded-md::file-selector-button{border-radius:.375rem}.file\:border-0::file-selector-button{border-width:0}.file\:bg-cyan-50::file-selector-button{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.file\:bg-cyan-500\/15::file-selector-button{background-color:rgba(6,182,212,.15)}.file\:px-3::file-selector-button{padding-left:.75rem;padding-right:.75rem}.file\:py-1\.5::file-selector-button{padding-top:.375rem;padding-bottom:.375rem}.file\:text-xs::file-selector-button{font-size:.75rem;line-height:1rem}.file\:font-semibold::file-selector-button{font-weight:600}.file\:text-cyan-100::file-selector-button{--tw-text-opacity:1;color:rgb(207 250 254/var(--tw-text-opacity,1))}.file\:text-cyan-800::file-selector-button{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity,1))}.last\:border-0:last-child{border-width:0}.hover\:border-violet-400\/25:hover{border-color:rgba(167,139,250,.25)}.hover\:border-white\/15:hover{border-color:hsla(0,0%,100%,.15)}.hover\:border-white\/20:hover{border-color:hsla(0,0%,100%,.2)}.hover\:bg-amber-500\/15:hover{background-color:rgba(245,158,11,.15)}.hover\:bg-amber-500\/25:hover{background-color:rgba(245,158,11,.25)}.hover\:bg-black\/45:hover{background-color:rgba(0,0,0,.45)}.hover\:bg-cyan-100:hover{--tw-bg-opacity:1;background-color:rgb(207 250 254/var(--tw-bg-opacity,1))}.hover\:bg-cyan-50:hover{--tw-bg-opacity:1;background-color:rgb(236 254 255/var(--tw-bg-opacity,1))}.hover\:bg-cyan-500\/15:hover{background-color:rgba(6,182,212,.15)}.hover\:bg-cyan-500\/25:hover{background-color:rgba(6,182,212,.25)}.hover\:bg-cyan-500\/30:hover{background-color:rgba(6,182,212,.3)}.hover\:bg-emerald-100:hover{--tw-bg-opacity:1;background-color:rgb(209 250 229/var(--tw-bg-opacity,1))}.hover\:bg-emerald-500\/15:hover{background-color:rgba(16,185,129,.15)}.hover\:bg-emerald-500\/20:hover{background-color:rgba(16,185,129,.2)}.hover\:bg-emerald-500\/25:hover{background-color:rgba(16,185,129,.25)}.hover\:bg-rose-500\/15:hover{background-color:rgba(244,63,94,.15)}.hover\:bg-rose-500\/25:hover{background-color:rgba(244,63,94,.25)}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\:bg-slate-200\/60:hover{background-color:rgba(226,232,240,.6)}.hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.hover\:bg-violet-100:hover{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity,1))}.hover\:bg-violet-500\/15:hover{background-color:rgba(139,92,246,.15)}.hover\:bg-violet-500\/25:hover{background-color:rgba(139,92,246,.25)}.hover\:bg-violet-500\/30:hover{background-color:rgba(139,92,246,.3)}.hover\:bg-white\/10:hover{background-color:hsla(0,0%,100%,.1)}.hover\:bg-white\/5:hover{background-color:hsla(0,0%,100%,.05)}.hover\:bg-white\/60:hover{background-color:hsla(0,0%,100%,.6)}.hover\:bg-white\/\[0\.04\]:hover{background-color:hsla(0,0%,100%,.04)}.hover\:bg-white\/\[0\.06\]:hover{background-color:hsla(0,0%,100%,.06)}.hover\:bg-white\/\[0\.07\]:hover{background-color:hsla(0,0%,100%,.07)}.hover\:bg-white\/\[0\.08\]:hover{background-color:hsla(0,0%,100%,.08)}.hover\:bg-white\/\[0\.1\]:hover{background-color:hsla(0,0%,100%,.1)}.hover\:bg-zinc-500\/25:hover{background-color:hsla(240,4%,46%,.25)}.hover\:text-amber-300:hover{--tw-text-opacity:1;color:rgb(252 211 77/var(--tw-text-opacity,1))}.hover\:text-cyan-200:hover{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity,1))}.hover\:text-rose-200:hover{--tw-text-opacity:1;color:rgb(254 205 211/var(--tw-text-opacity,1))}.hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\:text-zinc-200:hover{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.hover\:text-zinc-300:hover{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:ring-violet-400\/50:hover{--tw-ring-color:rgba(167,139,250,.5)}.hover\:brightness-110:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-amber-400:focus{--tw-border-opacity:1;border-color:rgb(251 191 36/var(--tw-border-opacity,1))}.focus\:border-amber-400\/60:focus{border-color:rgba(251,191,36,.6)}.focus\:border-cyan-400:focus{--tw-border-opacity:1;border-color:rgb(34 211 238/var(--tw-border-opacity,1))}.focus\:border-cyan-400\/60:focus{border-color:rgba(34,211,238,.6)}.focus\:border-indigo-400:focus{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity,1))}.focus\:border-indigo-400\/60:focus{border-color:rgba(129,140,248,.6)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-emerald-500\/50:focus-visible{--tw-ring-color:rgba(16,185,129,.5)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-45:disabled{opacity:.45}@media (min-width:640px){.sm\:block{display:block}.sm\:inline{display:inline}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-\[14rem_minmax\(0\2c 1fr\)\]{grid-template-columns:14rem minmax(0,1fr)}.sm\:grid-cols-\[minmax\(0\2c 1fr\)_7rem\]{grid-template-columns:minmax(0,1fr) 7rem}.sm\:flex-row{flex-direction:row}.sm\:flex-wrap{flex-wrap:wrap}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-end{align-items:flex-end}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-2{gap:.5rem}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}}@media (min-width:768px){.md\:bottom-6{bottom:1.5rem}.md\:hidden{display:none}.md\:h-72{height:18rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[12rem_minmax\(0\2c 1fr\)\]{grid-template-columns:12rem minmax(0,1fr)}.md\:grid-cols-\[minmax\(0\2c 1fr\)_6rem_14rem\]{grid-template-columns:minmax(0,1fr) 6rem 14rem}.md\:grid-cols-\[minmax\(0\2c 1fr\)_8rem_7rem_7rem\]{grid-template-columns:minmax(0,1fr) 8rem 7rem 7rem}}@media (min-width:1024px){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\2c 1fr\)_22rem\]{grid-template-columns:minmax(0,1fr) 22rem}.lg\:grid-cols-\[minmax\(0\2c 1fr\)_8rem\]{grid-template-columns:minmax(0,1fr) 8rem}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-end{align-items:flex-end}.lg\:justify-between{justify-content:space-between}.lg\:px-10{padding-left:2.5rem;padding-right:2.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-8{padding-top:2rem;padding-bottom:2rem}.lg\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:1280px){.xl\:col-span-12{grid-column:span 12/span 12}.xl\:col-span-4{grid-column:span 4/span 4}.xl\:col-span-8{grid-column:span 8/span 8}.xl\:max-h-\[min\(24rem\2c 50vh\)\]{max-height:min(24rem,50vh)}.xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-\[0\.95fr\2c 1\.05fr\]{grid-template-columns:.95fr 1.05fr}.xl\:grid-cols-\[1\.1fr_0\.9fr\]{grid-template-columns:1.1fr .9fr}.xl\:grid-cols-\[18rem\2c 1fr\]{grid-template-columns:18rem 1fr}.xl\:grid-cols-\[minmax\(0\2c 1\.1fr\)_minmax\(20rem\2c 0\.8fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(20rem,.8fr)}.xl\:grid-cols-\[minmax\(0\2c 1\.1fr\)_minmax\(25rem\2c 0\.9fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(25rem,.9fr)}.xl\:grid-cols-\[minmax\(0\2c 1fr\)_minmax\(22rem\2c 0\.9fr\)\]{grid-template-columns:minmax(0,1fr) minmax(22rem,.9fr)}}@media (min-width:1536px){.\32xl\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:border-cyan-600\/25{border-color:rgba(8,145,178,.25)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:border-slate-200\/60{border-color:rgba(226,232,240,.6)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:bg-white\/90{background-color:hsla(0,0%,100%,.9)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:bg-white\/95{background-color:hsla(0,0%,100%,.95)}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-cyan-700{--tw-text-opacity:1;color:rgb(14 116 144/var(--tw-text-opacity,1))}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-cyan-950{--tw-text-opacity:1;color:rgb(8 51 68/var(--tw-text-opacity,1))}html[data-theme=light] .\[html\[data-theme\=light\]_\&\]\:text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))} \ No newline at end of file diff --git a/d2ypp2/web-console/out/android.html b/d2ypp2/web-console/out/android.html index 9ee4715..a3128fd 100644 --- a/d2ypp2/web-console/out/android.html +++ b/d2ypp2/web-console/out/android.html @@ -1 +1 @@ -无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file +无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file diff --git a/d2ypp2/web-console/out/android.txt b/d2ypp2/web-console/out/android.txt index 7977bb2..690f324 100644 --- a/d2ypp2/web-console/out/android.txt +++ b/d2ypp2/web-console/out/android.txt @@ -1,7 +1,7 @@ 2:I[9107,[],"ClientPageRoot"] -3:I[3946,["500","static/chunks/500-ea37cc8de90441f7.js","246","static/chunks/246-a56380dcf5ea0340.js","357","static/chunks/app/android/page-5f87422c86e34807.js"],"default",1] +3:I[3946,["500","static/chunks/500-ea37cc8de90441f7.js","246","static/chunks/246-17569b8e78acf2ac.js","357","static/chunks/app/android/page-5f87422c86e34807.js"],"default",1] 4:I[4707,[],""] 5:I[6423,[],""] -0:["nn5gs0vOhAN-ZntPcMeyY",[[["",{"children":["android",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["android",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","android","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/cc13f62d91728e6a.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] +0:["BfhpIk8_9MUFzvnv8gp2T",[[["",{"children":["android",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["android",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","android","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/267c3a238bcbe8cf.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"无人直播系统 · live.local"}],["$","meta","3",{"name":"description","content":"Linux ARM/x86 一键部署的无人直播控制台:YouTube 转播、TikTok HDMI、SRS、Neko 与系统服务"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/d2ypp2/web-console/out/console.html b/d2ypp2/web-console/out/console.html index 862ddff..cee7c62 100644 --- a/d2ypp2/web-console/out/console.html +++ b/d2ypp2/web-console/out/console.html @@ -1 +1 @@ -无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file +无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file diff --git a/d2ypp2/web-console/out/console.txt b/d2ypp2/web-console/out/console.txt index 9a1904b..51a4f4c 100644 --- a/d2ypp2/web-console/out/console.txt +++ b/d2ypp2/web-console/out/console.txt @@ -1,7 +1,7 @@ 2:I[9107,[],"ClientPageRoot"] -3:I[6367,["500","static/chunks/500-ea37cc8de90441f7.js","246","static/chunks/246-a56380dcf5ea0340.js","443","static/chunks/app/console/page-f5a0052a001f3016.js"],"default",1] +3:I[6367,["500","static/chunks/500-ea37cc8de90441f7.js","246","static/chunks/246-17569b8e78acf2ac.js","443","static/chunks/app/console/page-f5a0052a001f3016.js"],"default",1] 4:I[4707,[],""] 5:I[6423,[],""] -0:["nn5gs0vOhAN-ZntPcMeyY",[[["",{"children":["console",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["console",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","console","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/cc13f62d91728e6a.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] +0:["BfhpIk8_9MUFzvnv8gp2T",[[["",{"children":["console",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["console",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","console","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/267c3a238bcbe8cf.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"无人直播系统 · live.local"}],["$","meta","3",{"name":"description","content":"Linux ARM/x86 一键部署的无人直播控制台:YouTube 转播、TikTok HDMI、SRS、Neko 与系统服务"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/d2ypp2/web-console/out/index.html b/d2ypp2/web-console/out/index.html index 3c538a6..9ebde96 100644 --- a/d2ypp2/web-console/out/index.html +++ b/d2ypp2/web-console/out/index.html @@ -1 +1 @@ -无人直播系统 · live.local

总览

live.local · 夜间 · 前台自动刷新 · 最后同步 未同步

直播工作室 · 3D

CPU 1m

…

负载均值

内存

…

/ —

磁盘可用

…

/ —

服务在线

…

基础服务层

运行时间

…

自开机

\ No newline at end of file +无人直播系统 · live.local

总览

live.local · 夜间 · 前台自动刷新 · 最后同步 未同步

\ No newline at end of file diff --git a/d2ypp2/web-console/out/index.txt b/d2ypp2/web-console/out/index.txt index f50a707..2bbf7a0 100644 --- a/d2ypp2/web-console/out/index.txt +++ b/d2ypp2/web-console/out/index.txt @@ -1,7 +1,7 @@ 2:I[9107,[],"ClientPageRoot"] -3:I[7340,["500","static/chunks/500-ea37cc8de90441f7.js","166","static/chunks/166-6b01e1456a874782.js","246","static/chunks/246-a56380dcf5ea0340.js","54","static/chunks/54-2994f988b170fe04.js","931","static/chunks/app/page-c4a7a1a690a447a0.js"],"default",1] +3:I[7340,["500","static/chunks/500-ea37cc8de90441f7.js","568","static/chunks/568-00230e48c631a139.js","246","static/chunks/246-17569b8e78acf2ac.js","348","static/chunks/348-80f0852ea47d5112.js","931","static/chunks/app/page-9ff3a078ec6e16cb.js"],"default",1] 4:I[4707,[],""] 5:I[6423,[],""] -0:["nn5gs0vOhAN-ZntPcMeyY",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/cc13f62d91728e6a.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] +0:["BfhpIk8_9MUFzvnv8gp2T",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/267c3a238bcbe8cf.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"无人直播系统 · live.local"}],["$","meta","3",{"name":"description","content":"Linux ARM/x86 一键部署的无人直播控制台:YouTube 转播、TikTok HDMI、SRS、Neko 与系统服务"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/d2ypp2/web-console/out/shellcrash.html b/d2ypp2/web-console/out/shellcrash.html index 655a461..266b4d3 100644 --- a/d2ypp2/web-console/out/shellcrash.html +++ b/d2ypp2/web-console/out/shellcrash.html @@ -1 +1 @@ -无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file +无人直播系统 · live.local
← 返回门户首页无人直播 · 本页需与 API 同域(推荐 live.local:8001)

控制平面 · ARM Linux 开发板

无人直播控制中心

ShellCrash 负责代理上网;本机 FFmpeg 处理推流或 HDMI;Neko(Docker Chromium)或本机 Chromium 负责浏览器侧;开发板通过 USB 双头线 ADB 控制 AOSP。各模块独立,可分别启停。

live.local · unknown · unknown
正在连接控制台...
\ No newline at end of file diff --git a/d2ypp2/web-console/out/shellcrash.txt b/d2ypp2/web-console/out/shellcrash.txt index 4f9d8ec..0c83ba5 100644 --- a/d2ypp2/web-console/out/shellcrash.txt +++ b/d2ypp2/web-console/out/shellcrash.txt @@ -1,7 +1,7 @@ 2:I[9107,[],"ClientPageRoot"] -3:I[3398,["500","static/chunks/500-ea37cc8de90441f7.js","246","static/chunks/246-a56380dcf5ea0340.js","6","static/chunks/app/shellcrash/page-0c73522b1d5c8dc1.js"],"default",1] +3:I[3398,["500","static/chunks/500-ea37cc8de90441f7.js","246","static/chunks/246-17569b8e78acf2ac.js","6","static/chunks/app/shellcrash/page-0c73522b1d5c8dc1.js"],"default",1] 4:I[4707,[],""] 5:I[6423,[],""] -0:["nn5gs0vOhAN-ZntPcMeyY",[[["",{"children":["shellcrash",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["shellcrash",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","shellcrash","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/cc13f62d91728e6a.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] +0:["BfhpIk8_9MUFzvnv8gp2T",[[["",{"children":["shellcrash",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["shellcrash",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","shellcrash","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/267c3a238bcbe8cf.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"无人直播系统 · live.local"}],["$","meta","3",{"name":"description","content":"Linux ARM/x86 一键部署的无人直播控制台:YouTube 转播、TikTok HDMI、SRS、Neko 与系统服务"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/d2ypp2/web-console/out/youtube-events.html b/d2ypp2/web-console/out/youtube-events.html index 80ae1d4..9ab450f 100644 --- a/d2ypp2/web-console/out/youtube-events.html +++ b/d2ypp2/web-console/out/youtube-events.html @@ -1 +1 @@ -无人直播系统 · live.local

总览

live.local · 夜间 · 前台自动刷新 · 最后同步 未同步

直播工作室 · 3D

CPU 1m

…

负载均值

内存

…

/ —

磁盘可用

…

/ —

服务在线

…

基础服务层

运行时间

…

自开机

\ No newline at end of file +无人直播系统 · live.local

总览

live.local · 夜间 · 前台自动刷新 · 最后同步 未同步

\ No newline at end of file diff --git a/d2ypp2/web-console/out/youtube-events.txt b/d2ypp2/web-console/out/youtube-events.txt index 6a3ef9f..c72c731 100644 --- a/d2ypp2/web-console/out/youtube-events.txt +++ b/d2ypp2/web-console/out/youtube-events.txt @@ -1,7 +1,7 @@ 2:I[9107,[],"ClientPageRoot"] -3:I[316,["500","static/chunks/500-ea37cc8de90441f7.js","166","static/chunks/166-6b01e1456a874782.js","246","static/chunks/246-a56380dcf5ea0340.js","54","static/chunks/54-2994f988b170fe04.js","851","static/chunks/app/youtube-events/page-a4e65759d65834d9.js"],"default",1] +3:I[316,["500","static/chunks/500-ea37cc8de90441f7.js","568","static/chunks/568-00230e48c631a139.js","246","static/chunks/246-17569b8e78acf2ac.js","348","static/chunks/348-80f0852ea47d5112.js","851","static/chunks/app/youtube-events/page-a88e6c919a0b42a9.js"],"default",1] 4:I[4707,[],""] 5:I[6423,[],""] -0:["nn5gs0vOhAN-ZntPcMeyY",[[["",{"children":["youtube-events",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["youtube-events",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","youtube-events","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/cc13f62d91728e6a.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] +0:["BfhpIk8_9MUFzvnv8gp2T",[[["",{"children":["youtube-events",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["youtube-events",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","youtube-events","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/267c3a238bcbe8cf.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"zh-CN","data-theme":"dark","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_1e4310 __variable_c3aa02 font-sans antialiased","children":[["$","div",null,{"className":"app-bg-layer","aria-hidden":true}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]]}]}]],null],null],["$L6",null]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"无人直播系统 · live.local"}],["$","meta","3",{"name":"description","content":"Linux ARM/x86 一键部署的无人直播控制台:YouTube 转播、TikTok HDMI、SRS、Neko 与系统服务"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null